From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: David Koppelman <koppel@ece.lsu.edu>, emacs-devel@gnu.org
Subject: Re: Yanking isearch to highlight-regexp
Date: Sun, 29 Jun 2008 23:55:55 +0300 [thread overview]
Message-ID: <87wsk89byj.fsf@jurta.org> (raw)
In-Reply-To: <jwvprq0atz3.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 29 Jun 2008 16:05:59 -0400")
>> However, I think it is inconvenient when face names are mixed with other
>> input in the default history list `minibuffer-history'. We could create
>> a new history list `face-name-history' specially for face names entered
>> in the face-reading commands.
>
> That sounds cleaner, indeed.
The following patch creates a new variable `face-name-history' and
adds it to face-reading commands (most important is `read-face-name'
that is used by many other commands).
Index: lisp/faces.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/faces.el,v
retrieving revision 1.416
diff -c -r1.416 faces.el
*** lisp/faces.el 28 Jun 2008 15:53:07 -0000 1.416
--- lisp/faces.el 29 Jun 2008 20:55:34 -0000
***************
*** 31,36 ****
--- 31,42 ----
(declare-function xw-defined-colors "term/x-win" (&optional frame))
(defvar help-xref-stack-item)
+
+ (defvar face-name-history nil
+ "History list for some commands that read face names.
+ Maximum length of the history list is determined by the value
+ of `history-length', which see.")
+
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Font selection.
***************
*** 123,129 ****
variants of FACE from X resources. (X resources recognized are found
in the global variable `face-x-resources'.) If FACE is already known
as a face, leave it unmodified. Value is FACE."
! (interactive "SMake face: ")
(unless (facep face)
;; Make frame-local faces (this also makes the global one).
(dolist (frame (frame-list))
--- 129,136 ----
variants of FACE from X resources. (X resources recognized are found
in the global variable `face-x-resources'.) If FACE is already known
as a face, leave it unmodified. Value is FACE."
! (interactive (list (read-from-minibuffer
! "Make face: " nil nil t 'face-name-history)))
(unless (facep face)
;; Make frame-local faces (this also makes the global one).
(dolist (frame (frame-list))
***************
*** 140,146 ****
(defun make-empty-face (face)
"Define a new, empty face with name FACE.
If the face already exists, it is left unmodified. Value is FACE."
! (interactive "SMake empty face: ")
(make-face face 'no-init-from-resources))
--- 147,154 ----
(defun make-empty-face (face)
"Define a new, empty face with name FACE.
If the face already exists, it is left unmodified. Value is FACE."
! (interactive (list (read-from-minibuffer
! "Make empty face: " nil nil t 'face-name-history)))
(make-face face 'no-init-from-resources))
***************
*** 940,946 ****
string-describing-default))
(format "%s: " prompt))
(completion-table-in-turn nonaliasfaces aliasfaces)
! nil t nil nil
(if faces (mapconcat 'symbol-name faces ","))))
;; Canonicalize the output.
(output
--- 948,954 ----
string-describing-default))
(format "%s: " prompt))
(completion-table-in-turn nonaliasfaces aliasfaces)
! nil t nil 'face-name-history
(if faces (mapconcat 'symbol-name faces ","))))
;; Canonicalize the output.
(output
***************
*** 1227,1233 ****
this regular expression. When called interactively with a prefix
arg, prompt for a regular expression."
(interactive (list (and current-prefix-arg
! (read-string "List faces matching regexp: "))))
(let ((all-faces (zerop (length regexp)))
(frame (selected-frame))
(max-length 0)
--- 1235,1241 ----
this regular expression. When called interactively with a prefix
arg, prompt for a regular expression."
(interactive (list (and current-prefix-arg
! (read-regexp "List faces matching regexp"))))
(let ((all-faces (zerop (length regexp)))
(frame (selected-frame))
(max-length 0)
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2008-06-29 20:55 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 16:57 Yanking isearch to highlight-regexp Lennart Borgman (gmail)
2008-06-14 21:42 ` Mathias Dahl
2008-06-14 21:50 ` Stefan Monnier
2008-06-14 21:54 ` Mathias Dahl
2008-06-15 0:32 ` Juri Linkov
2008-06-15 0:08 ` Lennart Borgman (gmail)
2008-06-15 0:33 ` Juri Linkov
2008-06-15 1:48 ` Stefan Monnier
2008-06-15 9:47 ` Lennart Borgman (gmail)
2008-06-15 20:48 ` Juri Linkov
2008-06-15 21:10 ` Lennart Borgman (gmail)
2008-06-15 22:54 ` Juri Linkov
2008-06-15 23:09 ` Lennart Borgman (gmail)
2008-06-16 9:34 ` Juri Linkov
2008-06-16 11:13 ` Lennart Borgman
2008-06-16 21:48 ` Juri Linkov
2008-06-16 18:50 ` David Koppelman
2008-06-16 19:08 ` Lennart Borgman (gmail)
2008-06-16 21:50 ` Juri Linkov
2008-06-17 18:50 ` David Koppelman
2008-06-24 23:09 ` Juri Linkov
2008-06-25 1:43 ` Stefan Monnier
2008-06-25 20:32 ` Juri Linkov
2008-06-25 22:16 ` Miles Bader
2008-06-25 22:22 ` Lennart Borgman (gmail)
2008-06-25 22:58 ` Miles Bader
2008-06-27 23:15 ` Global keymaps [was: Yanking isearch to highlight-regexp] Juri Linkov
2008-06-27 23:20 ` Lennart Borgman (gmail)
2008-06-27 23:32 ` Juri Linkov
2008-06-28 0:28 ` Global keymaps Miles Bader
2008-06-28 1:25 ` Stefan Monnier
2008-06-28 19:45 ` Juri Linkov
2008-06-28 22:51 ` Stefan Monnier
2008-06-29 16:17 ` Juri Linkov
2008-06-29 18:03 ` Stefan Monnier
2008-06-29 19:28 ` Juri Linkov
2008-06-29 20:03 ` Stefan Monnier
2008-06-29 20:52 ` Juri Linkov
2008-06-29 21:24 ` Lennart Borgman (gmail)
2008-06-30 1:00 ` Stefan Monnier
2008-06-28 22:02 ` Yanking isearch to highlight-regexp Juri Linkov
2008-06-28 22:23 ` Stefan Monnier
2008-06-29 16:19 ` Juri Linkov
2008-06-29 18:07 ` Stefan Monnier
2008-06-29 19:29 ` Juri Linkov
2008-06-29 20:05 ` Stefan Monnier
2008-06-29 20:55 ` Juri Linkov [this message]
2008-06-30 1:01 ` Stefan Monnier
2008-06-30 19:59 ` Juri Linkov
2008-07-01 21:34 ` Grep key bindings (was: Yanking isearch to highlight-regexp) Juri Linkov
2008-07-01 21:44 ` Grep key bindings Miles Bader
2008-07-01 21:54 ` Juri Linkov
2008-07-01 22:11 ` Miles Bader
2008-07-02 22:42 ` Juri Linkov
2008-07-03 6:53 ` joakim
2008-07-03 7:07 ` Miles Bader
2008-07-03 13:18 ` Ted Zlatanov
2008-07-03 22:06 ` Stefan Monnier
2008-07-03 14:50 ` Dan Nicolaescu
2008-07-03 15:37 ` Phil Jackson
2008-07-03 16:59 ` Drew Adams
2008-07-04 10:46 ` Eli Zaretskii
2008-07-04 10:59 ` Miles Bader
2008-07-30 17:49 ` Yanking isearch to highlight-regexp Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wsk89byj.fsf@jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
--cc=koppel@ece.lsu.edu \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.