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: bug#684: 23.0.60; text-mode redefines "\es", the new search-map prefix Date: Thu, 21 Aug 2008 23:43:28 +0300 Organization: JURTA Message-ID: <87od3mt7yn.fsf@jurta.org> References: <878wuq5rgy.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219351627 27346 80.91.229.12 (21 Aug 2008 20:47:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 20:47:07 +0000 (UTC) Cc: 684@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 21 22:48:00 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 1KWH4Q-00078Y-K9 for ged-emacs-devel@m.gmane.org; Thu, 21 Aug 2008 22:47:50 +0200 Original-Received: from localhost ([127.0.0.1]:39512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWH3T-0005tr-2Z for ged-emacs-devel@m.gmane.org; Thu, 21 Aug 2008 16:46:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWH2a-0005Xp-E5 for emacs-devel@gnu.org; Thu, 21 Aug 2008 16:45:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWH2Y-0005X0-MT for emacs-devel@gnu.org; Thu, 21 Aug 2008 16:45:55 -0400 Original-Received: from [199.232.76.173] (port=46815 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWH2Y-0005Ww-Ga for emacs-devel@gnu.org; Thu, 21 Aug 2008 16:45:54 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:1926) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWH2Y-0003w9-2A for emacs-devel@gnu.org; Thu, 21 Aug 2008 16:45:54 -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 1KWH2T-000HDs-2G; Thu, 21 Aug 2008 23:45:49 +0300 In-Reply-To: <878wuq5rgy.fsf@cyd.mit.edu> (Chong Yidong's message of "Thu, 21 Aug 2008 11:15:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 3b10ce253585130f5293a5b36593fd37 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4865 [Aug 21 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:102793 Archived-At: >> > Text-Mode redefines the new search-map prefix "\es" with >> > center-line. Maybe this needs to be changed too. >> >> Instead of removing these useful commands from key bindings, >> I think we should find a good replacement. >> >> Starting from Emacs 22 we dedicated a special prefix map M-o >> just for such formatting commands. So I propose to move these >> commands to the following keys: >> >> M-o M-s center-line >> M-o M-S center-paragraph > > Isn't the M-o prefix key used for text properties? I don't think it's > such a good fit. Maybe M-g would be better. WDYT? M-g was intended for navigation commands ("goto" mnemonics), and M-o for formatting commands (see (emacs) Formatted Text). I think center-line and center-paragraph are more formatting than navigation commands. If this is ok then the following patch implements this. It binds `M-o M-s' and `M-o M-S' globally after loading text-mode.el. This is perfectly fine since these bindings have no conflicts with other modes. Index: lisp/textmodes/text-mode.el =================================================================== RCS file: /sources/emacs/emacs/lisp/textmodes/text-mode.el,v retrieving revision 1.55 diff -c -r1.55 text-mode.el *** lisp/textmodes/text-mode.el 6 May 2008 04:33:13 -0000 1.55 --- lisp/textmodes/text-mode.el 21 Aug 2008 20:43:55 -0000 *************** *** 50,62 **** (defvar text-mode-map (let ((map (make-sparse-keymap))) (define-key map "\e\t" 'ispell-complete-word) - (define-key map "\es" 'center-line) - (define-key map "\eS" 'center-paragraph) map) "Keymap for `text-mode'. Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode', inherit all the commands defined in this map.") (define-derived-mode text-mode nil "Text" "Major mode for editing text written for humans to read. --- 50,63 ---- (defvar text-mode-map (let ((map (make-sparse-keymap))) (define-key map "\e\t" 'ispell-complete-word) map) "Keymap for `text-mode'. Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode', inherit all the commands defined in this map.") + (define-key facemenu-keymap "\es" 'center-line) + (define-key facemenu-keymap "\eS" 'center-paragraph) + (define-derived-mode text-mode nil "Text" "Major mode for editing text written for humans to read. -- Juri Linkov http://www.jurta.org/emacs/