]> git.eshelyaron.com Git - emacs.git/commitdiff
(apropos-next-label-button): Use the presence of a
authorMiles Bader <miles@gnu.org>
Mon, 8 Oct 2001 16:37:44 +0000 (16:37 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 8 Oct 2001 16:37:44 +0000 (16:37 +0000)
`apropos-label' property to detect label buttons.

lisp/ChangeLog
lisp/apropos.el

index 1481d60afe2ac62d2bd108ba766b95e3f4a96fb3..a2e0f9dbe8b43578b5680f7c73427dad50c1d61e 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-09  Miles Bader  <miles@gnu.org>
+
+       * apropos.el (apropos-next-label-button): Use the presence of a
+       `apropos-label' property to detect label buttons.
+
 2001-10-08  Miles Bader  <miles@gnu.org>
 
        * button.el (next-button, previous-button): Remove N and WRAP
index 23f772648c1bbb6c309678690589f134f1fd0154..e235859c69ca75873d4a36fa1a6cc9bc84ff1d57 100644 (file)
@@ -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)))
 
 \f
 ;;;###autoload