[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hyperbole-lexbind a65ee22 03/20: Small coding improvement
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/hyperbole-lexbind a65ee22 03/20: Small coding improvements |
Date: |
Wed, 14 Aug 2019 04:30:21 -0400 (EDT) |
branch: scratch/hyperbole-lexbind
commit a65ee22f9b359d73ba543a0d4a8287e3162b7fd1
Author: Bob Weiner <address@hidden>
Commit: Bob Weiner <address@hidden>
Small coding improvements
---
hyrolo.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/hyrolo.el b/hyrolo.el
index 1c8719a..6375839 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -190,7 +190,7 @@ entry which begins with the parent string."
name (substring name (min (1+ end) (length name))))
(if (re-search-forward
(concat hyrolo-entry-regexp (regexp-quote parent)) nil t)
- (setq level (match-string-no-properties 1))
+ (setq level (match-string-no-properties hyrolo-entry-group-number))
(error "(hyrolo-add): `%s' category not found in \"%s\"."
parent file)))
(narrow-to-region (point)
@@ -234,11 +234,11 @@ entry which begins with the parent string."
(goto-char (point-min)))
(while (and again (re-search-forward hyrolo-entry-regexp nil 'end))
- (setq entry-level (match-string-no-properties 1))
+ (setq entry-level (match-string-no-properties
hyrolo-entry-group-number))
(if (/= (length entry-level) level-len)
(hyrolo-to-entry-end t entry-level)
(setq entry (buffer-substring-no-properties (point) (+ (point) len))
- entry-spc (match-string-no-properties hyrolo-entry-regexp-))
+ entry-spc (match-string-no-properties
hyrolo-entry-trailing-space-group-number))
(cond ((string< entry name)
(hyrolo-to-entry-end t entry-level))
((string< name entry)
@@ -1269,8 +1269,7 @@ Name is returned as `last, first-and-middle'."
"\\([^\" \t()]+\\)[ \t]*[)\"]\\)?[ \t]*$")
from)
(setq name (hyrolo-format-name from 3 4))
- (or email (setq email (substring from (match-beginning 1)
- (match-end 1)))))
+ (or email (setq email (match-string 1 from))))
;; Match: <email>, name <email>, "name" <email>
((string-match
(concat "^\\(\"?\\([^\"<>()\n]+\\)[ \t]+"
@@ -1278,8 +1277,7 @@ Name is returned as `last, first-and-middle'."
"<\\([^\"<>() \t\n\r\f]+\\)>[ \t]*$")
from)
(setq name (hyrolo-format-name from 2 3))
- (or email (setq email (substring from (match-beginning 4)
- (match-end 4)))))))
+ (or email (setq email (match-string 4 from))))))
(if (or name email)
(list name email))))
@@ -1386,7 +1384,7 @@ Returns point where matching entry begins or nil if not
found."
(save-excursion
(beginning-of-line)
(if (looking-at (concat hyrolo-entry-regexp
(regexp-quote parent)))
- (setq level (match-string-no-properties 1)))))
+ (setq level (match-string-no-properties
hyrolo-entry-group-number)))))
level))
((equal name real-name)) ;; Try next file.
(t ;; Found parent but not child
- [elpa] scratch/hyperbole-lexbind updated (98a5ecb -> 6e555e7), Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind a65ee22 03/20: Small coding improvements,
Stefan Monnier <=
- [elpa] scratch/hyperbole-lexbind 91e8a73 02/20: Add texinfo pathname section references; improve internal image links, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind e1a95cc 04/20: Improve paragraph filling to match newer Emacs versions, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 60d51ad 12/20: Remove last references to XEmscs and xterm used under Emacs 18, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind af55195 05/20: Make Action Key handle bi-directional jumping for Org mode radio target and internal links, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 36e4724 01/20: 7.0.3a bug fixes; add link-to-ibut, link-to-gbut, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind e647502 18/20: BSD zgrep support for Hyperbole grep command, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 0829631 13/20: Fix small logic errors in new e/g/ilink functions, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind b128464 06/20: Update Changes and add 7.0.3 release message to HY-ANNOUNCE, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind 332ef33 19/20: V7.0.3b test release: Basic DEMO updates, Stefan Monnier, 2019/08/14
- [elpa] scratch/hyperbole-lexbind c547ad4 10/20: Merge branch '7.0.3a' into prepare-pr-for-merging, Stefan Monnier, 2019/08/14