aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-08-22 19:53:05 +0000
committerJuri Linkov2005-08-22 19:53:05 +0000
commit9b82fc013bbce4dac0dd920e30693245429e87ec (patch)
tree07b166ad00228543d210e634f79f6bd5800e24ac
parent48d59eda34ca5c4134ece124028a2d101ef97c8a (diff)
downloademacs-9b82fc013bbce4dac0dd920e30693245429e87ec.tar.gz
emacs-9b82fc013bbce4dac0dd920e30693245429e87ec.zip
(set-face-underline): Delete this duplicate function
and make an obsolete alias to set-face-underline-p. (set-face-underline-p): Use docstring of set-face-underline. (describe-face): Create hyperlink to parent face.
-rw-r--r--lisp/faces.el26
1 files changed, 12 insertions, 14 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 561fdc95aba..3335dec8bc7 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -770,7 +770,7 @@ and DATA is a string, containing the raw bits of the bitmap."
770 (set-face-attribute face frame :stipple (or stipple 'unspecified))) 770 (set-face-attribute face frame :stipple (or stipple 'unspecified)))
771 771
772 772
773(defun set-face-underline (face underline &optional frame) 773(defun set-face-underline-p (face underline-p &optional frame)
774 "Specify whether face FACE is underlined. 774 "Specify whether face FACE is underlined.
775UNDERLINE nil means FACE explicitly doesn't underline. 775UNDERLINE nil means FACE explicitly doesn't underline.
776UNDERLINE non-nil means FACE explicitly does underlining 776UNDERLINE non-nil means FACE explicitly does underlining
@@ -781,20 +781,11 @@ Use `set-face-attribute' to ``unspecify'' underlining."
781 (interactive 781 (interactive
782 (let ((list (read-face-and-attribute :underline))) 782 (let ((list (read-face-and-attribute :underline)))
783 (list (car list) (eq (car (cdr list)) t)))) 783 (list (car list) (eq (car (cdr list)) t))))
784 (set-face-attribute face frame :underline underline))
785
786
787(defun set-face-underline-p (face underline-p &optional frame)
788 "Specify whether face FACE is underlined.
789UNDERLINE-P nil means FACE explicitly doesn't underline.
790UNDERLINE-P non-nil means FACE explicitly does underlining.
791FRAME nil or not specified means change face on all frames.
792Use `set-face-attribute' to ``unspecify'' underlining."
793 (interactive
794 (let ((list (read-face-and-attribute :underline)))
795 (list (car list) (eq (car (cdr list)) t))))
796 (set-face-attribute face frame :underline underline-p)) 784 (set-face-attribute face frame :underline underline-p))
797 785
786(define-obsolete-function-alias 'set-face-underline
787 'set-face-underline-p "22.1")
788
798 789
799(defun set-face-inverse-video-p (face inverse-video-p &optional frame) 790(defun set-face-inverse-video-p (face inverse-video-p &optional frame)
800 "Specify whether face FACE is in inverse video. 791 "Specify whether face FACE is in inverse video.
@@ -1318,7 +1309,14 @@ If FRAME is omitted or nil, use the selected frame."
1318 (dolist (a attrs) 1309 (dolist (a attrs)
1319 (let ((attr (face-attribute f (car a) frame))) 1310 (let ((attr (face-attribute f (car a) frame)))
1320 (insert (make-string (- max-width (length (cdr a))) ?\s) 1311 (insert (make-string (- max-width (length (cdr a))) ?\s)
1321 (cdr a) ": " (format "%s" attr) "\n"))))) 1312 (cdr a) ": " (format "%s" attr))
1313 (if (and (eq (car a) :inherit)
1314 (not (eq attr 'unspecified)))
1315 ;; Make a hyperlink to the parent face.
1316 (save-excursion
1317 (re-search-backward ": \\([^:]+\\)" nil t)
1318 (help-xref-button 1 'help-face attr)))
1319 (insert "\n")))))
1322 (terpri))) 1320 (terpri)))
1323 (print-help-return-message)))) 1321 (print-help-return-message))))
1324 1322