/[emacs]/emacs/lispref/modes.texi
ViewVC logotype

Diff of /emacs/lispref/modes.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.78 by rms, Sat May 29 15:41:06 2004 UTC revision 1.79 by rms, Sun Aug 22 17:41:15 2004 UTC
# Line 188  The key sequences bound in a major mode Line 188  The key sequences bound in a major mode
188  characters are reserved for minor modes, and ordinary letters are  characters are reserved for minor modes, and ordinary letters are
189  reserved for users.  reserved for users.
190    
191  It is reasonable for a major mode to rebind a key sequence with a  A major mode can also rebind the keys @kbd{M-n}, @kbd{M-p} and
192  standard meaning, if it implements a command that does ``the same job''  @kbd{M-s}.  The bindings for @kbd{M-n} and @kbd{M-p} should normally
193  in a way that fits the major mode better.  For example, a major mode for  be some kind of ``moving forward and backward,'' but this does not
194  editing a programming language might redefine @kbd{C-M-a} to ``move to  necessarily mean cursor motion.
 the beginning of a function'' in a way that works better for that  
 language.  
195    
196  Major modes such as Dired or Rmail that do not allow self-insertion of  It is legitimate for a major mode to rebind a standard key sequence if
197  text can reasonably redefine letters and other printing characters as  it provides a command that does ``the same job'' in a way better
198  editing commands.  Dired and Rmail both do this.  suited to the text this mode is used for.  For example, a major mode
199    for editing a programming language might redefine @kbd{C-M-a} to
200    ``move to the beginning of a function'' in a way that works better for
201    that language.
202    
203    It is also legitimate for a major mode to rebind a standard key
204    sequence whose standard meaning is rarely useful in that mode.  For
205    instance, minibuffer modes rebind @kbd{M-r}, whose standard meaning is
206    rarely of any use in the minibuffer.  Major modes such as Dired or
207    Rmail that do not allow self-insertion of text can reasonably redefine
208    letters and other printing characters as special commands.
209    
210  @item  @item
211  Major modes must not define @key{RET} to do anything other than insert  Major modes must not define @key{RET} to do anything other than insert

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26