summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/km-magit.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index fb46525..2967c86 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -72,8 +72,8 @@ argument CHOOSE-PROJECT is non-nil, 2) there is no current
project, or 3) an commit object for the hash at point doesn't
exist in the current project."
(interactive "P")
- (if (save-excursion (skip-chars-backward "a-f0-9")
- (looking-at "\\b[a-f0-9]\\{4,40\\}\\b"))
+ (if (save-excursion (skip-chars-backward "[[:xdigit:]]")
+ (looking-at "\\b[[:xdigit:]]\\{4,40\\}\\b"))
(let* ((hash (match-string-no-properties 0))
(project
(and (or choose-project
@@ -428,8 +428,8 @@ argument."
(user-error "Full hashes are 40 characters"))
((> n 30)
(message "That doesn't seem incredibly useful, but OK")))
- (let ((offset (- (skip-chars-backward "A-z0-9"))))
- (if (looking-at "\\b[A-z0-9]\\{5,40\\}\\b")
+ (let ((offset (- (skip-chars-backward "[[:xdigit:]]"))))
+ (if (looking-at "\\b[[:xdigit:]]\\{5,40\\}\\b")
(let ((hash-len (- (match-end 0) (match-beginning 0)))
(hash (match-string 0)))
(when (< hash-len n)
@@ -439,7 +439,7 @@ argument."
(substring hash 0 n))
'fixedcase)
(when (< offset n)
- (skip-chars-backward "A-z0-9")
+ (skip-chars-backward "[[:xdigit:]]")
(goto-char (+ (point) offset))))
(goto-char (+ (point) offset))
(user-error "No hash found at point"))))