>From ecbe8f2d076cbfb61d447ab0faca8e581864d459 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 25 Oct 2017 17:03:12 +0100 Subject: [PATCH 2/2] Rename Man-build-section-alist Man--sections is a list of strings, so rename inline function to Man-build-section-list. * 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 | 12 ++++++------ lisp/woman.el | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index f7b1609c92..2ff25344fe 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1513,16 +1513,16 @@ Man-mode (set (make-local-variable 'bookmark-make-record-function) 'Man-bookmark-make-record)) -(defsubst Man-build-section-alist () +(defsubst 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) + (let (case-fold-search) + (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 @@ Man-goto-page (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 111086e362..1edf6e34c3 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1619,7 +1619,7 @@ woman-find-file (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))) -- 2.14.2