diff options
author | Miles Bader <miles@gnu.org> | 2001-10-08 16:37:44 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2001-10-08 16:37:44 +0000 |
commit | 3b8c60f18cbdbb5eb571c7fe1588c43542d88b17 (patch) | |
tree | 9820da57be78f4949af9d6e836c432f15ac31b46 /lisp/apropos.el | |
parent | e6b3ceb61d55b33a99df99c7b62e2ec0635f0eeb (diff) | |
download | emacs-3b8c60f18cbdbb5eb571c7fe1588c43542d88b17.tar.gz emacs-3b8c60f18cbdbb5eb571c7fe1588c43542d88b17.tar.bz2 emacs-3b8c60f18cbdbb5eb571c7fe1588c43542d88b17.zip |
(apropos-next-label-button): Use the presence of a
`apropos-label' property to detect label buttons.
Diffstat (limited to 'lisp/apropos.el')
-rw-r--r-- | lisp/apropos.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el index 23f772648c1..e235859c69c 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -197,23 +197,24 @@ for the regexp; the part that matches gets displayed in this font." (apropos-describe-plist (button-get button 'apropos-symbol)))) (defun apropos-next-label-button (pos) - "Returns the next `apropos-label' button after POS, or nil if there's none. + "Returns the next apropos label button after POS, or nil if there's none. Will also return nil if more than one `apropos-symbol' button is encountered before finding a label." (let* ((button (next-button pos t)) (already-hit-symbol nil) - (button-type (and button (button-get button 'type)))) + (label (and button (button-get button 'apropos-label))) + (type (and button (button-get button 'type)))) (while (and button - (not (eq button-type 'apropos-label)) - (or (not (eq button-type 'apropos-symbol)) + (not label) + (or (not (eq type 'apropos-symbol)) (not already-hit-symbol))) - (when (eq button-type 'apropos-symbol) + (when (eq type 'apropos-symbol) (setq already-hit-symbol t)) (setq button (next-button (button-start button))) (when button - (setq button-type (button-get button 'type)))) - (and (eq button-type 'apropos-label) - button))) + (setq label (button-get button 'apropos-label)) + (setq type (button-get button 'type)))) + (and label button))) ;;;###autoload |