Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved the `string-match-p` compatibility function up into the compati…

…bility section.
  • Loading branch information...
commit 63736db82509035e9f7cba238360a8b4a99686d7 1 parent ab106ff
@pjweisberg pjweisberg authored
Showing with 7 additions and 11 deletions.
  1. +7 −11 magit.el
View
18 magit.el
@@ -679,6 +679,13 @@ Many Magit faces inherit from this one by default."
most-positive-fixnum
(length (remq '&optional arglist))))))
+ (unless (fboundp 'string-match-p)
+ (defun string-match-p (regexp string &optional start)
+ "Same as `string-match' except this function does not
+change the match data."
+ (let ((inhibit-changing-match-data t))
+ (string-match regexp string start))))
+
(if (fboundp 'with-silent-modifications)
(defalias 'magit-with-silent-modifications 'with-silent-modifications)
(defmacro magit-with-silent-modifications (&rest body)
@@ -5269,16 +5276,5 @@ With a prefix arg, do a submodule update --init"
(t
(magit-start-process "Gitk" nil magit-gitk-executable "--all")))))
-;; for emacs 22 compatibility
-
-(defun magit-string-match-p (regexp string &optional start)
- "Same as `string-match' except this function does not change
-the match data."
- (let ((inhibit-changing-match-data t))
- (string-match regexp string start)))
-
-(when (not (fboundp 'string-match-p))
- (fset 'string-match-p (symbol-function 'magit-string-match-p)))
-
(provide 'magit)
;;; magit.el ends here
Please sign in to comment.
Something went wrong with that request. Please try again.