[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master cd3ce6e541 10/10: * lisp/apropos.el (apropos-documentation): Simp
From: |
Stefan Kangas |
Subject: |
master cd3ce6e541 10/10: * lisp/apropos.el (apropos-documentation): Simplify. |
Date: |
Sat, 30 Jul 2022 06:12:06 -0400 (EDT) |
branch: master
commit cd3ce6e54182a1630b870f13289131cc957eafa6
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
* lisp/apropos.el (apropos-documentation): Simplify.
---
lisp/apropos.el | 68 ++++++++++++++++++++++++++++-----------------------------
1 file changed, 33 insertions(+), 35 deletions(-)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 0b84f9fa63..13dc8fa139 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -909,41 +909,39 @@ Returns list of symbols and documentation found."
(apropos-parse-pattern pattern t)
(or do-all (setq do-all apropos-do-all))
(setq apropos-accumulator () apropos-files-scanned ())
- (let ((standard-input (get-buffer-create " apropos-temp"))
- (apropos-sort-by-scores apropos-documentation-sort-by-scores)
- f v sf sv)
- (unwind-protect
- (with-current-buffer standard-input
- (apropos-documentation-check-doc-file)
- (if do-all
- (mapatoms
- (lambda (symbol)
- (setq f (apropos-safe-documentation symbol)
- v (get symbol 'variable-documentation))
- (if (integerp v) (setq v nil))
- (setq f (apropos-documentation-internal f)
- v (apropos-documentation-internal v))
- (setq sf (apropos-score-doc f)
- sv (apropos-score-doc v))
- (if (or f v)
- (if (setq apropos-item
- (cdr (assq symbol apropos-accumulator)))
- (progn
- (if f
- (progn
- (setcar (nthcdr 1 apropos-item) f)
- (setcar apropos-item (+ (car apropos-item)
sf))))
- (if v
- (progn
- (setcar (nthcdr 2 apropos-item) v)
- (setcar apropos-item (+ (car apropos-item)
sv)))))
- (setq apropos-accumulator
- (cons (list symbol
- (+ (apropos-score-symbol symbol 2) sf
sv)
- f v)
- apropos-accumulator)))))))
- (apropos-print nil "\n----------------\n" nil t))
- (kill-buffer standard-input))))
+ (with-temp-buffer
+ (let ((standard-input (current-buffer))
+ (apropos-sort-by-scores apropos-documentation-sort-by-scores)
+ f v sf sv)
+ (apropos-documentation-check-doc-file)
+ (if do-all
+ (mapatoms
+ (lambda (symbol)
+ (setq f (apropos-safe-documentation symbol)
+ v (get symbol 'variable-documentation))
+ (if (integerp v) (setq v nil))
+ (setq f (apropos-documentation-internal f)
+ v (apropos-documentation-internal v))
+ (setq sf (apropos-score-doc f)
+ sv (apropos-score-doc v))
+ (if (or f v)
+ (if (setq apropos-item
+ (cdr (assq symbol apropos-accumulator)))
+ (progn
+ (if f
+ (progn
+ (setcar (nthcdr 1 apropos-item) f)
+ (setcar apropos-item (+ (car apropos-item) sf))))
+ (if v
+ (progn
+ (setcar (nthcdr 2 apropos-item) v)
+ (setcar apropos-item (+ (car apropos-item) sv)))))
+ (setq apropos-accumulator
+ (cons (list symbol
+ (+ (apropos-score-symbol symbol 2) sf sv)
+ f v)
+ apropos-accumulator)))))))
+ (apropos-print nil "\n----------------\n" nil t))))
(defun apropos-value-internal (predicate symbol function)
- master updated (76bcbe5f93 -> cd3ce6e541), Stefan Kangas, 2022/07/30
- master 53b1e6f96c 01/10: Make outline-view-change-hook obsolete, Stefan Kangas, 2022/07/30
- master 2e21074efd 08/10: Prefer defvar-keymap in dns-mode-map, Stefan Kangas, 2022/07/30
- master a109cdc8f2 04/10: ; * lisp/ffap.el: Comment cleanup., Stefan Kangas, 2022/07/30
- master ecfac493fa 03/10: Make ffap-newfile-prompt obsolete, Stefan Kangas, 2022/07/30
- master 7e84db9484 07/10: Prefer defvar-keymap in nroff-mode-map, Stefan Kangas, 2022/07/30
- master 9bdcca553f 05/10: ; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment., Stefan Kangas, 2022/07/30
- master fc79bb6ffc 02/10: * lisp/ffap.el (ffap-url-regexp): Add gemini., Stefan Kangas, 2022/07/30
- master cd3ce6e541 10/10: * lisp/apropos.el (apropos-documentation): Simplify.,
Stefan Kangas <=
- master f08f5b7afe 09/10: Avoid leaving temp buffers in bib-mode and refbib, Stefan Kangas, 2022/07/30
- master 454c06a22c 06/10: Fix namespace use in bib-mode.el, Stefan Kangas, 2022/07/30