[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/apropos.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/apropos.el [lexbind] |
Date: |
Tue, 14 Oct 2003 19:51:39 -0400 |
Index: emacs/lisp/apropos.el
diff -c emacs/lisp/apropos.el:1.87.2.1 emacs/lisp/apropos.el:1.87.2.2
*** emacs/lisp/apropos.el:1.87.2.1 Fri Apr 4 01:20:00 2003
--- emacs/lisp/apropos.el Tue Oct 14 19:50:48 2003
***************
*** 1,6 ****
;;; apropos.el --- apropos commands for users and programmers
! ;; Copyright (C) 1989, 1994, 1995, 2001, 2002 Free Software Foundation, Inc.
;; Author: Joe Wells <address@hidden>
;; Rewritten: Daniel Pfeiffer <address@hidden>
--- 1,6 ----
;;; apropos.el --- apropos commands for users and programmers
! ;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003 Free Software Foundation,
Inc.
;; Author: Joe Wells <address@hidden>
;; Rewritten: Daniel Pfeiffer <address@hidden>
***************
*** 102,107 ****
--- 102,112 ----
:group 'apropos
:type 'face)
+ (defcustom apropos-sort-by-scores nil
+ "*Non-nil means sort matches by scores; best match is shown first.
+ The computed score is shown for each match."
+ :group 'apropos
+ :type 'boolean)
(defvar apropos-mode-map
(let ((map (make-sparse-keymap)))
***************
*** 119,127 ****
(defvar apropos-mode-hook nil
"*Hook run when mode is turned on.")
- (defvar apropos-show-scores nil
- "*Show apropos scores if non-nil.")
-
(defvar apropos-regexp nil
"Regexp used in current apropos run.")
--- 124,129 ----
***************
*** 246,254 ****
"Make regexp matching any two of the words in WORDS."
(concat "\\("
(mapconcat 'identity words "\\|")
! "\\)" wild
(if (cdr words)
! (concat "\\("
(mapconcat 'identity words "\\|")
"\\)")
"")))
--- 248,257 ----
"Make regexp matching any two of the words in WORDS."
(concat "\\("
(mapconcat 'identity words "\\|")
! "\\)"
(if (cdr words)
! (concat wild
! "\\("
(mapconcat 'identity words "\\|")
"\\)")
"")))
***************
*** 468,474 ****
(while p
(setcar p (list
(setq symbol (car p))
! 0
(when (fboundp symbol)
(if (setq doc (condition-case nil
(documentation symbol t)
--- 471,477 ----
(while p
(setcar p (list
(setq symbol (car p))
! (apropos-score-symbol symbol)
(when (fboundp symbol)
(if (setq doc (condition-case nil
(documentation symbol t)
***************
*** 766,775 ****
(if (null apropos-accumulator)
(message "No apropos matches for `%s'" apropos-orig-regexp)
(setq apropos-accumulator
! (sort apropos-accumulator (lambda (a b)
! (or (> (cadr a) (cadr b))
! (and (= (cadr a) (cadr b))
! (string-lessp (car a) (car
b)))))))
(with-output-to-temp-buffer "*Apropos*"
(let ((p apropos-accumulator)
(old-buffer (current-buffer))
--- 769,783 ----
(if (null apropos-accumulator)
(message "No apropos matches for `%s'" apropos-orig-regexp)
(setq apropos-accumulator
! (sort apropos-accumulator
! (lambda (a b)
! ;; Don't sort by score if user can't see the score.
! ;; It would be confusing. -- rms.
! (if apropos-sort-by-scores
! (or (> (cadr a) (cadr b))
! (and (= (cadr a) (cadr b))
! (string-lessp (car a) (car b))))
! (string-lessp (car a) (car b))))))
(with-output-to-temp-buffer "*Apropos*"
(let ((p apropos-accumulator)
(old-buffer (current-buffer))
***************
*** 798,804 ****
;; changed the variable!
;; Just say `no' to variables containing faces!
'face apropos-symbol-face)
! (if apropos-show-scores
(insert " (" (number-to-string (cadr apropos-item)) ") "))
;; Calculate key-bindings if we want them.
(and do-keys
--- 806,812 ----
;; changed the variable!
;; Just say `no' to variables containing faces!
'face apropos-symbol-face)
! (if apropos-sort-by-scores
(insert " (" (number-to-string (cadr apropos-item)) ") "))
;; Calculate key-bindings if we want them.
(and do-keys
***************
*** 913,916 ****
--- 921,925 ----
(provide 'apropos)
+ ;;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e
;;; apropos.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/apropos.el [lexbind],
Miles Bader <=