From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Yanking isearch to highlight-regexp Date: Sun, 29 Jun 2008 23:55:55 +0300 Organization: JURTA Message-ID: <87wsk89byj.fsf@jurta.org> References: <4853F884.7000609@gmail.com> <7dbe73ed0806141442h342f8ff0u83863f3980a7e229@mail.gmail.com> <48545D78.8080103@gmail.com> <4854E536.8040407@gmail.com> <87k5gql900.fsf@jurta.org> <878wwp1an8.fsf@jurta.org> <871w2gi58m.fsf@jurta.org> <87d4m0c9md.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214774502 9427 80.91.229.12 (29 Jun 2008 21:21:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2008 21:21:42 +0000 (UTC) Cc: David Koppelman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 29 23:22:27 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KD4Lp-00028J-4q for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 23:22:25 +0200 Original-Received: from localhost ([127.0.0.1]:60657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD4Ky-0004bM-Ud for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 17:21:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KD4KX-000495-Hb for emacs-devel@gnu.org; Sun, 29 Jun 2008 17:21:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KD4KX-00048f-3B for emacs-devel@gnu.org; Sun, 29 Jun 2008 17:21:05 -0400 Original-Received: from [199.232.76.173] (port=41429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD4KW-00048W-N7 for emacs-devel@gnu.org; Sun, 29 Jun 2008 17:21:04 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:3786) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KD4KW-0003NP-GP for emacs-devel@gnu.org; Sun, 29 Jun 2008 17:21:04 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KD4KT-0008TS-Uf; Mon, 30 Jun 2008 00:21:02 +0300 In-Reply-To: (Stefan Monnier's message of "Sun, 29 Jun 2008 16:05:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 63e2ad49ecdb9688bd8f281dc7b291dd X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4110 [June 26 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100170 Archived-At: >> 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.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 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/