summaryrefslogtreecommitdiff
path: root/hbdata.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2019-08-14 04:29:57 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-08-14 04:29:57 -0400
commit6e555e763567c66ad8e50724a7dd5e286dbb1e65 (patch)
tree86fb29daa274d8007063babec826719154bf087e /hbdata.el
parent98a5ecb3bf80f2b53523c769459d1a1a49491125 (diff)
parent332ef336a7ad87e25c0563bfeaf0e6758d52c59c (diff)
Merge remote-tracking branch 'hyperbole/master' into externals/hyperbolescratch/hyperbole-lexbind
Diffstat (limited to 'hbdata.el')
-rw-r--r--hbdata.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/hbdata.el b/hbdata.el
index f1c2390..022c37c 100644
--- a/hbdata.el
+++ b/hbdata.el
@@ -115,8 +115,7 @@ Nil is returned when button has not beened modified."
(let ((case-fold-search t) (src-matches) (src) (matches) (end))
(goto-char (point-min))
(while (re-search-forward "^\^L\n\"\\([^\"]+\\)\"" nil t)
- (setq src (buffer-substring (match-beginning 1)
- (match-end 1))
+ (setq src (match-string 1)
matches nil)
(save-excursion
(setq end (if (re-search-forward "^\^L" nil t)
@@ -125,10 +124,7 @@ Nil is returned when button has not beened modified."
(concat "^(\"\\(" (if partial "[^\"]*")
(regexp-quote (ebut:label-to-key label))
(if partial "[^\"]*") "\\)\"") nil t)
- (setq matches (cons
- (buffer-substring (match-beginning 1)
- (match-end 1))
- matches)))
+ (setq matches (cons (match-string 1) matches)))
(if matches
(setq src-matches (cons (cons src matches) src-matches)))
(goto-char end))
@@ -220,7 +216,7 @@ class 'hbdata' to operate on the entry."
(defun hbdata:instance-next (lbl-key)
"Returns string for button instance number following LBL-KEY's.
-nil if LBL-KEY is nil."
+Nil if LBL-KEY is nil."
(and lbl-key
(if (string-match
(concat (regexp-quote ebut:instance-sep) "[0-9]+$") lbl-key)
@@ -237,8 +233,7 @@ Takes arguments LBL-KEY, KEY-SRC and optional DIRECTORY."
(hbdata:apply-entry
(lambda ()
(if (looking-at "[0-9]+")
- (string-to-number (buffer-substring (match-beginning 0)
- (match-end 0)))
+ (string-to-number (match-string 0))
1))
lbl-key key-src directory nil 'instance))