summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2017-11-07 14:51:37 +0000
committerNoam Postavsky <npostavs@gmail.com>2017-11-11 11:12:28 -0500
commit000e729071d6fb75eabe2bde8a5912440f1f3c44 (patch)
treef89abdfe63881e936c6800d0ef2ccd749edd02c5 /lisp
parent1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e (diff)
downloademacs-000e729071d6fb75eabe2bde8a5912440f1f3c44.tar.gz
Rename Man-build-section-alist (bug#28998)
The defsubst Man-build-section-alist builds and returns a list of strings, so rename it to Man-build-section-list and make it a defun. * lisp/man.el (Man-build-section-alist): Do it and reduce syntax. (Man-goto-page): * lisp/woman.el (woman-find-file): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/man.el10
-rw-r--r--lisp/woman.el2
2 files changed, 6 insertions, 6 deletions
diff --git a/lisp/man.el b/lisp/man.el
index f7b1609c929..798e78bbe76 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1513,16 +1513,16 @@ The following key bindings are currently in effect in the buffer:
(set (make-local-variable 'bookmark-make-record-function)
'Man-bookmark-make-record))
-(defsubst Man-build-section-alist ()
+(defun Man-build-section-list ()
"Build the list of manpage sections."
- (setq Man--sections nil)
+ (setq Man--sections ())
(goto-char (point-min))
(let ((case-fold-search nil))
- (while (re-search-forward Man-heading-regexp (point-max) t)
+ (while (re-search-forward Man-heading-regexp nil t)
(let ((section (match-string 1)))
(unless (member section Man--sections)
(push section Man--sections)))
- (forward-line 1)))
+ (forward-line)))
(setq Man--sections (nreverse Man--sections)))
(defsubst Man-build-references-alist ()
@@ -1803,7 +1803,7 @@ Specify which REFERENCE to use; default is based on word at point."
(widen)
(goto-char page-start)
(narrow-to-region page-start page-end)
- (Man-build-section-alist)
+ (Man-build-section-list)
(Man-build-references-alist)
(goto-char (point-min)))))
diff --git a/lisp/woman.el b/lisp/woman.el
index 111086e3629..1edf6e34c35 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1619,7 +1619,7 @@ decompress the file if appropriate. See the documentation for the
(setq woman-buffer-alist
(cons (cons file-name bufname) woman-buffer-alist)
woman-buffer-number 0)))))
- (Man-build-section-alist)
+ (Man-build-section-list)
(Man-build-references-alist)
(goto-char (point-min)))