aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ryde2009-11-16 22:59:09 +0000
committerKevin Ryde2009-11-16 22:59:09 +0000
commit497de631d51619e0717e740ba50bf182bb3482f7 (patch)
tree4f40d63bfe38bab006bc7e2e9709fe5c0f3c97c7
parentaf42a9cc3816ffea36927c2d2ceea6beec534298 (diff)
downloademacs-497de631d51619e0717e740ba50bf182bb3482f7.tar.gz
emacs-497de631d51619e0717e740ba50bf182bb3482f7.zip
* emacs-lisp/lisp-mnt.el (lm-keywords): Allow multi-line keywords.
(lm-keywords-list): Allow comma-only separator like "foo,bar". Ignore trailing spaces by omit-nulls to split-string (fixing regression from Emacs 21 due to the incompatible split-string change). (Bug #4928.)
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el12
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cfe1492a962..5c657be3180 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -4,6 +4,12 @@
4 `sgml-lexical-context' instead of own parse for tag. (Further to 4 `sgml-lexical-context' instead of own parse for tag. (Further to
5 Bug#4511). 5 Bug#4511).
6 6
7 * emacs-lisp/lisp-mnt.el (lm-keywords): Allow multi-line keywords.
8 (lm-keywords-list): Allow comma-only separator like "foo,bar".
9 Ignore trailing spaces by omit-nulls to split-string (fixing
10 regression from Emacs 21 due to the incompatible split-string
11 change). (Bug #4928.)
12
72009-11-16 Dan Nicolaescu <dann@ics.uci.edu> 132009-11-16 Dan Nicolaescu <dann@ics.uci.edu>
8 14
9 * vc.el (vc-log-show-limit): Default to 2000. 15 * vc.el (vc-log-show-limit): Default to 2000.
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index a748835d477..22d79c066c3 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -445,16 +445,20 @@ This can be found in an RCS or SCCS header."
445 (match-string-no-properties 1))))))) 445 (match-string-no-properties 1)))))))
446 446
447(defun lm-keywords (&optional file) 447(defun lm-keywords (&optional file)
448 "Return the keywords given in file FILE, or current buffer if FILE is nil." 448 "Return the keywords given in file FILE, or current buffer if FILE is nil.
449The return is a `downcase'-ed string, or nil if no keywords
450header. Multi-line keywords are joined up with a space between
451each line."
449 (lm-with-file file 452 (lm-with-file file
450 (let ((keywords (lm-header "keywords"))) 453 (let ((keywords (lm-header-multiline "keywords")))
451 (and keywords (downcase keywords))))) 454 (and keywords
455 (mapconcat 'downcase keywords " ")))))
452 456
453(defun lm-keywords-list (&optional file) 457(defun lm-keywords-list (&optional file)
454 "Return list of keywords given in file FILE." 458 "Return list of keywords given in file FILE."
455 (let ((keywords (lm-keywords file))) 459 (let ((keywords (lm-keywords file)))
456 (if keywords 460 (if keywords
457 (split-string keywords ",?[ \t]")))) 461 (split-string keywords "[, \t\n]+" t))))
458 462
459(defvar finder-known-keywords) 463(defvar finder-known-keywords)
460(defun lm-keywords-finder-p (&optional file) 464(defun lm-keywords-finder-p (&optional file)