From: Basil L. Contovounesios Date: Tue, 7 Nov 2017 14:51:37 +0000 (+0000) Subject: Rename Man-build-section-alist (bug#28998) X-Git-Tag: emacs-27.0.90~6167 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=000e729071d6fb75eabe2bde8a5912440f1f3c44;p=emacs.git 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. --- 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)))