From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: 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__33427.5108915337$1219353100$gmane$org@jurta.org> References: <878wuq5rgy.fsf@cyd.mit.edu> Reply-To: Juri Linkov , 684@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219353041 32212 80.91.229.12 (21 Aug 2008 21:10:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 21:10:41 +0000 (UTC) Cc: 684@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 23:11:33 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KWHRG-000720-L7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 23:11:27 +0200 Original-Received: from localhost ([127.0.0.1]:37855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWHQI-0004EI-GU for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 17:10:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWHNU-00032x-QM for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 17:07:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWHNS-00031l-Od for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 17:07:32 -0400 Original-Received: from [199.232.76.173] (port=58040 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWHNS-00031f-Hk for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 17:07:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59462) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWHNS-000873-1A for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 17:07:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7LL7REZ018730; Thu, 21 Aug 2008 14:07:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7LKt3Po013629; Thu, 21 Aug 2008 13:55:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 21 Aug 2008 20:55:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 684 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 684-submit@emacsbugs.donarmstrong.com id=B684.121935155511708 (code B ref 684); Thu, 21 Aug 2008 20:55:03 +0000 Original-Received: (at 684) by emacsbugs.donarmstrong.com; 21 Aug 2008 20:45:55 +0000 Original-Received: from relay01.kiev.sovam.com (relay01.kiev.sovam.com [62.64.120.200]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7LKjpIR011702 for <684@emacsbugs.donarmstrong.com>; Thu, 21 Aug 2008 13:45:52 -0700 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: Linux 2.6 (newer, 3) Resent-Date: Thu, 21 Aug 2008 17:07:31 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19616 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/