emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/man/custom.texi [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/man/custom.texi [lexbind]
Date: Wed, 06 Oct 2004 01:43:55 -0400

Index: emacs/man/custom.texi
diff -c emacs/man/custom.texi:1.48.2.9 emacs/man/custom.texi:1.48.2.10
*** emacs/man/custom.texi:1.48.2.9      Sat Sep  4 09:26:23 2004
--- emacs/man/custom.texi       Wed Oct  6 05:21:53 2004
***************
*** 785,795 ****
  are not called at all.  The documentation of each abnormal hook variable
  explains in detail what is peculiar about it.
  
!   The recommended way to add a hook function to a hook (either normal or
! abnormal) is by calling @code{add-hook}.  You can use any valid Lisp
! function as the hook function, provided it can handle the proper number
! of arguments (zero arguments, in the case of a normal hook).  Of course,
! not every Lisp function is @emph{useful} in any particular hook.
  
    For example, here's how to set up a hook to turn on Auto Fill mode
  when entering Text mode and other modes based on Text mode:
--- 785,797 ----
  are not called at all.  The documentation of each abnormal hook variable
  explains in detail what is peculiar about it.
  
!   You can set a hook variable with @code{setq} like any other Lisp
! variable, but the recommended way to add a hook function to a hook
! (either normal or abnormal) is by calling @code{add-hook}.  You can
! specify any valid Lisp function as the hook function, provided it can
! handle the proper number of arguments (zero arguments, in the case of
! a normal hook).  Of course, not every Lisp function is @emph{useful}
! in any particular hook.
  
    For example, here's how to set up a hook to turn on Auto Fill mode
  when entering Text mode and other modes based on Text mode:
***************
*** 830,835 ****
--- 832,842 ----
  ``asking for trouble.''  However, the order is predictable: the most
  recently added hook functions are executed first.
  
+   If you play with adding various different versions of a hook
+ function by calling @code{add-hook} over and over, remember that all
+ the versions you added will remain in the hook variable together.
+ To clear them out, you can do @code{(setq @var{hook-variable} nil)}.
+ 
  @node Locals
  @subsection Local Variables
  
***************
*** 998,1005 ****
  that the file is intended as input for.  The example above is for a
  language where comment lines start with @samp{;;; } and end with
  @samp{***}; the local values for @code{comment-start} and
! @code{comment-end} customize the rest of Emacs for this unusual syntax.
! Don't use a prefix (or a suffix) if you don't need one.
  
    Two ``variable names'' have special meanings in a local variables
  list: a value for the variable @code{mode} really sets the major mode,
--- 1005,1026 ----
  that the file is intended as input for.  The example above is for a
  language where comment lines start with @samp{;;; } and end with
  @samp{***}; the local values for @code{comment-start} and
! @code{comment-end} customize the rest of Emacs for this unusual
! syntax.  Don't use a prefix (or a suffix) if you don't need one.
! 
!   If you write a multi-line string value, you should put the prefix
! and suffix on each line, even lines that start or end within the
! string.  They will be stripped off for processing the list.  If you
! want to split a long string across multiple lines of the file, you can
! use backslash-newline, which is ignored in Lisp string constants.
! Here's an example of doing this:
! 
! @example
! # Local Variables:
! # compile-command: "cc foo.c -Dfoo=bar -Dhack=whatever \
! #   -Dmumble=blaah"
! # End:
! @end example
  
    Two ``variable names'' have special meanings in a local variables
  list: a value for the variable @code{mode} really sets the major mode,
***************
*** 1635,1649 ****
  Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}.
  
  Since this puts a address@hidden character in the @file{.emacs},
! you should specify for that file a coding system that supports
! that character.  @xref{Init Syntax}.
! 
! @strong{Warning:} if you change the keyboard encoding, such that the code that
! @kbd{C-q} inserts becomes different, you'll need to edit the
! Lisp expression accordingly.
  
! @strong{Warning:} @kbd{C-q} will insert the wrong code if you visit
! the file @file{.emacs} in a unibyte buffer, so don't do that.
  
  @node Mouse Buttons
  @subsection Rebinding Mouse Buttons
--- 1656,1669 ----
  Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}.
  
  Since this puts a address@hidden character in the @file{.emacs},
! you should specify a coding system for that file that supports the
! character in question.  @xref{Init Syntax}.
  
! @strong{Warning:} if you change the keyboard encoding, or change
! between multibyte and unibyte mode, or anything that would alter which
! code @kbd{C-q} would insert for that character, you'll need to edit
! the Lisp expression accordingly, to use the character code generated
! by @kbd{C-q} in the new mode.
  
  @node Mouse Buttons
  @subsection Rebinding Mouse Buttons




reply via email to

[Prev in Thread] Current Thread [Next in Thread]