From: Eli Zaretskii Date: Sat, 4 Nov 2006 11:02:27 +0000 (+0000) Subject: (faces-sample-overlay, describe-face): Revert last changes. X-Git-Tag: emacs-pretest-22.0.91~356 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1b2b899883f19661b56ae01e166c05651eb0a81a;p=emacs.git (faces-sample-overlay, describe-face): Revert last changes. (faces-sample-overlay): Remove variable. (describe-face): Insert sample text in the face being described. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a026c80deb5..81b30408954 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-11-04 Yoni Rabkin Katzenell (tiny change) + + * faces.el (faces-sample-overlay, describe-face): Revert last + changes. + (faces-sample-overlay): Remove variable. + (describe-face): Insert sample text in the face being described. + 2006-11-04 Martin Rudalics * whitespace.el (whitespace-indent-regexp): Make this match any diff --git a/lisp/faces.el b/lisp/faces.el index f0f3b1a8ce0..c44bee322a2 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -32,9 +32,6 @@ ;; Warning suppression -- can't require x-win in batch: (autoload 'xw-defined-colors "x-win")) -(defvar faces-sample-overlay nil - "Overlay for showing an example of a face.") - (defvar help-xref-stack-item) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1255,16 +1252,6 @@ arg, prompt for a regular expression." (copy-face (car faces) (car faces) frame disp-frame) (setq faces (cdr faces))))))) -(defun faces-sample-overlay (face) - "Insert sample text with FACE. - -If FACE is not a face or nil, use the default face." - (let ((f (if (facep face) face 'default)) - (start (+ (point) 2))) ;; skip face and paren - (insert " (sample)") - (setq faces-sample-overlay (make-overlay start (1- (point)))) - (overlay-put faces-sample-overlay 'face f))) - (defun describe-face (face &optional frame) "Display the properties of face FACE on FRAME. @@ -1306,7 +1293,7 @@ If FRAME is omitted or nil, use the selected frame." (insert " undefined face.\n") (let ((customize-label "customize this face") file-name) - (faces-sample-overlay f) + (insert (concat " (" (propertize "sample" 'font-lock-face f) ")")) (princ (concat " (" customize-label ")\n")) (insert "Documentation: " (or (face-documentation f)