diff src/buffer.c @ 111222:cdad894f9ed0

Remove duplicate Lisp definitions of define-minor-mode variables defined in C. * lisp/abbrev.el (abbrev-mode): * lisp/composite.el (auto-composition-mode): * lisp/menu-bar.el (menu-bar-mode): * lisp/simple.el (transient-mark-mode): * lisp/tool-bar.el (tool-bar-mode): Adjust the define-minor-mode calls so that they do not define the associated variables twice. * lisp/simple.el (transient-mark-mode): Remove defvar. * lisp/composite.el (auto-composition-mode): Make variable auto-buffer-local. * lisp/cus-start.el: Add transient-mark-mode, menu-bar-mode, tool-bar-mode. Handle multiple groups, and also custom-delayed-init-variables. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. * src/buffer.c (syms_of_buffer) <abbrev-mode, transient-mark-mode>: * src/frame.c (syms_of_frame) <tool-bar-mode>: Move docs here from Lisp.
author Glenn Morris <rgm@gnu.org>
date Thu, 28 Oct 2010 20:29:29 -0700
parents cc83220d255d
children c00190a8c8ef
line wrap: on
line diff
--- a/src/buffer.c	Thu Oct 28 21:05:38 2010 -0400
+++ b/src/buffer.c	Thu Oct 28 20:29:29 2010 -0700
@@ -5600,7 +5600,8 @@
 		     doc: /* Local (mode-specific) abbrev table of current buffer.  */);
 
   DEFVAR_PER_BUFFER ("abbrev-mode", &current_buffer->abbrev_mode, Qnil,
-		     doc: /* Non-nil turns on automatic expansion of abbrevs as they are inserted.  */);
+		     doc: /*  Non-nil if Abbrev mode is enabled.
+Use the command `abbrev-mode' to change this variable.  */);
 
   DEFVAR_PER_BUFFER ("case-fold-search", &current_buffer->case_fold_search,
 		     Qnil,
@@ -6098,11 +6099,23 @@
 If the buffer has never been shown in a window, the value is nil.  */);
 
   DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode,
-	       doc: /* */);
+	       doc: /*  Non-nil if Transient Mark mode is enabled.
+See the command `transient-mark-mode' for a description of this minor mode.
+
+Non-nil also enables highlighting of the region whenever the mark is active.
+The variable `highlight-nonselected-windows' controls whether to highlight
+all windows or just the selected window.
+
+If the value is `lambda', that enables Transient Mark mode temporarily.
+After any subsequent action that would normally deactivate the mark
+\(such as buffer modification), Transient Mark mode is turned off.
+
+If the value is (only . OLDVAL), that enables Transient Mark mode
+temporarily.  After any subsequent point motion command that is not
+shift-translated, or any other action that would normally deactivate
+the mark (such as buffer modification), the value of
+`transient-mark-mode' is set to OLDVAL.  */);
   Vtransient_mark_mode = Qnil;
-  /* The docstring is in simple.el.  If we put it here, it would be
-     overwritten when transient-mark-mode is defined using
-     define-minor-mode.  */
 
   DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only,
 	       doc: /* *Non-nil means disregard read-only status of buffers or characters.