]> git.eshelyaron.com Git - emacs.git/commitdiff
(apropos-symbols-internal): Handle (obsolete) face aliases.
authorGlenn Morris <rgm@gnu.org>
Mon, 31 Aug 2009 01:33:11 +0000 (01:33 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 31 Aug 2009 01:33:11 +0000 (01:33 +0000)
lisp/apropos.el

index ca9be2f36f8b99e504e54ba486543721b83ea89c..68721eb05a8b535b931f99f6ec13de98bd8f71b8 100644 (file)
@@ -649,8 +649,19 @@ thus be found in `load-history'."
                   (apropos-documentation-property
                    symbol 'widget-documentation t))
               (when (facep symbol)
-                (apropos-documentation-property
-                 symbol 'face-documentation t))
+                (let ((alias (get symbol 'face-alias)))
+                  (if alias
+                      (if (facep alias)
+                          (format "%slias for the face `%s'."
+                                  (if (get symbol 'obsolete-face)
+                                      "Obsolete a"
+                                    "A")
+                                  alias)
+                        ;; Never happens in practice because fails
+                        ;; (facep symbol) test.
+                        "(alias for undefined face)")
+                    (apropos-documentation-property
+                     symbol 'face-documentation t))))
               (when (get symbol 'custom-group)
                   (apropos-documentation-property
                    symbol 'group-documentation t)))))