From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: Re: keymap display inconsistency in help Date: 01 May 2002 13:27:01 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: <200204261709.g3QH9xL04077@steve.ims.uni-stuttgart.de> <200204290506.g3T566o06170@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1020252614 7718 127.0.0.1 (1 May 2002 11:30:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 1 May 2002 11:30:14 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 172sJJ-00020N-00 for ; Wed, 01 May 2002 13:30:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172sJC-000603-00; Wed, 01 May 2002 07:30:06 -0400 Original-Received: from steve.ims.uni-stuttgart.de ([141.58.127.232]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172sGF-0005py-00 for ; Wed, 01 May 2002 07:27:03 -0400 Original-Received: (from steve@localhost) by steve.ims.uni-stuttgart.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id g41BR1m01063; Wed, 1 May 2002 13:27:01 +0200 X-Authentication-Warning: steve.ims.uni-stuttgart.de: steve set sender to steve@ims.uni-stuttgart.de using -f Original-To: bug-gnu-emacs@gnu.org In-Reply-To: Original-Lines: 55 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1079 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1079 --=-=-= Kevin Rodgers writes: > rms@gnu.org (Richard Stallman) writes: [I had written:] > > If a major mode keymap is defined using (make-keymap), then in both > > the mode description and the function description of the mode the key > > bindings are displayed in ASCII order; but if the keymap is defined > > using (make-sparse-keymap), then the key bindings are displayed in > > reverse ASCII order. > > > > Would you please send precise test cases? > > You say "are displayed", but that is not clear: > > displayed by what? With precise test cases, > > I would know the answer. Whoops, my report was sent by mistake (I composed it offline and pressed C-c C-c thinking that would send it to my Gnus queue for later editing, but I didn't realize that M-x report-emacs-bug doesn't interact with Gnus by default. I assume it went into my sendmail queue and was sent without my knowledge the next time I logged on.) In fact I prepared a test case, which I append below. > I think this is the same complaint discussed in the second part of > this article: > > From: kevinr@ihs.com (Kevin Rodgers) > Subject: Re: C-x r refers to both rectangle and register... > Date: Thu, 07 Mar 2002 17:03:32 -0700 > Message-ID: <3C87FFD4.97202D56@ihs.com> > References: > Newsgroups: gnu.emacs.bug Hm, there you wrote: > > I do C-x C-h and things are out of order, no matter what my LC_* env > > variables are, > [...] > Because ctl-x-4-prefix is a sparse keymap, ordered from newest to oldest > bindings. I assume by "newest to oldest" you mean the same thing Stefan Monnier wrote in the current thread: > With a sparse keymap the order is determined by the order in which > the bindings were added to the table. But this is not the behavior I observed, as the appended test case demonstrates -- that is, unless the bindings are added to the table in reverse ASCII order, and not in the order they are defined in by the mode-map defvar. BTW, this also happens in Emacs 20.7. --Steve Berman --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=testcase Content-Description: test case for key bindings display Too see an example, start Emacs with -q --no-site-file and eval the following four expressions: (defun srb-test1-mode () "Major mode to test display of key bindings. \\{srb-test1-mode-map}" (use-local-map srb-test1-mode-map)) (defvar srb-test1-mode-map (let ((map (make-keymap))) (define-key map "a" 'srb-test-1) (define-key map "B" 'srb-test-2) (define-key map "C" 'srb-test-3) (define-key map "d" 'srb-test-4) map)) (defun srb-test2-mode () "Major mode to test display of key bindings. \\{srb-test2-mode-map}" (use-local-map srb-test2-mode-map)) (defvar srb-test2-mode-map (let ((map (make-sparse-keymap))) (define-key map "a" 'srb-test-1) (define-key map "B" 'srb-test-2) (define-key map "C" 'srb-test-3) (define-key map "d" 'srb-test-4) map)) Typing `M-h f srb-test1-mode' brings up this *Help* buffer: ___________________________________________________________ srb-test1-mode is a Lisp function. (srb-test-mode) Major mode to test display of key bindings. key binding --- ------- B srb-test-2 C srb-test-3 a srb-test-1 d srb-test-4 ___________________________________________________________ Typing `M-h f srb-test2-mode' brings up this *Help* buffer: ___________________________________________________________ srb-test2-mode is an interactive Lisp function. (srb-test-mode) Major mode to test display of key bindings. key binding --- ------- d srb-test-4 a srb-test-1 C srb-test-3 B srb-test-2 ___________________________________________________________ --=-=-=--