summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-10-22 23:38:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-10-22 23:38:24 -0700
commitcfc09582247ffef6a46b6249e2fba9136a62d21e (patch)
tree50e102f64a2b88c692d9110990abd416c78c32f0 /lisp
parent92c938895c639463681ae1c58a944cae62b70b87 (diff)
parent86c606818495d9411fd5d6b1477f9a097eb18020 (diff)
downloademacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.tar.gz
emacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.tar.bz2
emacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog283
-rw-r--r--lisp/ChangeLog.152
-rw-r--r--lisp/abbrev.el9
-rw-r--r--lisp/allout-widgets.el15
-rw-r--r--lisp/allout.el22
-rw-r--r--lisp/autoarg.el31
-rw-r--r--lisp/autoinsert.el7
-rw-r--r--lisp/autorevert.el40
-rw-r--r--lisp/battery.el10
-rw-r--r--lisp/cedet/ChangeLog17
-rw-r--r--lisp/cedet/ede.el20
-rw-r--r--lisp/cedet/ede/project-am.el6
-rw-r--r--lisp/cedet/ede/util.el7
-rw-r--r--lisp/cedet/semantic.el6
-rw-r--r--lisp/comint.el29
-rw-r--r--lisp/composite.el22
-rw-r--r--lisp/delsel.el5
-rw-r--r--lisp/descr-text.el3
-rw-r--r--lisp/desktop.el13
-rw-r--r--lisp/dired-x.el20
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/dirtrack.el20
-rw-r--r--lisp/doc-view.el7
-rw-r--r--lisp/double.el11
-rw-r--r--lisp/electric.el19
-rw-r--r--lisp/emacs-lisp/checkdoc.el7
-rw-r--r--lisp/emacs-lisp/easy-mmode.el12
-rw-r--r--lisp/emacs-lisp/eldoc.el19
-rw-r--r--lisp/emacs-lock.el18
-rw-r--r--lisp/emulation/crisp.el6
-rw-r--r--lisp/emulation/cua-base.el23
-rw-r--r--lisp/epa-hook.el9
-rw-r--r--lisp/erc/ChangeLog8
-rw-r--r--lisp/erc/erc-fill.el9
-rw-r--r--lisp/erc/erc-track.el15
-rw-r--r--lisp/erc/erc.el4
-rw-r--r--lisp/face-remap.el2
-rw-r--r--lisp/facemenu.el11
-rw-r--r--lisp/faces.el4
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/follow.el9
-rw-r--r--lisp/font-core.el10
-rw-r--r--lisp/font-lock.el8
-rw-r--r--lisp/frame.el25
-rw-r--r--lisp/gnus/ChangeLog77
-rw-r--r--lisp/gnus/gnus-cite.el9
-rw-r--r--lisp/gnus/gnus-registry.el33
-rw-r--r--lisp/gnus/gnus-util.el8
-rw-r--r--lisp/gnus/nnir.el8
-rw-r--r--lisp/gnus/nnmairix.el7
-rw-r--r--lisp/gnus/nnregistry.el7
-rw-r--r--lisp/help.el16
-rw-r--r--lisp/hi-lock.el19
-rw-r--r--lisp/hilit-chg.el26
-rw-r--r--lisp/hl-line.el15
-rw-r--r--lisp/ibuf-ext.el6
-rw-r--r--lisp/ibuffer.el8
-rw-r--r--lisp/icomplete.el7
-rw-r--r--lisp/ido.el12
-rw-r--r--lisp/image-file.el9
-rw-r--r--lisp/image-mode.el13
-rw-r--r--lisp/international/mule.el4
-rw-r--r--lisp/iswitchb.el11
-rw-r--r--lisp/jka-cmpr-hook.el11
-rw-r--r--lisp/json.el21
-rw-r--r--lisp/linum.el7
-rw-r--r--lisp/longlines.el31
-rw-r--r--lisp/mail/footnote.el11
-rw-r--r--lisp/mail/mailabbrev.el10
-rw-r--r--lisp/master.el10
-rw-r--r--lisp/mb-depth.el12
-rw-r--r--lisp/menu-bar.el34
-rw-r--r--lisp/minibuf-eldef.el18
-rw-r--r--lisp/minibuffer.el6
-rw-r--r--lisp/mouse-sel.el9
-rw-r--r--lisp/mouse.el421
-rw-r--r--lisp/msb.el5
-rw-r--r--lisp/mwheel.el8
-rw-r--r--lisp/net/browse-url.el45
-rw-r--r--lisp/net/goto-addr.el2
-rw-r--r--lisp/net/tramp.el7
-rw-r--r--lisp/net/xesam.el6
-rw-r--r--lisp/outline.el5
-rw-r--r--lisp/paren.el12
-rw-r--r--lisp/progmodes/bug-reference.el5
-rw-r--r--lisp/progmodes/cap-words.el8
-rw-r--r--lisp/progmodes/cc-engine.el53
-rw-r--r--lisp/progmodes/compile.el28
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/hideif.el14
-rw-r--r--lisp/progmodes/idlw-shell.el18
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/subword.el20
-rw-r--r--lisp/progmodes/vera-mode.el1
-rw-r--r--lisp/progmodes/vhdl-mode.el8
-rw-r--r--lisp/progmodes/which-func.el14
-rw-r--r--lisp/recentf.el14
-rw-r--r--lisp/reveal.el19
-rw-r--r--lisp/rfn-eshadow.el18
-rw-r--r--lisp/ruler-mode.el6
-rw-r--r--lisp/savehist.el18
-rw-r--r--lisp/scroll-all.el11
-rw-r--r--lisp/scroll-bar.el11
-rw-r--r--lisp/server.el8
-rw-r--r--lisp/shell.el10
-rw-r--r--lisp/simple.el133
-rw-r--r--lisp/strokes.el8
-rw-r--r--lisp/t-mouse.el9
-rw-r--r--lisp/tar-mode.el12
-rw-r--r--lisp/term/tvi970.el17
-rw-r--r--lisp/term/vt100.el5
-rw-r--r--lisp/textmodes/flyspell.el14
-rw-r--r--lisp/textmodes/ispell.el20
-rw-r--r--lisp/textmodes/nroff-mode.el16
-rw-r--r--lisp/textmodes/paragraphs.el22
-rw-r--r--lisp/textmodes/refill.el15
-rw-r--r--lisp/textmodes/reftex.el8
-rw-r--r--lisp/textmodes/rst.el9
-rw-r--r--lisp/textmodes/sgml-mode.el20
-rw-r--r--lisp/textmodes/tex-mode.el10
-rw-r--r--lisp/time.el17
-rw-r--r--lisp/tool-bar.el7
-rw-r--r--lisp/tooltip.el13
-rw-r--r--lisp/type-break.el28
-rw-r--r--lisp/url/ChangeLog4
-rw-r--r--lisp/url/url-handlers.el5
-rw-r--r--lisp/vc/diff-mode.el19
-rw-r--r--lisp/vc/ediff-init.el8
-rw-r--r--lisp/vc/log-edit.el4
-rw-r--r--lisp/vc/vc-bzr.el4
-rw-r--r--lisp/vc/vc-hooks.el18
-rw-r--r--lisp/vc/vc.el10
-rw-r--r--lisp/view.el27
-rw-r--r--lisp/whitespace.el36
-rw-r--r--lisp/wid-browse.el3
-rw-r--r--lisp/window.el29
-rw-r--r--lisp/xt-mouse.el5
137 files changed, 1644 insertions, 1018 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index abae693d0c8..09e2e7dc1de 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,278 @@
+2011-10-23 Chong Yidong <cyd@gnu.org>
+
+ * files.el (toggle-read-only): Remove obsolete comment about
+ version control.
+
+ * vc/vc-hooks.el (vc-toggle-read-only): Make it an obsolete alias
+ for toggle-read-only. Note that this hasn't called vc-next-action
+ since 2008-05-02, though it wasn't documented at the time.
+
+ * vc/ediff-init.el (ediff-toggle-read-only-function): Use
+ toggle-read-only.
+
+2011-10-22 Alan Mackenzie <bug-cc-mode@gnu.org>
+
+ Fix bug #9560, sporadic wrong indentation; improve instrumentation
+ of c-parse-state.
+
+ * cc-engine.el (c-append-lower-brace-pair-to-state-cache): correct
+ faulty logical expression.
+ (c-parse-state-state, c-record-parse-state-state):
+ (c-replay-parse-state-state): New defvar/defuns.
+ (c-debug-parse-state): Use new functions.
+
+2011-10-22 Martin Rudalics <rudalics@gmx.at>
+
+ * mouse.el (mouse-drag-line): Fix minibuffer resizing broken by
+ last fix. Use window-in-direction correctly.
+
+2011-10-21 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/idlwave.el (idlwave-mode):
+ * progmodes/vera-mode.el (vera-mode): No need to set
+ require-final-newline; that's done in prog-mode. Suggested by
+ Stefan Monnier.
+
+2011-10-21 Martin Rudalics <rudalics@gmx.at>
+
+ * mouse.el (mouse-drag-window-above)
+ (mouse-drag-move-window-bottom, mouse-drag-move-window-top)
+ (mouse-drag-mode-line-1, mouse-drag-header-line)
+ (mouse-drag-vertical-line-rightward-window): Remove.
+ (mouse-drag-line): New function.
+ (mouse-drag-mode-line, mouse-drag-header-line)
+ (mouse-drag-vertical-line): Call mouse-drag-line.
+ * window.el (window-at-side-p, windows-at-side): New functions.
+
+2011-10-21 Ulrich Mueller <ulm@gentoo.org>
+
+ * tar-mode.el (tar-grind-file-mode):
+ Fix handling of setuid/setgid, handle sticky bit. (Bug#9817)
+
+2011-10-21 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/idlwave.el (idlwave-mode):
+ * progmodes/vera-mode.el (vera-mode): Use
+ mode-require-final-newline.
+
+2011-10-20 Glenn Morris <rgm@gnu.org>
+
+ * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
+
+2011-10-20 Christoph Scholtes <cschol2112@googlemail.com>
+
+ * emulation/cua-base.el (cua-set-mark): Fix case of string.
+
+2011-10-20 Chong Yidong <cyd@gnu.org>
+
+ * emulation/cua-base.el (cua-mode):
+ * mail/footnote.el (footnote-mode):
+ * mail/mailabbrev.el (mail-abbrevs-mode):
+ * net/xesam.el (xesam-minor-mode):
+ * progmodes/bug-reference.el (bug-reference-mode):
+ * progmodes/cap-words.el (capitalized-words-mode):
+ * progmodes/compile.el (compilation-minor-mode)
+ (compilation-shell-minor-mode):
+ * progmodes/gud.el (gud-tooltip-mode):
+ * progmodes/hideif.el (hide-ifdef-mode):
+ * progmodes/idlw-shell.el (idlwave-shell-electric-debug-mode):
+ * progmodes/subword.el (subword-mode):
+ * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
+ * progmodes/which-func.el (which-function-mode):
+ * term/tvi970.el (tvi970-set-keypad-mode):
+ * term/vt100.el (vt100-wide-mode):
+ * textmodes/flyspell.el (flyspell-mode):
+ * textmodes/ispell.el (ispell-minor-mode):
+ * textmodes/nroff-mode.el (nroff-electric-mode):
+ * textmodes/paragraphs.el (use-hard-newlines):
+ * textmodes/refill.el (refill-mode):
+ * textmodes/reftex.el (reftex-mode):
+ * textmodes/rst.el (rst-minor-mode):
+ * textmodes/sgml-mode.el (html-autoview-mode)
+ (sgml-electric-tag-pair-mode):
+ * textmodes/tex-mode.el (latex-electric-env-pair-mode):
+ * vc/diff-mode.el (diff-auto-refine-mode, diff-minor-mode):
+ * emulation/crisp.el (crisp-mode):
+ * emacs-lisp/eldoc.el (eldoc-mode):
+ * emacs-lisp/checkdoc.el (checkdoc-minor-mode): Doc fixes for new
+ minor mode behavior.
+
+2011-10-19 Juri Linkov <juri@jurta.org>
+
+ * descr-text.el (describe-char): Add #x2010 and #x2011 to
+ the list of hard-coded chars with escape-glyph face.
+
+2011-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/log-edit.el (log-edit-empty-buffer-p): Ignore empty headers.
+
+2011-10-19 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-connectable-p): Make a stronger check on a
+ running process.
+
+2011-10-19 Glenn Morris <rgm@gnu.org>
+
+ * vc/vc-bzr.el (vc-bzr-after-dir-status):
+ Ignore ignored files. (Bug#9726)
+
+2011-10-19 Chong Yidong <cyd@gnu.org>
+
+ Doc fix for minor modes, stating that an omitted argument enables
+ the mode unconditionally when called from Lisp.
+
+ * abbrev.el (abbrev-mode):
+ * allout.el (allout-mode):
+ * autoinsert.el (auto-insert-mode):
+ * autoarg.el (autoarg-mode, autoarg-kp-mode):
+ * autorevert.el (auto-revert-mode, auto-revert-tail-mode)
+ (global-auto-revert-mode):
+ * battery.el (display-battery-mode):
+ * composite.el (global-auto-composition-mode)
+ (auto-composition-mode):
+ * delsel.el (delete-selection-mode):
+ * desktop.el (desktop-save-mode):
+ * dired-x.el (dired-omit-mode):
+ * dirtrack.el (dirtrack-mode):
+ * doc-view.el (doc-view-minor-mode):
+ * double.el (double-mode):
+ * electric.el (electric-indent-mode, electric-pair-mode):
+ * emacs-lock.el (emacs-lock-mode):
+ * epa-hook.el (auto-encryption-mode):
+ * follow.el (follow-mode):
+ * font-core.el (font-lock-mode):
+ * frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
+ * help.el (temp-buffer-resize-mode):
+ * hilit-chg.el (highlight-changes-mode)
+ (highlight-changes-visible-mode):
+ * hi-lock.el (hi-lock-mode):
+ * hl-line.el (hl-line-mode, global-hl-line-mode):
+ * icomplete.el (icomplete-mode):
+ * ido.el (ido-everywhere):
+ * image-file.el (auto-image-file-mode):
+ * image-mode.el (image-minor-mode):
+ * iswitchb.el (iswitchb-mode):
+ * jka-cmpr-hook.el (auto-compression-mode):
+ * linum.el (linum-mode):
+ * longlines.el (longlines-mode):
+ * master.el (master-mode):
+ * mb-depth.el (minibuffer-depth-indicate-mode):
+ * menu-bar.el (menu-bar-mode):
+ * minibuf-eldef.el (minibuffer-electric-default-mode):
+ * mouse-sel.el (mouse-sel-mode):
+ * msb.el (msb-mode):
+ * mwheel.el (mouse-wheel-mode):
+ * outline.el (outline-minor-mode):
+ * paren.el (show-paren-mode):
+ * recentf.el (recentf-mode):
+ * reveal.el (reveal-mode, global-reveal-mode):
+ * rfn-eshadow.el (file-name-shadow-mode):
+ * ruler-mode.el (ruler-mode):
+ * savehist.el (savehist-mode):
+ * scroll-all.el (scroll-all-mode):
+ * scroll-bar.el (scroll-bar-mode):
+ * server.el (server-mode):
+ * shell.el (shell-dirtrack-mode):
+ * simple.el (auto-fill-mode, transient-mark-mode)
+ (visual-line-mode, overwrite-mode, binary-overwrite-mode)
+ (line-number-mode, column-number-mode, size-indication-mode)
+ (auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
+ * strokes.el (strokes-mode):
+ * time.el (display-time-mode):
+ * t-mouse.el (gpm-mouse-mode):
+ * tool-bar.el (tool-bar-mode):
+ * tooltip.el (tooltip-mode):
+ * type-break.el (type-break-mode-line-message-mode)
+ (type-break-query-mode):
+ * view.el (view-mode):
+ * whitespace.el (whitespace-mode, whitespace-newline-mode)
+ (global-whitespace-mode, global-whitespace-newline-mode):
+ * xt-mouse.el (xterm-mouse-mode): Doc fix.
+
+ * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
+ autogenerated docstring.
+
+2011-10-19 Juri Linkov <juri@jurta.org>
+
+ * net/browse-url.el (browse-url-can-use-xdg-open): Support LXDE
+ by checking environment variables "DESKTOP_SESSION" and
+ "XDG_CURRENT_DESKTOP". (Bug#9779)
+
+2011-10-19 Juri Linkov <juri@jurta.org>
+
+ * net/browse-url.el (browse-url-browser-function): Add "Chromium".
+ (browse-url-chromium-program, browse-url-chromium-arguments):
+ New defcustoms.
+ (browse-url-default-browser): Check for `browse-url-chromium' and
+ call `browse-url-chromium-program'.
+ (browse-url-chromium): New command. (Bug#9779)
+
+2011-10-18 Juanma Barranquero <lekktu@gmail.com>
+
+ * facemenu.el (list-colors-duplicates): On Windows, detect more
+ duplicates by assuming that only colors matching "^System" are
+ special "system colors". (Bug#9722)
+
+2011-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/log-edit.el (log-edit): Add "Author:" header to encourage people
+ to distinguish the author from the committer.
+
+2011-10-18 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-file-name-handler): Load Tramp packages silently.
+
+2011-10-18 Jirka Kosek <jirka@kosek.cz> (tiny change)
+
+ * international/mule.el (sgml-html-meta-auto-coding-function):
+ Add support for detecting encoding in HTML5 specified only as
+ <meta charset="UTF-8">. Implementation just makes http-equiv and
+ content-type parts from HTML4 encoding string optional. (Bug#9716)
+
+2011-10-18 Glenn Morris <rgm@gnu.org>
+
+ * vc/vc.el (vc-initial-comment): Mark as obsolete. (Bug#9745)
+
+2011-10-18 Chong Yidong <cyd@gnu.org>
+
+ * faces.el (cursor): Doc fix.
+
+2011-10-17 Chong Yidong <cyd@gnu.org>
+
+ * font-lock.el (font-lock-maximum-size): Mark as obsolete.
+
+2011-10-17 Ryan Barrett <emacs@ryanb.org> (tiny change)
+
+ * dirtrack.el (dirtrack): Support shell buffers with path
+ prefixes, e.g. tramp-based remote shells. (Bug#9647)
+
+2011-10-17 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * json.el: Bump version to 1.3 and note change in History.
+ (json-alist-p, json-plist-p): Rewrite to avoid recursion.
+
+2011-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * comint.el (comint-insert-input, comint-send-input)
+ (comint-get-old-input-default, comint-backward-matching-input)
+ (comint-next-prompt): Use nil instead of `input' for field property of
+ past user input (bug#114).
+
+ * minibuffer.el (completion--replace): Inherit surrounding properties
+ (bug#114).
+ (minibuffer-complete-and-exit): Use it.
+
+ * comint.el (comint--table-subvert): Quote the all-completions output
+ (bug#9160).
+
+2011-10-17 Martin Rudalics <rudalics@gmx.at>
+
+ * ido.el (ido-default-buffer-method): Remove redundant :type entry.
+
+ * menu-bar.el (menu-bar-file-menu): Add entry for making new
+ window on right of selected. (Bug#9350) Reword other window
+ entries and separate them from frame entries.
+
2011-10-15 Glenn Morris <rgm@gnu.org>
* emacs-lisp/ert.el (ert--explain-equal-rec, ert-select-tests):
@@ -5,8 +280,8 @@
2011-10-15 Chong Yidong <cyd@stupidchicken.com>
- * net/network-stream.el (network-stream-open-starttls): Improve
- detection of failure due to lack of TLS support.
+ * net/network-stream.el (network-stream-open-starttls):
+ Improve detection of failure due to lack of TLS support.
* mail/sendmail.el (sendmail-query-once): Tweak prompt message,
putting the input text in front and in bold.
@@ -405,8 +680,8 @@
* net/newst-reader.el (newsticker-html-renderer)
(newsticker-show-news): Automatically
- load html rendering package if newsticker-html-renderer is
- set. Fixes "Warning: defvar ignored because w3m-fill-column is
+ load html rendering package if newsticker-html-renderer is set.
+ Fixes "Warning: defvar ignored because w3m-fill-column is
let-bound" and the error "Symbol's value as variable is void:
w3m-fill-column".
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index 2acf847cddc..9cb24baeb1f 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -22676,7 +22676,7 @@
(vc-next-action, vc-transfer-file, vc-rename-file): Also pass the
backend when calling vc-mode-line.
(vc-register): Do not create a closure for calling the vc register
- function, call it directly.
+ function, call it directly. No longer obey vc-initial-comment.
2009-06-23 Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 5a7a741a3a6..395810772c5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -54,9 +54,12 @@ define global abbrevs instead."
(define-minor-mode abbrev-mode
"Toggle Abbrev mode in the current buffer.
-With optional argument ARG, turn abbrev mode on if ARG is
-positive, otherwise turn it off. In Abbrev mode, inserting an
-abbreviation causes it to expand and be replaced by its expansion."
+With a prefix argument ARG, enable Abbrev mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Abbrev mode if ARG is omitted or nil.
+
+In Abbrev mode, inserting an abbreviation causes it to expand and
+be replaced by its expansion."
;; It's defined in C, this stops the d-m-m macro defining it again.
:variable abbrev-mode)
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index ef75e7157e6..162da1f4815 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -486,13 +486,14 @@ happens in the buffer.")
;;;_ > define-minor-mode allout-widgets-mode (arg)
;;;###autoload
(define-minor-mode allout-widgets-mode
- "Allout-mode extension, providing graphical decoration of outline structure.
-
-This is meant to operate along with allout-mode, via `allout-mode-hook'.
-
-If optional argument ARG is greater than 0, enable.
-If optional argument ARG is less than 0, disable.
-Anything else, toggle between active and inactive.
+ "Toggle Allout Widgets mode.
+With a prefix argument ARG, enable Allout Widgets mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Allout Widgets mode is an extension of Allout mode that provides
+graphical decoration of outline structure. It is meant to
+operate along with `allout-mode', via `allout-mode-hook'.
The graphics include:
diff --git a/lisp/allout.el b/lisp/allout.el
index 4002f12e264..18cc3c80dc6 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1702,17 +1702,19 @@ valid values."
;;;###autoload
(define-minor-mode allout-mode
;;;_ . Doc string:
- "Toggle minor mode for controlling exposure and editing of text outlines.
-\\<allout-mode-map-value>
-
-Allout outline mode always runs as a minor mode.
+ "Toggle Allout outline mode.
+With a prefix argument ARG, enable Allout outline mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-Allout outline mode provides extensive outline oriented
-formatting and manipulation. It enables structural editing of
-outlines, as well as navigation and exposure. It also is
-specifically aimed at accommodating syntax-sensitive text like
-programming languages. \(For example, see the allout code itself,
-which is organized as an allout outline.)
+\\<allout-mode-map-value>
+Allout outline mode is a minor mode that provides extensive
+outline oriented formatting and manipulation. It enables
+structural editing of outlines, as well as navigation and
+exposure. It also is specifically aimed at accommodating
+syntax-sensitive text like programming languages. \(For example,
+see the allout code itself, which is organized as an allout
+outline.)
In addition to typical outline navigation and exposure, allout includes:
diff --git a/lisp/autoarg.el b/lisp/autoarg.el
index 378ec1318b1..57f5bcd809c 100644
--- a/lisp/autoarg.el
+++ b/lisp/autoarg.el
@@ -90,15 +90,19 @@
;;;###autoload
(define-minor-mode autoarg-mode
- "Toggle Autoarg minor mode globally.
-With ARG, turn Autoarg mode on if ARG is positive, off otherwise.
+ "Toggle Autoarg mode, a global minor mode.
+With a prefix argument ARG, enable Autoarg mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
\\<autoarg-mode-map>
-In Autoarg mode digits are bound to `digit-argument' -- i.e. they
-supply prefix arguments as C-DIGIT and M-DIGIT normally do -- and
-C-DIGIT inserts DIGIT. \\[autoarg-terminate] terminates the prefix sequence
-and inserts the digits of the autoarg sequence into the buffer.
-Without a numeric prefix arg the normal binding of \\[autoarg-terminate] is
-invoked, i.e. what it would be with Autoarg mode off.
+In Autoarg mode, digits are bound to `digit-argument', i.e. they
+supply prefix arguments as C-DIGIT and M-DIGIT normally do.
+Furthermore, C-DIGIT inserts DIGIT.
+\\[autoarg-terminate] terminates the prefix sequence and inserts
+the digits of the autoarg sequence into the buffer.
+Without a numeric prefix arg, the normal binding of \\[autoarg-terminate]
+is invoked, i.e. what it would be with Autoarg mode off.
For example:
`6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'.
@@ -112,11 +116,14 @@ then invokes the normal binding of \\[autoarg-terminate].
;;;###autoload
(define-minor-mode autoarg-kp-mode
- "Toggle Autoarg-KP minor mode globally.
-With ARG, turn Autoarg mode on if ARG is positive, off otherwise.
+ "Toggle Autoarg-KP mode, a global minor mode.
+With a prefix argument ARG, enable Autoarg-KP mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
\\<autoarg-kp-mode-map>
-This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1'
-etc. to supply digit arguments.
+This is similar to `autoarg-mode' but rebinds the keypad keys
+`kp-1' etc. to supply digit arguments.
\\{autoarg-kp-mode-map}"
nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 5793c3180be..6d002f4a217 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -397,9 +397,10 @@ or if CONDITION had no actions, after all other CONDITIONs."
;;;###autoload
(define-minor-mode auto-insert-mode
- "Toggle Auto-insert mode.
-With prefix ARG, turn Auto-insert mode on if and only if ARG is positive.
-Returns the new status of Auto-insert mode (non-nil means on).
+ "Toggle Auto-insert mode, a global minor mode.
+With a prefix argument ARG, enable Auto-insert mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
When Auto-insert mode is enabled, when new files are created you can
insert a template for the file depending on the mode of the buffer."
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index c67b6663bd0..817aaff55ca 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -284,10 +284,15 @@ the list of old buffers.")
;;;###autoload
(define-minor-mode auto-revert-mode
- "Toggle reverting buffer when file on disk changes.
+ "Toggle reverting buffer when the file changes (Auto Revert mode).
+With a prefix argument ARG, enable Auto Revert mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Auto Revert mode is a minor mode that affects only the current
+buffer. When enabled, it reverts the buffer when the file on
+disk changes.
-With arg, turn Auto Revert mode on if and only if arg is positive.
-This is a minor mode that affects only the current buffer.
Use `global-auto-revert-mode' to automatically revert all buffers.
Use `auto-revert-tail-mode' if you know that the file will only grow
without being changed in the part that is already in the buffer."
@@ -314,14 +319,16 @@ This function is designed to be added to hooks, for example:
;;;###autoload
(define-minor-mode auto-revert-tail-mode
- "Toggle reverting tail of buffer when file on disk grows.
-With arg, turn Tail mode on if arg is positive, otherwise turn it off.
+ "Toggle reverting tail of buffer when the file grows.
+With a prefix argument ARG, enable Auto-Revert Tail mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
-When Tail mode is enabled, the tail of the file is constantly
-followed, as with the shell command `tail -f'. This means that
-whenever the file grows on disk (presumably because some
-background process is appending to it from time to time), this is
-reflected in the current buffer.
+When Auto Revert Tail mode is enabled, the tail of the file is
+constantly followed, as with the shell command `tail -f'. This
+means that whenever the file grows on disk (presumably because
+some background process is appending to it from time to time),
+this is reflected in the current buffer.
You can edit the buffer and turn this mode off and on again as
you please. But make sure the background process has stopped
@@ -367,7 +374,7 @@ Perform a full revert? ")
;;;###autoload
(defun turn-on-auto-revert-tail-mode ()
- "Turn on Auto-Revert Tail Mode.
+ "Turn on Auto-Revert Tail mode.
This function is designed to be added to hooks, for example:
(add-hook 'my-logfile-mode-hook 'turn-on-auto-revert-tail-mode)"
@@ -377,12 +384,13 @@ This function is designed to be added to hooks, for example:
;;;###autoload
(define-minor-mode global-auto-revert-mode
"Toggle Global Auto Revert mode.
-With optional prefix argument ARG, enable Global Auto Revert Mode
-if ARG > 0, else disable it.
+With a prefix argument ARG, enable Global Auto Revert mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
-This is a global minor mode that reverts any buffer associated
-with a file when the file changes on disk. Use `auto-revert-mode'
-to revert a particular buffer.
+Global Auto Revert mode is a global minor mode that reverts any
+buffer associated with a file when the file changes on disk. Use
+`auto-revert-mode' to revert a particular buffer.
If `global-auto-revert-non-file-buffers' is non-nil, this mode
may also revert some non-file buffers, as described in the
diff --git a/lisp/battery.el b/lisp/battery.el
index f5c01fbef58..3b245ed644d 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -164,10 +164,14 @@ The text being displayed in the echo area is controlled by the variables
;;;###autoload
(define-minor-mode display-battery-mode
- "Display battery status information in the mode line.
-The text being displayed in the mode line is controlled by the variables
+ "Toggle battery status display in mode line (Display Battery mode).
+With a prefix argument ARG, enable Display Battery mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+The text displayed in the mode line is controlled by
`battery-mode-line-format' and `battery-status-function'.
-The mode line will be updated automatically every `battery-update-interval'
+The mode line is be updated every `battery-update-interval'
seconds."
:global t :group 'battery
(setq battery-mode-line-string "")
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index 093e592c475..3dd0e6f78fd 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,20 @@
+2011-10-23 Chong Yidong <cyd@gnu.org>
+
+ * ede.el (ede-maybe-checkout): Function deleted;
+ vc-toggle-read-only does not do version control now.
+
+ * ede/util.el (ede-make-buffer-writable): Don't use
+ vc-toggle-read-only.
+
+ * ede/project-am.el (project-remove-file, project-add-file)
+ (project-new-target): Don't call ede-maybe-checkout.
+
+2011-10-19 Chong Yidong <cyd@gnu.org>
+
+ * ede.el (ede-minor-mode,global-ede-mode):
+ * semantic.el (semantic-mode): Doc fix to reflect new
+ define-minor-mode calling behavior.
+
2011-07-30 Chong Yidong <cyd@stupidchicken.com>
* semantic/grammar.el (semantic-grammar-insert-defanalyzers): Fix
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 307ccfdadd7..14f09517b1d 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -398,8 +398,9 @@ To be used in hook functions."
(define-minor-mode ede-minor-mode
"Toggle EDE (Emacs Development Environment) minor mode.
-With non-nil argument ARG, enable EDE minor mode if ARG is
-positive; otherwise, disable it.
+With a prefix argument ARG, enable EDE minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+EDE minor mode if ARG is omitted or nil.
If this file is contained, or could be contained in an EDE
controlled project, then this mode is activated automatically
@@ -458,8 +459,9 @@ ONOFF indicates enabling or disabling the mode."
;;;###autoload
(define-minor-mode global-ede-mode
"Toggle global EDE (Emacs Development Environment) mode.
-With non-nil argument ARG, enable global EDE mode if ARG is
-positive; otherwise, disable it.
+With a prefix argument ARG, enable global EDE mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
This global minor mode enables `ede-minor-mode' in all buffers in
an EDE controlled project."
@@ -1177,16 +1179,6 @@ See also `ede-map-subprojects'."
Return the first non-nil value returned by PROC."
(eval (cons 'or (ede-map-targets this proc))))
-;;; VC Handling
-;;
-(defun ede-maybe-checkout (&optional buffer)
- "Check BUFFER out of VC if necessary."
- (save-excursion
- (if buffer (set-buffer buffer))
- (if (and buffer-read-only vc-mode
- (y-or-n-p "Checkout Makefile.am from VC? "))
- (vc-toggle-read-only))))
-
;;; Some language specific methods.
;;
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el
index 88cf67e22ed..ec54d8151bc 100644
--- a/lisp/cedet/ede/project-am.el
+++ b/lisp/cedet/ede/project-am.el
@@ -214,7 +214,6 @@ OT is the object target. DIR is the directory to start in."
target (project-am-preferred-target-type (buffer-file-name)))))
(ede-with-projectfile ot
(makefile-move-to-macro (project-am-macro ot))
- (ede-maybe-checkout)
(makefile-end-of-command)
(insert " " ofn)
(makefile-fill-paragraph nil)
@@ -226,10 +225,6 @@ OT is the object target. DIR is the directory to start in."
"Remove the current buffer from any project targets."
(ede-with-projectfile ot
(makefile-move-to-macro (project-am-macro ot))
- (if (and buffer-read-only vc-mode
- (y-or-n-p "Checkout Makefile.am from VC? "))
- (vc-toggle-read-only t))
- (ede-maybe-checkout)
(makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd))))
(replace-match "" t t nil 0)
(makefile-fill-paragraph nil)
@@ -271,7 +266,6 @@ buffer being in order to provide a smart default target type."
(if (not ot) (error "Error creating target object %S" ntype))
(ede-with-projectfile ot
(goto-char (point-min))
- (ede-maybe-checkout)
(makefile-next-dependency)
(if (= (point) (point-min))
(goto-char (point-max))
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el
index fc4536ba88a..053180d4a8b 100644
--- a/lisp/cedet/ede/util.el
+++ b/lisp/cedet/ede/util.el
@@ -87,12 +87,7 @@ their sources to VERSION."
If BUFFER isn't specified, use the current buffer."
(save-excursion
(if buffer (set-buffer buffer))
- (if buffer-read-only
- (if (and vc-mode
- (y-or-n-p (format "Check out %s? " (buffer-file-name))))
- (vc-toggle-read-only)
- (if (not vc-mode)
- (toggle-read-only -1))))))
+ (toggle-read-only -1)))
(provide 'ede/util)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index ce9af0e12b5..34d886b6807 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -1055,8 +1055,10 @@ The possible elements of this list include the following:
;;;###autoload
(define-minor-mode semantic-mode
- "Toggle Semantic mode.
-With ARG, turn Semantic mode on if ARG is positive, off otherwise.
+ "Toggle parser features (Semantic mode).
+With a prefix argument ARG, enable Semantic mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Semantic mode if ARG is omitted or nil.
In Semantic mode, Emacs parses the buffers you visit for their
semantic content. This information is used by a variety of
diff --git a/lisp/comint.el b/lisp/comint.el
index 52580db6186..591be5e2d9d 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -847,10 +847,10 @@ by the global keymap (usually `mouse-yank-at-click')."
;; If pos is at the very end of a field, the mouse-click was
;; probably outside (to the right) of the field.
(and (< pos (field-end pos))
- (setq field (field-at-pos pos))
- (setq input (field-string-no-properties pos))))
- (if (or (null comint-accum-marker)
- (not (eq field 'input)))
+ (< (field-end pos) (point-max))
+ (progn (setq field (field-at-pos pos))
+ (setq input (field-string-no-properties pos)))))
+ (if (or (null input) (null comint-accum-marker) field)
;; Fall back to the global definition if (i) the selected
;; buffer is not a comint buffer (which can happen if a
;; non-comint window was selected and we clicked in a comint
@@ -1803,8 +1803,7 @@ Similarly for Soar, Scheme, etc."
(add-text-properties
beg end
'(mouse-face highlight
- help-echo "mouse-2: insert after prompt as new input"
- field input))))
+ help-echo "mouse-2: insert after prompt as new input"))))
(unless (or no-newline comint-use-prompt-regexp)
;; Cover the terminating newline
(add-text-properties end (1+ end)
@@ -2153,7 +2152,7 @@ If `comint-use-prompt-regexp' is non-nil, then return
the current line with any initial string matching the regexp
`comint-prompt-regexp' removed."
(let ((bof (field-beginning)))
- (if (eq (get-char-property bof 'field) 'input)
+ (if (null (get-char-property bof 'field)) ;Not `output'.
(field-string-no-properties bof)
(comint-bol)
(buffer-substring-no-properties (point) (line-end-position)))))
@@ -2473,7 +2472,7 @@ If N is negative, find the next or Nth next match."
(while (/= n 0)
(unless (re-search-backward regexp nil t dir)
(error "Not found"))
- (when (eq (get-char-property (point) 'field) 'input)
+ (unless (get-char-property (point) 'field)
(setq n (- n dir))))
(field-beginning))))
(goto-char pos))))
@@ -2520,7 +2519,7 @@ text matching `comint-prompt-regexp'."
(setq input-pos (point-max)))
;; stop iterating
(setq n 0))
- ((eq (get-char-property pos 'field) 'input)
+ ((null (get-char-property pos 'field))
(setq n (if (< n 0) (1+ n) (1- n)))
(setq input-pos pos))))
(when input-pos
@@ -3079,9 +3078,9 @@ SS1 = (unquote SS2)."
(defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun)
"Completion table that replaces the prefix S1 with S2 in STRING.
-When TABLE, S1 and S2 are provided by `apply-partially', the result
-is a completion table which completes strings of the form (concat S1 S)
-in the same way as TABLE completes strings of the form (concat S2 S)."
+The result is a completion table which completes strings of the
+form (concat S1 S) in the same way as TABLE completes strings of
+the form (concat S2 S)."
(lambda (string pred action)
(let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
completion-ignore-case))
@@ -3106,13 +3105,15 @@ in the same way as TABLE completes strings of the form (concat S2 S)."
((eq action t)
(let ((bounds (completion-boundaries str table pred "")))
(if (>= (car bounds) (length s2))
- res
+ (if quote-fun (mapcar quote-fun res) res)
(let ((re (concat "\\`"
(regexp-quote (substring s2 (car bounds))))))
(delq nil
(mapcar (lambda (c)
(if (string-match re c)
- (substring c (match-end 0))))
+ (let ((str (substring c (match-end 0))))
+ (if quote-fun
+ (funcall quote-fun str) str))))
res))))))
;; E.g. action=nil and it's the only completion.
(res))))))
diff --git a/lisp/composite.el b/lisp/composite.el
index 11a3d5ba388..487962ee07c 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -728,12 +728,13 @@ This function is the default value of `auto-composition-function' (which see)."
;;;###autoload
(define-minor-mode auto-composition-mode
"Toggle Auto Composition mode.
-With ARG, turn Auto Composition mode off if and only if ARG is a non-positive
-number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto
-Composition on.
+With a prefix argument ARG, enable Auto Composition mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
-When Auto Composition is enabled, text characters are automatically composed
-by functions registered in `composition-function-table' (which see).
+When Auto Composition mode is enabled, text characters are
+automatically composed by functions registered in
+`composition-function-table'.
You can use `global-auto-composition-mode' to turn on
Auto Composition mode in all buffers (this is the default)."
@@ -744,10 +745,13 @@ Auto Composition mode in all buffers (this is the default)."
;;;###autoload
(define-minor-mode global-auto-composition-mode
- "Toggle Auto-Composition mode in every possible buffer.
-With prefix arg, turn Global-Auto-Composition mode on if and only if arg
-is positive.
-See `auto-composition-mode' for more information on Auto-Composition mode."
+ "Toggle Auto Composition mode in all buffers.
+With a prefix argument ARG, enable it if ARG is positive, and
+disable it otherwise. If called from Lisp, enable it if ARG is
+omitted or nil.
+
+For more information on Auto Composition mode, see
+`auto-composition-mode' ."
:variable (default-value 'auto-composition-mode))
(defalias 'toggle-auto-composition 'auto-composition-mode)
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 705b64be89d..6d2c47f3957 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -56,8 +56,9 @@
;;;###autoload
(define-minor-mode delete-selection-mode
"Toggle Delete Selection mode.
-With prefix ARG, turn Delete Selection mode on if ARG is
-positive, off if ARG is not positive.
+With a prefix argument ARG, enable Delete Selection mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
When Delete Selection mode is enabled, Transient Mark mode is also
enabled and typed text replaces the selection if the selection is
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 7d267cec480..c175bd7c3c7 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -606,7 +606,8 @@ as well as widgets, buttons, overlays, and text properties."
'trailing-whitespace)
((and nobreak-char-display char (eq char '#xa0))
'nobreak-space)
- ((and nobreak-char-display char (eq char '#xad))
+ ((and nobreak-char-display char
+ (memq char '(#xad #x2010 #x2011)))
'escape-glyph)
((and (< char 32) (not (memq char '(9 10))))
'escape-glyph)))))
diff --git a/lisp/desktop.el b/lisp/desktop.el
index c60745a6b16..cdc787dfde9 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -147,11 +147,14 @@ backward compatibility.")
;;;###autoload
(define-minor-mode desktop-save-mode
- "Toggle desktop saving mode.
-With numeric ARG, turn desktop saving on if ARG is positive, off
-otherwise. If desktop saving is turned on, the state of Emacs is
-saved from one session to another. See variable `desktop-save'
-and function `desktop-read' for details."
+ "Toggle desktop saving (Desktop Save mode).
+With a prefix argument ARG, enable Desktop Save mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+If Desktop Save mode is enabled, the state of Emacs is saved from
+one session to another. See variable `desktop-save' and function
+`desktop-read' for details."
:global t
:group 'desktop)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 0f2cfd4973f..aaddc479b2a 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -133,16 +133,20 @@ If nil, there is no maximum size."
:group 'dired-x)
(define-minor-mode dired-omit-mode
- "Toggle Dired-Omit mode.
-With numeric ARG, enable Dired-Omit mode if ARG is positive, disable
-otherwise. Enabling and disabling is buffer-local.
-If enabled, \"uninteresting\" files are not listed.
-Uninteresting files are those whose filenames match regexp `dired-omit-files',
-plus those ending with extensions in `dired-omit-extensions'.
+ "Toggle omission of uninteresting files in Dired (Dired-Omit mode).
+With a prefix argument ARG, enable Dired-Omit mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-To enable omitting in every Dired buffer, you can put in your ~/.emacs
+Dired-Omit mode is a buffer-local minor mode. When enabled in a
+Dired buffer, Dired does not list files whose filenames match
+regexp `dired-omit-files', nor files ending with extensions in
+`dired-omit-extensions'.
- (add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1)))
+To enable omitting in every Dired buffer, you can put this in
+your init file:
+
+ (add-hook 'dired-mode-hook (lambda () (dired-omit-mode)))
See Info node `(dired-x) Omitting Variables' for more information."
:group 'dired-x
diff --git a/lisp/dired.el b/lisp/dired.el
index 60ba14ade84..3ff86869a78 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4128,7 +4128,7 @@ instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;; "dired-x" "dired-x.el" "219648338c42c7912fa336680b434db0")
+;;;;;; "dired-x" "dired-x.el" "0a19e4cb2cadf007be715af1035c9c36")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index c3dfc747772..eef8c111da5 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -183,7 +183,11 @@ and ends with a forward slash."
;;;###autoload
(define-minor-mode dirtrack-mode
- "Enable or disable Dirtrack directory tracking in a shell buffer.
+ "Toggle directory tracking in shell buffers (Dirtrack mode).
+With a prefix argument ARG, enable Dirtrack mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
This method requires that your shell prompt contain the full
current working directory at all times, and that `dirtrack-list'
is set to match the prompt. This is an alternative to
@@ -199,7 +203,7 @@ and similar commands which change the shell working directory."
(define-minor-mode dirtrack-debug-mode
- "Enable or disable Dirtrack debugging."
+ "Toggle Dirtrack debugging."
nil nil nil
(if dirtrack-debug-mode
(display-buffer (get-buffer-create dirtrack-debug-buffer))))
@@ -227,7 +231,7 @@ If directory tracking does not seem to be working, you can use the
function `dirtrack-debug-mode' to turn on debugging output."
(unless (or (null dirtrack-mode)
(eq (point) (point-min))) ; no output?
- (let (prompt-path
+ (let (prompt-path orig-prompt-path
(current-dir default-directory)
(dirtrack-regexp (nth 0 dirtrack-list))
(match-num (nth 1 dirtrack-list)))
@@ -243,8 +247,9 @@ function `dirtrack-debug-mode' to turn on debugging output."
(if (not (> (length prompt-path) 0))
(dirtrack-debug-message "Match is empty string")
;; Transform prompts into canonical forms
- (setq prompt-path (funcall dirtrack-directory-function
- prompt-path)
+ (setq orig-prompt-path (funcall dirtrack-directory-function
+ prompt-path)
+ prompt-path (shell-prefixed-directory-name orig-prompt-path)
current-dir (funcall dirtrack-canonicalize-function
current-dir))
(dirtrack-debug-message
@@ -257,8 +262,9 @@ function `dirtrack-debug-mode' to turn on debugging output."
;; It's possible that Emacs will think the directory
;; won't exist (eg, rlogin buffers)
(if (file-accessible-directory-p prompt-path)
- ;; Change directory
- (and (shell-process-cd prompt-path)
+ ;; Change directory. shell-process-cd adds the prefix, so we
+ ;; need to give it the original (un-prefixed) path.
+ (and (shell-process-cd orig-prompt-path)
(run-hooks 'dirtrack-directory-change-hook)
(dirtrack-debug-message
(format "Changing directory to %s" prompt-path)))
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 872b2172c7e..ceaad83cd7c 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1502,8 +1502,11 @@ to the next best mode."
;;;###autoload
(define-minor-mode doc-view-minor-mode
- "Toggle Doc view minor mode.
-With arg, turn Doc view minor mode on if arg is positive, off otherwise.
+ "Toggle displaying buffer via Doc View (Doc View minor mode).
+With a prefix argument ARG, enable Doc View minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
See the command `doc-view-mode' for more information on this mode."
nil " DocView" doc-view-minor-mode-map
:group 'doc-view
diff --git a/lisp/double.el b/lisp/double.el
index 4aa8da72af7..2a845f61942 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -146,12 +146,13 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
;;;###autoload
(define-minor-mode double-mode
- "Toggle Double mode.
-With prefix argument ARG, turn Double mode on if ARG is positive, otherwise
-turn it off.
+ "Toggle special insertion on double keypresses (Double mode).
+With a prefix argument ARG, enable Double mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-When Double mode is on, some keys will insert different strings
-when pressed twice. See variable `double-map' for details."
+When Double mode is enabled, some keys will insert different
+strings when pressed twice. See `double-map' for details."
:lighter " Double"
:link '(emacs-commentary-link "double")
(kill-local-variable 'key-translation-map)
diff --git a/lisp/electric.el b/lisp/electric.el
index 17c33c7d5cd..26fba20ea12 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -241,8 +241,14 @@ Returns nil when we can't find this char."
;;;###autoload
(define-minor-mode electric-indent-mode
- "Automatically reindent lines of code when inserting particular chars.
-`electric-indent-chars' specifies the set of chars that should cause reindentation."
+ "Toggle on-the-fly reindentation (Electric Indent mode).
+With a prefix argument ARG, enable Electric Indent mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Electric Indent mode is a global minor mode. When enabled,
+reindentation is triggered whenever you insert a character listed
+in `electric-indent-chars'."
:global t
:group 'electricity
(if electric-indent-mode
@@ -330,7 +336,14 @@ This can be convenient for people who find it easier to hit ) than C-f."
;;;###autoload
(define-minor-mode electric-pair-mode
- "Automatically pair-up parens when inserting an open paren."
+ "Toggle automatic parens pairing (Electric Pair mode).
+With a prefix argument ARG, enable Electric Pair mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Electric Pair mode is a global minor mode. When enabled, typing
+an open parenthesis automatically inserts the corresponding
+closing parenthesis. \(Likewise for brackets, etc.)"
:global t
:group 'electricity
(if electric-pair-mode
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 7eb6e6ef765..c9e32023187 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1237,9 +1237,10 @@ generating a buffered list of errors."
;;;###autoload
(define-minor-mode checkdoc-minor-mode
- "Toggle Checkdoc minor mode, a mode for checking Lisp doc strings.
-With prefix ARG, turn Checkdoc minor mode on if ARG is positive, otherwise
-turn it off.
+ "Toggle automatic docstring checking (Checkdoc minor mode).
+With a prefix argument ARG, enable Checkdoc minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
In Checkdoc minor mode, the usual bindings for `eval-defun' which is
bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 46dc1f162ba..b1cb0615e43 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -350,14 +350,16 @@ call another major mode in their body."
(define-minor-mode ,global-mode
;; Very short lines to avoid too long lines in the generated
;; doc string.
- ,(format "Toggle %s in every possible buffer.
-With prefix ARG, turn %s on if and only if
-ARG is positive.
+ ,(format "Toggle %s in all buffers.
+With prefix ARG, enable %s if ARG is positive;
+otherwise, disable it. If called from Lisp, enable the mode if
+ARG is omitted or nil.
+
%s is enabled in all buffers where
\`%s' would do it.
See `%s' for more information on %s."
- pretty-name pretty-global-name pretty-name turn-on
- mode pretty-name)
+ pretty-name pretty-global-name
+ pretty-name turn-on mode pretty-name)
:global t ,@group ,@(nreverse extra-keywords)
;; Setup hook to handle future mode changes and new buffers.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index cd9b779bee9..901b6d1bf6a 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -149,14 +149,17 @@ This is used to determine if `eldoc-idle-delay' is changed by the user.")
;;;###autoload
(define-minor-mode eldoc-mode
- "Toggle ElDoc mode on or off.
-In ElDoc mode, the echo area displays information about a
-function or variable in the text where point is. If point is
-on a documented variable, it displays the first line of that
-variable's doc string. Otherwise it displays the argument list
-of the function called in the expression point is on.
-
-With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
+ "Toggle echo area display of Lisp objects at point (ElDoc mode).
+With a prefix argument ARG, enable ElDoc mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable ElDoc mode
+if ARG is omitted or nil.
+
+ElDoc mode is a buffer-local minor mode. When enabled, the echo
+area displays information about a function or variable in the
+text where point is. If point is on a documented variable, it
+displays the first line of that variable's doc string. Otherwise
+it displays the argument list of the function called in the
+expression point is on."
:group 'eldoc :lighter eldoc-minor-mode-string
(setq eldoc-last-message nil)
(if eldoc-mode
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 18411f7d2ef..f2c93473015 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -176,14 +176,16 @@ Return a value appropriate for `kill-buffer-query-functions' (which see)."
;;;###autoload
(define-minor-mode emacs-lock-mode
- "Toggle Emacs Lock mode in the current buffer.
-
-With \\[universal-argument], ask for the locking mode to be used.
-With other prefix ARG, turn mode on if ARG is positive, off otherwise.
-
-Initially, if the user does not pass an explicit locking mode, it defaults
-to `emacs-lock-default-locking-mode' (which see); afterwards, the locking
-mode most recently set on the buffer is used instead.
+ "Toggle Emacs Lock mode in the current buffer.
+If called with a plain prefix argument, ask for the locking mode
+to be used. With any other prefix ARG, turn mode on if ARG is
+positive, off otherwise. If called from Lisp, enable the mode if
+ARG is omitted or nil.
+
+Initially, if the user does not pass an explicit locking mode, it
+defaults to `emacs-lock-default-locking-mode' (which see);
+afterwards, the locking mode most recently set on the buffer is
+used instead.
When called from Elisp code, ARG can be any locking mode:
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index b2806e8f8eb..567a57949b3 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -349,8 +349,10 @@ normal CRiSP binding) and when it is nil M-x will run
;;;###autoload
(define-minor-mode crisp-mode
- "Toggle CRiSP/Brief emulation minor mode.
-With ARG, turn CRiSP mode on if ARG is positive, off otherwise."
+ "Toggle CRiSP/Brief emulation (CRiSP mode).
+With a prefix argument ARG, enable CRiSP mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil."
:keymap crisp-mode-map
:lighter crisp-mode-modeline-string
(when crisp-mode
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index b643d521ad6..9a50352d507 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1121,7 +1121,7 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark."
(pop-to-mark-command)))
((and cua-toggle-set-mark mark-active)
(cua--deactivate)
- (message "Mark Cleared"))
+ (message "Mark cleared"))
(t
(push-mark-command nil nil)
(setq cua--explicit-region-start t)
@@ -1531,16 +1531,17 @@ If ARG is the atom `-', scroll upward by nearly full screen."
;;;###autoload
(define-minor-mode cua-mode
- "Toggle CUA key-binding mode.
-When enabled, using shifted movement keys will activate the
-region (and highlight the region using `transient-mark-mode'),
-and typed text replaces the active selection.
-
-Also when enabled, you can use C-z, C-x, C-c, and C-v to undo,
-cut, copy, and paste in addition to the normal Emacs bindings.
-The C-x and C-c keys only do cut and copy when the region is
-active, so in most cases, they do not conflict with the normal
-function of these prefix keys.
+ "Toggle Common User Access style editing (CUA mode).
+With a prefix argument ARG, enable CUA mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+CUA mode is a global minor mode. When enabled, typed text
+replaces the active selection, and you can use C-z, C-x, C-c, and
+C-v to undo, cut, copy, and paste in addition to the normal Emacs
+bindings. The C-x and C-c keys only do cut and copy when the
+region is active, so in most cases, they do not conflict with the
+normal function of these prefix keys.
If you really need to perform a command which starts with one of
the prefix keys even when the region is active, you have three
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el
index 652ab19ba65..ea036e836e4 100644
--- a/lisp/epa-hook.el
+++ b/lisp/epa-hook.el
@@ -49,7 +49,7 @@ does that automatically."
:group 'epa-file)
(defvar epa-file-encrypt-to nil
- "*Recipient(s) used for encrypting files.
+ "Recipient(s) used for encrypting files.
May either be a string or a list of strings.")
(put 'epa-file-encrypt-to 'safe-local-variable
@@ -83,9 +83,10 @@ May either be a string or a list of strings.")
(auto-save-mode 0)))
(define-minor-mode auto-encryption-mode
- "Toggle automatic file encryption and decryption.
-With prefix argument ARG, turn auto encryption on if positive, else off.
-Return the new status of auto encryption (non-nil means on)."
+ "Toggle automatic file encryption/decryption (Auto Encryption mode).
+With a prefix argument ARG, enable Auto Encryption mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:global t :init-value t :group 'epa-file :version "23.1"
;; We'd like to use custom-initialize-set here so the setup is done
;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 7c7f10de2c8..d72d3f51bb1 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,11 @@
+2011-10-20 Chong Yidong <cyd@gnu.org>
+
+ * erc.el (define-erc-module): Fix autogenerated docstring to
+ reflect Emacs 24 minor mode changes.
+
+ * erc-fill.el (erc-fill-mode):
+ * erc-track.el (erc-track-minor-mode): Doc fix.
+
2011-09-23 Antoine Levitt <antoine.levitt@gmail.com>
* erc-button.el (erc-button-next-function): Scoping fix
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 0b9a4051d65..3940cfbc9a4 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -39,9 +39,12 @@
;;;###autoload (autoload 'erc-fill-mode "erc-fill" nil t)
(erc-define-minor-mode erc-fill-mode
"Toggle ERC fill mode.
-With numeric arg, turn ERC fill mode on if and only if arg is
-positive. In ERC fill mode, messages in the channel buffers are
-filled."
+With a prefix argument ARG, enable ERC fill mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+ERC fill mode is a global minor mode. When enabled, messages in
+the channel buffers are filled."
nil nil nil
:global t :group 'erc-fill
(if erc-fill-mode
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 28c1ced91c6..b663aeed423 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -588,12 +588,15 @@ START is the minimum length of the name used."
;;;###autoload
(define-minor-mode erc-track-minor-mode
- "Global minor mode for tracking ERC buffers and showing activity in the
-mode line.
-
-This exists for the sole purpose of providing the C-c C-SPC and
-C-c C-@ keybindings. Make sure that you have enabled the track
-module, otherwise the keybindings will not do anything useful."
+ "Toggle mode line display of ERC activity (ERC Track minor mode).
+With a prefix argument ARG, enable ERC Track minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+ERC Track minor mode is a global minor mode. It exists for the
+sole purpose of providing the C-c C-SPC and C-c C-@ keybindings.
+Make sure that you have enabled the track module, otherwise the
+keybindings will not do anything useful."
:init-value nil
:lighter ""
:keymap erc-track-minor-mode-map
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a4040b239c1..2d8c2565f69 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1242,7 +1242,9 @@ Example:
(erc-define-minor-mode
,mode
,(format "Toggle ERC %S mode.
-With arg, turn ERC %S mode on if and only if arg is positive.
+With a prefix argument ARG, enable %s if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
%s" name name doc)
nil nil nil
:global ,(not local-p) :group (quote ,group)
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 9e5ab58636b..bfd973a299f 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -204,7 +204,7 @@ Each positive or negative step scales the default face height by this amount."
(make-variable-buffer-local 'text-scale-mode-amount)
(define-minor-mode text-scale-mode
- "Minor mode for displaying buffer text in a larger/smaller font than usual.
+ "Minor mode for displaying buffer text in a larger/smaller font.
The amount of scaling is determined by the variable
`text-scale-mode-amount': one step scales the global default
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index a18b892efe8..54b17d58f33 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -639,8 +639,15 @@ a list of colors that the current display can handle."
(l list))
(while (cdr l)
(if (and (facemenu-color-equal (car (car l)) (car (car (cdr l))))
- (not (if (fboundp 'w32-default-color-map)
- (not (assoc (car (car l)) (w32-default-color-map))))))
+ ;; On MS-Windows, there are logical colors that might have
+ ;; the same value but different names and meanings. For
+ ;; example, `SystemMenuText' (the color w32 uses for the
+ ;; text in menu entries) and `SystemWindowText' (the default
+ ;; color w32 uses for the text in windows and dialogs) may
+ ;; be the same display color and be adjacent in the list.
+ ;; This makes them different to any other color. Bug#9722
+ (not (and (eq system-type 'windows-nt)
+ (string-match-p "^System" (car (car l))))))
(progn
(setcdr (car l) (cons (car (car (cdr l))) (cdr (car l))))
(setcdr l (cdr (cdr l))))
diff --git a/lisp/faces.el b/lisp/faces.el
index d5f0ef90ee0..45173eb35da 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2366,6 +2366,10 @@ used to display the prompt text."
'((((background light)) :background "black")
(((background dark)) :background "white"))
"Basic face for the cursor color under X.
+Currently, only the `:background' attribute is meaningful; all
+other attributes are ignored. The cursor foreground color is
+taken from the background color of the underlying text.
+
Note: Other faces cannot inherit from the cursor face."
:version "21.1"
:group 'cursor
diff --git a/lisp/files.el b/lisp/files.el
index 6321cff91fd..3ed9bd5a272 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4700,11 +4700,7 @@ and `view-read-only' is non-nil, enter view mode."
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
(t (setq buffer-read-only (not buffer-read-only))
- (force-mode-line-update)))
- (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
- (message "%s" (substitute-command-keys
- (concat "File is under version-control; "
- "use \\[vc-next-action] to check in/out"))))))
+ (force-mode-line-update)))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
diff --git a/lisp/follow.el b/lisp/follow.el
index 94a542f1016..37295cc533b 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -484,10 +484,13 @@ Used by `follow-window-size-change'.")
(put 'follow-mode 'permanent-local t)
;;;###autoload
(define-minor-mode follow-mode
- "Minor mode that combines windows into one tall virtual window.
+ "Toggle Follow mode.
+With a prefix argument ARG, enable Follow mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-The feeling of a \"virtual window\" has been accomplished by the use
-of two major techniques:
+Follow mode is a minor mode that combines windows into one tall
+virtual window. This is accomplished by two main techniques:
* The windows always displays adjacent sections of the buffer.
This means that whenever one window is moved, all the
diff --git a/lisp/font-core.el b/lisp/font-core.el
index fcaaf33b718..0db17efd7b7 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -86,12 +86,12 @@ It will be passed one argument, which is the current value of
;; The mode for which font-lock was initialized, or nil if none.
(defvar font-lock-major-mode)
+
(define-minor-mode font-lock-mode
- "Toggle Font Lock mode.
-With arg, turn Font Lock mode off if and only if arg is a non-positive
-number; if arg is nil, toggle Font Lock mode; anything else turns Font
-Lock on.
-\(Font Lock is also known as \"syntax highlighting\".)
+ "Toggle syntax highlighting in this buffer (Font Lock mode).
+With a prefix argument ARG, enable Font Lock mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
When Font Lock mode is enabled, text is fontified as you type it:
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index c37a9ae916e..2f4b7413dcc 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -228,8 +228,11 @@
;; User variables.
(defcustom font-lock-maximum-size 256000
- "Maximum size of a buffer for buffer fontification.
-Only buffers less than this can be fontified when Font Lock mode is turned on.
+ "Maximum buffer size for unsupported buffer fontification.
+When `font-lock-support-mode' is nil, only buffers smaller than
+this are fontified. This variable has no effect if a Font Lock
+support mode (usually `jit-lock-mode') is enabled.
+
If nil, means size is irrelevant.
If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
where MAJOR-MODE is a symbol or t (meaning the default). For example:
@@ -248,6 +251,7 @@ for buffers in Rmail mode, and size is irrelevant otherwise."
(const :tag "none" nil)
(integer :tag "size")))))
:group 'font-lock)
+(make-obsolete-variable 'font-lock-maximum-size nil "24.1")
(defcustom font-lock-maximum-decoration t
"Maximum decoration level for fontification.
diff --git a/lisp/frame.el b/lisp/frame.el
index ab9b085f1d9..8359fed14a4 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1134,7 +1134,10 @@ To get the frame's current border color, use `frame-parameters'."
(define-minor-mode auto-raise-mode
"Toggle whether or not the selected frame should auto-raise.
-With ARG, turn auto-raise mode on if and only if ARG is positive.
+With a prefix argument ARG, enable Auto Raise mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
Note that this controls Emacs's own auto-raise feature.
Some window managers allow you to enable auto-raise for certain windows.
You can use that for Emacs windows if you wish, but if you do,
@@ -1145,7 +1148,10 @@ that is beyond the control of Emacs and this command has no effect on it."
(define-minor-mode auto-lower-mode
"Toggle whether or not the selected frame should auto-lower.
-With ARG, turn auto-lower mode on if and only if ARG is positive.
+With a prefix argument ARG, enable Auto Lower mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
Note that this controls Emacs's own auto-lower feature.
Some window managers allow you to enable auto-lower for certain windows.
You can use that for Emacs windows if you wish, but if you do,
@@ -1556,14 +1562,13 @@ itself as a pre-command hook."
(setq blink-cursor-timer nil)))
(define-minor-mode blink-cursor-mode
- "Toggle blinking cursor mode.
-With a numeric argument, turn blinking cursor mode on if ARG is positive,
-otherwise turn it off. When blinking cursor mode is enabled, the
-cursor of the selected window blinks.
-
-Note that this command is effective only when Emacs
-displays through a window system, because then Emacs does its own
-cursor display. On a text-only terminal, this is not implemented."
+ "Toggle cursor blinking (Blink Cursor mode).
+With a prefix argument ARG, enable Blink Cursor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+This command is effective only on graphical frames. On text-only
+terminals, cursor blinking is controlled by the terminal."
:init-value (not (or noninteractive
no-blinking-cursor
(eq system-type 'ms-dos)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index cc2568a3647..592d0671c26 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,9 +1,47 @@
+2011-10-20 Chong Yidong <cyd@gnu.org>
+
+ * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
+ calling a minor mode from Lisp with nil arg enables it, so we have to
+ make the working a bit ambiguous here).
+
+2011-10-18 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-util.el (gnus-bound-and-true-p): Macro for XEmacs compatibility.
+ * nnir.el (nnir-mode): Use it.
+ * nnmairix.el (nnmairix-determine-original-group-from-registry):
+ Use it.
+
+ * nnir.el (gnus-registry-enabled): Defvar to keep the compiler happy.
+ * nnmairix.el (gnus-registry-enabled): Ditto.
+
+2011-10-17 Dave Abrahams <dave@boostpro.com>
+
+ * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691)
+ (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
+ only while we need to find out if it should be t or nil.
+ (gnus-registry-initialize): Don't set `gnus-registry-install' to t.
+ (gnus-registry-install-hooks): Set `gnus-registry-enabled' to t when
+ the registry is installed. Set it to nil when it's unloaded.
+ (gnus-registry-install-p): Provide user guidance for the initial value
+ of `gnus-registry-install' when it's 'ask, otherwise return its value.
+ * nnregistry.el (nnregistry-open-server, nnregistry-server-opened):
+ Use `gnus-registry-enabled' instead of `gnus-registry-install'.
+ * nnmairix.el (nnmairix-determine-original-group-from-registry):
+ Use `gnus-registry-enabled' instead of `gnus-registry-install'.
+ * nnir.el (nnir-mode): Use `gnus-registry-enabled' instead of
+ `gnus-registry-install'.
+
2011-10-17 Daiki Ueno <ueno@unixuser.org>
+ * mml2015.el (mml2015-epg-find-usable-key): Add comment about the
+ previous change.
+ * mml1991.el (mml1991-epg-find-usable-key): Skip the whole key if the
+ primary key is marked as disabled.
+
+2011-10-17 Christian von Roques <roques@mti.ag> (tiny change)
+
* mml2015.el (mml2015-epg-find-usable-key): Skip the whole key if the
primary key is marked as disabled.
- * mml1991.el (mml1991-epg-find-usable-key): Ditto.
- Thanks to Christian von Roques <roques@mti.ag>.
2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
@@ -13071,13 +13109,11 @@
(mml-secure-cache-passphrase): New user option.
(mml-secure-passphrase-cache-expiry): New user option.
-2006-07-24 Daiki Ueno <ueno@unixuser.org>
+2006-07-24 David Smith <davidsmith@acm.org> (tiny change)
+ Andreas Vögele <andreas@altroot.de> (tiny change)
- * pgg-def.el (pgg-truncate-key-identifier): Truncate the key ID to 8
- letters from the end. Thanks to "David Smith" <davidsmith@acm.org> and
- andreas@altroot.de (Andreas Vögele).
-
- FIXME: Use `tiny change'?
+ * pgg-def.el (pgg-truncate-key-identifier):
+ Truncate the key ID to 8 letters from the end.
2006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
@@ -19773,7 +19809,7 @@
* dns.el (dns-read-type): Add support for SVR. (small patch)
-2004-05-20 Teodor Zlatanov <tzz@lifelogs.com>
+2004-05-20 Adam Sjøgren <asjo@koldfront.dk>
* spam.el (spam-use-crm114, spam-crm114, spam-crm114-program)
(spam-crm114-header, spam-crm114-spam-switch)
@@ -19790,7 +19826,8 @@
(spam-crm114-unregister-spam-routine)
(spam-crm114-register-ham-routine)
(spam-crm114-unregister-ham-routine): Add CRM114 support.
- From asjo@koldfront.dk (Adam Sjøgren).
+
+2004-05-20 Teodor Zlatanov <tzz@lifelogs.com>
* gnus.el: Add spam-use-crm114.
@@ -19927,10 +19964,13 @@
2004-05-18 Reiner Steib <Reiner.Steib@gmx.de>
+ * gnus-picon.el (gnus-picon-insert-glyph):
+ Add optional `nostring' argument.
+
+2004-05-18 Jesper Harder <harder@ifa.au.dk>
+
* gnus-picon.el (gnus-picon-style): New variable.
- (gnus-picon-insert-glyph): Add optional `nostring' argument.
(gnus-picon-transform-address): Support `gnus-picon-style'.
- From Jesper Harder <harder@ifa.au.dk>.
2004-05-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -20189,13 +20229,10 @@
* spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage.
Use mapc when appropriate.
-2004-04-22 Teodor Zlatanov <tzz@lifelogs.com>
-
- FIXME: Make separate entries for each person.
-
- From Dan Christensen <jdc@uwo.ca>, asjo@koldfront.dk (Adam
- Sjøgren), Wes Hardaker <wes@hardakers.net>, and Michael Shields
- <shields@msrl.com>:
+2004-04-22 Dan Christensen <jdc@uwo.ca>
+ Adam Sjøgren <asjo@koldfront.dk>
+ Wes Hardaker <wes@hardakers.net>
+ Michael Shields <shields@msrl.com>
* spam.el (spam-necessary-extra-headers): Get the extra headers we
may need for spam sorting and scoring.
@@ -20205,7 +20242,7 @@
sorting.
(spam-extra-header-to-number): Add function to get a score from a
header.
- (spam-summary-score): Add function to get a numeric score from the
+ (spam-summary-score): Add function to get a numeric score from the
headers.
(spam-generic-score): Fix function doc, was in wrong place.
(spam-initialize): Take symbols when it's run, and install the
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index d205437b811..7c36311356f 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1224,13 +1224,8 @@ Returns nil if there is no such line before LIMIT, t otherwise."
(autoload 'font-lock-set-defaults "font-lock")))
(define-minor-mode gnus-message-citation-mode
- "Toggle `gnus-message-citation-mode' in current buffer.
-This buffer local minor mode provides additional font-lock support for
-nested citations.
-With prefix ARG, turn `gnus-message-citation-mode' on if and only if ARG
-is positive.
-Automatically turn `font-lock-mode' on when `gnus-message-citation-mode'
-is turned on."
+ "Minor mode providing more font-lock support for nested citations.
+When enabled, it automatically turns on `font-lock-mode'."
nil ;; init-value
"" ;; lighter
nil ;; keymap
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f8ff52f128f..652e816e56a 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -164,6 +164,8 @@ nnmairix groups are specifically excluded because they are ephemeral."
(const :tag "Always Install" t)
(const :tag "Ask Me" ask)))
+(defvar gnus-registry-enabled)
+
(defvar gnus-summary-misc-menu) ;; Avoid byte compiler warning.
(defvar gnus-registry-misc-menus nil) ; ugly way to keep the menus
@@ -873,8 +875,9 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
;; if this is called and the user doesn't want the
;; registry enabled, we'll ask anyhow
- (when (eq gnus-registry-install nil)
- (setq gnus-registry-install 'ask))
+ (unless gnus-registry-install
+ (let ((gnus-registry-install 'ask))
+ (gnus-registry-install-p)))
;; now the user is asked if gnus-registry-install is 'ask
(when (gnus-registry-install-p)
@@ -1151,7 +1154,6 @@ only the last one's marks are returned."
"Initialize the Gnus registry."
(interactive)
(gnus-message 5 "Initializing the registry")
- (setq gnus-registry-install t) ; in case it was 'ask or nil
(gnus-registry-install-hooks)
(gnus-registry-install-shortcuts)
(gnus-registry-read))
@@ -1160,6 +1162,7 @@ only the last one's marks are returned."
(defun gnus-registry-install-hooks ()
"Install the registry hooks."
(interactive)
+ (setq gnus-registry-enabled t)
(add-hook 'gnus-summary-article-move-hook 'gnus-registry-action)
(add-hook 'gnus-summary-article-delete-hook 'gnus-registry-action)
(add-hook 'gnus-summary-article-expire-hook 'gnus-registry-action)
@@ -1181,23 +1184,25 @@ only the last one's marks are returned."
(remove-hook 'gnus-save-newsrc-hook 'gnus-registry-save)
(remove-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read)
- (remove-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids))
+ (remove-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids)
+ (setq gnus-registry-enabled nil))
(add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook)
(defun gnus-registry-install-p ()
+ "If the registry is not already enabled, and `gnus-registry-install' is t,
+the registry is enabled. If `gnus-registry-install' is `ask',
+the user is asked first. Returns non-nil iff the registry is enabled."
(interactive)
- (when (eq gnus-registry-install 'ask)
- (setq gnus-registry-install
- (gnus-y-or-n-p
- (concat "Enable the Gnus registry? "
- "See the variable `gnus-registry-install' "
- "to get rid of this query permanently. ")))
- (when gnus-registry-install
- ;; we just set gnus-registry-install to t, so initialize the registry!
+ (unless gnus-registry-enabled
+ (when (if (eq gnus-registry-install 'ask)
+ (gnus-y-or-n-p
+ (concat "Enable the Gnus registry? "
+ "See the variable `gnus-registry-install' "
+ "to get rid of this query permanently. "))
+ gnus-registry-install)
(gnus-registry-initialize)))
-;;; we could call it here: (customize-variable 'gnus-registry-install)
- gnus-registry-install)
+ gnus-registry-enabled)
;; TODO: a few things
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index e9d6ba423fd..9c5e6e8312b 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1986,6 +1986,14 @@ definitions to shadow the loaded ones for use in file byte-compilation."
(gnus-macroexpand-all expanded environment)))
form))))
+(eval-when-compile
+ ;; This is unnecessary in the compiled version as it is a macro.
+ (if (fboundp 'bound-and-true-p)
+ (defalias 'gnus-bound-and-true-p 'bound-and-true-p)
+ (defmacro gnus-bound-and-true-p (var)
+ "Return the value of symbol VAR if it is bound, else nil."
+ `(and (boundp (quote ,var)) ,var))))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 0be6a17d50e..2d3c05864e8 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -290,9 +290,10 @@ is `(valuefunc member)'."
(autoload 'nnimap-command "nnimap")
(autoload 'nnimap-possibly-change-group "nnimap")
(autoload 'nnimap-make-thread-query "nnimap")
- (autoload 'gnus-registry-action "gnus-registry")
- (defvar gnus-registry-install))
+ (autoload 'gnus-registry-action "gnus-registry"))
+;; Suppress byte-compiler warning `reference to free variable'
+(defvar gnus-registry-enabled)
(nnoo-declare nnir)
(nnoo-define-basics nnir)
@@ -1741,8 +1742,7 @@ environment unless `not-global' is non-nil."
(when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
(setq gnus-summary-line-format
(or nnir-summary-line-format gnus-summary-line-format))
- (when (and (boundp 'gnus-registry-install)
- (eq gnus-registry-install t))
+ (when (gnus-bound-and-true-p gnus-registry-enabled)
(remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 3d1ac02b6aa..1bf28c5d32f 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -603,9 +603,11 @@ Other back ends might or might not work.")
nil))
;; Silence byte-compiler.
-(defvar gnus-registry-install)
(autoload 'gnus-registry-get-id-key "gnus-registry")
+;; Suppress byte-compiler warning `reference to free variable'
+(defvar gnus-registry-enabled)
+
(deffoo nnmairix-request-set-mark (group actions &optional server)
(when server
(nnmairix-open-server server))
@@ -1636,8 +1638,7 @@ search in raw mode."
(defun nnmairix-determine-original-group-from-registry (mid)
"Try to determinale original group for message-id MID from the registry."
- (when (and (boundp 'gnus-registry-install)
- gnus-registry-install)
+ (when (gnus-bound-and-true-p gnus-registry-enabled)
(unless (string-match "^<" mid)
(set mid (concat "<" mid)))
(unless (string-match ">$" mid)
diff --git a/lisp/gnus/nnregistry.el b/lisp/gnus/nnregistry.el
index 359050c356c..75a640a428a 100644
--- a/lisp/gnus/nnregistry.el
+++ b/lisp/gnus/nnregistry.el
@@ -36,8 +36,11 @@
(nnoo-declare nnregistry)
+;; Suppress byte-compiler warning `reference to free variable'
+(defvar gnus-registry-enabled)
+
(deffoo nnregistry-server-opened (server)
- (eq gnus-registry-install t))
+ gnus-registry-enabled)
(deffoo nnregistry-close-server (server)
t)
@@ -46,7 +49,7 @@
nil)
(deffoo nnregistry-open-server (server &optional defs)
- (eq gnus-registry-install t))
+ gnus-registry-enabled)
(defvar nnregistry-within-nnregistry nil)
diff --git a/lisp/help.el b/lisp/help.el
index e2af0759a65..508a4e3262c 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -977,13 +977,15 @@ function is called, the window to be resized is selected."
:version "20.4")
(define-minor-mode temp-buffer-resize-mode
- "Toggle mode which makes windows smaller for temporary buffers.
-With prefix argument ARG, turn the resizing of windows displaying
-temporary buffers on if ARG is positive or off otherwise.
-
-This mode makes a window the right height for its contents, but
-never more than `temp-buffer-max-height' nor less than
-`window-min-height'.
+ "Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode).
+With a prefix argument ARG, enable Temp Buffer Resize mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+When Temp Buffer Resize mode is enabled, the windows in which we
+show a temporary buffer are automatically reduced in height to
+fit the buffer's contents, but never more than
+`temp-buffer-max-height' nor less than `window-min-height'.
This mode is used by `help', `apropos' and `completion' buffers,
and some others."
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index a254abe33ac..f659a7e8eef 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -283,14 +283,17 @@ a library is being loaded.")
;;;###autoload
(define-minor-mode hi-lock-mode
- "Toggle minor mode for interactively adding font-lock highlighting patterns.
-
-If ARG positive, turn hi-lock on. Issuing a hi-lock command will also
-turn hi-lock on. To turn hi-lock on in all buffers use
-`global-hi-lock-mode' or in your .emacs file (global-hi-lock-mode 1).
-When hi-lock is turned on, a \"Regexp Highlighting\" submenu is added
-to the \"Edit\" menu. The commands in the submenu, which can be
-called interactively, are:
+ "Toggle selective highlighting of patterns (Hi Lock mode).
+With a prefix argument ARG, enable Hi Lock mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Issuing one the highlighting commands listed below will
+automatically enable Hi Lock mode. To enable Hi Lock mode in all
+buffers, use `global-hi-lock-mode' or add (global-hi-lock-mode 1)
+to your init file. When Hi Lock mode is enabled, a \"Regexp
+Highlighting\" submenu is added to the \"Edit\" menu. The
+commands in the submenu, which can be called interactively, are:
\\[highlight-regexp] REGEXP FACE
Highlight matches of pattern REGEXP in current buffer with FACE.
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 041c1ee938b..46db4280688 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -326,14 +326,15 @@ remove it from existing buffers."
;;;###autoload
(define-minor-mode highlight-changes-mode
- "Toggle Highlight Changes mode.
+ "Toggle highlighting changes in this buffer (Highlight Changes mode).
+With a prefix argument ARG, enable Highlight Changes mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
-With ARG, turn Highlight Changes mode on if and only if arg is positive.
-
-In Highlight Changes mode changes are recorded with a text property.
-Normally they are displayed in a distinctive face, but command
-\\[highlight-changes-visible-mode] can be used to toggles this
-on and off.
+When Highlight Changes is enabled, changes are marked with a text
+property. Normally they are displayed in a distinctive face, but
+command \\[highlight-changes-visible-mode] can be used to toggles
+this on and off.
Other functions for buffers in this mode include:
\\[highlight-changes-next-change] - move point to beginning of next change
@@ -366,14 +367,17 @@ buffer with the contents of a file
;;;###autoload
(define-minor-mode highlight-changes-visible-mode
- "Toggle visiblility of changes when buffer is in Highlight Changes mode.
+ "Toggle visiblility of highlighting due to Highlight Changes mode.
+With a prefix argument ARG, enable Highlight Changes Visible mode
+if ARG is positive, and disable it otherwise. If called from
+Lisp, enable the mode if ARG is omitted or nil.
-This mode only has an effect when Highlight Changes mode is on.
-It allows toggling between whether or not the changed text is displayed
+Highlight Changes Visible mode only has an effect when Highlight
+Changes mode is on. When enabled, the changed text is displayed
in a distinctive face.
The default value can be customized with variable
-`highlight-changes-visibility-initial-state'
+`highlight-changes-visibility-initial-state'.
This command does not itself set highlight-changes mode."
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 846f5f95187..b535398f107 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -124,10 +124,13 @@ This variable is expected to be made buffer-local by modes.")
;;;###autoload
(define-minor-mode hl-line-mode
- "Buffer-local minor mode to highlight the line about point.
-With ARG, turn Hl-Line mode on if ARG is positive, off otherwise.
+ "Toggle highlighting of the current line (Hl-Line mode).
+With a prefix argument ARG, enable Hl-Line mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-If `hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the
+Hl-Line mode is a buffer-local minor mode. If
+`hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the
line about the buffer's point in all windows. Caveat: the
buffer's point might be different from the point of a
non-selected window. Hl-Line mode uses the function
@@ -171,8 +174,10 @@ addition to `hl-line-highlight' on `post-command-hook'."
;;;###autoload
(define-minor-mode global-hl-line-mode
- "Global minor mode to highlight the line about point in the current window.
-With ARG, turn Global-Hl-Line mode on if ARG is positive, off otherwise.
+ "Toggle line highlighting in all buffers (Global Hl-Line mode).
+With a prefix argument ARG, enable Global Hl-Line mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
highlights the line about the current buffer's point in all
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 073efaeee2a..6c8db872c0b 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -217,8 +217,10 @@ Currently, this only applies to `ibuffer-saved-filters' and
;;;###autoload
(define-minor-mode ibuffer-auto-mode
- "Toggle use of Ibuffer's auto-update facility.
-With numeric ARG, enable auto-update if and only if ARG is positive."
+ "Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode).
+With a prefix argument ARG, enable Ibuffer Auto mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
nil nil nil
(unless (derived-mode-p 'ibuffer-mode)
(error "This buffer is not in Ibuffer mode"))
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 5a86508e144..17ddddbd17a 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2648,12 +2648,14 @@ will be inserted before the group at point."
;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
-;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "617b36fc8479547d679cf0103f82e3ff")
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "25e69a1e030791b3a3e7d91d4377173a")
;;; Generated autoloads from ibuf-ext.el
(autoload 'ibuffer-auto-mode "ibuf-ext" "\
-Toggle use of Ibuffer's auto-update facility.
-With numeric ARG, enable auto-update if and only if ARG is positive.
+Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode).
+With a prefix argument ARG, enable Ibuffer Auto mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
\(fn &optional ARG)" t nil)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index bdd19194c22..53876f48a06 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -172,9 +172,10 @@ except those on this list.")
;;;_ > icomplete-mode (&optional prefix)
;;;###autoload
(define-minor-mode icomplete-mode
- "Toggle incremental minibuffer completion for this Emacs session.
-With a numeric argument, turn Icomplete mode on if ARG is positive,
-otherwise turn it off."
+ "Toggle incremental minibuffer completion (Icomplete mode).
+With a prefix argument ARG, enable Icomplete mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:global t :group 'icomplete
(if icomplete-mode
;; The following is not really necessary after first time -
diff --git a/lisp/ido.el b/lisp/ido.el
index 46ac5784d0e..88599013ce6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -461,12 +461,6 @@ See `ido-default-file-method' for details."
(const :tag "Show in other frame" other-frame)
(const :tag "Ask to show in other frame" maybe-frame)
(const :tag "Raise frame if already shown" raise-frame))
- :type '(choice (const selected-window)
- (const other-window)
- (const display)
- (const other-frame)
- (const maybe-frame)
- (const raise-frame))
:group 'ido)
(defcustom ido-enable-flex-matching nil
@@ -1475,8 +1469,10 @@ Removes badly formatted data and ignored directories."
(add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
(define-minor-mode ido-everywhere
- "Toggle using ido-mode everywhere file and directory names are read.
-With ARG, turn ido-mode on if arg is positive, off otherwise."
+ "Toggle use of Ido for all buffer/file reading.
+With a prefix argument ARG, enable this feature if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:global t
:group 'ido
(when (get 'ido-everywhere 'file)
diff --git a/lisp/image-file.el b/lisp/image-file.el
index bd1c101d529..52012b12a56 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -178,11 +178,12 @@ Optional argument ARGS are the arguments to call FUNCTION with."
;;;###autoload
(define-minor-mode auto-image-file-mode
- "Toggle visiting of image files as images.
-With prefix argument ARG, turn on if positive, otherwise off.
-Returns non-nil if the new state is enabled.
+ "Toggle visiting of image files as images (Auto Image File mode).
+With a prefix argument ARG, enable Auto Image File mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-Image files are those whose name has an extension in
+An image file is one whose name has an extension in
`image-file-name-extensions', or matches a regexp in
`image-file-name-regexps'."
:global t
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 0995048fce5..30223e69ae0 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -396,11 +396,14 @@ to toggle between display as an image and display as text."
;;;###autoload
(define-minor-mode image-minor-mode
- "Toggle Image minor mode.
-With arg, turn Image minor mode on if arg is positive, off otherwise.
-It provides the key \\<image-mode-map>\\[image-toggle-display] \
-to switch back to `image-mode'
-to display an image file as the actual image."
+ "Toggle Image minor mode in this buffer.
+With a prefix argument ARG, enable Image minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Image minor mode provides the key \\<image-mode-map>\\[image-toggle-display],
+to switch back to `image-mode' and display an image file as the
+actual image."
nil (:eval (if image-type (format " Image[%s]" image-type) " Image"))
image-minor-mode-map
:group 'image
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 4a387a233a0..cac37b3b8c5 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2403,8 +2403,8 @@ This function is intended to be added to `auto-coding-functions'."
;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is
;; useful for Mozilla bookmark files.
(when (and (re-search-forward "\\`[[:space:]\n]*\\(<!doctype[[:space:]\n]+\\(html\\|netscape\\)\\|<html\\)" size t)
- (re-search-forward "<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']" size t))
- (let* ((match (match-string 1))
+ (re-search-forward "<meta\\s-+\\(http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*\\)?charset=[\"']?\\(.+?\\)[\"'\\s-/>]" size t))
+ (let* ((match (match-string 2))
(sym (intern (downcase match))))
(if (coding-system-p sym)
sym
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 70dda5442d5..a7d3328526a 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1424,10 +1424,13 @@ See the variable `iswitchb-case' for details."
;;;###autoload
(define-minor-mode iswitchb-mode
- "Toggle Iswitchb global minor mode.
-With arg, turn Iswitchb mode on if ARG is positive, otherwise turn it off.
-This mode enables switching between buffers using substrings. See
-`iswitchb' for details."
+ "Toggle Iswitchb mode.
+With a prefix argument ARG, enable Iswitchb mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Iswitchb mode is a global minor mode that enables switching
+between buffers using substrings. See `iswitchb' for details."
nil nil iswitchb-global-map :global t :group 'iswitchb
(if iswitchb-mode
(add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index d28fde0b214..bf312445f17 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -333,9 +333,14 @@ variables. Setting this through Custom does that automatically."
:group 'jka-compr)
(define-minor-mode auto-compression-mode
- "Toggle automatic file compression and uncompression.
-With prefix argument ARG, turn auto compression on if positive, else off.
-Return the new status of auto compression (non-nil means on)."
+ "Toggle Auto Compression mode.
+With a prefix argument ARG, enable Auto Compression mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+Auto Compression mode is a global minor mode. When enabled,
+compressed files are automatically uncompressed for reading, and
+compressed when writing."
:global t :init-value t :group 'jka-compr :version "22.1"
(let* ((installed (jka-compr-installed-p))
(flag auto-compression-mode))
diff --git a/lisp/json.el b/lisp/json.el
index 47448f4702a..33e985abbee 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Version: 1.2
+;; Version: 1.3
;; Keywords: convenience
;; This file is part of GNU Emacs.
@@ -47,6 +47,7 @@
;; other cleanups, bugfixes, and improvements.
;; 2006-12-29 - XEmacs support, from Aidan Kehoe <kehoea@parhasard.net>.
;; 2008-02-21 - Installed in GNU Emacs.
+;; 2011-10-17 - Patch `json-alist-p' and `json-plist-p' to avoid recursion -tzz
;;; Code:
@@ -108,16 +109,20 @@ this around your call to `json-read' instead of `setq'ing it.")
(defun json-alist-p (list)
"Non-null if and only if LIST is an alist."
- (or (null list)
- (and (consp (car list))
- (json-alist-p (cdr list)))))
+ (while (consp list)
+ (setq list (if (consp (car list))
+ (cdr list)
+ 'not-alist)))
+ (null list))
(defun json-plist-p (list)
"Non-null if and only if LIST is a plist."
- (or (null list)
- (and (keywordp (car list))
- (consp (cdr list))
- (json-plist-p (cddr list)))))
+ (while (consp list)
+ (setq list (if (and (keywordp (car list))
+ (consp (cdr list)))
+ (cddr list)
+ 'not-plist)))
+ (null list))
;; Reader utilities
diff --git a/lisp/linum.el b/lisp/linum.el
index db6e4c49977..4e58a1b7118 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -73,7 +73,12 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
;;;###autoload
(define-minor-mode linum-mode
- "Toggle display of line numbers in the left margin."
+ "Toggle display of line numbers in the left margin (Linum mode).
+With a prefix argument ARG, enable Linum mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+Linum mode is a buffer-local minor mode."
:lighter "" ; for desktop.el
(if linum-mode
(progn
diff --git a/lisp/longlines.el b/lisp/longlines.el
index f625d8fcac7..b4d15da78a7 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -95,21 +95,22 @@ This is used when `longlines-show-hard-newlines' is on."
;;;###autoload
(define-minor-mode longlines-mode
- "Minor mode to wrap long lines.
-In Long Lines mode, long lines are wrapped if they extend beyond
-`fill-column'. The soft newlines used for line wrapping will not
-show up when the text is yanked or saved to disk.
-
-With no argument, this command toggles Long Lines mode.
-With a prefix argument ARG, turn Long Lines minor mode on if ARG is positive,
-otherwise turn it off.
-
-If the variable `longlines-auto-wrap' is non-nil, lines are automatically
-wrapped whenever the buffer is changed. You can always call
-`fill-paragraph' to fill individual paragraphs.
-
-If the variable `longlines-show-hard-newlines' is non-nil, hard newlines
-are indicated with a symbol."
+ "Toggle Long Lines mode in this buffer.
+With a prefix argument ARG, enable Long Lines mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Long Lines mode is enabled, long lines are wrapped if they
+extend beyond `fill-column'. The soft newlines used for line
+wrapping will not show up when the text is yanked or saved to
+disk.
+
+If the variable `longlines-auto-wrap' is non-nil, lines are
+automatically wrapped whenever the buffer is changed. You can
+always call `fill-paragraph' to fill individual paragraphs.
+
+If the variable `longlines-show-hard-newlines' is non-nil, hard
+newlines are indicated with a symbol."
:group 'longlines :lighter " ll"
(if longlines-mode
;; Turn on longlines mode
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index 8dac3be0e5f..0f1669562de 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -788,9 +788,14 @@ being set it is automatically widened."
;;;###autoload
(define-minor-mode footnote-mode
- "Toggle footnote minor mode.
-This minor mode provides footnote support for `message-mode'. To get
-started, play around with the following keys:
+ "Toggle Footnote mode.
+With a prefix argument ARG, enable Footnote mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Footnode mode is a buffer-local minor mode. If enabled, it
+provides footnote support for `message-mode'. To get started,
+play around with the following keys:
\\{footnote-minor-mode-map}"
:lighter footnote-mode-line-string
:keymap footnote-minor-mode-map
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 901eb002dc1..2472b8a1870 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -133,7 +133,15 @@
;;;###autoload
(define-minor-mode mail-abbrevs-mode
- "Non-nil means expand mail aliases as abbrevs, in certain message headers."
+ "Toggle abbrev expansion of mail aliases (Mail Abbrevs mode).
+With a prefix argument ARG, enable Mail Abbrevs mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Mail Abbrevs mode is a global minor mode. When enabled,
+abbrev-like expansion is performed when editing certain mail
+headers (those specified by `mail-abbrev-mode-regexp'), based on
+the entries in your `mail-personal-alias-file'."
:global t
:group 'mail-abbrev
:version "20.3"
diff --git a/lisp/master.el b/lisp/master.el
index 1ea0a24ca94..c3e9004ca0b 100644
--- a/lisp/master.el
+++ b/lisp/master.el
@@ -72,12 +72,12 @@ You can set this variable using `master-set-slave'.")
;;;###autoload
(define-minor-mode master-mode
"Toggle Master mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
+With a prefix argument ARG, enable Master mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-When Master mode is enabled, you can scroll the slave buffer using the
-following commands:
+When Master mode is enabled, you can scroll the slave buffer
+using the following commands:
\\{master-mode-map}
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index 2ed692c1b84..22fd84a67aa 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -56,12 +56,14 @@ The prompt should already have been inserted."
;;;###autoload
(define-minor-mode minibuffer-depth-indicate-mode
"Toggle Minibuffer Depth Indication mode.
-When active, any recursive use of the minibuffer will show
-the recursion depth in the minibuffer prompt. This is only
-useful if `enable-recursive-minibuffers' is non-nil.
+With a prefix argument ARG, enable Minibuffer Depth Indication
+mode if ARG is positive, and disable it otherwise. If called
+from Lisp, enable the mode if ARG is omitted or nil.
-With prefix argument ARG, turn on if positive, otherwise off.
-Returns non-nil if the new state is enabled."
+Minibuffer Depth Indication mode is a global minor mode. When
+enabled, any recursive use of the minibuffer will show the
+recursion depth in the minibuffer prompt. This is only useful if
+`enable-recursive-minibuffers' is non-nil."
:global t
:group 'minibuffer
(if minibuffer-depth-indicate-mode
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index eceb3afc147..75a2d70da5e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -92,17 +92,25 @@
:visible (fboundp 'make-frame-command)
:help ,(purecopy "Open a new frame")))
+ (define-key menu [separator-frame]
+ menu-bar-separator)
+
(define-key menu [one-window]
- `(menu-item ,(purecopy "Remove Splits") delete-other-windows
+ `(menu-item ,(purecopy "Remove Other Windows") delete-other-windows
:enable (not (one-window-p t nil))
- :help ,(purecopy
- "Selected window grows to fill the whole frame")))
+ :help ,(purecopy "Make selected window fill whole frame")))
- (define-key menu [split-window]
- `(menu-item ,(purecopy "Split Window") split-window-vertically
+ (define-key menu [new-window-on-right]
+ `(menu-item ,(purecopy "New Window on Right") split-window-side-by-side
:enable (and (menu-bar-menu-frame-live-and-visible-p)
(menu-bar-non-minibuffer-window-p))
- :help ,(purecopy "Split selected window in two windows")))
+ :help ,(purecopy "Make new window on right of selected one")))
+
+ (define-key menu [new-window-below]
+ `(menu-item ,(purecopy "New Window Below") split-window-above-each-other
+ :enable (and (menu-bar-menu-frame-live-and-visible-p)
+ (menu-bar-non-minibuffer-window-p))
+ :help ,(purecopy "Make new window below selected one")))
(define-key menu [separator-window]
menu-bar-separator)
@@ -433,7 +441,7 @@
(defvar menu-bar-edit-menu
(let ((menu (make-sparse-keymap "Edit")))
-
+
(define-key menu [props]
`(menu-item ,(purecopy "Text Properties") facemenu-menu))
@@ -1645,7 +1653,7 @@ key, a click, or a menu-item")))
(defvar menu-bar-search-documentation-menu
(let ((menu (make-sparse-keymap "Search Documentation")))
-
+
(define-key menu [search-documentation-strings]
`(menu-item ,(purecopy "Search Documentation Strings...") apropos-documentation
:help
@@ -2161,11 +2169,13 @@ It must accept a buffer as its only required argument.")
:help ,(purecopy "Put previous minibuffer history element in the minibuffer"))))
(define-minor-mode menu-bar-mode
- "Toggle display of a menu bar on each frame.
+ "Toggle display of a menu bar on each frame (Menu Bar mode).
+With a prefix argument ARG, enable Menu Bar mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Menu Bar mode if ARG is omitted or nil.
+
This command applies to all frames that exist and frames to be
-created in the future.
-With a numeric argument, if the argument is positive,
-turn on menu bars; otherwise, turn off menu bars."
+created in the future."
:init-value t
:global t
;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el
index e6ebe3c53f1..405721f97ee 100644
--- a/lisp/minibuf-eldef.el
+++ b/lisp/minibuf-eldef.el
@@ -131,14 +131,16 @@ been set up by `minibuf-eldef-setup-minibuffer'."
;;;###autoload
(define-minor-mode minibuffer-electric-default-mode
"Toggle Minibuffer Electric Default mode.
-When active, minibuffer prompts that show a default value only show the
-default when it's applicable -- that is, when hitting RET would yield
-the default value. If the user modifies the input such that hitting RET
-would enter a non-default value, the prompt is modified to remove the
-default indication.
-
-With prefix argument ARG, turn on if positive, otherwise off.
-Returns non-nil if the new state is enabled."
+With a prefix argument ARG, enable Minibuffer Electric Default
+mode if ARG is positive, and disable it otherwise. If called
+from Lisp, enable the mode if ARG is omitted or nil.
+
+Minibuffer Electric Default mode is a global minor mode. When
+enabled, minibuffer prompts that show a default value only show
+the default when it's applicable -- that is, when hitting RET
+would yield the default value. If the user modifies the input
+such that hitting RET would enter a non-default value, the prompt
+is modified to remove the default indication."
:global t
:group 'minibuffer
(if minibuffer-electric-default-mode
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index acb71d115d1..38785fc48e8 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -596,7 +596,7 @@ Moves point to the end of the new text."
(setq end (- end suffix-len))
(setq newtext (substring newtext 0 (- suffix-len))))
(goto-char beg)
- (insert newtext)
+ (insert-and-inherit newtext)
(delete-region (point) (+ (point) (- end beg)))
(forward-char suffix-len)))
@@ -927,9 +927,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
;; file, so `try-completion' actually completes to
;; that file.
(= (length string) (length compl)))
- (goto-char end)
- (insert compl)
- (delete-region beg end))))
+ (completion--replace beg end compl))))
(exit-minibuffer))
((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 50d221b6fa0..bcf1749e13f 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -199,11 +199,12 @@ If nil, point will always be placed at the beginning of the region."
;;;###autoload
(define-minor-mode mouse-sel-mode
"Toggle Mouse Sel mode.
-With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive.
-Returns the new status of Mouse Sel mode (non-nil means on).
+With a prefix argument ARG, enable Mouse Sel mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-When Mouse Sel mode is enabled, mouse selection is enhanced in
-various ways:
+Mouse Sel mode is a global minor mode. When enabled, mouse
+selection is enhanced in various ways:
- Double-clicking on symbol constituents selects symbols.
Double-clicking on quotes or parentheses selects sexps.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index ff175288445..9b1cf48ccdc 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -372,300 +372,167 @@ This command must be bound to a mouse click."
(split-window-horizontally
(min (max new-width first-col) last-col))))))
-(defun mouse-drag-window-above (window)
- "Return the (or a) window directly above WINDOW.
-That means one whose bottom edge is at the same height as WINDOW's top edge."
- (let ((start-top (nth 1 (window-edges window)))
- (start-left (nth 0 (window-edges window)))
- (start-right (nth 2 (window-edges window)))
- (start-window window)
- above-window)
- (setq window (previous-window window 0))
- (while (and (not above-window) (not (eq window start-window)))
- (let ((left (nth 0 (window-edges window)))
- (right (nth 2 (window-edges window))))
- (when (and (= (+ (window-height window) (nth 1 (window-edges window)))
- start-top)
- (or (and (<= left start-left) (<= start-right right))
- (and (<= start-left left) (<= left start-right))
- (and (<= start-left right) (<= right start-right))))
- (setq above-window window)))
- (setq window (previous-window window)))
- above-window))
-
-(defun mouse-drag-move-window-bottom (window growth)
- "Move the bottom of WINDOW up or down by GROWTH lines.
-Move it down if GROWTH is positive, or up if GROWTH is negative.
-If this would make WINDOW too short,
-shrink the window or windows above it to make room."
- (condition-case nil
- (adjust-window-trailing-edge window growth nil)
- (error nil)))
-
-(defsubst mouse-drag-move-window-top (window growth)
- "Move the top of WINDOW up or down by GROWTH lines.
-Move it down if GROWTH is positive, or up if GROWTH is negative.
-If this would make WINDOW too short, shrink the window or windows
-above it to make room."
- ;; Moving the top of WINDOW is actually moving the bottom of the
- ;; window above.
- (let ((window-above (mouse-drag-window-above window)))
- (and window-above
- (mouse-drag-move-window-bottom window-above (- growth)))))
-
-(defun mouse-drag-mode-line-1 (start-event mode-line-p)
- "Change the height of a window by dragging on the mode or header line.
-START-EVENT is the starting mouse-event of the drag action.
-MODE-LINE-P non-nil means dragging a mode line; nil means a header line."
+;; `mouse-drag-line' is now the common routine for handling all line
+;; dragging events combining the earlier `mouse-drag-mode-line-1' and
+;; `mouse-drag-vertical-line'. It should improve the behavior of line
+;; dragging wrt Emacs 23 as follows:
+
+;; (1) Gratuitous error messages and restrictions have been (hopefully)
+;; removed. (The help-echo that dragging the mode-line can resize a
+;; one-window-frame's window will still show through via bindings.el.)
+
+;; (2) No gratuitous selection of other windows should happen. (This
+;; has not been completely fixed for mouse-autoselected windows yet.)
+
+;; (3) Mouse clicks below a scroll-bar should pass through via unread
+;; command events.
+
+;; Note that `window-in-direction' replaces `mouse-drag-window-above'
+;; and `mouse-drag-vertical-line-rightward-window' with Emacs 24.1.
+(defun mouse-drag-line (start-event line)
+ "Drag some line with the mouse.
+START-EVENT is the starting mouse-event of the drag action. LINE
+must be one of the symbols header, mode, or vertical."
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
- (let* ((done nil)
- (echo-keystrokes 0)
+ (let* ((echo-keystrokes 0)
(start (event-start start-event))
- (start-event-window (posn-window start))
- (start-event-frame (window-frame start-event-window))
- (start-nwindows (count-windows t))
+ (window (posn-window start))
+ (frame (window-frame window))
+ (minibuffer-window (minibuffer-window frame))
(on-link (and mouse-1-click-follows-link
(or mouse-1-click-in-non-selected-windows
- (eq (posn-window start) (selected-window)))
- (mouse-on-link-p start)))
- (minibuffer (frame-parameter nil 'minibuffer))
- should-enlarge-minibuffer event mouse y top bot edges wconfig growth)
+ (eq window (selected-window)))
+ (mouse-on-link-p start)))
+ (enlarge-minibuffer
+ (and (eq line 'mode)
+ (not resize-mini-windows)
+ (eq (window-frame minibuffer-window) frame)
+ (not (one-window-p t frame))
+ (= (nth 1 (window-edges minibuffer-window))
+ (nth 3 (window-edges window)))))
+ (which-side
+ (and (eq line 'vertical)
+ (or (cdr (assq 'vertical-scroll-bars (frame-parameters frame)))
+ 'right)))
+ done event mouse growth dragged)
+ (cond
+ ((eq line 'header)
+ ;; Check whether header-line can be dragged at all.
+ (if (window-at-side-p window 'top)
+ (setq done t)
+ (setq window (window-in-direction 'above window t))))
+ ((eq line 'mode)
+ ;; Check whether mode-line can be dragged at all.
+ (when (and (window-at-side-p window 'bottom)
+ (not enlarge-minibuffer))
+ (setq done t)))
+ ((eq line 'vertical)
+ ;; Get the window to adjust for the vertical case.
+ (setq window
+ (if (eq which-side 'right)
+ ;; If the scroll bar is on the window's right or there's
+ ;; no scroll bar at all, adjust the window where the
+ ;; start-event occurred.
+ window
+ ;; If the scroll bar is on the start-event window's left,
+ ;; adjust the window on the left of it.
+ (window-in-direction 'left window t)))))
+
+ ;; Start tracking.
(track-mouse
- (progn
- ;; if this is the bottommost ordinary window, then to
- ;; move its modeline the minibuffer must be enlarged.
- (setq should-enlarge-minibuffer
- (and minibuffer
- mode-line-p
- (not (one-window-p t))
- (= (nth 1 (window-edges minibuffer))
- (nth 3 (window-edges start-event-window)))))
-
- ;; loop reading events and sampling the position of
- ;; the mouse.
- (while (not done)
- (setq event (read-event)
- mouse (mouse-position))
-
- ;; do nothing if
- ;; - there is a switch-frame event.
- ;; - the mouse isn't in the frame that we started in
- ;; - the mouse isn't in any Emacs frame
- ;; drag if
- ;; - there is a mouse-movement event
- ;; - there is a scroll-bar-movement event
- ;; (same as mouse movement for our purposes)
- ;; quit if
- ;; - there is a keyboard event or some other unknown event.
- (cond ((not (consp event))
- (setq done t))
-
- ((memq (car event) '(switch-frame select-window))
- nil)
-
- ((not (memq (car event) '(mouse-movement scroll-bar-movement)))
- (when (consp event)
- ;; Do not unread a drag-mouse-1 event since it will cause the
- ;; selection of the window above when dragging the modeline
- ;; above the selected window.
- (unless (eq (car event) 'drag-mouse-1)
- (push event unread-command-events)))
- (setq done t))
-
- ((not (eq (car mouse) start-event-frame))
- nil)
-
- ((null (car (cdr mouse)))
- nil)
-
- (t
- (setq y (cdr (cdr mouse))
- edges (window-edges start-event-window)
- top (nth 1 edges)
- bot (nth 3 edges))
-
- ;; compute size change needed
- (cond (mode-line-p
- (setq growth (- y bot -1)))
- (t ; header line
- (when (< (- bot y) window-min-height)
- (setq y (- bot window-min-height)))
- ;; The window's top includes the header line!
- (setq growth (- top y))))
- (setq wconfig (current-window-configuration))
-
- ;; Check for an error case.
- (when (and (/= growth 0)
- (not minibuffer)
- (one-window-p t))
- (error "Attempt to resize sole window"))
-
- ;; If we ever move, make sure we don't mistakenly treat
- ;; some unexpected `mouse-1' final event as a sign that
- ;; this whole drag was nothing more than a click.
- (if (/= growth 0) (setq on-link nil))
-
- ;; grow/shrink minibuffer?
- (if should-enlarge-minibuffer
- (unless resize-mini-windows
- (mouse-drag-move-window-bottom start-event-window growth))
- ;; no. grow/shrink the selected window
- ;(message "growth = %d" growth)
- (if mode-line-p
- (mouse-drag-move-window-bottom start-event-window growth)
- (mouse-drag-move-window-top start-event-window growth)))
-
- ;; if this window's growth caused another
- ;; window to be deleted because it was too
- ;; short, rescind the change.
- ;;
- ;; if size change caused space to be stolen
- ;; from a window above this one, rescind the
- ;; change, but only if we didn't grow/shrink
- ;; the minibuffer. minibuffer size changes
- ;; can cause all windows to shrink... no way
- ;; around it.
- (when (or (/= start-nwindows (count-windows t))
- (and (not should-enlarge-minibuffer)
- (> growth 0)
- mode-line-p
- (/= top
- (nth 1 (window-edges
- ;; Choose right window.
- start-event-window)))))
- (set-window-configuration wconfig)))))
-
- ;; Presumably if this was just a click, the last event should
- ;; be `mouse-1', whereas if this did move the mouse, it should be
- ;; a `drag-mouse-1'. In any case `on-link' would have been nulled
- ;; above if there had been any significant mouse movement.
- (when (and on-link
- (eq 'mouse-1 (car-safe (car unread-command-events))))
- ;; If mouse-2 has never been done by the user, it doesn't
- ;; have the necessary property to be interpreted correctly.
- (put 'mouse-2 'event-kind 'mouse-click)
- (setcar unread-command-events
- (cons 'mouse-2 (cdar unread-command-events))))))))
+ ;; Loop reading events and sampling the position of the mouse.
+ (while (not done)
+ (setq event (read-event))
+ (setq mouse (mouse-position))
+ ;; Do nothing if
+ ;; - there is a switch-frame event.
+ ;; - the mouse isn't in the frame that we started in
+ ;; - the mouse isn't in any Emacs frame
+ ;; Drag if
+ ;; - there is a mouse-movement event
+ ;; - there is a scroll-bar-movement event (??)
+ ;; (same as mouse movement for our purposes)
+ ;; Quit if
+ ;; - there is a keyboard event or some other unknown event.
+ (cond
+ ((not (consp event))
+ (setq done t))
+ ((memq (car event) '(switch-frame select-window))
+ nil)
+ ((not (memq (car event) '(mouse-movement scroll-bar-movement)))
+ (when (consp event)
+ ;; Do not unread a drag-mouse-1 event to avoid selecting
+ ;; some other window. For vertical line dragging do not
+ ;; unread mouse-1 events either (but only if we dragged at
+ ;; least once to allow mouse-1 clicks get through.
+ (unless (and dragged
+ (if (eq line 'vertical)
+ (memq (car event) '(drag-mouse-1 mouse-1))
+ (eq (car event) 'drag-mouse-1)))
+ (push event unread-command-events)))
+ (setq done t))
+ ((or (not (eq (car mouse) frame)) (null (car (cdr mouse))))
+ nil)
+ ((eq line 'vertical)
+ ;; Drag vertical divider (the calculations below are those
+ ;; from Emacs 23).
+ (setq growth
+ (- (- (cadr mouse)
+ (if (eq which-side 'right) 0 2))
+ (nth 2 (window-edges window))
+ -1))
+ (unless (zerop growth)
+ ;; Remember that we dragged.
+ (setq dragged t))
+ (adjust-window-trailing-edge window growth t))
+ (t
+ ;; Drag horizontal divider (the calculations below are those
+ ;; from Emacs 23).
+ (setq growth
+ (if (eq line 'mode)
+ (- (cddr mouse) (nth 3 (window-edges window)) -1)
+ ;; The window's top includes the header line!
+ (- (nth 3 (window-edges window)) (cddr mouse))))
+
+ (unless (zerop growth)
+ ;; Remember that we dragged.
+ (setq dragged t))
+
+ (cond
+ (enlarge-minibuffer
+ (adjust-window-trailing-edge window growth))
+ ((eq line 'mode)
+ (adjust-window-trailing-edge window growth))
+ (t
+ (adjust-window-trailing-edge window (- growth)))))))
+
+ ;; Presumably, if this was just a click, the last event should be
+ ;; `mouse-1', whereas if this did move the mouse, it should be a
+ ;; `drag-mouse-1'. `dragged' nil tells us that we never dragged
+ ;; and `on-link' tells us that there is a link to follow.
+ (when (and on-link (not dragged)
+ (eq 'mouse-1 (car-safe (car unread-command-events))))
+ ;; If mouse-2 has never been done by the user, it doesn't
+ ;; have the necessary property to be interpreted correctly.
+ (put 'mouse-2 'event-kind 'mouse-click)
+ (setcar unread-command-events
+ (cons 'mouse-2 (cdar unread-command-events)))))))
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on the mode line."
(interactive "e")
- (mouse-drag-mode-line-1 start-event t))
+ (mouse-drag-line start-event 'mode))
(defun mouse-drag-header-line (start-event)
- "Change the height of a window by dragging on the header line.
-Windows whose header-lines are at the top of the frame cannot be
-resized by dragging their header-line."
+ "Change the height of a window by dragging on the header line."
(interactive "e")
- ;; Changing the window's size by dragging its header-line when the
- ;; header-line is at the top of the frame is somewhat strange,
- ;; because the header-line doesn't move, so don't do it.
- (let* ((start (event-start start-event))
- (window (posn-window start))
- (frame (window-frame window))
- (first-window (frame-first-window frame)))
- (unless (or (eq window first-window)
- (= (nth 1 (window-edges window))
- (nth 1 (window-edges first-window))))
- (mouse-drag-mode-line-1 start-event nil))))
-
-
-(defun mouse-drag-vertical-line-rightward-window (window)
- "Return a window that is immediately to the right of WINDOW, or nil."
- (let ((bottom (nth 3 (window-inside-edges window)))
- (left (nth 0 (window-inside-edges window)))
- best best-right
- (try (previous-window window)))
- (while (not (eq try window))
- (let ((try-top (nth 1 (window-inside-edges try)))
- (try-bottom (nth 3 (window-inside-edges try)))
- (try-right (nth 2 (window-inside-edges try))))
- (if (and (< try-top bottom)
- (>= try-bottom bottom)
- (< try-right left)
- (or (null best-right) (> try-right best-right)))
- (setq best-right try-right best try)))
- (setq try (previous-window try)))
- best))
+ (mouse-drag-line start-event 'header))
(defun mouse-drag-vertical-line (start-event)
"Change the width of a window by dragging on the vertical line."
(interactive "e")
- ;; Give temporary modes such as isearch a chance to turn off.
- (run-hooks 'mouse-leave-buffer-hook)
- (let* ((done nil)
- (echo-keystrokes 0)
- (start-event-frame (window-frame (car (car (cdr start-event)))))
- (start-event-window (car (car (cdr start-event))))
- event mouse x left right edges growth
- (which-side
- (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
- 'right)))
- (cond
- ((one-window-p t)
- (error "Attempt to resize sole ordinary window"))
- ((and (eq which-side 'right)
- (>= (nth 2 (window-inside-edges start-event-window))
- (frame-width start-event-frame)))
- (error "Attempt to drag rightmost scrollbar"))
- ((and (eq which-side 'left)
- (= (nth 0 (window-inside-edges start-event-window)) 0))
- (error "Attempt to drag leftmost scrollbar")))
- (track-mouse
- (progn
- ;; loop reading events and sampling the position of
- ;; the mouse.
- (while (not done)
- (setq event (read-event)
- mouse (mouse-position))
- ;; do nothing if
- ;; - there is a switch-frame event.
- ;; - the mouse isn't in the frame that we started in
- ;; - the mouse isn't in any Emacs frame
- ;; drag if
- ;; - there is a mouse-movement event
- ;; - there is a scroll-bar-movement event
- ;; (same as mouse movement for our purposes)
- ;; quit if
- ;; - there is a keyboard event or some other unknown event
- ;; unknown event.
- (cond ((integerp event)
- (setq done t))
- ((memq (car event) '(switch-frame select-window))
- nil)
- ((not (memq (car event)
- '(mouse-movement scroll-bar-movement)))
- (if (consp event)
- (setq unread-command-events
- (cons event unread-command-events)))
- (setq done t))
- ((not (eq (car mouse) start-event-frame))
- nil)
- ((null (car (cdr mouse)))
- nil)
- (t
- (let ((window
- ;; If the scroll bar is on the window's left,
- ;; adjust the window on the left.
- (if (eq which-side 'right)
- start-event-window
- (mouse-drag-vertical-line-rightward-window
- start-event-window))))
- (setq x (- (car (cdr mouse))
- (if (eq which-side 'right) 0 2))
- edges (window-edges window)
- left (nth 0 edges)
- right (nth 2 edges))
- ;; scale back a move that would make the
- ;; window too thin.
- (if (< (- x left -1) window-min-width)
- (setq x (+ left window-min-width -1)))
- ;; compute size change needed
- (setq growth (- x right -1))
- (condition-case nil
- (adjust-window-trailing-edge window growth t)
- (error nil))))))))))
+ (mouse-drag-line start-event 'vertical))
(defun mouse-set-point (event)
"Move point to the position clicked on with the mouse.
diff --git a/lisp/msb.el b/lisp/msb.el
index 12e5a0192fe..74ceff1a9cd 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -1133,7 +1133,10 @@ variable `msb-menu-cond'."
;;;###autoload
(define-minor-mode msb-mode
"Toggle Msb mode.
-With arg, turn Msb mode on if and only if arg is positive.
+With a prefix argument ARG, enable Msb mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
This mode overrides the binding(s) of `mouse-buffer-menu' to provide a
different buffer menu using the function `msb'."
:global t :group 'msb
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 4ead168b188..05aeb12acf4 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -250,11 +250,11 @@ This should only be bound to mouse buttons 4 and 5."
(defvar mwheel-installed-bindings nil)
-;; preloaded ;;;###autoload
(define-minor-mode mouse-wheel-mode
- "Toggle mouse wheel support.
-With prefix argument ARG, turn on if positive, otherwise off.
-Return non-nil if the new state is enabled."
+ "Toggle mouse wheel support (Mouse Wheel mode).
+With a prefix argument ARG, enable Mouse Wheel mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:init-value t
;; We'd like to use custom-initialize-set here so the setup is done
;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index f9bc13e1e25..10a1fa5afc5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -36,6 +36,7 @@
;; Function Browser Earliest version
;; browse-url-mozilla Mozilla Don't know
;; browse-url-firefox Firefox Don't know (tried with 1.0.1)
+;; browse-url-chromium Chromium 3.0
;; browse-url-galeon Galeon Don't know
;; browse-url-epiphany Epiphany Don't know
;; browse-url-netscape Netscape 1.1b1
@@ -47,6 +48,7 @@
;; browse-url-generic arbitrary
;; browse-url-default-windows-browser MS-Windows browser
;; browse-url-default-macosx-browser Mac OS X browser
+;; browse-url-xdg-open Free Desktop xdg-open on Gnome, KDE, Xfce4, LXDE
;; browse-url-gnome-moz GNOME interface to Mozilla
;; browse-url-kde KDE konqueror (kfm)
;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT)
@@ -230,6 +232,7 @@ regexp should probably be \".\" to specify a default browser."
:value browse-url-w3-gnudoit)
(function-item :tag "Mozilla" :value browse-url-mozilla)
(function-item :tag "Firefox" :value browse-url-firefox)
+ (function-item :tag "Chromium" :value browse-url-chromium)
(function-item :tag "Galeon" :value browse-url-galeon)
(function-item :tag "Epiphany" :value browse-url-epiphany)
(function-item :tag "Netscape" :value browse-url-netscape)
@@ -336,6 +339,22 @@ Defaults to the value of `browse-url-firefox-arguments' at the time
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
+(defcustom browse-url-chromium-program
+ (let ((candidates '("chromium" "chromium-browser")))
+ (while (and candidates (not (executable-find (car candidates))))
+ (setq candidates (cdr candidates)))
+ (or (car candidates) "chromium"))
+ "The name by which to invoke Chromium."
+ :type 'string
+ :version "24.1"
+ :group 'browse-url)
+
+(defcustom browse-url-chromium-arguments nil
+ "A list of strings to pass to Chromium as arguments."
+ :type '(repeat (string :tag "Argument"))
+ :version "24.1"
+ :group 'browse-url)
+
(defcustom browse-url-galeon-program "galeon"
"The name by which to invoke Galeon."
:type 'string
@@ -913,6 +932,7 @@ used instead of `browse-url-new-window-flag'."
((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
((executable-find browse-url-firefox-program) 'browse-url-firefox)
+ ((executable-find browse-url-chromium-program) 'browse-url-chromium)
((executable-find browse-url-galeon-program) 'browse-url-galeon)
((executable-find browse-url-kde-program) 'browse-url-kde)
((executable-find browse-url-netscape-program) 'browse-url-netscape)
@@ -924,12 +944,13 @@ used instead of `browse-url-new-window-flag'."
url args))
(defun browse-url-can-use-xdg-open ()
- "Check if xdg-open can be used, i.e. we are on Gnome, KDE or xfce4."
+ "Check if xdg-open can be used, i.e. we are on Gnome, KDE, Xfce4 or LXDE."
(and (getenv "DISPLAY")
(executable-find "xdg-open")
;; xdg-open may call gnome-open and that does not wait for its child
;; to finish. This child may then be killed when the parent dies.
- ;; Use nohup to work around.
+ ;; Use nohup to work around. See bug#7166, bug#8917, bug#9779 and
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2009-07/msg00279.html
(executable-find "nohup")
(or (getenv "GNOME_DESKTOP_SESSION_ID")
;; GNOME_DESKTOP_SESSION_ID is deprecated, check on Dbus also.
@@ -947,7 +968,9 @@ used instead of `browse-url-new-window-flag'."
"/bin/sh" nil nil nil
"-c"
"xprop -root _DT_SAVE_MODE|grep xfce4"))
- (error nil)))))
+ (error nil))
+ (member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu"))
+ (equal (getenv "XDG_CURRENT_DESKTOP") "LXDE"))))
;;;###autoload
@@ -1141,6 +1164,22 @@ URL in a new window."
(append browse-url-firefox-startup-arguments (list url))))))
;;;###autoload
+(defun browse-url-chromium (url &optional new-window)
+ "Ask the Chromium WWW browser to load URL.
+Default to the URL around or before point. The strings in
+variable `browse-url-chromium-arguments' are also passed to
+Chromium."
+ (interactive (browse-url-interactive-arg "URL: "))
+ (setq url (browse-url-encode-url url))
+ (let* ((process-environment (browse-url-process-environment)))
+ (apply 'start-process
+ (concat "chromium " url) nil
+ browse-url-chromium-program
+ (append
+ browse-url-chromium-arguments
+ (list url)))))
+
+;;;###autoload
(defun browse-url-galeon (url &optional new-window)
"Ask the Galeon WWW browser to load URL.
Default to the URL around or before point. The strings in variable
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 4e78a7d42c0..1432c1e516b 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -288,7 +288,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
;;;###autoload
(define-minor-mode goto-address-prog-mode
- "Turn on `goto-address-mode', but only in comments and strings."
+ "Like `goto-address-mode', but only for comments and strings."
nil
""
nil
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index adc66f6766c..5fca1018095 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1886,7 +1886,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
(when (and (listp sf) (eq (car sf) 'autoload))
(let ((default-directory
(tramp-compat-temporary-file-directory)))
- (load (cadr sf) 'noerror)))
+ (load (cadr sf) 'noerror 'nomessage)))
(apply foreign operation args))
;; Trace that somebody has interrupted the operation.
@@ -2103,8 +2103,9 @@ This is true, if either the remote host is already connected, or if we are
not in completion mode."
(and (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
- (or (get-buffer (tramp-buffer-name v))
- (not (tramp-completion-mode-p))))))
+ (or (not (tramp-completion-mode-p))
+ (let ((p (tramp-get-connection-process v)))
+ (and p (processp p) (memq (process-status p) '(run open))))))))
;; Method, host name and user name completion.
;; `tramp-completion-dissect-file-name' returns a list of
diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el
index 64c26cfb2c9..56e9cb68c61 100644
--- a/lisp/net/xesam.el
+++ b/lisp/net/xesam.el
@@ -516,9 +516,9 @@ engine specific, widget :notify function to visualize xesam:url."
(define-minor-mode xesam-minor-mode
"Toggle Xesam minor mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
+With a prefix argument ARG, enable Xesam minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
When Xesam minor mode is enabled, all text which matches a
previous Xesam query in this buffer is highlighted."
diff --git a/lisp/outline.el b/lisp/outline.el
index f864058c6fc..34d30fc4591 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -356,7 +356,10 @@ After that, changing the prefix key requires manipulating keymaps."
;;;###autoload
(define-minor-mode outline-minor-mode
"Toggle Outline minor mode.
-With arg, turn Outline minor mode on if arg is positive, off otherwise.
+With a prefix argument ARG, enable Outline minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
See the command `outline-mode' for more information on this mode."
nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map)
(cons outline-minor-mode-prefix outline-mode-prefix-map))
diff --git a/lisp/paren.el b/lisp/paren.el
index fb5c0bf36e9..ee550228d48 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -102,12 +102,14 @@ otherwise)."
;;;###autoload
(define-minor-mode show-paren-mode
- "Toggle Show Paren mode.
-With prefix ARG, turn Show Paren mode on if and only if ARG is positive.
-Returns the new status of Show Paren mode (non-nil means on).
+ "Toggle visualization of matching parens (Show Paren mode).
+With a prefix argument ARG, enable Show Paren mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-When Show Paren mode is enabled, any matching parenthesis is highlighted
-in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
+Show Paren mode is a global minor mode. When enabled, any
+matching parenthesis is highlighted in `show-paren-style' after
+`show-paren-delay' seconds of Emacs idle time."
:global t :group 'paren-showing
;; Enable or disable the mechanism.
;; First get rid of the old idle timer.
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 8ec379afab2..12eddfef1aa 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -127,7 +127,10 @@ so that it is considered safe, see `enable-local-variables'.")
;;;###autoload
(define-minor-mode bug-reference-mode
- "Minor mode to buttonize bugzilla references in the current buffer."
+ "Toggle hyperlinking bug references in the buffer (Bug Reference mode).
+With a prefix argument ARG, enable Bug Reference mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
nil
""
nil
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el
index 0ce84ae33a7..d7b7dfef1ec 100644
--- a/lisp/progmodes/cap-words.el
+++ b/lisp/progmodes/cap-words.el
@@ -60,9 +60,13 @@ Looks for word boundaries before capitals."
;;;###autoload
(define-minor-mode capitalized-words-mode
"Toggle Capitalized Words mode.
+With a prefix argument ARG, enable Capitalized Words mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
-In this minor mode, a word boundary occurs immediately before an
-uppercase letter in a symbol. This is in addition to all the normal
+Capitalized Words mode is a buffer-local minor mode. When
+enabled, a word boundary occurs immediately before an uppercase
+letter in a symbol. This is in addition to all the normal
boundaries given by the syntax and category tables. There is no
restriction to ASCII.
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a1cbdc16560..b2c548847c3 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2456,7 +2456,7 @@ comment at the start of cc-engine.el for more info."
(<= from (cdr c-state-brace-pair-desert)))
;; Only search what we absolutely need to:
(if (and c-state-brace-pair-desert
- (> from (cdr c-state-brace-pair-desert)))
+ (eq cache-pos (car c-state-brace-pair-desert)))
(narrow-to-region (cdr c-state-brace-pair-desert) (point-max)))
;; In the next pair of nested loops, the inner one moves back past a
@@ -3127,6 +3127,33 @@ comment at the start of cc-engine.el for more info."
(unless (fboundp 'c-real-parse-state)
(fset 'c-real-parse-state (symbol-function 'c-parse-state)))
(cc-bytecomp-defun c-real-parse-state)
+
+(defvar c-parse-state-state nil)
+(defun c-record-parse-state-state ()
+ (setq c-parse-state-state
+ (mapcar
+ (lambda (arg)
+ (cons arg (symbol-value arg)))
+ '(c-state-cache
+ c-state-cache-good-pos
+ c-state-nonlit-pos-cache
+ c-state-nonlit-pos-cache-limit
+ c-state-brace-pair-desert
+ c-state-point-min
+ c-state-point-min-lit-type
+ c-state-point-min-lit-start
+ c-state-min-scan-pos
+ c-state-old-cpp-beg
+ c-state-old-cpp-end))))
+(defun c-replay-parse-state-state ()
+ (message
+ (concat "(setq "
+ (mapconcat
+ (lambda (arg)
+ (format "%s %s%s" (car arg) (if (atom (cdr arg)) "" "'") (cdr arg)))
+ c-parse-state-state " ")
+ ")")))
+
(defun c-debug-parse-state ()
(let ((here (point)) (res1 (c-real-parse-state)) res2)
(let ((c-state-cache nil)
@@ -3145,15 +3172,21 @@ comment at the start of cc-engine.el for more info."
;; The cache can actually go further back due to the ad-hoc way
;; the first paren is found, so try to whack off a bit of its
;; start before complaining.
- (save-excursion
- (goto-char (or (c-least-enclosing-brace res2) (point)))
- (c-beginning-of-defun-1)
- (while (not (or (bobp) (eq (char-after) ?{)))
- (c-beginning-of-defun-1))
- (unless (equal (c-whack-state-before (point) res1) res2)
- (message (concat "c-parse-state inconsistency at %s: "
- "using cache: %s, from scratch: %s")
- here res1 res2))))
+ ;; (save-excursion
+ ;; (goto-char (or (c-least-enclosing-brace res2) (point)))
+ ;; (c-beginning-of-defun-1)
+ ;; (while (not (or (bobp) (eq (char-after) ?{)))
+ ;; (c-beginning-of-defun-1))
+ ;; (unless (equal (c-whack-state-before (point) res1) res2)
+ ;; (message (concat "c-parse-state inconsistency at %s: "
+ ;; "using cache: %s, from scratch: %s")
+ ;; here res1 res2)))
+ (message (concat "c-parse-state inconsistency at %s: "
+ "using cache: %s, from scratch: %s")
+ here res1 res2)
+ (message "Old state:")
+ (c-replay-parse-state-state))
+ (c-record-parse-state-state)
res1))
(defun c-toggle-parse-state-debug (&optional arg)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 619c423902c..156c90159cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1968,12 +1968,15 @@ Optional argument MINOR indicates this is called from
;;;###autoload
(define-minor-mode compilation-shell-minor-mode
- "Toggle compilation shell minor mode.
-With arg, turn compilation mode on if and only if arg is positive.
-In this minor mode, all the error-parsing commands of the
-Compilation major mode are available but bound to keys that don't
-collide with Shell mode. See `compilation-mode'.
-Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'."
+ "Toggle Compilation Shell minor mode.
+With a prefix argument ARG, enable Compilation Shell minor mode
+if ARG is positive, and disable it otherwise. If called from
+Lisp, enable the mode if ARG is omitted or nil.
+
+When Compilation Shell minor mode is enabled, all the
+error-parsing commands of the Compilation major mode are
+available but bound to keys that don't collide with Shell mode.
+See `compilation-mode'."
nil " Shell-Compile"
:group 'compilation
(if compilation-shell-minor-mode
@@ -1982,11 +1985,14 @@ Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'."
;;;###autoload
(define-minor-mode compilation-minor-mode
- "Toggle compilation minor mode.
-With arg, turn compilation mode on if and only if arg is positive.
-In this minor mode, all the error-parsing commands of the
-Compilation major mode are available. See `compilation-mode'.
-Turning the mode on runs the normal hook `compilation-minor-mode-hook'."
+ "Toggle Compilation minor mode.
+With a prefix argument ARG, enable Compilation minor mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+When Compilation minor mode is enabled, all the error-parsing
+commands of Compilation major mode are available. See
+`compilation-mode'."
nil " Compilation"
:group 'compilation
(if compilation-minor-mode
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 25a23fed293..7b3a2893610 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3255,7 +3255,10 @@ Treats actions as defuns."
;;;###autoload
(define-minor-mode gud-tooltip-mode
- "Toggle the display of GUD tooltips."
+ "Toggle the display of GUD tooltips.
+With a prefix argument ARG, enable the feature if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+it if ARG is omitted or nil."
:global t
:group 'gud
:group 'tooltip
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 48d1ac4b85e..374a45acec6 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -214,11 +214,15 @@
;;;###autoload
(define-minor-mode hide-ifdef-mode
- "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one.
-With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise.
-In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor
-would eliminate may be hidden from view. Several variables affect
-how the hiding is done:
+ "Toggle features to hide/show #ifdef blocks (Hide-Ifdef mode).
+With a prefix argument ARG, enable Hide-Ifdef mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Hide-Ifdef mode is a buffer-local minor mode for use with C and
+C-like major modes. When enabled, code within #ifdef constructs
+that the C preprocessor would eliminate may be hidden from view.
+Several variables affect how the hiding is done:
`hide-ifdef-env'
An association list of defined and undefined symbols for the
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index b2cd24f0f98..18f47d14a3f 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -4277,16 +4277,14 @@ Otherwise, just expand the file name."
(defvar idlwave-shell-electric-debug-buffers nil)
(define-minor-mode idlwave-shell-electric-debug-mode
- "Toggle Electric Debug mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
-
-When Electric Debug mode is enabled, the many debugging commands are
-available as single key sequences."
-nil
-" *Debugging*"
-idlwave-shell-electric-debug-mode-map)
+ "Toggle Idlwave Shell Electric Debug mode.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+When Idlwave Shell Electric Debug mode is enabled, the Idlwave
+Shell debugging commands are available as single key sequences."
+ nil " *Debugging*" idlwave-shell-electric-debug-mode-map)
(add-hook
'idlwave-shell-electric-debug-mode-on-hook
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 8066e1c3a7f..c77ee4b76a9 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1907,7 +1907,6 @@ The main features of this mode are
(set (make-local-variable 'comment-start-skip) ";+[ \t]*")
(set (make-local-variable 'comment-start) ";")
(set (make-local-variable 'comment-add) 1) ; ";;" for new and regions
- (set (make-local-variable 'require-final-newline) t)
(set (make-local-variable 'abbrev-all-caps) t)
(set (make-local-variable 'indent-tabs-mode) nil)
(set (make-local-variable 'completion-ignore-case) t)
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 1a403f50b1b..9c61da89008 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -94,13 +94,19 @@
;;;###autoload
(define-minor-mode subword-mode
- "Mode enabling subword movement and editing keys.
-In spite of GNU Coding Standards, it is popular to name a symbol by
-mixing uppercase and lowercase letters, e.g. \"GtkWidget\",
-\"EmacsFrameClass\", \"NSGraphicsContext\", etc. Here we call these
-mixed case symbols `nomenclatures'. Also, each capitalized (or
-completely uppercase) part of a nomenclature is called a `subword'.
-Here are some examples:
+ "Toggle subword movement and editing (Subword mode).
+With a prefix argument ARG, enable Subword mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Subword mode is a buffer-local minor mode. Enabling it remaps
+word-based editing commands to subword-based commands that handle
+symbols with mixed uppercase and lowercase letters,
+e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".
+
+Here we call these mixed case symbols `nomenclatures'. Each
+capitalized (or completely uppercase) part of a nomenclature is
+called a `subword'. Here are some examples:
Nomenclature Subwords
===========================================================
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index 1f33f5f3aaf..b02324871ff 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -310,7 +310,6 @@ Key bindings:
(set (make-local-variable 'comment-indent-function) 'c-comment-indent)
(set (make-local-variable 'paragraph-start) "^$")
(set (make-local-variable 'paragraph-separate) paragraph-start)
- (set (make-local-variable 'require-final-newline) t)
(set (make-local-variable 'indent-tabs-mode) nil)
(set (make-local-variable 'indent-line-function) 'vera-indent-line)
(set (make-local-variable 'parse-sexp-ignore-comments) t)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 9aaf3059b78..d7aa82aee1b 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8029,12 +8029,16 @@ project is defined."
(define-minor-mode vhdl-electric-mode
"Toggle VHDL electric mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable it if ARG
+is omitted or nil."
:global t)
(define-minor-mode vhdl-stutter-mode
"Toggle VHDL stuttering mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable it if ARG
+is omitted or nil."
:global t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 97e188139e9..e27d07854c8 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -236,12 +236,14 @@ It creates the Imenu index for the buffer, if necessary."
;; This is the name people would normally expect.
;;;###autoload
(define-minor-mode which-function-mode
- "Toggle Which Function mode, globally.
-When Which Function mode is enabled, the current function name is
-continuously displayed in the mode line, in certain major modes.
-
-With prefix ARG, turn Which Function mode on if arg is positive,
-and off otherwise."
+ "Toggle mode line display of current function (Which Function mode).
+With a prefix argument ARG, enable Which Function mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Which Function mode is a global minor mode. When enabled, the
+current function name is continuously displayed in the mode line,
+in certain major modes."
:global t :group 'which-func
(when (timerp which-func-update-timer)
(cancel-timer which-func-update-timer))
diff --git a/lisp/recentf.el b/lisp/recentf.el
index fc9b7881733..79f4eb437d9 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -1336,12 +1336,14 @@ That is, remove duplicates, non-kept, and excluded files."
;;;###autoload
(define-minor-mode recentf-mode
- "Toggle recentf mode.
-With prefix argument ARG, turn on if positive, otherwise off.
-Returns non-nil if the new state is enabled.
-
-When recentf mode is enabled, it maintains a menu for visiting files
-that were operated on recently."
+ "Toggle \"Open Recent\" menu (Recentf mode).
+With a prefix argument ARG, enable Recentf mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Recentf mode if ARG is omitted or nil.
+
+When Recentf mode is enabled, a \"Open Recent\" submenu is
+displayed in the \"File\" menu, containing a list of files that
+were operated on recently."
:global t
:group 'recentf
:keymap recentf-mode-map
diff --git a/lisp/reveal.el b/lisp/reveal.el
index bf18602379c..ea46cfd1dd3 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -189,12 +189,13 @@ Each element has the form (WINDOW . OVERLAY).")
;;;###autoload
(define-minor-mode reveal-mode
- "Toggle Reveal mode on or off.
-Reveal mode renders invisible text around point visible again.
+ "Toggle decloaking of invisible text near point (Reveal mode).
+With a prefix argument ARG, enable Reveal mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Reveal mode if ARG is omitted or nil.
-Interactively, with no prefix argument, toggle the mode.
-With universal prefix ARG (or if ARG is nil) turn mode on.
-With zero or negative ARG turn mode off."
+Reveral mode is a buffer-local minor mode. When enabled, it
+reveals invisible text around point."
:group 'reveal
:lighter (global-reveal-mode nil " Reveal")
:keymap reveal-mode-map
@@ -207,12 +208,12 @@ With zero or negative ARG turn mode off."
;;;###autoload
(define-minor-mode global-reveal-mode
- "Toggle Reveal mode in all buffers on or off.
+ "Toggle Reveal mode in all buffers (Global Reveal mode).
Reveal mode renders invisible text around point visible again.
-Interactively, with no prefix argument, toggle the mode.
-With universal prefix ARG (or if ARG is nil) turn mode on.
-With zero or negative ARG turn mode off."
+With a prefix argument ARG, enable Global Reveal mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:global t :group 'reveal
(setq-default reveal-mode global-reveal-mode)
(if global-reveal-mode
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el
index 9eb2d2abdee..2d8c6e0964d 100644
--- a/lisp/rfn-eshadow.el
+++ b/lisp/rfn-eshadow.el
@@ -207,15 +207,17 @@ been set up by `rfn-eshadow-setup-minibuffer'."
(error nil)))
(define-minor-mode file-name-shadow-mode
- "Toggle File-Name Shadow mode.
-When active, any part of a filename being read in the minibuffer
-that would be ignored (because the result is passed through
+ "Toggle file-name shadowing in minibuffers (File-Name Shadow mode).
+With a prefix argument ARG, enable File-Name Shadow mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+File-Name Shadow mode is a global minor mode. When enabled, any
+part of a filename being read in the minibuffer that would be
+ignored (because the result is passed through
`substitute-in-file-name') is given the properties in
-`file-name-shadow-properties', which can be used to make
-that portion dim, invisible, or otherwise less visually noticeable.
-
-With prefix argument ARG, turn on if positive, otherwise off.
-Returns non-nil if the new state is enabled."
+`file-name-shadow-properties', which can be used to make that
+portion dim, invisible, or otherwise less visually noticeable."
:global t
;; We'd like to use custom-initialize-set here so the setup is done
;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index fc62bf6b633..046c29471ac 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -567,8 +567,10 @@ format first."
;;;###autoload
(define-minor-mode ruler-mode
- "Toggle Ruler mode.
-In Ruler mode, Emacs displays a ruler in the header line."
+ "Toggle display of ruler in header line (Ruler mode).
+With a prefix argument ARG, enable Ruler mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil."
nil nil
ruler-mode-map
:group 'ruler-mode
diff --git a/lisp/savehist.el b/lisp/savehist.el
index 653d0312a19..faeab324e5a 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -170,15 +170,19 @@ minibuffer history.")
;;;###autoload
(define-minor-mode savehist-mode
- "Toggle savehist-mode.
-Positive ARG turns on `savehist-mode'. When on, savehist-mode causes
-minibuffer history to be saved periodically and when exiting Emacs.
-When turned on for the first time in an Emacs session, it causes the
-previous minibuffer history to be loaded from `savehist-file'.
+ "Toggle saving of minibuffer history (Savehist mode).
+With a prefix argument ARG, enable Savehist mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Savehist mode is enabled, minibuffer history is saved
+periodically and when exiting Emacs. When Savehist mode is
+enabled for the first time in an Emacs session, it loads the
+previous minibuffer history from `savehist-file'.
This mode should normally be turned on from your Emacs init file.
-Calling it at any other time replaces your current minibuffer histories,
-which is probably undesirable."
+Calling it at any other time replaces your current minibuffer
+histories, which is probably undesirable."
:global t
(if (not savehist-mode)
(savehist-uninstall)
diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el
index 6dbdc9ab90d..81a4d2c86e1 100644
--- a/lisp/scroll-all.el
+++ b/lisp/scroll-all.el
@@ -101,10 +101,13 @@
;;;###autoload
(define-minor-mode scroll-all-mode
- "Toggle Scroll-All minor mode.
-With ARG, turn Scroll-All minor mode on if ARG is positive, off otherwise.
-When Scroll-All mode is on, scrolling commands entered in one window
-apply to all visible windows in the same frame."
+ "Toggle shared scrolling in same-frame windows (Scroll-All mode).
+With a prefix argument ARG, enable Scroll-All mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Scroll-All mode is enabled, scrolling commands invoked in
+one window apply to all visible windows in the same frame."
nil " *SL*" nil
:global t
:group 'windows
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 0c68bca4d2e..37a31460cdb 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -114,12 +114,15 @@ Setting the variable with a customization buffer also takes effect."
(defun get-scroll-bar-mode () scroll-bar-mode)
(defsetf get-scroll-bar-mode set-scroll-bar-mode)
+
(define-minor-mode scroll-bar-mode
- "Toggle display of vertical scroll bars on all frames.
+ "Toggle vertical scroll bars on all frames (Scroll Bar mode).
+With a prefix argument ARG, enable Scroll Bar mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
This command applies to all frames that exist and frames to be
-created in the future.
-With a numeric argument, if the argument is positive
-turn on scroll bars; otherwise turn off scroll bars."
+created in the future."
:variable (eq (get-scroll-bar-mode)
(or previous-scroll-bar-mode
default-frame-scroll-bars)))
diff --git a/lisp/server.el b/lisp/server.el
index 63d46a365c9..bc989c55ed1 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -669,9 +669,13 @@ Return values:
;;;###autoload
(define-minor-mode server-mode
"Toggle Server mode.
-With ARG, turn Server mode on if ARG is positive, off otherwise.
+With a prefix argument ARG, enable Server mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Server mode if ARG is omitted or nil.
+
Server mode runs a process that accepts commands from the
-`emacsclient' program. See `server-start' and Info node `Emacs server'."
+`emacsclient' program. See Info node `Emacs server' and
+`server-start' for details."
:global t
:group 'server
:version "22.1"
diff --git a/lisp/shell.el b/lisp/shell.el
index cefe42bb3ec..c75594ddbe4 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -890,9 +890,13 @@ Environment variables are expanded, see function `substitute-in-file-name'."
(defvaralias 'shell-dirtrack-mode 'shell-dirtrackp)
(define-minor-mode shell-dirtrack-mode
- "Turn directory tracking on and off in a shell buffer.
-The `dirtrack' package provides an alternative implementation of this
-feature - see the function `dirtrack-mode'."
+ "Toggle directory tracking in this shell buffer (Shell Dirtrack mode).
+With a prefix argument ARG, enable Shell Dirtrack mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+The `dirtrack' package provides an alternative implementation of
+this feature; see the function `dirtrack-mode'."
nil nil nil
(setq list-buffers-directory (if shell-dirtrack-mode default-directory))
(if shell-dirtrack-mode
diff --git a/lisp/simple.el b/lisp/simple.el
index 6d0e7543549..79de6aea3dd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4086,13 +4086,15 @@ its earlier value."
(define-minor-mode transient-mark-mode
"Toggle Transient Mark mode.
-With ARG, turn Transient Mark mode on if ARG is positive, off otherwise.
+With a prefix argument ARG, enable Transient Mark mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Transient Mark mode if ARG is omitted or nil.
-In Transient Mark mode, when the mark is active, the region is highlighted.
-Changing the buffer \"deactivates\" the mark.
-So do certain other operations that set the mark
-but whose main purpose is something else--for example,
-incremental search, \\[beginning-of-buffer], and \\[end-of-buffer].
+Transient Mark mode is a global minor mode. When enabled, the
+region is highlighted whenever the mark is active. The mark is
+\"deactivated\" by changing the buffer, and after certain other
+operations that set the mark but whose main purpose is something
+else--for example, incremental search, \\[beginning-of-buffer], and \\[end-of-buffer].
You can also deactivate the mark by typing \\[keyboard-quit] or
\\[keyboard-escape-quit].
@@ -4906,8 +4908,15 @@ other purposes."
(defvar visual-line--saved-state nil)
(define-minor-mode visual-line-mode
- "Redefine simple editing commands to act on visual lines, not logical lines.
-This also turns on `word-wrap' in the buffer."
+ "Toggle visual line based editing (Visual Line mode).
+With a prefix argument ARG, enable Visual Line mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Visual Line mode is enabled, `word-wrap' is turned on in
+this buffer, and simple editing commands are redefined to act on
+visual lines, not logical lines. See Info node `Visual Line
+Mode' for details."
:keymap visual-line-mode-map
:group 'visual-line
:lighter " Wrap"
@@ -5301,10 +5310,14 @@ Some major modes set this.")
(put 'auto-fill-function 'safe-local-variable 'null)
(define-minor-mode auto-fill-mode
- "Toggle Auto Fill mode.
-With ARG, turn Auto Fill mode on if and only if ARG is positive.
-In Auto Fill mode, inserting a space at a column beyond `current-fill-column'
-automatically breaks the line at a previous space.
+ "Toggle automatic line breaking (Auto Fill mode).
+With a prefix argument ARG, enable Auto Fill mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Auto Fill mode is enabled, inserting a space at a column
+beyond `current-fill-column' automatically breaks the line at a
+previous space.
When `auto-fill-mode' is on, the `auto-fill-function' variable is
non-`nil'.
@@ -5412,36 +5425,44 @@ if long lines are truncated."
"The string displayed in the mode line when in binary overwrite mode.")
(define-minor-mode overwrite-mode
- "Toggle overwrite mode.
-With prefix argument ARG, turn overwrite mode on if ARG is positive,
-otherwise turn it off. In overwrite mode, printing characters typed
-in replace existing text on a one-for-one basis, rather than pushing
-it to the right. At the end of a line, such characters extend the line.
-Before a tab, such characters insert until the tab is filled in.
-\\[quoted-insert] still inserts characters in overwrite mode; this
-is supposed to make it easier to insert characters when necessary."
+ "Toggle Overwrite mode.
+With a prefix argument ARG, enable Overwrite mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+When Overwrite mode is enabled, printing characters typed in
+replace existing text on a one-for-one basis, rather than pushing
+it to the right. At the end of a line, such characters extend
+the line. Before a tab, such characters insert until the tab is
+filled in. \\[quoted-insert] still inserts characters in
+overwrite mode; this is supposed to make it easier to insert
+characters when necessary."
:variable (eq overwrite-mode 'overwrite-mode-textual))
(define-minor-mode binary-overwrite-mode
- "Toggle binary overwrite mode.
-With prefix argument ARG, turn binary overwrite mode on if ARG is
-positive, otherwise turn it off. In binary overwrite mode, printing
-characters typed in replace existing text. Newlines are not treated
-specially, so typing at the end of a line joins the line to the next,
-with the typed character between them. Typing before a tab character
-simply replaces the tab with the character typed. \\[quoted-insert]
-replaces the text at the cursor, just as ordinary typing characters do.
-
-Note that binary overwrite mode is not its own minor mode; it is a
-specialization of overwrite mode, entered by setting the
+ "Toggle Binary Overwrite mode.
+With a prefix argument ARG, enable Binary Overwrite mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+When Binary Overwrite mode is enabled, printing characters typed
+in replace existing text. Newlines are not treated specially, so
+typing at the end of a line joins the line to the next, with the
+typed character between them. Typing before a tab character
+simply replaces the tab with the character typed.
+\\[quoted-insert] replaces the text at the cursor, just as
+ordinary typing characters do.
+
+Note that Binary Overwrite mode is not its own minor mode; it is
+a specialization of overwrite mode, entered by setting the
`overwrite-mode' variable to `overwrite-mode-binary'."
:variable (eq overwrite-mode 'overwrite-mode-binary))
(define-minor-mode line-number-mode
- "Toggle Line Number mode.
-With ARG, turn Line Number mode on if ARG is positive, otherwise
-turn it off. When Line Number mode is enabled, the line number
-appears in the mode line.
+ "Toggle line number display in the mode line (Line Number mode).
+With a prefix argument ARG, enable Line Number mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
Line numbers do not appear for very large buffers and buffers
with very long lines; see variables `line-number-display-limit'
@@ -5449,22 +5470,27 @@ and `line-number-display-limit-width'."
:init-value t :global t :group 'mode-line)
(define-minor-mode column-number-mode
- "Toggle Column Number mode.
-With ARG, turn Column Number mode on if ARG is positive,
-otherwise turn it off. When Column Number mode is enabled, the
-column number appears in the mode line."
+ "Toggle column number display in the mode line (Column Number mode).
+With a prefix argument ARG, enable Column Number mode if ARG is
+positive, and disable it otherwise.
+
+If called from Lisp, enable the mode if ARG is omitted or nil."
:global t :group 'mode-line)
(define-minor-mode size-indication-mode
- "Toggle Size Indication mode.
-With ARG, turn Size Indication mode on if ARG is positive,
-otherwise turn it off. When Size Indication mode is enabled, the
-size of the accessible part of the buffer appears in the mode line."
+ "Toggle buffer size display in the mode line (Size Indication mode).
+With a prefix argument ARG, enable Size Indication mode if ARG is
+positive, and disable it otherwise.
+
+If called from Lisp, enable the mode if ARG is omitted or nil."
:global t :group 'mode-line)
(define-minor-mode auto-save-mode
- "Toggle auto-saving of contents of current buffer.
-With prefix argument ARG, turn auto-saving on if positive, else off."
+ "Toggle auto-saving in the current buffer (Auto Save mode).
+With a prefix argument ARG, enable Auto Save mode if ARG is
+positive, and disable it otherwise.
+
+If called from Lisp, enable the mode if ARG is omitted or nil."
:variable ((and buffer-auto-save-file-name
;; If auto-save is off because buffer has shrunk,
;; then toggling should turn it on.
@@ -6634,8 +6660,9 @@ call `normal-erase-is-backspace-mode' (which see) instead."
(define-minor-mode normal-erase-is-backspace-mode
"Toggle the Erase and Delete mode of the Backspace and Delete keys.
-
-With numeric ARG, turn the mode on if and only if ARG is positive.
+With a prefix argument ARG, enable this feature if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
On window systems, when this mode is on, Delete is mapped to C-d
and Backspace is mapped to DEL; when this mode is off, both
@@ -6709,13 +6736,13 @@ See also `normal-erase-is-backspace'."
"Saved value of `buffer-invisibility-spec' when Visible mode is on.")
(define-minor-mode visible-mode
- "Toggle Visible mode.
-With argument ARG turn Visible mode on if ARG is positive, otherwise
-turn it off.
+ "Toggle making all invisible text temporarily visible (Visible mode).
+With a prefix argument ARG, enable Visible mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-Enabling Visible mode makes all invisible text temporarily visible.
-Disabling Visible mode turns off that effect. Visible mode works by
-saving the value of `buffer-invisibility-spec' and setting it to nil."
+This mode works by saving the value of `buffer-invisibility-spec'
+and setting it to nil."
:lighter " Vis"
:group 'editing-basics
(when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec)
diff --git a/lisp/strokes.el b/lisp/strokes.el
index ca0086b3b97..5ff94bb22c6 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1386,8 +1386,12 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
;;;###autoload
(define-minor-mode strokes-mode
- "Toggle Strokes global minor mode.\\<strokes-mode-map>
-With ARG, turn strokes on if and only if ARG is positive.
+ "Toggle Strokes mode, a global minor mode.
+With a prefix argument ARG, enable Strokes mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+\\<strokes-mode-map>
Strokes are pictographic mouse gestures which invoke commands.
Strokes are invoked with \\[strokes-do-stroke]. You can define
new strokes with \\[strokes-global-set-stroke]. See also
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 059024c4bce..78857b04143 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -33,7 +33,7 @@
;; mev. Now the interface with gpm is directly through a Unix socket, so this
;; file is reduced to a single minor mode macro call.
-;;
+;;
;;; Code:
@@ -65,9 +65,10 @@
(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1")
;;;###autoload
(define-minor-mode gpm-mouse-mode
- "Toggle gpm-mouse mode to use the mouse in GNU/Linux consoles.
-With prefix arg, turn gpm-mouse mode on if arg is positive,
-otherwise turn it off.
+ "Toggle mouse support in GNU/Linux consoles (GPM Mouse mode).
+With a prefix argument ARG, enable GPM Mouse mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
This allows the use of the mouse when operating on a GNU/Linux console,
in the same way as you can use the mouse under X11.
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 62171328979..cfa406c2b48 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -404,13 +404,19 @@ MODE should be an integer which is a file mode value."
(string
(if (zerop (logand 256 mode)) ?- ?r)
(if (zerop (logand 128 mode)) ?- ?w)
- (if (zerop (logand 1024 mode)) (if (zerop (logand 64 mode)) ?- ?x) ?s)
+ (if (zerop (logand 2048 mode))
+ (if (zerop (logand 64 mode)) ?- ?x)
+ (if (zerop (logand 64 mode)) ?S ?s))
(if (zerop (logand 32 mode)) ?- ?r)
(if (zerop (logand 16 mode)) ?- ?w)
- (if (zerop (logand 2048 mode)) (if (zerop (logand 8 mode)) ?- ?x) ?s)
+ (if (zerop (logand 1024 mode))
+ (if (zerop (logand 8 mode)) ?- ?x)
+ (if (zerop (logand 8 mode)) ?S ?s))
(if (zerop (logand 4 mode)) ?- ?r)
(if (zerop (logand 2 mode)) ?- ?w)
- (if (zerop (logand 1 mode)) ?- ?x)))
+ (if (zerop (logand 512 mode))
+ (if (zerop (logand 1 mode)) ?- ?x)
+ (if (zerop (logand 1 mode)) ?T ?t))))
(defun tar-header-block-summarize (tar-hblock &optional mod-p)
"Return a line similar to the output of `tar -vtf'."
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index 5d852e52105..e154074a033 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -104,14 +104,17 @@
;; Should keypad numbers send ordinary digits or distinct escape sequences?
(define-minor-mode tvi970-set-keypad-mode
- "Set the current mode of the TVI 970 numeric keypad.
-In ``numeric keypad mode'', the number keys on the keypad act as
-ordinary digits. In ``alternate keypad mode'', the keys send distinct
-escape sequences, meaning that they can have their own bindings,
+ "Toggle alternate keypad mode on TVI 970 keypad.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+In ``alternate keypad mode'', the keys send distinct escape
+sequences, meaning that they can have their own bindings,
independent of the normal number keys.
-With no argument, toggle between the two possible modes.
-With a positive argument, select alternate keypad mode.
-With a negative argument, select numeric keypad mode."
+
+When disabled, the terminal enters ``numeric keypad mode'', in
+which the keypad's keys act as ordinary digits."
:variable (terminal-parameter nil 'tvi970-keypad-numeric)
(send-string-to-terminal
(if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>")))
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el
index 406c20a0e81..ca16f356b20 100644
--- a/lisp/term/vt100.el
+++ b/lisp/term/vt100.el
@@ -42,8 +42,9 @@
;;; Controlling the screen width.
(define-minor-mode vt100-wide-mode
"Toggle 132/80 column mode for vt100s.
-With positive argument, switch to 132-column mode.
-With negative argument, switch to 80-column mode."
+With a prefix argument ARG, switch to 132-column mode if ARG is
+positive, and 80-column mode otherwise. If called from Lisp,
+switch to 132-column mode if ARG is omitted or nil."
:global t :init-value (= (frame-width) 132)
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
(set-frame-width terminal-frame (if vt100-wide-mode 132 80)))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d496298768d..4a57d00d702 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -469,12 +469,14 @@ See also `flyspell-duplicate-distance'."
;;;###autoload(defvar flyspell-mode nil)
;;;###autoload
(define-minor-mode flyspell-mode
- "Minor mode performing on-the-fly spelling checking.
-This spawns a single Ispell process and checks each word.
-The default flyspell behavior is to highlight incorrect words.
-With no argument, this command toggles Flyspell mode.
-With a prefix argument ARG, turn Flyspell minor mode on if ARG is positive,
-otherwise turn it off.
+ "Toggle on-the-fly spell checking (Flyspell mode).
+With a prefix argument ARG, enable Flyspell mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Flyspell mode is a buffer-local minor mode. When enabled, it
+spawns a single Ispell process and checks each word. The default
+flyspell behavior is to highlight incorrect words.
Bindings:
\\[ispell-word]: correct words (using Ispell).
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index b76b0a303df..62f899d1730 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3462,15 +3462,21 @@ available on the net."
;;;###autoload
(define-minor-mode ispell-minor-mode
- "Toggle Ispell minor mode.
-With prefix argument ARG, turn Ispell minor mode on if ARG is positive,
-otherwise turn it off.
+ "Toggle last-word spell checking (Ispell minor mode).
+With a prefix argument ARG, enable Ispell minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-In Ispell minor mode, pressing SPC or RET
-warns you if the previous word is incorrectly spelled.
+Ispell minor mode is a buffer-local mior mode. When enabled,
+typing SPC or RET warns you if the previous word is incorrectly
+spelled.
-All the buffer-local variables and dictionaries are ignored -- to read
-them into the running ispell process, type \\[ispell-word] SPC."
+All the buffer-local variables and dictionaries are ignored. To
+read them into the running ispell process, type \\[ispell-word]
+SPC.
+
+For spell-checking \"on the fly\", not just after typing SPC or
+RET, use `flyspell-mode'."
nil " Spell" ispell-minor-keymap)
(defun ispell-minor-check ()
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 8fb0bd85dab..1be78ed293f 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -297,11 +297,17 @@ automatically inserts the matching closing request after point."
(forward-char 1))))
(define-minor-mode nroff-electric-mode
- "Toggle `nroff-electric-newline' minor mode.
-`nroff-electric-newline' forces Emacs to check for an nroff request at the
-beginning of the line, and insert the matching closing request if necessary.
-This command toggles that mode (off->on, on->off), with an argument,
-turns it on if arg is positive, otherwise off."
+ "Toggle automatic nroff request pairing (Nroff Electric mode).
+With a prefix argument ARG, enable Nroff Electric mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Nroff Electric mode is a buffer-local minor mode, for use with
+`nroff-mode'. When enabled, Emacs checks for an nroff request at
+the beginning of the line, and inserts the matching closing
+request if necessary. This command toggles that mode (off->on,
+on->off), with an argument, turns it on if arg is positive,
+otherwise off."
:lighter " Electric"
(or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode")))
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 8fd055f7d87..b47924bc1f2 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -35,19 +35,23 @@
(put 'use-hard-newlines 'permanent-local t)
(define-minor-mode use-hard-newlines
- "Minor mode to distinguish hard and soft newlines.
-When active, the functions `newline' and `open-line' add the
+ "Toggle distinguishing between hard and soft newlines.
+With a prefix argument ARG, enable the feature if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+it if ARG is omitted or nil.
+
+When enabled, the functions `newline' and `open-line' add the
text-property `hard' to newlines that they insert, and a line is
only considered as a candidate to match `paragraph-start' or
`paragraph-separate' if it follows a hard newline.
-Prefix argument says to turn mode on if positive, off if negative.
-When the mode is turned on, if there are newlines in the buffer but no hard
-newlines, ask the user whether to mark as hard any newlines preceding a
-`paragraph-start' line. From a program, second arg INSERT specifies whether
-to do this; it can be `never' to change nothing, t or `always' to force
-marking, `guess' to try to do the right thing with no questions, nil
-or anything else to ask the user.
+When enabling, if there are newlines in the buffer but no hard
+newlines, ask the user whether to mark as hard any newlines
+preceding a `paragraph-start' line. From a program, second arg
+INSERT specifies whether to do this; it can be `never' to change
+nothing, t or `always' to force marking, `guess' to try to do the
+right thing with no questions, nil or anything else to ask the
+user.
Newlines not marked hard are called \"soft\", and are always internal
to paragraphs. The fill functions insert and delete only soft newlines."
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el
index 474872955b4..d60b7594c07 100644
--- a/lisp/textmodes/refill.el
+++ b/lisp/textmodes/refill.el
@@ -213,12 +213,17 @@ complex processing.")
;;;###autoload
(define-minor-mode refill-mode
- "Toggle Refill minor mode.
-With prefix arg, turn Refill mode on if arg is positive, otherwise turn it off.
+ "Toggle automatic refilling (Refill mode).
+With a prefix argument ARG, enable Refill mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-When Refill mode is on, the current paragraph will be formatted when
-changes are made within it. Self-inserting characters only cause
-refilling if they would cause auto-filling."
+Refill mode is a buffer-local minor mode. When enabled, the
+current paragraph is refilled as you edit. Self-inserting
+characters only cause refilling if they would cause
+auto-filling.
+
+For true \"word wrap\" behavior, use `visual-line-mode' instead."
:group 'refill
:lighter " Refill"
:keymap '(("\177" . backward-delete-char-untabify))
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 7e150bff997..6f6993980db 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -503,7 +503,13 @@
(put 'reftex-mode :menu-tag "RefTeX Mode")
;;;###autoload
(define-minor-mode reftex-mode
- "Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX.
+ "Toggle RefTeX mode.
+With a prefix argument ARG, enable RefTeX mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+RefTeX mode is a buffer-local minor mode with distinct support
+for \\label, \\ref and \\cite in LaTeX.
\\<reftex-mode-map>A Table of Contents of the entire (multifile) document with browsing
capabilities is available with `\\[reftex-toc]'.
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index c1ce950522c..f9fda7e0a74 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -442,11 +442,10 @@ font-locking of blocks.
;;;###autoload
(define-minor-mode rst-minor-mode
- "ReST Minor Mode.
-Toggle ReST minor mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
+ "Toggle ReST minor mode.
+With a prefix argument ARG, enable ReST minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
When ReST minor mode is enabled, the ReST mode keybindings
are installed on top of the major mode bindings. Use this
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 314fbf9671b..be8dd9c9130 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -841,7 +841,14 @@ Return non-nil if we skipped over matched tags."
(delete-overlay (pop sgml-electric-tag-pair-overlays))))
(define-minor-mode sgml-electric-tag-pair-mode
- "Automatically update the closing tag when editing the opening one."
+ "Toggle SGML Electric Tag Pair mode.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+SGML Electric Tag Pair mode is a buffer-local minor mode for use
+with `sgml-mode' and related maor modes. When enabled, editing
+an opening markup tag automatically updates the closing tag."
:lighter "/e"
(if sgml-electric-tag-pair-mode
(progn
@@ -2024,9 +2031,14 @@ The third `match-string' will be the used in the menu.")
(nreverse toc-index)))
(define-minor-mode html-autoview-mode
- "Toggle automatic viewing via `browse-url-of-buffer' upon saving buffer.
-With positive prefix ARG always turns viewing on, with negative ARG always off.
-Can be used as a value for `html-mode-hook'."
+ "Toggle viewing of HTML files on save (HTML Autoview mode).
+With a prefix argument ARG, enable HTML Autoview mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+HTML Autoview mode is a buffer-local minor mode for use with
+`html-mode'. If enabled, saving the file automatically runs
+`browse-url-of-buffer' to view it."
nil nil nil
:group 'sgml
(if html-autoview-mode
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 428fc1db3a9..deb92fc0243 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -677,8 +677,14 @@ An alternative value is \" . \", if you use a font with a narrow period."
(put-text-property start end 'latex-env-pair t)))
(define-minor-mode latex-electric-env-pair-mode
- "Automatically update the \\end arg when editing the \\begin one.
-And vice-versa."
+ "Toggle Latex Electric Env Pair mode.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable it if ARG
+is omitted or nil.
+
+Latex Electric Env Pair mode is a buffer-local minor mode for use
+with `latex-mode'. When enabled, typing a \\begin or \\end tag
+automatically inserts its partner."
:lighter "/e"
(if latex-electric-env-pair-mode
(add-hook 'before-change-functions
diff --git a/lisp/time.el b/lisp/time.el
index f8fea0c64a2..ac4a011bdf8 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -484,14 +484,15 @@ update which can wait for the next redisplay."
;;;###autoload
(define-minor-mode display-time-mode
"Toggle display of time, load level, and mail flag in mode lines.
-With a numeric arg, enable this display if arg is positive.
-
-When this display is enabled, it updates automatically every minute
-\(you can control the number of seconds between updates by
-customizing `display-time-interval').
-If `display-time-day-and-date' is non-nil, the current day and date
-are displayed as well.
-This runs the normal hook `display-time-hook' after each update."
+With a prefix argument ARG, enable Display Time mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+it if ARG is omitted or nil.
+
+When Display Time mode is enabled, it updates every minute (you
+can control the number of seconds between updates by customizing
+`display-time-interval'). If `display-time-day-and-date' is
+non-nil, the current day and date are displayed as well. This
+runs the normal hook `display-time-hook' after each update."
:global t :group 'display-time
(and display-time-timer (cancel-timer display-time-timer))
(setq display-time-timer nil)
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 05208abb720..8759e0f77fb 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -43,9 +43,10 @@
;; Deleting it means invoking this command won't work
;; when you are on a tty. I hope that won't cause too much trouble -- rms.
(define-minor-mode tool-bar-mode
- "Toggle use of the tool bar.
-With a numeric argument, if the argument is positive, turn on the
-tool bar; otherwise, turn off the tool bar.
+ "Toggle the tool bar in all graphical frames (Tool Bar mode).
+With a prefix argument ARG, enable Tool Bar mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+Tool Bar mode if ARG is omitted or nil.
See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for
conveniently adding tool bar items."
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index bfe53dc71b7..59115122c34 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -39,11 +39,14 @@
;;; Switching tooltips on/off
(define-minor-mode tooltip-mode
- "Toggle Tooltip mode.
-With ARG, turn Tooltip mode on if and only if ARG is positive.
-When this minor mode is enabled, Emacs displays help text
-in a pop-up window for buttons and menu items that you put the mouse on.
-\(However, if `tooltip-use-echo-area' is non-nil, this and
+ "Toggle use of graphical tooltips (Tooltip mode).
+With a prefix argument ARG, enable Tooltip mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+it if ARG is omitted or nil.
+
+When Tooltip mode is enabled, Emacs displays help text in a
+pop-up window for buttons and menu items that you put the mouse
+on. \(However, if `tooltip-use-echo-area' is non-nil, this and
all pop-up help appears in the echo area.)
When Tooltip mode is disabled, Emacs displays one line of
diff --git a/lisp/type-break.el b/lisp/type-break.el
index d276e64f6db..da3129ec576 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -431,13 +431,13 @@ problems."
type-break-mode)
(define-minor-mode type-break-mode-line-message-mode
- "Enable or disable warnings in the mode line about typing breaks.
+ "Toggle warnings about typing breaks in the mode line.
+With a prefix argument ARG, enable these warnings if ARG is
+positive, and disable them otherwise. If called from Lisp,
+enable them if ARG is omitted or nil.
-A negative PREFIX argument disables this mode.
-No argument or any non-negative argument enables it.
-
-The user may also enable or disable this mode simply by setting the
-variable of the same name.
+The user may also enable or disable this mode simply by setting
+the variable of the same name.
Variables controlling the display of messages in the mode line include:
@@ -448,17 +448,13 @@ Variables controlling the display of messages in the mode line include:
:global t)
(define-minor-mode type-break-query-mode
- "Enable or disable warnings in the mode line about typing breaks.
-
-When enabled, the user is periodically queried about whether to take a
-typing break at that moment. The function which does this query is
-specified by the variable `type-break-query-function'.
-
-A negative PREFIX argument disables this mode.
-No argument or any non-negative argument enables it.
+ "Toggle typing break queries.
+With a prefix argument ARG, enable these queries if ARG is
+positive, and disable them otherwise. If called from Lisp,
+enable them if ARG is omitted or nil.
-The user may also enable or disable this mode simply by setting the
-variable of the same name."
+The user may also enable or disable this mode simply by setting
+the variable of the same name."
:global t)
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index fbc267df44a..1b6890e5252 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-19 Chong Yidong <cyd@gnu.org>
+
+ * url-handlers.el (url-handler-mode): Doc fix.
+
2011-09-24 Christopher J. White <chris@grierwhite.com> (tiny change)
* url-http.el (url-http-create-request): Avoid adding extra CRLF
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index fef0ef15e95..d5f7eb7dd36 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -100,7 +100,10 @@ particularly bad at this\).")
;;;###autoload
(define-minor-mode url-handler-mode
- "Use URL to handle URL-like file names."
+ "Toggle using `url' library for URL filenames (URL Handler mode).
+With a prefix argument ARG, enable URL Handler mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil."
:global t :group 'url
(if (not (boundp 'file-name-handler-alist))
;; Can't be turned ON anyway.
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 392973e08fe..9f0fa584b0d 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -225,9 +225,16 @@ when editing big diffs)."
"Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.")
(define-minor-mode diff-auto-refine-mode
- "Automatically highlight changes in detail as the user visits hunks.
-When transitioning from disabled to enabled,
-try to refine the current hunk, as well."
+ "Toggle automatic diff hunk highlighting (Diff Auto Refine mode).
+With a prefix argument ARG, enable Diff Auto Refine mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+Diff Auto Refine mode is a buffer-local minor mode used with
+`diff-mode'. When enabled, Emacs automatically highlights
+changes in detail as the user visits hunks. When transitioning
+from disabled to enabled, it tries to refine the current hunk, as
+well."
:group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
(when diff-auto-refine-mode
(condition-case-no-debug nil (diff-refine-hunk) (error nil))))
@@ -1306,7 +1313,11 @@ a diff with \\[diff-reverse-direction].
;;;###autoload
(define-minor-mode diff-minor-mode
- "Minor mode for viewing/editing context diffs.
+ "Toggle Diff minor mode.
+With a prefix argument ARG, enable Diff minor mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
\\{diff-minor-mode-map}"
:group 'diff-mode :lighter " Diff"
;; FIXME: setup font-lock
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 0d904ec85c4..eeaa2cfa927 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1340,11 +1340,9 @@ this variable represents.")
ovr-list))))))))
-(defvar ediff-toggle-read-only-function nil
- "*Specifies the function to be used to toggle read-only.
-If nil, Ediff tries to deduce the function from the binding of C-x C-q.
-Normally, this is the `toggle-read-only' function, but, if version
-control is used, it could be `vc-toggle-read-only' or `rcs-toggle-read-only'.")
+(defvar ediff-toggle-read-only-function 'toggle-read-only
+ "Function to be used to toggle read-only status of the buffer.
+If nil, Ediff tries using the command bound to C-x C-q.")
(defcustom ediff-make-buffers-readonly-at-startup nil
"Make all variant buffers read-only when Ediff starts up.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index b3f5cfb78f7..c421304442f 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -386,7 +386,7 @@ uses the current buffer."
(setq setup (not setup)))
(when setup
(erase-buffer)
- (insert "Summary: ")
+ (insert "Summary: \nAuthor: ")
(save-excursion (insert "\n\n")))
(if mode
(funcall mode)
@@ -536,7 +536,7 @@ If you want to abort the commit, simply delete the buffer."
(or (= (point-min) (point-max))
(save-excursion
(goto-char (point-min))
- (while (and (looking-at "^\\(Summary: \\)?$")
+ (while (and (looking-at "^\\([a-zA-Z]+: \\)?$")
(zerop (forward-line 1))))
(eobp))))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 3ab1caf2864..cc28db689e9 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -866,7 +866,7 @@ stream. Standard error output is discarded."
(" M " . edited) ;; file text modified
(" *" . edited) ;; execute bit changed
(" M*" . edited) ;; text modified + execute bit changed
- ;; FIXME: what about ignored files?
+ ("I " . ignored)
(" D " . missing)
;; For conflicts, should we list the .THIS/.BASE/.OTHER?
("C " . conflict)
@@ -916,7 +916,7 @@ stream. Standard error output is discarded."
(push (list new-name 'edited
(vc-bzr-create-extra-fileinfo old-name)) result)))
;; do nothing for non existent files
- ((eq translated 'not-found))
+ ((memq translated '(not-found ignored)))
(t
(push (list (file-relative-name
(buffer-substring-no-properties
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index e7bfd273732..35fa11c2e5e 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -648,22 +648,8 @@ this function."
(throw 'found trial))))
templates))))
-(defun vc-toggle-read-only (&optional verbose)
- "Change read-only status of current buffer, perhaps via version control.
-
-If the buffer is visiting a file registered with version control,
-throw an error, because this is not a safe or really meaningful operation
-on any version-control system newer than RCS.
-
-Otherwise, just change the read-only flag of the buffer.
-
-If you bind this function to \\[toggle-read-only], then Emacs
-will properly intercept all attempts to toggle the read-only flag
-on version-controlled buffer."
- (interactive "P")
- (if (vc-backend buffer-file-name)
- (error "Toggling the readability of a version controlled file is likely to wreak havoc")
- (toggle-read-only)))
+(define-obsolete-function-alias
+ 'vc-toggle-read-only 'toggle-read-only "24.1")
(defun vc-default-make-version-backups-p (backend file)
"Return non-nil if unmodified versions should be backed up locally.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 62536fd94be..909585138fc 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -675,6 +675,8 @@
:type 'boolean
:group 'vc)
+(make-obsolete-variable 'vc-initial-comment "it has no effect." "23.2")
+
(defcustom vc-default-init-revision "1.1"
"A string used as the default revision number when a new file is registered.
This can be overridden by giving a prefix argument to \\[vc-register]. This
@@ -1118,9 +1120,13 @@ merge in the changes into your working copy."
;; Files have local changes
((vc-compatible-state state 'edited)
(let ((ready-for-commit files))
- ;; If files are edited but read-only, give user a chance to correct
+ ;; If files are edited but read-only, give user a chance to correct.
(dolist (file files)
- (unless (file-writable-p file)
+ ;; If committing a mix of removed and edited files, the
+ ;; fileset has state = 'edited. Rather than checking the
+ ;; state of each individual file in the fileset, it seems
+ ;; simplest to just check if the file exists. Bug#9781.
+ (when (and (file-exists-p file) (not (file-writable-p file)))
;; Make the file+buffer read-write.
(unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file))
(error "Aborted"))
diff --git a/lisp/view.el b/lisp/view.el
index 11cbc79449f..ef865007332 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -369,19 +369,24 @@ this argument instead of explicitly setting `view-exit-action'."
;; bindings instead of using the \\[] construction. The reason for this
;; is that most commands have more than one key binding.
"Toggle View mode, a minor mode for viewing text but not editing it.
-With prefix argument ARG, turn View mode on if ARG is positive, otherwise
-turn it off.
+With a prefix argument ARG, enable View mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable View mode
+if ARG is omitted or nil.
+
+When View mode is enabled, commands that do not change the buffer
+contents are available as usual. Kill commands insert text in
+kill buffers but do not delete. Most other commands beep and
+tell the user that the buffer is read-only.
-Emacs commands that do not change the buffer contents are available as usual.
-Kill commands insert text in kill buffers but do not delete. Other commands
-\(among them most letters and punctuation) beep and tell that the buffer is
-read-only.
\\<view-mode-map>
-The following additional commands are provided. Most commands take prefix
-arguments. Page commands default to \"page size\" lines which is almost a whole
-window full, or number of lines set by \\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size]. Half page commands default to
-and set \"half page size\" lines which initially is half a window full. Search
-commands default to a repeat count of one.
+
+The following additional commands are provided. Most commands
+take prefix arguments. Page commands default to \"page size\"
+lines which is almost a whole window, or number of lines set by
+\\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size].
+Half page commands default to and set \"half page size\" lines
+which initially is half a window full. Search commands default
+to a repeat count of one.
H, h, ? This message.
Digits provide prefix arguments.
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index e0bc74343d2..8dc1996734d 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1064,11 +1064,10 @@ Any other value is treated as nil."
;;;###autoload
(define-minor-mode whitespace-mode
- "Toggle whitespace minor mode visualization (\"ws\" on modeline).
-
-If ARG is null, toggle whitespace visualization.
-If ARG is a number greater than zero, turn on visualization;
-otherwise, turn off visualization.
+ "Toggle whitespace visualization (Whitespace mode).
+With a prefix argument ARG, enable Whitespace mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
See also `whitespace-style', `whitespace-newline' and
`whitespace-display-mappings'."
@@ -1088,11 +1087,10 @@ See also `whitespace-style', `whitespace-newline' and
;;;###autoload
(define-minor-mode whitespace-newline-mode
- "Toggle NEWLINE minor mode visualization (\"nl\" on modeline).
-
-If ARG is null, toggle NEWLINE visualization.
-If ARG is a number greater than zero, turn on visualization;
-otherwise, turn off visualization.
+ "Toggle newline visualization (Whitespace Newline mode).
+With a prefix argument ARG, enable Whitespace Newline mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable the mode if ARG is omitted or nil.
Use `whitespace-newline-mode' only for NEWLINE visualization
exclusively. For other visualizations, including NEWLINE
@@ -1116,11 +1114,10 @@ See also `whitespace-newline' and `whitespace-display-mappings'."
;;;###autoload
(define-minor-mode global-whitespace-mode
- "Toggle whitespace global minor mode visualization (\"WS\" on modeline).
-
-If ARG is null, toggle whitespace visualization.
-If ARG is a number greater than zero, turn on visualization;
-otherwise, turn off visualization.
+ "Toggle whitespace visualization globally (Global Whitespace mode).
+With a prefix argument ARG, enable Global Whitespace mode if ARG
+is positive, and disable it otherwise. If called from Lisp,
+enable it if ARG is omitted or nil.
See also `whitespace-style', `whitespace-newline' and
`whitespace-display-mappings'."
@@ -1174,11 +1171,10 @@ See also `whitespace-style', `whitespace-newline' and
;;;###autoload
(define-minor-mode global-whitespace-newline-mode
- "Toggle NEWLINE global minor mode visualization (\"NL\" on modeline).
-
-If ARG is null, toggle NEWLINE visualization.
-If ARG is a number greater than zero, turn on visualization;
-otherwise, turn off visualization.
+ "Toggle global newline visualization (Global Whitespace Newline mode).
+With a prefix argument ARG, enable Global Whitespace Newline mode
+if ARG is positive, and disable it otherwise. If called from
+Lisp, enable it if ARG is omitted or nil.
Use `global-whitespace-newline-mode' only for NEWLINE
visualization exclusively. For other visualizations, including
diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el
index b765e46b9c6..7ca13baeb53 100644
--- a/lisp/wid-browse.el
+++ b/lisp/wid-browse.el
@@ -270,8 +270,7 @@ VALUE is assumed to be a list of widgets."
;;;###autoload
(define-minor-mode widget-minor-mode
- "Togle minor mode for traversing widgets.
-With arg, turn widget mode on if and only if arg is positive."
+ "Minor mode for traversing widgets."
:lighter " Widget")
;;; The End:
diff --git a/lisp/window.el b/lisp/window.el
index 4d8b3c92b95..968f47f4f31 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1084,6 +1084,35 @@ regardless of whether that buffer is current or not."
(goto-char pos))
(set-window-point window pos)))
+(defun window-at-side-p (&optional window side)
+ "Return t if WINDOW is at SIDE of its containing frame.
+WINDOW can be any window and defaults to the selected one. SIDE
+can be any of the symbols `left', `top', `right' or `bottom'.
+The default value nil is handled like `bottom'."
+ (setq window (window-normalize-any-window window))
+ (let ((edge
+ (cond
+ ((eq side 'left) 0)
+ ((eq side 'top) 1)
+ ((eq side 'right) 2)
+ ((memq side '(bottom nil)) 3))))
+ (= (nth edge (window-edges window))
+ (nth edge (window-edges (frame-root-window window))))))
+
+(defun windows-at-side (&optional frame side)
+ "Return list of all windows on SIDE of FRAME.
+FRAME must be a live frame and defaults to the selected frame.
+SIDE can be any of the symbols `left', `top', `right' or
+`bottom'. The default value nil is handled like `bottom'."
+ (setq frame (window-normalize-frame frame))
+ (let (windows)
+ (walk-window-tree
+ (lambda (window)
+ (when (window-at-side-p window side)
+ (setq windows (cons window windows))))
+ frame)
+ (nreverse windows)))
+
(defun window-in-direction-2 (window posn &optional horizontal)
"Support function for `window-in-direction'."
(if horizontal
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index eca5f813ca2..09b2a7b88bd 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -199,8 +199,9 @@
;;;###autoload
(define-minor-mode xterm-mouse-mode
"Toggle XTerm mouse mode.
-With prefix arg, turn XTerm mouse mode on if arg is positive, otherwise turn
-it off.
+With a prefix argument ARG, enable XTerm mouse mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
This works in terminal emulators compatible with xterm. It only