aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBasil L. Contovounesios2017-11-07 14:51:37 +0000
committerNoam Postavsky2017-11-11 11:12:28 -0500
commit000e729071d6fb75eabe2bde8a5912440f1f3c44 (patch)
treef89abdfe63881e936c6800d0ef2ccd749edd02c5
parent1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e (diff)
downloademacs-000e729071d6fb75eabe2bde8a5912440f1f3c44.tar.gz
emacs-000e729071d6fb75eabe2bde8a5912440f1f3c44.zip
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.
-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:
1513 (set (make-local-variable 'bookmark-make-record-function) 1513 (set (make-local-variable 'bookmark-make-record-function)
1514 'Man-bookmark-make-record)) 1514 'Man-bookmark-make-record))
1515 1515
1516(defsubst Man-build-section-alist () 1516(defun Man-build-section-list ()
1517 "Build the list of manpage sections." 1517 "Build the list of manpage sections."
1518 (setq Man--sections nil) 1518 (setq Man--sections ())
1519 (goto-char (point-min)) 1519 (goto-char (point-min))
1520 (let ((case-fold-search nil)) 1520 (let ((case-fold-search nil))
1521 (while (re-search-forward Man-heading-regexp (point-max) t) 1521 (while (re-search-forward Man-heading-regexp nil t)
1522 (let ((section (match-string 1))) 1522 (let ((section (match-string 1)))
1523 (unless (member section Man--sections) 1523 (unless (member section Man--sections)
1524 (push section Man--sections))) 1524 (push section Man--sections)))
1525 (forward-line 1))) 1525 (forward-line)))
1526 (setq Man--sections (nreverse Man--sections))) 1526 (setq Man--sections (nreverse Man--sections)))
1527 1527
1528(defsubst Man-build-references-alist () 1528(defsubst Man-build-references-alist ()
@@ -1803,7 +1803,7 @@ Specify which REFERENCE to use; default is based on word at point."
1803 (widen) 1803 (widen)
1804 (goto-char page-start) 1804 (goto-char page-start)
1805 (narrow-to-region page-start page-end) 1805 (narrow-to-region page-start page-end)
1806 (Man-build-section-alist) 1806 (Man-build-section-list)
1807 (Man-build-references-alist) 1807 (Man-build-references-alist)
1808 (goto-char (point-min))))) 1808 (goto-char (point-min)))))
1809 1809
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
1619 (setq woman-buffer-alist 1619 (setq woman-buffer-alist
1620 (cons (cons file-name bufname) woman-buffer-alist) 1620 (cons (cons file-name bufname) woman-buffer-alist)
1621 woman-buffer-number 0))))) 1621 woman-buffer-number 0)))))
1622 (Man-build-section-alist) 1622 (Man-build-section-list)
1623 (Man-build-references-alist) 1623 (Man-build-references-alist)
1624 (goto-char (point-min))) 1624 (goto-char (point-min)))
1625 1625