unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch to fix error in Emacs-Lisp Reference Manual
@ 2005-01-12 19:14 Francis Litterio
  2005-01-13  8:08 ` Thien-Thi Nguyen
  2005-01-13 20:29 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Francis Litterio @ 2005-01-12 19:14 UTC (permalink / raw)


The "Active Keymaps" node in the Emacs-Lisp Reference Manual (in file
keymaps.texi) contradicts itself regarding the semantics of variable
overriding-local-map.  The below patch fixes this contradiction.
--
Francis Litterio
franl <at> world . std . com


--- keymaps.texi	10 Aug 2004 11:40:14 -0400	1.53
+++ keymaps.texi	12 Jan 2005 14:14:34 -0500	
@@ -566,7 +566,7 @@
 supply a binding for the key, Emacs searches the local map; if that too
 has no binding, Emacs then searches the global map.  However, if
 @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
-first, before the global map.
+first, before the minor mode maps.
 
 @cindex major mode keymap
   Since every buffer that uses the same major mode normally uses the

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-12 19:14 Patch to fix error in Emacs-Lisp Reference Manual Francis Litterio
@ 2005-01-13  8:08 ` Thien-Thi Nguyen
  2005-01-13 15:01   ` Luc Teirlinck
  2005-01-13 20:29 ` Richard Stallman
  1 sibling, 1 reply; 7+ messages in thread
From: Thien-Thi Nguyen @ 2005-01-13  8:08 UTC (permalink / raw)
  Cc: emacs-devel

   From: Francis Litterio <franl@world.std.com>
   Date: Wed, 12 Jan 2005 14:14:56 -0500

   The "Active Keymaps" node in the Emacs-Lisp Reference Manual (in file
   keymaps.texi) contradicts itself regarding the semantics of variable
   overriding-local-map.  The below patch fixes this contradiction.

thanks, installed.

please in the future include a ChangeLog entry, e.g.:

2005-01-13  Francis Litterio  <franl@world.std.com>  (tiny change)

	* keymaps.texi (Active Keymaps):
	Fix overriding-local-map description.

that will make things go smoother, especially for maintainers who might
not fully understand the changes in the patch.  the precise date is not
as important as the other info; it will get adjusted at commit-time.

thi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-13  8:08 ` Thien-Thi Nguyen
@ 2005-01-13 15:01   ` Luc Teirlinck
  2005-01-13 15:38     ` Francis Litterio
  0 siblings, 1 reply; 7+ messages in thread
From: Luc Teirlinck @ 2005-01-13 15:01 UTC (permalink / raw)
  Cc: franl, emacs-devel

 Francis Litterio wrote:

   --- keymaps.texi	10 Aug 2004 11:40:14 -0400	1.53
   +++ keymaps.texi	12 Jan 2005 14:14:34 -0500	
   @@ -566,7 +566,7 @@
    supply a binding for the key, Emacs searches the local map; if that too
    has no binding, Emacs then searches the global map.  However, if
    @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
   -first, before the global map.
   +first, before the minor mode maps.

and Thien-Thi Nguyen wrote:

   thanks, installed.

Sorry, for not noticing this thread before.  This change is wrong.  A
little bit earlier in `(elisp)Active Keymaps' we see:

   The variable `overriding-local-map', if non-`nil', specifies
   another local keymap that overrides the buffer's local map and all
   the minor mode keymaps.

and a little bit later:

 -- Variable: overriding-local-map
     If non-`nil', this variable holds a keymap to use instead of the
     buffer's local keymap, text property or overlay keymaps, and
     instead of all the minor mode keymaps.  This keymap, if any,
     overrides all other maps that would have been active, except for
     the current global map.


In other words, `overriding-local-map' _overrides_ the minor mode
keymaps and the local map.  If it is non-nil, it is called before the
_global_ map, and _not_ before the minor mode maps, which are not
called at all.

The easiest fix would be to just revert the change.  Alternatively,
one could clarify the sentence, as in the patch below, even though it
gets rather repetitive, because exactly the same thing is already
pointed out a little bit earlier and a little bit later.

