diff options
| author | Juanma Barranquero | 2004-06-04 23:26:14 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2004-06-04 23:26:14 +0000 |
| commit | 8be2a2dd85a1883526924a652bde209ad3b48c8b (patch) | |
| tree | 59ea90bda17501bc66936b743240ed94c6a2e287 | |
| parent | e2cae76902373ad508c195f188d0608511eeccb7 (diff) | |
| download | emacs-8be2a2dd85a1883526924a652bde209ad3b48c8b.tar.gz emacs-8be2a2dd85a1883526924a652bde209ad3b48c8b.zip | |
(help-argument-name): Reintroduce face.
(help-default-arg-highlight): Use it, now that
`face-differs-from-default-p' can be trusted.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/help-fns.el | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c734a57948..3922ef9bf41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2004-06-05 Juanma Barranquero <lektu@terra.es> | ||
| 2 | |||
| 3 | * help-fns.el (help-argument-name): Reintroduce face. | ||
| 4 | (help-default-arg-highlight): Use it, now that | ||
| 5 | `face-differs-from-default-p' can be trusted. | ||
| 6 | |||
| 1 | 2004-06-05 Matt Hodges <matt@stchem.bham.ac.uk> (tiny change) | 7 | 2004-06-05 Matt Hodges <matt@stchem.bham.ac.uk> (tiny change) |
| 2 | 8 | ||
| 3 | * textmodes/table.el: Sentence commands added to Point Motion | 9 | * textmodes/table.el: Sentence commands added to Point Motion |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index e7e09a431bd..03ea5bef653 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -237,14 +237,19 @@ KIND should be `var' for a variable or `subr' for a subroutine." | |||
| 237 | (concat "src/" file) | 237 | (concat "src/" file) |
| 238 | file))))) | 238 | file))))) |
| 239 | 239 | ||
| 240 | ;;;###autoload | ||
| 241 | (defface help-argument-name '((((supports :slant italic)) :inherit italic)) | ||
| 242 | "Face to highlight argument names in *Help* buffers.") | ||
| 243 | |||
| 240 | (defun help-default-arg-highlight (arg) | 244 | (defun help-default-arg-highlight (arg) |
| 241 | "Default function to highlight arguments in *Help* buffers. | 245 | "Default function to highlight arguments in *Help* buffers. |
| 242 | It returns ARG in lowercase italics, if the display supports it; | 246 | It returns ARG in face `help-argument-name'; ARG is also |
| 243 | else ARG is returned in uppercase normal." | 247 | downcased if it displays differently than the default |
| 244 | (let ((attrs '(:slant italic))) | 248 | face (according to `face-differs-from-default-p')." |
| 245 | (if (display-supports-face-attributes-p attrs) | 249 | (propertize (if (face-differs-from-default-p 'help-argument-name) |
| 246 | (propertize (downcase arg) 'face attrs) | 250 | (downcase arg) |
| 247 | arg))) | 251 | arg) |
| 252 | 'face 'help-argument-name)) | ||
| 248 | 253 | ||
| 249 | (defun help-do-arg-highlight (doc args) | 254 | (defun help-do-arg-highlight (doc args) |
| 250 | (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table) | 255 | (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table) |