From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: standard r/o keybindings Date: Tue, 01 Feb 2011 12:55:11 -0500 Message-ID: Reply-To: sds@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296583197 4576 80.91.229.12 (1 Feb 2011 17:59:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2011 17:59:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 01 18:59:53 2011 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.69) (envelope-from ) id 1PkKUI-0001UT-9l for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 18:59:53 +0100 Original-Received: from localhost ([127.0.0.1]:32985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkKUD-0004vy-0U for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 12:57:53 -0500 Original-Received: from [140.186.70.92] (port=38018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkKRt-0003gN-5T for emacs-devel@gnu.org; Tue, 01 Feb 2011 12:55:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkKRj-0007Fq-0O for emacs-devel@gnu.org; Tue, 01 Feb 2011 12:55:20 -0500 Original-Received: from mail-qy0-f176.google.com ([209.85.216.176]:35891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkKRh-0007EA-9n; Tue, 01 Feb 2011 12:55:17 -0500 Original-Received: by qyk10 with SMTP id 10so7155384qyk.0 for ; Tue, 01 Feb 2011 09:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:user-agent :mail-copies-to:return-receipt-to:reply-to:x-attribution :x-disclaimer:date:message-id:mime-version:content-type; bh=xUV5V/kxDwM+JlpalsMCKta4xxRo3HVBSHxGZdUoELo=; b=rXppxlD8JWAD4uZ9fhfAtKfbuNycnkNmsCjRRXbxByFwBKXJ0e3I9DyUssssQYYys/ 10jEWbk/XrXcVlFSLtDkghQkOniEIER8rioa+zvzRo0xwQHixUzDdU5eR2bhav7JZ4IK QnSiTQ4z2ucEUrFul1jIlIY+gEdGvpmAkIJ8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:user-agent:mail-copies-to:return-receipt-to :reply-to:x-attribution:x-disclaimer:date:message-id:mime-version :content-type; b=n4LE51ghTyPUM+Ppy5VRnj8y2PZc6KuN3g9Kdikq/F9RWrIOW22d0V2QSJDJ019j01 De7aBC5RsB5B6/2WCk5WaGW9qU5eXs4WzpVD3bDsZ1xfG4fQpO822+BTDoID0aRo9Fdu wyU3eNyolEW5IjzOrSQ1yQFnyuFNxfgt+d6TI= Original-Received: by 10.224.3.6 with SMTP id 6mr7686104qal.397.1296582915437; Tue, 01 Feb 2011 09:55:15 -0800 (PST) Original-Received: from tbox.m2.algo (rrcs-24-103-48-205.nyc.biz.rr.com [24.103.48.205]) by mx.google.com with ESMTPS id l12sm15810646qcu.19.2011.02.01.09.55.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 09:55:13 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Mail-Copies-To: never X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.176 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:135412 Archived-At: M-x rgrep quit-window RET *.el RET emacs/lisp RET will show ~60 places were quit-window is bound to "q". Proposal: add (defvar read-only-buffer-mode-map (let ((map (make-sparse-keymap))) (define-key map "g" 'revert-buffer) (define-key map "q" 'quit-window) (define-key map "z" 'kill-this-buffer) (define-key map " " 'scroll-down) (define-key map "DEL" 'scroll-up) ....... map)) to, say, simple.el and (set-keymap-parent ... read-only-buffer-mode-map) to all the r/o mode map definitions. pro: - uniform user experience in all r/o buffers - ease of development (less code to write) contra: - some modes _might_ have to modify their own bindings (very few and they can override the standard binding anyway) note that we already have a good candidate for read-only-buffer-mode-map: view-mode-map. -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final) http://dhimmi.com http://truepeace.org http://camera.org http://iris.org.il http://jihadwatch.org http://openvotingconsortium.org XML is like violence. If it doesn't solve the problem, use more.