GNU bug report logs -
#15909
24.3.50; please fix `read-face-name' brain-dead PROMPT handling
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 15 Nov 2013 22:14:02 UTC
Severity: minor
Tags: fixed
Found in version 24.3.50
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 15909 <at> debbugs.gnu.org (full text, mbox):
> Please add some code similar to the following to `read-face-name',
> so it DTRT.
> (when (save-match-data (string-match ": $" prompt))
> (setq prompt (substring prompt 0 -2)))
To be clearer about that part. Below is code I use to counteract
the current `read-face-name' behavior. Incorporating a reasonable
fix into `read-face-name' would do something akin to the opposite.
(defun my-read-face-name (prompt)
"Read a face name using completion. Return its face symbol.
Accommodate vanilla Emacs PROMPT arg across Emacs versions."
(save-match-data
(when (and (> emacs-major-version 21)
(string-match "\\(:\\s *$\\|:?\\s +$\\)" prompt))
(setq prompt
(substring prompt 0
(- (length (match-string 0 prompt)))))))
(read-face-name prompt))
This bug report was last modified 8 years and 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.