[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 000e729 2/2: Rename Man-build-section-alist (bug#28
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 000e729 2/2: Rename Man-build-section-alist (bug#28998) |
Date: |
Sat, 11 Nov 2017 11:15:24 -0500 (EST) |
branch: master
commit 000e729071d6fb75eabe2bde8a5912440f1f3c44
Author: Basil L. Contovounesios <address@hidden>
Commit: Noam Postavsky <address@hidden>
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.
---
lisp/man.el | 10 +++++-----
lisp/woman.el | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/man.el b/lisp/man.el
index f7b1609..798e78b 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 111086e..1edf6e3 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)))