emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/apropos.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/apropos.el
Date: Sat, 12 Jul 2003 17:57:50 -0400

Index: emacs/lisp/apropos.el
diff -c emacs/lisp/apropos.el:1.92 emacs/lisp/apropos.el:1.93
*** emacs/lisp/apropos.el:1.92  Tue Feb  4 06:00:25 2003
--- emacs/lisp/apropos.el       Sat Jul 12 17:57:50 2003
***************
*** 102,107 ****
--- 102,111 ----
    :group 'apropos
    :type 'face)
  
+ (defcustom apropos-show-scores nil
+   "*Non-nil means show score for each match, and sort matches by scores."
+   :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.")
  
--- 123,128 ----
***************
*** 468,474 ****
      (while p
        (setcar p (list
                 (setq symbol (car p))
!                0
                 (when (fboundp symbol)
                   (if (setq doc (condition-case nil
                                     (documentation symbol t)
--- 469,475 ----
      (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))
--- 767,781 ----
    (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-show-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))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]