===File ~/keymaps.texi-diff=================================
*** keymaps.texi	13 Jan 2005 07:53:17 -0600	1.54
--- keymaps.texi	13 Jan 2005 08:33:29 -0600	
***************
*** 566,572 ****
  supply a binding for the key, Emacs searches the local map; if that too
  has no binding, Emacs then searches the global map.  However, if
  @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
! first, before the minor mode maps.
  
  @cindex major mode keymap
    Since every buffer that uses the same major mode normally uses the
--- 566,573 ----
  supply a binding for the key, Emacs searches the local map; if that too
  has no binding, Emacs then searches the global map.  However, if
  @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
! first, before the before the global map and ignores the minor mode
! maps and the local map.
  
  @cindex major mode keymap
    Since every buffer that uses the same major mode normally uses the
============================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-13 15:01   ` Luc Teirlinck
@ 2005-01-13 15:38     ` Francis Litterio
  2005-01-13 16:06       ` Luc Teirlinck
  2005-01-15  0:12       ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Francis Litterio @ 2005-01-13 15:38 UTC (permalink / raw)


Luc Teirlinck wrote:

> In other words, `overriding-local-map' _overrides_ the minor mode
> keymaps and the local map.  If it is non-nil, it is called before the
> _global_ map, and _not_ before the minor mode maps, which are not
> called at all.

Yes.  Sorry.  That was my mistake.

> *** keymaps.texi	13 Jan 2005 07:53:17 -0600	1.54
> --- keymaps.texi	13 Jan 2005 08:33:29 -0600	
> ***************
> *** 566,572 ****
>   supply a binding for the key, Emacs searches the local map; if that too
>   has no binding, Emacs then searches the global map.  However, if
>   @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
> ! first, before the minor mode maps.
>   
>   @cindex major mode keymap
>     Since every buffer that uses the same major mode normally uses the
> --- 566,573 ----
>   supply a binding for the key, Emacs searches the local map; if that too
>   has no binding, Emacs then searches the global map.  However, if
>   @code{overriding-local-map} is non-@code{nil}, Emacs searches that map
> ! first, before the before the global map and ignores the minor mode
> ! maps and the local map.
>   
>   @cindex major mode keymap
>     Since every buffer that uses the same major mode normally uses the

Does a non-nil overriding-local-map also override text property and
overlay keymaps?
--
Francis Litterio
franl <at> world . std . com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-13 15:38     ` Francis Litterio
@ 2005-01-13 16:06       ` Luc Teirlinck
  2005-01-15  0:12       ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Luc Teirlinck @ 2005-01-13 16:06 UTC (permalink / raw)
  Cc: emacs-devel

Francis Litterio wrote:

   Does a non-nil overriding-local-map also override text property and
   overlay keymaps?

Yes, but those details are pointed out in the definition of
`overriding-local-map'.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-12 19:14 Patch to fix error in Emacs-Lisp Reference Manual Francis Litterio
  2005-01-13  8:08 ` Thien-Thi Nguyen
@ 2005-01-13 20:29 ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2005-01-13 20:29 UTC (permalink / raw)
  Cc: emacs-devel

    The "Active Keymaps" node in the Emacs-Lisp Reference Manual (in file
    keymaps.texi) contradicts itself regarding the semantics of variable
    overriding-local-map.

A contradiction involves two statements that conflict.  I presume your
diff identifies one of the two statements.  Where is the other?

The statement you showed is correct--it fits what the code does.  The
changed version doesn't fit the code.

I will rewrite that node to try to make it clearer.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Patch to fix error in Emacs-Lisp Reference Manual
  2005-01-13 15:38     ` Francis Litterio
  2005-01-13 16:06       ` Luc Teirlinck
@ 2005-01-15  0:12       ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2005-01-15  0:12 UTC (permalink / raw)
  Cc: emacs-devel

I installed changes yesterday to clarify all these issues
in the manual.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-01-15  0:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-12 19:14 Patch to fix error in Emacs-Lisp Reference Manual Francis Litterio
2005-01-13  8:08 ` Thien-Thi Nguyen
2005-01-13 15:01   ` Luc Teirlinck
2005-01-13 15:38     ` Francis Litterio
2005-01-13 16:06       ` Luc Teirlinck
2005-01-15  0:12       ` Richard Stallman
2005-01-13 20:29 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).