aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJoakim Verona2012-02-10 08:29:52 +0100
committerJoakim Verona2012-02-10 08:29:52 +0100
commitdb2e8ff4fd52d6a06cef414787fd031cc26d43fa (patch)
treec0e6fe54a70be21c9efa1f34040ce08499754e74 /doc
parent8c5c7f5afa968d06efb6788cf680d5463c389d85 (diff)
parent667ced3a2d224b0f2ab3f2da26468791252c234a (diff)
downloademacs-db2e8ff4fd52d6a06cef414787fd031cc26d43fa.tar.gz
emacs-db2e8ff4fd52d6a06cef414787fd031cc26d43fa.zip
upstream
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/files.texi21
-rw-r--r--doc/lispref/ChangeLog29
-rw-r--r--doc/lispref/control.texi19
-rw-r--r--doc/lispref/customize.texi108
-rw-r--r--doc/lispref/display.texi60
-rw-r--r--doc/lispref/keymaps.texi39
-rw-r--r--doc/lispref/modes.texi43
-rw-r--r--doc/lispref/variables.texi11
9 files changed, 220 insertions, 114 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index ab4161c75b8..a5a54dad049 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12012-02-07 Glenn Morris <rgm@gnu.org>
2
3 * files.texi (File Conveniences): Mention ImageMagick images.
4
12012-02-05 Glenn Morris <rgm@gnu.org> 52012-02-05 Glenn Morris <rgm@gnu.org>
2 6
3 * trouble.texi (Checklist): Mention debug-on-event. 7 * trouble.texi (Checklist): Mention debug-on-event.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index b2eb68d2812..b34b96126ad 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1915,15 +1915,18 @@ point. Partial Completion mode offers other features extending
1915mode allows you to toggle between displaying the file as an image in 1915mode allows you to toggle between displaying the file as an image in
1916the Emacs buffer, and displaying its underlying text representation, 1916the Emacs buffer, and displaying its underlying text representation,
1917using the command @kbd{C-c C-c} (@code{image-toggle-display}). This 1917using the command @kbd{C-c C-c} (@code{image-toggle-display}). This
1918works only when Emacs can display the specific image type. If the 1918works only when Emacs can display the specific image type@footnote{If
1919displayed image is wider or taller than the frame, the usual point 1919your Emacs was compiled with ImageMagick support, then after using
1920motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different parts 1920@code{imagemagick-register-types}, you can view in Image mode any
1921of the image to be displayed. If the image can be animated, then 1921image type that ImageMagick supports; @pxref{ImageMagick Images,,,
1922the command @kbd{RET} (@code{image-toggle-animation}), will start (or 1922elisp, The Emacs Lisp Reference Manual}}. If the displayed image is wider
1923stop) animating it. Animation plays once, unless the option 1923or taller than the frame, the usual point motion keys (@kbd{C-f},
1924@code{image-animate-loop} is non-@code{nil}. Currently, Emacs only 1924@kbd{C-p}, and so forth) cause different parts of the image to be
1925supports animated GIF files (@pxref{Animated Images,,, elisp, The Emacs 1925displayed. If the image can be animated, then the command @kbd{RET}
1926Lisp Reference Manual}). 1926(@code{image-toggle-animation}), will start (or stop) animating it.
1927Animation plays once, unless the option @code{image-animate-loop} is
1928non-@code{nil}. Currently, Emacs only supports animated GIF files
1929(@pxref{Animated Images,,, elisp, The Emacs Lisp Reference Manual}).
1927 1930
1928@findex thumbs-mode 1931@findex thumbs-mode
1929@findex mode, thumbs 1932@findex mode, thumbs
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index bd7b27bbe60..a172f82d2e5 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,9 +1,38 @@
12012-02-07 Glenn Morris <rgm@gnu.org>
2
3 * modes.texi (Defining Minor Modes):
4 Expand on args of defined minor modes.
5
62012-02-07 Chong Yidong <cyd@gnu.org>
7
8 * variables.texi (Creating Buffer-Local): Minor clarification
9 to buffer-local-variables doc (Bug#10715).
10
112012-02-07 Glenn Morris <rgm@gnu.org>
12
13 * display.texi (ImageMagick Images): General update.
14 Move most details of imagemagick-render-type to the variable's doc.
15
162012-02-06 Glenn Morris <rgm@gnu.org>
17
18 * keymaps.texi (Tool Bar): Mention separators.
19 (Inheritance and Keymaps):
20 Mention make-composed-keymap and multiple inheritance.
21
22 * modes.texi (Running Hooks): Mention run-hook-wrapped.
23
24 * control.texi (Handling Errors):
25 Mention condition-case-no-debug and with-demoted-errors.
26
12012-02-05 Chong Yidong <cyd@gnu.org> 272012-02-05 Chong Yidong <cyd@gnu.org>
2 28
3 * customize.texi (Common Keywords): Minor clarifications. 29 * customize.texi (Common Keywords): Minor clarifications.
4 Document custom-unlispify-remove-prefixes. 30 Document custom-unlispify-remove-prefixes.
5 (Variable Definitions): Backquotes in defcustom seem to work fine 31 (Variable Definitions): Backquotes in defcustom seem to work fine
6 now. Various other copyedits. 32 now. Various other copyedits.
33 (Simple Types): Copyedits. Document color selector.
34 (Composite Types): Copyedits.
35 (Splicing into Lists): Clarifications.
7 36
8 * eval.texi (Backquote): Move from macros.texi. 37 * eval.texi (Backquote): Move from macros.texi.
9 38
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 0511f21007d..3673f753a0a 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -891,9 +891,8 @@ establishing an error handler, with the special form
891 891
892@noindent 892@noindent
893This deletes the file named @var{filename}, catching any error and 893This deletes the file named @var{filename}, catching any error and
894returning @code{nil} if an error occurs@footnote{ 894returning @code{nil} if an error occurs. (You can use the macro
895Actually, you should use @code{ignore-errors} in such a simple case; 895@code{ignore-errors} for a simple case like this; see below.)
896see below.}.
897 896
898 The @code{condition-case} construct is often used to trap errors that 897 The @code{condition-case} construct is often used to trap errors that
899are predictable, such as failure to open a file in a call to 898are predictable, such as failure to open a file in a call to
@@ -949,6 +948,13 @@ The effect of @code{debug} here is only to prevent
949given error will invoke the debugger only if @code{debug-on-error} and 948given error will invoke the debugger only if @code{debug-on-error} and
950the other usual filtering mechanisms say it should. @xref{Error Debugging}. 949the other usual filtering mechanisms say it should. @xref{Error Debugging}.
951 950
951@defmac condition-case-no-debug var protected-form handlers@dots{}
952The macro @code{condition-case-no-debug} provides another way to
953handle debugging of such forms. It behaves exactly like
954@code{condition-case}, unless the variable @code{debug-on-error} is
955non-@code{nil}, in which case it does not handle any errors at all.
956@end defmac
957
952 Once Emacs decides that a certain handler handles the error, it 958 Once Emacs decides that a certain handler handles the error, it
953returns control to that handler. To do so, Emacs unbinds all variable 959returns control to that handler. To do so, Emacs unbinds all variable
954bindings made by binding constructs that are being exited, and 960bindings made by binding constructs that are being exited, and
@@ -1122,6 +1128,13 @@ Here's the example at the beginning of this subsection rewritten using
1122@end smallexample 1128@end smallexample
1123@end defmac 1129@end defmac
1124 1130
1131@defmac with-demoted-errors body@dots{}
1132This macro is like a milder version of @code{ignore-errors}. Rather
1133than suppressing errors altogether, it converts them into messages.
1134Use this form around code that is not expected to signal errors,
1135but should be robust if one does occur. Note that this macro
1136uses @code{condition-case-no-debug} rather than @code{condition-case}.
1137@end defmac
1125 1138
1126@node Error Symbols 1139@node Error Symbols
1127@subsubsection Error Symbols and Condition Names 1140@subsubsection Error Symbols and Condition Names
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index b8c30fff8ae..4c3adee0db5 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -519,30 +519,28 @@ Introduction, widget, The Emacs Widget Library}, for details.
519@node Simple Types 519@node Simple Types
520@subsection Simple Types 520@subsection Simple Types
521 521
522 This section describes all the simple customization types. 522 This section describes all the simple customization types. For
523several of these customization types, the customization widget
524provides inline completion with @kbd{C-M-i} or @kbd{M-@key{TAB}}.
523 525
524@table @code 526@table @code
525@item sexp 527@item sexp
526The value may be any Lisp object that can be printed and read back. You 528The value may be any Lisp object that can be printed and read back.
527can use @code{sexp} as a fall-back for any option, if you don't want to 529You can use @code{sexp} as a fall-back for any option, if you don't
528take the time to work out a more specific type to use. 530want to take the time to work out a more specific type to use.
529 531
530@item integer 532@item integer
531The value must be an integer, and is represented textually 533The value must be an integer.
532in the customization buffer.
533 534
534@item number 535@item number
535The value must be a number (floating point or integer), and is 536The value must be a number (floating point or integer).
536represented textually in the customization buffer.
537 537
538@item float 538@item float
539The value must be a floating point number, and is represented 539The value must be a floating point number.
540textually in the customization buffer.
541 540
542@item string 541@item string
543The value must be a string, and the customization buffer shows just the 542The value must be a string. The customization buffer shows the string
544contents, with no delimiting @samp{"} characters and no quoting with 543without delimiting @samp{"} characters or @samp{\} quotes.
545@samp{\}.
546 544
547@item regexp 545@item regexp
548Like @code{string} except that the string must be a valid regular 546Like @code{string} except that the string must be a valid regular
@@ -554,39 +552,35 @@ integer, but this type shows the value by inserting the character in the
554buffer, rather than by showing the number. 552buffer, rather than by showing the number.
555 553
556@item file 554@item file
557The value must be a file name, and you can do completion with 555The value must be a file name. The widget provides completion.
558@kbd{M-@key{TAB}}.
559 556
560@item (file :must-match t) 557@item (file :must-match t)
561The value must be a file name for an existing file, and you can do 558The value must be a file name for an existing file. The widget
562completion with @kbd{M-@key{TAB}}. 559provides completion.
563 560
564@item directory 561@item directory
565The value must be a directory name, and you can do completion with 562The value must be a directory name. The widget provides completion.
566@kbd{M-@key{TAB}}.
567 563
568@item hook 564@item hook
569The value must be a list of functions (or a single function, but that is 565The value must be a list of functions. This customization type is
570obsolete usage). This customization type is used for hook variables. 566used for hook variables. You can use the @code{:options} keyword in a
571You can use the @code{:options} keyword in a hook variable's 567hook variable's @code{defcustom} to specify a list of functions
572@code{defcustom} to specify a list of functions recommended for use in 568recommended for use in the hook; @xref{Variable Definitions}.
573the hook; see @ref{Variable Definitions}.
574 569
575@item symbol 570@item symbol
576The value must be a symbol. It appears in the customization buffer as 571The value must be a symbol. It appears in the customization buffer as
577the name of the symbol. 572the symbol name. The widget provides completion.
578 573
579@item function 574@item function
580The value must be either a lambda expression or a function name. When 575The value must be either a lambda expression or a function name. The
581it is a function name, you can do completion with @kbd{M-@key{TAB}}. 576widget provides completion for function names.
582 577
583@item variable 578@item variable
584The value must be a variable name, and you can do completion with 579The value must be a variable name. The widget provides completion.
585@kbd{M-@key{TAB}}.
586 580
587@item face 581@item face
588The value must be a symbol which is a face name, and you can do 582The value must be a symbol which is a face name. The widget provides
589completion with @kbd{M-@key{TAB}}. 583completion.
590 584
591@item boolean 585@item boolean
592The value is boolean---either @code{nil} or @code{t}. Note that by 586The value is boolean---either @code{nil} or @code{t}. Note that by
@@ -600,8 +594,10 @@ The value must be a coding-system name, and you can do completion with
600@kbd{M-@key{TAB}}. 594@kbd{M-@key{TAB}}.
601 595
602@item color 596@item color
603The value must be a valid color name, and you can do completion with 597The value must be a valid color name. The widget provides completion
604@kbd{M-@key{TAB}}. A sample is provided. 598for color names, as well as a sample and a button for selecting a
599color name from a list of color names shown in a @samp{*Colors*}
600buffer.
605@end table 601@end table
606 602
607@node Composite Types 603@node Composite Types
@@ -635,9 +631,8 @@ its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string
635symbol)} is a customization type which matches values such as 631symbol)} is a customization type which matches values such as
636@code{("foo" . foo)}. 632@code{("foo" . foo)}.
637 633
638In the customization buffer, the @sc{car} and the @sc{cdr} are 634In the customization buffer, the @sc{car} and @sc{cdr} are displayed
639displayed and edited separately, each according to the type 635and edited separately, each according to their specified type.
640that you specify for it.
641 636
642@item (list @var{element-types}@dots{}) 637@item (list @var{element-types}@dots{})
643The value must be a list with exactly as many elements as the 638The value must be a list with exactly as many elements as the
@@ -680,7 +675,7 @@ specified by the @code{:options} keyword argument.
680 675
681The argument to the @code{:options} keywords should be a list of 676The argument to the @code{:options} keywords should be a list of
682specifications for reasonable keys in the alist. Ordinarily, they are 677specifications for reasonable keys in the alist. Ordinarily, they are
683simply atoms, which stand for themselves as. For example: 678simply atoms, which stand for themselves. For example:
684 679
685@smallexample 680@smallexample
686:options '("foo" "bar" "baz") 681:options '("foo" "bar" "baz")
@@ -753,14 +748,6 @@ key, using variations of this trick:
753 "Alist of basic info about people. 748 "Alist of basic info about people.
754Each element has the form (NAME AGE MALE-FLAG)." 749Each element has the form (NAME AGE MALE-FLAG)."
755 :type '(alist :value-type (group integer boolean))) 750 :type '(alist :value-type (group integer boolean)))
756
757(defcustom pets '(("brian")
758 ("dorith" "dog" "guppy")
759 ("ken" "cat"))
760 "Alist of people's pets.
761In an element (KEY . VALUE), KEY is the person's name,
762and the VALUE is a list of that person's pets."
763 :type '(alist :value-type (repeat string)))
764@end smallexample 751@end smallexample
765 752
766@item (plist :key-type @var{key-type} :value-type @var{value-type}) 753@item (plist :key-type @var{key-type} :value-type @var{value-type})
@@ -770,9 +757,8 @@ that (i) the information is stored as a property list,
770defaults to @code{symbol} rather than @code{sexp}. 757defaults to @code{symbol} rather than @code{sexp}.
771 758
772@item (choice @var{alternative-types}@dots{}) 759@item (choice @var{alternative-types}@dots{})
773The value must fit at least one of @var{alternative-types}. 760The value must fit one of @var{alternative-types}. For example,
774For example, @code{(choice integer string)} allows either an 761@code{(choice integer string)} allows either an integer or a string.
775integer or a string.
776 762
777In the customization buffer, the user selects an alternative 763In the customization buffer, the user selects an alternative
778using a menu, and can then edit the value in the usual way for that 764using a menu, and can then edit the value in the usual way for that
@@ -964,20 +950,18 @@ whatever follows the last keyword-value pair.
964@subsection Splicing into Lists 950@subsection Splicing into Lists
965 951
966 The @code{:inline} feature lets you splice a variable number of 952 The @code{:inline} feature lets you splice a variable number of
967elements into the middle of a list or vector. You use it in a 953elements into the middle of a @code{list} or @code{vector}
968@code{set}, @code{choice} or @code{repeat} type which appears among the 954customization type. You use it by adding @code{:inline t} to a type
969element-types of a @code{list} or @code{vector}. 955specification which is contained in a @code{list} or @code{vector}
970 956specification.
971 Normally, each of the element-types in a @code{list} or @code{vector} 957
972describes one and only one element of the list or vector. Thus, if an 958 Normally, each entry in a @code{list} or @code{vector} type
973element-type is a @code{repeat}, that specifies a list of unspecified 959specification describes a single element type. But when an entry
974length which appears as one element. 960contains @code{:inline t}, the value it matches is merged directly
975 961into the containing sequence. For example, if the entry matches a
976 But when the element-type uses @code{:inline}, the value it matches is 962list with three elements, those become three elements of the overall
977merged directly into the containing sequence. For example, if it 963sequence. This is analogous to @samp{,@@} in a backquote construct
978matches a list with three elements, those become three elements of the 964(@pxref{Backquote}).
979overall sequence. This is analogous to using @samp{,@@} in the backquote
980construct.
981 965
982 For example, to specify a list whose first element must be @code{baz} 966 For example, to specify a list whose first element must be @code{baz}
983and whose remaining arguments should be zero or more of @code{foo} and 967and whose remaining arguments should be zero or more of @code{foo} and
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index e97e6c264a3..d5870fd3abb 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4527,30 +4527,51 @@ specifying the bounding box of the PostScript image, analogous to the
4527support, you can use the ImageMagick library to load many image formats. 4527support, you can use the ImageMagick library to load many image formats.
4528 4528
4529@findex imagemagick-types 4529@findex imagemagick-types
4530@findex imagemagick-register-types
4530The function @code{imagemagick-types} returns a list of image file 4531The function @code{imagemagick-types} returns a list of image file
4531extensions that your installation of ImageMagick supports. To enable 4532extensions that your installation of ImageMagick supports. To enable
4532support, you must call the function @code{imagemagick-register-types}. 4533support, you must call the function @code{imagemagick-register-types}.
4534This enables Emacs to visit these file types in @code{image-mode}
4535(@pxref{File Conveniences,,, emacs, The GNU Emacs Manual}).
4536If your Emacs was not compiled with ImageMagick support, then
4537@code{imagemagick-types} will be undefined and
4538@code{imagemagick-register-types} will do nothing.
4533 4539
4534@vindex imagemagick-types-inhibit 4540@vindex imagemagick-types-inhibit
4535The variable @code{imagemagick-types-inhibit} specifies a list of 4541The variable @code{imagemagick-types-inhibit} specifies a list of
4536image types that you do @emph{not} want ImageMagick to handle. There 4542image types that you do @emph{not} want ImageMagick to handle. It is
4537may be overlap between image loaders in your Emacs installation, and 4543a list of symbols, each of which has the same name as one of the
4538you may prefer to use a different one for a given image type (which 4544format tags used internally by ImageMagick (i.e., as
4539@c FIXME how is this priority determined? 4545@code{imagemagick-types} returns). ImageMagick has a very broad
4540loader will be used in practice depends on the priority of the loaders). 4546definition of what an image is, for example it includes such file
4541@c FIXME why are these uppercase when image-types is lower-case? 4547types as C files and HTML files. It is not appropriate to treat these
4542@c FIXME what are the possible options? Are these actually file extensions? 4548as images in Emacs. You can add any other ImageMagick type that you
4543For example, if you never want to use the ImageMagick loader to use 4549wish to this list.
4550@ignore
4551@c I don't know what this means. I suspect it means eg loading jpg
4552@c images via libjpeg or ImageMagick. But it doesn't work.
4553@c If you don't have libjpeg support compiled in, you cannot
4554@c view jpeg images, even if you have imagemagick support:
4555@c http://debbugs.gnu.org/9045
4556@c And if you have both compiled in, then you always get
4557@c the libjpeg version:
4558@c http://debbugs.gnu.org/10746
4559There may be overlap between image loaders in your Emacs installation,
4560and you may prefer to use a different one for a given image type
4561(which loader will be used in practice depends on the priority of the
4562loaders).
4563For example, if you never want to use the ImageMagick loader to view
4544JPEG files, add @code{JPG} to this list. 4564JPEG files, add @code{JPG} to this list.
4565@end ignore
4566Note that ImageMagick often distinguishes between several different
4567types of a particular format (e.g., @code{JPG}, @code{JPEG},
4568@code{PJPEG}, etc.), and you may need to add all versions to this
4569list.
4545 4570
4571@c Not sure this should even be in the manual at all.
4546@vindex imagemagick-render-type 4572@vindex imagemagick-render-type
4547You can set the variable @code{imagemagick-render-type} to choose 4573If you wish to experiment with the performance of the ImageMagick
4548between screen render methods for the ImageMagick loader. The options 4574loader, see the variable @code{imagemagick-render-type}.
4549are: @code{0}, a conservative method which works with older
4550@c FIXME details of this "newer method"?
4551@c Presumably it is faster but may be less "robust"?
4552ImageMagick versions (it is a bit slow, but robust); and @code{1},
4553a newer ImageMagick method.
4554 4575
4555Images loaded with ImageMagick support a few new display specifications: 4576Images loaded with ImageMagick support a few new display specifications:
4556 4577
@@ -4565,10 +4586,11 @@ aspect ratio may not be preserved.
4565Specifies a rotation angle in degrees. 4586Specifies a rotation angle in degrees.
4566 4587
4567@item :index 4588@item :index
4568Specifies which image to view inside an image bundle file format, such 4589@c Doesn't work: http://debbugs.gnu.org/7978
4569as TIFF or DJVM. You can use the @code{image-metadata} function to 4590This has the same meaning as it does for GIF images (@pxref{GIF Images}),
4570retrieve the total number of images in an image bundle (this is 4591i.e. it specifies which image to view inside an image bundle file format
4571similar to how GIF files work). 4592such as DJVM. You can use the @code{image-metadata} function to
4593retrieve the total number of images in an image bundle.
4572@end table 4594@end table
4573 4595
4574 4596
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 8e03ade285f..a8528a548fc 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -432,6 +432,34 @@ for every numeric character code without modifier bits, even if it is
432@code{nil}, so these character's bindings are never inherited from 432@code{nil}, so these character's bindings are never inherited from
433the parent keymap. 433the parent keymap.
434 434
435@cindex keymap inheritance from multiple maps
436 Sometimes you want to make a keymap that inherits from more than one
437map. You can use the function @code{make-composed-keymap} for this.
438
439@defun make-composed-keymap maps &optional parent
440This function returns a new keymap composed of the existing keymap(s)
441@var{maps}, and optionally inheriting from a parent keymap
442@var{parent}. @var{maps} can be a single keymap or a list of more
443than one. When looking up a key in the resulting new map, Emacs
444searches in each of the @var{maps}, and then in @var{parent}, stopping
445at the first match. A @code{nil} binding in any one of @var{maps}
446overrides any binding in @var{parent}, but not a non-@code{nil} binding
447in any other of the @var{maps}.
448@end defun
449
450@noindent For example, here is how Emacs sets the parent of
451@code{help-mode-map}, such that it inherits from both
452@code{button-buffer-map} and @code{special-mode-map}:
453
454@example
455(defvar help-mode-map
456 (let ((map (make-sparse-keymap)))
457 (set-keymap-parent map (make-composed-keymap button-buffer-map
458 special-mode-map))
459 ... map) ... )
460@end example
461
462
435@node Prefix Keys 463@node Prefix Keys
436@section Prefix Keys 464@section Prefix Keys
437@cindex prefix key 465@cindex prefix key
@@ -2318,7 +2346,7 @@ The various toolkits with which you can build Emacs do not all support
2318the same set of features for menus. Some code works as expected with 2346the same set of features for menus. Some code works as expected with
2319one toolkit, but not under another. 2347one toolkit, but not under another.
2320 2348
2321One example is menu actions or buttons in a top-level menu-bar. The 2349One example is menu actions or buttons in a top-level menu bar. The
2322following works with the Lucid toolkit or on MS Windows, but not with 2350following works with the Lucid toolkit or on MS Windows, but not with
2323GTK or Nextstep, where clicking on the item has no effect. 2351GTK or Nextstep, where clicking on the item has no effect.
2324 2352
@@ -2658,6 +2686,15 @@ The @code{:rtl} property specifies an alternative image to use for
2658right-to-left languages. Only the Gtk+ version of Emacs supports this 2686right-to-left languages. Only the Gtk+ version of Emacs supports this
2659at present. 2687at present.
2660 2688
2689Like the menu bar, the tool bar can display separators (@pxref{Menu
2690Separators}). Tool bar separators are vertical rather than
2691horizontal, though, and only a single style is supported. Separators
2692are represented in the tool bar keymap in the same way as for the
2693menu bar, i.e. using a @code{(menu-item "--"}) entry. The Gtk+ and
2694Nextstep tool bars render separators natively, otherwise Emacs selects
2695a separator image that is appropriate for the display. Note that tool
2696bar separators do not support any properties, such as @code{:visible}.
2697
2661The default tool bar is defined so that items specific to editing do not 2698The default tool bar is defined so that items specific to editing do not
2662appear for major modes whose command symbol has a @code{mode-class} 2699appear for major modes whose command symbol has a @code{mode-class}
2663property of @code{special} (@pxref{Major Mode Conventions}). Major 2700property of @code{special} (@pxref{Major Mode Conventions}). Major
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 638ab89e37f..052fd037167 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -163,6 +163,14 @@ A wrapper-hook also allows for a hook function to completely replace the
163default definition (by not calling @var{fun}). 163default definition (by not calling @var{fun}).
164@end defmac 164@end defmac
165 165
166@defun run-hook-wrapped hook wrap-function &rest args
167This function is similar to @code{run-hook-with-args-until-success}.
168Like that function, it runs the functions on the abnormal hook
169@code{hook}, stopping at the first one that returns non-@code{nil}.
170Instead of calling the hook functions directly, though, it actually
171calls @code{wrap-function} with arguments @code{fun} and @code{args}.
172@end defun
173
166@node Setting Hooks 174@node Setting Hooks
167@subsection Setting Hooks 175@subsection Setting Hooks
168 176
@@ -1372,11 +1380,21 @@ implementing a mode in one self-contained definition.
1372@defmac define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args@dots{} body@dots{} 1380@defmac define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args@dots{} body@dots{}
1373This macro defines a new minor mode whose name is @var{mode} (a 1381This macro defines a new minor mode whose name is @var{mode} (a
1374symbol). It defines a command named @var{mode} to toggle the minor 1382symbol). It defines a command named @var{mode} to toggle the minor
1375mode, with @var{doc} as its documentation string. By default, it also 1383mode, with @var{doc} as its documentation string.
1376defines a variable named @var{mode}, which is set to @code{t} or 1384
1377@code{nil} by enabling or disabling the mode. The variable is 1385The toggle command takes one optional (prefix) argument.
1378initialized to @var{init-value}. Except in unusual circumstances (see 1386If called interactively with no argument it toggles the mode on or off.
1379below), this value must be @code{nil}. 1387A positive prefix argument enables the mode, any other prefix argument
1388disables it. From Lisp, an argument of @code{toggle} toggles the mode,
1389whereas an omitted or @code{nil} argument enables the mode.
1390This makes it easy to enable the minor mode in a major mode hook, for example.
1391If @var{doc} is nil, the macro supplies a default documentation string
1392explaining the above.
1393
1394By default, it also defines a variable named @var{mode}, which is set to
1395@code{t} or @code{nil} by enabling or disabling the mode. The variable
1396is initialized to @var{init-value}. Except in unusual circumstances
1397(see below), this value must be @code{nil}.
1380 1398
1381The string @var{lighter} says what to display in the mode line 1399The string @var{lighter} says what to display in the mode line
1382when the mode is enabled; if it is @code{nil}, the mode is not displayed 1400when the mode is enabled; if it is @code{nil}, the mode is not displayed
@@ -1470,9 +1488,10 @@ for this macro.
1470@smallexample 1488@smallexample
1471(define-minor-mode hungry-mode 1489(define-minor-mode hungry-mode
1472 "Toggle Hungry mode. 1490 "Toggle Hungry mode.
1473With no argument, this command toggles the mode. 1491Interactively with no argument, this command toggles the mode.
1474Non-null prefix argument turns on the mode. 1492A positive prefix argument enables the mode, any other prefix
1475Null prefix argument turns off the mode. 1493argument disables it. From Lisp, argument omitted or nil enables
1494the mode, `toggle' toggles the state.
1476 1495
1477When Hungry mode is enabled, the control delete key 1496When Hungry mode is enabled, the control delete key
1478gobbles all preceding whitespace except the last. 1497gobbles all preceding whitespace except the last.
@@ -1501,13 +1520,7 @@ minor modes don't need any.
1501@smallexample 1520@smallexample
1502(define-minor-mode hungry-mode 1521(define-minor-mode hungry-mode
1503 "Toggle Hungry mode. 1522 "Toggle Hungry mode.
1504With no argument, this command toggles the mode. 1523...rest of documentation as before..."
1505Non-null prefix argument turns on the mode.
1506Null prefix argument turns off the mode.
1507
1508When Hungry mode is enabled, the control delete key
1509gobbles all preceding whitespace except the last.
1510See the command \\[hungry-electric-delete]."
1511 ;; The initial value. 1524 ;; The initial value.
1512 :init-value nil 1525 :init-value nil
1513 ;; The indicator for the mode line. 1526 ;; The indicator for the mode line.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index bdb16cd10a8..ab3a4edc0ac 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1317,11 +1317,12 @@ value (@pxref{Default Value}) of @var{variable} instead.
1317 1317
1318@defun buffer-local-variables &optional buffer 1318@defun buffer-local-variables &optional buffer
1319This function returns a list describing the buffer-local variables in 1319This function returns a list describing the buffer-local variables in
1320buffer @var{buffer}. (If @var{buffer} is omitted, the current buffer is 1320buffer @var{buffer}. (If @var{buffer} is omitted, the current buffer
1321used.) It returns an association list (@pxref{Association Lists}) in 1321is used.) Normally, each list element has the form
1322which each element contains one buffer-local variable and its value. 1322@w{@code{(@var{sym} . @var{val})}}, where @var{sym} is a buffer-local
1323However, when a variable's buffer-local binding in @var{buffer} is void, 1323variable (a symbol) and @var{val} is its buffer-local value. But when
1324then the variable appears directly in the resulting list. 1324a variable's buffer-local binding in @var{buffer} is void, its list
1325element is just @var{sym}.
1325 1326
1326@example 1327@example
1327@group 1328@group