summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog466
-rw-r--r--lisp/allout-widgets.el1
-rw-r--r--lisp/calc/calc-comb.el15
-rw-r--r--lisp/calc/calccomp.el2
-rw-r--r--lisp/calendar/cal-tex.el515
-rw-r--r--lisp/calendar/diary-lib.el31
-rw-r--r--lisp/calendar/holidays.el13
-rw-r--r--lisp/cus-face.el34
-rw-r--r--lisp/dired.el79
-rw-r--r--lisp/emacs-lisp/cl-lib.el2
-rw-r--r--lisp/emacs-lisp/gv.el5
-rw-r--r--lisp/erc/ChangeLog26
-rw-r--r--lisp/erc/erc-join.el4
-rw-r--r--lisp/erc/erc-match.el2
-rw-r--r--lisp/erc/erc.el174
-rw-r--r--lisp/eshell/em-unix.el2
-rw-r--r--lisp/eshell/esh-ext.el11
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/ffap.el2
-rw-r--r--lisp/files.el104
-rw-r--r--lisp/gnus/ChangeLog79
-rw-r--r--lisp/gnus/auth-source.el4
-rw-r--r--lisp/gnus/gnus-cus.el24
-rw-r--r--lisp/gnus/gnus-fun.el4
-rw-r--r--lisp/gnus/gnus-int.el7
-rw-r--r--lisp/gnus/gnus-msg.el23
-rw-r--r--lisp/gnus/gnus-notifications.el187
-rw-r--r--lisp/gnus/gnus-range.el12
-rw-r--r--lisp/gnus/gnus-registry.el7
-rw-r--r--lisp/gnus/gnus-sum.el24
-rw-r--r--lisp/gnus/gnus-sync.el2
-rw-r--r--lisp/gnus/message.el5
-rw-r--r--lisp/gnus/qp.el22
-rw-r--r--lisp/help-fns.el8
-rw-r--r--lisp/help.el44
-rw-r--r--lisp/ibuffer.el2
-rw-r--r--lisp/info.el65
-rw-r--r--lisp/isearch.el153
-rw-r--r--lisp/json.el19
-rw-r--r--lisp/ldefs-boot.el502
-rw-r--r--lisp/minibuffer.el4
-rw-r--r--lisp/misc.el4
-rw-r--r--lisp/net/rcirc.el40
-rw-r--r--lisp/net/sasl.el2
-rw-r--r--lisp/net/tramp-sh.el6
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/obsolete/vc-mcvs.el2
-rw-r--r--lisp/org/ChangeLog6
-rw-r--r--lisp/org/org-id.el2
-rw-r--r--lisp/paren.el11
-rw-r--r--lisp/play/5x5.el2
-rw-r--r--lisp/play/animate.el2
-rw-r--r--lisp/play/blackbox.el3
-rw-r--r--lisp/play/cookie1.el3
-rw-r--r--lisp/play/dissociate.el2
-rw-r--r--lisp/play/doctor.el2
-rw-r--r--lisp/play/dunnet.el1
-rw-r--r--lisp/play/gomoku.el2
-rw-r--r--lisp/play/landmark.el2
-rw-r--r--lisp/play/life.el6
-rw-r--r--lisp/play/mpuz.el2
-rw-r--r--lisp/play/tetris.el2
-rw-r--r--lisp/play/zone.el2
-rw-r--r--lisp/progmodes/bug-reference.el13
-rw-r--r--lisp/progmodes/compile.el13
-rw-r--r--lisp/progmodes/executable.el3
-rw-r--r--lisp/progmodes/gdb-mi.el241
-rw-r--r--lisp/progmodes/gud.el6
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/hideshow.el2
-rw-r--r--lisp/progmodes/js.el5
-rw-r--r--lisp/progmodes/ruby-mode.el26
-rw-r--r--lisp/progmodes/sh-script.el30
-rw-r--r--lisp/server.el1
-rw-r--r--lisp/simple.el34
-rw-r--r--lisp/skeleton.el2
-rw-r--r--lisp/term.el284
-rw-r--r--lisp/type-break.el1
-rw-r--r--lisp/vc/vc-cvs.el8
-rw-r--r--lisp/vc/vc.el4
-rw-r--r--lisp/window.el992
-rw-r--r--lisp/woman.el2
82 files changed, 2999 insertions, 1463 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d748214959d..d4630d36691 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,454 @@
+2012-09-04 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el: Clean up keybindings.
+ (ruby-mode-map): Don't bind ruby-electric-brace,
+ ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun,
+ backward-kill-word, reindent-then-newline-and-indent.
+ (ruby-mark-defun): Remove.
+ (ruby-electric-brace): Remove. Obsoleted by electric-indent-chars.
+ (ruby-mode): Set local beginning-of-defun-function and
+ end-of-defun-function values.
+
+2012-09-03 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (temp-buffer-window-setup-hook)
+ (temp-buffer-window-show-hook): New hooks.
+ (temp-buffer-window-setup, temp-buffer-window-show)
+ (with-temp-buffer-window): New functions.
+ (fit-window-to-buffer): Remove unused optional argument
+ OVERRIDE.
+ (special-display-popup-frame): Make sure the window used shows
+ BUFFER.
+
+ * help.el (temp-buffer-resize-mode): Fix doc-string.
+ (resize-temp-buffer-window): New optional argument WINDOW.
+
+ * files.el (recover-file, save-buffers-kill-emacs):
+ * dired.el (dired-mark-pop-up): Use with-temp-buffer-window.
+
+2012-09-02 Michael Albinus <michael.albinus@gmx.de>
+
+ * eshell/em-unix.el (eshell/sudo): When we have an ad-hoc
+ remote definition of `default-directory', ensure we can connect.
+
+2012-09-02 Juri Linkov <juri@jurta.org>
+
+ Toggle whitespace matching mode with M-s SPC.
+ http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00008.html
+
+ * isearch.el (search-whitespace-regexp): Doc fix.
+ Remove cons cell customization.
+ (isearch-mode-map): Bind "\M-s " to isearch-toggle-lax-whitespace.
+ (isearch-lax-whitespace, isearch-regexp-lax-whitespace):
+ New variables.
+ (isearch-forward, isearch-forward-regexp): Doc fix.
+ (isearch-toggle-lax-whitespace): New command.
+ (search-forward-lax-whitespace, search-backward-lax-whitespace)
+ (re-search-forward-lax-whitespace)
+ (re-search-backward-lax-whitespace): New functions.
+ (isearch-whitespace-regexp): Remove function.
+ (isearch-query-replace): Let-bind replace-search-function and
+ replace-re-search-function.
+ (isearch-occur): Let-bind search-spaces-regexp according to the
+ value of isearch-lax-whitespace and isearch-regexp-lax-whitespace.
+ (isearch-quote-char): Check isearch-regexp-lax-whitespace in the
+ condition for C-q SPC.
+ (isearch-search-fun-default): Use new functions mentioned above.
+ (isearch-search-forward, isearch-search-backward): Remove functions.
+ (isearch-search): Don't let-bind search-spaces-regexp.
+ (isearch-lazy-highlight-space-regexp): Remove variable.
+ (isearch-lazy-highlight-lax-whitespace)
+ (isearch-lazy-highlight-regexp-lax-whitespace): New variables.
+ (isearch-lazy-highlight-new-loop): Use them.
+ (isearch-lazy-highlight-search): Don't let-bind search-spaces-regexp.
+
+2012-09-02 Chong Yidong <cyd@gnu.org>
+
+ * dired.el (dired-mode-map): Menu string fixes (Bug#11616).
+
+2012-09-02 Glenn Morris <rgm@gnu.org>
+
+ * simple.el (undo): Tweak message in undo-only case. (Bug#12283)
+
+2012-09-01 Glenn Morris <rgm@gnu.org>
+
+ * term.el: Tidy up menu definitions.
+ (term-mode-map): Use easymenu for In/Out, Complete menus.
+ (term-pager-break-map): Initialize in the defvar.
+ (term-terminal-menu, term-signals-menu): Define with easymenu.
+ (term-terminal-menu): Also show it in line-mode. (Bug#11957)
+ (term-pager-menu): New, extracted from term-process-pager.
+ (term-mode, term-char-mode, term-process-pager): Use easymenu-add.
+ (term-update-mode-line): Propertize line/char and page items.
+ (term-process-pager): Move keymap initialization elsewhere.
+
+2012-09-01 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (switch-to-prev-buffer): Handle additional values of
+ BURY-OR-KILL argument. Don't switch in minibuffer window.
+ (switch-to-next-buffer): Don't switch in minibuffer window.
+ (quit-restore-window): New function based on quit-window.
+ Handle additional values of former KILL argument.
+ (quit-window): Call quit-restore-window with appropriate
+ interpretation of KILL argument.
+ (display-buffer-below-selected): New buffer display action
+ function.
+
+2012-09-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el (completion-at-point-functions): Complete docstring
+ (bug#12254).
+
+2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ Better seed support for (random).
+ * play/5x5.el, play/animate.el, play/cookie1.el, play/dissociate.el:
+ * play/doctor.el, play/dunnet.el, play/gomoku.el, play/landmark.el:
+ * play/mpuz.el, play/tetris.el, play/zone.el:
+ * calc/calc-comb.el (math-init-random-base):
+ * play/blackbox.el (bb-init-board):
+ * play/life.el (life):
+ * server.el (server-use-tcp):
+ * type-break.el (type-break):
+ Remove unnecessary call to (random t).
+ * net/sasl.el (sasl-unique-id-function):
+ Change (random t) to (random), now that the latter is more random.
+ * play/life.el (life-initialized): Remove no-longer-needed var.
+
+2012-08-31 Alp Aker <alp.tekin.aker@gmail.com>
+
+ * window.el (switch-to-prev-buffer, switch-to-next-buffer):
+ Consider frame's buffer predicate when choosing the buffer.
+ (Bug#12081)
+
+2012-08-30 Richard Stallman <rms@gnu.org>
+
+ * simple.el (special-mode-map): Delete binding for `z'.
+
+2012-08-30 Andreas Schwab <schwab@linux-m68k.org>
+
+ * progmodes/compile.el (compilation-always-kill): Doc fix.
+
+2012-08-30 Chong Yidong <cyd@gnu.org>
+
+ * window.el (display-buffer-reuse-frames): Make the obsolescence
+ message more informative.
+
+2012-08-30 Glenn Morris <rgm@gnu.org>
+
+ * paren.el (show-paren-delay):
+ Add a :set function. Doc fix. (Bug#12297)
+
+2012-08-29 Martin Blais <blais@furius.ca> (tiny change)
+
+ * progmodes/compile.el (compilation-always-kill): New var.
+ (compilation-start): Use it.
+
+2012-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (read-only-mode): Move from files.el for bootstrapping.
+ * files.el (read-only-mode): Move to simple.el.
+
+ * files.el (read-only-mode): New minor mode.
+ (toggle-read-only): Use it and mark obsolete.
+ (find-file--read-only):
+ * vc/vc.el (vc-next-action, vc-checkout):
+ * vc/vc-cvs.el (vc-cvs-checkout):
+ * obsolete/vc-mcvs.el (vc-mcvs-update):
+ * ffap.el (ffap--toggle-read-only): Update callers.
+
+2012-08-29 Michael Albinus <michael.albinus@gmx.de>
+
+ * eshell/esh-ext.el (eshell-external-command): Do not examine
+ remote shell scripts. See
+ <https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/1035790>.
+
+ * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and
+ "/usr/local/sbin".
+
+2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293).
+
+2012-08-28 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
+ completion-at-point. (Bug#12220)
+
+ * skeleton.el (skeleton-untabify): Change to nil (bug#12223).
+
+ * progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
+
+2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * files.el (safe-local-eval-forms): Fix before-save-hook entry to
+ be buffer-local; add delete-trailing-whitespace (bug#12259).
+
+2012-08-28 Jeremy Moore <jmoore@ieee.org> (tiny change)
+
+ * progmodes/hideif.el (hif-compress-define-list):
+ Fix typo. (Bug#11951)
+
+2012-08-28 Dan Nicolaescu <dann@gnu.org>
+
+ * progmodes/hideshow.el (hs-block-end-regexp): Restore lost
+ buffer local setting.
+
+ * net/rcirc.el (rcirc-split-message): Fix for buffer-local
+ rcirc-encode-coding-system.
+
+2012-08-28 Leo Liu <sdl.web@gmail.com>
+
+ * net/rcirc.el (rcirc-split-message): New function.
+ (rcirc-send-message): Use it. (Bug#12051)
+
+2012-08-28 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-fontify-node): Hide empty lines at the end of
+ the node. (Bug#12272)
+
+2012-08-27 Drew Adams <drew.adams@oracle.com>
+
+ * dired.el (dired-pop-to-buffer): Make window start at beginning
+ of buffer (Bug#12281).
+
+2012-08-26 Chong Yidong <cyd@gnu.org>
+
+ * window.el (special-display-regexps, special-display-frame-alist)
+ (special-display-buffer-names, special-display-function)
+ (display-buffer-reuse-frames): Mark as obsolete.
+
+ * progmodes/compile.el: Don't use display-buffer-reuse-frames.
+
+ * help.el (help-print-return-message): Don't treat
+ display-buffer-reuse-frames specially.
+
+2012-08-26 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action):
+ New variable, replacing gdb-frame-parameters.
+ (gdb-frame-io-buffer, gdb-frame-breakpoints-buffer)
+ (gdb-frame-threads-buffer, gdb-frame-memory-buffer)
+ (gdb-frame-disassembly-buffer, gdb-frame-stack-buffer)
+ (gdb-frame-locals-buffer, gdb-frame-registers-buffer): Use it.
+ (def-gdb-frame-for-buffer): Macro deleted. It is easier to define
+ the functions directly with gdb-display-buffer-other-frame-action.
+ (gdb-display-breakpoints-buffer, gdb-display-threads-buffer)
+ (gdb-display-memory-buffer, gdb-display-disassembly-buffer)
+ (gdb-display-stack-buffer, gdb-display-locals-buffer)
+ (gdb-display-registers-buffer): Define directly.
+ (def-gdb-display-buffer): Macro deleted.
+ (gdb-display-buffer): Remove second and third args, callers don't
+ use them. Defer to the default display-buffer behavior, apart
+ from making windows dedicated.
+ (gdb-setup-windows): Don't call display-buffer unnecessarily.
+
+ * progmodes/gud.el (gud-display-line): Just use display-buffer.
+
+ * window.el (display-buffer-pop-up-frame): Handle a
+ pop-up-frame-parameters alist entry.
+ (display-buffer): Document it.
+
+2012-08-26 Chong Yidong <cyd@gnu.org>
+
+ * isearch.el (search-whitespace-regexp): Make string and nil
+ values apply to both ordinary and regexp search. Allow a cons
+ cell value to distinguish between the two.
+ (isearch-whitespace-regexp, isearch-search-forward)
+ (isearch-search-backward): New functions.
+ (isearch-occur, isearch-search-fun-default, isearch-search)
+ (isearch-lazy-highlight-new-loop): Use them.
+ (isearch-forward, isearch-forward-regexp): Doc fix.
+
+2012-08-26 Chong Yidong <cyd@gnu.org>
+
+ * faces.el (help-argument-name): Always inherit from italic
+ (Bug#12213).
+
+2012-08-25 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window--even-window-heights): Even heights when
+ WINDOW and the selected window form a vertical combination.
+ (display-buffer-use-some-window): Provide that window used gets
+ sized back by quit-window. (Bug#11880) and (Bug#12091)
+
+2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix file time stamp problem with bzr and CVS (Bug#12001).
+ * vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information
+ in the file's time stamp, since the version control system loses
+ that information.
+
+2012-08-22 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-fontify-node): Hide the suffix of the
+ Info file name in the header line. (Bug#12187)
+
+2012-08-22 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-tex.el (cal-tex-weekly-common):
+ Restore leading blank page.
+
+2012-08-22 Le Wang <l26wang@gmail.com> (tiny change)
+
+ * misc.el (forward-to-word, backward-to-word): Activate or extend
+ the region under `shift-select-mode'. (Bug#12231)
+
+2012-08-22 Bastien Guerry <bzg@gnu.org>
+
+ * progmodes/executable.el (executable-prefix): Set to "#!" instead
+ of "#! ". http://www.in-ulm.de/~mascheck/various/shebang/#details
+ gives details on why the space is never needed.
+
+2012-08-22 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (walk-window-tree, window-with-parameter):
+ New optional argument MINIBUF to control whether these functions
+ should run on the minibuffer window.
+ (window-at-side-list): Don't operate on minibuffer window.
+ (window-in-direction): Simplify and rewrite doc-string.
+ (window--size-ignore): Rename to window--size-ignore-p.
+ Update callers.
+ (display-buffer-in-atom-window, window--major-non-side-window)
+ (window--major-side-window, display-buffer-in-major-side-window)
+ (delete-side-window, display-buffer-in-side-window):
+ New functions.
+ (window--side-check, window-deletable-p, delete-window)
+ (delete-other-windows, split-window): Handle side windows and
+ atomic windows appropriately.
+ (window--display-buffer): Call display-buffer-record-window also
+ when the window buffer did not change.
+
+2012-08-22 Christopher Schmidt <christopher@ch.ristopher.com>
+
+ * help-fns.el (help-fns--key-bindings):
+ Abbreviate non-symbol remap targets. (Bug#12174)
+
+2012-08-22 Martin Rudalics <rudalics@gmx.at>
+
+ * dired.el (dired-mark-remembered): Don't clobber point.
+ (Bug#11795)
+
+2012-08-22 Glenn Morris <rgm@gnu.org>
+
+ * progmodes/bug-reference.el (bug-reference): New custom group.
+ (bug-reference-bug-regexp): Make it a defcustom.
+
+2012-08-22 Daiki Ueno <ueno@unixuser.org>
+
+ * progmodes/js.el (js-indent-level, js-expr-indent-offset)
+ (js-paren-indent-offset, js-square-indent-offset)
+ (js-curly-indent-offset): Add :safe (Bug#12257).
+
+2012-08-22 Edward O'Connor <hober0@gmail.com>
+
+ * json.el (json-key-format): Add error properties.
+ (json-encode-key): New function.
+ (json-encode-hash-table, json-encode-alist, json-encode-plist):
+ Use json-encode-key.
+
+2012-08-22 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-tex.el (cal-tex-longday): New function, replacing...
+ (cal-tex-leftday, cal-tex-rightday): Remove functions.
+ (cal-tex-weekly-common, cal-tex-cursor-filofax-2week):
+ Update for above change.
+
+2012-08-21 Andreas Schwab <schwab@linux-m68k.org>
+
+ * cus-face.el (custom-face-attributes): Fix customize type for the
+ :underline attribute. (Bug#11805)
+
+2012-08-21 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window-point-1, set-window-point-1): Remove.
+ (window-in-direction, record-window-buffer)
+ (set-window-buffer-start-and-point, split-window-below)
+ (window--state-get-1, display-buffer-record-window):
+ Replace calls to window-point-1 and set-window-point-1 by calls to
+ window-point and set-window-point respectively.
+
+2012-08-21 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-tex.el (cal-tex-weekly-common): New function.
+ (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week):
+ Use it.
+
+ * calendar/cal-tex.el (cal-tex-rightday): Add optional funcname arg.
+ (cal-tex-shortday): New function.
+ (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week)
+ (cal-tex-cursor-filofax-daily): Use the above.
+
+ * calendar/cal-tex.el (cal-tex-leftday, cal-tex-rightday):
+ New functions.
+ (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
+ (cal-tex-cursor-filofax-week): Use them.
+
+ * calendar/cal-tex.el (cal-tex-lefthead, cal-tex-righthead):
+ New constants.
+ (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
+ (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use them.
+
+ * calendar/cal-tex.el (cal-tex-preamble): Generate new buffers.
+ (cal-tex-end-document): Don't rely on buffer name.
+
+ * calendar/cal-tex.el (cal-tex-cursor-filofax-year):
+ Use cal-tex-vspace.
+ (cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf)
+ (cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd.
+ (cal-tex-scriptsize, cal-tex-huge, cal-tex-Huge, cal-tex-large):
+ Use cal-tex-arg.
+
+ * calendar/cal-tex.el (cal-tex-cursor-filofax-year)
+ (cal-tex-cursor-week, cal-tex-cursor-week2)
+ (cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance)
+ (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
+ (cal-tex-cursor-filofax-daily, cal-tex-cursor-day)
+ (cal-tex-insert-preamble, cal-tex-b-document)
+ (cal-tex-e-document, cal-tex-b-center, cal-tex-e-center):
+ Improve cal-tex-cmd usage.
+
+ * calendar/cal-tex.el (cal-tex-filofax-paper): New function.
+ (cal-tex-cursor-filofax-year, cal-tex-cursor-filofax-2week)
+ (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use it.
+ (cal-tex-weekly-paper): New function.
+ (cal-tex-cursor-week, cal-tex-cursor-week2)
+ (cal-tex-cursor-week-iso, cal-tex-cursor-week-monday)
+ (cal-tex-cursor-day): Use it.
+
+ * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance)
+ (cal-tex-cursor-filofax-week): Remove leading blank page.
+
+ * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
+ Add autoload cookie. For now at least, don't use color, since
+ no other cal-tex function does.
+
+ * calendar/cal-tex.el (cal-tex-cursor-week-iso)
+ (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
+ (cal-tex-cursor-filofax-daily): Correct start date for diary entries.
+
+2012-08-21 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-file-attributes): New variable.
+ (info-insert-file-contents): Add file attributes to
+ `Info-file-attributes'. Clear the caches `Info-index-nodes' and
+ `Info-toc-nodes' when previous modtime of the Info file is less
+ than new modtime.
+ (Info-toc-nodes, Info-index-nodes): Move definitions up to the top
+ of info.el. (Bug#12230)
+
+2012-08-20 Glenn Morris <rgm@gnu.org>
+
+ * calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
+ * calendar/holidays.el (calendar-holiday-list):
+ Report errors with display-warning rather than beep'n'sleep.
+
+2012-08-20 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-accept-process-output): Accept only output
+ from PROC. Otherwise, process filters and sentinels might be
+ confused. (Bug#12145)
+
2012-08-20 Chong Yidong <cyd@gnu.org>
* descr-text.el (describe-text-properties-1): Use overlays-in to
@@ -32,8 +483,8 @@
(yank-excluded-properties): Add font-lock-face and category.
(yank): Doc fix.
- * subr.el (remove-yank-excluded-properties): Obey
- yank-handled-properties. The special handling of font-lock-face
+ * subr.el (remove-yank-excluded-properties):
+ Obey yank-handled-properties. The special handling of font-lock-face
and category is now done this way, instead of being hard-coded.
(insert-for-yank-1): Remove font-lock-face handling.
(yank-handle-font-lock-face-property)
@@ -47,8 +498,8 @@
2012-08-17 Michael Albinus <michael.albinus@gmx.de>
- * net/tramp-sh.el (tramp-sh-handle-start-file-process): Eliminate
- superfluous prompt. (Bug#12203)
+ * net/tramp-sh.el (tramp-sh-handle-start-file-process):
+ Eliminate superfluous prompt. (Bug#12203)
2012-08-17 Chong Yidong <cyd@gnu.org>
@@ -75,8 +526,8 @@
(next-buffer, previous-buffer, split-window, balance-windows-2)
(set-window-text-height, window-buffer-height)
(fit-window-to-buffer, shrink-window-if-larger-than-buffer)
- (truncated-partial-width-window-p): Minor code adjustments. In
- doc-strings state whether the argument window has to denote a
+ (truncated-partial-width-window-p): Minor code adjustments.
+ In doc-strings state whether the argument window has to denote a
live, valid or any window.
2012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change)
@@ -251,7 +702,7 @@
2012-08-13 Bastien Guerry <bzg@gnu.org>
- * window.el (special-display-popup-frame): Small docstring
+ * window.el (special-display-popup-frame): Minor docstring
enhancement. (Bug#12172)
2012-08-13 Andreas Schwab <schwab@linux-m68k.org>
@@ -319,6 +770,7 @@
* files.el (hack-local-variables-filter): If an eval: form is not
known to be safe, and enable-local-variables is :safe, then ignore
the form totally, as is done for non-eval forms. (Bug#12155)
+ This is CVE-2012-3479.
2012-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 962a8fb557a..c5790603d11 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -1374,7 +1374,6 @@ FROM and TO must be in increasing order, as must be the pairs in RANGES."
;; (time-trial
;; '(let ((size 10000)
;; doing)
-;; (random t)
;; (dotimes (count size)
;; (setq doing (random size))
;; (funcall try doing (+ doing (random 5)))
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index 199bbf0ae35..431ea18f580 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -77,7 +77,7 @@
4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973
4987 4993 4999 5003])
-;; The variable math-prime-factors-finished is set by calcFunc-prfac to
+;; The variable math-prime-factors-finished is set by calcFunc-prfac to
;; indicate whether factoring is complete, and used by calcFunc-factors,
;; calcFunc-totient and calcFunc-moebius.
(defvar math-prime-factors-finished)
@@ -510,8 +510,8 @@
(while (<= (length math-stirling-local-cache) n)
(let ((i (1- (length math-stirling-local-cache)))
row)
- (setq math-stirling-local-cache
- (vconcat math-stirling-local-cache
+ (setq math-stirling-local-cache
+ (vconcat math-stirling-local-cache
(make-vector (length math-stirling-local-cache) nil)))
(aset math-stirling-cache k math-stirling-local-cache)
(while (< (setq i (1+ i)) (length math-stirling-local-cache))
@@ -572,7 +572,6 @@
(let ((i 200))
(while (> (setq i (1- i)) 0)
(math-random-base))))
- (random t)
(setq var-RandSeed nil
math-random-cache nil
math-random-shift -4) ; assume RAND_MAX >= 16383
@@ -629,7 +628,7 @@
(i (/ (+ n slop) 3))
(rnum 0))
(while (> i 0)
- (setq rnum
+ (setq rnum
(math-add
(math-random-three-digit-number)
(math-mul rnum 1000)))
@@ -823,11 +822,11 @@
(setq sum (%
(+
sum
- (calcFunc-mod
+ (calcFunc-mod
q 1000000))
111111))
- (setq q
- (math-quotient
+ (setq q
+ (math-quotient
q 1000000)))
(cond ((= (% sum 3) 0) '(nil 3))
((= (% sum 7) 0) '(nil 7))
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 51ea8e7b7a3..2f1c95b7668 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -86,7 +86,7 @@
(setq sn (math-to-underscores sn)))
sn)))
-;;; Give multiplication precendence when composing to avoid
+;;; Give multiplication precedence when composing to avoid
;;; writing a*(b c) instead of a b c
(defun math-compose-expr (a prec &optional div)
(let ((calc-multiplication-has-precedence t)
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index c8c80370dfa..9c01ab40c0c 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -237,6 +237,14 @@ The names are taken from `calendar-day-name-array'.")
"LaTeX code to insert one box with date info in calendar.
This definition is the heart of the calendar!")
+(defconst cal-tex-lefthead
+ "\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}\n"
+ "LaTeX code for left header.")
+
+(defconst cal-tex-righthead
+ "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}\n"
+ "LaTeX code for right header.")
+
(autoload 'holiday-in-range "holidays")
(define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.3")
@@ -253,14 +261,14 @@ This definition is the heart of the calendar!")
"Insert the LaTeX calendar preamble into `cal-tex-buffer'.
Preamble includes initial definitions for various LaTeX commands.
Optional string ARGS are included as options for the article document class."
- ;; FIXME use generate-new-buffer, and adjust cal-tex-end-document.
- (set-buffer (get-buffer-create cal-tex-buffer))
+ (set-buffer (generate-new-buffer cal-tex-buffer))
(insert (format "\\documentclass%s{article}\n"
(if (stringp args)
(format "[%s]" args)
"")))
(if (stringp cal-tex-preamble-extra)
(insert cal-tex-preamble-extra "\n"))
+ ;; FIXME boxwidth and boxheight unused?
(insert "\\hbadness 20000
\\hfuzz=1000pt
\\vbadness 20000
@@ -344,6 +352,54 @@ landscape mode with three rows of four months each."
(run-hooks 'cal-tex-year-hook))
(run-hooks 'cal-tex-hook))
+
+(defun cal-tex-filofax-paper (&optional year)
+ "Insert some page size settings for filofax layouts."
+ (insert "\\textwidth 3.25in
+\\textheight 6.5in
+\\headheight -0.875in
+\\topmargin 0pt
+")
+ (insert
+ ;; Why is this one subtly different? Who knows...
+ (if year "\\oddsidemargin 1.675in
+\\evensidemargin 1.675in
+"
+ "\\oddsidemargin 1.75in
+\\evensidemargin 1.5in
+\\headsep 0.125in
+\\footskip 0.125in
+")))
+
+(defun cal-tex-longday (funcname height)
+ "Insert LaTeX code for a long day function."
+ (insert "\\long\\def\\" funcname "#1#2#3#4#5{%
+ \\rule{\\textwidth}{0.3pt}\\\\%
+ \\hbox to \\textwidth{%
+ \\vbox to " height "{%
+ \\vspace*{2pt}%
+ \\hbox to \\textwidth{"
+ (if (string-equal funcname "leftday")
+ "\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%\n"
+ "\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%\n")
+ " \\hbox to \\textwidth{\\vbox {\\"
+ (if (string-equal funcname "leftday") "noindent" "raggedleft")
+ " \\footnotesize \\em #4}}%
+ \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n"))
+
+(defun cal-tex-shortday (funcname)
+ "Insert LaTeX code for a short day function."
+ (insert "\\long\\def\\" funcname "#1#2#3{%
+ \\rule{\\textwidth}{0.3pt}\\\\%
+ \\hbox to \\textwidth{%
+ \\vbox {%
+ \\vspace*{2pt}%
+ \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
+ \\hbox to \\textwidth{\\vbox {\\"
+ (if (string-equal funcname "rightday") "raggedleft" "noindent")
+ " \\em #2}}%
+ \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}\n"))
+
;;;###cal-autoload
(defun cal-tex-cursor-filofax-year (&optional n event)
"Make a Filofax one page yearly calendar of year indicated by cursor.
@@ -354,16 +410,11 @@ Optional EVENT indicates a buffer position to use instead of point."
(or n (setq n 1))
(let ((year (calendar-extract-year (calendar-cursor-to-date t event))))
(cal-tex-preamble "twoside")
- (cal-tex-cmd "\\textwidth 3.25in")
- (cal-tex-cmd "\\textheight 6.5in")
- (cal-tex-cmd "\\oddsidemargin 1.675in")
- (cal-tex-cmd "\\evensidemargin 1.675in")
- (cal-tex-cmd "\\topmargin 0pt")
- (cal-tex-cmd "\\headheight -0.875in")
+ (cal-tex-filofax-paper 'year)
(cal-tex-cmd "\\fboxsep 0.5mm")
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(cal-tex-b-document)
- (cal-tex-cmd "\\vspace*{0.25in}")
+ (cal-tex-vspace "0.25in")
(dotimes (j n)
(insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year))
(cal-tex-b-center)
@@ -391,7 +442,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(if (= j (1- n))
(cal-tex-end-document)
(cal-tex-newpage)
- (cal-tex-cmd "\\vspace*{0.25in}"))
+ (cal-tex-vspace "0.25in"))
(run-hooks 'cal-tex-year-hook))
(run-hooks 'cal-tex-hook)))
@@ -653,6 +704,15 @@ this is only an upper bound."
{\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n"
"One hour and a line on the right.")
+(defun cal-tex-weekly-paper (&optional nomargins)
+ "Insert some page size settings for weekly layouts."
+ (insert "\\textwidth 6.5in
+\\textheight 10.5in
+")
+ (or nomargins (insert "\\oddsidemargin 0in
+\\evensidemargin 0in
+")))
+
;; TODO cal-tex-diary-support.
;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours).
;;;###cal-autoload
@@ -677,13 +737,10 @@ entries are not shown). The calendar shows the hours 8-12am, 1-5pm."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2))))
(cal-tex-preamble "11pt")
- (cal-tex-cmd "\\textwidth 6.5in")
- (cal-tex-cmd "\\textheight 10.5in")
- (cal-tex-cmd "\\oddsidemargin 0in")
- (cal-tex-cmd "\\evensidemargin 0in")
+ (cal-tex-weekly-paper)
(insert cal-tex-LaTeX-hourbox)
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@@ -732,13 +789,10 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2))))
(cal-tex-preamble "12pt")
- (cal-tex-cmd "\\textwidth 6.5in")
- (cal-tex-cmd "\\textheight 10.5in")
- (cal-tex-cmd "\\oddsidemargin 0in")
- (cal-tex-cmd "\\evensidemargin 0in")
+ (cal-tex-weekly-paper)
(insert cal-tex-LaTeX-hourbox)
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@@ -816,18 +870,12 @@ position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
- (cal-tex-list-diary-entries
- ;; FIXME d1?
- (calendar-absolute-from-gregorian (list month 1 year))
- d2)))
+ (cal-tex-list-diary-entries d1 d2)))
s)
(cal-tex-preamble "11pt")
- (cal-tex-cmd "\\textwidth 6.5in")
- (cal-tex-cmd "\\textheight 10.5in")
- (cal-tex-cmd "\\oddsidemargin 0in")
- (cal-tex-cmd "\\evensidemargin 0in")
+ (cal-tex-weekly-paper)
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@@ -944,10 +992,7 @@ to use instead of point."
(calendar-absolute-from-gregorian
(calendar-cursor-to-date t event))))))
(cal-tex-preamble "11pt")
- (cal-tex-cmd "\\textwidth 6.5in")
- (cal-tex-cmd "\\textheight 10.5in")
- (cal-tex-cmd "\\oddsidemargin 0in")
- (cal-tex-cmd "\\evensidemargin 0in")
+ (cal-tex-weekly-paper)
(cal-tex-b-document)
(dotimes (i n)
(cal-tex-vspace "-1cm")
@@ -1009,15 +1054,8 @@ shown are hard-coded to 8-12, 13-17."
(cal-tex-e-framebox)
(cal-tex-hspace "1cm")))
-(defun cal-tex-cursor-week-at-a-glance (&optional n event)
- "One-week-at-a-glance full page calendar for week indicated by cursor.
-Optional prefix argument N specifies number of weeks (default 1),
-starting on Mondays. The calendar shows holiday and diary entries
-if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
-It does not show hours of the day. Optional EVENT indicates a buffer
-position to use instead of point."
- (interactive (list (prefix-numeric-value current-prefix-arg)
- last-nonmenu-event))
+(defun cal-tex-weekly-common (n event &optional filofax)
+ "Common code for weekly calendars."
(or n (setq n 1))
(let* ((date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
@@ -1033,45 +1071,37 @@ position to use instead of point."
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries d1 d2))))
- (cal-tex-preamble "twoside,12pt")
- (cal-tex-cmd "\\usepackage{color}")
- (cal-tex-cmd "\\textwidth 7in")
- (cal-tex-cmd "\\textheight 10.5in")
- (cal-tex-cmd "\\oddsidemargin 0in")
- (cal-tex-cmd "\\evensidemargin 0in")
- (cal-tex-cmd "\\topmargin 0pt")
- (cal-tex-cmd "\\headheight -0.875in")
- (cal-tex-cmd "\\headsep 0.125in")
- (cal-tex-cmd "\\footskip .125in")
- (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
-\\long\\def\\rightday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 2.75in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
-\\long\\def\\weekend#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 1.8in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
-\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
-\\long\\def\\leftday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 2.75in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em \\textcolor{red}{#4}}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
+ (if filofax
+ (progn
+ (cal-tex-preamble "twoside")
+ (cal-tex-filofax-paper)
+ (insert cal-tex-righthead)
+ (cal-tex-longday "rightday" "1.85in")
+ (cal-tex-longday "weekend" "0.8in")
+ (insert cal-tex-lefthead)
+ (cal-tex-longday "leftday" "1.85in"))
+ (cal-tex-preamble "twoside,12pt")
+ (insert "\\textwidth 7in
+\\textheight 10.5in
+\\oddsidemargin 0in
+\\evensidemargin 0in
+\\topmargin 0pt
+\\headheight -0.875in
+\\headsep 0.125in
+\\footskip .125in
")
+ (insert cal-tex-righthead)
+ (cal-tex-longday "rightday" "2.75in")
+ (cal-tex-longday "weekend" "1.8in")
+ (insert cal-tex-lefthead)
+ (cal-tex-longday "leftday" "2.75in"))
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}\\ ")
+ (cal-tex-cmd "\\pagestyle" "empty")
+ ;; Let's assume this is something to with twopage documents.
+ ;; It has the downside that we start with a blank page.
+ ;; It doesn't make obvious sense when oddside and evenside margins
+ ;; are the same (non-filofax), but consider the left and right
+ ;; versions of various functions as applicable to even and odd pages.
(cal-tex-newpage)
(dotimes (i n)
(insert "\\lefthead")
@@ -1104,34 +1134,35 @@ position to use instead of point."
(insert "%\n")
(setq date (cal-tex-incr-date date)))
(insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
- (cal-tex-nl)
- (insert (cal-tex-mini-calendar
- (calendar-extract-month (cal-tex-previous-month date))
- (calendar-extract-year (cal-tex-previous-month date))
- "lastmonth" "1.1in" "1in"))
- (insert (cal-tex-mini-calendar
- (calendar-extract-month date)
- (calendar-extract-year date)
- "thismonth" "1.1in" "1in"))
- (insert (cal-tex-mini-calendar
- (calendar-extract-month (cal-tex-next-month date))
- (calendar-extract-year (cal-tex-next-month date))
- "nextmonth" "1.1in" "1in"))
- (insert "\\hbox to \\textwidth{")
- (cal-tex-hfill)
- (insert "\\lastmonth")
- (cal-tex-hfill)
- (insert "\\thismonth")
- (cal-tex-hfill)
- (insert "\\nextmonth")
- (cal-tex-hfill)
- (insert "}")
+ (unless filofax
+ (cal-tex-nl)
+ (insert (cal-tex-mini-calendar
+ (calendar-extract-month (cal-tex-previous-month date))
+ (calendar-extract-year (cal-tex-previous-month date))
+ "lastmonth" "1.1in" "1in"))
+ (insert (cal-tex-mini-calendar
+ (calendar-extract-month date)
+ (calendar-extract-year date)
+ "thismonth" "1.1in" "1in"))
+ (insert (cal-tex-mini-calendar
+ (calendar-extract-month (cal-tex-next-month date))
+ (calendar-extract-year (cal-tex-next-month date))
+ "nextmonth" "1.1in" "1in"))
+ (insert "\\hbox to \\textwidth{")
+ (cal-tex-hfill)
+ (insert "\\lastmonth")
+ (cal-tex-hfill)
+ (insert "\\thismonth")
+ (cal-tex-hfill)
+ (insert "\\nextmonth")
+ (cal-tex-hfill)
+ (insert "}"))
(cal-tex-newpage)
(insert "\\righthead")
(cal-tex-arg
(let ((d (cal-tex-incr-date date 3)))
(if (= (calendar-extract-month date)
- (calendar-extract-month d))
+ (calendar-extract-month d))
(format "%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date))
@@ -1172,6 +1203,18 @@ position to use instead of point."
(run-hooks 'cal-tex-hook)))
;;;###cal-autoload
+(defun cal-tex-cursor-week-at-a-glance (&optional n event)
+ "One-week-at-a-glance full page calendar for week indicated by cursor.
+Optional prefix argument N specifies number of weeks (default 1),
+starting on Mondays. The calendar shows holiday and diary entries
+if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
+It does not show hours of the day. Optional EVENT indicates a buffer
+position to use instead of point."
+ (interactive (list (prefix-numeric-value current-prefix-arg)
+ last-nonmenu-event))
+ (cal-tex-weekly-common n event))
+
+;;;###cal-autoload
(defun cal-tex-cursor-filofax-2week (&optional n event)
"Two-weeks-at-a-glance Filofax style calendar for week cursor is in.
Optional prefix argument N specifies number of weeks (default 1).
@@ -1194,40 +1237,15 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
- (cal-tex-list-diary-entries
- ;; FIXME d1?
- (calendar-absolute-from-gregorian (list month 1 year))
- d2))))
+ (cal-tex-list-diary-entries d1 d2))))
(cal-tex-preamble "twoside")
- (cal-tex-cmd "\\textwidth 3.25in")
- (cal-tex-cmd "\\textheight 6.5in")
- (cal-tex-cmd "\\oddsidemargin 1.75in")
- (cal-tex-cmd "\\evensidemargin 1.5in")
- (cal-tex-cmd "\\topmargin 0pt")
- (cal-tex-cmd "\\headheight -0.875in")
- (cal-tex-cmd "\\headsep 0.125in")
- (cal-tex-cmd "\\footskip .125in")
- (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
-\\long\\def\\rightday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 0.7in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
-\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
-\\long\\def\\leftday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 0.7in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
-")
+ (cal-tex-filofax-paper)
+ (insert cal-tex-righthead)
+ (cal-tex-longday "rightday" "0.7in")
+ (insert cal-tex-lefthead)
+ (cal-tex-longday "leftday" "0.7in")
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(if (zerop (mod i 2))
(insert "\\righthead")
@@ -1277,138 +1295,7 @@ if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
Optional EVENT indicates a buffer position to use instead of point."
(interactive (list (prefix-numeric-value current-prefix-arg)
last-nonmenu-event))
- (or n (setq n 1))
- (let* ((date (calendar-gregorian-from-absolute
- (calendar-dayname-on-or-before
- 1
- (calendar-absolute-from-gregorian
- (calendar-cursor-to-date t event)))))
- (month (calendar-extract-month date))
- (year (calendar-extract-year date))
- (day (calendar-extract-day date))
- (d1 (calendar-absolute-from-gregorian date))
- (d2 (+ (* 7 n) d1))
- (holidays (if cal-tex-holidays
- (holiday-in-range d1 d2)))
- (diary-list (if cal-tex-diary
- (cal-tex-list-diary-entries
- ;; FIXME d1?
- (calendar-absolute-from-gregorian (list month 1 year))
- d2))))
- (cal-tex-preamble "twoside")
- (cal-tex-cmd "\\textwidth 3.25in")
- (cal-tex-cmd "\\textheight 6.5in")
- (cal-tex-cmd "\\oddsidemargin 1.75in")
- (cal-tex-cmd "\\evensidemargin 1.5in")
- (cal-tex-cmd "\\topmargin 0pt")
- (cal-tex-cmd "\\headheight -0.875in")
- (cal-tex-cmd "\\headsep 0.125in")
- (cal-tex-cmd "\\footskip .125in")
- (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
-\\long\\def\\rightday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 1.85in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
-\\long\\def\\weekend#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to .8in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
-\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
-\\long\\def\\leftday#1#2#3#4#5{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox to 1.85in{%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}%
- \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
-")
- (cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}\\ ")
- (cal-tex-newpage)
- (dotimes (i n)
- (insert "\\lefthead")
- (cal-tex-arg
- (let ((d (cal-tex-incr-date date 2)))
- (if (= (calendar-extract-month date)
- (calendar-extract-month d))
- (format "%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (calendar-extract-year date))
- (if (= (calendar-extract-year date)
- (calendar-extract-year d))
- (format "%s---%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (cal-tex-month-name (calendar-extract-month d))
- (calendar-extract-year date))
- (format "%s %s---%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (calendar-extract-year date)
- (cal-tex-month-name (calendar-extract-month d))
- (calendar-extract-year d))))))
- (insert "%\n")
- (dotimes (_jdummy 3)
- (insert "\\leftday")
- (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
- (cal-tex-arg (number-to-string (calendar-extract-day date)))
- (cal-tex-arg (cal-tex-latexify-list diary-list date))
- (cal-tex-arg (cal-tex-latexify-list holidays date))
- (cal-tex-arg (eval cal-tex-daily-string))
- (insert "%\n")
- (setq date (cal-tex-incr-date date)))
- (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
- (cal-tex-newpage)
- (insert "\\righthead")
- (cal-tex-arg
- (let ((d (cal-tex-incr-date date 3)))
- (if (= (calendar-extract-month date)
- (calendar-extract-month d))
- (format "%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (calendar-extract-year date))
- (if (= (calendar-extract-year date)
- (calendar-extract-year d))
- (format "%s---%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (cal-tex-month-name (calendar-extract-month d))
- (calendar-extract-year date))
- (format "%s %s---%s %s"
- (cal-tex-month-name (calendar-extract-month date))
- (calendar-extract-year date)
- (cal-tex-month-name (calendar-extract-month d))
- (calendar-extract-year d))))))
- (insert "%\n")
- (dotimes (_jdummy 2)
- (insert "\\rightday")
- (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
- (cal-tex-arg (number-to-string (calendar-extract-day date)))
- (cal-tex-arg (cal-tex-latexify-list diary-list date))
- (cal-tex-arg (cal-tex-latexify-list holidays date))
- (cal-tex-arg (eval cal-tex-daily-string))
- (insert "%\n")
- (setq date (cal-tex-incr-date date)))
- (dotimes (_jdummy 2)
- (insert "\\weekend")
- (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
- (cal-tex-arg (number-to-string (calendar-extract-day date)))
- (cal-tex-arg (cal-tex-latexify-list diary-list date))
- (cal-tex-arg (cal-tex-latexify-list holidays date))
- (cal-tex-arg (eval cal-tex-daily-string))
- (insert "%\n")
- (setq date (cal-tex-incr-date date)))
- (unless (= i (1- n))
- (run-hooks 'cal-tex-week-hook)
- (cal-tex-newpage)))
- (cal-tex-end-document)
- (run-hooks 'cal-tex-hook)))
+ (cal-tex-weekly-common n event t))
;;;###cal-autoload
(defun cal-tex-cursor-filofax-daily (&optional n event)
@@ -1434,52 +1321,21 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
- (cal-tex-list-diary-entries
- ;; FIXME d1?
- (calendar-absolute-from-gregorian (list month 1 year))
- d2))))
+ (cal-tex-list-diary-entries d1 d2))))
(cal-tex-preamble "twoside")
- (cal-tex-cmd "\\textwidth 3.25in")
- (cal-tex-cmd "\\textheight 6.5in")
- (cal-tex-cmd "\\oddsidemargin 1.75in")
- (cal-tex-cmd "\\evensidemargin 1.5in")
- (cal-tex-cmd "\\topmargin 0pt")
- (cal-tex-cmd "\\headheight -0.875in")
- (cal-tex-cmd "\\headsep 0.125in")
- (cal-tex-cmd "\\footskip .125in")
- (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
-\\long\\def\\rightday#1#2#3{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox {%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
- \\hbox to \\textwidth{\\vbox {\\raggedleft \\em #2}}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
-\\long\\def\\weekend#1#2#3{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox {%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
-\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
-\\long\\def\\leftday#1#2#3{%
- \\rule{\\textwidth}{0.3pt}\\\\%
- \\hbox to \\textwidth{%
- \\vbox {%
- \\vspace*{2pt}%
- \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
- \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
-\\newbox\\LineBox
+ (cal-tex-filofax-paper)
+ (insert cal-tex-righthead)
+ (cal-tex-shortday "rightday")
+ (cal-tex-shortday "weekend")
+ (insert cal-tex-lefthead)
+ (cal-tex-shortday "leftday")
+ (insert "\\newbox\\LineBox
\\setbox\\LineBox=\\hbox to\\textwidth{%
\\vrule height.2in width0pt\\leaders\\hrule\\hfill}
\\def\\linesfill{\\par\\leaders\\copy\\LineBox\\vfill}
")
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(dotimes (j 4)
(let ((even (zerop (% j 2))))
@@ -1539,10 +1395,9 @@ a buffer position to use instead of point."
(let ((date (calendar-absolute-from-gregorian
(calendar-cursor-to-date t event))))
(cal-tex-preamble "12pt")
- (cal-tex-cmd "\\textwidth 6.5in")
- (cal-tex-cmd "\\textheight 10.5in")
+ (cal-tex-weekly-paper 'nomargins)
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}")
+ (cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.7in")
(cal-tex-daily-page (calendar-gregorian-from-absolute date))
@@ -1736,7 +1591,7 @@ informative header, and run HOOK."
;; FIXME latin1 might not always be right.
(insert "\\usepackage[latin1]{inputenc}\n"))))
(latex-mode)
- (pop-to-buffer cal-tex-buffer)
+ (pop-to-buffer (current-buffer))
(goto-char (point-min))
;; FIXME auctex equivalents?
(cal-tex-comment
@@ -1761,16 +1616,16 @@ non-nil, means add to end of buffer without erasing current contents."
(if (not landscape)
(progn
(cal-tex-cmd "\\oddsidemargin -1.75cm")
- (cal-tex-cmd "\\def\\holidaymult{.06}"))
- (cal-tex-cmd "\\special{landscape}")
+ (cal-tex-cmd "\\def\\holidaymult" ".06"))
+ (cal-tex-cmd "\\special" "landscape")
(cal-tex-cmd "\\textwidth 9.5in")
(cal-tex-cmd "\\textheight 7in")
(cal-tex-comment)
- (cal-tex-cmd "\\def\\holidaymult{.08}"))
+ (cal-tex-cmd "\\def\\holidaymult" ".08"))
(cal-tex-cmd cal-tex-caldate)
(cal-tex-cmd cal-tex-myday)
(cal-tex-b-document)
- (cal-tex-cmd "\\pagestyle{empty}"))
+ (cal-tex-cmd "\\pagestyle" "empty"))
(cal-tex-cmd "\\setlength{\\cellwidth}" width)
(insert (format "\\setlength{\\cellwidth}{%f\\cellwidth}\n"
(/ 1.1 (length cal-tex-which-days))))
@@ -1833,13 +1688,11 @@ non-nil, means add to end of buffer without erasing current contents."
(defun cal-tex-vspace (space)
"Insert vspace command to move SPACE vertically."
- (insert "\\vspace*{" space "}")
- (cal-tex-comment))
+ (cal-tex-cmd "\\vspace*" space))
(defun cal-tex-hspace (space)
"Insert hspace command to move SPACE horizontally."
- (insert "\\hspace*{" space "}")
- (cal-tex-comment))
+ (cal-tex-cmd "\\hspace*" space))
(defun cal-tex-comment (&optional comment)
"Insert `% ', followed by optional string COMMENT, followed by newline.
@@ -1878,20 +1731,20 @@ Add trailing COMMENT if present."
(defun cal-tex-b-document ()
"Insert beginning of document."
- (cal-tex-cmd "\\begin{document}"))
+ (cal-tex-cmd "\\begin" "document"))
(defun cal-tex-e-document ()
"Insert end of document."
- (cal-tex-cmd "\\end{document}"))
+ (cal-tex-cmd "\\end" "document"))
(defun cal-tex-b-center ()
"Insert beginning of centered block."
- (cal-tex-cmd "\\begin{center}"))
+ (cal-tex-cmd "\\begin" "center"))
(defun cal-tex-e-center ()
"Insert end of centered block."
(cal-tex-comment)
- (cal-tex-cmd "\\end{center}"))
+ (cal-tex-cmd "\\end" "center"))
;;;
@@ -1946,35 +1799,35 @@ Add trailing COMMENT if present."
(defun cal-tex-em (string)
"Insert STRING in italic font."
- (insert "\\textit{" string "}"))
+ (cal-tex-cmd "\\textit" string))
(defun cal-tex-bf (string)
"Insert STRING in bf font."
- (insert "\\textbf{ " string "}"))
+ (cal-tex-cmd "\\textbf" string))
(defun cal-tex-scriptsize (string)
"Insert STRING in scriptsize font."
- (insert "{\\scriptsize " string "}"))
+ (cal-tex-arg (concat "\\scriptsize " string)))
(defun cal-tex-huge (string)
"Insert STRING in huge font."
- (insert "{\\huge " string "}"))
+ (cal-tex-arg (concat "\\huge " string)))
(defun cal-tex-Huge (string)
"Insert STRING in Huge font."
- (insert "{\\Huge " string "}"))
+ (cal-tex-arg (concat "\\Huge " string)))
(defun cal-tex-Huge-bf (string)
"Insert STRING in Huge bf font."
- (insert "\\textbf{\\Huge " string "}"))
+ (cal-tex-cmd "\\textbf" (concat "\\Huge " string)))
(defun cal-tex-large (string)
"Insert STRING in large font."
- (insert "{\\large " string "}"))
+ (cal-tex-arg (concat "\\large " string)))
(defun cal-tex-large-bf (string)
"Insert STRING in large bf font."
- (insert "\\textbf{\\large " string "}"))
+ (cal-tex-cmd "\\textbf" (concat "\\large " string)))
(provide 'cal-tex)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 2e073fd1267..8fa5b0ddb07 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -951,12 +951,12 @@ This is recursive; that is, included files may include other files."
(setq diary-entries-list
(append diary-entries-list
(diary-list-entries original-date number t)))))
- (beep)
- (message "Can't read included diary file %s" diary-file)
- (sleep-for 2))
- (beep)
- (message "Can't find included diary file %s" diary-file)
- (sleep-for 2))))
+ (display-warning
+ :error
+ (format "Can't read included diary file %s\n" diary-file)))
+ (display-warning
+ :error
+ (format "Can't find included diary file %s\n" diary-file)))))
(goto-char (point-min)))
(defun diary-include-other-diary-files ()
@@ -1456,14 +1456,17 @@ marks. This is intended to deal with deleted diary entries."
(let ((result (if calendar-debug-sexp
(let ((debug-on-error t))
(eval (car (read-from-string sexp))))
- (condition-case nil
- (eval (car (read-from-string sexp)))
- (error
- (beep)
- (message "Bad sexp at line %d in %s: %s"
- (count-lines (point-min) (point))
- diary-file sexp)
- (sleep-for 2))))))
+ (let (err)
+ (condition-case err
+ (eval (car (read-from-string sexp)))
+ (error
+ (display-warning
+ :error
+ (format "Bad diary sexp at line %d in %s:\n%s\n\
+Error: %s\n"
+ (count-lines (point-min) (point))
+ diary-file sexp err))
+ nil))))))
(cond ((stringp result) result)
((and (consp result)
(stringp (cdr result))) result)
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 0bb3c231840..043d402f612 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -458,17 +458,20 @@ with descriptive strings such as
(defun calendar-holiday-list ()
"Form the list of holidays that occur on dates in the calendar window.
The holidays are those in the list `calendar-holidays'."
- (let (res h)
+ (let (res h err)
(sort
(dolist (p calendar-holidays res)
(if (setq h (if calendar-debug-sexp
(let ((debug-on-error t))
(eval p))
- (condition-case nil
+ (condition-case err
(eval p)
- (error (beep)
- (message "Bad holiday list item: %s" p)
- (sleep-for 2)))))
+ (error
+ (display-warning
+ :error
+ (format "Bad holiday list item: %s\nError: %s\n"
+ p err))
+ nil))))
(setq res (append h res))))
'calendar-date-compare)))
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index 3680a2648ce..06fd10149d3 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -136,12 +136,36 @@
:help-echo "Control text underlining."
(const :tag "Off" nil)
(list :tag "On"
+ :value (:color foreground-color :style line)
(const :format "" :value :color)
- (choice :tag "Color" (const :tag "Foreground Color" foreground-color) color)
- (const :format "" :value :style)
- (choice :tag "Style"
- (const :tag "Line" line)
- (const :tag "Wave" wave)))))
+ (choice :tag "Color"
+ (const :tag "Foreground Color" foreground-color)
+ color)
+ (const :format "" :value :style)
+ (choice :tag "Style"
+ (const :tag "Line" line)
+ (const :tag "Wave" wave))))
+ ;; filter to make value suitable for customize
+ (lambda (real-value)
+ (and real-value
+ (let ((color
+ (or (and (consp real-value) (plist-get real-value :color))
+ (and (stringp real-value) real-value)
+ 'foreground-color))
+ (style
+ (or (and (consp real-value) (plist-get real-value :style))
+ 'line)))
+ (list :color color :style style))))
+ ;; filter to make customized-value suitable for storing
+ (lambda (cus-value)
+ (and cus-value
+ (let ((color (plist-get cus-value :color))
+ (style (plist-get cus-value :style)))
+ (cond ((eq style 'line)
+ ;; Use simple value for default style
+ (if (eq color 'foreground-color) t color))
+ (t
+ `(:color ,color :style ,style)))))))
(:overline
(choice :tag "Overline"
diff --git a/lisp/dired.el b/lisp/dired.el
index 6684be3356c..cd27b6b6404 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1331,16 +1331,16 @@ DIRED-FILENAME WINDOW-POINT)."
"Mark all files remembered in ALIST.
Each element of ALIST looks like (FILE . MARKERCHAR)."
(let (elt fil chr)
- (while alist
- (setq elt (car alist)
- alist (cdr alist)
- fil (car elt)
- chr (cdr elt))
- (if (dired-goto-file fil)
- (save-excursion
- (beginning-of-line)
- (delete-char 1)
- (insert chr))))))
+ (save-excursion
+ (while alist
+ (setq elt (car alist)
+ alist (cdr alist)
+ fil (car elt)
+ chr (cdr elt))
+ (when (dired-goto-file fil)
+ (beginning-of-line)
+ (delete-char 1)
+ (insert chr))))))
(defun dired-remember-hidden ()
"Return a list of names of subdirs currently hidden."
@@ -1739,7 +1739,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map
[menu-bar operate epa-dired-do-decrypt]
- '(menu-item "Decrypt" epa-dired-do-decrypt
+ '(menu-item "Decrypt..." epa-dired-do-decrypt
:help "Decrypt file at cursor"))
(define-key map
@@ -1749,12 +1749,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map
[menu-bar operate epa-dired-do-sign]
- '(menu-item "Sign" epa-dired-do-sign
+ '(menu-item "Sign..." epa-dired-do-sign
:help "Create digital signature of file at cursor"))
(define-key map
[menu-bar operate epa-dired-do-encrypt]
- '(menu-item "Encrypt" epa-dired-do-encrypt
+ '(menu-item "Encrypt..." epa-dired-do-encrypt
:help "Encrypt file at cursor"))
(define-key map [menu-bar operate dashes-3]
@@ -2950,6 +2950,8 @@ or \"* [3 files]\"."
(split-window-sensibly window))))
pop-up-frames)
(pop-to-buffer (get-buffer-create buf)))
+ ;; See Bug#12281.
+ (set-window-start nil (point-min))
;; If dired-shrink-to-fit is t, make its window fit its contents.
(when dired-shrink-to-fit
;; Try to not delete window when we want to display less than
@@ -2971,36 +2973,43 @@ If t, confirmation is never needed."
(const shell) (const symlink) (const touch)
(const uncompress))))
-(defun dired-mark-pop-up (bufname op-symbol files function &rest args)
+(defun dired-mark-pop-up (buffer-or-name op-symbol files function &rest args)
"Return FUNCTION's result on ARGS after showing which files are marked.
-Displays the file names in a buffer named BUFNAME;
- nil gives \" *Marked Files*\".
-This uses function `dired-pop-to-buffer' to do that.
-
-FUNCTION should not manipulate files, just read input
- (an argument or confirmation).
-The window is not shown if there is just one file or
- OP-SYMBOL is a member of the list in `dired-no-confirm'.
+Displays the file names in a window showing a buffer named
+BUFFER-OR-NAME; the default name being \" *Marked Files*\". The
+window is not shown if there is just one file, `dired-no-confirm'
+is t, or OP-SYMBOL is a member of the list in `dired-no-confirm'.
+
FILES is the list of marked files. It can also be (t FILENAME)
in the case of one marked file, to distinguish that from using
-just the current file."
- (or bufname (setq bufname " *Marked Files*"))
+just the current file.
+
+FUNCTION should not manipulate files, just read input \(an
+argument or confirmation)."
(if (or (eq dired-no-confirm t)
(memq op-symbol dired-no-confirm)
;; If FILES defaulted to the current line's file.
(= (length files) 1))
(apply function args)
- (with-current-buffer (get-buffer-create bufname)
- (erase-buffer)
- ;; Handle (t FILE) just like (FILE), here.
- ;; That value is used (only in some cases), to mean
- ;; just one file that was marked, rather than the current line file.
- (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files))
- (remove-text-properties (point-min) (point-max)
- '(mouse-face nil help-echo nil)))
- (save-window-excursion
- (dired-pop-to-buffer bufname)
- (apply function args))))
+ (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))))
+ (with-current-buffer buffer
+ (let ((split-height-threshold 0))
+ (with-temp-buffer-window
+ buffer
+ (cons 'display-buffer-below-selected nil)
+ #'(lambda (window _value)
+ (with-selected-window window
+ (unwind-protect
+ (apply function args)
+ (when (window-live-p window)
+ (quit-restore-window window 'kill)))))
+ ;; Handle (t FILE) just like (FILE), here. That value is
+ ;; used (only in some cases), to mean just one file that was
+ ;; marked, rather than the current line file.
+ (dired-format-columns-of-files
+ (if (eq (car files) t) (cdr files) files))
+ (remove-text-properties (point-min) (point-max)
+ '(mouse-face nil help-echo nil))))))))
(defun dired-format-columns-of-files (files)
(let ((beg (point)))
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 86497a3c73f..532c81c502c 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -635,7 +635,7 @@ If ALIST is non-nil, the new pairs are prepended to it."
(set-buffer-modified-p ,flag)))
(gv-define-simple-setter buffer-name rename-buffer t)
(gv-define-setter buffer-string (store)
- `(progn (erase-buffer) (insert ,store)))
+ `(insert (prog1 ,store (erase-buffer))))
(gv-define-simple-setter buffer-substring cl--set-buffer-substring)
(gv-define-simple-setter current-buffer set-buffer)
(gv-define-simple-setter current-case-table set-case-table)
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index d1f997c99c4..4caa0a73866 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -191,8 +191,9 @@ well for simple place forms.
Assignments of VAL to (NAME ARGS...) are expanded by binding the argument
forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must
return a Lisp form that does the assignment.
-Actually, ARGLIST may be bound to temporary variables which are introduced
-automatically to preserve proper execution order of the arguments. Example:
+The first arg in ARLIST (the one that receives VAL) receives an expression
+which can do arbitrary things, whereas the other arguments are all guaranteed
+to be pure and copyable. Example use:
(gv-define-setter aref (v a i) `(aset ,a ,i ,v))"
(declare (indent 2) (debug (&define name sexp body)))
`(gv-define-expander ,name
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index b87cfd41f61..37e755e7655 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,29 @@
+2012-08-21 Josh Feinstein <jlf@foxtail.org>
+
+ * erc-join.el (erc-autojoin-timing): Fix defcustom type.
+
+2012-08-21 Julien Danjou <julien@danjou.info>
+
+ * erc-match.el (erc-match-message): Use
+ `erc-match-exclude-server-buffer' not
+ `erc-track-exclude-server-buffer'.
+
+2012-08-20 Josh Feinstein <jlf@foxtail.org>
+
+ * erc.el (erc-display-message): Abstract message hiding decision
+ to new function erc-hide-current-message-p.
+ (erc-lurker): New customization group.
+ (erc-lurker-state, erc-lurker-trim-nicks, erc-lurker-ignore-chars)
+ (erc-lurker-hide-list, erc-lurker-cleanup-interval)
+ (erc-lurker-threshold-time): New variables.
+ (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup)
+ (erc-hide-current-message-p, erc-canonicalize-server-name)
+ (erc-lurker-update-status, erc-lurker-p): New functions. Together
+ they maintain state about which users have spoken in the last
+ erc-lurker-threshold-time, with all other users being considered
+ lurkers whose messages of types in erc-lurker-hide-list will not
+ be displayed by erc-display-message.
+
2012-08-06 Julien Danjou <julien@danjou.info>
* erc-match.el (erc-match-exclude-server-buffer)
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index 85d1edf6427..ae7f90003a6 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -84,8 +84,8 @@ identification, or after `erc-autojoin-delay' seconds.
Any other value means the same as `connect'."
:group 'erc-autojoin
:version "24.1"
- :type '(choice (const :tag "On Connection" 'connect)
- (const :tag "When Identified" 'ident)))
+ :type '(choice (const :tag "On Connection" connect)
+ (const :tag "When Identified" ident)))
(defcustom erc-autojoin-delay 30
"Number of seconds to wait before attempting to autojoin channels.
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index 8daf9be2b14..cac042c0298 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -458,7 +458,7 @@ Use this defun with `erc-insert-modify-hook'."
(point-min))
(point-max))))
(when (and vector
- (not (and erc-track-exclude-server-buffer
+ (not (and erc-match-exclude-server-buffer
(erc-server-buffer-p))))
(mapc
(lambda (match-type)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 0fc308621b1..feef75940f3 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -100,6 +100,10 @@
"Ignoring certain messages"
:group 'erc)
+(defgroup erc-lurker nil
+ "Hide specified message types sent by lurkers"
+ :group 'erc-ignore)
+
(defgroup erc-query nil
"Using separate buffers for private discussions"
:group 'erc)
@@ -2455,6 +2459,174 @@ See also `erc-make-notice'."
string)
string)))
+(defvar erc-lurker-state nil
+ "Track the time of the last PRIVMSG for each (server,nick) pair.
+
+This is implemented as a hash of hashes, where the outer key is
+the canonicalized server name (as returned by
+`erc-canonicalize-server-name') and the outer value is a hash
+table mapping nicks (as returned by `erc-lurker-maybe-trim') to
+the times of their most recently received PRIVMSG on any channel
+on the given server.")
+
+(defcustom erc-lurker-trim-nicks t
+ "If t, trim trailing `erc-lurker-ignore-chars' from nicks.
+
+This causes e.g. nick and nick` to be considered as the same
+individual for activity tracking and lurkiness detection
+purposes."
+ :group 'erc-lurker
+ :type 'boolean)
+
+(defun erc-lurker-maybe-trim (nick)
+ "Maybe trim trailing `erc-lurker-ignore-chars' from NICK.
+
+Returns NICK unmodified unless `erc-lurker-trim-nicks' is
+non-nil."
+ (if erc-lurker-trim-nicks
+ (replace-regexp-in-string
+ (format "[%s]"
+ (mapconcat (lambda (char)
+ (regexp-quote (char-to-string char)))
+ erc-lurker-ignore-chars ""))
+ "" nick)
+ nick))
+
+(defcustom erc-lurker-ignore-chars "`_"
+ "Characters at the end of a nick to strip for activity tracking purposes.
+
+See also `erc-lurker-trim-nicks'."
+ :group 'erc-lurker
+ :type 'string)
+
+(defcustom erc-lurker-hide-list nil
+ "List of IRC type messages to hide when sent by lurkers.
+
+A typical value would be '(\"JOIN\" \"PART\" \"QUIT\").
+See also `erc-lurker-p' and `erc-hide-list'."
+ :group 'erc-lurker
+ :type 'erc-message-type)
+
+(defcustom erc-lurker-threshold-time (* 60 60 24) ; 24h by default
+ "Nicks from which no PRIVMSGs have been received within this
+interval (in units of seconds) are considered lurkers by
+`erc-lurker-p' and as a result their messages of types in
+`erc-lurker-hide-list' will be hidden."
+ :group 'erc-lurker
+ :type 'integer)
+
+(defun erc-lurker-initialize ()
+ "Initialize ERC lurker tracking functionality.
+
+This function adds `erc-lurker-update-status' to
+`erc-insert-pre-hook' in order to record the time of each nick's
+most recent PRIVMSG as well as initializing the state variable
+storing this information."
+ (setq erc-lurker-state (make-hash-table :test 'equal))
+ (add-hook 'erc-insert-pre-hook 'erc-lurker-update-status))
+
+(defun erc-lurker-cleanup ()
+ "Remove all last PRIVMSG state older than `erc-lurker-threshold-time'.
+
+This should be called regularly to avoid excessive resource
+consumption for long-lived IRC or Emacs sessions."
+ (maphash
+ (lambda (server hash)
+ (maphash
+ (lambda (nick last-PRIVMSG-time)
+ (when
+ (> (time-to-seconds (time-subtract
+ (current-time)
+ last-PRIVMSG-time))
+ erc-lurker-threshold-time)
+ (remhash nick hash)))
+ hash)
+ (if (zerop (hash-table-count hash))
+ (remhash server erc-lurker-state)))
+ erc-lurker-state))
+
+(defvar erc-lurker-cleanup-count 0
+ "Internal counter variable for use with `erc-lurker-cleanup-interval'.")
+
+(defvar erc-lurker-cleanup-interval 100
+ "Specifies frequency of cleaning up stale erc-lurker state.
+
+`erc-lurker-update-status' calls `erc-lurker-cleanup' once for
+every `erc-lurker-cleanup-interval' updates to
+`erc-lurker-state'. This is designed to limit the memory
+consumption of lurker state during long Emacs sessions and/or ERC
+sessions with large numbers of incoming PRIVMSGs.")
+
+(defun erc-lurker-update-status (message)
+ "Update `erc-lurker-state' if necessary.
+
+This function is called from `erc-insert-pre-hook'. If the
+current message is a PRIVMSG, update `erc-lurker-state' to
+reflect the fact that its sender has issued a PRIVMSG at the
+current time. Otherwise, take no action.
+
+This function depends on the fact that `erc-display-message'
+dynamically binds `parsed', which is used to check if the current
+message is a PRIVMSG and to determine its sender. See also
+`erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'.
+
+In order to limit memory consumption, this function also calls
+`erc-lurker-cleanup' once every `erc-lurker-cleanup-interval'
+updates of `erc-lurker-state'."
+ (when (and (boundp 'parsed) (erc-response-p parsed))
+ (let* ((command (erc-response.command parsed))
+ (sender
+ (erc-lurker-maybe-trim
+ (car (erc-parse-user (erc-response.sender parsed)))))
+ (server
+ (erc-canonicalize-server-name erc-server-announced-name)))
+ (when (equal command "PRIVMSG")
+ (when (>= (incf erc-lurker-cleanup-count) erc-lurker-cleanup-interval)
+ (setq erc-lurker-cleanup-count 0)
+ (erc-lurker-cleanup))
+ (unless (gethash server erc-lurker-state)
+ (puthash server (make-hash-table :test 'equal) erc-lurker-state))
+ (puthash sender (current-time)
+ (gethash server erc-lurker-state))))))
+
+(defun erc-lurker-p (nick)
+ "Predicate indicating NICK's lurking status on the current server.
+
+Lurking is the condition where NICK has issued no PRIVMSG on this
+server within `erc-lurker-threshold-time'. See also
+`erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'."
+ (unless erc-lurker-state (erc-lurker-initialize))
+ (let* ((server
+ (erc-canonicalize-server-name erc-server-announced-name))
+ (last-PRIVMSG-time
+ (gethash (erc-lurker-maybe-trim nick)
+ (gethash server erc-lurker-state (make-hash-table)))))
+ (or (null last-PRIVMSG-time)
+ (> (time-to-seconds
+ (time-subtract (current-time) last-PRIVMSG-time))
+ erc-lurker-threshold-time))))
+
+(defun erc-canonicalize-server-name (server)
+ "Returns the canonical network name for SERVER if any,
+otherwise `erc-server-announced-name'. SERVER is matched against
+`erc-common-server-suffixes'."
+ (when server
+ (or (cdar (erc-remove-if-not
+ (lambda (net) (string-match (car net) server))
+ erc-common-server-suffixes))
+ erc-server-announced-name)))
+
+(defun erc-hide-current-message-p (parsed)
+ "Predicate indicating whether the parsed ERC response PARSED should be hidden.
+
+Messages are always hidden if the message type of PARSED appears in
+`erc-hide-list'. In addition, messages whose type is a member of
+`erc-lurker-hide-list' are hidden if `erc-lurker-p' returns true."
+ (let* ((command (erc-response.command parsed))
+ (sender (car (erc-parse-user (erc-response.sender parsed)))))
+ (or (member command erc-hide-list)
+ (and (member command erc-lurker-hide-list) (erc-lurker-p sender)))))
+
(defun erc-display-message (parsed type buffer msg &rest args)
"Display MSG in BUFFER.
@@ -2479,7 +2651,7 @@ See also `erc-format-message' and `erc-display-line'."
(if (not (erc-response-p parsed))
(erc-display-line string buffer)
- (unless (member (erc-response.command parsed) erc-hide-list)
+ (unless (erc-hide-current-message-p parsed)
(erc-put-text-property 0 (length string) 'erc-parsed parsed string)
(erc-put-text-property 0 (length string) 'rear-sticky t string)
(erc-display-line string buffer)))))
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 35f7a0a9e3d..58402e37508 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.")
(format "%s|sudo:%s@%s:%s"
(substring prefix 0 -1) user host dir)
(format "/sudo:%s@%s:%s" user host dir))))
+ ;; Ensure, that Tramp has connected to that construct already.
+ (file-exists-p default-directory)
(eshell-named-command (car orig-args) (cdr orig-args))))))))
(put 'eshell/sudo 'eshell-no-numeric-conversions t)
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index 52df1587d5f..e48213c54d6 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -207,9 +207,14 @@ causing the user to wonder if anything's really going on..."
(defun eshell-external-command (command args)
"Insert output from an external COMMAND, using ARGS."
(setq args (eshell-stringify-list (eshell-flatten-list args)))
- ;; (if (file-remote-p default-directory)
- ;; (eshell-remote-command command args))
- (let ((interp (eshell-find-interpreter command)))
+ (let ((interp (eshell-find-interpreter
+ command
+ ;; `eshell-find-interpreter' does not work correctly
+ ;; for Tramp file name syntax. But we don't need to
+ ;; know the interpreter in that case, therefore the
+ ;; check is suppressed.
+ (or (and (stringp command) (file-remote-p command))
+ (file-remote-p default-directory)))))
(cl-assert interp)
(if (functionp (car interp))
(apply (car interp) (append (cdr interp) args))
diff --git a/lisp/faces.el b/lisp/faces.el
index 2e1ba7798e9..6a477e172e1 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2444,7 +2444,7 @@ Note: Other faces cannot inherit from the cursor face."
:group 'menu
:group 'basic-faces)
-(defface help-argument-name '((((supports :slant italic)) :inherit italic))
+(defface help-argument-name '((t :inherit italic))
"Face to highlight argument names in *Help* buffers."
:group 'help)
diff --git a/lisp/ffap.el b/lisp/ffap.el
index d0f3b639cf2..ebe8b6dee94 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1703,7 +1703,7 @@ Only intended for interactive use."
buffer-or-list
(list buffer-or-list)))
(with-current-buffer buffer
- (toggle-read-only 1))))
+ (read-only-mode 1))))
(defun ffap-read-only ()
"Like `ffap', but mark buffer as read-only.
diff --git a/lisp/files.el b/lisp/files.el
index 5caa4681884..6528632c841 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1456,7 +1456,7 @@ file names with wildcards."
(file-exists-p filename))
(error "%s does not exist" filename))
(let ((value (funcall fun filename wildcards)))
- (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
+ (mapc (lambda (b) (with-current-buffer b (read-only-mode 1)))
(if (listp value) value (list value)))
value))
@@ -2837,7 +2837,8 @@ symbol and VAL is a value that is considered safe."
;; This should be here at least as long as Emacs supports write-file-hooks.
'((add-hook 'write-file-hooks 'time-stamp)
(add-hook 'write-file-functions 'time-stamp)
- (add-hook 'before-save-hook 'time-stamp))
+ (add-hook 'before-save-hook 'time-stamp nil t)
+ (add-hook 'before-save-hook 'delete-trailing-whitespace nil t))
"Expressions that are considered safe in an `eval:' local variable.
Add expressions to this list if you want Emacs to evaluate them, when
they appear in an `eval' local variable specification, without first
@@ -4817,51 +4818,12 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
"Modification-flag cleared"))
(set-buffer-modified-p arg))
-(defun toggle-read-only (&optional arg message)
- "Toggle the read-only state of the current buffer.
-With prefix argument ARG, make the buffer read-only if ARG is
-positive; otherwise make it writable.
-
-When making the buffer read-only, enable View mode if
-`view-read-only' is non-nil. When making the buffer writable,
-disable View mode if View mode is enabled.
-
-If called interactively, or if called from Lisp with MESSAGE
-non-nil, print a message reporting the buffer's new read-only
-status.
-
-Do not call this from a Lisp program unless you really intend to
-do the same thing as the \\[toggle-read-only] command, including
-possibly enabling or disabling View mode. Also, note that this
-command works by setting the variable `buffer-read-only', which
-does not affect read-only regions caused by text properties. To
-ignore read-only status in a Lisp program (whether due to text
-properties or buffer state), bind `inhibit-read-only' temporarily
-to a non-nil value."
- (interactive "P")
- (cond
- ;; Do nothing if `buffer-read-only' already matches the state
- ;; specified by ARG.
- ((and arg
- (if (> (prefix-numeric-value arg) 0)
- buffer-read-only
- (not buffer-read-only))))
- ;; If View mode is enabled, exit it.
- ((and buffer-read-only view-mode)
- (View-exit-and-edit)
- (set (make-local-variable 'view-read-only) t))
- ;; If `view-read-only' is non-nil, enable View mode.
- ((and view-read-only
- (not buffer-read-only)
- (not view-mode)
- (not (eq (get major-mode 'mode-class) 'special)))
- (view-mode-enter))
- ;; The usual action: flip `buffer-read-only'.
- (t (setq buffer-read-only (not buffer-read-only))
- (force-mode-line-update)))
- (if (or message (called-interactively-p 'interactive))
- (message "Read-only %s for this buffer"
- (if buffer-read-only "enabled" "disabled"))))
+(defun toggle-read-only (&optional arg interactive)
+ (declare (obsolete read-only-mode "24.3"))
+ (interactive (list current-prefix-arg t))
+ (if interactive
+ (call-interactively 'read-only-mode)
+ (read-only-mode (or arg 'toggle))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
@@ -5388,23 +5350,26 @@ non-nil, it is called instead of rereading visited file contents."
(not (file-exists-p file-name)))
(error "Auto-save file %s not current"
(abbreviate-file-name file-name)))
- ((save-window-excursion
- (with-output-to-temp-buffer "*Directory*"
- (buffer-disable-undo standard-output)
- (save-excursion
- (let ((switches dired-listing-switches))
- (if (file-symlink-p file)
- (setq switches (concat switches " -L")))
- (set-buffer standard-output)
- ;; Use insert-directory-safely, not insert-directory,
- ;; because these files might not exist. In particular,
- ;; FILE might not exist if the auto-save file was for
- ;; a buffer that didn't visit a file, such as "*mail*".
- ;; The code in v20.x called `ls' directly, so we need
- ;; to emulate what `ls' did in that case.
- (insert-directory-safely file switches)
- (insert-directory-safely file-name switches))))
- (yes-or-no-p (format "Recover auto save file %s? " file-name)))
+ ((with-temp-buffer-window
+ "*Directory*" nil
+ #'(lambda (window _value)
+ (with-selected-window window
+ (unwind-protect
+ (yes-or-no-p (format "Recover auto save file %s? " file-name))
+ (when (window-live-p window)
+ (quit-restore-window window 'kill)))))
+ (with-current-buffer standard-output
+ (let ((switches dired-listing-switches))
+ (if (file-symlink-p file)
+ (setq switches (concat switches " -L")))
+ ;; Use insert-directory-safely, not insert-directory,
+ ;; because these files might not exist. In particular,
+ ;; FILE might not exist if the auto-save file was for
+ ;; a buffer that didn't visit a file, such as "*mail*".
+ ;; The code in v20.x called `ls' directly, so we need
+ ;; to emulate what `ls' did in that case.
+ (insert-directory-safely file switches)
+ (insert-directory-safely file-name switches))))
(switch-to-buffer (find-file-noselect file t))
(let ((inhibit-read-only t)
;; Keep the current buffer-file-coding-system.
@@ -6365,8 +6330,15 @@ if any returns nil. If `confirm-kill-emacs' is non-nil, calls it."
(setq active t))
(setq processes (cdr processes)))
(or (not active)
- (progn (list-processes t)
- (yes-or-no-p "Active processes exist; kill them and exit anyway? ")))))
+ (with-temp-buffer-window
+ (get-buffer-create "*Process List*") nil
+ #'(lambda (window _value)
+ (with-selected-window window
+ (unwind-protect
+ (yes-or-no-p "Active processes exist; kill them and exit anyway? ")
+ (when (window-live-p window)
+ (quit-restore-window window 'kill)))))
+ (list-processes t)))))
;; Query the user for other things, perhaps.
(run-hook-with-args-until-failure 'kill-emacs-query-functions)
(or (null confirm-kill-emacs)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index df35e998c31..37d89ba8cad 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,82 @@
+2012-09-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * dgnushack.el: XEmacs 21.5 compilation fix.
+
+ * gnus-notifications.el (gnus-notifications-notify): Use it.
+
+ * gnus-fun.el (gnus-funcall-no-warning): New function to silence
+ warnings on XEmacs.
+
+2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ Better seeds for (random).
+ * gnus-sync.el (gnus-sync-lesync-setup):
+ * message.el (message-canlock-generate, message-unique-id):
+ Change (random t) to (random), now that the latter is more random.
+
+2012-08-31 Dave Abrahams <dave@boostpro.com>
+
+ * auth-source.el (auth-sources): Fix macos keychain access.
+
+ * gnus-int.el (gnus-request-head): When gnus-override-method is set,
+ allow the backend `request-head' function to determine the group
+ name on its own.
+ (gnus-request-expire-articles): Filter out negative article numbers
+ during expiry (Bug#11980).
+
+ * gnus-range.el (gnus-set-difference): Change gnus-set-difference from
+ O(N^2) to O(N). This makes warping into huge groups tolerable.
+
+ * gnus-registry.el (gnus-try-warping-via-registry): Don't act as though
+ you've found the article when you haven't.
+
+2012-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * gnus-notifications.el (gnus-notifications-action): Avoid CL-ism.
+
+2012-08-30 Julien Danjou <julien@danjou.info>
+
+ * gnus-notifications.el (gnus-notifications-notify): Use timeout from
+ `gnus-notifications-timeout'.
+ (gnus-notifications-timeout): Add.
+ (gnus-notifications-action): New function.
+ (gnus-notifications-notify): Add :action using
+ `gnus-notifications-action'.
+ (gnus-notifications-id-to-msg): New variable.
+ (gnus-notifications): Use `gnus-notifications-id-to-msg' to map
+ notifications id to messages.
+
+2012-08-30 Kenichi Handa <handa@gnu.org>
+
+ * qp.el (quoted-printable-decode-region): Decode multiple bytes at
+ once.
+
+2012-08-29 Julien Danjou <julien@danjou.info>
+
+ * gnus-notifications.el: New file.
+ (gnus-notifications-notify): New function.
+ (gnus-notifications): Use `gnus-notifications-notify'.
+
+2012-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-summary-enter-digest-group): Decode content
+ transfer encoding first; bind gnus-newsgroup-charset to the charset
+ that the article specifies (Bug#12209).
+
+2012-08-22 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-cus.el (gnus-group-customize): Decode values posting-style holds.
+ (gnus-group-customize-done): Encode values posting-style holds.
+
+ * gnus-msg.el (gnus-summary-resend-message)
+ (gnus-configure-posting-styles): Decode values posting-style group
+ parameter holds.
+
+2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for
+ `name' and `address' in Resent-From header.
+
2012-08-14 Chong Yidong <cyd@gnu.org>
* gnus-art.el (article-display-face): Handle failure in
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 262da447358..4c5e5ffadce 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -256,10 +256,10 @@ can get pretty complex."
(const :tag "Temp Secrets API Collection" "secrets:session")
(const :tag "Default internet Mac OS Keychain"
- 'macos-keychain-internet)
+ macos-keychain-internet)
(const :tag "Default generic Mac OS Keychain"
- 'macos-keychain-generic)
+ macos-keychain-generic)
(list :tag "Source definition"
(const :format "" :value :source)
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index 234d0f7ae56..3440e6310af 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -417,6 +417,11 @@ category."))
(delq elem tmp))
(setq tmp (cdr tmp))))
+ ;; Decode values posting-style holds.
+ (dolist (style (cdr (assq 'posting-style values)))
+ (when (stringp (cadr style))
+ (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
+
(setq gnus-custom-params
(apply 'widget-create 'group
:value values
@@ -487,14 +492,17 @@ form, but who cares?"
(defun gnus-group-customize-done (&rest ignore)
"Apply changes and bury the buffer."
(interactive)
- (if gnus-custom-topic
- (gnus-topic-set-parameters gnus-custom-topic
- (widget-value gnus-custom-params))
- (gnus-group-edit-group-done 'params gnus-custom-group
- (widget-value gnus-custom-params))
- (gnus-group-edit-group-done 'method gnus-custom-group
- (widget-value gnus-custom-method)))
- (bury-buffer))
+ (let ((params (widget-value gnus-custom-params)))
+ ;; Encode values posting-style holds.
+ (dolist (style (cdr (assq 'posting-style params)))
+ (when (stringp (cadr style))
+ (setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8)))))
+ (if gnus-custom-topic
+ (gnus-topic-set-parameters gnus-custom-topic params)
+ (gnus-group-edit-group-done 'params gnus-custom-group params)
+ (gnus-group-edit-group-done 'method gnus-custom-group
+ (widget-value gnus-custom-method)))
+ (bury-buffer)))
;;; Score Customization:
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index f33eb910c6a..f5e1c5ad691 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -278,6 +278,10 @@ colors of the displayed X-Faces."
values))
(mapconcat 'identity values " ")))
+(defun gnus-funcall-no-warning (function &rest args)
+ (when (fboundp function)
+ (apply function args)))
+
(provide 'gnus-fun)
;;; gnus-fun.el ends here
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 339e3d951c2..bc3ba187dd4 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -599,7 +599,8 @@ real group. Does nothing on a real group."
clean-up t))
;; Use `head' function.
((fboundp head)
- (setq res (funcall head article (gnus-group-real-name group)
+ (setq res (funcall head article
+ (and (not gnus-override-method) (gnus-group-real-name group))
(nth 1 gnus-command-method))))
;; Use `article' function.
(t
@@ -706,6 +707,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(defun gnus-request-expire-articles (articles group &optional force)
(let* ((gnus-command-method (gnus-find-method-for-group group))
+ ;; Filter out any negative article numbers; they can't be
+ ;; expired here.
+ (articles
+ (delq nil (mapcar (lambda (n) (and (>= n 0) n)) articles)))
(gnus-inhibit-demon t)
(not-deleted
(funcall
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 594f68bb86f..c2f79e70d1e 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1369,7 +1369,24 @@ For the \"inline\" alternatives, also see the variable
(nnmail-fetch-field "to"))))
current-prefix-arg))
(let ((message-header-setup-hook (copy-sequence message-header-setup-hook))
- (message-sent-hook (copy-sequence message-sent-hook)))
+ (message-sent-hook (copy-sequence message-sent-hook))
+ ;; Honor posting-style for `name' and `address' in Resent-From header.
+ (styles (gnus-group-find-parameter gnus-newsgroup-name
+ 'posting-style t))
+ (user-full-name user-full-name)
+ (user-mail-address user-mail-address)
+ tem)
+ (dolist (style styles)
+ (when (stringp (cadr style))
+ (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
+ (dolist (style (if styles
+ (append gnus-posting-styles (list (cons ".*" styles)))
+ gnus-posting-styles))
+ (when (string-match (pop style) gnus-newsgroup-name)
+ (when (setq tem (cadr (assq 'name style)))
+ (setq user-full-name tem))
+ (when (setq tem (cadr (assq 'address style)))
+ (setq user-mail-address tem))))
;; `gnus-summary-resend-message-insert-gcc' must run last.
(add-hook 'message-header-setup-hook
'gnus-summary-resend-message-insert-gcc t)
@@ -1793,6 +1810,10 @@ this is a reply."
(when gnus-newsgroup-name
(let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
(when tmp-style
+ (dolist (style tmp-style)
+ (when (stringp (cadr style))
+ (setcdr style (list (mm-decode-coding-string (cadr style)
+ 'utf-8)))))
(setq styles (append styles (list (cons ".*" tmp-style)))))))
;; Go through all styles and look for matches.
(dolist (style styles)
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
new file mode 100644
index 00000000000..f9c2d309a35
--- /dev/null
+++ b/lisp/gnus/gnus-notifications.el
@@ -0,0 +1,187 @@
+;; gnus-notifications.el -- Send notification on new message in Gnus
+
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; Author: Julien Danjou <julien@danjou.info>
+;; Keywords: news
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This implements notifications using `notifications-notify' on new
+;; messages received.
+;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
+;; to get notifications just after getting the new news.
+
+;;; Code:
+
+(ignore-errors
+ (require 'notifications))
+(require 'gnus-sum)
+(require 'gnus-group)
+(require 'gnus-int)
+(require 'gnus-art)
+(require 'gnus-util)
+(ignore-errors
+ (require 'google-contacts)) ; Optional
+(require 'gnus-fun)
+
+(defgroup gnus-notifications nil
+ "Send notifications on new message in Gnus."
+ :group 'gnus)
+
+(defcustom gnus-notifications-use-google-contacts t
+ "Use Google Contacts to retrieve photo."
+ :type 'boolean
+ :group 'gnus-notifications)
+
+(defcustom gnus-notifications-use-gravatar t
+ "Use Gravatar to retrieve photo."
+ :type 'boolean
+ :group 'gnus-notifications)
+
+(defcustom gnus-notifications-minimum-level 1
+ "Minimum group level the message should have to be notified.
+Any message in a group that has a greater value than this will
+not get notifications."
+ :type 'integer
+ :group 'gnus-notifications)
+
+(defcustom gnus-notifications-timeout nil
+ "Timeout used for notifications sent via `notifications-notify'."
+ :type 'integer
+ :group 'gnus-notifications)
+
+(defvar gnus-notifications-sent nil
+ "Notifications already sent.")
+
+(defvar gnus-notifications-id-to-msg nil
+ "Map notifications ids to messages.")
+
+(defun gnus-notifications-action (id key)
+ (when (string= key "read")
+ (let ((group-article (assoc id gnus-notifications-id-to-msg)))
+ (when group-article
+ (let ((group (cadr group-article))
+ (article (nth 2 group-article)))
+ (gnus-fetch-group group (list article)))))))
+
+(defun gnus-notifications-notify (from subject photo-file)
+ "Send a notification about a new mail.
+Return a notification id if any, or t on success."
+ (if (fboundp 'notifications-notify)
+ (gnus-funcall-no-warning
+ 'notifications-notify
+ :title from
+ :body subject
+ :actions '("read" "Read")
+ :on-action 'gnus-notifications-action
+ :app-icon (gnus-funcall-no-warning
+ 'image-search-load-path "gnus/gnus.png")
+ :app-name "Gnus"
+ :category "email.arrived"
+ :timeout gnus-notifications-timeout
+ :image-path photo-file)
+ (message "New message from %s: %s" from subject)
+ ;; Don't return an id
+ t))
+
+(defun gnus-notifications-get-photo (mail-address)
+ "Get photo for mail address."
+ (let ((google-photo (when (and gnus-notifications-use-google-contacts
+ (fboundp 'google-contacts-get-photo))
+ (ignore-errors
+ (gnus-funcall-no-warning
+ 'google-contacts-get-photo mail-address)))))
+ (if google-photo
+ google-photo
+ (when gnus-notifications-use-gravatar
+ (let ((gravatar (ignore-errors
+ (gravatar-retrieve-synchronously mail-address))))
+ (if (eq gravatar 'error)
+ nil
+ (plist-get (cdr gravatar) :data)))))))
+
+(defun gnus-notifications-get-photo-file (mail-address)
+ "Get a temporary file with an image for MAIL-ADDRESS.
+You have to delete the temporary image yourself using
+`delete-image'.
+
+Returns nil if no image found."
+ (let ((photo (gnus-notifications-get-photo mail-address)))
+ (when photo
+ (let ((photo-file (make-temp-file "gnus-notifications-photo-"))
+ (coding-system-for-write 'binary))
+ (with-temp-file photo-file
+ (insert photo))
+ photo-file))))
+
+;;;###autoload
+(defun gnus-notifications ()
+ "Send a notification on new message.
+This check for new messages that are in group with a level lower
+or equal to `gnus-notifications-minimum-level' and send a
+notification using `notifications-notify' for it.
+
+This is typically a function to add in
+`gnus-after-getting-new-news-hook'"
+ (dolist (entry gnus-newsrc-alist)
+ (let ((group (car entry)))
+ ;; Check that the group level is less than
+ ;; `gnus-notifications-minimum-level' and the the group has unread
+ ;; messages.
+ (when (and (<= (gnus-group-level group) gnus-notifications-minimum-level)
+ (let ((unread (gnus-group-unread group)))
+ (and (numberp unread)
+ (> unread 0))))
+ ;; Each group should have an entry in the `gnus-notifications-sent'
+ ;; alist. If not, we add one at this time.
+ (let ((group-notifications (or (assoc group gnus-notifications-sent)
+ ;; Nothing, add one and return it.
+ (assoc group
+ (add-to-list
+ 'gnus-notifications-sent
+ (cons group nil))))))
+ (dolist (article (gnus-list-of-unread-articles group))
+ ;; Check if the article already has been notified
+ (unless (memq article (cdr group-notifications))
+ (with-current-buffer nntp-server-buffer
+ (gnus-request-head article group)
+ (article-decode-encoded-words) ; to decode mail addresses, subjects, etc
+ (let* ((address-components (mail-extract-address-components
+ (or (mail-fetch-field "From") "")))
+ (address (cadr address-components)))
+ ;; Ignore mails from ourselves
+ (unless (gnus-string-match-p gnus-ignored-from-addresses
+ address)
+ (let* ((photo-file (gnus-notifications-get-photo-file address))
+ (notification-id (gnus-notifications-notify
+ (or (car address-components) address)
+ (mail-fetch-field "Subject")
+ photo-file)))
+ (when notification-id
+ ;; Register that we did notify this message
+ (setcdr group-notifications (cons article (cdr group-notifications)))
+ (unless (eq notification-id t)
+ ;; Register the notification id for later actions
+ (add-to-list 'gnus-notifications-id-to-msg (list notification-id group article))))
+ (when photo-file
+ (delete-file photo-file)))))))))))))
+
+(provide 'gnus-notifications)
+
+;;; gnus-notifications.el ends here
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el
index 68729da0910..091276ee4f8 100644
--- a/lisp/gnus/gnus-range.el
+++ b/lisp/gnus/gnus-range.el
@@ -52,11 +52,13 @@ If RANGE is a single range, return (RANGE). Otherwise, return RANGE."
(defun gnus-set-difference (list1 list2)
"Return a list of elements of LIST1 that do not appear in LIST2."
- (let ((list1 (copy-sequence list1)))
- (while list2
- (setq list1 (delq (car list2) list1))
- (setq list2 (cdr list2)))
- list1))
+ (let ((hash2 (make-hash-table :test 'eq))
+ (result nil))
+ (dolist (elt list2) (puthash elt t hash2))
+ (dolist (elt list1)
+ (unless (gethash elt hash2)
+ (setq result (cons elt result))))
+ (nreverse result)))
(defun gnus-range-nconcat (&rest ranges)
"Return a range comprising all the RANGES, which are pre-sorted.
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 8aecc98ee86..71e00967548 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -1169,9 +1169,10 @@ data stored in the registry."
;; Try to activate the group. If that fails, just move
;; along. We may have more groups to work with
- (ignore-errors
- (gnus-select-group-with-message-id group message-id))
- (throw 'found t)))))))
+ (when
+ (ignore-errors
+ (gnus-select-group-with-message-id group message-id) t)
+ (throw 'found t))))))))
;; TODO: a few things
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 06f17bcf646..b44b953bec6 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9137,7 +9137,7 @@ To control what happens when you exit the group, see the
(list (cons 'save-article-group ogroup))))
(case-fold-search t)
(buf (current-buffer))
- dig to-address)
+ dig to-address charset)
(with-current-buffer gnus-original-article-buffer
;; Have the digest group inherit the main mail address of
;; the parent article.
@@ -9150,16 +9150,32 @@ To control what happens when you exit the group, see the
to-address))))))
(setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
(insert-buffer-substring gnus-original-article-buffer)
- ;; Remove lines that may lead nndoc to misinterpret the
- ;; document type.
(narrow-to-region
(goto-char (point-min))
(or (search-forward "\n\n" nil t) (point)))
+ ;; Remove lines that may lead nndoc to misinterpret the
+ ;; document type.
(goto-char (point-min))
(delete-matching-lines "^Path:\\|^From ")
+ ;; Parse charset, and decode content transfer encoding.
+ (setq charset (mail-content-type-get
+ (mail-header-parse-content-type
+ (or (gnus-fetch-field "content-type") ""))
+ 'charset))
+ (let ((encoding (gnus-fetch-field "content-transfer-encoding")))
+ (when encoding
+ (message-remove-header "content-transfer-encoding")
+ (goto-char (point-max))
+ (widen)
+ (narrow-to-region (point) (point-max))
+ (mm-decode-content-transfer-encoding
+ (intern (downcase (mail-header-strip encoding))))))
(widen))
(unwind-protect
- (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
+ (if (let ((gnus-newsgroup-ephemeral-charset
+ (if charset
+ (intern (downcase (gnus-strip-whitespace charset)))
+ gnus-newsgroup-charset))
(gnus-newsgroup-ephemeral-ignored-charsets
gnus-newsgroup-ignored-charsets))
(gnus-group-read-ephemeral-group
diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el
index 15d94810c3a..ca8662ff936 100644
--- a/lisp/gnus/gnus-sync.el
+++ b/lisp/gnus/gnus-sync.el
@@ -225,7 +225,7 @@ When SALT is nil, a random one will be generated using `random'."
(security-object (concat url "/_security"))
(user-record `((names . [,user]) (roles . [])))
(couch-user-name (format "org.couchdb.user:%s" user))
- (salt (or salt (sha1 (format "%s" (random t)))))
+ (salt (or salt (sha1 (format "%s" (random)))))
(couch-user-record
`((_id . ,couch-user-name)
(type . user)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 8fd89b1742c..18088423eb0 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4820,9 +4820,7 @@ Do not use this for anything important, it is cryptographically weak."
(require 'sha1)
(let (sha1-maximum-internal-length)
(sha1 (concat (message-unique-id)
- (format "%x%x%x" (random)
- (progn (random t) (random))
- (random))
+ (format "%x%x%x" (random) (random) (random))
(prin1-to-string (recent-keys))
(prin1-to-string (garbage-collect))))))
@@ -5525,7 +5523,6 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
;; You might for example insert a "." somewhere (not next to another dot
;; or string boundary), or modify the "fsf" string.
(defun message-unique-id ()
- (random t)
;; Don't use microseconds from (current-time), they may be unsupported.
;; Instead we use this randomly inited counter.
(setq message-unique-id-char
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el
index c8481aa9dee..87252684a48 100644
--- a/lisp/gnus/qp.el
+++ b/lisp/gnus/qp.el
@@ -53,7 +53,10 @@ them into characters should be done separately."
;; or both of which are lowercase letters in "abcdef", is
;; formally illegal. A robust implementation might choose to
;; recognize them as the corresponding uppercase letters.''
- (let ((case-fold-search t))
+ (let ((case-fold-search t)
+ (decode-hex #'(lambda (n1 n2)
+ (+ (* (if (<= n1 ?9) (- n1 ?0) (+ (- n1 ?A) 10)) 16)
+ (if (<= n2 ?9) (- n2 ?0) (+ (- n2 ?A) 10))))))
(narrow-to-region from to)
;; Do this in case we're called from Gnus, say, in a buffer
;; which already contains non-ASCII characters which would
@@ -65,12 +68,17 @@ them into characters should be done separately."
(not (eobp)))
(cond ((eq (char-after (1+ (point))) ?\n)
(delete-char 2))
- ((looking-at "=[0-9A-F][0-9A-F]")
- (let ((byte (string-to-number (buffer-substring (1+ (point))
- (+ 3 (point)))
- 16)))
- (mm-insert-byte byte 1)
- (delete-char 3)))
+ ((looking-at "\\(=[0-9A-F][0-9A-F]\\)+")
+ ;; Decode this sequence at once; i.e. by a single
+ ;; deletion and insertion.
+ (let* ((n (/ (- (match-end 0) (point)) 3))
+ (str (make-string n 0)))
+ (dotimes (i n)
+ (aset str i (funcall decode-hex (char-after (1+ (point)))
+ (char-after (+ 2 (point)))))
+ (forward-char 3))
+ (delete-region (match-beginning 0) (match-end 0))
+ (insert str)))
(t
(message "Malformed quoted-printable text")
(forward-char)))))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 4b1480444c2..5791f1225c1 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -397,9 +397,11 @@ suitable file is found, return nil."
(if (member (event-modifiers (aref key 0)) '(nil (shift)))
(push key non-modified-keys)))
(when remapped
- (princ "Its keys are remapped to `")
- (princ (symbol-name remapped))
- (princ "'.\n"))
+ (princ "Its keys are remapped to ")
+ (princ (if (symbolp remapped)
+ (concat "`" (symbol-name remapped) "'")
+ "an anonymous command"))
+ (princ ".\n"))
(when keys
(princ (if remapped
diff --git a/lisp/help.el b/lisp/help.el
index 19cb811bcf5..9740f8996c1 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -39,9 +39,10 @@
;; `help-window-point-marker' is a marker you can move to a valid
;; position of the buffer shown in the help window in order to override
;; the standard positioning mechanism (`point-min') chosen by
-;; `with-output-to-temp-buffer'. `with-help-window' has this point
-;; nowhere before exiting. Currently used by `view-lossage' to assert
-;; that the last keystrokes are always visible.
+;; `with-output-to-temp-buffer' and `with-temp-buffer-window'.
+;; `with-help-window' has this point nowhere before exiting. Currently
+;; used by `view-lossage' to assert that the last keystrokes are always
+;; visible.
(defvar help-window-point-marker (make-marker)
"Marker to override default `window-point' in help windows.")
@@ -145,10 +146,6 @@ specifies what to do when the user exits the help buffer."
;; Secondly, the buffer has not been displayed yet,
;; so we don't know whether its frame will be selected.
nil)
- (display-buffer-reuse-frames
- (setq help-return-method (cons (selected-window)
- 'quit-window))
- nil)
((not (one-window-p t))
(setq help-return-method
(cons (selected-window) 'quit-window))
@@ -979,13 +976,13 @@ function is called, the window to be resized is selected."
:version "20.4")
(define-minor-mode temp-buffer-resize-mode
- "Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode).
+ "Toggle auto-resizing temporary 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
+show a temporary buffer are automatically resized in height to
fit the buffer's contents, but never more than
`temp-buffer-max-height' nor less than `window-min-height'.
@@ -998,19 +995,22 @@ and some others."
(add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append)
(remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window)))
-(defun resize-temp-buffer-window ()
- "Resize the selected window to fit its contents.
-Will not make it higher than `temp-buffer-max-height' nor smaller
-than `window-min-height'. Do nothing if the selected window is
-not vertically combined or some of its contents are scrolled out
-of view."
- (when (and (pos-visible-in-window-p (point-min))
- (window-combined-p))
- (fit-window-to-buffer
- nil
- (if (functionp temp-buffer-max-height)
- (funcall temp-buffer-max-height (window-buffer))
- temp-buffer-max-height))))
+(defun resize-temp-buffer-window (&optional window)
+ "Resize WINDOW to fit its contents.
+WINDOW can be any live window and defaults to the selected one.
+
+Do not make WINDOW higher than `temp-buffer-max-height' nor
+smaller than `window-min-height'. Do nothing if WINDOW is not
+vertically combined or some of its contents are scrolled out of
+view."
+ (setq window (window-normalize-window window t))
+ (let ((height (if (functionp temp-buffer-max-height)
+ (with-selected-window window
+ (funcall temp-buffer-max-height (window-buffer)))
+ temp-buffer-max-height)))
+ (when (and (pos-visible-in-window-p (point-min) window)
+ (window-combined-p window))
+ (fit-window-to-buffer window height))))
;;; Help windows.
(defcustom help-window-select 'other
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 648c4c3b0af..c6e799252a2 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2401,7 +2401,7 @@ Operations on marked buffers:
buffer's file as an argument.
'\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This
is a very flexible command. For example, if you want to make all
- of the marked buffers read only, try using (toggle-read-only 1) as
+ of the marked buffers read only, try using (read-only-mode 1) as
the input form.
'\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form
is evaluated.
diff --git a/lisp/info.el b/lisp/info.el
index 317cba86500..fe4afd72163 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -417,6 +417,21 @@ If number, the point is moved to the corresponding line.")
(defvar Info-standalone nil
"Non-nil if Emacs was started solely as an Info browser.")
+(defvar Info-file-attributes nil
+ "Alist of file attributes of visited Info files.
+Each element is a list (FILE-NAME FILE-ATTRIBUTES...).")
+
+(defvar Info-toc-nodes nil
+ "Alist of cached parent-children node information in visited Info files.
+Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...)
+where PARENT is the parent node extracted from the Up pointer,
+SECTION is the section name in the Top node where this node is placed,
+CHILDREN is a list of child nodes extracted from the node menu.")
+
+(defvar Info-index-nodes nil
+ "Alist of cached index node names of visited Info files.
+Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).")
+
(defvar Info-virtual-files nil
"List of definitions of virtual Info files.
Each element of the list has the format (FILENAME (OPERATION . HANDLER) ...)
@@ -609,7 +624,26 @@ Do the right thing if the file has been compressed or zipped."
(apply 'call-process-region (point-min) (point-max)
(car decoder) t t nil (cdr decoder))))
(let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes
- (insert-file-contents fullname visit)))))
+ (insert-file-contents fullname visit)))
+
+ ;; Clear the caches of modified Info files.
+ (let* ((attribs-old (cdr (assoc fullname Info-file-attributes)))
+ (modtime-old (and attribs-old (nth 5 attribs-old)))
+ (attribs-new (and (stringp fullname) (file-attributes fullname)))
+ (modtime-new (and attribs-new (nth 5 attribs-new))))
+ (when (and modtime-old modtime-new
+ (> (float-time modtime-new) (float-time modtime-old)))
+ (setq Info-index-nodes (remove (assoc (or Info-current-file filename)
+ Info-index-nodes)
+ Info-index-nodes))
+ (setq Info-toc-nodes (remove (assoc (or Info-current-file filename)
+ Info-toc-nodes)
+ Info-toc-nodes)))
+ ;; Add new modtime to `Info-file-attributes'.
+ (setq Info-file-attributes
+ (cons (cons fullname attribs-new)
+ (remove (assoc fullname Info-file-attributes)
+ Info-file-attributes))))))
(defun Info-file-supports-index-cookies (&optional file)
"Return non-nil value if FILE supports Info index cookies.
@@ -2394,13 +2428,6 @@ Table of contents is created from the tree structure of menus."
(message "")
(nreverse nodes))))
-(defvar Info-toc-nodes nil
- "Alist of cached parent-children node information in visited Info files.
-Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...)
-where PARENT is the parent node extracted from the Up pointer,
-SECTION is the section name in the Top node where this node is placed,
-CHILDREN is a list of child nodes extracted from the node menu.")
-
(defun Info-toc-nodes (filename)
"Return a node list of Info FILENAME with parent-children information.
This information is cached in the variable `Info-toc-nodes' with the help
@@ -3032,10 +3059,6 @@ See `Info-scroll-down'."
(if (looking-at "^\\* ")
(forward-char 2)))))
-(defvar Info-index-nodes nil
- "Alist of cached index node names of visited Info files.
-Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).")
-
(defun Info-index-nodes (&optional file)
"Return a list of names of all index nodes in Info FILE.
If FILE is omitted, it defaults to the current Info file.
@@ -4504,7 +4527,17 @@ first line or header line, and for breadcrumb links.")
((not (bobp))
;; Hide the punctuation at the end, too.
(skip-chars-backward " \t,")
- (put-text-property (point) header-end 'invisible t))))))
+ (put-text-property (point) header-end 'invisible t)
+ ;; Hide the suffix of the Info file name.
+ (beginning-of-line)
+ (if (re-search-forward
+ (format "File: %s\\([^,\n\t]+\\),"
+ (if (stringp Info-current-file)
+ (file-name-nondirectory Info-current-file)
+ Info-current-file))
+ header-end t)
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'invisible t)))))))
;; Fontify titles
(goto-char (point-min))
@@ -4792,6 +4825,12 @@ first line or header line, and for breadcrumb links.")
mouse-face highlight
help-echo "mouse-2: go to this URL"))))
+ ;; Hide empty lines at the end of the node.
+ (goto-char (point-max))
+ (skip-chars-backward "\n")
+ (when (< (1+ (point)) (point-max))
+ (put-text-property (1+ (point)) (point-max) 'invisible t))
+
(set-buffer-modified-p nil))))
;;; Speedbar support:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9271ce32484..e6e0a01566a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -111,17 +111,24 @@ string, and RET terminates editing and does a nonincremental search."
(defcustom search-whitespace-regexp (purecopy "\\s-+")
"If non-nil, regular expression to match a sequence of whitespace chars.
-This applies to regular expression incremental search.
-When you put a space or spaces in the incremental regexp, it stands for
-this, unless it is inside of a regexp construct such as [...] or *, + or ?.
+When you enter a space or spaces in the incremental search, it
+will match any sequence matched by this regexp. As an exception,
+spaces are treated normally in regexp incremental search if they
+occur in a regexp construct like [...] or *, + or ?.
+
+If the value is a string, it applies to both ordinary and
+regexp incremental search. If the value is nil, or
+`isearch-lax-whitespace' is nil for ordinary incremental search, or
+`isearch-regexp-lax-whitespace' is nil for regexp incremental search,
+then each space you type matches literally, against one space.
+
You might want to use something like \"[ \\t\\r\\n]+\" instead.
In the Customization buffer, that is `[' followed by a space,
-a tab, a carriage return (control-M), a newline, and `]+'.
-
-When this is nil, each space you type matches literally, against one space."
- :type '(choice (const :tag "Find Spaces Literally" nil)
+a tab, a carriage return (control-M), a newline, and `]+'."
+ :type '(choice (const :tag "Match Spaces Literally" nil)
regexp)
- :group 'isearch)
+ :group 'isearch
+ :version "24.3")
(defcustom search-invisible 'open
"If t incremental search can match hidden text.
@@ -499,6 +506,7 @@ This is like `describe-bindings', but displays only Isearch keys."
(define-key map "\M-sr" 'isearch-toggle-regexp)
(define-key map "\M-sw" 'isearch-toggle-word)
(define-key map "\M-s_" 'isearch-toggle-symbol)
+ (define-key map "\M-s " 'isearch-toggle-lax-whitespace)
(define-key map [?\M-%] 'isearch-query-replace)
(define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
@@ -541,6 +549,22 @@ convert the search string to a regexp used by regexp search functions.
The property `isearch-message-prefix' put on this function specifies the
prefix string displayed in the search message.")
+(defvar isearch-lax-whitespace t
+ "If non-nil, a space will match a sequence of whitespace chars.
+When you enter a space or spaces in ordinary incremental search, it
+will match any sequence matched by the regexp defined by the variable
+`search-whitespace-regexp'. If the value is nil, each space you type
+matches literally, against one space. You can toggle the value of this
+variable by the command `isearch-toggle-lax-whitespace'.")
+
+(defvar isearch-regexp-lax-whitespace nil
+ "If non-nil, a space will match a sequence of whitespace chars.
+When you enter a space or spaces in regexp incremental search, it
+will match any sequence matched by the regexp defined by the variable
+`search-whitespace-regexp'. If the value is nil, each space you type
+matches literally, against one space. You can toggle the value of this
+variable by the command `isearch-toggle-lax-whitespace'.")
+
(defvar isearch-cmds nil
"Stack of search status sets.
Each set is a vector of the form:
@@ -666,6 +690,12 @@ Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity.
Type \\[isearch-toggle-regexp] to toggle regular-expression mode.
Type \\[isearch-toggle-word] to toggle word mode.
Type \\[isearch-toggle-symbol] to toggle symbol mode.
+
+Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching.
+In incremental searches, a space or spaces normally matches any whitespace
+defined by the variable `search-whitespace-regexp'; see also the variables
+`isearch-lax-whitespace' and `isearch-regexp-lax-whitespace'.
+
Type \\[isearch-edit-string] to edit the search string in the minibuffer.
Also supported is a search ring of the previous 16 search strings.
@@ -710,22 +740,20 @@ the calling function until the search is done."
(isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit)))
(defun isearch-forward-regexp (&optional not-regexp no-recursive-edit)
- "\
-Do incremental search forward for regular expression.
+ "Do incremental search forward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a regexp. See the command `isearch-forward' for more information.
-In regexp incremental searches, a space or spaces normally matches
-any whitespace (the variable `search-whitespace-regexp' controls
-precisely what that means). If you want to search for a literal space
-and nothing else, enter C-q SPC."
+In incremental searches, a space or spaces normally matches any
+whitespace defined by the variable `search-whitespace-regexp'.
+To search for a literal space and nothing else, enter C-q SPC.
+To toggle whitespace matching, use `isearch-toggle-lax-whitespace'."
(interactive "P\np")
(isearch-mode t (null not-regexp) nil (not no-recursive-edit)))
(defun isearch-forward-word (&optional not-word no-recursive-edit)
- "\
-Do incremental search forward for a sequence of words.
+ "Do incremental search forward for a sequence of words.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a sequence of words without regard to how the words are separated.
@@ -734,8 +762,7 @@ See the command `isearch-forward' for more information."
(isearch-mode t nil nil (not no-recursive-edit) (null not-word)))
(defun isearch-forward-symbol (&optional not-symbol no-recursive-edit)
- "\
-Do incremental search forward for a symbol.
+ "Do incremental search forward for a symbol.
The prefix argument is currently unused.
Like ordinary incremental search except that your input is treated
as a symbol surrounded by symbol boundary constructs \\_< and \\_>.
@@ -744,16 +771,14 @@ See the command `isearch-forward' for more information."
(isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp))
(defun isearch-backward (&optional regexp-p no-recursive-edit)
- "\
-Do incremental search backward.
+ "Do incremental search backward.
With a prefix argument, do a regular expression search instead.
See the command `isearch-forward' for more information."
(interactive "P\np")
(isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit)))
(defun isearch-backward-regexp (&optional not-regexp no-recursive-edit)
- "\
-Do incremental search backward for regular expression.
+ "Do incremental search backward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a regexp. See the command `isearch-forward' for more information."
@@ -895,8 +920,7 @@ The last thing it does is to run `isearch-update-post-hook'."
(if (< isearch-other-end (point)) ; isearch-forward?
(isearch-highlight isearch-other-end (point))
(isearch-highlight (point) isearch-other-end))
- (isearch-dehighlight))
- ))
+ (isearch-dehighlight))))
(setq ;; quit-flag nil not for isearch-mode
isearch-adjusted nil
isearch-yank-flag nil)
@@ -1384,6 +1408,28 @@ Use `isearch-exit' to quit without signaling."
(setq isearch-success t isearch-adjusted t)
(isearch-update))
+(defun isearch-toggle-lax-whitespace ()
+ "Toggle whitespace matching in searching on or off.
+In ordinary search, toggles the value of the variable
+`isearch-lax-whitespace'. In regexp search, toggles the
+value of the variable `isearch-regexp-lax-whitespace'."
+ (interactive)
+ (if isearch-regexp
+ (setq isearch-regexp-lax-whitespace (not isearch-regexp-lax-whitespace))
+ (setq isearch-lax-whitespace (not isearch-lax-whitespace)))
+ (let ((message-log-max nil))
+ (message "%s%s [%s]"
+ (isearch-message-prefix nil isearch-nonincremental)
+ isearch-message
+ (if (if isearch-regexp
+ isearch-regexp-lax-whitespace
+ isearch-lax-whitespace)
+ "match spaces loosely"
+ "match spaces literally")))
+ (setq isearch-success t isearch-adjusted t)
+ (sit-for 1)
+ (isearch-update))
+
(defun isearch-toggle-case-fold ()
"Toggle case folding in searching on or off."
(interactive)
@@ -1495,6 +1541,28 @@ If LAX is non-nil, the end of the string need not match a symbol boundary."
(put 'isearch-symbol-regexp 'isearch-message-prefix "symbol ")
+;; Search with lax whitespace
+
+(defun search-forward-lax-whitespace (string &optional bound noerror count)
+ "Search forward for STRING, matching a sequence of whitespace chars."
+ (let ((search-spaces-regexp search-whitespace-regexp))
+ (re-search-forward (regexp-quote string) bound noerror count)))
+
+(defun search-backward-lax-whitespace (string &optional bound noerror count)
+ "Search backward for STRING, matching a sequence of whitespace chars."
+ (let ((search-spaces-regexp search-whitespace-regexp))
+ (re-search-backward (regexp-quote string) bound noerror count)))
+
+(defun re-search-forward-lax-whitespace (regexp &optional bound noerror count)
+ "Search forward for REGEXP, matching a sequence of whitespace chars."
+ (let ((search-spaces-regexp search-whitespace-regexp))
+ (re-search-forward regexp bound noerror count)))
+
+(defun re-search-backward-lax-whitespace (regexp &optional bound noerror count)
+ "Search backward for REGEXP, matching a sequence of whitespace chars."
+ (let ((search-spaces-regexp search-whitespace-regexp))
+ (re-search-backward regexp bound noerror count)))
+
(defun isearch-query-replace (&optional delimited regexp-flag)
"Start `query-replace' with string to replace from last search string.
@@ -1511,6 +1579,14 @@ way to run word replacements from Isearch is `M-s w ... M-%'."
;; set `search-upper-case' to nil to not call
;; `isearch-no-upper-case-p' in `perform-replace'
(search-upper-case nil)
+ (replace-search-function
+ (if (and isearch-lax-whitespace (not regexp-flag))
+ #'search-forward-lax-whitespace
+ replace-search-function))
+ (replace-re-search-function
+ (if (and isearch-regexp-lax-whitespace regexp-flag)
+ #'re-search-forward-lax-whitespace
+ replace-re-search-function))
;; Set `isearch-recursive-edit' to nil to prevent calling
;; `exit-recursive-edit' in `isearch-done' that terminates
;; the execution of this command when it is non-nil.
@@ -1586,7 +1662,11 @@ characters in that string."
;; Set `search-upper-case' to nil to not call
;; `isearch-no-upper-case-p' in `occur-1'.
(search-upper-case nil)
- (search-spaces-regexp (if isearch-regexp search-whitespace-regexp)))
+ (search-spaces-regexp
+ (if (if isearch-regexp
+ isearch-regexp-lax-whitespace
+ isearch-lax-whitespace)
+ search-whitespace-regexp)))
(occur regexp nlines)))
(declare-function hi-lock-read-face-name "hi-lock" ())
@@ -2183,7 +2263,7 @@ Isearch mode."
;; Assume character codes 0200 - 0377 stand for characters in some
;; single-byte character set, and convert them to Emacs
;; characters.
- (if (and isearch-regexp (= char ?\s))
+ (if (and isearch-regexp isearch-regexp-lax-whitespace (= char ?\s))
(if (subregexp-context-p isearch-string (length isearch-string))
(isearch-process-search-string "[ ]" " ")
(isearch-process-search-char char))
@@ -2423,8 +2503,17 @@ Can be changed via `isearch-search-fun-function' for special needs."
(funcall isearch-word string lax)
(word-search-regexp string lax))
bound noerror count))))
+ ((and isearch-regexp isearch-regexp-lax-whitespace
+ search-whitespace-regexp)
+ (if isearch-forward
+ 're-search-forward-lax-whitespace
+ 're-search-backward-lax-whitespace))
(isearch-regexp
(if isearch-forward 're-search-forward 're-search-backward))
+ ((and isearch-lax-whitespace search-whitespace-regexp)
+ (if isearch-forward
+ 'search-forward-lax-whitespace
+ 'search-backward-lax-whitespace))
(t
(if isearch-forward 'search-forward 'search-backward))))
@@ -2487,7 +2576,6 @@ update the match data, and return point."
search-invisible))
(inhibit-quit nil)
(case-fold-search isearch-case-fold-search)
- (search-spaces-regexp search-whitespace-regexp)
(retry t))
(setq isearch-error nil)
(while retry
@@ -2779,7 +2867,8 @@ since they have special meaning in a regexp."
(defvar isearch-lazy-highlight-window-end nil)
(defvar isearch-lazy-highlight-case-fold-search nil)
(defvar isearch-lazy-highlight-regexp nil)
-(defvar isearch-lazy-highlight-space-regexp nil)
+(defvar isearch-lazy-highlight-lax-whitespace nil)
+(defvar isearch-lazy-highlight-regexp-lax-whitespace nil)
(defvar isearch-lazy-highlight-word nil)
(defvar isearch-lazy-highlight-forward nil)
(defvar isearch-lazy-highlight-error nil)
@@ -2821,6 +2910,10 @@ by other Emacs features."
isearch-regexp))
(not (eq isearch-lazy-highlight-word
isearch-word))
+ (not (eq isearch-lazy-highlight-lax-whitespace
+ isearch-lax-whitespace))
+ (not (eq isearch-lazy-highlight-regexp-lax-whitespace
+ isearch-regexp-lax-whitespace))
(not (= (window-start)
isearch-lazy-highlight-window-start))
(not (= (window-end) ; Window may have been split/joined.
@@ -2847,7 +2940,8 @@ by other Emacs features."
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
isearch-lazy-highlight-regexp isearch-regexp
- isearch-lazy-highlight-space-regexp search-whitespace-regexp
+ isearch-lazy-highlight-lax-whitespace isearch-lax-whitespace
+ isearch-lazy-highlight-regexp-lax-whitespace isearch-regexp-lax-whitespace
isearch-lazy-highlight-word isearch-word
isearch-lazy-highlight-forward isearch-forward)
(unless (equal isearch-string "")
@@ -2861,7 +2955,6 @@ Attempt to do the search exactly the way the pending Isearch would."
(condition-case nil
(let ((case-fold-search isearch-lazy-highlight-case-fold-search)
(isearch-regexp isearch-lazy-highlight-regexp)
- (search-spaces-regexp isearch-lazy-highlight-space-regexp)
(isearch-word isearch-lazy-highlight-word)
(search-invisible nil) ; don't match invisible text
(retry t)
diff --git a/lisp/json.el b/lisp/json.el
index 468358ccd1a..f1ee3a52032 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -174,6 +174,10 @@ this around your call to `json-read' instead of `setq'ing it.")
(put 'json-string-format 'error-conditions
'(json-string-format json-error error))
+(put 'json-key-format 'error-message "Bad JSON object key")
+(put 'json-key-format 'error-conditions
+ '(json-key-format json-error error))
+
(put 'json-object-format 'error-message "Bad JSON object")
(put 'json-object-format 'error-conditions
'(json-object-format json-error error))
@@ -321,6 +325,15 @@ representation will be parsed correctly."
"Return a JSON representation of STRING."
(format "\"%s\"" (mapconcat 'json-encode-char string "")))
+(defun json-encode-key (object)
+ "Return a JSON representation of OBJECT.
+If the resulting JSON object isn't a valid JSON object key,
+this signals `json-key-format'."
+ (let ((encoded (json-encode object)))
+ (unless (stringp (json-read-from-string encoded))
+ (signal 'json-key-format (list object)))
+ encoded))
+
;;; JSON Objects
(defun json-new-object ()
@@ -395,7 +408,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
(maphash
(lambda (k v)
(push (format "%s:%s"
- (json-encode k)
+ (json-encode-key k)
(json-encode v))
r))
hash-table)
@@ -409,7 +422,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
(format "{%s}"
(json-join (mapcar (lambda (cons)
(format "%s:%s"
- (json-encode (car cons))
+ (json-encode-key (car cons))
(json-encode (cdr cons))))
alist)
", ")))
@@ -418,7 +431,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
"Return a JSON representation of PLIST."
(let (result)
(while plist
- (push (concat (json-encode (car plist))
+ (push (concat (json-encode-key (car plist))
":"
(json-encode (cadr plist)))
result)
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 8b7a0ab3e6f..7b515a69a1c 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -5,7 +5,7 @@
;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best
;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5"
-;;;;;; "play/5x5.el" (20478 3673 653810 0))
+;;;;;; "play/5x5.el" (20545 57511 257469 0))
;;; Generated autoloads from play/5x5.el
(autoload '5x5 "5x5" "\
@@ -114,7 +114,7 @@ Completion is available.
;;;;;; add-change-log-entry-other-window add-change-log-entry find-change-log
;;;;;; prompt-for-change-log-name add-log-mailing-address add-log-full-name
;;;;;; add-log-current-defun-function) "add-log" "vc/add-log.el"
-;;;;;; (20495 51111 757560 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from vc/add-log.el
(put 'change-log-default-name 'safe-local-variable 'string-or-null-p)
@@ -398,7 +398,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
;;;### (autoloads (align-newline-and-indent align-unhighlight-rule
;;;;;; align-highlight-rule align-current align-entire align-regexp
-;;;;;; align) "align" "align.el" (20355 10021 546955 0))
+;;;;;; align) "align" "align.el" (20515 36389 544939 0))
;;; Generated autoloads from align.el
(autoload 'align "align" "\
@@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes.
;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation
;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el"
-;;;;;; (20399 35365 4050 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from allout.el
(autoload 'allout-auto-activation-helper "allout" "\
@@ -850,7 +850,7 @@ for details on preparing Emacs for automatic allout activation.
;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation
;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el"
-;;;;;; (20437 50597 545250 0))
+;;;;;; (20545 57511 257469 0))
;;; Generated autoloads from allout-widgets.el
(let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
@@ -932,7 +932,7 @@ directory, so that Emacs will know its current contents.
;;;***
;;;### (autoloads (animate-birthday-present animate-sequence animate-string)
-;;;;;; "animate" "play/animate.el" (20355 10021 546955 0))
+;;;;;; "animate" "play/animate.el" (20545 57511 257469 0))
;;; Generated autoloads from play/animate.el
(autoload 'animate-string "animate" "\
@@ -965,7 +965,7 @@ the buffer *Birthday-Present-for-Name*.
;;;***
;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on)
-;;;;;; "ansi-color" "ansi-color.el" (20453 38823 158957 0))
+;;;;;; "ansi-color" "ansi-color.el" (20523 30501 603360 0))
;;; Generated autoloads from ansi-color.el
(autoload 'ansi-color-for-comint-mode-on "ansi-color" "\
@@ -1051,8 +1051,8 @@ ARG is positive, otherwise off.
;;;### (autoloads (apropos-documentation apropos-value apropos-library
;;;;;; apropos apropos-documentation-property apropos-command apropos-variable
-;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20497 6436
-;;;;;; 957082 0))
+;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20523 62082
+;;;;;; 997685 0))
;;; Generated autoloads from apropos.el
(autoload 'apropos-read-pattern "apropos" "\
@@ -1253,8 +1253,8 @@ Entering array mode calls the function `array-mode-hook'.
;;;***
-;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20357
-;;;;;; 58785 834364 0))
+;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20513
+;;;;;; 18948 537867 0))
;;; Generated autoloads from textmodes/artist.el
(autoload 'artist-mode "artist" "\
@@ -1488,7 +1488,7 @@ Special commands:
;;;***
;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el"
-;;;;;; (20502 24369 261101 0))
+;;;;;; (20544 36659 880486 0))
;;; Generated autoloads from gnus/auth-source.el
(defvar auth-source-cache-expiry 7200 "\
@@ -1562,7 +1562,7 @@ This is similar to `autoarg-mode' but rebinds the keypad keys
;;;***
;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el"
-;;;;;; (20505 550 96420 0))
+;;;;;; (20513 18948 537867 0))
;;; Generated autoloads from progmodes/autoconf.el
(autoload 'autoconf-mode "autoconf" "\
@@ -1613,7 +1613,7 @@ insert a template for the file depending on the mode of the buffer.
;;;### (autoloads (batch-update-autoloads update-directory-autoloads
;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el"
-;;;;;; (20497 6436 957082 0))
+;;;;;; (20518 12580 46478 0))
;;; Generated autoloads from emacs-lisp/autoload.el
(put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -1989,8 +1989,8 @@ Binhex decode region between START and END.
;;;***
-;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20355
-;;;;;; 10021 546955 0))
+;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20545
+;;;;;; 57511 257469 0))
;;; Generated autoloads from play/blackbox.el
(autoload 'blackbox "blackbox" "\
@@ -2113,7 +2113,7 @@ a reflection.
;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert
;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate
;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark"
-;;;;;; "bookmark.el" (20476 31768 298871 0))
+;;;;;; "bookmark.el" (20514 15527 107017 0))
;;; Generated autoloads from bookmark.el
(define-key ctl-x-r-map "b" 'bookmark-jump)
(define-key ctl-x-r-map "m" 'bookmark-set)
@@ -2630,7 +2630,7 @@ from `browse-url-elinks-wrapper'.
;;;***
;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next)
-;;;;;; "bs" "bs.el" (20479 62884 77836 0))
+;;;;;; "bs" "bs.el" (20520 54308 826101 0))
;;; Generated autoloads from bs.el
(autoload 'bs-cycle-next "bs" "\
@@ -2693,7 +2693,7 @@ columns on its right towards the left.
;;;***
;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference"
-;;;;;; "progmodes/bug-reference.el" (20490 33188 850375 0))
+;;;;;; "progmodes/bug-reference.el" (20532 45476 981297 0))
;;; Generated autoloads from progmodes/bug-reference.el
(put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format)))))
@@ -2717,7 +2717,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile
;;;;;; compile-defun byte-compile-file byte-recompile-directory
;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning)
-;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20497 6436 957082 0))
+;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20522 38631 876994 556000))
;;; Generated autoloads from emacs-lisp/bytecomp.el
(put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -4129,8 +4129,8 @@ For example, the function `case' has an indent property
;;;***
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20478 3673
-;;;;;; 653810 0))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20541 60450
+;;;;;; 834170 0))
;;; Generated autoloads from emacs-lisp/cl-lib.el
(define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3")
@@ -4199,8 +4199,8 @@ is run).
;;;***
-;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20355 10021
-;;;;;; 546955 0))
+;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20522 9637
+;;;;;; 465791 0))
;;; Generated autoloads from color.el
(autoload 'color-name-to-rgb "color" "\
@@ -4222,7 +4222,7 @@ If FRAME cannot display COLOR, return nil.
;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list
;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command
;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el"
-;;;;;; (20476 31768 298871 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from comint.el
(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4359,8 +4359,8 @@ on third call it again advances points to the next difference and so on.
;;;;;; compilation-shell-minor-mode compilation-mode compilation-start
;;;;;; compile compilation-disable-input compile-command compilation-search-path
;;;;;; compilation-ask-about-save compilation-window-height compilation-start-hook
-;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20478
-;;;;;; 3673 653810 0))
+;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20543
+;;;;;; 15782 195452 0))
;;; Generated autoloads from progmodes/compile.el
(defvar compilation-mode-hook nil "\
@@ -4723,7 +4723,7 @@ For details see `conf-mode'. Example:
;;;***
;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie)
-;;;;;; "cookie1" "play/cookie1.el" (20364 27900 192709 741000))
+;;;;;; "cookie1" "play/cookie1.el" (20545 57511 257469 0))
;;; Generated autoloads from play/cookie1.el
(autoload 'cookie "cookie1" "\
@@ -4755,8 +4755,8 @@ Randomly permute the elements of VECTOR (all permutations equally likely).
;;;***
;;;### (autoloads (copyright-update-directory copyright copyright-fix-years
-;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20387
-;;;;;; 44199 24128 0))
+;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20518
+;;;;;; 12580 46478 0))
;;; Generated autoloads from emacs-lisp/copyright.el
(put 'copyright-at-end-flag 'safe-local-variable 'booleanp)
(put 'copyright-names-regexp 'safe-local-variable 'stringp)
@@ -4795,7 +4795,7 @@ If FIX is non-nil, run `copyright-fix-years' instead.
;;;***
;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode)
-;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20490 33188 850375
+;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20512 60198 306109
;;;;;; 0))
;;; Generated autoloads from progmodes/cperl-mode.el
(put 'cperl-indent-level 'safe-local-variable 'integerp)
@@ -5014,7 +5014,7 @@ Edit display information for cpp conditionals.
;;;***
;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el"
-;;;;;; (20476 31768 298871 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from emulation/crisp.el
(defvar crisp-mode nil "\
@@ -5147,7 +5147,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
;;;;;; customize-mode customize customize-push-and-save customize-save-variable
;;;;;; customize-set-variable customize-set-value custom-menu-sort-alphabetically
;;;;;; custom-buffer-sort-alphabetically custom-browse-sort-alphabetically)
-;;;;;; "cus-edit" "cus-edit.el" (20437 50597 545250 0))
+;;;;;; "cus-edit" "cus-edit.el" (20523 62082 997685 0))
;;; Generated autoloads from cus-edit.el
(defvar custom-browse-sort-alphabetically nil "\
@@ -5642,8 +5642,8 @@ Create a new data-debug buffer with NAME.
;;;***
-;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20476
-;;;;;; 31768 298871 0))
+;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from net/dbus.el
(autoload 'dbus-handle-event "dbus" "\
@@ -5934,8 +5934,8 @@ with no args, if that value is non-nil.
;;;***
-;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20355
-;;;;;; 10021 546955 0))
+;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20515
+;;;;;; 36389 544939 0))
;;; Generated autoloads from delsel.el
(defalias 'pending-delete-mode 'delete-selection-mode)
@@ -6032,7 +6032,7 @@ the first time the mode is used.
;;;***
;;;### (autoloads (describe-char describe-text-properties) "descr-text"
-;;;;;; "descr-text.el" (20486 36135 22104 0))
+;;;;;; "descr-text.el" (20530 32114 546307 0))
;;; Generated autoloads from descr-text.el
(autoload 'describe-text-properties "descr-text" "\
@@ -6289,7 +6289,7 @@ Deuglify broken Outlook (Express) articles and redisplay.
;;;***
;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib"
-;;;;;; "calendar/diary-lib.el" (20355 10021 546955 0))
+;;;;;; "calendar/diary-lib.el" (20530 32124 97707 678000))
;;; Generated autoloads from calendar/diary-lib.el
(autoload 'diary "diary-lib" "\
@@ -6376,7 +6376,7 @@ This requires the external program `diff' to be in your `exec-path'.
;;;***
;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "vc/diff-mode.el"
-;;;;;; (20476 31768 298871 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from vc/diff-mode.el
(autoload 'diff-mode "diff-mode" "\
@@ -6420,8 +6420,8 @@ Optional arguments are passed to `dig-invoke'.
;;;***
;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window
-;;;;;; dired dired-listing-switches) "dired" "dired.el" (20486 36135
-;;;;;; 22104 0))
+;;;;;; dired dired-listing-switches) "dired" "dired.el" (20539 18737
+;;;;;; 159373 0))
;;; Generated autoloads from dired.el
(defvar dired-listing-switches (purecopy "-al") "\
@@ -6715,7 +6715,7 @@ in `.emacs'.
;;;***
;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20545 57511 257469 0))
;;; Generated autoloads from play/dissociate.el
(autoload 'dissociated-press "dissociate" "\
@@ -6824,8 +6824,8 @@ See the command `doc-view-mode' for more information on this mode.
;;;***
-;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20443 2992
-;;;;;; 177196 0))
+;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20545 57511
+;;;;;; 257469 0))
;;; Generated autoloads from play/doctor.el
(autoload 'doctor "doctor" "\
@@ -6852,8 +6852,8 @@ strings when pressed twice. See `double-map' for details.
;;;***
-;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20355 10021
-;;;;;; 546955 0))
+;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20545 57511
+;;;;;; 257469 0))
;;; Generated autoloads from play/dunnet.el
(autoload 'dunnet "dunnet" "\
@@ -7574,7 +7574,7 @@ Display statistics for a class tree.
;;;***
;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el"
-;;;;;; (20436 29731 313079 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from ebuff-menu.el
(autoload 'electric-buffer-list "ebuff-menu" "\
@@ -7657,7 +7657,7 @@ an EDE controlled project.
;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form
;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug"
-;;;;;; "emacs-lisp/edebug.el" (20497 6436 957082 0))
+;;;;;; "emacs-lisp/edebug.el" (20523 62082 997685 0))
;;; Generated autoloads from emacs-lisp/edebug.el
(defvar edebug-all-defs nil "\
@@ -8319,7 +8319,7 @@ displayed.
;;;***
;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el"
-;;;;;; (20399 35365 4050 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from emacs-lock.el
(autoload 'emacs-lock-mode "emacs-lock" "\
@@ -8347,7 +8347,7 @@ Other values are interpreted as usual.
;;;***
;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug)
-;;;;;; "emacsbug" "mail/emacsbug.el" (20495 51111 757560 0))
+;;;;;; "emacsbug" "mail/emacsbug.el" (20523 62082 997685 0))
;;; Generated autoloads from mail/emacsbug.el
(autoload 'report-emacs-bug "emacsbug" "\
@@ -8800,7 +8800,7 @@ Look at CONFIG and try to expand GROUP.
;;;***
;;;### (autoloads (erc-handle-irc-url erc-tls erc erc-select-read-args)
-;;;;;; "erc" "erc/erc.el" (20444 23842 968143 0))
+;;;;;; "erc" "erc/erc.el" (20530 32114 546307 0))
;;; Generated autoloads from erc/erc.el
(autoload 'erc-select-read-args "erc" "\
@@ -8877,7 +8877,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
;;;***
;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC)
-;;;;;; "erc-dcc" "erc/erc-dcc.el" (20439 5925 915283 0))
+;;;;;; "erc-dcc" "erc/erc-dcc.el" (20523 62082 997685 0))
;;; Generated autoloads from erc/erc-dcc.el
(autoload 'erc-dcc-mode "erc-dcc")
@@ -9018,7 +9018,7 @@ system.
;;;***
-;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20356 2211 532900
+;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20532 45476 981297
;;;;;; 0))
;;; Generated autoloads from erc/erc-join.el
(autoload 'erc-autojoin-mode "erc-join" nil t)
@@ -9065,7 +9065,7 @@ You can save every individual message by putting this function on
;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host
;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool
;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el"
-;;;;;; (20434 17809 692608 0))
+;;;;;; (20531 24613 995935 0))
;;; Generated autoloads from erc/erc-match.el
(autoload 'erc-match-mode "erc-match")
@@ -9393,8 +9393,8 @@ Kill all test buffers that are still live.
;;;***
-;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20427
-;;;;;; 14766 970343 0))
+;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from eshell/esh-mode.el
(autoload 'eshell-mode "esh-mode" "\
@@ -9407,7 +9407,7 @@ Emacs shell interactive mode.
;;;***
;;;### (autoloads (eshell-command-result eshell-command eshell) "eshell"
-;;;;;; "eshell/eshell.el" (20478 3673 653810 0))
+;;;;;; "eshell/eshell.el" (20523 62082 997685 0))
;;; Generated autoloads from eshell/eshell.el
(autoload 'eshell "eshell" "\
@@ -10085,7 +10085,7 @@ fourth arg NOSEP non-nil inhibits this.
;;;### (autoloads (executable-make-buffer-file-executable-if-script-p
;;;;;; executable-self-display executable-set-magic executable-interpret
;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20533 6181 437016 717000))
;;; Generated autoloads from progmodes/executable.el
(autoload 'executable-command-find-posix-p "executable" "\
@@ -10464,7 +10464,7 @@ you can set `feedmail-queue-reminder-alist' to nil.
;;;### (autoloads (ffap-bindings ffap-guess-file-name-at-point dired-at-point
;;;;;; ffap-at-mouse ffap-menu find-file-at-point ffap-next) "ffap"
-;;;;;; "ffap.el" (20479 62884 77836 0))
+;;;;;; "ffap.el" (20542 46798 773957 0))
;;; Generated autoloads from ffap.el
(autoload 'ffap-next "ffap" "\
@@ -11422,7 +11422,7 @@ and choose the directory as the fortune-file.
;;;***
;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el"
-;;;;;; (20501 3499 284800 0))
+;;;;;; (20537 63402 936234 0))
;;; Generated autoloads from progmodes/gdb-mi.el
(defvar gdb-enable-debug nil "\
@@ -11705,7 +11705,7 @@ prompt the user for the name of an NNTP server to use.
;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group
;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize
;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent"
-;;;;;; "gnus/gnus-agent.el" (20458 56750 651721 0))
+;;;;;; "gnus/gnus-agent.el" (20518 12580 46478 0))
;;; Generated autoloads from gnus/gnus-agent.el
(autoload 'gnus-unplugged "gnus-agent" "\
@@ -11796,7 +11796,7 @@ If CLEAN, obsolete (ignore).
;;;***
;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el"
-;;;;;; (20497 6436 957082 0))
+;;;;;; (20522 9637 465791 0))
;;; Generated autoloads from gnus/gnus-art.el
(autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -12191,7 +12191,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
;;;***
;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail)
-;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20495 51111 757560 0))
+;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20533 5993 500881 0))
;;; Generated autoloads from gnus/gnus-msg.el
(autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12217,9 +12217,26 @@ Like `message-reply'.
;;;***
+;;;### (autoloads (gnus-notifications) "gnus-notifications" "gnus/gnus-notifications.el"
+;;;;;; (20544 36659 880486 0))
+;;; Generated autoloads from gnus/gnus-notifications.el
+
+(autoload 'gnus-notifications "gnus-notifications" "\
+Send a notification on new message.
+This check for new messages that are in group with a level lower
+or equal to `gnus-notifications-minimum-level' and send a
+notification using `notifications-notify' for it.
+
+This is typically a function to add in
+`gnus-after-getting-new-news-hook'
+
+\(fn)" nil nil)
+
+;;;***
+
;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon
;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el"
-;;;;;; (20458 56750 651721 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from gnus/gnus-picon.el
(autoload 'gnus-treat-from-picon "gnus-picon" "\
@@ -12246,7 +12263,7 @@ If picons are already displayed, remove them.
;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection
;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement
;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range"
-;;;;;; "gnus/gnus-range.el" (20495 51111 757560 0))
+;;;;;; "gnus/gnus-range.el" (20544 36659 880486 0))
;;; Generated autoloads from gnus/gnus-range.el
(autoload 'gnus-sorted-difference "gnus-range" "\
@@ -12314,7 +12331,7 @@ Add NUM into sorted LIST by side effect.
;;;***
;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize)
-;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20458 56750 651721
+;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20544 36659 880486
;;;;;; 0))
;;; Generated autoloads from gnus/gnus-registry.el
@@ -12382,7 +12399,7 @@ Declare back end NAME with ABILITIES as a Gnus back end.
;;;***
;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el"
-;;;;;; (20495 51111 757560 0))
+;;;;;; (20540 39589 424586 0))
;;; Generated autoloads from gnus/gnus-sum.el
(autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12394,7 +12411,7 @@ BOOKMARK is a bookmark name or a bookmark record.
;;;***
;;;### (autoloads (gnus-sync-install-hooks gnus-sync-initialize)
-;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20465 29989 57840 0))
+;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20545 57511 257469 0))
;;; Generated autoloads from gnus/gnus-sync.el
(autoload 'gnus-sync-initialize "gnus-sync" "\
@@ -12437,8 +12454,8 @@ A value of nil says to use the default GnuTLS value.")
;;;***
-;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20355 10021
-;;;;;; 546955 0))
+;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20545 57511
+;;;;;; 257469 0))
;;; Generated autoloads from play/gomoku.el
(autoload 'gomoku "gomoku" "\
@@ -12705,8 +12722,8 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful.
;;;***
;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb
-;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20478 3673
-;;;;;; 653810 0))
+;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20537 63402
+;;;;;; 936234 0))
;;; Generated autoloads from progmodes/gud.el
(autoload 'gud-gdb "gud" "\
@@ -12796,7 +12813,7 @@ it if ARG is omitted or nil.
;;;### (autoloads (setf gv-define-simple-setter gv-define-setter
;;;;;; gv--defun-declaration gv-define-expander gv-letplace gv-get)
-;;;;;; "gv" "emacs-lisp/gv.el" (20497 6436 957082 0))
+;;;;;; "gv" "emacs-lisp/gv.el" (20542 46798 773957 0))
;;; Generated autoloads from emacs-lisp/gv.el
(autoload 'gv-get "gv" "\
@@ -12852,8 +12869,9 @@ well for simple place forms.
Assignments of VAL to (NAME ARGS...) are expanded by binding the argument
forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must
return a Lisp form that does the assignment.
-Actually, ARGLIST may be bound to temporary variables which are introduced
-automatically to preserve proper execution order of the arguments. Example:
+The first arg in ARLIST (the one that receives VAL) receives an expression
+which can do arbitrary things, whereas the other arguments are all guaranteed
+to be pure and copyable. Example use:
(gv-define-setter aref (v a i) `(aset ,a ,i ,v))
\(fn NAME ARGLIST &rest BODY)" nil t)
@@ -13108,7 +13126,7 @@ different regions. With numeric argument ARG, behaves like
;;;### (autoloads (doc-file-to-info doc-file-to-man describe-categories
;;;;;; describe-syntax describe-variable variable-at-point describe-function-1
;;;;;; find-lisp-object-file-name help-C-file-name describe-function)
-;;;;;; "help-fns" "help-fns.el" (20497 6436 957082 0))
+;;;;;; "help-fns" "help-fns.el" (20532 45476 981297 0))
;;; Generated autoloads from help-fns.el
(autoload 'describe-function "help-fns" "\
@@ -13205,7 +13223,7 @@ gives the window that lists the options.")
;;;### (autoloads (help-bookmark-jump help-xref-on-pp help-insert-xref-button
;;;;;; help-xref-button help-make-xrefs help-buffer help-setup-xref
;;;;;; help-mode-finish help-mode-setup help-mode) "help-mode" "help-mode.el"
-;;;;;; (20479 62884 77836 0))
+;;;;;; (20510 18478 782378 0))
;;; Generated autoloads from help-mode.el
(autoload 'help-mode "help-mode" "\
@@ -13321,7 +13339,7 @@ Provide help for current mode.
;;;***
;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl"
-;;;;;; "hexl.el" (20478 3673 653810 0))
+;;;;;; "hexl.el" (20523 62082 997685 0))
;;; Generated autoloads from hexl.el
(autoload 'hexl-mode "hexl" "\
@@ -13418,7 +13436,7 @@ This discards the buffer's undo information.
;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer
;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer
;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el"
-;;;;;; (20410 5673 834266 0))
+;;;;;; (20522 9637 465791 0))
;;; Generated autoloads from hi-lock.el
(autoload 'hi-lock-mode "hi-lock" "\
@@ -13427,12 +13445,19 @@ 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:
+Hi Lock mode is automatically enabled when you invoke any of the
+highlighting commands listed below, such as \\[highlight-regexp].
+To enable Hi Lock mode in all buffers, use `global-hi-lock-mode'
+or add (global-hi-lock-mode 1) to your init file.
+
+In buffers where Font Lock mode is enabled, patterns are
+highlighted using font lock. In buffers where Font Lock mode is
+disabled, patterns are applied using overlays; in this case, the
+highlighting will not be updated as you type.
+
+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.
@@ -13466,12 +13491,12 @@ When hi-lock is started and if the mode is not excluded or patterns
rejected, the beginning of the buffer is searched for lines of the
form:
Hi-lock: FOO
-where FOO is a list of patterns. These are added to the font lock
-keywords already present. The patterns must start before position
-\(number of characters into buffer) `hi-lock-file-patterns-range'.
-Patterns will be read until
- Hi-lock: end
-is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'.
+
+where FOO is a list of patterns. The patterns must start before
+position (number of characters into buffer)
+`hi-lock-file-patterns-range'. Patterns will be read until
+Hi-lock: end is found. A mode is excluded if it's in the list
+`hi-lock-exclude-modes'.
\(fn &optional ARG)" t nil)
@@ -13500,12 +13525,13 @@ See `hi-lock-mode' for more information on Hi-Lock mode.
(autoload 'hi-lock-line-face-buffer "hi-lock" "\
Set face of all lines containing a match of REGEXP to FACE.
+Interactively, prompt for REGEXP then FACE, using a buffer-local
+history list for REGEXP and a global history list for FACE.
-Interactively, prompt for REGEXP then FACE. Buffer-local history
-list maintained for regexps, global history maintained for faces.
-\\<minibuffer-local-map>Use \\[previous-history-element] to retrieve previous history items,
-and \\[next-history-element] to retrieve default values.
-\(See info node `Minibuffer History'.)
+If Font Lock mode is enabled in the buffer, it is used to
+highlight REGEXP. If Font Lock mode is disabled, overlays are
+used for highlighting; in this case, the highlighting will not be
+updated as you type.
\(fn REGEXP &optional FACE)" t nil)
@@ -13513,12 +13539,13 @@ and \\[next-history-element] to retrieve default values.
(autoload 'hi-lock-face-buffer "hi-lock" "\
Set face of each match of REGEXP to FACE.
+Interactively, prompt for REGEXP then FACE, using a buffer-local
+history list for REGEXP and a global history list for FACE.
-Interactively, prompt for REGEXP then FACE. Buffer-local history
-list maintained for regexps, global history maintained for faces.
-\\<minibuffer-local-map>Use \\[previous-history-element] to retrieve previous history items,
-and \\[next-history-element] to retrieve default values.
-\(See info node `Minibuffer History'.)
+If Font Lock mode is enabled in the buffer, it is used to
+highlight REGEXP. If Font Lock mode is disabled, overlays are
+used for highlighting; in this case, the highlighting will not be
+updated as you type.
\(fn REGEXP &optional FACE)" t nil)
@@ -13526,22 +13553,22 @@ and \\[next-history-element] to retrieve default values.
(autoload 'hi-lock-face-phrase-buffer "hi-lock" "\
Set face of each match of phrase REGEXP to FACE.
-
Whitespace in REGEXP converted to arbitrary whitespace and initial
lower-case letters made case insensitive.
+If Font Lock mode is enabled in the buffer, it is used to
+highlight REGEXP. If Font Lock mode is disabled, overlays are
+used for highlighting; in this case, the highlighting will not be
+updated as you type.
+
\(fn REGEXP &optional FACE)" t nil)
(defalias 'unhighlight-regexp 'hi-lock-unface-buffer)
(autoload 'hi-lock-unface-buffer "hi-lock" "\
Remove highlighting of each match to REGEXP set by hi-lock.
-
-Interactively, prompt for REGEXP. Buffer-local history of inserted
-regexp's maintained. Will accept only regexps inserted by hi-lock
-interactive functions. (See `hi-lock-interactive-patterns'.)
-\\<minibuffer-local-must-match-map>Use \\[minibuffer-complete] to complete a partially typed regexp.
-\(See info node `Minibuffer History'.)
+Interactively, prompt for REGEXP, accepting only regexps
+previously inserted by hi-lock interactive functions.
\(fn REGEXP)" t nil)
@@ -13557,7 +13584,7 @@ be found in variable `hi-lock-interactive-patterns'.
;;;***
;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20541 6907 775259 0))
;;; Generated autoloads from progmodes/hideif.el
(autoload 'hide-ifdef-mode "hideif" "\
@@ -13601,7 +13628,7 @@ Several variables affect how the hiding is done:
;;;***
;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el"
-;;;;;; (20356 55829 180242 0))
+;;;;;; (20541 6907 775259 0))
;;; Generated autoloads from progmodes/hideshow.el
(defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\
@@ -13929,7 +13956,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays
;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays
;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays"
-;;;;;; "calendar/holidays.el" (20390 20388 254308 0))
+;;;;;; "calendar/holidays.el" (20530 32124 107724 973000))
;;; Generated autoloads from calendar/holidays.el
(define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1")
@@ -14212,7 +14239,7 @@ bound to the current value of the filter.
;;;***
;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers)
-;;;;;; "ibuffer" "ibuffer.el" (20479 62884 77836 0))
+;;;;;; "ibuffer" "ibuffer.el" (20542 46798 773957 0))
;;; Generated autoloads from ibuffer.el
(autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14823,7 +14850,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
;;;;;; create-image image-type-auto-detected-p image-type-available-p
;;;;;; image-type image-type-from-file-name image-type-from-file-header
;;;;;; image-type-from-buffer image-type-from-data) "image" "image.el"
-;;;;;; (20437 50597 545250 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from image.el
(autoload 'image-type-from-data "image" "\
@@ -15270,7 +15297,7 @@ on these modes.
;;;***
;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar
-;;;;;; imenu-sort-function) "imenu" "imenu.el" (20476 31768 298871
+;;;;;; imenu-sort-function) "imenu" "imenu.el" (20511 39332 974340
;;;;;; 0))
;;; Generated autoloads from imenu.el
@@ -15292,16 +15319,39 @@ element should come before the second. The arguments are cons cells;
(custom-autoload 'imenu-sort-function "imenu" t)
(defvar imenu-generic-expression nil "\
-The regex pattern to use for creating a buffer index.
+List of definition matchers for creating an Imenu index.
+Each element of this list should have the form
+
+ (MENU-TITLE REGEXP INDEX [FUNCTION] [ARGUMENTS...])
+
+MENU-TITLE should be nil (in which case the matches for this
+element are put in the top level of the buffer index) or a
+string (which specifies the title of a submenu into which the
+matches are put).
+REGEXP is a regular expression matching a definition construct
+which is to be displayed in the menu. REGEXP may also be a
+function, called without arguments. It is expected to search
+backwards. It must return true and set `match-data' if it finds
+another element.
+INDEX is an integer specifying which subexpression of REGEXP
+matches the definition's name; this subexpression is displayed as
+the menu item.
+FUNCTION, if present, specifies a function to call when the index
+item is selected by the user. This function is called with
+arguments consisting of the item name, the buffer position, and
+the ARGUMENTS.
+
+The variable `imenu-case-fold-search' determines whether or not
+the regexp matches are case sensitive, and `imenu-syntax-alist'
+can be used to alter the syntax table for the search.
If non-nil this pattern is passed to `imenu--generic-function' to
-create a buffer index. Look there for the documentation of this
-pattern's structure.
+create a buffer index.
-For example, see the value of `fortran-imenu-generic-expression' used by
-`fortran-mode' with `imenu-syntax-alist' set locally to give the
-characters which normally have \"symbol\" syntax \"word\" syntax
-during matching.")
+For example, see the value of `fortran-imenu-generic-expression'
+used by `fortran-mode' with `imenu-syntax-alist' set locally to
+give the characters which normally have \"symbol\" syntax
+\"word\" syntax during matching.")
(put 'imenu-generic-expression 'risky-local-variable t)
(make-variable-buffer-local 'imenu-generic-expression)
@@ -15487,7 +15537,7 @@ of `inferior-lisp-program'). Runs the hooks from
;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node
;;;;;; Info-mode info-finder info-apropos Info-index Info-directory
;;;;;; Info-on-current-buffer info-standalone info-emacs-bug info-emacs-manual
-;;;;;; info info-other-window) "info" "info.el" (20476 31768 298871
+;;;;;; info info-other-window) "info" "info.el" (20540 39589 424586
;;;;;; 0))
;;; Generated autoloads from info.el
@@ -16375,7 +16425,7 @@ by `jka-compr-installed'.
;;;***
-;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20478 3673 653810
+;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20532 45476 981297
;;;;;; 0))
;;; Generated autoloads from progmodes/js.el
@@ -16619,7 +16669,7 @@ The kind of Korean keyboard for Korean input method.
;;;***
;;;### (autoloads (landmark landmark-test-run) "landmark" "play/landmark.el"
-;;;;;; (20478 3673 653810 0))
+;;;;;; (20545 57511 257469 0))
;;; Generated autoloads from play/landmark.el
(defalias 'landmark-repeat 'landmark-test-run)
@@ -16776,7 +16826,7 @@ A major mode to edit GNU ld script files
;;;***
-;;;### (autoloads (life) "life" "play/life.el" (20355 10021 546955
+;;;### (autoloads (life) "life" "play/life.el" (20545 57511 257469
;;;;;; 0))
;;; Generated autoloads from play/life.el
@@ -16953,8 +17003,8 @@ done. Otherwise, it uses the current buffer.
;;;***
-;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20477
-;;;;;; 21160 227853 0))
+;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20515
+;;;;;; 36389 544939 0))
;;; Generated autoloads from vc/log-view.el
(autoload 'log-view-mode "log-view" "\
@@ -17618,7 +17668,7 @@ Previous contents of that buffer are killed first.
;;;***
;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el"
-;;;;;; (20504 6781 423358 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from man.el
(defalias 'manual-entry 'man)
@@ -17729,7 +17779,7 @@ recursion depth in the minibuffer prompt. This is only useful if
;;;;;; message-forward-make-body message-forward message-recover
;;;;;; message-supersede message-cancel-news message-followup message-wide-reply
;;;;;; message-reply message-news message-mail message-mode) "message"
-;;;;;; "gnus/message.el" (20501 3499 284800 0))
+;;;;;; "gnus/message.el" (20545 57511 257469 0))
;;; Generated autoloads from gnus/message.el
(define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
@@ -18204,7 +18254,7 @@ is modified to remove the default indication.
;;;***
;;;### (autoloads (list-dynamic-libraries butterfly) "misc" "misc.el"
-;;;;;; (20356 27828 24951 0))
+;;;;;; (20533 5993 500881 0))
;;; Generated autoloads from misc.el
(autoload 'butterfly "misc" "\
@@ -18606,7 +18656,7 @@ To test this function, evaluate:
;;;***
-;;;### (autoloads (mpc) "mpc" "mpc.el" (20476 31768 298871 0))
+;;;### (autoloads (mpc) "mpc" "mpc.el" (20523 62082 997685 0))
;;; Generated autoloads from mpc.el
(autoload 'mpc "mpc" "\
@@ -18616,7 +18666,7 @@ Main entry point for MPC.
;;;***
-;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20434 17809 692608
+;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20545 57511 257469
;;;;;; 0))
;;; Generated autoloads from play/mpuz.el
@@ -19309,7 +19359,7 @@ closing requests for requests that are used in matched pairs.
;;;***
;;;### (autoloads (nxml-glyph-display-string) "nxml-glyph" "nxml/nxml-glyph.el"
-;;;;;; (20439 5925 915283 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from nxml/nxml-glyph.el
(autoload 'nxml-glyph-display-string "nxml-glyph" "\
@@ -20901,7 +20951,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'.
;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find
;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion
;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20545 57511 257469 0))
;;; Generated autoloads from org/org-id.el
(autoload 'org-id-get-create "org-id" "\
@@ -21620,8 +21670,8 @@ The list is displayed in a buffer named `*Packages*'.
;;;***
-;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20355 10021
-;;;;;; 546955 0))
+;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20542 50478
+;;;;;; 439878 507000))
;;; Generated autoloads from paren.el
(defvar show-paren-mode nil "\
@@ -21859,8 +21909,8 @@ Completion for GNU/Linux `mount'.
;;;***
-;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20453
-;;;;;; 5408 87415 759000))
+;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from pcmpl-rpm.el
(autoload 'pcomplete/rpm "pcmpl-rpm" "\
@@ -21930,8 +21980,8 @@ Includes files as well as host names followed by a colon.
;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list
;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete
-;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20476
-;;;;;; 31768 298871 0))
+;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from pcomplete.el
(autoload 'pcomplete "pcomplete" "\
@@ -22075,7 +22125,7 @@ Global menu used by PCL-CVS.")
;;;***
;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el"
-;;;;;; (20478 3673 653810 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from progmodes/perl-mode.el
(put 'perl-indent-level 'safe-local-variable 'integerp)
(put 'perl-continued-statement-offset 'safe-local-variable 'integerp)
@@ -22931,17 +22981,20 @@ are both set to t.
;;;***
-;;;### (autoloads (proced) "proced" "proced.el" (20453 5437 764254
+;;;### (autoloads (proced) "proced" "proced.el" (20511 39332 974340
;;;;;; 0))
;;; Generated autoloads from proced.el
(autoload 'proced "proced" "\
Generate a listing of UNIX system processes.
-If invoked with optional ARG the window displaying the process
-information will be displayed but not selected.
-Runs the normal hook `proced-post-display-hook'.
+\\<proced-mode-map>
+If invoked with optional ARG, do not select the window displaying
+the process information.
+
+This function runs the normal hook `proced-post-display-hook'.
-See `proced-mode' for a description of features available in Proced buffers.
+See `proced-mode' for a description of features available in
+Proced buffers.
\(fn &optional ARG)" t nil)
@@ -23245,7 +23298,7 @@ If EXTENSION is any other symbol, it is ignored.
;;;***
;;;### (autoloads (python-mode run-python) "python" "progmodes/python.el"
-;;;;;; (20504 35072 130543 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from progmodes/python.el
(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
@@ -23281,7 +23334,7 @@ if that value is non-nil.
;;;***
;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20544 36659 880486 0))
;;; Generated autoloads from gnus/qp.el
(autoload 'quoted-printable-decode-region "qp" "\
@@ -23304,7 +23357,7 @@ them into characters should be done separately.
;;;;;; quail-defrule quail-install-decode-map quail-install-map
;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout
;;;;;; quail-define-package quail-use-package quail-title) "quail"
-;;;;;; "international/quail.el" (20501 3499 284800 0))
+;;;;;; "international/quail.el" (20523 62082 997685 0))
;;; Generated autoloads from international/quail.el
(autoload 'quail-title "quail" "\
@@ -23608,7 +23661,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
;;;***
;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc"
-;;;;;; "net/rcirc.el" (20434 17809 692608 0))
+;;;;;; "net/rcirc.el" (20541 6907 775259 0))
;;; Generated autoloads from net/rcirc.el
(autoload 'rcirc "rcirc" "\
@@ -23864,8 +23917,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead.
;;;***
;;;### (autoloads (reftex-reset-scanning-information reftex-mode
-;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20499 48164
-;;;;;; 310488 0))
+;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20507 42276
+;;;;;; 222255 0))
;;; Generated autoloads from textmodes/reftex.el
(autoload 'turn-on-reftex "reftex" "\
@@ -24013,8 +24066,8 @@ of master file.
;;;***
-;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20498
-;;;;;; 27300 867875 0))
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20507
+;;;;;; 42276 222255 0))
;;; Generated autoloads from textmodes/reftex-vars.el
(put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
(put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
@@ -24024,7 +24077,7 @@ of master file.
;;;***
;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el"
-;;;;;; (20363 61861 222722 0))
+;;;;;; (20522 38650 757441 0))
;;; Generated autoloads from emacs-lisp/regexp-opt.el
(autoload 'regexp-opt "regexp-opt" "\
@@ -24270,8 +24323,8 @@ variable.
;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers
;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers
;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p rmail-spool-directory
-;;;;;; rmail-file-name) "rmail" "mail/rmail.el" (20437 50597 545250
-;;;;;; 0))
+;;;;;; rmail-file-name) "rmail" "mail/rmail.el" (20526 43809 637014
+;;;;;; 858000))
;;; Generated autoloads from mail/rmail.el
(defvar rmail-file-name (purecopy "~/RMAIL") "\
@@ -24469,8 +24522,8 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server.
;;;***
;;;### (autoloads (rmail-output-body-to-file rmail-output-as-seen
-;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20355 10021
-;;;;;; 546955 0))
+;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20530 3765 184907
+;;;;;; 0))
;;; Generated autoloads from mail/rmailout.el
(put 'rmail-output-file-alist 'risky-local-variable t)
@@ -24619,7 +24672,7 @@ must be equal.
;;;***
;;;### (autoloads (robin-use-package robin-modify-package robin-define-package)
-;;;;;; "robin" "international/robin.el" (20501 3499 284800 0))
+;;;;;; "robin" "international/robin.el" (20523 62082 997685 0))
;;; Generated autoloads from international/robin.el
(autoload 'robin-define-package "robin" "\
@@ -24691,7 +24744,7 @@ Toggle the use of ROT13 encoding for the current window.
;;;***
;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el"
-;;;;;; (20502 63903 34842 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from textmodes/rst.el
(add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
@@ -24722,7 +24775,7 @@ for modes derived from Text mode, like Mail mode.
;;;***
;;;### (autoloads (ruby-mode) "ruby-mode" "progmodes/ruby-mode.el"
-;;;;;; (20490 33188 850375 0))
+;;;;;; (20522 38650 757441 0))
;;; Generated autoloads from progmodes/ruby-mode.el
(autoload 'ruby-mode "ruby-mode" "\
@@ -24761,8 +24814,8 @@ if ARG is omitted or nil.
;;;***
-;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20355
-;;;;;; 10021 546955 0))
+;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20518
+;;;;;; 12580 46478 0))
;;; Generated autoloads from emacs-lisp/rx.el
(autoload 'rx-to-string "rx" "\
@@ -25073,8 +25126,8 @@ enclosed in `(and ...)'.
;;;***
-;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20453
-;;;;;; 5437 764254 0))
+;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from savehist.el
(defvar savehist-mode nil "\
@@ -25549,8 +25602,8 @@ Like `mail' command, but display mail buffer in another frame.
;;;***
;;;### (autoloads (server-save-buffers-kill-terminal server-mode
-;;;;;; server-force-delete server-start) "server" "server.el" (20478
-;;;;;; 3673 653810 0))
+;;;;;; server-force-delete server-start) "server" "server.el" (20545
+;;;;;; 57511 257469 0))
;;; Generated autoloads from server.el
(put 'server-host 'risky-local-variable t)
@@ -25702,7 +25755,7 @@ To work around that, do:
;;;***
;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el"
-;;;;;; (20487 57003 603251 0))
+;;;;;; (20541 6907 775259 0))
;;; Generated autoloads from progmodes/sh-script.el
(put 'sh-shell 'safe-local-variable 'symbolp)
@@ -26010,7 +26063,7 @@ with no arguments, if that value is non-nil.
;;;***
;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new
-;;;;;; define-skeleton) "skeleton" "skeleton.el" (20406 8611 875037
+;;;;;; define-skeleton) "skeleton" "skeleton.el" (20541 6907 775259
;;;;;; 0))
;;; Generated autoloads from skeleton.el
@@ -26123,7 +26176,7 @@ symmetrical ones, and the same character twice for the others.
;;;***
;;;### (autoloads (smerge-start-session smerge-mode smerge-ediff)
-;;;;;; "smerge-mode" "vc/smerge-mode.el" (20476 31768 298871 0))
+;;;;;; "smerge-mode" "vc/smerge-mode.el" (20523 62082 997685 0))
;;; Generated autoloads from vc/smerge-mode.el
(autoload 'smerge-ediff "smerge-mode" "\
@@ -26332,7 +26385,7 @@ Pick your favorite shortcuts:
;;;### (autoloads (reverse-region sort-columns sort-regexp-fields
;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs
-;;;;;; sort-lines sort-subr) "sort" "sort.el" (20355 10021 546955
+;;;;;; sort-lines sort-subr) "sort" "sort.el" (20507 42276 222255
;;;;;; 0))
;;; Generated autoloads from sort.el
(put 'sort-fold-case 'safe-local-variable 'booleanp)
@@ -26430,18 +26483,23 @@ the sort order.
\(fn FIELD BEG END)" t nil)
(autoload 'sort-regexp-fields "sort" "\
-Sort the region lexicographically as specified by RECORD-REGEXP and KEY.
-RECORD-REGEXP specifies the textual units which should be sorted.
- For example, to sort lines RECORD-REGEXP would be \"^.*$\"
-KEY specifies the part of each record (ie each match for RECORD-REGEXP)
- is to be used for sorting.
- If it is \"\\\\digit\" then the digit'th \"\\\\(...\\\\)\" match field from
- RECORD-REGEXP is used.
- If it is \"\\\\&\" then the whole record is used.
- Otherwise, it is a regular-expression for which to search within the record.
-If a match for KEY is not found within a record then that record is ignored.
-
-With a negative prefix arg sorts in reverse order.
+Sort the text in the region region lexicographically.
+If called interactively, prompt for two regular expressions,
+RECORD-REGEXP and KEY-REGEXP.
+
+RECORD-REGEXP specifies the textual units to be sorted.
+ For example, to sort lines, RECORD-REGEXP would be \"^.*$\".
+
+KEY-REGEXP specifies the part of each record (i.e. each match for
+ RECORD-REGEXP) to be used for sorting.
+ If it is \"\\\\digit\", use the digit'th \"\\\\(...\\\\)\"
+ match field specified by RECORD-REGEXP.
+ If it is \"\\\\&\", use the whole record.
+ Otherwise, KEY-REGEXP should be a regular expression with which
+ to search within the record. If a match for KEY-REGEXP is not
+ found within a record, that record is ignored.
+
+With a negative prefix arg, sort in reverse order.
The variable `sort-fold-case' determines whether alphabetic case affects
the sort order.
@@ -27117,8 +27175,8 @@ GnuTLS requires a port number.
;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes
;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke
;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke
-;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20478
-;;;;;; 3673 653810 0))
+;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20523
+;;;;;; 62082 997685 0))
;;; Generated autoloads from strokes.el
(autoload 'strokes-global-set-stroke "strokes" "\
@@ -27253,7 +27311,7 @@ Studlify-case the current buffer.
;;;***
;;;### (autoloads (global-subword-mode subword-mode) "subword" "progmodes/subword.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20524 51365 2559 0))
;;; Generated autoloads from progmodes/subword.el
(autoload 'subword-mode "subword" "\
@@ -28010,8 +28068,8 @@ Connect to the Emacs talk group from the current X display or tty frame.
;;;***
-;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20478 3673
-;;;;;; 653810 0))
+;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20522 9637
+;;;;;; 465791 0))
;;; Generated autoloads from tar-mode.el
(autoload 'tar-mode "tar-mode" "\
@@ -28200,8 +28258,8 @@ Start coverage on function under point.
;;;***
-;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20478 3673
-;;;;;; 653810 0))
+;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20545 57511
+;;;;;; 257469 0))
;;; Generated autoloads from play/tetris.el
(autoload 'tetris "tetris" "\
@@ -28232,7 +28290,7 @@ tetris-mode keybindings:
;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command
;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp
;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el"
-;;;;;; (20485 15269 390836 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from textmodes/tex-mode.el
(defvar tex-shell-file-name nil "\
@@ -29114,7 +29172,7 @@ With ARG, turn time stamping on if and only if arg is positive.
;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out
;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in
;;;;;; timeclock-mode-line-display) "timeclock" "calendar/timeclock.el"
-;;;;;; (20427 14766 970343 0))
+;;;;;; (20523 62082 997685 0))
;;; Generated autoloads from calendar/timeclock.el
(autoload 'timeclock-mode-line-display "timeclock" "\
@@ -29524,7 +29582,7 @@ BUFFER defaults to `trace-buffer'.
;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp"
-;;;;;; "net/tramp.el" (20471 14012 248888 0))
+;;;;;; "net/tramp.el" (20530 32114 546307 0))
;;; Generated autoloads from net/tramp.el
(defvar tramp-mode t "\
@@ -29667,8 +29725,8 @@ Discard Tramp from loading remote files.
;;;***
-;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20369
-;;;;;; 14251 85829 0))
+;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20518
+;;;;;; 12580 46478 0))
;;; Generated autoloads from tutorial.el
(autoload 'help-with-tutorial "tutorial" "\
@@ -29755,7 +29813,7 @@ First column's text sSs Second column's text
;;;;;; type-break type-break-mode type-break-keystroke-threshold
;;;;;; type-break-good-break-interval type-break-good-rest-interval
;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el"
-;;;;;; (20355 10021 546955 0))
+;;;;;; (20545 57511 257469 0))
;;; Generated autoloads from type-break.el
(defvar type-break-mode nil "\
@@ -30320,7 +30378,7 @@ accessible.
;;;***
;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p
-;;;;;; url-http) "url-http" "url/url-http.el" (20478 3673 653810
+;;;;;; url-http) "url-http" "url/url-http.el" (20522 38650 757441
;;;;;; 0))
;;; Generated autoloads from url/url-http.el
@@ -30523,7 +30581,7 @@ Fetch a data URL (RFC 2397).
;;;***
;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse"
-;;;;;; "url/url-parse.el" (20478 3673 653810 0))
+;;;;;; "url/url-parse.el" (20523 62082 997685 0))
;;; Generated autoloads from url/url-parse.el
(autoload 'url-recreate-url "url-parse" "\
@@ -30606,8 +30664,8 @@ The variable `url-queue-timeout' sets a timeout.
;;;;;; url-percentage url-display-percentage url-pretty-length url-strip-leading-spaces
;;;;;; url-eat-trailing-space url-get-normalized-date url-lazy-message
;;;;;; url-normalize-url url-insert-entities-in-string url-parse-args
-;;;;;; url-debug url-debug) "url-util" "url/url-util.el" (20478
-;;;;;; 3673 653810 0))
+;;;;;; url-debug url-debug) "url-util" "url/url-util.el" (20520
+;;;;;; 54308 826101 0))
;;; Generated autoloads from url/url-util.el
(defvar url-debug nil "\
@@ -30867,8 +30925,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers
;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff
;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook
-;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20501
-;;;;;; 3499 284800 0))
+;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20542
+;;;;;; 46798 773957 0))
;;; Generated autoloads from vc/vc.el
(defvar vc-checkout-hook nil "\
@@ -31211,7 +31269,7 @@ Name of the format file in a .bzr directory.")
;;;***
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20478 3673 653810
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20542 46798 773957
;;;;;; 0))
;;; Generated autoloads from vc/vc-cvs.el
(defun vc-cvs-registered (f)
@@ -31223,7 +31281,7 @@ Name of the format file in a .bzr directory.")
;;;***
-;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20478 3673 653810
+;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20522 9637 465791
;;;;;; 0))
;;; Generated autoloads from vc/vc-dir.el
@@ -31295,8 +31353,7 @@ case, and the process object in the asynchronous case.
;;;***
-;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20478 3673 653810
-;;;;;; 0))
+;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20524 51365 2559 0))
;;; Generated autoloads from vc/vc-mtn.el
(defconst vc-mtn-admin-dir "_MTN" "\
@@ -32468,8 +32525,8 @@ Exit View mode and make the current buffer editable.
;;;***
-;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20355
-;;;;;; 10021 546955 0))
+;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20513
+;;;;;; 18948 537867 0))
;;; Generated autoloads from emulation/vip.el
(autoload 'vip-setup "vip" "\
@@ -32592,15 +32649,16 @@ this is equivalent to `display-warning', using
;;;***
;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el"
-;;;;;; (20478 3673 653810 0))
+;;;;;; (20510 18478 782378 0))
;;; Generated autoloads from wdired.el
(autoload 'wdired-change-to-wdired-mode "wdired" "\
-Put a dired buffer in a mode in which filenames are editable.
+Put a Dired buffer in Writable Dired (WDired) mode.
\\<wdired-mode-map>
-This mode allows the user to change the names of the files, and after
-typing \\[wdired-finish-edit] Emacs renames the files and directories
-in disk.
+In WDired mode, you can edit the names of the files in the
+buffer, the target of the links, and the permission bits of the
+files. After typing \\[wdired-finish-edit], Emacs modifies the files and
+directories to reflect your edits.
See `wdired-mode'.
@@ -32626,7 +32684,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
;;;***
;;;### (autoloads (which-function-mode which-func-mode) "which-func"
-;;;;;; "progmodes/which-func.el" (20461 32935 300400 0))
+;;;;;; "progmodes/which-func.el" (20523 62082 997685 0))
;;; Generated autoloads from progmodes/which-func.el
(put 'which-func-format 'risky-local-variable t)
(put 'which-func-current 'risky-local-variable t)
@@ -32662,8 +32720,8 @@ in certain major modes.
;;;### (autoloads (whitespace-report-region whitespace-report whitespace-cleanup-region
;;;;;; whitespace-cleanup global-whitespace-toggle-options whitespace-toggle-options
;;;;;; global-whitespace-newline-mode global-whitespace-mode whitespace-newline-mode
-;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20495 51111
-;;;;;; 757560 0))
+;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20508 13724
+;;;;;; 260761 0))
;;; Generated autoloads from whitespace.el
(autoload 'whitespace-mode "whitespace" "\
@@ -33209,7 +33267,7 @@ With arg, turn Winner mode on if and only if arg is positive.
;;;***
;;;### (autoloads (woman-bookmark-jump woman-find-file woman-dired-find-file
-;;;;;; woman woman-locale) "woman" "woman.el" (20504 6781 423358
+;;;;;; woman woman-locale) "woman" "woman.el" (20539 18737 159373
;;;;;; 0))
;;; Generated autoloads from woman.el
@@ -33392,7 +33450,7 @@ Example:
;;;***
;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el"
-;;;;;; (20499 48164 310488 0))
+;;;;;; (20528 48420 241677 0))
;;; Generated autoloads from xml.el
(autoload 'xml-parse-file "xml" "\
@@ -33540,7 +33598,7 @@ Zippy goes to the analyst.
;;;***
-;;;### (autoloads (zone) "zone" "play/zone.el" (20427 14766 970343
+;;;### (autoloads (zone) "zone" "play/zone.el" (20545 57511 257469
;;;;;; 0))
;;; Generated autoloads from play/zone.el
@@ -33752,7 +33810,7 @@ Zone out, completely.
;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el"
;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el"
;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el"
-;;;;;; "w32-vars.el" "x-dnd.el") (20505 765 716386 793000))
+;;;;;; "w32-vars.el" "x-dnd.el") (20545 57718 475744 538000))
;;;***
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index cc2638d58de..a696fff7dc7 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1821,7 +1821,9 @@ Currently supported properties are all the properties that can appear in
`:predicate' a predicate that completion candidates need to satisfy.
`:exclusive' If `no', means that if the completion table fails to
match the text at point, then instead of reporting a completion
- failure, the completion should try the next completion function.")
+ failure, the completion should try the next completion function.
+As is the case with most hooks, the functions are responsible to preserve
+things like point and current buffer.")
(defvar completion--capf-misbehave-funs nil
"List of functions found on `completion-at-point-functions' that misbehave.
diff --git a/lisp/misc.el b/lisp/misc.el
index cb52ecbd36e..96b739dc2b7 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -99,14 +99,14 @@ Ignores CHAR at point."
(defun forward-to-word (arg)
"Move forward until encountering the beginning of a word.
With argument, do this that many times."
- (interactive "p")
+ (interactive "^p")
(or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
(goto-char (if (> arg 0) (point-max) (point-min)))))
(defun backward-to-word (arg)
"Move backward until encountering the end of a word.
With argument, do this that many times."
- (interactive "p")
+ (interactive "^p")
(forward-to-word (- arg)))
;;;###autoload
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 27cf50f06ca..dd345630b9b 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -802,26 +802,36 @@ With no argument or nil as argument, use the current buffer."
(defvar rcirc-max-message-length 420
"Messages longer than this value will be split.")
+(defun rcirc-split-message (message)
+ "Split MESSAGE into chunks within `rcirc-max-message-length'."
+ ;; `rcirc-encode-coding-system' can have buffer-local value.
+ (let ((encoding rcirc-encode-coding-system))
+ (with-temp-buffer
+ (insert message)
+ (goto-char (point-min))
+ (let (result)
+ (while (not (eobp))
+ (goto-char (or (byte-to-position rcirc-max-message-length)
+ (point-max)))
+ ;; max message length is 512 including CRLF
+ (while (and (not (bobp))
+ (> (length (encode-coding-region
+ (point-min) (point) encoding t))
+ rcirc-max-message-length))
+ (forward-char -1))
+ (push (delete-and-extract-region (point-min) (point)) result))
+ (nreverse result)))))
+
(defun rcirc-send-message (process target message &optional noticep silent)
"Send TARGET associated with PROCESS a privmsg with text MESSAGE.
If NOTICEP is non-nil, send a notice instead of privmsg.
If SILENT is non-nil, do not print the message in any irc buffer."
- ;; max message length is 512 including CRLF
- (let* ((response (if noticep "NOTICE" "PRIVMSG"))
- (oversize (> (length message) rcirc-max-message-length))
- (text (if oversize
- (substring message 0 rcirc-max-message-length)
- message))
- (text (if (string= text "")
- " "
- text))
- (more (if oversize
- (substring message rcirc-max-message-length))))
+ (let ((response (if noticep "NOTICE" "PRIVMSG")))
(rcirc-get-buffer-create process target)
- (rcirc-send-string process (concat response " " target " :" text))
- (unless silent
- (rcirc-print process (rcirc-nick process) response target text))
- (when more (rcirc-send-message process target more noticep))))
+ (dolist (msg (rcirc-split-message message))
+ (rcirc-send-string process (concat response " " target " :" msg))
+ (unless silent
+ (rcirc-print process (rcirc-nick process) response target msg)))))
(defvar rcirc-input-ring nil)
(defvar rcirc-input-ring-index 0)
diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el
index c6e95970f3d..4e759a4e6b2 100644
--- a/lisp/net/sasl.el
+++ b/lisp/net/sasl.el
@@ -183,7 +183,7 @@ It contain at least 64 bits of entropy."
;; Don't use microseconds from (current-time), they may be unsupported.
;; Instead we use this randomly inited counter.
(setq sasl-unique-id-char
- (% (1+ (or sasl-unique-id-char (logand (random t) (1- (lsh 1 20)))))
+ (% (1+ (or sasl-unique-id-char (logand (random) (1- (lsh 1 20)))))
;; (current-time) returns 16-bit ints,
;; and 2^16*25 just fits into 4 digits i base 36.
(* 25 25)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 6283188d46a..2c1af3e83fa 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -512,9 +512,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
;; IRIX64: /usr/bin
;;;###tramp-autoload
(defcustom tramp-remote-path
- '(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin"
- "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin"
- "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
+ '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
+ "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
+ "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
"/opt/bin" "/opt/sbin" "/opt/local/bin")
"List of directories to search for executables on remote host.
For every remote host, this variable will be set buffer local,
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 848599104c5..a17bbfa0d14 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3293,7 +3293,7 @@ for process communication also."
;; Under Windows XP, accept-process-output doesn't return
;; sometimes. So we add an additional timeout.
(with-timeout ((or timeout 1))
- (accept-process-output proc timeout timeout-msecs)))
+ (accept-process-output proc timeout timeout-msecs (and proc t))))
(tramp-message proc 10 "\n%s" (buffer-string))))
(defun tramp-check-for-regexp (proc regexp)
diff --git a/lisp/obsolete/vc-mcvs.el b/lisp/obsolete/vc-mcvs.el
index 94db90f1d6a..78221945073 100644
--- a/lisp/obsolete/vc-mcvs.el
+++ b/lisp/obsolete/vc-mcvs.el
@@ -329,7 +329,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(if vc-mcvs-use-edit
(vc-mcvs-command nil 0 file "edit")
(set-file-modes file (logior (file-modes file) 128))
- (if (equal file buffer-file-name) (toggle-read-only -1))))
+ (if (equal file buffer-file-name) (read-only-mode -1))))
;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-mcvs-command nil 0 file
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index cf9c32006ac..152af5f43ed 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ Better seed support for (random).
+ * org-id.el (org-id-uuid):
+ Change (random t) to (random), now that the latter is more random.
+
2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
Don't use the abbreviation "win" to refer to Windows (Bug#10421).
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el
index 55e826f3ae6..a93f804946f 100644
--- a/lisp/org/org-id.el
+++ b/lisp/org/org-id.el
@@ -318,7 +318,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
(defun org-id-uuid ()
"Return string with random (version 4) UUID."
(let ((rnd (md5 (format "%s%s%s%s%s%s%s"
- (random t)
+ (random)
(current-time)
(user-uid)
(emacs-pid)
diff --git a/lisp/paren.el b/lisp/paren.el
index 2d6c42478e1..ab856380d3f 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -52,8 +52,17 @@ otherwise)."
:group 'paren-showing)
(defcustom show-paren-delay 0.125
- "Time in seconds to delay before showing a matching paren."
+ "Time in seconds to delay before showing a matching paren.
+If you change this without using customize while `show-paren-mode' is
+active, you must toggle the mode off and on again for this to take effect."
:type '(number :tag "seconds")
+ :initialize 'custom-initialize-default
+ :set (lambda (sym val)
+ (if (not show-paren-mode)
+ (set sym val)
+ (show-paren-mode -1)
+ (set sym val)
+ (show-paren-mode 1)))
:group 'paren-showing)
(defcustom show-paren-priority 1000
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index e6df0df8282..abc78cd495c 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -953,8 +953,6 @@ lest."
(y-or-n-p prompt)
t))
-(random t)
-
(provide '5x5)
;;; 5x5.el ends here
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 9919600202f..2398a7b89c7 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -201,8 +201,6 @@ the buffer *Birthday-Present-for-Name*."
(animate-string "my sunshine" 18 34)
(animate-string "to stay!" 19 34))
-(random t)
-
(provide 'animate)
;;; animate.el ends here
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el
index eb2d784c8e5..db2e18188e5 100644
--- a/lisp/play/blackbox.el
+++ b/lisp/play/blackbox.el
@@ -93,7 +93,7 @@
(define-key map (vector 'remap oldfun) newfun))
-(defvar blackbox-mode-map
+(defvar blackbox-mode-map
(let ((map (make-keymap)))
(suppress-keymap map t)
(blackbox-redefine-key map 'backward-char 'bb-left)
@@ -257,7 +257,6 @@ a reflection."
(bb-goto (cons bb-x bb-y)))
(defun bb-init-board (num-balls)
- (random t)
(let (board pos)
(while (>= (setq num-balls (1- num-balls)) 0)
(while
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index cbf29a26a71..dbd6e893473 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -53,9 +53,6 @@
;;; Code:
-; Randomize the seed in the random number generator.
-(random t)
-
(defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0"
"Delimiter used to separate cookie file entries.")
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el
index 8f9f8cea24f..238b2a86c17 100644
--- a/lisp/play/dissociate.el
+++ b/lisp/play/dissociate.el
@@ -94,8 +94,6 @@ Default is 2."
(funcall search-function overlap opoint t))))))
(sit-for 0))))
-(random t)
-
(provide 'dissociate)
;;; dissociate.el ends here
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index fdae2ec9326..57dbb1452f3 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -1620,8 +1620,6 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result."
(defun doctor-chat () (doctor-type (doc$ doctor--chatlst)))
-(random t)
-
(provide 'doctor)
;;; doctor.el ends here
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el
index 22a2642f751..2d62b800ef4 100644
--- a/lisp/play/dunnet.el
+++ b/lisp/play/dunnet.el
@@ -3010,7 +3010,6 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
(dun-uexit nil)))
-(random t)
(setq tloc (+ 60 (random 18)))
(dun-replace dun-room-objects tloc
(append (nth tloc dun-room-objects) (list 18)))
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 6d73e2ccb65..3dba99d98d5 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -1197,8 +1197,6 @@ If the game is finished, this command requests for another game."
(move-to-column (+ gomoku-x-offset
(* gomoku-square-width (1- gomoku-board-width)))))
-(random t)
-
(provide 'gomoku)
;;; gomoku.el ends here
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el
index e9f555093db..e103249da49 100644
--- a/lisp/play/landmark.el
+++ b/lisp/play/landmark.el
@@ -1683,8 +1683,6 @@ Use \\[describe-mode] for more info."
;;;allout-layout: (0 : -1 -1 0)
;;;End:
-(random t)
-
(provide 'landmark)
;;; landmark.el ends here
diff --git a/lisp/play/life.el b/lisp/play/life.el
index e9133f84862..87ec0226af5 100644
--- a/lisp/play/life.el
+++ b/lisp/play/life.el
@@ -111,9 +111,6 @@
;; Sadly, mode-line-format won't display numbers.
(defvar life-generation-string nil)
-(defvar life-initialized nil
- "Non-nil if `life' has been run at least once.")
-
;;;###autoload
(defun life (&optional sleeptime)
"Run Conway's Life simulation.
@@ -121,9 +118,6 @@ The starting pattern is randomly selected. Prefix arg (optional first
arg non-nil from a program) is the number of seconds to sleep between
generations (this defaults to 1)."
(interactive "p")
- (or life-initialized
- (random t))
- (setq life-initialized t)
(or sleeptime (setq sleeptime 1))
(life-setup)
(catch 'life-exit
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index c0c8803f896..e16bb2f1bde 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -35,8 +35,6 @@
:prefix "mpuz-"
:group 'games)
-(random t) ; randomize
-
(defcustom mpuz-silent 'error
"Set this to nil if you want dings on inputs.
The value t means never ding, and `error' means only ding on wrong input."
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index b811a21605b..9cc33304589 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -635,8 +635,6 @@ tetris-mode keybindings:
(tetris-mode)
(tetris-start-game))
-(random t)
-
(provide 'tetris)
;;; tetris.el ends here
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 34e21193437..1cfc6c59987 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -675,8 +675,6 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).")
(kill-buffer nil))))
-(random t)
-
;;;;;;;;;;;;;;;
(provide 'zone)
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 0a7d65c1fa4..97fcb6874dd 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -32,6 +32,11 @@
;;; Code:
+(defgroup bug-reference nil
+ "Hyperlinking references to bug reports"
+ ;; Somewhat arbitrary, by analogy with eg goto-address.
+ :group 'comm)
+
(defvar bug-reference-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'bug-reference-push-button)
@@ -63,9 +68,13 @@ so that it is considered safe, see `enable-local-variables'.")
(and (symbolp s)
(get s 'bug-reference-url-format)))))
-(defconst bug-reference-bug-regexp
+(defcustom bug-reference-bug-regexp
"\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
- "Regular expression which matches bug references.")
+ "Regular expression matching bug references.
+The second subexpression should match the bug reference (usually a number)."
+ :type 'string
+ :safe 'stringp
+ :group 'bug-reference)
(defun bug-reference-set-overlay-properties ()
"Set properties of bug reference overlays."
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 21a323d8b45..fbb0c9e204a 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1503,6 +1503,13 @@ Otherwise, construct a buffer name from NAME-OF-MODE."
(compilation-start command nil name-function highlight-regexp)))
(make-obsolete 'compile-internal 'compilation-start "22.1")
+(defcustom compilation-always-kill nil
+ "If t, always kill a running compilation process before starting a new one.
+If nil, ask to kill it."
+ :type 'boolean
+ :version "24.3"
+ :group 'compilation)
+
;;;###autoload
(defun compilation-start (command &optional mode name-function highlight-regexp)
"Run compilation command COMMAND (low level interface).
@@ -1537,6 +1544,7 @@ Returns the compilation buffer created."
(let ((comp-proc (get-buffer-process (current-buffer))))
(if comp-proc
(if (or (not (eq (process-status comp-proc) 'run))
+ compilation-always-kill
(yes-or-no-p
(format "A %s process is running; kill it? "
name-of-mode)))
@@ -2461,10 +2469,7 @@ and overlay is highlighted between MK and END-MK."
;; the error location if the two buffers are in two
;; different frames. So don't do it if it's not necessary.
pre-existing
- (let ((display-buffer-reuse-frames t)
- (pop-up-windows t))
- ;; Pop up a window.
- (display-buffer (marker-buffer msg)))))
+ (display-buffer (marker-buffer msg))))
(highlight-regexp (with-current-buffer (marker-buffer msg)
;; also do this while we change buffer
(compilation-set-window w msg)
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index e5142571972..092e1a4d578 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -84,8 +84,9 @@ When this is `function', only ask when called non-interactively."
:group 'executable)
-(defcustom executable-prefix "#! "
+(defcustom executable-prefix "#!"
"Interpreter magic number prefix inserted when there was no magic number."
+ :version "24.3" ; "#! " -> "#!"
:type 'string
:group 'executable)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 0a99c2f5c24..59c419abfc3 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1413,29 +1413,6 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
(with-current-buffer ,buffer
(apply ',expr args))))
-;; Used to define all gdb-frame-*-buffer functions except
-;; `gdb-frame-io-buffer'
-(defmacro def-gdb-frame-for-buffer (name buffer &optional doc)
- "Define a function NAME which shows gdb BUFFER in a separate frame.
-
-DOC is an optional documentation string."
- `(defun ,name (&optional thread)
- ,(when doc doc)
- (interactive)
- (let ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist gdb-frame-parameters))
- (display-buffer (gdb-get-buffer-create ,buffer thread)))))
-
-(defmacro def-gdb-display-buffer (name buffer &optional doc)
- "Define a function NAME which shows gdb BUFFER.
-
-DOC is an optional documentation string."
- `(defun ,name (&optional thread)
- ,(when doc doc)
- (interactive)
- (gdb-display-buffer
- (gdb-get-buffer-create ,buffer thread) t)))
-
;; Used to display windows with thread-bound buffers
(defmacro def-gdb-preempt-display-buffer (name buffer &optional doc
split-horizontal)
@@ -1511,8 +1488,7 @@ DOC is an optional documentation string."
(defun gdb-display-io-buffer ()
"Display IO of debugged program in a separate window."
(interactive)
- (gdb-display-buffer
- (gdb-get-buffer-create 'gdb-inferior-io) t))
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io)))
(defun gdb-inferior-io--init-proc (proc)
;; Set up inferior I/O. Needs GDB 6.4 onwards.
@@ -1540,19 +1516,24 @@ DOC is an optional documentation string."
(comint-exec io-buffer "gdb-inferior" nil nil nil)
(gdb-inferior-io--init-proc (get-buffer-process io-buffer))))))
-(defconst gdb-frame-parameters
- '((height . 14) (width . 80)
- (unsplittable . t)
- (tool-bar-lines . nil)
- (menu-bar-lines . nil)
- (minibuffer . nil)))
+(defvar gdb-display-buffer-other-frame-action
+ `((display-buffer-reuse-window display-buffer-pop-up-frame)
+ (reusable-frames . 0)
+ (inhibit-same-window . t)
+ (pop-up-frame-parameters (height . 14)
+ (width . 80)
+ (unsplittable . t)
+ (tool-bar-lines . nil)
+ (menu-bar-lines . nil)
+ (minibuffer . nil)))
+ "A `display-buffer' action for displaying GDB utility frames.")
+(put 'gdb-display-buffer-other-frame-action 'risky-local-variable t)
(defun gdb-frame-io-buffer ()
- "Display IO of debugged program in a new frame."
+ "Display IO of debugged program in another frame."
(interactive)
- (let ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist gdb-frame-parameters))
- (display-buffer (gdb-get-buffer-create 'gdb-inferior-io))))
+ (display-buffer (gdb-get-buffer-create 'gdb-inferior-io)
+ gdb-display-buffer-other-frame-action))
(defvar gdb-inferior-io-mode-map
(let ((map (make-sparse-keymap)))
@@ -1571,7 +1552,7 @@ DOC is an optional documentation string."
(defun gdb-inferior-filter (proc string)
(unless (string-equal string "")
- (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io) t))
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io)))
(with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io)
(comint-output-filter proc string)))
@@ -2615,15 +2596,16 @@ If not in a source or disassembly buffer just set point."
(defun gdb-breakpoints-buffer-name ()
(concat "*breakpoints of " (gdb-get-target-string) "*"))
-(def-gdb-display-buffer
- gdb-display-breakpoints-buffer
- 'gdb-breakpoints-buffer
- "Display status of user-settable breakpoints.")
+(defun gdb-display-breakpoints-buffer (&optional thread)
+ "Display GDB breakpoints."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread)))
-(def-gdb-frame-for-buffer
- gdb-frame-breakpoints-buffer
- 'gdb-breakpoints-buffer
- "Display status of user-settable breakpoints in a new frame.")
+(defun gdb-frame-breakpoints-buffer (&optional thread)
+ "Display GDB breakpoints in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread)
+ gdb-display-buffer-other-frame-action))
(defvar gdb-breakpoints-mode-map
(let ((map (make-sparse-keymap))
@@ -2684,15 +2666,16 @@ corresponding to the mode line clicked."
(defun gdb-threads-buffer-name ()
(concat "*threads of " (gdb-get-target-string) "*"))
-(def-gdb-display-buffer
- gdb-display-threads-buffer
- 'gdb-threads-buffer
- "Display GDB threads.")
+(defun gdb-display-threads-buffer (&optional thread)
+ "Display GDB threads."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread)))
-(def-gdb-frame-for-buffer
- gdb-frame-threads-buffer
- 'gdb-threads-buffer
- "Display GDB threads in a new frame.")
+(defun gdb-frame-threads-buffer (&optional thread)
+ "Display GDB threads in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread)
+ gdb-display-buffer-other-frame-action))
(def-gdb-trigger-and-handler
gdb-invalidate-threads (gdb-current-context-command "-thread-info")
@@ -2868,26 +2851,22 @@ on the current line."
(def-gdb-thread-buffer-simple-command
gdb-frame-stack-for-thread
gdb-frame-stack-buffer
- "Display a new frame with stack buffer for the thread at
-current line.")
+ "Display another frame with stack buffer for thread at current line.")
(def-gdb-thread-buffer-simple-command
gdb-frame-locals-for-thread
gdb-frame-locals-buffer
- "Display a new frame with locals buffer for the thread at
-current line.")
+ "Display another frame with locals buffer for thread at current line.")
(def-gdb-thread-buffer-simple-command
gdb-frame-registers-for-thread
gdb-frame-registers-buffer
- "Display a new frame with registers buffer for the thread at
-current line.")
+ "Display another frame with registers buffer for the thread at current line.")
(def-gdb-thread-buffer-simple-command
gdb-frame-disassembly-for-thread
gdb-frame-disassembly-buffer
- "Display a new frame with disassembly buffer for the thread at
-current line.")
+ "Display another frame with disassembly buffer for the thread at current line.")
(defmacro def-gdb-thread-buffer-gud-command (name gud-command &optional doc)
"Define a NAME which will execute GUD-COMMAND with
@@ -3290,21 +3269,16 @@ DOC is an optional documentation string."
(defun gdb-memory-buffer-name ()
(concat "*memory of " (gdb-get-target-string) "*"))
-(def-gdb-display-buffer
- gdb-display-memory-buffer
- 'gdb-memory-buffer
- "Display memory contents.")
+(defun gdb-display-memory-buffer (&optional thread)
+ "Display GDB memory contents."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-memory-buffer thread)))
(defun gdb-frame-memory-buffer ()
- "Display memory contents in a new frame."
+ "Display memory contents in another frame."
(interactive)
- (let* ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist
- `((left-fringe . 0)
- (right-fringe . 0)
- (width . 83)
- ,@gdb-frame-parameters)))
- (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer))))
+ (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer)
+ gdb-display-buffer-other-frame-action))
;;; Disassembly view
@@ -3313,19 +3287,20 @@ DOC is an optional documentation string."
(gdb-current-context-buffer-name
(concat "disassembly of " (gdb-get-target-string))))
-(def-gdb-display-buffer
- gdb-display-disassembly-buffer
- 'gdb-disassembly-buffer
- "Display disassembly for current stack frame.")
+(defun gdb-display-disassembly-buffer (&optional thread)
+ "Display GDB disassembly information."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread)))
(def-gdb-preempt-display-buffer
gdb-preemptively-display-disassembly-buffer
'gdb-disassembly-buffer)
-(def-gdb-frame-for-buffer
- gdb-frame-disassembly-buffer
- 'gdb-disassembly-buffer
- "Display disassembly in a new frame.")
+(defun gdb-frame-disassembly-buffer (&optional thread)
+ "Display GDB disassembly information in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread)
+ gdb-display-buffer-other-frame-action))
(def-gdb-auto-update-trigger gdb-invalidate-disassembly
(let* ((frame (gdb-current-buffer-frame))
@@ -3560,19 +3535,20 @@ member."
(gdb-current-context-buffer-name
(concat "stack frames of " (gdb-get-target-string))))
-(def-gdb-display-buffer
- gdb-display-stack-buffer
- 'gdb-stack-buffer
- "Display backtrace of current stack.")
+(defun gdb-display-stack-buffer (&optional thread)
+ "Display GDB backtrace for current stack."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread)))
(def-gdb-preempt-display-buffer
gdb-preemptively-display-stack-buffer
'gdb-stack-buffer nil t)
-(def-gdb-frame-for-buffer
- gdb-frame-stack-buffer
- 'gdb-stack-buffer
- "Display backtrace of current stack in a new frame.")
+(defun gdb-frame-stack-buffer (&optional thread)
+ "Display GDB backtrace for current stack in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread)
+ gdb-display-buffer-other-frame-action))
(defvar gdb-frames-mode-map
(let ((map (make-sparse-keymap)))
@@ -3719,19 +3695,20 @@ member."
(gdb-current-context-buffer-name
(concat "locals of " (gdb-get-target-string))))
-(def-gdb-display-buffer
- gdb-display-locals-buffer
- 'gdb-locals-buffer
- "Display local variables of current stack and their values.")
+(defun gdb-display-locals-buffer (&optional thread)
+ "Display the local variables of current GDB stack."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread)))
(def-gdb-preempt-display-buffer
gdb-preemptively-display-locals-buffer
'gdb-locals-buffer nil t)
-(def-gdb-frame-for-buffer
- gdb-frame-locals-buffer
- 'gdb-locals-buffer
- "Display local variables of current stack and their values in a new frame.")
+(defun gdb-frame-locals-buffer (&optional thread)
+ "Display the local variables of the current GDB stack in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread)
+ gdb-display-buffer-other-frame-action))
;; Registers buffer.
@@ -3818,19 +3795,20 @@ member."
(gdb-current-context-buffer-name
(concat "registers of " (gdb-get-target-string))))
-(def-gdb-display-buffer
- gdb-display-registers-buffer
- 'gdb-registers-buffer
- "Display integer register contents.")
+(defun gdb-display-registers-buffer (&optional thread)
+ "Display GDB register contents."
+ (interactive)
+ (gdb-display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread)))
(def-gdb-preempt-display-buffer
gdb-preemptively-display-registers-buffer
'gdb-registers-buffer nil t)
-(def-gdb-frame-for-buffer
- gdb-frame-registers-buffer
- 'gdb-registers-buffer
- "Display integer register contents in a new frame.")
+(defun gdb-frame-registers-buffer (&optional thread)
+ "Display GDB register contents in another frame."
+ (interactive)
+ (display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread)
+ gdb-display-buffer-other-frame-action))
;; Needs GDB 6.4 onwards (used to fail with no stack).
(defun gdb-get-changed-registers ()
@@ -3917,26 +3895,26 @@ overlay arrow in source buffer."
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
;;;; Window management
-(defun gdb-display-buffer (buf dedicated &optional frame)
- "Show buffer BUF.
-
-If BUF is already displayed in some window, show it, deiconifying
-the frame if necessary. Otherwise, find least recently used
-window and show BUF there, if the window is not used for GDB
-already, in which case that window is split first."
- (let ((answer (get-buffer-window buf (or frame 0))))
- (if answer
- (display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary.
- (let ((window (get-lru-window)))
- (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window))
- 'gdbmi)
- (let ((largest (get-largest-window)))
- (setq answer (split-window largest))
- (set-window-buffer answer buf)
- (set-window-dedicated-p answer dedicated)
- answer)
- (set-window-buffer window buf)
- window)))))
+(defun gdb-display-buffer (buf)
+ "Show buffer BUF, and make that window dedicated."
+ (let ((window (display-buffer buf)))
+ (set-window-dedicated-p window t)
+ window))
+
+ ;; (let ((answer (get-buffer-window buf 0)))
+ ;; (if answer
+ ;; (display-buffer buf nil 0) ;Deiconify frame if necessary.
+ ;; (let ((window (get-lru-window)))
+ ;; (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window))
+ ;; 'gdbmi)
+ ;; (let ((largest (get-largest-window)))
+ ;; (setq answer (split-window largest))
+ ;; (set-window-buffer answer buf)
+ ;; (set-window-dedicated-p answer t)
+ ;; answer)
+ ;; (set-window-buffer window buf)
+ ;; window)))))
+
(defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal)
"Find window displaying a buffer with the same
@@ -3963,7 +3941,7 @@ SPLIT-HORIZONTAL and show BUF in the new window."
(if dedicated-window
(set-window-buffer
(split-window dedicated-window nil split-horizontal) buf)
- (gdb-display-buffer buf t))))))
+ (gdb-display-buffer buf))))))
(error "Null buffer")))
;;; Shared keymap initialization:
@@ -4067,7 +4045,7 @@ SPLIT-HORIZONTAL and show BUF in the new window."
'all-threads)
(defun gdb-frame-gdb-buffer ()
- "Display GUD buffer in a new frame."
+ "Display GUD buffer in another frame."
(interactive)
(display-buffer-other-frame gud-comint-buffer))
@@ -4089,13 +4067,12 @@ window is dedicated."
(defun gdb-setup-windows ()
"Layout the window pattern for `gdb-many-windows'."
- (gdb-display-locals-buffer)
- (gdb-display-stack-buffer)
- (delete-other-windows)
- (gdb-display-breakpoints-buffer)
- (delete-other-windows)
- ;; Don't dedicate.
+ (gdb-get-buffer-create 'gdb-locals-buffer)
+ (gdb-get-buffer-create 'gdb-stack-buffer)
+ (gdb-get-buffer-create 'gdb-breakpoints-buffer)
+ (set-window-dedicated-p (selected-window) nil)
(switch-to-buffer gud-comint-buffer)
+ (delete-other-windows)
(let ((win0 (selected-window))
(win1 (split-window nil ( / ( * (window-height) 3) 4)))
(win2 (split-window nil ( / (window-height) 3)))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 5946e93f34d..2e3858b2cc5 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2685,7 +2685,6 @@ Obeying it means displaying in another window the specified file and line."
(declare-function global-hl-line-highlight "hl-line" ())
(declare-function hl-line-highlight "hl-line" ())
(declare-function gdb-display-source-buffer "gdb-mi" (buffer))
-(declare-function gdb-display-buffer "gdb-mi" (buf dedicated &optional size))
;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen
;; and that its line LINE is visible.
@@ -2702,10 +2701,7 @@ Obeying it means displaying in another window the specified file and line."
(window (and buffer
(or (get-buffer-window buffer)
(if (eq gud-minor-mode 'gdbmi)
- (or (if (get-buffer-window buffer 'visible)
- (display-buffer buffer nil 'visible))
- (unless (gdb-display-source-buffer buffer)
- (gdb-display-buffer buffer nil 'visible))))
+ (display-buffer buffer nil 'visible))
(display-buffer buffer))))
(pos))
(if buffer
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 3e3d7adc0b6..4b77c6dab1a 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1003,7 +1003,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block."
"Compress the define list ENV into a list of defined symbols only."
(let ((new-defs nil))
(dolist (def env new-defs)
- (if (hif-lookup (car def)) (push (car env) new-defs)))))
+ (if (hif-lookup (car def)) (push (car def) new-defs)))))
(defun hide-ifdef-set-define-alist (name)
"Set the association for NAME to `hide-ifdef-env'."
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index b6d2b5e319c..233b9a5212e 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -408,6 +408,8 @@ element (using `match-beginning') before calling `hs-forward-sexp-func'.")
(defvar hs-block-end-regexp nil
"Regexp for end of block.")
+(make-variable-buffer-local 'hs-block-end-regexp)
+
(defvar hs-forward-sexp-func 'forward-sexp
"Function used to do a `forward-sexp'.
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 519e5aef2bc..d954cd53e0a 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -426,18 +426,21 @@ Match group 1 is the name of the macro.")
(defcustom js-indent-level 4
"Number of spaces for each indentation step in `js-mode'."
:type 'integer
+ :safe 'integerp
:group 'js)
(defcustom js-expr-indent-offset 0
"Number of additional spaces for indenting continued expressions.
The value must be no less than minus `js-indent-level'."
:type 'integer
+ :safe 'integerp
:group 'js)
(defcustom js-paren-indent-offset 0
"Number of additional spaces for indenting expressions in parentheses.
The value must be no less than minus `js-indent-level'."
:type 'integer
+ :safe 'integerp
:group 'js
:version "24.1")
@@ -445,6 +448,7 @@ The value must be no less than minus `js-indent-level'."
"Number of additional spaces for indenting expressions in square braces.
The value must be no less than minus `js-indent-level'."
:type 'integer
+ :safe 'integerp
:group 'js
:version "24.1")
@@ -452,6 +456,7 @@ The value must be no less than minus `js-indent-level'."
"Number of additional spaces for indenting expressions in curly braces.
The value must be no less than minus `js-indent-level'."
:type 'integer
+ :safe 'integerp
:group 'js
:version "24.1")
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 457c7fee36c..3f93ffa84ba 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -138,18 +138,11 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
(defvar ruby-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "{" 'ruby-electric-brace)
- (define-key map "}" 'ruby-electric-brace)
- (define-key map (kbd "M-C-a") 'ruby-beginning-of-defun)
- (define-key map (kbd "M-C-e") 'ruby-end-of-defun)
(define-key map (kbd "M-C-b") 'ruby-backward-sexp)
(define-key map (kbd "M-C-f") 'ruby-forward-sexp)
(define-key map (kbd "M-C-p") 'ruby-beginning-of-block)
(define-key map (kbd "M-C-n") 'ruby-end-of-block)
- (define-key map (kbd "M-C-h") 'ruby-mark-defun)
(define-key map (kbd "M-C-q") 'ruby-indent-exp)
- (define-key map (kbd "C-M-h") 'backward-kill-word)
- (define-key map (kbd "C-j") 'reindent-then-newline-and-indent)
(define-key map (kbd "C-c {") 'ruby-toggle-block)
map)
"Keymap used in Ruby mode.")
@@ -840,12 +833,6 @@ and `\\' when preceded by `?'."
(+ indent ruby-indent-level)
indent))))
-(defun ruby-electric-brace (arg)
- "Insert a brace and re-indent the current line."
- (interactive "P")
- (self-insert-command (prefix-numeric-value arg))
- (ruby-indent-line t))
-
;; TODO: Why isn't one ruby-*-of-defun written in terms of the other?
(defun ruby-beginning-of-defun (&optional arg)
"Move backward to the beginning of the current top-level defun.
@@ -1024,15 +1011,6 @@ With ARG, do it many times. Negative ARG means move forward."
((error)))
i)))
-(defun ruby-mark-defun ()
- "Put mark at end of this Ruby function, point at beginning."
- (interactive)
- (push-mark (point))
- (ruby-end-of-defun)
- (push-mark (point) nil t)
- (ruby-beginning-of-defun)
- (re-search-backward "^\n" (- (point) 1) t))
-
(defun ruby-indent-exp (&optional ignored)
"Indent each line in the balanced expression following the point."
(interactive "*P")
@@ -1586,6 +1564,10 @@ The variable `ruby-indent-level' controls the amount of indentation.
'ruby-imenu-create-index)
(set (make-local-variable 'add-log-current-defun-function)
'ruby-add-log-current-method)
+ (set (make-local-variable 'beginning-of-defun-function)
+ 'ruby-beginning-of-defun)
+ (set (make-local-variable 'end-of-defun-function)
+ 'ruby-end-of-defun)
(add-hook
(cond ((boundp 'before-save-hook) 'before-save-hook)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index a6089aabb04..a422462775d 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -202,6 +202,11 @@
(require 'comint))
(require 'executable)
+(autoload 'comint-completion-at-point "comint")
+(autoload 'comint-filename-completion "comint")
+(autoload 'shell-command-completion "shell")
+(autoload 'shell-environment-variable-completion "shell")
+
(defvar font-lock-comment-face)
(defvar font-lock-set-defaults)
(defvar font-lock-string-face)
@@ -470,7 +475,6 @@ This is buffer-local in every such buffer.")
(define-key map "\C-\M-x" 'sh-execute-region)
(define-key map "\C-c\C-x" 'executable-interpret)
- (define-key map [remap complete-tag] 'comint-dynamic-complete)
(define-key map [remap delete-backward-char]
'backward-delete-char-untabify)
(define-key map "\C-c:" 'sh-set-shell)
@@ -553,9 +557,9 @@ This is buffer-local in every such buffer.")
"Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
(defcustom sh-dynamic-complete-functions
- '(shell-dynamic-complete-environment-variable
- shell-dynamic-complete-command
- comint-dynamic-complete-filename)
+ '(shell-environment-variable-completion
+ shell-command-completion
+ comint-filename-completion)
"Functions for doing TAB dynamic completion."
:type '(repeat function)
:group 'sh-script)
@@ -1187,7 +1191,7 @@ This value is used for the `+' and `-' symbols in an indentation variable."
:group 'sh-indentation)
(put 'sh-basic-offset 'safe-local-variable 'integerp)
-(defcustom sh-indent-comment nil
+(defcustom sh-indent-comment t
"How a comment line is to be indented.
nil means leave it as it is;
t means indent it as a normal line, aligning it to previous non-blank
@@ -1198,6 +1202,7 @@ a number means align to that column, e.g. 0 means first column."
(const :tag "Indent as a normal line." t)
(integer :menu-tag "Indent to this col (0 means first col)."
:tag "Indent to column number.") )
+ :version "24.3"
:group 'sh-indentation)
@@ -1485,6 +1490,7 @@ with your script for an edit-interpret-debug cycle."
(set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table)
(set (make-local-variable 'comint-dynamic-complete-functions)
sh-dynamic-complete-functions)
+ (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)
;; we can't look if previous line ended with `\'
(set (make-local-variable 'comint-prompt-regexp) "^[ \t]*")
(set (make-local-variable 'imenu-case-fold-search) nil)
@@ -4109,20 +4115,6 @@ The document is bounded by `sh-here-document-word'."
;; various other commands
-(autoload 'comint-dynamic-complete "comint"
- "Dynamically perform completion at point." t)
-
-(autoload 'shell-dynamic-complete-command "shell"
- "Dynamically complete the command at point." t)
-
-(autoload 'comint-dynamic-complete-filename "comint"
- "Dynamically complete the filename at point." t)
-
-(autoload 'shell-dynamic-complete-environment-variable "shell"
- "Dynamically complete the environment variable at point." t)
-
-
-
(defun sh-beginning-of-command ()
;; FIXME: Redefine using SMIE.
"Move point to successive beginnings of commands."
diff --git a/lisp/server.el b/lisp/server.el
index 6d34df351ca..4fd55bcf6d1 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -94,7 +94,6 @@
(setq val t)
(unless load-in-progress
(message "Local sockets unsupported, using TCP sockets")))
- (when val (random t))
(set-default sym val))
:group 'server
:type 'boolean
diff --git a/lisp/simple.el b/lisp/simple.el
index 1080757f7d2..b7a24f4f970 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -365,7 +365,6 @@ Other major modes are defined by comparison with this one."
(define-key map ">" 'end-of-buffer)
(define-key map "<" 'beginning-of-buffer)
(define-key map "g" 'revert-buffer)
- (define-key map "z" 'kill-this-buffer)
map))
(put 'special-mode 'mode-class 'special)
@@ -1887,9 +1886,10 @@ as an argument limits undo to changes within the current region."
;; so, ask the user whether she wants to skip the redo/undo pair.
(let ((equiv (gethash pending-undo-list undo-equiv-table)))
(or (eq (selected-window) (minibuffer-window))
- (setq message (if undo-in-region
- (if equiv "Redo in region!" "Undo in region!")
- (if equiv "Redo!" "Undo!"))))
+ (setq message (format "%s%s!"
+ (if (or undo-no-redo (not equiv))
+ "Undo" "Redo")
+ (if undo-in-region " in region" ""))))
(when (and (consp equiv) undo-no-redo)
;; The equiv entry might point to another redo record if we have done
;; undo-redo-undo-redo-... so skip to the very last equiv.
@@ -6961,6 +6961,32 @@ See also `normal-erase-is-backspace'."
(defvar vis-mode-saved-buffer-invisibility-spec nil
"Saved value of `buffer-invisibility-spec' when Visible mode is on.")
+(define-minor-mode read-only-mode
+ "Change whether the current buffer is read-only.
+With prefix argument ARG, make the buffer read-only if ARG is
+positive, otherwise make it writable. If buffer is read-only
+and `view-read-only' is non-nil, enter view mode.
+
+Do not call this from a Lisp program unless you really intend to
+do the same thing as the \\[toggle-read-only] command, including
+possibly enabling or disabling View mode. Also, note that this
+command works by setting the variable `buffer-read-only', which
+does not affect read-only regions caused by text properties. To
+ignore read-only status in a Lisp program (whether due to text
+properties or buffer state), bind `inhibit-read-only' temporarily
+to a non-nil value."
+ :variable buffer-read-only
+ (cond
+ ((and (not buffer-read-only) view-mode)
+ (View-exit-and-edit)
+ (make-local-variable 'view-read-only)
+ (setq view-read-only t)) ; Must leave view mode.
+ ((and buffer-read-only view-read-only
+ ;; If view-mode is already active, `view-mode-enter' is a nop.
+ (not view-mode)
+ (not (eq (get major-mode 'mode-class) 'special)))
+ (view-mode-enter))))
+
(define-minor-mode visible-mode
"Toggle making all invisible text temporarily visible (Visible mode).
With a prefix argument ARG, enable Visible mode if ARG is
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 34d69a74369..b6e1d0a58f2 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -77,7 +77,7 @@ The variables `v1' and `v2' are still set when calling this.")
"Function for transforming a skeleton proxy's aliases' variable value.")
(defvaralias 'skeleton-filter 'skeleton-filter-function)
-(defvar skeleton-untabify t
+(defvar skeleton-untabify nil ; bug#12223
"When non-nil untabifies when deleting backwards with element -ARG.")
(defvar skeleton-newline-indent-rigidly nil
diff --git a/lisp/term.el b/lisp/term.el
index 014adb610b4..d5f35006357 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -615,28 +615,6 @@ executed once when the buffer is created."
:type 'hook
:group 'term)
-(defvar term-signals-menu
- (let ((map (make-sparse-keymap "Signals")))
- (define-key map [eof]
- '(menu-item "EOF" term-send-eof
- :help "Send an EOF to the current buffer's process"))
- (define-key map [kill]
- '(menu-item "KILL" term-kill-subjob
- :help "Send kill signal to the current subjob"))
- (define-key map [quit]
- '(menu-item "QUIT" term-quit-subjob
- :help "Send quit signal to the current subjob."))
- (define-key map [cont]
- '(menu-item "CONT" term-continue-subjob
- :help "Send CONT signal to process buffer's process group"))
- (define-key map [stop]
- '(menu-item "STOP" term-stop-subjob
- :help "Stop the current subjob"))
- (define-key map [brk]
- '(menu-item "BREAK" term-interrupt-subjob
- :help "Interrupt the current subjob"))
- (cons "Signals" map)))
-
(defvar term-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\ep" 'term-previous-input)
@@ -667,69 +645,61 @@ executed once when the buffer is created."
(define-key map "\C-c\C-k" 'term-char-mode)
(define-key map "\C-c\C-j" 'term-line-mode)
(define-key map "\C-c\C-q" 'term-pager-toggle)
-
- ;; completion: (line mode only)
- (let ((completion-menu (make-sparse-keymap "Complete")))
- (define-key map [menu-bar completion]
- (cons "Complete" completion-menu))
- (define-key completion-menu [complete-expand]
- '("Expand File Name" . term-replace-by-expanded-filename))
- (define-key completion-menu [complete-listing]
- '("File Completion Listing" . term-dynamic-list-filename-completions))
- (define-key completion-menu [complete-file]
- '("Complete File Name" . term-dynamic-complete-filename))
- (define-key completion-menu [complete]
- '("Complete Before Point" . term-dynamic-complete)))
-
+ ;; completion: (line mode only)
+ (easy-menu-define nil map "Complete menu for Term mode."
+ '("Complete"
+ ["Complete Before Point" term-dynamic-complete t]
+ ["Complete File Name" term-dynamic-complete-filename t]
+ ["File Completion Listing" term-dynamic-list-filename-completions t]
+ ["Expand File Name" term-replace-by-expanded-filename t]))
;; Input history: (line mode only)
- (let ((inout-menu (make-sparse-keymap "In/Out")))
- (define-key map [menu-bar inout]
- (cons "In/Out" inout-menu))
- (define-key inout-menu [kill-output]
- '("Kill Current Output Group" . term-kill-output))
- (define-key inout-menu [next-prompt]
- '("Forward Output Group" . term-next-prompt))
- (define-key inout-menu [previous-prompt]
- '("Backward Output Group" . term-previous-prompt))
- (define-key inout-menu [show-maximum-output]
- '("Show Maximum Output" . term-show-maximum-output))
- (define-key inout-menu [show-output]
- '("Show Current Output Group" . term-show-output))
- (define-key inout-menu [kill-input]
- '("Kill Current Input" . term-kill-input))
- (define-key inout-menu [copy-input]
- '("Copy Old Input" . term-copy-old-input))
- (define-key inout-menu [forward-matching-history]
- '("Forward Matching Input..." . term-forward-matching-input))
- (define-key inout-menu [backward-matching-history]
- '("Backward Matching Input..." . term-backward-matching-input))
- (define-key inout-menu [next-matching-history]
- '("Next Matching Input..." . term-next-matching-input))
- (define-key inout-menu [previous-matching-history]
- '("Previous Matching Input..." . term-previous-matching-input))
- (define-key inout-menu [next-matching-history-from-input]
- '("Next Matching Current Input" . term-next-matching-input-from-input))
- (define-key inout-menu [previous-matching-history-from-input]
- '("Previous Matching Current Input" .
- term-previous-matching-input-from-input))
- (define-key inout-menu [next-history]
- '("Next Input" . term-next-input))
- (define-key inout-menu [previous-history]
- '("Previous Input" . term-previous-input))
- (define-key inout-menu [list-history]
- '("List Input History" . term-dynamic-list-input-ring))
- (define-key inout-menu [expand-history]
- '("Expand History Before Point" . term-replace-by-expanded-history)))
-
- (define-key map [menu-bar signals] term-signals-menu)
-
- map))
+ (easy-menu-define nil map "In/Out menu for Term mode."
+ '("In/Out"
+ ["Expand History Before Point" term-replace-by-expanded-history
+ term-input-autoexpand]
+ ["List Input History" term-dynamic-list-input-ring t]
+ ["Previous Input" term-previous-input t]
+ ["Next Input" term-next-input t]
+ ["Previous Matching Current Input"
+ term-previous-matching-input-from-input t]
+ ["Next Matching Current Input" term-next-matching-input-from-input t]
+ ["Previous Matching Input..." term-previous-matching-input t]
+ ["Next Matching Input..." term-next-matching-input t]
+ ["Backward Matching Input..." term-backward-matching-input t]
+ ["Forward Matching Input..." term-forward-matching-input t]
+ ["Copy Old Input" term-copy-old-input t]
+ ["Kill Current Input" term-kill-input t]
+ ["Show Current Output Group" term-show-output t]
+ ["Show Maximum Output" term-show-maximum-output t]
+ ["Backward Output Group" term-previous-prompt t]
+ ["Forward Output Group" term-next-prompt t]
+ ["Kill Current Output Group" term-kill-output t]))
+ map)
+ "Keymap for Term mode.")
(defvar term-escape-char nil
"Escape character for char sub-mode of term mode.
Do not change it directly; use `term-set-escape-char' instead.")
-(defvar term-pager-break-map nil)
+(defvar term-pager-break-map
+ (let ((map (make-keymap)))
+ ;; (dotimes (i 128)
+ ;; (define-key map (make-string 1 i) 'term-send-raw))
+ (define-key map "\e" (lookup-key (current-global-map) "\e"))
+ (define-key map "\C-x" (lookup-key (current-global-map) "\C-x"))
+ (define-key map "\C-u" (lookup-key (current-global-map) "\C-u"))
+ (define-key map " " 'term-pager-page)
+ (define-key map "\r" 'term-pager-line)
+ (define-key map "?" 'term-pager-help)
+ (define-key map "h" 'term-pager-help)
+ (define-key map "b" 'term-pager-back-page)
+ (define-key map "\177" 'term-pager-back-line)
+ (define-key map "q" 'term-pager-discard)
+ (define-key map "D" 'term-pager-disable)
+ (define-key map "<" 'term-pager-bob)
+ (define-key map ">" 'term-pager-eob)
+ map)
+ "Keymap used in Term pager mode.")
(defvar term-ptyp t
"True if communications via pty; false if by pipe. Buffer local.
@@ -750,7 +720,6 @@ Buffer local variable.")
; assuming this is Emacs 19.20 or newer.
(defvar term-pager-filter t)
-(put 'term-replace-by-expanded-history 'menu-enable 'term-input-autoexpand)
(put 'term-input-ring 'permanent-local t)
(put 'term-input-ring-index 'permanent-local t)
(put 'term-input-autoexpand 'permanent-local t)
@@ -879,28 +848,6 @@ is buffer-local."
:group 'term
:type 'integer)
-(defvar term-terminal-menu
- (if (featurep 'xemacs)
- '("Terminal"
- [ "Character mode" term-char-mode (term-in-line-mode)]
- [ "Line mode" term-line-mode (term-in-char-mode)]
- [ "Enable paging" term-pager-toggle (not term-pager-count)]
- [ "Disable paging" term-pager-toggle term-pager-count])
- (let ((map (make-sparse-keymap "Terminal")))
- (define-key map [terminal-pager-enable]
- '(menu-item "Enable paging" term-fake-pager-enable
- :help "Enable paging feature"))
- (define-key map [terminal-pager-disable]
- '(menu-item "Disable paging" term-fake-pager-disable
- :help "Disable paging feature"))
- (define-key map [terminal-char-mode]
- '(menu-item "Character mode" term-char-mode
- :help "Switch to char (raw) sub-mode of term mode"))
- (define-key map [terminal-line-mode]
- '(menu-item "Line mode" term-line-mode
- :help "Switch to line (cooked) sub-mode of term mode"))
- (cons "Terminal" map))))
-
;; Set up term-raw-map, etc.
(defvar term-raw-map
@@ -920,9 +867,7 @@ is buffer-local."
(if (featurep 'xemacs)
(define-key map [button2] 'term-mouse-paste)
- (define-key map [mouse-2] 'term-mouse-paste)
- (define-key map [menu-bar terminal] term-terminal-menu)
- (define-key map [menu-bar signals] term-signals-menu))
+ (define-key map [mouse-2] 'term-mouse-paste))
(define-key map [up] 'term-send-up)
(define-key map [down] 'term-send-down)
(define-key map [right] 'term-send-right)
@@ -941,6 +886,46 @@ is buffer-local."
map)
"Keyboard map for sending characters directly to the inferior process.")
+(easy-menu-define term-terminal-menu
+ (list term-mode-map term-raw-map term-pager-break-map)
+ "Terminal menu for Term mode."
+ '("Terminal"
+ ["Line mode" term-line-mode :active (term-in-char-mode)
+ :help "Switch to line (cooked) sub-mode of term mode"]
+ ["Character mode" term-char-mode :active (term-in-line-mode)
+ :help "Switch to char (raw) sub-mode of term mode"]
+ ["Paging" term-pager-toggle :style toggle :selected term-pager-count
+ :help "Toggle paging feature"]))
+
+(easy-menu-define term-signals-menu
+ (list term-mode-map term-raw-map term-pager-break-map)
+ "Signals menu for Term mode."
+ '("Signals"
+ ["BREAK" term-interrupt-subjob :active t
+ :help "Interrupt the current subjob"]
+ ["STOP" term-stop-subjob :active t :help "Stop the current subjob"]
+ ["CONT" term-continue-subjob :active t
+ :help "Send CONT signal to process buffer's process group"]
+ ["QUIT" term-quit-subjob :active t
+ :help "Send quit signal to the current subjob"]
+ ["KILL" term-kill-subjob :active t
+ :help "Send kill signal to the current subjob"]
+ ["EOF" term-send-eof :active t
+ :help "Send an EOF to the current buffer's process"]))
+
+(easy-menu-define term-pager-menu term-pager-break-map
+ "Menu for Term pager mode."
+ '("More pages?"
+ ["1 page forwards" term-pager-page t]
+ ["1 page backwards" term-pager-back-page t]
+ ["1 line backwards" term-pager-back-line t]
+ ["1 line forwards" term-pager-line t]
+ ["Goto to beginning" term-pager-bob t]
+ ["Goto to end" term-pager-eob t]
+ ["Discard remaining output" term-pager-discard t]
+ ["Disable paging" term-pager-toggle t]
+ ["Help" term-pager-help t]))
+
(defvar term-raw-escape-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map 'Control-X-prefix)
@@ -1151,9 +1136,8 @@ Entry to this mode runs the hooks on `term-mode-hook'."
(set (make-local-variable 'font-lock-defaults) '(nil t))
- (when (featurep 'xemacs)
- (set-buffer-menubar
- (append current-menubar (list term-terminal-menu))))
+ (easy-menu-add term-terminal-menu)
+ (easy-menu-add term-signals-menu)
(or term-input-ring
(setq term-input-ring (make-ring term-input-ring-size)))
(term-update-mode-line))
@@ -1291,6 +1275,8 @@ intervention from Emacs, except for the escape character (usually C-c)."
(when (term-in-line-mode)
(setq term-old-mode-map (current-local-map))
(use-local-map term-raw-map)
+ (easy-menu-add term-terminal-menu)
+ (easy-menu-add term-signals-menu)
;; Send existing partial line to inferior (without newline).
(let ((pmark (process-mark (get-buffer-process (current-buffer))))
@@ -1315,8 +1301,31 @@ you type \\[term-send-input] which sends the current line to the inferior."
(term-update-mode-line)))
(defun term-update-mode-line ()
- (let ((term-mode (if (term-in-char-mode) "char" "line"))
- (term-page (when (term-pager-enabled) " page"))
+ (let ((term-mode
+ (if (term-in-char-mode)
+ (propertize "char"
+ 'help-echo "mouse-1: Switch to line mode"
+ 'mouse-face 'mode-line-highlight
+ 'local-map
+ '(keymap
+ (mode-line keymap (down-mouse-1 . term-line-mode))))
+ (propertize "line"
+ 'help-echo "mouse-1: Switch to char mode"
+ 'mouse-face 'mode-line-highlight
+ 'local-map
+ '(keymap
+ (mode-line keymap (down-mouse-1 . term-char-mode))))))
+ (term-page
+ (when (term-pager-enabled)
+ (concat " "
+ (propertize
+ "page"
+ 'help-echo "mouse-1: Disable paging"
+ 'mouse-face 'mode-line-highlight
+ 'local-map
+ '(keymap
+ (mode-line keymap (down-mouse-1 .
+ term-pager-toggle)))))))
(serial-item-speed)
(serial-item-config)
(proc (get-buffer-process (current-buffer))))
@@ -3463,54 +3472,13 @@ The top-most line is line 0."
;; The page is full, so enter "pager" mode, and wait for input.
(defun term-process-pager ()
- (when (not term-pager-break-map)
- (let* ((map (make-keymap))
- ;; (i 0)
- tmp)
- ;; (while (< i 128)
- ;; (define-key map (make-string 1 i) 'term-send-raw)
- ;; (setq i (1+ i)))
- (define-key map "\e"
- (lookup-key (current-global-map) "\e"))
- (define-key map "\C-x"
- (lookup-key (current-global-map) "\C-x"))
- (define-key map "\C-u"
- (lookup-key (current-global-map) "\C-u"))
- (define-key map " " 'term-pager-page)
- (define-key map "\r" 'term-pager-line)
- (define-key map "?" 'term-pager-help)
- (define-key map "h" 'term-pager-help)
- (define-key map "b" 'term-pager-back-page)
- (define-key map "\177" 'term-pager-back-line)
- (define-key map "q" 'term-pager-discard)
- (define-key map "D" 'term-pager-disable)
- (define-key map "<" 'term-pager-bob)
- (define-key map ">" 'term-pager-eob)
-
- ;; Add menu bar.
- (unless (featurep 'xemacs)
- (define-key map [menu-bar terminal] term-terminal-menu)
- (define-key map [menu-bar signals] term-signals-menu)
- (setq tmp (make-sparse-keymap "More pages?"))
- (define-key tmp [help] '("Help" . term-pager-help))
- (define-key tmp [disable]
- '("Disable paging" . term-fake-pager-disable))
- (define-key tmp [discard]
- '("Discard remaining output" . term-pager-discard))
- (define-key tmp [eob] '("Goto to end" . term-pager-eob))
- (define-key tmp [bob] '("Goto to beginning" . term-pager-bob))
- (define-key tmp [line] '("1 line forwards" . term-pager-line))
- (define-key tmp [bline] '("1 line backwards" . term-pager-back-line))
- (define-key tmp [back] '("1 page backwards" . term-pager-back-page))
- (define-key tmp [page] '("1 page forwards" . term-pager-page))
- (define-key map [menu-bar page] (cons "More pages?" tmp))
- )
-
- (setq term-pager-break-map map)))
;; (let ((process (get-buffer-process (current-buffer))))
;; (stop-process process))
(setq term-pager-old-local-map (current-local-map))
(use-local-map term-pager-break-map)
+ (easy-menu-add term-terminal-menu)
+ (easy-menu-add term-signals-menu)
+ (easy-menu-add term-pager-menu)
(make-local-variable 'term-old-mode-line-format)
(setq term-old-mode-line-format mode-line-format)
(setq mode-line-format
@@ -3591,14 +3559,6 @@ The top-most line is line 0."
(interactive)
(if (term-pager-enabled) (term-pager-disable) (term-pager-enable)))
-(unless (featurep 'xemacs)
- (defalias 'term-fake-pager-enable 'term-pager-toggle)
- (defalias 'term-fake-pager-disable 'term-pager-toggle)
- (put 'term-char-mode 'menu-enable '(term-in-line-mode))
- (put 'term-line-mode 'menu-enable '(term-in-char-mode))
- (put 'term-fake-pager-enable 'menu-enable '(not term-pager-count))
- (put 'term-fake-pager-disable 'menu-enable 'term-pager-count))
-
(defun term-pager-help ()
"Provide help on commands available in a terminal-emulator **MORE** break."
(interactive)
diff --git a/lisp/type-break.el b/lisp/type-break.el
index f0c81125f0c..8a95508d939 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -577,7 +577,6 @@ as per the function `type-break-schedule'."
(unless type-break-terse-messages
(message "Press any key to resume from typing break."))
- (random t)
(let* ((len (length type-break-demo-functions))
(idx (random len))
(fn (nth idx type-break-demo-functions)))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 2a672623c01..ae1a3cf92f8 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -394,7 +394,7 @@ REV is the revision to check out."
(if vc-cvs-use-edit
(vc-cvs-command nil 0 file "edit")
(set-file-modes file (logior (file-modes file) 128))
- (if (equal file buffer-file-name) (toggle-read-only -1))))
+ (if (equal file buffer-file-name) (read-only-mode -1))))
;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-cvs-command nil 0 file
@@ -1178,7 +1178,11 @@ is non-nil."
(parse-time-string (concat time " +0000")))))
(cond ((and (not (string-match "\\+" time))
(car parsed-time)
- (equal mtime (apply 'encode-time parsed-time)))
+ ;; Compare just the seconds part of the file time,
+ ;; since CVS file time stamp resolution is just 1 second.
+ (let ((ptime (apply 'encode-time parsed-time)))
+ (and (eq (car mtime) (car ptime))
+ (eq (cadr mtime) (cadr ptime)))))
(vc-file-setprop file 'vc-checkout-time mtime)
(if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
(t
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index ddb9565544d..1ef4faaa008 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1133,7 +1133,7 @@ For old-style locking-based version control systems, like RCS:
(let ((visited (get-file-buffer file)))
(when visited
(with-current-buffer visited
- (toggle-read-only -1))))))
+ (read-only-mode -1))))))
;; Allow user to revert files with no changes
(save-excursion
(dolist (file files)
@@ -1344,7 +1344,7 @@ After check-out, runs the normal hook `vc-checkout-hook'."
;; Maybe the backend is not installed ;-(
(when writable
(let ((buf (get-file-buffer file)))
- (when buf (with-current-buffer buf (toggle-read-only -1)))))
+ (when buf (with-current-buffer buf (read-only-mode -1)))))
(signal (car err) (cdr err))))
`((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit)
(not writable))
diff --git a/lisp/window.el b/lisp/window.el
index 142e80e1666..f73c85e991b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -73,6 +73,108 @@ are not altered by this macro (unless they are altered in BODY)."
(when (window-live-p save-selected-window-window)
(select-window save-selected-window-window 'norecord))))))
+(defvar temp-buffer-window-setup-hook nil
+ "Normal hook run by `with-temp-buffer-window' before buffer display.
+This hook is run by `with-temp-buffer-window' with the buffer to be
+displayed current.")
+
+(defvar temp-buffer-window-show-hook nil
+ "Normal hook run by `with-temp-buffer-window' after buffer display.
+This hook is run by `with-temp-buffer-window' with the buffer
+displayed and current and its window selected.")
+
+(defun temp-buffer-window-setup (buffer-or-name)
+ "Set up temporary buffer specified by BUFFER-OR-NAME
+Return the buffer."
+ (let ((old-dir default-directory)
+ (buffer (get-buffer-create buffer-or-name)))
+ (with-current-buffer buffer
+ (kill-all-local-variables)
+ (setq default-directory old-dir)
+ (delete-all-overlays)
+ (setq buffer-read-only nil)
+ (setq buffer-file-name nil)
+ (setq buffer-undo-list t)
+ (let ((inhibit-read-only t)
+ (inhibit-modification-hooks t))
+ (erase-buffer)
+ (run-hooks 'temp-buffer-window-setup-hook))
+ ;; Return the buffer.
+ buffer)))
+
+(defun temp-buffer-window-show (&optional buffer action)
+ "Show temporary buffer BUFFER in a window.
+Return the window showing BUFFER. Pass ACTION as action argument
+to `display-buffer'."
+ (let (window frame)
+ (with-current-buffer buffer
+ (set-buffer-modified-p nil)
+ (setq buffer-read-only t)
+ (goto-char (point-min))
+ (when (setq window (display-buffer buffer action))
+ (setq frame (window-frame window))
+ (unless (eq frame (selected-frame))
+ (raise-frame frame))
+ (setq minibuffer-scroll-window window)
+ (set-window-hscroll window 0)
+ (with-selected-window window
+ (run-hooks 'temp-buffer-window-show-hook)
+ (when temp-buffer-resize-mode
+ (resize-temp-buffer-window window)))
+ ;; Return the window.
+ window))))
+
+(defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body)
+ "Evaluate BODY and display buffer specified by BUFFER-OR-NAME.
+BUFFER-OR-NAME must specify either a live buffer or the name of a
+buffer. If no buffer with such a name exists, create one.
+
+Make sure the specified buffer is empty before evaluating BODY.
+Do not make that buffer current for BODY. Instead, bind
+`standard-output' to that buffer, so that output generated with
+`prin1' and similar functions in BODY goes into that buffer.
+
+After evaluating BODY, mark the specified buffer unmodified and
+read-only, and display it in a window via `display-buffer'. Pass
+ACTION as action argument to `display-buffer'. Automatically
+shrink the window used if `temp-buffer-resize-mode' is enabled.
+
+Return the value returned by BODY unless QUIT-FUNCTION specifies
+a function. In that case, run the function with two arguments -
+the window showing the specified buffer and the value returned by
+BODY - and return the value returned by that function.
+
+If the buffer is displayed on a new frame, the window manager may
+decide to select that frame. In that case, it's usually a good
+strategy if the function specified by QUIT-FUNCTION selects the
+window showing the buffer before reading a value from the
+minibuffer, for example, when asking a `yes-or-no-p' question.
+
+This construct is similar to `with-output-to-temp-buffer' but
+does neither put the buffer in help mode nor does it call
+`temp-buffer-show-function'. It also runs different hooks,
+namely `temp-buffer-window-setup-hook' (with the specified buffer
+current) and `temp-buffer-window-show-hook' (with the specified
+buffer current and the window showing it selected).
+
+Since this macro calls `display-buffer', the window displaying
+the buffer is usually not selected and the specified buffer
+usually not made current. QUIT-FUNCTION can override that."
+ (declare (debug t))
+ (let ((buffer (make-symbol "buffer"))
+ (window (make-symbol "window"))
+ (value (make-symbol "value")))
+ `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name))
+ (standard-output ,buffer)
+ ,window ,value)
+ (with-current-buffer ,buffer
+ (setq ,value (progn ,@body))
+ (setq ,window (temp-buffer-window-show ,buffer ,action)))
+
+ (if (functionp ,quit-function)
+ (funcall ,quit-function ,window ,value)
+ ,value))))
+
;; The following two functions are like `window-next-sibling' and
;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so
;; they don't substitute the selected window for nil), and they return
@@ -271,19 +373,32 @@ windows horizontally arranged within WINDOW."
(setq walk-window-tree-window
(window-right walk-window-tree-window))))))
-(defun walk-window-tree (fun &optional frame any)
+(defun walk-window-tree (fun &optional frame any minibuf)
"Run function FUN on each live window of FRAME.
FUN must be a function with one argument - a window. FRAME must
be a live frame and defaults to the selected one. ANY, if
-non-nil means to run FUN on all live and internal windows of
+non-nil, means to run FUN on all live and internal windows of
FRAME.
+Optional argument MINIBUF t means run FUN on FRAME's minibuffer
+window even if it isn't active. MINIBUF nil or omitted means run
+FUN on FRAME's minibuffer window only if it's active. In both
+cases the minibuffer window must be part of FRAME. MINIBUF
+neither nil nor t means never run FUN on the minibuffer window.
+
This function performs a pre-order, depth-first traversal of the
window tree. If FUN changes the window tree, the result is
unpredictable."
- (let ((walk-window-tree-frame (window-normalize-frame frame)))
- (walk-window-tree-1
- fun (frame-root-window walk-window-tree-frame) any)))
+ (setq frame (window-normalize-frame frame))
+ (walk-window-tree-1 fun (frame-root-window frame) any)
+ (when (memq minibuf '(nil t))
+ ;; Run FUN on FRAME's minibuffer window if requested.
+ (let ((minibuffer-window (minibuffer-window frame)))
+ (when (and (window-live-p minibuffer-window)
+ (eq (window-frame minibuffer-window) frame)
+ (or (eq minibuf t)
+ (minibuffer-window-active-p minibuffer-window)))
+ (funcall fun minibuffer-window)))))
(defun walk-window-subtree (fun &optional window any)
"Run function FUN on the subtree of windows rooted at WINDOW.
@@ -299,13 +414,19 @@ is unpredictable."
(setq window (window-normalize-window window))
(walk-window-tree-1 fun window any t))
-(defun window-with-parameter (parameter &optional value frame any)
+(defun window-with-parameter (parameter &optional value frame any minibuf)
"Return first window on FRAME with PARAMETER non-nil.
FRAME defaults to the selected frame. Optional argument VALUE
non-nil means only return a window whose window-parameter value
for PARAMETER equals VALUE (comparison is done with `equal').
Optional argument ANY non-nil means consider internal windows
-too."
+too.
+
+Optional argument MINIBUF t means consider FRAME's minibuffer
+window even if it isn't active. MINIBUF nil or omitted means
+consider FRAME's minibuffer window only if it's active. In both
+cases the minibuffer window must be part of FRAME. MINIBUF
+neither nil nor t means never consider the minibuffer window."
(let (this-value)
(catch 'found
(walk-window-tree
@@ -313,7 +434,7 @@ too."
(when (and (setq this-value (window-parameter window parameter))
(or (not value) (equal value this-value)))
(throw 'found window)))
- frame any))))
+ frame any minibuf))))
;;; Atomic windows.
(defun window-atom-root (&optional window)
@@ -338,6 +459,45 @@ WINDOW must be an internal window. Return WINDOW."
window t)
window))
+(defun display-buffer-in-atom-window (buffer alist)
+ "Display BUFFER in an atomic window.
+This function displays BUFFER in a new window that will be
+combined with an existing window to form an atomic window. If
+the existing window is already part of an atomic window, add the
+new window to that atomic window. Operations like `split-window'
+or `delete-window', when applied to a constituent of an atomic
+window, are applied atomically to the root of that atomic window.
+
+ALIST is an association list of symbols and values. The
+following symbols can be used.
+
+`window' specifies the existing window the new window shall be
+ combined with. Use `window-atom-root' to make the new window a
+ sibling of an atomic window's root. If an internal window is
+ specified here, all children of that window become part of the
+ atomic window too. If no window is specified, the new window
+ becomes a sibling of the selected window.
+
+`side' denotes the side of the existing window where the new
+ window shall be located. Valid values are `below', `right',
+ `above' and `left'. The default is `below'.
+
+The return value is the new window, nil when creating that window
+failed."
+ (let ((ignore-window-parameters t)
+ (window-combination-limit t)
+ (window (cdr (assq 'window alist)))
+ (side (cdr (assq 'side alist)))
+ new)
+ (setq window (window-normalize-window window))
+ ;; Split off new window
+ (when (setq new (split-window window nil side))
+ ;; Make sure we have a valid atomic window.
+ (window-make-atom (window-parent window))
+ ;; Display BUFFER in NEW and return NEW.
+ (window--display-buffer
+ buffer new 'window display-buffer-mark-dedicated))))
+
(defun window--atom-check-1 (window)
"Subroutine of `window--atom-check'."
(when window
@@ -427,23 +587,273 @@ number of slots on that side."
(integer :tag "Number" :value 3 :size 5)))
:group 'windows)
+(defun window--major-non-side-window (&optional frame)
+ "Return the major non-side window of frame FRAME.
+The optional argument FRAME must be a live frame and defaults to
+the selected one.
+
+If FRAME has at least one side window, the major non-side window
+is either an internal non-side window such that all other
+non-side windows on FRAME descend from it, or the single live
+non-side window of FRAME. If FRAME has no side windows, return
+its root window."
+ (let ((frame (window-normalize-frame frame))
+ major sibling)
+ ;; Set major to the _last_ window found by `walk-window-tree' that
+ ;; is not a side window but has a side window as its sibling.
+ (walk-window-tree
+ (lambda (window)
+ (and (not (window-parameter window 'window-side))
+ (or (and (setq sibling (window-prev-sibling window))
+ (window-parameter sibling 'window-side))
+ (and (setq sibling (window-next-sibling window))
+ (window-parameter sibling 'window-side)))
+ (setq major window)))
+ frame t)
+ (or major (frame-root-window frame))))
+
+(defun window--major-side-window (side)
+ "Return major side window on SIDE.
+SIDE must be one of the symbols `left', `top', `right' or
+`bottom'. Return nil if no such window exists."
+ (let ((root (frame-root-window))
+ window)
+ ;; (1) If a window on the opposite side exists, return that window's
+ ;; sibling.
+ ;; (2) If the new window shall span the entire side, return the
+ ;; frame's root window.
+ ;; (3) If a window on an orthogonal side exists, return that
+ ;; window's sibling.
+ ;; (4) Otherwise return the frame's root window.
+ (cond
+ ((or (and (eq side 'left)
+ (setq window (window-with-parameter 'window-side 'right nil t)))
+ (and (eq side 'top)
+ (setq window (window-with-parameter 'window-side 'bottom nil t))))
+ (window-prev-sibling window))
+ ((or (and (eq side 'right)
+ (setq window (window-with-parameter 'window-side 'left nil t)))
+ (and (eq side 'bottom)
+ (setq window (window-with-parameter 'window-side 'top nil t))))
+ (window-next-sibling window))
+ ((memq side '(left right))
+ (cond
+ (window-sides-vertical
+ root)
+ ((setq window (window-with-parameter 'window-side 'top nil t))
+ (window-next-sibling window))
+ ((setq window (window-with-parameter 'window-side 'bottom nil t))
+ (window-prev-sibling window))
+ (t root)))
+ ((memq side '(top bottom))
+ (cond
+ ((not window-sides-vertical)
+ root)
+ ((setq window (window-with-parameter 'window-side 'left nil t))
+ (window-next-sibling window))
+ ((setq window (window-with-parameter 'window-side 'right nil t))
+ (window-prev-sibling window))
+ (t root))))))
+
+(defun display-buffer-in-major-side-window (buffer side slot &optional alist)
+ "Display BUFFER in a new window on SIDE of the selected frame.
+SIDE must be one of `left', `top', `right' or `bottom'. SLOT
+specifies the slot to use. ALIST is an association list of
+symbols and values as passed to `display-buffer-in-side-window'.
+This function may be called only if no window on SIDE exists yet.
+The new window automatically becomes the \"major\" side window on
+SIDE. Return the new window, nil if its creation window failed."
+ (let* ((root (frame-root-window))
+ (left-or-right (memq side '(left right)))
+ (size (or (assq 'size alist)
+ (/ (window-total-size (frame-root-window) left-or-right)
+ ;; By default use a fourth of the size of the
+ ;; frame's root window. This has to be made
+ ;; customizable via ALIST.
+ 4)))
+ (major (window--major-side-window side))
+ (selected-window (selected-window))
+ (on-side (cond
+ ((eq side 'top) 'above)
+ ((eq side 'bottom) 'below)
+ (t side)))
+ ;; The following two bindings will tell `split-window' to take
+ ;; the space for the new window from `major' and not make a new
+ ;; parent window unless needed.
+ (window-combination-resize 'side)
+ (window-combination-limit nil)
+ (new (split-window major (- size) on-side))
+ fun)
+ (when new
+ ;; Initialize `window-side' parameter of new window to SIDE.
+ (set-window-parameter new 'window-side side)
+ ;; Install `window-slot' parameter of new window.
+ (set-window-parameter new 'window-slot slot)
+ ;; Install `delete-window' parameter thus making sure that when
+ ;; the new window is deleted, a side window on the opposite side
+ ;; does not get resized.
+ (set-window-parameter new 'delete-window 'delete-side-window)
+ ;; Install BUFFER in new window and return NEW.
+ (window--display-buffer buffer new 'window 'side))))
+
+(defun delete-side-window (window)
+ "Delete side window WINDOW."
+ (let ((window-combination-resize
+ (window-parameter (window-parent window) 'window-side))
+ (ignore-window-parameters t))
+ (delete-window window)))
+
+(defun display-buffer-in-side-window (buffer alist)
+ "Display BUFFER in a window on side SIDE of the selected frame.
+ALIST is an association list of symbols and values. The
+following symbols can be used:
+
+`side' denotes the side of the existing window where the new
+ window shall be located. Valid values are `bottom', `right',
+ `top' and `left'. The default is `bottom'.
+
+`slot' if non-nil, specifies the window slot where to display
+ BUFFER. A value of zero or nil means use the middle slot on
+ the specified side. A negative value means use a slot
+ preceding (that is, above or on the left of) the middle slot.
+ A positive value means use a slot following (that is, below or
+ on the right of) the middle slot. The default is zero."
+ (let ((side (or (cdr (assq 'side alist)) 'bottom))
+ (slot (or (cdr (assq 'slot alist)) 0))
+ new)
+ (cond
+ ((not (memq side '(top bottom left right)))
+ (error "Invalid side %s specified" side))
+ ((not (numberp slot))
+ (error "Invalid slot %s specified" slot)))
+
+ (let* ((major (window-with-parameter 'window-side side nil t))
+ ;; `major' is the major window on SIDE, `windows' the list of
+ ;; life windows on SIDE.
+ (windows
+ (when major
+ (let (windows)
+ (walk-window-tree
+ (lambda (window)
+ (when (eq (window-parameter window 'window-side) side)
+ (setq windows (cons window windows)))))
+ (nreverse windows))))
+ (slots (when major (max 1 (window-child-count major))))
+ (max-slots
+ (nth (cond
+ ((eq side 'left) 0)
+ ((eq side 'top) 1)
+ ((eq side 'right) 2)
+ ((eq side 'bottom) 3))
+ window-sides-slots))
+ (selected-window (selected-window))
+ window this-window this-slot prev-window next-window
+ best-window best-slot abs-slot new-window)
+
+ (cond
+ ((and (numberp max-slots) (<= max-slots 0))
+ ;; No side-slots available on this side. Don't create an error,
+ ;; just return nil.
+ nil)
+ ((not windows)
+ ;; No major window exists on this side, make one.
+ (display-buffer-in-major-side-window buffer side slot alist))
+ (t
+ ;; Scan windows on SIDE.
+ (catch 'found
+ (dolist (window windows)
+ (setq this-slot (window-parameter window 'window-slot))
+ (cond
+ ;; The following should not happen and probably be checked
+ ;; by window--side-check.
+ ((not (numberp this-slot)))
+ ((= this-slot slot)
+ ;; A window with a matching slot has been found.
+ (setq this-window window)
+ (throw 'found t))
+ (t
+ ;; Check if this window has a better slot value wrt the
+ ;; slot of the window we want.
+ (setq abs-slot
+ (if (or (and (> this-slot 0) (> slot 0))
+ (and (< this-slot 0) (< slot 0)))
+ (abs (- slot this-slot))
+ (+ (abs slot) (abs this-slot))))
+ (unless (and best-slot (<= best-slot abs-slot))
+ (setq best-window window)
+ (setq best-slot abs-slot))
+ (cond
+ ((<= this-slot slot)
+ (setq prev-window window))
+ ((not next-window)
+ (setq next-window window)))))))
+
+ ;; `this-window' is the first window with the same SLOT.
+ ;; `prev-window' is the window with the largest slot < SLOT. A new
+ ;; window will be created after it.
+ ;; `next-window' is the window with the smallest slot > SLOT. A new
+ ;; window will be created before it.
+ ;; `best-window' is the window with the smallest absolute difference
+ ;; of its slot and SLOT.
+
+ ;; Note: We dedicate the window used softly to its buffer to
+ ;; avoid that "other" (non-side) buffer display functions steal
+ ;; it from us. This must eventually become customizable via
+ ;; ALIST (or, better, avoided in the "other" functions).
+ (or (and this-window
+ ;; Reuse `this-window'.
+ (window--display-buffer buffer this-window 'reuse 'side))
+ (and (or (not max-slots) (< slots max-slots))
+ (or (and next-window
+ ;; Make new window before `next-window'.
+ (let ((next-side
+ (if (memq side '(left right)) 'above 'left))
+ (window-combination-resize 'side))
+ (setq window (split-window next-window nil next-side))
+ ;; When the new window is deleted, its space
+ ;; is returned to other side windows.
+ (set-window-parameter
+ window 'delete-window 'delete-side-window)
+ window))
+ (and prev-window
+ ;; Make new window after `prev-window'.
+ (let ((prev-side
+ (if (memq side '(left right)) 'below 'right))
+ (window-combination-resize 'side))
+ (setq window (split-window prev-window nil prev-side))
+ ;; When the new window is deleted, its space
+ ;; is returned to other side windows.
+ (set-window-parameter
+ window 'delete-window 'delete-side-window)
+ window)))
+ (set-window-parameter window 'window-slot slot)
+ (window--display-buffer buffer window 'window 'side))
+ (and best-window
+ ;; Reuse `best-window'.
+ (progn
+ ;; Give best-window the new slot value.
+ (set-window-parameter best-window 'window-slot slot)
+ (window--display-buffer buffer best-window 'reuse 'side)))))))))
+
(defun window--side-check (&optional frame)
- "Check the window-side parameter of all windows on FRAME.
-FRAME defaults to the selected frame. If the configuration is
-invalid, reset all window-side parameters to nil.
-
-A valid configuration has to preserve the following invariant:
-
-- If a window has a non-nil window-side parameter, it must have a
- parent window and the parent window's window-side parameter
- must be either nil or the same as for window.
-
-- If windows with non-nil window-side parameters exist, there
- must be at most one window of each side and non-side with a
- parent whose window-side parameter is nil and there must be no
- leaf window whose window-side parameter is nil."
- (let (normal none left top right bottom
- side parent parent-side)
+ "Check the side window configuration of FRAME.
+FRAME defaults to the selected frame.
+
+A valid side window configuration preserves the following two
+invariants:
+
+- If there exists a window whose window-side parameter is
+ non-nil, there must exist at least one live window whose
+ window-side parameter is nil.
+
+- If a window W has a non-nil window-side parameter (i) it must
+ have a parent window and that parent's window-side parameter
+ must be either nil or the same as for W, and (ii) any child
+ window of W must have the same window-side parameter as W.
+
+If the configuration is invalid, reset the window-side parameters
+of all windows on FRAME to nil."
+ (let (left top right bottom none side parent parent-side)
(when (or (catch 'reset
(walk-window-tree
(lambda (window)
@@ -459,40 +869,34 @@ A valid configuration has to preserve the following invariant:
;; A parent whose window-side is non-nil must
;; have a child with the same window-side.
(throw 'reset t)))
- ;; Now check that there's more than one main window
- ;; for any of none, left, top, right and bottom.
- ((eq side 'none)
- (if none
- (throw 'reset t)
+ ((not side)
+ (when (window-buffer window)
+ ;; Record that we have at least one non-side,
+ ;; live window.
(setq none t)))
+ ((if (memq side '(left top))
+ (window-prev-sibling window)
+ (window-next-sibling window))
+ ;; Left and top major side windows must not have a
+ ;; previous sibling, right and bottom major side
+ ;; windows must not have a next sibling.
+ (throw 'reset t))
+ ;; Now check that there's no more than one major
+ ;; window for any of left, top, right and bottom.
((eq side 'left)
- (if left
- (throw 'reset t)
- (setq left t)))
+ (if left (throw 'reset t) (setq left t)))
((eq side 'top)
- (if top
- (throw 'reset t)
- (setq top t)))
+ (if top (throw 'reset t) (setq top t)))
((eq side 'right)
- (if right
- (throw 'reset t)
- (setq right t)))
+ (if right (throw 'reset t) (setq right t)))
((eq side 'bottom)
- (if bottom
- (throw 'reset t)
- (setq bottom t)))
- ((window-buffer window)
- ;; A leaf window without window-side parameter,
- ;; record its existence.
- (setq normal t))))
+ (if bottom (throw 'reset t) (setq bottom t)))
+ (t
+ (throw 'reset t))))
frame t))
- (if none
- ;; At least one non-side window exists, so there must
- ;; be at least one side-window and no normal window.
- (or (not (or left top right bottom)) normal)
- ;; No non-side window exists, so there must be no side
- ;; window either.
- (or left top right bottom)))
+ ;; If there's a side window, there must be at least one
+ ;; non-side window.
+ (and (or left top right bottom) (not none)))
(walk-window-tree
(lambda (window)
(set-window-parameter window 'window-side nil))
@@ -516,7 +920,7 @@ unless it has no other choice (like when deleting a neighboring
window).")
(make-variable-buffer-local 'window-size-fixed)
-(defun window--size-ignore (window ignore)
+(defun window--size-ignore-p (window ignore)
"Return non-nil if IGNORE says to ignore size restrictions for WINDOW."
(if (window-valid-p ignore) (eq window ignore) ignore))
@@ -559,7 +963,7 @@ means ignore all of the above restrictions for all windows."
value)
(with-current-buffer (window-buffer window)
(cond
- ((and (not (window--size-ignore window ignore))
+ ((and (not (window--size-ignore-p window ignore))
(window-size-fixed-p window horizontal))
;; The minimum size of a fixed size window is its size.
(window-total-size window horizontal))
@@ -588,7 +992,7 @@ means ignore all of the above restrictions for all windows."
(ceiling (or (frame-parameter frame 'scroll-bar-width) 14)
(frame-char-width)))
(t 0)))
- (if (and (not (window--size-ignore window ignore))
+ (if (and (not (window--size-ignore-p window ignore))
(numberp window-min-width))
window-min-width
0))))
@@ -598,7 +1002,7 @@ means ignore all of the above restrictions for all windows."
(max (+ window-safe-min-height
(if header-line-format 1 0)
(if mode-line-format 1 0))
- (if (and (not (window--size-ignore window ignore))
+ (if (and (not (window--size-ignore-p window ignore))
(numberp window-min-height))
window-min-height
0))))))))
@@ -637,7 +1041,7 @@ ignore all of the above restrictions for all windows."
(max (- (window-min-size window horizontal ignore)
(window-total-size window horizontal))
delta))
- ((window--size-ignore window ignore)
+ ((window--size-ignore-p window ignore)
delta)
((> delta 0)
(if (window-size-fixed-p window horizontal)
@@ -719,7 +1123,7 @@ WINDOW can be resized in the desired direction. The function
((eq sub window)
(setq skip (eq trail 'before)))
(skip)
- ((and (not (window--size-ignore window ignore))
+ ((and (not (window--size-ignore-p window ignore))
(window-size-fixed-p sub horizontal)))
(t
;; We found a non-fixed-size child window.
@@ -809,7 +1213,7 @@ at least one other window can be enlarged appropriately."
;; child window is fixed-size.
(while sub
(when (and (not (eq sub window))
- (not (window--size-ignore sub ignore))
+ (not (window--size-ignore-p sub ignore))
(window-size-fixed-p sub horizontal))
(throw 'fixed delta))
(setq sub (window-right sub))))
@@ -849,7 +1253,7 @@ Optional argument NODOWN non-nil means do not check whether
WINDOW itself (and its child windows) can be enlarged; check
only whether other windows can be shrunk appropriately."
(setq window (window-normalize-window window))
- (if (and (not (window--size-ignore window ignore))
+ (if (and (not (window--size-ignore-p window ignore))
(not nodown) (window-size-fixed-p window horizontal))
;; With IGNORE and NOWDON nil return zero if WINDOW has fixed
;; size.
@@ -1062,32 +1466,6 @@ windows nor the buffer list."
(dolist (walk-windows-window (window-list-1 nil minibuf all-frames))
(funcall fun walk-windows-window))))
-(defun window-point-1 (&optional window)
- "Return value of WINDOW's point.
-WINDOW can be any live window and defaults to the selected one.
-
-This function is like `window-point' with one exception: If
-WINDOW is selected, it returns the value of `point' of WINDOW's
-buffer regardless of whether that buffer is current or not."
- (setq window (window-normalize-window window t))
- (if (eq window (selected-window))
- (with-current-buffer (window-buffer window)
- (point))
- (window-point window)))
-
-(defun set-window-point-1 (window pos)
- "Set value of WINDOW's point to POS.
-WINDOW can be any live window and defaults to the selected one.
-
-This function is like `set-window-point' with one exception: If
-WINDOW is selected, it moves `point' of WINDOW's buffer to POS
-regardless of whether that buffer is current or not."
- (setq window (window-normalize-window window t))
- (if (eq window (selected-window))
- (with-current-buffer (window-buffer window)
- (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 must be a valid window and defaults to the selected one.
@@ -1114,7 +1492,7 @@ SIDE can be any of the symbols `left', `top', `right' or
(lambda (window)
(when (window-at-side-p window side)
(setq windows (cons window windows))))
- frame)
+ frame nil 'nomini)
(nreverse windows)))
(defun window--in-direction-2 (window posn &optional horizontal)
@@ -1129,12 +1507,25 @@ SIDE can be any of the symbols `left', `top', `right' or
(- left posn)
(- posn left (window-total-width window))))))
+;; Predecessors to the below have been devised by Julian Assange in
+;; change-windows-intuitively.el and Hovav Shacham in windmove.el.
+;; Neither of these allow to selectively ignore specific windows
+;; (windows whose `no-other-window' parameter is non-nil) as targets of
+;; the movement.
(defun window-in-direction (direction &optional window ignore)
"Return window in DIRECTION as seen from WINDOW.
+More precisely, return the nearest window in direction DIRECTION
+as seen from the position of `window-point' in window WINDOW.
DIRECTION must be one of `above', `below', `left' or `right'.
WINDOW must be a live window and defaults to the selected one.
-IGNORE non-nil means a window can be returned even if its
-`no-other-window' parameter is non-nil."
+
+Do not return a window whose `no-other-window' parameter is
+non-nil. If the nearest window's `no-other-window' parameter is
+non-nil, try to find another window in the indicated direction.
+If, however, the optional argument IGNORE is non-nil, return that
+window even if its `no-other-window' parameter is non-nil.
+
+Return nil if no suitable window can be found."
(setq window (window-normalize-window window t))
(unless (memq direction '(above below left right))
(error "Wrong direction %s" direction))
@@ -1146,7 +1537,7 @@ IGNORE non-nil means a window can be returned even if its
(last (+ first (if hor
(window-total-width window)
(window-total-height window))))
- (posn-cons (nth 6 (posn-at-point (window-point-1 window) window)))
+ (posn-cons (nth 6 (posn-at-point (window-point window) window)))
;; The column / row value of `posn-at-point' can be nil for the
;; mini-window, guard against that.
(posn (if hor
@@ -1221,7 +1612,7 @@ IGNORE non-nil means a window can be returned even if its
(setq best-edge-2 w-top)
(setq best-diff-2 best-diff-2-new)
(setq best-2 w)))))))
- (window-frame window))
+ frame)
(or best best-2)))
(defun get-window-with-predicate (predicate &optional minibuf all-frames default)
@@ -1865,7 +2256,7 @@ preferably only resize windows adjacent to EDGE."
;; Make sure this sibling is left alone when
;; resizing its siblings.
(set-window-new-normal sub 'ignore))
- ((or (window--size-ignore sub ignore)
+ ((or (window--size-ignore-p sub ignore)
(not (window-size-fixed-p sub horizontal)))
;; Set this-delta to t to signal that we found a sibling
;; of WINDOW whose size is not fixed.
@@ -2387,8 +2778,7 @@ Return `frame' if deleting WINDOW should also delete its frame."
(when (window-parameter window 'window-atom)
(setq window (window-atom-root window))))
- (let ((parent (window-parent window))
- (frame (window-frame window)))
+ (let ((frame (window-frame window)))
(cond
((frame-root-window-p window)
;; WINDOW's frame can be deleted only if there are other frames
@@ -2399,10 +2789,9 @@ Return `frame' if deleting WINDOW should also delete its frame."
(and minibuf (eq frame (window-frame minibuf)))))
'frame))
((or ignore-window-parameters
- (not (eq (window-parameter window 'window-side) 'none))
- (and parent (eq (window-parameter parent 'window-side) 'none)))
- ;; WINDOW can be deleted unless it is the main window of its
- ;; frame.
+ (not (eq window (window--major-non-side-window frame))))
+ ;; WINDOW can be deleted unless it is the major non-side window of
+ ;; its frame.
t))))
(defun window--in-subtree-p (window root)
@@ -2453,13 +2842,13 @@ that is its frame's root window."
((and (window-parameter window 'window-atom)
(setq atom-root (window-atom-root window))
(not (eq atom-root window)))
- (throw 'done (delete-window atom-root)))
- ((and (eq (window-parameter window 'window-side) 'none)
- (or (not parent)
- (not (eq (window-parameter parent 'window-side) 'none))))
- (error "Attempt to delete last non-side window"))
+ (if (eq atom-root (frame-root-window frame))
+ (error "Root of atomic window is root window of its frame")
+ (throw 'done (delete-window atom-root))))
((not parent)
- (error "Attempt to delete minibuffer or sole ordinary window")))
+ (error "Attempt to delete minibuffer or sole ordinary window"))
+ ((eq window (window--major-non-side-window frame))
+ (error "Attempt to delete last non-side window")))
(let* ((horizontal (window-left-child parent))
(size (window-total-size window horizontal))
@@ -2533,13 +2922,19 @@ window signal an error."
((and (window-parameter window 'window-atom)
(setq atom-root (window-atom-root window))
(not (eq atom-root window)))
- (throw 'done (delete-other-windows atom-root)))
- ((eq window-side 'none)
- ;; Set side-main to the major non-side window.
- (setq side-main (window-with-parameter 'window-side 'none frame t)))
+ (if (eq atom-root (frame-root-window frame))
+ (error "Root of atomic window is root window of its frame")
+ (throw 'done (delete-other-windows atom-root))))
((memq window-side window-sides)
- (error "Cannot make side window the only window")))
- ;; If WINDOW is the main non-side window, do nothing.
+ (error "Cannot make side window the only window"))
+ ((and (window-minibuffer-p window)
+ (not (eq window (frame-root-window window))))
+ (error "Can't expand minibuffer to full frame")))
+
+ ;; If WINDOW is the major non-side window, do nothing.
+ (if (window-with-parameter 'window-side)
+ (setq side-main (window--major-non-side-window frame))
+ (setq side-main (frame-root-window frame)))
(unless (eq window side-main)
(delete-other-windows-internal window side-main)
(run-window-configuration-change-hook frame)
@@ -2613,7 +3008,7 @@ WINDOW must be a live window and defaults to the selected one."
;; Add an entry for buffer to WINDOW's previous buffers.
(with-current-buffer buffer
(let ((start (window-start window))
- (point (window-point-1 window)))
+ (point (window-point window)))
(setq entry
(cons buffer
(if entry
@@ -2657,7 +3052,7 @@ before was current this also makes BUFFER the current buffer."
;; Don't force window-start here (even if POINT is nil).
(set-window-start window start t))
(when point
- (set-window-point-1 window point))))
+ (set-window-point window point))))
(defcustom switch-to-visible-buffer t
"If non-nil, allow switching to an already visible buffer.
@@ -2679,32 +3074,47 @@ found.
Optional argument BURY-OR-KILL non-nil means the buffer currently
shown in WINDOW is about to be buried or killed and consequently
-shall not be switched to in future invocations of this command."
+shall not be switched to in future invocations of this command.
+
+As a special case, if BURY-OR-KILL equals `append', this means to
+move the buffer to the end of WINDOW's previous buffers list so a
+future invocation of `switch-to-prev-buffer' less likely switches
+to it."
(interactive)
(let* ((window (window-normalize-window window t))
(frame (window-frame window))
(old-buffer (window-buffer window))
;; Save this since it's destroyed by `set-window-buffer'.
(next-buffers (window-next-buffers window))
- entry buffer new-buffer killed-buffers visible)
+ (pred (frame-parameter frame 'buffer-predicate))
+ entry new-buffer killed-buffers visible)
+ (when (window-minibuffer-p window)
+ ;; Don't switch in minibuffer window.
+ (unless (setq window (minibuffer-selected-window))
+ (error "Window %s is a minibuffer window" window)))
+
(when (window-dedicated-p window)
+ ;; Don't switch in dedicated window.
(error "Window %s is dedicated to buffer %s" window old-buffer))
(catch 'found
;; Scan WINDOW's previous buffers first, skipping entries of next
;; buffers.
(dolist (entry (window-prev-buffers window))
- (when (and (setq buffer (car entry))
- (or (buffer-live-p buffer)
+ (when (and (setq new-buffer (car entry))
+ (or (buffer-live-p new-buffer)
(not (setq killed-buffers
- (cons buffer killed-buffers))))
- (not (eq buffer old-buffer))
- (or bury-or-kill (not (memq buffer next-buffers))))
+ (cons new-buffer killed-buffers))))
+ (not (eq new-buffer old-buffer))
+ (or (null pred) (funcall pred new-buffer))
+ ;; When BURY-OR-KILL is nil, avoid switching to a
+ ;; buffer in WINDOW's next buffers list.
+ (or bury-or-kill (not (memq new-buffer next-buffers))))
(if (and (not switch-to-visible-buffer)
- (get-buffer-window buffer frame))
- ;; Try to avoid showing a buffer visible in some other window.
- (setq visible buffer)
- (setq new-buffer buffer)
+ (get-buffer-window new-buffer frame))
+ ;; Try to avoid showing a buffer visible in some other
+ ;; window.
+ (setq visible new-buffer)
(set-window-buffer-start-and-point
window new-buffer (nth 1 entry) (nth 2 entry))
(throw 'found t))))
@@ -2719,6 +3129,7 @@ shall not be switched to in future invocations of this command."
(nreverse (buffer-list frame))))
(when (and (buffer-live-p buffer)
(not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(not (eq (aref (buffer-name buffer) 0) ?\s))
(or bury-or-kill (not (memq buffer next-buffers))))
(if (get-buffer-window buffer frame)
@@ -2738,6 +3149,7 @@ shall not be switched to in future invocations of this command."
(not (setq killed-buffers
(cons buffer killed-buffers))))
(not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(setq entry (assq buffer (window-prev-buffers window))))
(setq new-buffer buffer)
(set-window-buffer-start-and-point
@@ -2750,12 +3162,20 @@ shall not be switched to in future invocations of this command."
(set-window-buffer-start-and-point window new-buffer)))
(if bury-or-kill
- ;; Remove `old-buffer' from WINDOW's previous and (restored list
- ;; of) next buffers.
- (progn
+ (let ((entry (and (eq bury-or-kill 'append)
+ (assq old-buffer (window-prev-buffers window)))))
+ ;; Remove `old-buffer' from WINDOW's previous and (restored list
+ ;; of) next buffers.
(set-window-prev-buffers
window (assq-delete-all old-buffer (window-prev-buffers window)))
- (set-window-next-buffers window (delq old-buffer next-buffers)))
+ (set-window-next-buffers window (delq old-buffer next-buffers))
+ (when entry
+ ;; Append old-buffer's entry to list of WINDOW's previous
+ ;; buffers so it's less likely to get switched to soon but
+ ;; `display-buffer-in-previous-window' can nevertheless find
+ ;; it.
+ (set-window-prev-buffers
+ window (append (window-prev-buffers window) (list entry)))))
;; Move `old-buffer' to head of WINDOW's restored list of next
;; buffers.
(set-window-next-buffers
@@ -2782,8 +3202,15 @@ found."
(frame (window-frame window))
(old-buffer (window-buffer window))
(next-buffers (window-next-buffers window))
- buffer new-buffer entry killed-buffers visible)
+ (pred (frame-parameter frame 'buffer-predicate))
+ new-buffer entry killed-buffers visible)
+ (when (window-minibuffer-p window)
+ ;; Don't switch in minibuffer window.
+ (unless (setq window (minibuffer-selected-window))
+ (error "Window %s is a minibuffer window" window)))
+
(when (window-dedicated-p window)
+ ;; Don't switch in dedicated window.
(error "Window %s is dedicated to buffer %s" window old-buffer))
(catch 'found
@@ -2793,6 +3220,7 @@ found."
(not (setq killed-buffers
(cons buffer killed-buffers))))
(not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(setq entry (assq buffer (window-prev-buffers window))))
(setq new-buffer buffer)
(set-window-buffer-start-and-point
@@ -2801,7 +3229,9 @@ found."
;; Scan the buffer list of WINDOW's frame next, skipping previous
;; buffers entries.
(dolist (buffer (buffer-list frame))
- (when (and (buffer-live-p buffer) (not (eq buffer old-buffer))
+ (when (and (buffer-live-p buffer)
+ (not (eq buffer old-buffer))
+ (or (null pred) (funcall pred buffer))
(not (eq (aref (buffer-name buffer) 0) ?\s))
(not (assq buffer (window-prev-buffers window))))
(if (get-buffer-window buffer frame)
@@ -2813,17 +3243,17 @@ found."
;; Scan WINDOW's reverted previous buffers last (must not use
;; nreverse here!)
(dolist (entry (reverse (window-prev-buffers window)))
- (when (and (setq buffer (car entry))
- (or (buffer-live-p buffer)
+ (when (and (setq new-buffer (car entry))
+ (or (buffer-live-p new-buffer)
(not (setq killed-buffers
- (cons buffer killed-buffers))))
- (not (eq buffer old-buffer)))
+ (cons new-buffer killed-buffers))))
+ (not (eq new-buffer old-buffer))
+ (or (null pred) (funcall pred new-buffer)))
(if (and (not switch-to-visible-buffer)
- (get-buffer-window buffer frame))
+ (get-buffer-window new-buffer frame))
;; Try to avoid showing a buffer visible in some other window.
(unless visible
- (setq visible buffer))
- (setq new-buffer buffer)
+ (setq visible new-buffer))
(set-window-buffer-start-and-point
window new-buffer (nth 1 entry) (nth 2 entry))
(throw 'found t))))
@@ -3050,18 +3480,35 @@ all window-local buffer lists."
;; Unrecord BUFFER in WINDOW.
(unrecord-window-buffer window buffer)))))
-(defun quit-window (&optional kill window)
- "Quit WINDOW and bury its buffer.
+(defun quit-restore-window (&optional window bury-or-kill)
+ "Quit WINDOW and deal with its buffer.
WINDOW must be a live window and defaults to the selected one.
-With prefix argument KILL non-nil, kill the buffer instead of
-burying it.
According to information stored in WINDOW's `quit-restore' window
parameter either (1) delete WINDOW and its frame, (2) delete
WINDOW, (3) restore the buffer previously displayed in WINDOW,
or (4) make WINDOW display some other buffer than the present
-one. If non-nil, reset `quit-restore' parameter to nil."
- (interactive "P")
+one. If non-nil, reset `quit-restore' parameter to nil.
+
+Optional second argument BURY-OR-KILL tells how to proceed with
+the buffer of WINDOW. The following values are handled:
+
+`nil' means to not handle the buffer in a particular way. This
+ means that if WINDOW is not deleted by this function, invoking
+ `switch-to-prev-buffer' will usually show the buffer again.
+
+`append' means that if WINDOW is not deleted, move its buffer to
+ the end of WINDOW's previous buffers so it's less likely that a
+ future invocation of `switch-to-prev-buffer' will switch to it.
+ Also, move the buffer to the end of the frame's buffer list.
+
+`bury' means that if WINDOW is not deleted, remove its buffer
+ from WINDOW'S list of previous buffers. Also, move the buffer
+ to the end of the frame's buffer list. This value provides the
+ most reliable remedy to not have `switch-to-prev-buffer' switch
+ to this buffer again without killing the buffer.
+
+`kill' means to kill WINDOW's buffer."
(setq window (window-normalize-window window t))
(let* ((buffer (window-buffer window))
(quit-restore (window-parameter window 'quit-restore))
@@ -3073,13 +3520,13 @@ one. If non-nil, reset `quit-restore' parameter to nil."
(not (eq (setq prev-buffer (cadr prev-buffers))
buffer))))
prev-buffer)))
- quad resize)
+ quad entry)
(cond
((and (not prev-buffer)
(memq (nth 1 quit-restore) '(window frame))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
- (window--delete window nil kill))
+ (window--delete window nil (eq bury-or-kill 'kill)))
;; If the previously selected window is still alive, select it.
(when (window-live-p (nth 2 quit-restore))
(select-window (nth 2 quit-restore))))
@@ -3087,21 +3534,32 @@ one. If non-nil, reset `quit-restore' parameter to nil."
(buffer-live-p (car quad))
(eq (nth 3 quit-restore) buffer))
;; Show another buffer stored in quit-restore parameter.
- (setq resize (and (integerp (nth 3 quad))
- (/= (nth 3 quad) (window-total-size window))))
- (set-window-dedicated-p window nil)
- (when resize
+ (when (and (integerp (nth 3 quad))
+ (/= (nth 3 quad) (window-total-size window)))
;; Try to resize WINDOW to its old height but don't signal an
;; error.
(condition-case nil
(window-resize window (- (nth 3 quad) (window-total-size window)))
(error nil)))
+ (set-window-dedicated-p window nil)
;; Restore WINDOW's previous buffer, start and point position.
(set-window-buffer-start-and-point
window (nth 0 quad) (nth 1 quad) (nth 2 quad))
- ;; Unrecord WINDOW's buffer here (Bug#9937) to make sure it's not
- ;; re-recorded by `set-window-buffer'.
- (unrecord-window-buffer window buffer)
+ ;; Deal with the buffer we just removed from WINDOW.
+ (setq entry (and (eq bury-or-kill 'append)
+ (assq buffer (window-prev-buffers window))))
+ (when bury-or-kill
+ ;; Remove buffer from WINDOW's previous and next buffers.
+ (set-window-prev-buffers
+ window (assq-delete-all buffer (window-prev-buffers window)))
+ (set-window-next-buffers
+ window (delq buffer (window-next-buffers window))))
+ (when entry
+ ;; Append old buffer's entry to list of WINDOW's previous
+ ;; buffers so it's less likely to get switched to soon but
+ ;; `display-buffer-in-previous-window' can nevertheless find it.
+ (set-window-prev-buffers
+ window (append (window-prev-buffers window) (list entry))))
;; Reset the quit-restore parameter.
(set-window-parameter window 'quit-restore nil)
;; Select old window.
@@ -3113,12 +3571,29 @@ one. If non-nil, reset `quit-restore' parameter to nil."
(set-window-parameter window 'quit-restore nil)
;; Make sure that WINDOW is no more dedicated.
(set-window-dedicated-p window nil)
- (switch-to-prev-buffer window 'bury-or-kill)))
+ (switch-to-prev-buffer window bury-or-kill)))
- ;; Kill WINDOW's old-buffer if requested
- (if kill
- (kill-buffer buffer)
- (bury-buffer-internal buffer))))
+ ;; Deal with the buffer.
+ (cond
+ ((not (buffer-live-p buffer)))
+ ((eq bury-or-kill 'kill)
+ (kill-buffer buffer))
+ (bury-or-kill
+ (bury-buffer-internal buffer)))))
+
+(defun quit-window (&optional kill window)
+ "Quit WINDOW and bury its buffer.
+WINDOW must be a live window and defaults to the selected one.
+With prefix argument KILL non-nil, kill the buffer instead of
+burying it.
+
+According to information stored in WINDOW's `quit-restore' window
+parameter either (1) delete WINDOW and its frame, (2) delete
+WINDOW, (3) restore the buffer previously displayed in WINDOW,
+or (4) make WINDOW display some other buffer than the present
+one. If non-nil, reset `quit-restore' parameter to nil."
+ (interactive "P")
+ (quit-restore-window window (if kill 'kill 'bury)))
(defun quit-windows-on (&optional buffer-or-name kill frame)
"Quit all windows showing BUFFER-OR-NAME.
@@ -3198,14 +3673,16 @@ frame. The selected window is not changed by this function."
((not side) 'below)
((memq side '(below above right left)) side)
(t 'right)))
- (horizontal (not (memq side '(nil below above))))
+ (horizontal (not (memq side '(below above))))
(frame (window-frame window))
(parent (window-parent window))
(function (window-parameter window 'split-window))
(window-side (window-parameter window 'window-side))
- ;; Rebind `window-combination-limit' since in some cases we may
- ;; have to override its value.
+ ;; Rebind `window-combination-limit' and
+ ;; `window-combination-resize' since in some cases we may have
+ ;; to override their value.
(window-combination-limit window-combination-limit)
+ (window-combination-resize window-combination-resize)
atom-root)
(window--check frame)
@@ -3223,20 +3700,32 @@ frame. The selected window is not changed by this function."
((and (window-parameter window 'window-atom)
(setq atom-root (window-atom-root window))
(not (eq atom-root window)))
- (throw 'done (split-window atom-root size side))))
-
- (when (and window-side
- (or (not parent)
- (not (window-parameter parent 'window-side))))
- ;; WINDOW is a side root window. To make sure that a new parent
- ;; window gets created set `window-combination-limit' to t.
- (setq window-combination-limit t))
-
- (when (and window-combination-resize size (> size 0))
- ;; If `window-combination-resize' is non-nil and SIZE is a
- ;; non-negative integer, we cannot reasonably resize other
- ;; windows. Rather bind `window-combination-limit' to t to make
- ;; sure that subsequent window deletions are handled correctly.
+ (throw 'done (split-window atom-root size side)))
+ ;; If WINDOW is a side window or its first or last child is a
+ ;; side window, throw an error unless `window-combination-resize'
+ ;; equals 'side.
+ ((and (not (eq window-combination-resize 'side))
+ (or (window-parameter window 'window-side)
+ (and (window-child window)
+ (or (window-parameter
+ (window-child window) 'window-side)
+ (window-parameter
+ (window-last-child window) 'window-side)))))
+ (error "Cannot split side window or parent of side window"))
+ ;; If `window-combination-resize' is 'side and window has a side
+ ;; window sibling, bind `window-combination-limit' to t.
+ ((and (not (eq window-combination-resize 'side))
+ (or (and (window-prev-sibling window)
+ (window-parameter
+ (window-prev-sibling window) 'window-side))
+ (and (window-next-sibling window)
+ (window-parameter
+ (window-next-sibling window) 'window-side))))
+ (setq window-combination-limit t)))
+
+ ;; If `window-combination-resize' is t and SIZE is non-negative,
+ ;; bind `window-combination-limit' to t.
+ (when (and (eq window-combination-resize t) size (> size 0))
(setq window-combination-limit t))
(let* ((parent-size
@@ -3246,7 +3735,10 @@ frame. The selected window is not changed by this function."
;; `resize' non-nil means we are supposed to resize other
;; windows in WINDOW's combination.
(resize
- (and window-combination-resize (not window-combination-limit)
+ (and window-combination-resize
+ (or (window-parameter window 'window-side)
+ (not (eq window-combination-resize 'side)))
+ (not window-combination-limit)
;; Resize makes sense in iso-combinations only.
(window-combined-p window horizontal)))
;; `old-size' is the current size of WINDOW.
@@ -3357,10 +3849,21 @@ frame. The selected window is not changed by this function."
new-normal)))
(let* ((new (split-window-internal window new-size side new-normal)))
- ;; Inherit window-side parameters, if any.
- (when (and window-side new-parent)
- (set-window-parameter (window-parent new) 'window-side window-side)
- (set-window-parameter new 'window-side window-side))
+ ;; Assign window-side parameters, if any.
+ (when (eq window-combination-resize 'side)
+ (let ((window-side
+ (cond
+ (window-side window-side)
+ ((eq side 'above) 'top)
+ ((eq side 'below) 'bottom)
+ (t side))))
+ ;; We made a new side window.
+ (set-window-parameter new 'window-side window-side)
+ (when (and new-parent (window-parameter window 'window-side))
+ ;; We've been splitting a side root window. Give the
+ ;; new parent the same window-side parameter.
+ (set-window-parameter
+ (window-parent new) 'window-side window-side))))
(run-window-configuration-change-hook frame)
(window--check frame)
@@ -3393,7 +3896,7 @@ Otherwise, the window starts are chosen so as to minimize the
amount of redisplay; this is convenient on slow terminals."
(interactive "P")
(let ((old-window (selected-window))
- (old-point (window-point-1))
+ (old-point (window-point))
(size (and size (prefix-numeric-value size)))
moved-by-window-height moved new-window bottom)
(when (and size (< size 0) (< (- size) window-min-height))
@@ -3418,7 +3921,7 @@ amount of redisplay; this is convenient on slow terminals."
(setq bottom (point)))
(and moved-by-window-height
(<= bottom (point))
- (set-window-point-1 old-window (1- bottom)))
+ (set-window-point old-window (1- bottom)))
(and moved-by-window-height
(<= (window-start new-window) old-point)
(set-window-point new-window old-point)
@@ -3727,7 +4230,7 @@ specific buffers."
`((parameters . ,list))))
,@(when buffer
;; All buffer related things go in here.
- (let ((point (window-point-1 window))
+ (let ((point (window-point window))
(start (window-start window)))
`((buffer
,(buffer-name buffer)
@@ -4020,7 +4523,7 @@ element is BUFFER."
(list 'other
;; A quadruple of WINDOW's buffer, start, point and height.
(list (window-buffer window) (window-start window)
- (window-point-1 window) (window-total-size window))
+ (window-point window) (window-total-size window))
(selected-window) buffer))))
((eq type 'window)
;; WINDOW has been created on an existing frame.
@@ -4048,12 +4551,11 @@ of the window used."
(function :tag "function"))
:group 'windows)
+;; Eventually, we want to turn this into a defvar; instead of
+;; customizing this, the user should use a `pop-up-frame-parameters'
+;; alist entry in `display-buffer-base-action'.
(defcustom pop-up-frame-alist nil
"Alist of parameters for automatically generated new frames.
-You can set this in your init file; for example,
-
- (setq pop-up-frame-alist '((width . 80) (height . 20)))
-
If non-nil, the value you specify here is used by the default
`pop-up-frame-function' for the creation of new frames.
@@ -4140,8 +4642,7 @@ See also `special-display-regexps'."
(repeat :tag "Arguments" (sexp)))))
:group 'windows
:group 'frames)
-
-;;;###autoload
+(make-obsolete-variable 'special-display-buffer-names 'display-buffer-alist "24.3")
(put 'special-display-buffer-names 'risky-local-variable t)
(defcustom special-display-regexps nil
@@ -4208,6 +4709,8 @@ See also `special-display-buffer-names'."
(repeat :tag "Arguments" (sexp)))))
:group 'windows
:group 'frames)
+(make-obsolete-variable 'special-display-regexps 'display-buffer-alist "24.3")
+(put 'special-display-regexps 'risky-local-variable t)
(defun special-display-p (buffer-name)
"Return non-nil if a buffer named BUFFER-NAME gets a special frame.
@@ -4249,6 +4752,7 @@ These supersede the values given in `default-frame-alist'."
(symbol :tag "Parameter")
(sexp :tag "Value")))
:group 'frames)
+(make-obsolete-variable 'special-display-frame-alist 'display-buffer-alist "24.3")
(defun special-display-popup-frame (buffer &optional args)
"Pop up a frame displaying BUFFER and return its window.
@@ -4294,6 +4798,9 @@ and (cdr ARGS) as second."
(make-frame (append args special-display-frame-alist))))
(window (frame-selected-window frame)))
(display-buffer-record-window 'frame window buffer)
+ (unless (eq buffer (window-buffer window))
+ (set-window-buffer window buffer)
+ (set-window-prev-buffers window nil))
(set-window-dedicated-p window t)
window)))))
@@ -4315,6 +4822,7 @@ with corresponding arguments to set up the quit-restore parameter
of the window used."
:type 'function
:group 'frames)
+(make-obsolete-variable 'special-display-function 'display-buffer-alist "24.3")
(defcustom same-window-buffer-names nil
"List of names of buffers that should appear in the \"same\" window.
@@ -4388,6 +4896,11 @@ that frame."
:version "21.1"
:group 'windows)
+(make-obsolete-variable
+ 'display-buffer-reuse-frames
+ "use a `reusable-frames' alist entry in `display-buffer-alist'."
+ "24.3")
+
(defcustom pop-up-windows t
"Non-nil means `display-buffer' should make a new window."
:type 'boolean
@@ -4590,23 +5103,19 @@ Do this only if these windows are vertically adjacent to each
other, `even-window-heights' is non-nil, and the selected window
is higher than WINDOW."
(when (and even-window-heights
- (not (eq window (selected-window)))
- ;; Don't resize minibuffer windows.
- (not (window-minibuffer-p (selected-window)))
- (> (window-height (selected-window)) (window-height window))
- (eq (window-frame window) (window-frame (selected-window)))
- (let ((sel-edges (window-edges (selected-window)))
- (win-edges (window-edges window)))
- (and (= (nth 0 sel-edges) (nth 0 win-edges))
- (= (nth 2 sel-edges) (nth 2 win-edges))
- (or (= (nth 1 sel-edges) (nth 3 win-edges))
- (= (nth 3 sel-edges) (nth 1 win-edges))))))
- (let ((window-min-height 1))
- ;; Don't throw an error if we can't even window heights for
- ;; whatever reason.
- (condition-case nil
- (enlarge-window (/ (- (window-height window) (window-height)) 2))
- (error nil)))))
+ ;; Even iff WINDOW forms a vertical combination with the
+ ;; selected window, and WINDOW's height exceeds that of the
+ ;; selected window, see also bug#11880.
+ (window-combined-p window)
+ (= (window-child-count (window-parent window)) 2)
+ (eq (window-parent) (window-parent window))
+ (> (window-total-height) (window-total-height window)))
+ ;; Don't throw an error if we can't even window heights for
+ ;; whatever reason.
+ (condition-case nil
+ (enlarge-window
+ (/ (- (window-total-height window) (window-total-height)) 2))
+ (error nil))))
(defun window--display-buffer (buffer window type &optional dedicated)
"Display BUFFER in WINDOW and make its frame visible.
@@ -4615,9 +5124,9 @@ is passed unaltered to `display-buffer-record-window'. Set
`window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if
BUFFER and WINDOW are live."
(when (and (buffer-live-p buffer) (window-live-p window))
+ (display-buffer-record-window type window buffer)
(unless (eq buffer (window-buffer window))
(set-window-dedicated-p window nil)
- (display-buffer-record-window type window buffer)
(set-window-buffer window buffer)
(when dedicated
(set-window-dedicated-p window dedicated))
@@ -4791,6 +5300,10 @@ Recognized alist entries include:
window that already displays the buffer.
See `display-buffer-reuse-window'.
+ `pop-up-frame-parameters' -- Value specifies an alist of frame
+ parameters to give a new frame, if
+ one is created.
+
The ACTION argument to `display-buffer' can also have a non-nil
and non-list value. This means to display the buffer in a window
other than the selected one, even if it is already displayed in
@@ -4933,9 +5446,15 @@ This works by calling `pop-up-frame-function'. If successful,
return the window used; otherwise return nil.
If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
-raising the new frame."
- (let ((fun pop-up-frame-function)
- frame window)
+raising the new frame.
+
+If ALIST has a non-nil `pop-up-frame-parameters' entry, the
+corresponding value is an alist of frame parameters to give the
+new frame."
+ (let* ((params (cdr (assq 'pop-up-frame-parameters alist)))
+ (pop-up-frame-alist (append params pop-up-frame-alist))
+ (fun pop-up-frame-function)
+ frame window)
(when (and fun
(setq frame (funcall fun))
(setq window (frame-selected-window frame)))
@@ -4988,6 +5507,20 @@ again with `display-buffer-pop-up-window'."
(and pop-up-windows
(display-buffer-pop-up-window buffer alist))))
+(defun display-buffer-below-selected (buffer _alist)
+ "Try displaying BUFFER in a window below the selected window.
+This either splits the selected window or reuses the window below
+the selected one."
+ (let (window)
+ (or (and (not (frame-parameter nil 'unsplittable))
+ (setq window (window--try-to-split-window (selected-window)))
+ (window--display-buffer
+ buffer window 'window display-buffer-mark-dedicated))
+ (and (setq window (window-in-direction 'below))
+ (not (window-dedicated-p window))
+ (window--display-buffer
+ buffer window 'reuse display-buffer-mark-dedicated)))))
+
(defun display-buffer-use-some-window (buffer alist)
"Display BUFFER in an existing window.
Search for a usable window, set that window to the buffer, and
@@ -5013,8 +5546,9 @@ that frame."
window))
(get-largest-window 0 not-this-window))))
(when (window-live-p window)
- (window--even-window-heights window)
- (prog1 (window--display-buffer buffer window 'reuse)
+ (prog1
+ (window--display-buffer buffer window 'reuse)
+ (window--even-window-heights window)
(unless (cdr (assq 'inhibit-switch-frame alist))
(window--maybe-raise-frame (window-frame window)))))))
@@ -5281,7 +5815,7 @@ WINDOW must be a live window and defaults to the selected one."
window))))
;;; Resizing buffers to fit their contents exactly.
-(defun fit-window-to-buffer (&optional window max-height min-height override)
+(defun fit-window-to-buffer (&optional window max-height min-height)
"Adjust height of WINDOW to display its buffer's contents exactly.
WINDOW must be a live window and defaults to the selected one.
@@ -5292,10 +5826,6 @@ defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT
are specified in lines and include the mode line and header line,
if any.
-Optional argument OVERRIDE non-nil means override restrictions
-imposed by `window-min-height' and `window-min-width' on the size
-of WINDOW.
-
Return the number of lines by which WINDOW was enlarged or
shrunk. If an error occurs during resizing, return nil but don't
signal an error.
@@ -5304,28 +5834,27 @@ Note that even if this function makes WINDOW large enough to show
_all_ lines of its buffer you might not see the first lines when
WINDOW was scrolled."
(interactive)
- ;; Do all the work in WINDOW and its buffer and restore the selected
- ;; window and the current buffer when we're done.
(setq window (window-normalize-window window t))
;; Can't resize a full height or fixed-size window.
(unless (or (window-size-fixed-p window)
(window-full-height-p window))
- ;; `with-selected-window' should orderly restore the current buffer.
(with-selected-window window
- ;; We are in WINDOW's buffer now.
- (let* (;; Adjust MIN-HEIGHT.
+ (let* ((height (window-total-size))
(min-height
- (if override
- (window-min-size window nil window)
- (max (or min-height window-min-height)
- window-safe-min-height)))
- (max-window-height
- (window-total-size (frame-root-window window)))
- ;; Adjust MAX-HEIGHT.
+ ;; Adjust MIN-HEIGHT.
+ (if (numberp min-height)
+ ;; Can't get smaller than `window-safe-min-height'.
+ (max min-height window-safe-min-height)
+ ;; Preserve header and mode line if present.
+ (window-min-size nil nil t)))
(max-height
- (if (or override (not max-height))
- max-window-height
- (min max-height max-window-height)))
+ ;; Adjust MAX-HEIGHT.
+ (if (numberp max-height)
+ ;; Can't get larger than height of frame.
+ (min max-height
+ (window-total-size (frame-root-window window)))
+ ;, Don't delete other windows.
+ (+ height (window-max-delta nil nil window))))
;; Make `desired-height' the height necessary to show
;; all of WINDOW's buffer, constrained by MIN-HEIGHT
;; and MAX-HEIGHT.
@@ -5350,7 +5879,6 @@ WINDOW was scrolled."
(window-max-delta window nil window))
(max desired-delta
(- (window-min-delta window nil window))))))
- ;; This `condition-case' shouldn't be necessary, but who knows?
(condition-case nil
(if (zerop delta)
;; Return zero if DELTA became zero in the process.
diff --git a/lisp/woman.el b/lisp/woman.el
index 5933d593aa5..c8cc7ea6766 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2531,7 +2531,7 @@ REQUEST is the invoking directive without the leading dot."
(cond
;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page)
;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page)
- ;; Per groff ".if v" is recognised as false (it means -Tversatec).
+ ;; Per groff ".if v" is recognized as false (it means -Tversatec).
((looking-at "[ntoev]")
(setq c (memq (following-char) woman-if-conditions-true)))
;; Unrecognized letter so reject: