diff options
author | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
commit | ecb21060d5c1752d41d7a742be565c59b5fcb855 (patch) | |
tree | fadebcd18a69457a1d564f738c3f9bdcf512ab4b /lisp | |
parent | 42af7493ae7e7a14ee508800c7fa75b65a94c143 (diff) | |
parent | 58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff) | |
download | emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.tar.gz emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.tar.bz2 emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'lisp')
130 files changed, 12286 insertions, 6153 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a5b277201a..9524be4cdee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,2241 @@ +2007-10-09 Juanma Barranquero <lekktu@gmail.com> + + * follow.el: Require easymenu. + (follow-mode-hook, follow-mode): Doc fixes. + (follow-mode-off-hook): Mark as obsolete. + +2007-10-08 Martin Rudalics <rudalics@gmx.at> + + * window.el (mouse-autoselect-window-cancel): Don't cancel for + select-window or select-frame events. + (handle-select-window): When autoselecting window set input + focus. Restructure. + + * frame.el (focus-follows-mouse): Moved to frame.c. + * cus-start.el (all): Add focus-follows-mouse. + +2007-10-08 Juanma Barranquero <lekktu@gmail.com> + + * bs.el (bs-mode): Make sure global-font-lock-mode doesn't + activate font-locking in the *buffer-selection* buffer. + (bs-show-sorted): Doc fix. + + * bs.el (bs--get-marked-string, bs--get-modified-string) + (bs--get-readonly-string, bs--get-size-string, bs--get-name) + (bs--get-mode-name, bs-mode): Fix typos in docstrings. + (bs--format-aux): Doc fix. + +2007-10-08 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * progmodes/gud.el (gud-gud-gdb-command-name): Fix typo in docstring. + +2007-10-08 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gud-gud-gdb-command-name): New option. + (gud-gdb): New function for old M-x gdb (text command mode). + (gud-gdb-command-name, gdb): Move to... + + * progmodes/gdb-ui.el: ...here and adapt doc string. + (gud-gdba-command-name, gdba): Delete. + +2007-10-08 Juanma Barranquero <lekktu@gmail.com> + + * bs.el: Don't defvar `font-lock-verbose'. + (bs-config-clear, bs-kill, bs-string-show-normally, bs-sort-functions) + (bs--get-file-name): Fix typos in docstrings. + (bs--show-header): Use `dolist' instead of `mapcar'. + (bs-mode): Set `show-trailing-whitespace' to nil. + (bs-buffer-sort-function, bs-mouse-select-other-frame) + (bs-visits-non-file, bs-sort-buffer-interns-are-last, bs-show): + Doc fixes. + +2007-10-08 Adam Hupp <adam@hupp.org> (tiny change) + + * progmodes/gdb-ui.el (pdb): Specify file for gud-break. + +2007-10-08 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gdb): Make graphical mode the default and + switch to text command mode if appropriate, i.e., reverse previous + arrangement. + (gud-gdb-marker-filter): Adapt for above change. + + * progmodes/gdb-ui.el (gdb-init-1): Don't set the values + gud-minor-mode and gud-marker-filter. + (gdb-fullname-regexp): New variable. + (gud-gdba-marker-filter): Use it to switch to text command + mode if appropriate. + +2007-10-08 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gud-display-line): Find source buffer even when + GUD buffer has its own frame. + +2007-10-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (icon-map-list): Set to nil for 22.1 compatibility. + +2007-10-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (x-gtk-stock-map): Version is 22.2. + +2007-10-08 Martin Rudalics <rudalics@gmx.at> + + * allout.el (allout-before-change-handler): Replace got-char by + goto-char. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-svn.el (vc-svn-resolve-when-done, vc-svn-find-file-hook): New funs. + Used to try and automatically enabled smerge-mode in the presence of + conflicts and to call `svn resolved' when the conflicts are gone. + (vc-svn-parse-status): Remember the svn-specific status. + +2007-10-08 Eli Zaretskii <eliz@gnu.org> + + * menu-bar.el (menu-bar-search-documentation-menu): Rename from + menu-bar-apropos-menu. All users changed. + (menu-bar-help-menu): Change menu symbols to better match the text + displayed by the menu. + +2007-10-08 Dan Nicolaescu <dann@ics.uci.edu> + + * files.el (file-name-sans-versions): Use [:alnum:] and also allow + #, @, : and ^. + +2007-10-08 Dan Nicolaescu <dann@ics.uci.edu> + + * pcvs-defs.el (cvs-mode-map): Bind TAB and backtab. + + * log-view.el (log-view-mode-map): Likewise. + + * diff-mode.el (diff-mode-shared-map): Likewise. + +2007-10-08 Dan Nicolaescu <dann@ics.uci.edu> + + * files.el (file-name-sans-versions): Also allow `A-Z'. + + * vc.el: Mention all supported VC backends. + +2007-10-08 Richard Stallman <rms@gnu.org> + + * wid-edit.el (widget-specify-button): Don't merge mouse-face with + neighbouring buttons. + +2007-10-08 Andreas Schwab <schwab@suse.de> + + * files.el (file-name-sans-versions): Also allow `_'. + +2007-10-08 Dan Nicolaescu <dann@ics.uci.edu> + + * files.el (file-name-sans-versions): Allow - and a-z in version names. + + * log-view.el (log-view-mode-map, log-view-mode-menu): + Bind log-view-annotate-version. + (log-view-beginning-of-defun, log-view-end-of-defun) + (log-view-annotate-version): New functions. + (log-view-mode): Use log-view-beginning-of-defun and + log-view-end-of-defun. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/easy-mmode.el (define-minor-mode): Fix staging. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * wid-edit.el (widget-image-insert): Don't merge mouse-face with + neighbouring buttons. + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Recognize gcc's use of "note" for informational messages. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/css-mode.el (css-electric-keys): electrick->electric. + (css-mode): Update correspondingly. + +2007-10-08 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-git.el (vc-git-log-view-mode): Add font-lock patterns for + Signed-off-by, Acked-by and Merge. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * ediff-init.el (ediff-verbose-p): This var is not a constant. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-mtn.el: New file. + + * vc-hooks.el (vc-handled-backends): Add Mtn. + +2007-10-08 Eli Zaretskii <eliz@gnu.org> + + * files.el (find-file, find-file-other-window) + (find-file-other-frame, find-file-existing, find-file-read-only) + (find-file-read-only-other-window) + (find-file-read-only-other-frame) + (find-alternate-file-other-window, find-alternate-file): Doc fixes. + +2007-10-08 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gdb-ready): New variable. + (gdb): Set it to nil. Set gud-running to nil here... + (gud-common-init): ...instead of here. + + * progmodes/gdb-ui.el (gdba, gdb-send, gdb-source-info): + Use gdb-ready. Discard input until GDB is ready to accept it. + +2007-10-08 Martin Rudalics <rudalics@gmx.at> + + * dired.el (dired-warning): Inherit from font-lock-warning-face to + make it show up with eight colors. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * diff-mode.el (diff-sanity-check-hunk): Fix up the case when unified + diffs are concatenated with no intervening line. + +2007-10-08 Dave Love <fx@gnu.org> + + * progmodes/python.el: Merge changes from Dave Love's v2007-Sep-10. + (python-font-lock-keywords): Update to the 2.5 version of the language. + (python-quote-syntax): Let-bind font-lock-syntactic-keywords to nil. + (python-backspace): Only behave funny in code. + (python-compilation-regexp-alist): Add PDB stack trace regexp. + (inferior-python-mode): Add PDB prompt regexp. + (python-fill-paragraph): Refine the fenced-string regexp. + (python-find-imports): Handle imports spanning several lines. + (python-mode): Add `class' to hideshow support. + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use + add-log-buffer-file-name-function rather than bind buffer-file-name, + so we dont end up calling change-log-mode in *cvs* when `fi' is the + ChangeLog file itself. + + * outline.el (outline-flag-region): Use front-advance. + +2007-10-08 Ilya Zakharevich <ilyaz@cpan.org> + + * progmodes/cperl-mode.el: Merge upstream 5.23. + (cperl-where-am-i): Remove function. + (cperl-backward-to-noncomment): Don't go too far when skipping POD/HEREs + (cperl-sniff-for-indent): De-invert [string] and [comment]. + When looking for label, skip s:m:y:tr. + (cperl-indent-line): Likewise. + (cperl-mode): Don't assume `font-lock-multiline' is auto-local. + (cperl-windowed-init): Wrong `ps-print' handling. + Both thanks to Chong Yidong. + (cperl-look-at-leading-count): Could fail with unfinished RExen. + (cperl-find-pods-heres): If the second part of s()[] is missing, + don't try to highlight delimiters... + +2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el (compilation-get-file-structure): Complete last + change by also using spec-directory in the puthash. + +2007-10-08 Riccardo Murri <riccardo.murri@gmail.com> + + * vc-bzr.el (vc-bzr-file-name-relative): Use 'when' instead of 'and'. + (vc-bzr-status): Fix shadowing of variable 'status'. + (vc-bzr-workfile-version): Use correct path to 'last-revision' file. + Use `expand-file-name' instead of `concat'. + (vc-bzr-annotate-command): Use option name '--long' instead of '-l'. + Update annotation line regexp. Fixes launchpad.net [Bug 137435]. + +2007-10-08 Jason Rumney <jasonr@gnu.org> + + * frame.el (focus-follows-mouse): Doc-fix. Change default on w32. + +2007-10-08 Richard Stallman <rms@gnu.org> + + * emacs-lisp/lisp-mode.el (lisp-indent-offset): Make defcustom. + Add `safe-local-variable' property. + (lisp-body-indent): Likewise. + +2007-10-08 Richard Stallman <rms@gnu.org> + + * files.el (hack-local-variables-confirm): Rename arg VARS to ALL-VARS. + Add doc string. + +2007-10-08 Martin Rudalics <rudalics@gmx.at> + + * files.el (backup-buffer-copy): Try to overwrite old backup first. + +2007-10-08 Martin Rudalics <rudalics@gmx.at> + + * repeat.el (repeat): Use last-repeatable-command instead of + real-last-command. Run pre- and post-command hooks for + self-insertion. Update doc-string. + +2007-10-08 Alexandre Julliard <julliard@winehq.org> + + * vc-git.el (vc-git-state): Call git-add --refresh to update the + state of the file. + (vc-git-workfile-unchanged-p): Delegate implementation to vc-git-state. + (vc-git-create-repo): Fix invalid command. + +2007-10-08 Richard Stallman <rms@gnu.org> + + * textmodes/flyspell.el (flyspell-mode): + Catch errors in flyspell-mode-on. + +2007-10-09 Juanma Barranquero <lekktu@gmail.com> + + * term/x-win.el (x-alternatives-map): Remove spurious parenthesis. + +2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * international/encoded-kb.el (encoded-kbd-setup-display): + Use input-decode-map rather than local-key-translation-map. + + * term/rxvt.el (rxvt-alternatives-map): New map. + (terminal-init-rxvt): Use it. + Bind rxvt-function-map in input-decode-map. + + * term/xterm.el (xterm-alternatives-map): New map. + (terminal-init-xterm): Use it. + Bind xterm-function-map in input-decode-map. + + * term/x-win.el (x-alternatives-map): New var. + (x-setup-function-keys): Use it. + + * help-fns.el (describe-variable): Slightly change the layout of + meta-info to separate it better from the docstring. + Standardize insertion of extra empty lines in various circumstances. + + * diff-mode.el (diff-hunk-style): New fun. + (diff-end-of-hunk): Use it. + (diff-context->unified): Use the new `apply' undo element, + if applicable, so as to save undo-log space. + (diff-fine-change): New face. + (diff-fine-highlight-preproc): New function. + (diff-fine-highlight): New command. + (diff-mode-map, diff-mode-menu): Add diff-fine-highlight. + + * smerge-mode.el (smerge-refine-chopup-region): Add `preproc' argument. + (smerge-refine-highlight-change): Add `props' argument. + (smerge-refine-subst): New function holding most of smerge-refine. + (smerge-refine): Use it. + +2007-10-08 Eric S. Raymond <esr@snark.thyrsus.com> + + * vc.el (vc-default-wash-log): Remove unused code, the + log washers all live in the backends now. + (vc-default-comment-history): Correct for the fact + that wash-log is argumentless in the new API. + +2007-10-08 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-find-foreign-file-name-handler): Check also host. + (tramp-maybe-send-script): Apply `member' but `memq'. + (tramp-advice-file-expand-wildcards): Simplify implementation. + +2007-10-08 Juanma Barranquero <lekktu@gmail.com> + + * follow.el (follow-mode): Don't run hooks twice. Use `when'. + + * mb-depth.el (minibuf-depth-indicator-function): New variable. + (minibuf-depth-setup-minibuffer): Use it. + +2007-10-07 Glenn Morris <rgm@gnu.org> + + * simple.el (bad-packages-alist): Clarify Semantic and CEDET + version numbers. + +2007-10-06 Juri Linkov <juri@jurta.org> + + * textmodes/fill.el (fill-paragraph-or-region): New function. + + * bindings.el (esc-map): Bind M-q to fill-paragraph-or-region + instead of fill-paragraph. + + * tutorial.el (tutorial--default-keys): Replace fill-paragraph + with fill-paragraph-or-region. Suspend command is now the same + `suspend-frame' on window systems and on tty. + + * image.el (image-type): Check if image-types is bound to not fail + on tty. + + * delsel.el (delete-selection-pre-hook): + * emulation/cua-base.el (cua-paste): Check if mouse-region-match + is fbound to not fail on mouseless tty. + +2007-10-06 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (top): Move loading of tramp-util.el and + tramp-vc.el to tramp-compat.el. + (tramp-make-tramp-temp-file): Complete rewrite. Create remote + temporary file if possible, in order to avoid a security hole. + (tramp-do-copy-or-rename-file-out-of-band) + (tramp-maybe-open-connection): Call `tramp-make-tramp-temp-file' + with DONT-CREATE, because the connection is not setup yet. + (tramp-handle-process-file): Rewrite temporary file handling. + (tramp-completion-mode): New defvar. + (tramp-completion-mode-p): Use it. + + * net/tramp-compat.el (top): Load tramp-util.el and tramp-vc.el. + + * net/tramp-fish.el (tramp-fish-handle-process-file): + Rewrite temporary file handling. + +2007-10-06 Eric S. Raymond <esr@snark.thyrsus.com> + + * vc.el: Workfile version -> focus version change. Port various + comments from new VC to reduce the noise in the diff. + Patch in the new vc-create-repo function to go with the + header comment about it already present. + There are no changes to existing logic in this patch. + (vc-revert-buffer1): Rename to vc-revert-buffer-internal. + +2007-10-06 Aaron Hawley <aaronh@garden.org> + + * autoinsert.el (auto-insert-alist): Add a Texinfo entry. + +2007-10-05 Chris Moore <dooglus@gmail.com> + + * server.el (server-kill-new-buffers): Doc fix. + +2007-10-05 John W. Eaton <jwe@octave.org> + + * progmodes/octave-mod.el (octave-abbrev-table): Add "until". + (octave-begin-keywords): Add "do". + (octave-end-keywords): Remove "end". + (octave-reserved-words): Add "end". Remove "all_va_args", + "gplot", and 'gsplot". + (octave-text-functions): Remove "gset", "gshow", "set", and "show". + (octave-variables): Remove "IMAGEPATH", "INFO_FILE", + "INFO_PROGRAM", "LOADPATH", "__error_text__", "automatic_replot", + "default_return_value", "define_all_return_values", + "do_fortran_indexing", "empty_list_elements_ok", + "gnuplot_has_multiplot", "implicit_str_to_num_ok", + "ok_to_lose_imaginary_part", "prefer_column_vectors", + "prefer_zero_one_indexing", "propagate_empty_matrices", + "resize_on_range_error", "treat_neg_dim_as_zero", + "warn_assign_as_truth_value", "warn_comma_in_global_decl", + "warn_divide_by_zero", "warn_function_name_clash", + "warn_missing_semicolon", "whitespace_in_literal_matrix". + Add "DEFAULT_EXEC_PATH", "DEFAULT_LOADPATH", "IMAGE_PATH", + "crash_dumps_octave_core", "sighup_dumps_octave_core", + "sigterm_dumps_octave_core". + (octave-block-match-alist): Remove "end" from block-end keywords. + (octave-mode): Update ftp site address. + +2007-10-05 Dan Nicolaescu <dann@ics.uci.edu> + + * vc.el: Reorder functions, no code changes. + +2007-10-04 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el. + (tramp-do-copy-or-rename-file-directly): Handle tmpfile only in + the cond clauses where needed. + (tramp-handle-write-region): Rearrange code for proper handling of + tmpfile. + + * net/tramp-compat.el (tramp-compat-make-temp-file): New defsubst. + + * net/tramp.el: + * net/tramp-fish.el: + * net/tramp-ftp.el: + * net/tramp-smb.el: Rename `tramp-make-temp-file' to + `tramp-compat-make-temp-file'. + +2007-10-04 Juanma Barranquero <lekktu@gmail.com> + + * image-dired.el (image-dired-image-at-point-p): Fix typo in docstring. + +2007-10-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/copyright.el (copyright-update): Don't update if the file + already uses a more recent copyright version than the "current" one. + +2007-10-03 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * doc-view.el (doc-view-dvi->pdf-sentinel, doc-view-reset-slice) + (doc-view-insert-image): Minor aesthetical docstring changes. + +2007-10-03 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view): Don't ignore pdf and dvi files when + completing filename. + (doc-view-search-internal): Docstring change. + +2007-10-03 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'. + (tramp-file-name-handler-alist): + Add `tramp-handle-insert-file-contents-literally'. Needed for XEmacs. + (tramp-make-temp-file): Use `make-temp-name'. `make-temp-file', + used before, creates the file already, which is not desired. + (tramp-do-copy-or-rename-file-directly): Simplify handling of + temporary file. + (tramp-handle-insert-file-contents): Assign the result in the + short track case. + (tramp-handle-insert-file-contents-literally): New defun. + (tramp-completion-mode-p): Revert change from 2007-09-24. + Checking for `return' etc as last character is not sufficient, for + example in dired-mode when entering <g> (revert-buffer) or + <s> (dired-sort). + + * net/tramp-compat.el (top): Add also compatibility code for loading + appropriate timer package. + (tramp-compat-copy-tree): Check for `subrp' and `symbol-file' in + order to avoid autoloading problems. + + * net/tramp-fish.el: + * net/tramp-smb.el: Move further compatibility code to tramp-compat.el. + + * net/tramp-ftp.el (tramp-ftp-file-name-handler): Handle the case + where the second parameter of `copy-file' or `rename-file' is a + remote file but not via ftp. + +2007-10-02 Richard Stallman <rms@gnu.org> + + * frame.el (cursor-in-non-selected-windows): Doc fix. + +2007-10-01 Thien-Thi Nguyen <ttn@gnuvola.org> + + * play/zone.el (zone): Let-bind show-trailing-whitespace to nil. + Suggested by Chris Moore <christopher.ian.moore@gmail.com>. + +2007-10-01 Jay Belanger <jay.p.belanger@gmail.com> + + * calc/calc-math.el (math-largest-emacs-expt): Handle the cases + when `expt' doesn't give range errors. + +2007-10-01 Markus Triska <markus.triska@gmx.at> + + * calc/calc-math.el (math-smallest-emacs-expt): + Make the computation more robust. + +2007-09-30 David Kastrup <dak@gnu.org> + + * startup.el (argv): Alias for `command-line-args-left' to use as + `(pop argv)' inside of --eval command sequences. Allows for + passing shell commands into Emacs verbatim without need for Lisp + quoting. + + * autorevert.el (auto-revert-handler): In `auto-revert-tail-mode', + check only for changed size. + (auto-revert-tail-handler): Get size from caller. If the file has + shrunk, tail the whole file again (the file presumably has been + rewritten). + + * woman.el (woman-topic-all-completions, woman-mini-help): + Fix fallout from 2007-09-07 introduction of `dolist' when the list + actually was being manipulated in the loop. + (woman-Cyg-to-Win, woman-pre-process-region) + (woman-horizontal-escapes, woman-if-body, woman-unescape) + (woman-strings, woman-special-characters, woman1-hc) + (woman-change-fonts, woman-find-next-control-line): + Use `match-beginning' rather than `match-string' when the result is + just used as a flag. + +2007-09-30 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-compat.el: New file. + + * net/tramp.el: + * net/tramp-fish.el: + * net/tramp-smb.el: + * net/tramp-uu.el: + * net/trampver.el: Move compatibility code to tramp-compat.el. + Apply `mapc' instead of `mapcar' when the code needs side effects + only. Move utf-8 coding cookie to the second line. + +2007-09-30 Reiner Steib <Reiner.Steib@gmx.de> + + * term/x-win.el (x-gtk-stock-map): Add Gnus and MH-E icons. + Improve custom type. + (icon-map-list): Make it customizable. Document how to disable + stock icons. + +2007-09-30 Richard Stallman <rms@gnu.org> + + * play/zone.el (zone-hiding-modeline): Use mode-line-format. + +2007-09-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (x-gtk-stock-map): Version is 22.2. + +2007-09-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * t-mouse.el (gpm-mouse-mode): Rename from t-mouse-mode. Rewrite. + (t-mouse-mode): New compatibility alias. + +2007-09-28 Dan Nicolaescu <dann@ics.uci.edu> + + * server.el (server-delete-client): Only delete the terminal if it + is non-nil. + +2007-09-28 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (with-file-property, with-connection-property): + Highlight as keyword. + (tramp-rfn-eshadow-setup-minibuffer) + (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times) + (tramp-set-file-uid-gid, tramp-do-copy-or-rename-file-via-buffer) + (tramp-do-copy-or-rename-file-directly) + (tramp-do-copy-or-rename-file-out-of-band) + (tramp-handle-shell-command, tramp-get-debug-buffer) + (tramp-send-command-and-read, tramp-equal-remote) + (tramp-get-local-gid): Pacify byte-compiler. + (tramp-handle-file-name-directory): Result shall not be expanded. + (tramp-find-foreign-file-name-handler): Rewrite. + (tramp-dissect-file-name): Add optional parameter NODEFAULT. + + * net/tramp-cache.el (tramp-cache-print): Pacify byte-compiler. + + * net/tramp-fish.el (tramp-fish-handle-expand-file-name): + Apply `tramp-completion-mode-p'. + (tramp-fish-handle-set-file-times) + (tramp-fish-handle-executable-find) + (tramp-fish-handle-process-file, tramp-fish-get-file-entries) + (tramp-fish-retrieve-data): Pacify byte-compiler. + + * net/tramp-gw.el (tramp-gw-basic-authentication): + Call `tramp-read-passwd' with first parameter `nil'. + +2007-09-28 Glenn Morris <rgm@gnu.org> + + * mail/supercite.el (sc-attribs-filter-namelist): Use mapc rather + than mapcar. + + * textmodes/tex-mode.el (tex-suscript-height-ratio) + (tex-suscript-height-minimum): New customizable variables. + (tex-suscript-height): New function. + (superscript, subscript): Set height using tex-suscript-height + rather than fixing at 0.8. + (tex-fontify-script, tex-font-script-display): Add :version tag. + +2007-09-27 Juanma Barranquero <lekktu@gmail.com> + + * progmodes/python.el (python-eldoc-function): Doc fix. + +2007-09-27 Glenn Morris <rgm@gnu.org> + + * image.el (image-type-auto-detected-p): Doc fix. Don't detect an + image if it is not in image-type-auto-detectable, or is there with + a nil value. + +2007-09-27 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-maybe-open-connection): Make test for alive + connection more robust. + +2007-09-26 Juanma Barranquero <lekktu@gmail.com> + + * emacs-lisp/eldoc.el (eldoc-function-argstring-format): + Deal with the case that special &keywords are at the beginning or + end of the argument list. Also add some (incomplete) support for + non-standard arglists. + +2007-09-26 Juanma Barranquero <lekktu@gmail.com> + + * emacs-lisp/eldoc.el (eldoc-message-commands-table-size) + (eldoc-message-commands, eldoc-current-idle-delay) + (eldoc-function-argstring-format): Fix typos in docstrings. + +2007-09-26 Jay Belanger <jay.p.belanger@gmail.com> + + * calc/calc-units.el (calc-convert-units) + (calc-convert-temperature): Remove unnecessary colons. + +2007-09-26 Bastien Guerry <bzg@altern.org> + + * org-export-latex.el (org-export-latex-tables-verbatim): New function. + (org-export-latex-remove-from-headlines): Name changed because of typo. + (org-export-latex-quotation-marks-convention): Option removed. + (org-export-latex-make-preamble): Handle the DATE option. + (org-export-latex-cleaned-string): Now the only cleaning function, + synched up with org.el. + (org-export-latex-lists, org-export-latex-parse-list) + (org-export-list-to-latex): New functions. + +2007-09-26 Carsten Dominik <dominik@science.uva.nl> + + * org.el (org-kill-is-subtree-p): Use `org-outline-regexp'. + (org-outline-regexp): New constant. + (org-remember-handler): Throw error when the target file is not in + org-mode. + (org-cleaned-string-for-export): No longer call + `org-export-latex-cleaned-string' with an argument. + (org-get-tags): Returns now a list, not a string. + (org-get-tags-string): New function. + (org-archive-subtree): No need to split return of `org-get-tags'. + (org-set-tags, org-entry-properties): Call `org-get-tags-string' + instead of `org-get-tags'. + (org-agenda-format-date): Rename from `org-agenda-date-format'. + (org-time-from-absolute, org-agenda-format-date-aligned): New funs. + (org-compatible-face): New argument INHERITS. Inherit from this + face if possible. + (org-level-1, org-level-2, org-level-3, org-level-4) + (org-level-5, org-level-6, org-level-7, org-level-8) + (org-special-keyword, org-drawer, org-column, org-warning) + (org-archived, org-todo, org-done, org-headline-done, org-table) + (org-formula, org-code, org-agenda-structure) + (org-scheduled-today, org-scheduled-previously) + (org-upcoming-deadline, org-time-grid): Call `org-compatible-face' + in the new way. + (org-get-heading): New argument NO-TAGS. + (org-fast-tag-selection-include-todo): Made defvar instead of + defcustom, feature is not deprecated. + (org-remember-store-without-prompt): New default value t. + (org-todo-log-states): New variable. + (org-set-regexps-and-options): #+TODO is an alias for SEQ_TODO. + Compute the log states. + (org-goto-map): More commands copied from global map. Also bind + `org-occur'. + (org-goto): Made into a general lookup command. + (org-get-location): Complete rewrite. + (org-goto-exit-command): New variable. + (org-goto-selected-point): New variable. + (org-goto-ret, org-goto-left, org-goto-right, org-goto-quit): + Set the new variables. + (org-paste-subtree): Whitespace insertion strategy revised. + (org-remember-apply-template): Protect v-A from the possibility + that v-a might be nil. + (org-remember-handler): Insertion rules revised. + (org-todo): Respect org-todo-log-states. + (org-up-heading-safe): New function. + (org-entry-get-with-inheritance): Use `org-up-heading-safe'. + +2007-09-26 Dan Nicolaescu <dann@ics.uci.edu> + + * progmodes/cc-cmds.el (c-indent-line-or-region): Only indent the + region if in transient-mark-mode. + +2007-09-26 Juanma Barranquero <lekktu@gmail.com> + + * calc/calc-ext.el (calc-init-extensions, calc-reset): + * calc/calc-help.el (calc-full-help): + * calc/calc-misc.el (another-calc): + * calc/calc-store.el (calc-var-name-map): + * calc/calc-stuff.el (calc-flush-caches): + * calc/calc-units.el (math-build-units-table): + * calc/calc.el (calc-digit-map, calc-dispatch-map, calc-mode) + (calc-quit): + * calendar/icalendar.el (icalendar--format-ical-event) + (icalendar--convert-ical-to-diary): + * emacs-lisp/authors.el (authors): + * emacs-lisp/cust-print.el (custom-print-install) + (custom-print-uninstall): + * emacs-lisp/disass.el (disassemble-1): + * emacs-lisp/easy-mmode.el (easy-mmode-define-syntax): + * emacs-lisp/edebug.el (byte-compile-resolve-functions): + * emacs-lisp/elint.el (elint-current-buffer, elint-check-defun-form) + (elint-check-let-form, elint-check-condition-case-form) + (elint-initialize): + * emacs-lisp/elp.el (elp-results): + * emacs-lisp/generic.el (generic-mode-internal): + * emacs-lisp/re-builder.el (reb-delete-overlays): + * emacs-lisp/regi.el (regi-interpret): + * emacs-lisp/sregex.el (sregex--char-aux): + * emulation/cua-rect.el (cua--deactivate-rectangle) + (cua--highlight-rectangle, cua--rectangle-post-command): + * emulation/viper-keym.el (viper-toggle-key, viper-ESC-key): + * emulation/viper-macs.el (viper-describe-kbd-macros) + (viper-describe-one-macro): + * emulation/viper-util.el (viper-setup-master-buffer): + * emulation/viper.el (set-viper-state-in-major-mode): + * international/mule-diag.el (describe-current-coding-system): + * language/ethio-util.el (ethio-fidel-to-sera-buffer): + * mail/emacsbug.el (report-emacs-bug): + * net/ange-ftp.el (ange-ftp-call-chmod, ange-ftp-parse-bs2000-listing): + * obsolete/hilit19.el (hilit-unhighlight-region) + (hilit-set-mode-patterns): + * play/solitaire.el (solitaire-check, solitaire-solve): + * play/zone.el (zone-pgm-rotate): + * progmodes/ada-mode.el (ada-save-exceptions-to-file): + * progmodes/ada-prj.el (ada-prj-display-page): + * progmodes/delphi.el (delphi-search-directory, delphi-find-unit-file) + (delphi-debug-mode-map, delphi-mode-map, delphi-mode): + * progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-view-exit-fn) + (ebrowse-member-mode, ebrowse-save-tree-as, ebrowse-save-class): + * progmodes/sh-script.el (sh-make-vars-local) + (sh-reset-indent-vars-to-global-values): + * progmodes/sql.el (top): + * progmodes/vhdl-mode.el (vhdl-set-style, vhdl-regress-line): + * progmodes/xscheme.el (top): + * textmodes/artist.el (artist-mt-get-symbol-from-keyword-sub) + (artist-go-retrieve-from-symbol-sub, artist-go-get-symbol-shift-sub) + (artist-fc-retrieve-from-symbol-sub, artist-vaporize-line) + (artist-vaporize-lines, artist-ellipse-compute-fill-info) + (artist-submit-bug-report): + * textmodes/flyspell.el (flyspell-delay-commands) + (flyspell-deplacement-commands): + * textmodes/table.el (table--generate-source-epilogue, table-insert) + (table--generate-source-cells-in-a-row, table--make-cell-map) + (*table--cell-describe-bindings): Use `mapc' rather than `mapcar'. + +2007-09-25 Juanma Barranquero <lekktu@gmail.com> + + * allout.el (produce-allout-mode-map, allout-process-exposed): + * ansi-color.el (ansi-color-make-color-map): + * autoinsert.el (auto-insert): + * bookmark.el (bookmark-bmenu-list, bookmark-show-all-annotations): + * dired-aux.el (dired-create-files): + * dired.el (dired-restore-desktop-buffer): + * ediff-diff.el (ediff-setup-fine-diff-regions): + * ediff-mult.el (ediff-intersect-directories) + (ediff-redraw-directory-group-buffer, ediff-dir-diff-copy-file) + (ediff-redraw-registry-buffer): + * ediff-ptch.el (ediff-fixup-patch-map): + * ediff-util.el (ediff-toggle-multiframe, ediff-toggle-use-toolbar) + (ediff-really-quit, ediff-clear-diff-vector): + * emerge.el (emerge-really-quit): + * ffap.el (ffap-replace-file-component): + * filecache.el (file-cache-add-directory) + (file-cache-add-directory-recursively) + (file-cache-add-from-file-cache-buffer, file-cache-delete-file-regexp) + (file-cache-delete-directory, file-cache-files-matching-internal) + (file-cache-display): + * files.el (cd): + * find-lisp.el (find-lisp-insert-directory): + * finder.el (finder-compile-keywords): + * help.el (view-emacs-news): + * hi-lock.el (hi-lock-write-interactive-patterns): + * ido.el (ido-to-end, ido-set-matches-1): + * image-dired.el (image-dired-display-thumbs, image-dired-remove-tag) + (image-dired-mark-tagged-files): + * jka-cmpr-hook.el (jka-compr-get-compression-info): + * printing.el (pr-eval-local-alist, pr-eval-setting-alist): + * ps-print.el (ps-background, ps-begin-file) + (ps-build-reference-face-lists): + * simple.el (clone-buffer): + * startup.el (command-line): + * tempo.el (tempo-insert-template, tempo-is-user-element) + (tempo-forward-mark, tempo-backward-mark): + * woman.el (woman-dired-define-keys): Use `mapc' rather than `mapcar'. + +2007-09-25 Glenn Morris <rgm@gnu.org> + + * textmodes/tex-mode.el (tex-font-script-display): Doc fix. + + * view.el (view-search-no-match-lines): Add a doc string. + Rewrite to simplify and work better. + +2007-09-24 Dan Nicolaescu <dann@ics.uci.edu> + + * progmodes/cc-mode.el (c-mode-base-map): + Use c-indent-line-or-region instead of c-indent-line. + + * indent.el (indent-for-tab-command): First check if the region is + active. + +2007-09-24 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * whitespace.el (whitespace-tickle-timer): Don't install the timer if + whitespace-rescan-timer-time is 0. + +2007-09-24 Karl Berry <karl@gnu.org> + + * international/mule.el (coding-system-base): Fix doc string grammar. + +2007-09-24 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-completion-mode-p): Rename from + `tramp-completion-mode'. Revert logic, check `return', `newline' + and such alike. Packages like Icicles tend to use other completion + characters but `tab' and `space' only. + +2007-09-24 Adam Hupp <adam@hupp.org> + + * progmodes/python.el (run-python): Import emacs module without + waiting; prevents lockup on error. + +2007-09-23 Richard Stallman <rms@gnu.org> + + * mail/sendmail.el (mail-bury): Delete the frame + if this frame looks like it was made for this message. + + * completion.el (completion-separator-self-insert-command) + (completion-separator-self-insert-autofilling): + If `self-insert-command' has been remapped, use the substitute. + + * simple.el (copy-region-as-kill): Doc fix. + + * textmodes/org.el (org-confirm-shell-link-function) + (org-confirm-elisp-link-function): Doc fixes. + +2007-09-23 Glenn Morris <rgm@gnu.org> + + * ses.el (ses-calculate-cell): Don't evaluate unsafe formulae. + +2007-09-23 Dan Nicolaescu <dann@ics.uci.edu> + + * term/w32-win.el (w32-drag-n-drop): Use mapc instead of mapcar. + + * term/tvi970.el (terminal-init-tvi970): Likewise. + + * term/sun-mouse.el (print-mouse-format): Likewise. + + * term/sun.el (scroll-down-in-place, scroll-up-in-place): + Use forward-line instead of previous-line and next-line. + +2007-09-22 Juri Linkov <juri@jurta.org> + + * textmodes/org.el (org-confirm-shell-link-function): Doc fix. + + * tutorial.el (tutorial--default-keys): Update standard bindings: + rename `iconify-or-deiconify-frame' to `suspend-frame', + and `save-buffers-kill-emacs' to `save-buffers-kill-terminal'. + +2007-09-22 Juri Linkov <juri@jurta.org> + + * startup.el (fancy-startup-text, fancy-about-text, fancy-startup-tail): + Add help-echo to external links and to links without description. + (fancy-splash-insert): Use help-echo from the 3rd element of the + link specification list, or "Follow this link" if it's nil. Doc fix. + +2007-09-22 Juri Linkov <juri@jurta.org> + + * startup.el (command-line): Rename `inhibit-startup-message' to + `inhibit-startup-screen'. + (fancy-about-text): Use shorter label for "Ordering Manuals". + (fancy-startup-tail): Add optional arg `concise'. When `concise' + is nil, display a line with "To start..." and 3 links to useful + tasks. Display the "Dismiss" button and "Don't show this message + again" only when concise is non-nil. + (fancy-startup-screen): Call `fancy-startup-tail' with optional + arg `concise'. If CONCISE is non-nil, display a concise version + of the splash screen in another window. Otherwise, switch to the + startup buffer in the same window. + (startup-echo-area-message): Change displayed binding from + C-h C-p (describe-project) to C-h C-a (about-emacs), and change + text "about the GNU system and GNU/Linux" to "about GNU Emacs and + the GNU system". + (display-startup-screen): Fix buffer name from "*About GNU Emacs*" + to "*GNU Emacs*". + (display-about-screen): Don't check the existence of the buffer + "*About GNU Emacs*". + (display-splash-screen): Make alias to `display-startup-screen'. + (command-line-1): Rename `inhibit-startup-message' to + `inhibit-startup-screen'. Inhibit startup screen when Emacs is + started with command line options "-f", "-funcall", "-e", "-eval", + "-execute", "-insert", "-find-file", "-file", "-visit". + Inhibit startup screen when Emacs is started with a file name only + on tty (i.e. don't inhibit it when started with a file name like + "emacs FILE..." on a window system). + (command-line-1): Simplify logic of displaying the startup screen: + if file-count > 0, then display the concise version in another + window, otherwise display full version in the same window. + + * help.el (help-map): Bind C-h C-a to about-emacs. + (help-for-help-internal): Add C-a description to C-h help text. + +2007-09-22 Dan Nicolaescu <dann@ics.uci.edu> + + * emacs-lisp/checkdoc.el (checkdoc-force-docstrings-flag) + (checkdoc-permit-comma-termination-flag): Autoload the + safe-local-variable setting. + + * bookmark.el (bookmark-xemacsp): Remove. + (bookmark-make): Don't use bookmark-xemacsp, + use (featurep 'xemacs) instead. + + * speedbar.el (speedbar-frame-mode) + (speedbar-frame-reposition-smartly) + (speedbar-set-mode-line-format, speedbar-reconfigure-keymaps) + (speedbar-check-vc): Remove use of non-existent variable + dframe-xemacsp, use (featurep 'xemacs) instead. + + * indent.el (indent-for-tab-command): Indent the region if + transient-mark-mode and the region is active. + +2007-09-21 Francesco Potort,Al(B <pot@gnu.org> + + * progmodes/octave-inf.el (inferior-octave-mode): Use add-hook to + add inferior-octave-directory-tracker to the buffer-local value + of comint-input-filter-functions. + +2007-09-21 Dan Nicolaescu <dann@ics.uci.edu> + + * xt-mouse.el (xterm-mouse-mode): Re-enable suspend-tty-functions. + +2007-09-21 Juanma Barranquero <lekktu@gmail.com> + + * frame.el (suspend-frame): Call `iconify-or-deiconify-frame' also + on w32 frames. + +2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * startup.el (normal-top-level): Remove DISPLAY from + process-environment to let it be computed dynamically in callproc.c. + + * frame.el (frame-initialize, make-frame): + * faces.el (tty-set-up-initial-frame-faces): + * env.el (setenv): Don't set display-environment-variable. + + * server.el (server-getenv-from): Remove. Use getenv-internal instead. + (server-create-tty-frame): Don't set unused `tty' property. + Set `display' instead of display-environment-variable. + (server-create-window-system-frame): No display-environment-variable. + +2007-09-21 Michael Albinus <michael.albinus@gmx.de> + + * rfn-eshadow.el (rfn-eshadow-setup-minibuffer-hook) + (rfn-eshadow-update-overlay-hook): New defvars. + (rfn-eshadow-setup-minibuffer, rfn-eshadow-update-overlay): + Run the hooks. + + * net/tramp.el (tramp-rfn-eshadow-overlay): New defvar. + (tramp-rfn-eshadow-setup-minibuffer) + (tramp-rfn-eshadow-update-overlay): New defuns. Hook into + rfn-eshadow.el. + + * net/tramp-smb.el (tramp-smb-errors): Add error message for call + timeout. + +2007-09-21 Glenn Morris <rgm@gnu.org> + + * obsolete/sun-fns.el (emacs-quit-menu): Remove emacstool-related code. + * term/sun-mouse.el (suspend-emacstool): Remove. + * term/sun.el: Remove emacstool-related code. + + * emacs-lisp/bytecomp.el (byte-compile-warnings) + (byte-compile-warnings-safe-p): Add `mapcar'. + (byte-compile-warning-types): Add mapcar and make-local. + (byte-compile-normal-call): Add option to suppress mapcar warning. + (top-level): Use mapc rather than mapcar in eval-when-compile. + + * textmodes/tex-mode.el (tex-validate-region): Handle escaped parens. + (tex-next-unmatched-eparen, tex-last-unended-eparen): New functions. + (latex-forward-sexp-1, latex-backward-sexp-1): Doc fix. + Handle escaped parens. + (latex-forward-sexp): Doc fix. + + * eshell/esh-mode.el (eshell-output-filter-functions): Add + eshell-postoutput-scroll-to-bottom. + + * loadup.el: Remove termdev. + + * progmodes/fortran.el (fortran-mode-abbrev-table, fortran-line-length): + * progmodes/f90.el (f90-mode-abbrev-table): Use mapc rather than mapcar. + +2007-09-21 Markus Triska <markus.triska@gmx.at> + + * emacs-lisp/bytecomp.el (byte-compile-normal-call): Warn when + `mapcar' is called for effect. + +2007-09-21 Kevin Ryde <user42@zip.com.au> + + * international/mule.el (sgml-html-meta-auto-coding-function): + Bind `case-fold-search' to t. + +2007-09-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * termdev.el: Remove. + + * frame.el (get-device-terminal): New function. Moved from termdev.el. + (frames-on-display-list): Use it. + + * bindings.el: Bind C-z to suspend-frame instead of suspend-emacs. + + * termdev.el (terminal-id): Ask terminal-live-p before giving up. + +2007-09-20 Richard Stallman <rms@gnu.org> + + * newcomment.el (comment-add): If EXTRA, double `comment-add' value. + +2007-09-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * add-log.el (add-log-current-defun): Fix thinko w.r.t derived-mode-p. + +2007-09-20 Glenn Morris <rgm@gnu.org> + + * textmodes/tex-mode.el (tex-validate-buffer): Use paragraph + motion functions, rather than hard-coding "\n\n". + (tex-validate-region): Check for eobp, to speed up. + (tex-next-unmatched-end): Doc fix. + +2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> + + * files.el (auto-mode-alist): Use archive-mode for .rar files. + + * international/mule.el (auto-coding-alist): Rar archives are binary. + + * arc-mode.el: Add basic support for Rar. + (archive-find-type): Recognize Rar's signature. + (archive-desummarize): New fun. + (archive-summarize): Use it to restore the buffer's data in case + someone wants to switch to some other major mode. + (archive-resummarize): Use it as well. + (archive-rar-summarize, archive-rar-extract): New functions. + + * filesets.el: Remove spurious * in docstrings. + (filesets-running-xemacs): Remove. Use (featurep 'xemacs) instead. + (filesets-conditional-sort): Remove unused arg `simply-do-it'. + (filesets-ingroup-collect): Remove unused arg `depth'. + (filesets-update): Remove unused arg `version'. + + * finder.el (finder-compile-keywords): Fix up comment style. + (finder-mouse-face-on-line): previous-line -> forward-line. + + * recentf.el: Remove spurious * in docstrings. + (recentf-save-list): Fix up comment style. + + * progmodes/octave-mod.el: Remove spurious * in docstrings. + (octave-mode-map): Move init into declaration and remove \t binding. + (octave-mode-startup-message): Remove unused var. + (octave-scan-blocks): Remove unused arg `from'. + (octave-forward-block, octave-down-block, octave-up-block): + Update callers. + + * progmodes/meta-mode.el (meta-mode-syntax-table): Move init into decl. + (meta-mode-map): Likewise and remove \t binding. + + * net/snmp-mode.el: Remove spurious * in docstrings. + (snmp-rfc1155-types, snmp-rfc1213-types, snmp-rfc1902-types) + (snmp-rfc1903-types, snmp-rfc1155-access, snmp-rfc1902-access) + (snmp-rfc1212-status, snmp-rfc1902-status): Remove list wrappers now + that completion accepts lists of strings. + (snmp-mode-syntax-table): Move initialization into declaration. + (snmp-mode-map): Likewise and remove \t binding. + (snmp-common-mode): Set tab-always-indent according to snmp-t-a-i. + (snmp-indent-line, snmp-mode-imenu-create-index): Remove unused var. + (snmp-indent-command): Remove. + + * emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Use the default TAB + binding, so tab-always-indent works right. + +2007-09-19 Johannes Weiner <hannes@saeurebad.de> + + * net/browse-url.el (browse-url-elinks-new-window): New function. + (browse-url-elinks): Use browse-url-elinks-new-window. + Accept optional second argument `new-window'. Fix typo in doc-string. + (browse-url-elinks-sentinel): Use browse-url-elinks-new-window. + Improve error message. + +2007-09-19 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * net/browse-url.el (browse-url-url-encode-chars): Use the right + parameter name in the function body. + Reported by Johannes Weiner. + +2007-09-19 Glenn Morris <rgm@gnu.org> + + * net/socks.el (socks-open-network-stream): Signal an explicit + error if the port associated with a service string can't be found. + + * textmodes/tex-mode.el (tex-terminate-paragraph): + Use backward-paragraph. + +2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> + + * server.el (server-running-p): New function. + +2007-09-18 Jason Rumney <jasonr@gnu.org> + + * term/w32-win.el (w32-focus-frame): Make obsolete alias for + x-focus-frame. + + * frame.el (select-frame-set-input-focus, select-frame-by-name): + Use x-focus-frame for w32. + +2007-09-17 David Kastrup <dak@gnu.org> + + * textmodes/tex-mode.el (tex-verbatim-environments): + Eliminate CL dependency. + +2007-09-17 Richard Stallman <rms@gnu.org> + + * newcomment.el (comment-add): New arg EXTRA. + (comment-region-default): Pass EXTRA if not indenting lines. + +2007-09-17 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * net/browse-url.el (browse-url-url-encode-chars): New function. + URL-encode some chars in a string. + (browse-url-encode-url): Rewrite using the previous function. + (browse-url-file-url): Use `browse-url-url-encode-chars'. + (browse-url-elinks-sentinel): Fix typo. + (browse-url-new-window-flag): Doc change. + +2007-09-17 Glenn Morris <rgm@gnu.org> + + * textmodes/tex-mode.el (tex-compilation-parse-errors): Prefer the + filename from `--file-line-error', if it is available. + +2007-09-17 Joe Wells <jbw@macs.hw.ac.uk> (tiny change) + + * textmodes/tex-mode.el (tex-compilation-parse-errors): Also match + TeX `--file-line-error' format. + +2007-09-17 Dan Nicolaescu <dann@ics.uci.edu> + + * xt-mouse.el: Delete add-hook calls that were moved to + xterm-mouse-mode. + (xterm-mouse-mode): Disable resume-tty-functions, explain why it + does not work. + +2007-09-17 Richard Stallman <rms@gnu.org> + + * cus-face.el (custom-theme-set-faces): Undo previous change. + + * faces.el (face-spec-set): When FRAME nil, look up each frame in SPEC. + +2007-09-17 Glenn Morris <rgm@gnu.org> + + * textmodes/tex-mode.el (tex-region): Simplify previous change, + handling the case where the region is not in `tex-main-file'. + (tex-region-1): Delete. + (tex-region-header): New function, doing the header part of the + old tex-region-1. + +2007-09-16 Stefan Monnier <monnier@iro.umontreal.ca> + + * simple.el (newline): Simplify use of prefix-numeric-value. + (line-move-partial): Remove unused var `ppos'. + (line-move-1): Replace 9999 with most-positive-fixnum. + (move-end-of-line): Use more efficient single-property search. + (move-beginning-of-line): Remove unused var `start'. + (blink-matching-open): Restructure in a more functional style. + +2007-09-16 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * calendar/holidays.el (list-holidays): Remove the cyclic alias. + +2007-09-16 Stefan Monnier <monnier@iro.umontreal.ca> + + * server.el (server-clients): Only keep procs, no properties any more. + (server-client): Remove. + (server-client-get, server-client-set): Remove, replace all callers by + process-get and process-put resp. + (server-clients-with, server-add-client, server-delete-client) + (server-create-tty-frame, server-create-window-system-frame) + (server-process-filter, server-execute, server-visit-files) + (server-buffer-done, server-kill-buffer-query-function) + (server-kill-emacs-query-function, server-switch-buffer) + (server-save-buffers-kill-terminal): Update accordingly. + + * server.el (server-with-environment): Simplify. + (server-select-display, server-unselect-display): Re-add functions that + seem to have been lost in the multi-tty merge. + (server-eval-and-print, server-create-tty-frame) + (server-create-window-system-frame, server-goto-toplevel) + (server-execute, server-return-error): New functions extracted from + server-process-filter. + (server-execute-continuation): New functions. + (server-process-filter): Restructure so that all arguments are analysed + first and then acted upon in a subsequent stage. This way + server-goto-toplevel can be executed later, when we know if + it's necessary. + Remove the "-version" and "-version-good" support. + +2007-09-16 Drew Adams <drew.adams@oracle.com> + + * cus-edit (custom-face-edit-activate): Doc fix. + +2007-09-16 Glenn Morris <rgm@gnu.org> + + * calendar/cal-menu.el, calendar/calendar.el, calendar/diary-lib.el: + Following cal-bahai renaming, update all instances of + list-bahai-diary-entries to diary-bahai-list-entries, + mark-bahai-diary-entries to diary-bahai-mark-entries, + calendar-goto-bahai-date to calendar-bahai-goto-date, + insert-bahai-diary-entry to diary-bahai-insert-entry, + insert-monthly-bahai-diary-entry to diary-bahai-insert-monthly-entry, + insert-yearly-bahai-diary-entry to diary-bahai-insert-yearly-entry, and + calendar-print-bahai-date to calendar-bahai-print-date. + + * textmodes/tex-mode.el (tex-region): Handle the case where the + region is not in `tex-main-file'. Move the old code that applies + to both cases... + (tex-region-1): ...to this new function. + +2007-09-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc.el (vc-process-sentinel): New function. + (vc-exec-after): Use it instead of using ugly hackish analysis and + construction of Elisp code. + (vc-sentinel-movepoint): New dynamically scoped var. + (vc-print-log, vc-annotate): Set it to move the user's point. + + * vc-cvs.el (vc-cvs-annotate-time): Use inhibit-read-only and + inhibit-modification-hooks. + + * calendar/cal-bahai.el (mark-bahai-diary-entries): Fix up typo. + (calendar-bahai-print-date, calendar-bahai-goto-date) + (diary-bahai-list-entries, diary-bahai-insert-entry): + New names to clean up the namespace a bit more. + (calendar-goto-bahai-date, calendar-print-bahai-date): Compat aliases. + +2007-09-15 Glenn Morris <rgm@gnu.org> + + * calendar/holidays.el (holiday-list): Rename it back to + `list-holidays', but leave `holiday-list' as an alias. + + * textmodes/bibtex-style.el (bibtex-style-indent-basic): Specify a + custom group. + + * textmodes/css-mode.el (css): New custom group. + (css-electrick-keys, css-selector, css-property) + (css-indent-offset): Specify custom group. + +2007-09-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * pcvs.el (cvs-tags-list, cvs-retrieve-revision, cvs-find-modif) + (cvs-execute-single-file): Use process-file. + (cvs-run-process): Use start-file-process. + +2007-09-15 Dan Nicolaescu <dann@ics.uci.edu> + + * xt-mouse.el (xterm-mouse-mode): Add hooks here not at the top + level. Remove the hooks when turning off the mode. + + * term/xterm.el: Require xt-mouse at compile time. + (terminal-init-xterm): Turn on xterm mouse tracking for this + terminal if xterm-mouse-mode is enabled. + +2007-09-14 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (xterm-function-map): Replace bindings that were + deleted by the merge. + +2007-09-14 Ulf Jasper <ulf.jasper@web.de> + + * play/bubbles.el (bubbles-version): Bump value to "0.5". + (bubbles-mode-map): Move define-key statements here. + (bubbles-game-theme-menu): Ditto. + (bubbles-graphics-theme-menu): Ditto. + (bubbles-menu): Ditto. + (bubbles-mode): Initialize buffer-undo-list, redisplay. + (bubbles--initialize): Reset buffer-undo-list, redisplay. + (bubbles-plop): Set buffer-undo-list, redisplay. + (bubbles-undo): Reset buffer-undo-list, redisplay. + (bubbles--show-images): Take care of missing text properties. + +2007-09-14 Glenn Morris <rgm@gnu.org> + + * startup.el (fancy-startup-text, fancy-about-text): Fix face + quoting. + + * calendar/cal-hebrew.el, calendar/cal-menu.el + * calendar/calendar.el, calendar/diary-lib.el + * calendar/holidays.el: Rename all instances of + list-calendar-holidays callers to calendar-list-holidays, + list-holidays to holiday-list, check-calendar-holidays to + calendar-check-holidays, mark-calendar-holidays to + calendar-mark-holidays, and filter-visible-calendar-holidays to + holiday-filter-visible-calendar. + +2007-09-14 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (xterm-function-map): Add C-M- bindings. + +2007-09-13 Sascha Wilde <wilde@sha-bang.de> (tiny change) + + * play/bubbles.el (bubbles--initialize-images): Fix bug: + Use transparent background for empty cells in graphics mode. + +2007-09-13 Jari Aalto <jari.aalto@cante.net> + + * man.el (Man-default-man-entry): At end of line, continue looking + to the next line for possible end of hyphenated command. + +2007-09-13 Chris Moore <dooglus@gmail.com> + + * shell.el (shell-resync-dirs): Don't move the cursor relative to + the command being edited. + +2007-09-12 Jim Meyering <jim@meyering.net> (tiny change) + + * emacs-lisp/copyright.el (copyright-names-regexp): Doc fix: typo. + +2007-09-12 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (xterm-function-map): Add bindings for M-S- and + C-M-S- keys. + + * term/rxvt.el (rxvt-function-map): Initialize in the declaration. + +2007-09-12 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * net/browse-url.el (browse-url-encode-url): Fix an infinite loop. + New argument `filename-p' to use one set of confusing chars or another. + (browse-url-file-url): Use the argument. + Suggested by Johannes Weiner. + +2007-09-12 Romain Francoise <romain@orebokech.com> + + * cus-start.el (all): Revert 2007-09-08 change. + +2007-09-12 Aaron Hawley <aaronh@garden.org> + + * jka-cmpr-hook.el (jka-compr-compression-info-list): Use gzip to + extract .Z files, since it is more common than uncompress. + +2007-09-12 Glenn Morris <rgm@gnu.org> + + * textmodes/org-publish.el (org-publish-org-to-html): Remove + duplicate function definition. + +2007-09-10 Chris Moore <dooglus@gmail.com> + + * diff-mode.el (diff-sanity-check-hunk): + Also accept single-line hunks. + +2007-09-10 Chong Yidong <cyd@stupidchicken.com> + + * startup.el (startup-screen-inhibit-startup-screen) + (pure-space-overflow-message): New vars. + (fancy-splash-insert): Allow functions for face and link specs. + (fancy-splash-head): Remove unused arg. Move splash text... + (fancy-startup-text, fancy-about-text): ...here. + (fancy-startup-tail): Rename from fancy-splash-tail. + (fancy-startup-screen, fancy-about-screen): Split off from + fancy-splash-screens. + (display-startup-screen): New function. + (display-about-screen): Rename from display-splash-screen. + (command-line-1): Use concise startup screen if necessary. + +2007-09-10 Thien-Thi Nguyen <ttn@gnuvola.org> + + * net/browse-url.el (browse-url-encode-url): Use copy-sequence. + Reported by Jan Dj,Ad(Brv <jan.h.d@swipnet.se>. + +2007-09-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/python.el: Merge changes from Dave Love's v2007-Sep-10. + (python-font-lock-keywords): Update to the 2.5 version of the language. + (python-quote-syntax): Let-bind font-lock-syntactic-keywords to nil. + (python-backspace): Only behave funny in code. + (python-compilation-regexp-alist): Add PDB stack trace regexp. + (inferior-python-mode): Add PDB prompt regexp. + (python-fill-paragraph): Refine the fenced-string regexp. + (python-find-imports): Handle imports spanning several lines. + (python-mode): Add `class' to hideshow support. + +2007-09-10 Dave Love <fx@gnu.org> + + * outline.el (outline-4, outline-5, outline-7): + Move font-lock-builtin-face down from 4 to 7 to better keep the + progression of color brightness, and to better match Org-mode's faces. + +2007-09-10 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * progmodes/meta-mode.el (meta-font-lock-keywords) + (font-lock-match-meta-declaration-item-and-skip-to-next) + (meta-comment-indent, meta-indent-previous-line) + (meta-indent-unfinished-line, meta-beginning-of-defun) + (meta-end-of-defun, meta-common-initialization): Handle \f. + (meta-indent-unfinished-line): Do not handle a `%' in a string as + a comment-start. + + * files.el (file-modes-char-to-who, file-modes-char-to-right) + (file-modes-rights-to-number): Auxiliary functions for symbolic to + numeric notation of file modes. + (file-modes-symbolic-to-number): New. Convert symbolic modes to its + numeric value. + (read-file-modes): New. Read either an octal value of a file mode or a + symbolic value, and return its numeric value. + + * dired-aux.el (dired-do-chmod): Change to use the built-in + `set-file-modes' and the previous symbolic mode parsing functions. + +2007-09-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/texinfo.el: Remove spurious * in docstrings. + (texinfo-mode-syntax-table, texinfo-mode-map): + Initialize in the declaration. + + * tmm.el: Remove spurious * in docstrings. + (tmm-prompt): Use with-current-buffer. + + * vcursor.el: Remove spurious * in docstrings. + (vcursor-map): Initialize in the declaration. + (vcursor-use-vcursor-map): Use define-minor-mode. + (vcursor-toggle-vcursor-map): Keep as an obsolete alias. + + * wid-browse.el (widget-browse-mode-map, widget-minor-mode-map): + Initialize in the declaration. + (widget-minor-mode): Use define-minor-mode. + + * woman.el (woman-mode-map, woman-syntax-table): + Initialize in the declaration. + +2007-09-09 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el: New file. + +2007-09-09 Juri Linkov <juri@jurta.org> + + * Makefile.in (update-authors): Add etc/ to AUTHORS. + + * makefile.w32-in (update-authors): Add etc/ to AUTHORS. + + * startup.el (initial-buffer-choice): Rename choice "Splash screen" + to "Startup screen". Fix docstring. + (inhibit-startup-screen): Rename from `inhibit-splash-screen'. + (inhibit-splash-screen): Make alias to `inhibit-startup-screen'. + (inhibit-startup-message): Change alias to `inhibit-startup-screen'. + (initial-scratch-message): Fix docstring. + (fancy-startup-text): Move link to Emacs Manual below Emacs Guided + Tour (which is a kind of tutorial and will be next to Emacs Tutorial). + Add link to "Customize Startup" and set interval between links to + 5 spaces. + (fancy-about-text): Add links "Authors" and "Contributing". + (fancy-splash-head): Add text "Welcome to " on the startup screen, + and "This is " on the about screen. Add link to + "http://www.gnu.org/software/emacs/" for "GNU Emacs". + For the about screen move emacs version to the header from + `fancy-splash-tail' (as it's done already for normal about screen). + (fancy-splash-tail): Insert emacs version only for startup screen. + (normal-splash-screen): Remove duplicate empty lines. + (normal-about-screen): Add links "Authors" and "Contributing". + + * menu-bar.el (menu-bar-help-menu): + Move "About Emacs" and "About GNU" to the end of the Help menu. + Move "Emacs Psychotherapist" after "Send Bug Report...". + Move "External Packages" after "Find Emacs Packages". + +2007-09-09 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (top): Remove declarations of `tramp-gw-*' symbols, + they are useless with the byte compiler. + (tramp-make-temp-file, tramp-make-tramp-temp-file): Move up. + (tramp-do-copy-or-rename-file-directly): Rearrange let-bindings. + (tramp-compute-multi-hops): Mask `tramp-gw-*' symbols. + (tramp-file-name-real-host, tramp-file-name-port) + (tramp-find-method, tramp-find-user, tramp-find-host): Make them + defuns. + + * net/tramp-cache.el (top): Improve error message when + `tramp-persistency-file-name' is corrupted. + +2007-09-09 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org.el (org-re): Also replace the :alpha: class. + (org-todo-tag-alist): Variable removed. + (org-todo-key-alist, org-todo-key-trigger) New variables. + (org-use-fast-todo-selection): New option. + (org-log-done): Docstring fixed. + (org-deadline-warning-days): New default value 14. + (org-edit-timestamp-down-means-later) New option. + (org-tag-alist): Docstring fixed. + (org-fast-tag-selection-include-todo): New option. + (org-export-language-setup): New languages added. + (org-set-regexps-and-options): Compute the new variables. + (org-paste-subtree): Cleaning up. + (org-remember-apply-template): New escape %A. + (org-todo): Call fast TODO selection. + (org-fast-todo-selection): New function. + (org-add-log-note): Allow prefix for abort exit. + (org-at-property-p, org-entry-properties) + (org-columns-get-autowidth-alist): Use :alpha: class. + (org-get-wdays): New function. + (org-agenda-remove-date): New variable. + (org-agenda-get-deadlines): Use `org-get-wdays'. + (org-agenda-get-deadlines): Reverse ee before returning. + (org-format-agenda-item): New argument REMOVE-RE. + (org-agenda-convert-date): Baha'i calendar added. + (org-infile-export-plist): Also find DATE line. + (org-get-min-level): New function. + (org-export-as-html, org-export-as-ascii): Use the date format. + (org-shiftup, org-shiftdown): Use. + `org-edit-timestamp-down-means-later'. + (org-assign-fast-keys): New function. + +2007-09-08 Fredrik Axelsson <f.axelsson@gmail.com> + + * cus-start.el (all): Add prefer-window-split-horizontally from + window.c. + +2007-09-08 Eli Zaretskii <eliz@gnu.org> + + * net/browse-url.el (browse-url-galeon): Fix last change. + (top-level): Require cl when compiling. + +2007-09-08 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org-export-latex.el: arch-tag restored. + + * textmodes/org-publish.el: arch-tag restored. + +2007-09-08 Masatake YAMATO <jet@gyve.org> + + * progmodes/which-func.el (which-func-modes): Add diff-mode. + + * progmodes/cc-langs.el: Support new keywords added to + objective-c frontend of gcc. + (c-simple-stmt-kwds): Add @throw. + (c-block-stmt-2-kwds): Add @synchronized. + (c-block-stmt-1-kwds): Add @finally and @try. + +2007-09-07 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org.el (org-edit-timestamp-down-means-later): New option. + (org-agenda-after-show-hook): New variable. + (org-columns-compile-format) + (org-columns-get-autowidth-alist, org-buffer-property-keys) + (org-entry-properties, org-at-property-p): Allow [:alnum:] in + property names. + (org-get-wdays): New function. + +2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca> + + * simple.el (normal-erase-is-backspace-setup-frame): Massage. + + * term/xterm.el (xterm-function-map): Initialize in the declaration. + + * vc-arch.el (vc-arch-checkin): Fix typo. + +2007-09-07 Johan Bockg,Ae(Brd <bojohan@gnu.org> + + * cus-face.el (custom-theme-set-faces): Set face attributes + locally for each frame. + +2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/fortran.el (fortran-mode): Set font-lock-syntactic-keywords + via font-lock-defaults. + + * emacs-lisp/bytecomp.el (byte-compile-log-file): Check major-mode via + derived-mode-p. + +2007-09-07 Thien-Thi Nguyen <ttn@gnuvola.org> + + * progmodes/autoconf.el (autoconf-definition-regexp): + Handle optional square brackets around definition name. + +2007-09-07 Johannes Weiner <hannes@saeurebad.de> + + * net/browse-url.el (browse-url-browser-function): Add elinks. + (browse-url-elinks-wrapper): New option. + (browse-url-encode-url, browse-url-elinks) + (browse-url-elinks-sentinel): New functions. + (browse-url-file-url, browse-url-netscape, browse-url-mozilla) + (browse-url-firefox, browse-url-galeon, browse-url-epiphany): + Use new function browse-url-encode-url. + +2007-09-07 Glenn Morris <rgm@gnu.org> + + * version.el (emacs-version): Revert 2007-08-29 change: no need to + say if multi-tty is present. + +2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca> + + * cus-start.el (split-window-preferred-function): Add custom info. + + * calendar/holidays.el (holiday-list, calendar-check-holidays) + (calendar-mark-holidays, calendar-list-holidays) + (holiday-filter-visible-calendar): New names to clean up namespace. + (filter-visible-calendar-holidays, list-calendar-holidays) + (mark-calendar-holidays, check-calendar-holidays, list-holidays): + Add compatibility aliases. + (calendar-check-holidays, calendar-mark-holidays) + (calendar-holiday-list, holiday-filter-visible-calendar): Use dolist. + (holiday-sexp): Replace append with list. + (holiday-filter-visible-calendar): Replace append with push. + + * woman.el: Remove spurious * in docstrings. + (woman-mini-help, woman-non-underline-faces, woman0-rename) + (woman-topic-all-completions-merge, woman-file-name-all-completions) + (woman-select-symbol-fonts, woman-expand-directory-path): Use dolist. + (woman-write-directory-cache, woman-display-extended-fonts) + (WoMan-log-begin, WoMan-log-1): Use with-current-buffer. + (woman-really-find-file): Use pop-to-buffer if switch-to-buffer fails. + (woman-mode): Use inhibit-read-only. + (woman-negative-vertical-space): Use dotimes. + (woman2-tagged-paragraph, woman-tab-to-tab-stop): Use insert-char. + +2007-09-06 Romain Francoise <romain@orebokech.com> + + * vc-bzr.el (vc-bzr-admin-lastrev): New defconst. + (vc-bzr-workfile-version): Use it. + +2007-09-06 Sean O'Rourke <sorourke@cs.ucsd.edu> + + * complete.el (PC-do-completion): Don't try to treat + empty string as an abbreviation. + +2007-09-06 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> + + * help-fns.el (describe-variable): Keep doc's text properties. + +2007-09-06 Dan Nicolaescu <dann@ics.uci.edu> + + * vc.el (vc-default-diff-tree): Pass a list to the diff vc command + instead of a file. + +2007-09-06 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/checkdoc.el (checkdoc-minor-mode-string): New. + (checkdoc-minor-mode): Allow user to specify lighter via + checkdoc-minor-mode-string. + +2007-09-05 Richard Stallman <rms@gnu.org> + + * startup.el (fancy-startup-text): Rename from fancy-splash-text. + Several items removed, simplified, or put on one line. + (fancy-about-text): Add substantial contents, part of startup text. + (fancy-splash-head): Make "GNU" or "GNU/Linux" a link. + (normal-splash-screen): Call normal-mouse-startup-screen, + normal-no-mouse-startup-screen, or normal-about-screen. + (normal-mouse-startup-screen): New fn, broken out, shortened. + (normal-no-mouse-startup-screen): New fn, broken out. + (normal-about-screen): New function, contents all new. + +2007-09-05 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * emacs-lisp/rx.el (rx): Fix typo in docstring. + +2007-09-05 Glenn Morris <rgm@gnu.org> + + * cus-edit.el (custom-buffer-create-internal): Check tool-bar-mode + is bound. + +2007-09-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> + + * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note + in doc string. + +2007-09-04 Dan Nicolaescu <dann@ics.uci.edu> + + * server.el (server-start, server-unload-hook): Undo previous change. + + * xt-mouse.el: Undo previous change. + +2007-09-04 Juri Linkov <juri@jurta.org> + + * startup.el (fancy-about-text): New variable. + (fancy-splash-delay, fancy-splash-max-time): Remove user options. + (fancy-current-text, fancy-splash-stop-time) + (fancy-splash-outer-buffer): Remove variables. + (fancy-splash-head, fancy-splash-tail): Add new optional argument + `startup' and use it to conditionally display different texts for + Startup and About screens. Don't display Help commands on the About + screen. + (fancy-splash-screens-1): Remove function and move its content to + `fancy-splash-screens' to the part that dislpays the About screen. + (exit-splash-screen): Don't treat specially exiting from + alternating screens. + (fancy-splash-screens): Rename argument `static' to `startup'. + Fix docstring. Remove code for displaying alternating screens. + Use arg `startup' in calls to `fancy-splash-head', `fancy-splash-tail'. + Remove let-bind for `fancy-splash-outer-buffer' and add let-bind + for `inhibit-read-only'. + (normal-splash-screen): Rename argument `static' to `startup'. + Fix docstring. Use argument `startup' to conditionally display + different texts for Startup and About screens. Don't display Help + commands on the About screen. Remove `unwind-protect' `sit-for' + delay and `kill-buffer' after it. + (display-startup-echo-area-message): Remove call to + `use-fancy-splash-screens-p' because image.el is preloaded and + doesn't display "Loading image... done". + (display-splash-screen): Rename argument `static' to `startup'. + Fix docstring. + +2007-09-04 Dan Nicolaescu <dann@ics.uci.edu> + + * server.el (server-start, server-unload-hook): + suspend-tty-functions has been renamed to suspend-tty-hook. + + * xt-mouse.el: Likewise. resume-tty-functions has been renamed to + resume-tty-hook. + +2007-09-03 Emanuele Giaquinta <e.giaquinta@glauco.it> (tiny change) + + * loadup.el: Fix merge problem, only load "button" once. + +2007-09-03 Glenn Morris <rgm@gnu.org> + + * vc-svn.el (vc-svn-print-log): If there is only one file, use + "Working file:" as the prefix, for the sake of + log-view-current-file. + +2007-09-02 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (xterm-modify-other-keys-terminal-list): New variable. + (xterm-turn-on-modify-other-keys): Only turn on modify-other-keys + if the selected frames is in + xterm-modify-other-keys-terminal-list. + (xterm-turn-off-modify-other-keys): Add an optional frame + parameter. Only turn off modify-other-keys if FRAME is in + xterm-modify-other-keys-terminal-list. + (xterm-remove-modify-other-keys): New function. + (terminal-init-xterm): Use it. Deal with delete-frame hook. + Add the selected frame to xterm-modify-other-keys-terminal-list. + +2007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (x-gtk-stock-map): Map diropen to system-file-manager. + (icon-map-list): New variable. + (x-gtk-map-stock): Use icon-map-list. + +2007-09-02 Romain Francoise <romain@orebokech.com> + + * log-view.el (log-view-current-file): Balance parens. + +2007-09-02 Glenn Morris <rgm@gnu.org> + + * comint.el (comint-mode): Don't set scroll-conservatively. + + * eshell/em-unix.el (eshell/time): Stringify and flatten the + non-command arguments. + + * log-view.el (log-view-current-file): Give a more explicit error + if log-view-file-re fails to find a match. + +2007-09-01 Thien-Thi Nguyen <ttn@gnuvola.org> + + * emacs-lisp/bytecomp.el (byte-recompile-directory): + Fix bug: Don't expand top-level file name more than once. + Reported by Dmitry Antipov <dmantipov@yandex.ru>. + +2007-09-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * server.el (server-process-filter): Don't display the splash screen. + It's annoying enough on the initial screen and becomes positively + obnoxious here. + +2007-08-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/avl-tree.el: Use defstruct rather than macros. + Change naming to use "avl-tree--" for internal functions. + +2007-08-31 Dan Nicolaescu <dann@ics.uci.edu> + + * term/x-win.el (x-menu-bar-open): Delete duplicated function from + the merge. + (global-set-key): Delete f10 mapping, now done in menu-bar.el. + (provide): Move to the end of file. + + * vc-svn.el (vc-svn-diff-tree): Pass a list to vc-svn-diff. + +2007-08-31 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> + + * textmodes/flyspell.el (flyspell-mark-duplications-exceptions): + New variable. List of exceptions for the duplicated word rule. + (flyspell-mark-duplications-flag): Mention it. + (flyspell-word): Treat it. + + * files.el (create-file-buffer): If the filename sans directory starts + with spaces, remove them. + +2007-08-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (x-gtk-stock-map): Add etc/images to keys. + (x-gtk-map-stock): Use two directory elements when matching + file name. + +2007-08-31 James Wright <james@chumsley.org> + + * eshell/em-unix.el (eshell/info): New function. + +2007-08-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * frame.el (frame-initialize, make-frame): + * server.el (server-process-filter): + * faces.el (tty-set-up-initial-frame-faces): Don't set + term-environment-variable since it's not used any more. + + * env.el (setenv): Don't treat $TERM specially. + + * startup.el (normal-top-level): Set $TERM to `dumb' so that unless + stated otherwise, subprocesses do not send back escape sequences + corresponding to the terminal from which Emacs was started. + +2007-08-31 Thien-Thi Nguyen <ttn@gnuvola.org> + + * calculator.el: Require cl for compilation. + +2007-08-30 Daniel Pfeiffer <occitan@esperanto.org> + + * outline.el (outline-font-lock-levels): Comment out unused var. + (outline-font-lock-face): Wrap around face list to handle any + nesting depth gracefully. + +2007-08-30 Michael Albinus <michael.albinus@gmx.de> + + * net/ange-ftp.el: Add ange-ftp property to `set-file-modes' and + `set-file-times'. + +2007-08-30 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org.el (org-export-visible): Fix drawers before export. + (org-do-sort): Allow sorting by priority. + (org-agenda-files): Ignore non-existing files. + (org-agenda-skip-unavailable-files): New variable. + (org-ellipsis): All a face as value. + (org-mode): Interprete the face value of `org-ellipsis'. + (org-archive-save-context-info): New option. + (org-archive-subtree): Store context info in archived entry. + (org-fast-tag-selection-can-set-todo-state): New variable. + (org-fast-tag-selection): Allow setting TODO states through this + interface. + (org-cycle): Docstring updated. + (org-todo-keyword-faces): New option. + (org-get-todo-face): New function. + (org-set-font-lock-defaults, org-agenda-highlight-todo): + Use `org-get-todo-face'. + (org-switch-to-buffer-other-window): New function. + (org-table-edit-field, org-table-show-reference) + (org-table-edit-formulas, org-add-log-note) + (org-fast-tag-selection, org-agenda, org-prepare-agenda) + (org-timeline): Use `org-switch-to-buffer-other-window' instead of + `switch-to-buffer-other-window' to make sure that the temporary + windows show up on the current frame. + (org-mhe-get-message-real-folder, org-batch-store-agenda-views) + (org-get-entries-from-diary, org-replace-region-by-html): + Don't allow pop-up frames. + (org-agenda-get-deadlines, org-agenda-get-scheduled): + Fix problems with time-of-day. + (org-export-get-title-from-subtree): New function. + (org-agenda-get-scheduled, org-agenda-get-deadlines): Fix problems + with listing items that are DONE. + (org-change-tag-in-region): New command. + (org-agenda-skip-scheduled-if-done) + (org-agenda-skip-deadline-if-done): Docstring clarified. + (org-mode): Hide drawers on startup. + (org-get-todo-face): New function. + (org-todo-keyword-faces): New option. + (org-set-regexps-and-options): Use `org-remove-keyword-keys'. + (org-remove-keyword-keys): New function. + +2007-08-30 Jari Aalto <jari.aalto@cante.net> (tiny change) + + * progmodes/grep.el (grep-find-ignored-directories): + Add monotone _MTN bookkeeping directory in workspaces. + Add RCS control directory. List items in alphabetical order. + + * progmodes/grep.el (grep-files-aliases): Add cc alias. + Sort items in alphabetical order. Fix parens. + +2007-08-29 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-hg.el (vc-hg-extra-menu-map): New variable. + (vc-hg-extra-menu, vc-hg-outgoing, vc-hg-incoming, vc-hg-push) + (vc-hg-pull): New functions. + (vc-hg-outgoing-mode, vc-hg-incoming-mode): New derived modes. + + * term/mac-win.el: Don't require url, only autoloaded url + functions are used in this file. + +2007-08-29 Andreas Schwab <schwab@suse.de> + + * shell.el (shell): Return correct value from interactive spec. + +2007-08-29 Glenn Morris <rgm@gnu.org> + + * version.el (emacs-version): Increase to 23.0.50. + +2007-08-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * term/x-win.el (x-gtk-stock-map): :version changed to 23.1. + +2007-08-29 Juri Linkov <juri@jurta.org> + + * loadup.el: Add "button" loading after "faces" and move "startup" + to load after "button". + +2007-08-29 Dan Nicolaescu <dann@ics.uci.edu> + + * loadup.el: Load term/mac-win on a Mac using Carbon. + + * term/mac-win.el: Provide mac-win. + (mac-initialized): New variable. + (mac-initialize-window-system): New function. Move global setup here. + (handle-args-function-alist, frame-creation-function-alist): + (window-system-initialization-alist): Add mac entries. + (x-setup-function-keys): New function containing all the + top level function key definitions. + + * term/x-win.el (x-menu-bar-open): Use accelerate-menu. + + * env.el (read-envvar-name): Don't consider the environment frame param. + + * env.el (setenv): + * frame.el (frame-initialize, make-frame): + * faces.el (tty-set-up-initial-frame-faces): + * server.el (server-process-filter): Set + display-environment-variable and term-environment-variable. + + * server.el (server-process-filter): Set COLORFGBG and COLORTERM. + +2007-08-29 Jason Rumney <jasonr@gnu.org> + + * loadup.el: Only load term/x-win when X is compiled in. + Load term/w32-win and dependencies on windows-nt. + + * term/w32-win.el: Reorder to match x-win.el more closely. + Provide w32-win. Don't throw error when global window-system not w32. + (internal-face-interactive): Remove obsolete function. + (x-setup-function-keys): Use local-function-key-map. + (w32-initialized): New variable. + (w32-initialize-window-system): Set it. + Move more global setup here. + (x-setup-function-keys): New function. + (w32-initialize-window-system): Move non function key global setup here. + (x-cut-buffer-max): Remove. + (w32-initialize-window-system): New function. + (handle-args-function-alist, frame-creation-function-alist): + (window-system-initialization-alist): Add w32 entries. + +2007-08-29 David Kastrup <dak@gnu.org> + + * env.el (getenv): Pass frame to getenv-internal. + +2007-08-29 Karoly Lorentey <lorentey@elte.hu> + + * version.el (emacs-version): Show if multi-tty is present. + + * loadup.el: Delay loading env; mule-conf gets confused by cl + during bootstrap. Also load termdev and term/x-win. + + * bindings.el (mode-line-client): New variable. + (help-echo): Add it to the default mode-line format. + + * cus-start.el: Remove bogus window-system reference from GTK test. + + * ebrowse.el (ebrowse-electric-list-mode-map) + (ebrowse-electric-position-mode-map): + * ebuff-menu.el (electric-buffer-menu-mode-map): + * echistory.el (electric-history-map): Bind C-z to `suspend-frame', + not `suspend-emacs'. + + * ediff-wind.el (ediff-setup-windows-automatic): New function. + (ediff-window-setup-function): Use it as default. + + * files.el (save-buffers-kill-terminal): New function. + (ctl-x-map): Change binding of C-x C-c to save-buffers-kill-terminal. + + * font-lock.el (lisp-font-lock-keywords-2): Add `let-environment' + and `with-selected-frame'. + + * help-fns.el (describe-variable): Describe frame-local variables + correctly. + + * simple.el (normal-erase-is-backspace-mode): Rewrite for multiple + display support. + (normal-erase-is-backspace-setup-frame): New function. + + * subr.el (with-selected-frame): New function. + (read-quoted-char): Use terminal-local binding of + local-function-key-map instead of function-key-map. + + * talk.el (talk): New function. + (talk-handle-delete-frame): New function. + (talk-add-display): Open a new frame only if FRAME was not a frame. + + * termdev.el: New file. + + * menu-bar.el (menu-bar-open): New function. Bind it to f10. + * term/x-win.el: Don't bind f10. + * tmm.el: Remove autoload binding for f10. + + * international/encoded-kb.el (encoded-kbd-setup-display): Use + `set-input-meta-mode'. Fix broken condition before set-input-mode. + Store the saved input method as a terminal parameter. Add keymap + parameter. Use it instead of changing key-translation-map directly. + (saved-key-translation-map, encoded-kbd-mode, saved-input-mode): + Remove. + (encoded-kbd-setup-display): New function. + + * international/mule-cmds.el (set-locale-environment): Fix getenv + call. Use save-buffers-kill-terminal. Ignore window-system; always + set the keyboard coding system. Add DISPLAY parameter. + (set-display-table-and-terminal-coding-system): Add DISPLAY + parameter. Pass it to set-terminal-coding-system. + + * international/mule.el (keyboard-coding-system): Test for + encoded-kbd-setup-display, not encoded-kbd-mode. + (set-terminal-coding-system, set-keyboard-coding-system): Add + DISPLAY parameter. + (set-keyboard-coding-system): Use encoded-kbd-setup-display. + + * term/README: Update. + + * term/linux.el (terminal-init-linux): Use `set-input-meta-mode'. + + * term/x-win.el (x-setup-function-keys): New function. Move + function-key-map tweaks here. Protect against multiple calls on + the same terminal. Use terminal-local binding of + local-function-key-map instead of function-key-map. + (x-initialize-window-system): Make a copy of pure list. Pass a + frame getenv. + + * term/vt200.el, term/vt201.el, term/vt220.el, term/vt240.el: + * term/vt300.el, term/vt320.el, term/vt400.el, term/vt420.el: + * term/AT386.el, term/internal.el, term/iris-ansi.el, term/lk201.el: + * term/mac-win.el, term/news.el, term/rxvt.el, term/sun.el: + * term/tvi970.el, term/wyse50.el: Use terminal-local binding of + local-function-key-map instead of function-key-map. + + * term/rxvt.el, term/xterm.el: Speed up load time by protecting + `substitute-key-definition' and `define-key' calls against + multiple execution. Use terminal-local binding of + local-function-key-map instead of function-key-map. Pass a frame + to getenv. + + * edmacro.el (edmacro-format-keys): + * emulation/cua-base.el (cua--pre-command-handler): + * isearch.el (isearch-other-meta-char): + * xt-mouse.el: Use terminal-local binding of + local-function-key-map instead of function-key-map. + + * fringe.el (set-fringe-mode): Simplify and fix using + `modify-all-frames-parameters'. + * scroll-bar.el (set-scroll-bar-mode): Ditto. + * tool-bar.el (tool-bar-mode): Ditto. Remove 'tool-bar-map length + check before calling `tool-bar-setup'. + (tool-bar-setup): New variable. + (tool-bar-setup): Use it to guard against multiple calls. Add + optional frame parameter, and select that frame before adding items. + (toggle-tool-bar-mode-from-frame): New function. + + * menu-bar.el (toggle-menu-bar-mode-from-frame): New function. + (menu-bar-showhide-menu): Use toggle-menu-bar-mode-from-frame and + toggle-tool-bar-mode-from-frame to change "Menu-bar" and + "Tool-bar" toggles to reflect the state of the current frame. + (menu-bar-mode): Simplify and fix using `modify-all-frames-parameters'. + + * env.el: Require cl for byte compilation (for `block' and `return'). + (environment, setenv-internal): New functions. + (let-environment): New macro. + (setenv, getenv): Add optional terminal parameter. Update docs. + (setenv): Use setenv-internal. Always set process-environment. + Handle `local-environment-variables'. + (read-envvar-name, setenv, getenv): Use frame parameters + to store the local environment, not terminal parameters. Include + `process-environment' as well. + + * faces.el (tty-run-terminal-initialization): New function. + (tty-create-frame-with-faces): Use it. Set up faces and + background mode only after the terminal has been initialized. + Call terminal-init-*. Don't load the initialization file more + than once. Call set-locale-environment. + (frame-set-background-mode): Handle the 'background-mode terminal + parameter. + (tty-find-type): New function. + (x-create-frame-with-faces): Remove bogus check for + first frame. Call `tool-bar-setup'. Don't make frame visible + until we are done setting up all its parameters. Call + x-setup-function-keys. + + * frame.el (make-frame): Always inherit 'environment and 'client + parameters. Set up the 'environment frame parameter, when needed. + Also inherit 'client parameter. Don't override explicitly + specified values with inherited ones. Add 'terminal frame + parameter. Append window-system-default-frame-alist to parameters + before calling frame-creation-function. + (frame-initialize): Copy the environment from the initial frame. + (window-system-default-frame-alist): Enhance doc string. + (frame-notice-user-settings): Don't put 'tool-bar-lines in + `default-frame-alist' when initial frame is on a tty. + (modify-all-frames-parameters): Simplify using `assq-delete-all'. + Remove specified parameters from `window-system-default-frame-alist'. + (make-frame-on-tty, framep-on-display, suspend-frame): + Extend doc string, update parameter names. + (frames-on-display-list): Use terminal-id to get the display id. + (frame-notice-user-settings): Extend to apply + settings in `window-system-default-frame-alist' as well. + (terminal-id, terminal-parameters, terminal-parameter) + (set-terminal-parameter, terminal-handle-delete-frame): New functions. + (delete-frame-functions): Add to `delete-frame-functions' hook. + (blink-cursor-mode): Adapt blink-cursor-mode default + value from startup.el. + (make-frame-on-display): Protect condition on x-initialized when + x-win.el is not loaded. Update doc. + (suspend-frame): Use display-controlling-tty-p to decide between + suspend-emacs and suspend-tty. + (frames-on-display-list): Update for display ids. + (framep-on-display): Ditto. + (suspend-frame): Use display-name, not frame-tty-name. + (selected-terminal): New function. + + * server.el: Use `device' instead of `display' or `display-id' in + variable and client parameter names. + (server-select-display): Remove (unused). + (server-tty-live-p, server-handle-delete-tty): Remove. + (server-unquote-arg, server-quote-arg, server-buffer-clients): + Update docs. + (server-getenv-from, server-with-environment, server-send-string) + (server-save-buffers-kill-terminal): New functions. + (server-delete-client): Handle quits in kill-buffer. Don't kill + modified buffers. Add extra logging. Delete frames after + deleting the tty. Clear 'client parameter before deleting a frame. + Use delete-display, not delete-tty. + (server-visit-files): Don't set `server-existing-buffer' if the + buffer already has other clients. Return list of buffers + created. Update doc. Don't set client-record when nowait. + (server-handle-delete-frame): Delete the client if this was its + last frame. Check that the frame is alive. Remove bogus comment. + Add note on possible race condition. Delete tty clients, if needed. + (server-handle-suspend-tty): Use server-send-string. Kill the + client in case of errors from process-send-string. Use the display + parameter. + (server-unload-hook): Remove obsolete delete-tty hook. + (server-start): Ask before restarting if the old server still has + clients. Add feedback messages. Remove obsolete delete-tty hook. + (server-process-filter): Use server-send-string. Accept `-dir' + command. Switch to *scratch* immediately after creating the frame, + before evaluating any -evals. Protect `display-splash-screen' + call in a condition-case. Explain why. Call + `display-startup-echo-area-message' before + `display-splash-screen'. Don't display the splash screen when no + frame was created. Show the Emacs splash screen and startup echo + area message. Display the *scratch* buffer by default. Store the + local environment in a frame (not terminal) parameter. Do not try + to decode environment strings. Fix reference to the 'display + frame parameter. Change syntax of environment variables. Put + environment into terminal parameters, not client parameters. Use + a dummy client with --no-wait's X frames. In `-position LINE' + handler, don't ruin the request string until the line number is + extracted. Log opened files. Handle -current-frame command. + Don't create frames when it is given. Don't bind X frames to the + client when we are in -no-wait mode. Set locale environment + variables from client while creating tty frames. Disable call to + configure-display-for-locale. When processing -position command, + don't change the request string until the parameters are + extracted. Don't try to create an X frame when Emacs does not + support it. Improve logging. Temporarily set ncurses-related + environment variables to those of the client while creating a new + tty frame. Select buffers opened by nowait clients, don't leave + them buried under others. Set the display parameter, and use it + when appropriate. + + * startup.el (display-startup-echo-area-message): Handle + `inhibit-startup-echo-area-message' here. + (command-line-1): Moved from here. + (fancy-splash-screens): Use `overriding-local-map' instead of + `overriding-terminal-local-map' for now; the latter doesn't work + right, it looses keypresses to another terminal. Use + `overriding-terminal-local-map' to set up keymap. Install a + `delete-frame-functions' hook to catch `delete-frame' events. + Ignore `select-window' events to cope better with + `focus-follows-mouse'. Don't switch back to the original buffer + if the splash frame has been killed. Restore previous buffer, even + if it's *scratch*. + (normal-splash-screen): Don't let-bind `mode-line-format'; it + changes the global binding - setq it instead. Use + `save-buffers-kill-terminal'. + (display-splash-screen): Don't do anything if the splash screen is + already displayed elsewhere. + (fancy-splash-exit, fancy-splash-delete-frame): New functions. + (command-line): Replace duplicated code with a call to + tty-run-terminal-initialization. Don't load the terminal + initialization file more than once. Remove call to nonexistent + function `set-locale-translation-file-name'. + + * xt-mouse.el (xterm-mouse-x, xterm-mouse-y): Convert to terminal + parameters. + (xterm-mouse-position-function, xterm-mouse-event): Update. + (xterm-mouse-mode): Don't depend on current value of window-system. + (turn-on-xterm-mouse-tracking, turn-off-xterm-mouse-tracking): + Update for multi-tty. + (turn-on-xterm-mouse-tracking-on-terminal) + (turn-off-xterm-mouse-tracking-on-terminal) + (xterm-mouse-handle-delete-frame): New functions. + (delete-frame-functions, after-make-frame-functions) + (suspend-tty-functions, resume-tty-functions): Install extra hooks + for multi-tty. + 2007-10-10 Vinicius Jose Latorre <viniciusjl@ig.com.br> * ps-print.el: Fix the usage of :foreground and :background face @@ -33,8 +2271,7 @@ 2007-08-28 Michael Albinus <michael.albinus@gmx.de> - * net/tramp.el (tramp-handle-set-file-times): Flush the file - properties. + * net/tramp.el (tramp-handle-set-file-times): Flush the file properties. (tramp-set-file-uid-gid, tramp-get-local-uid) (tramp-get-local-gid): New defuns. (tramp-handle-copy-file): Handle new parameter PRESERVE-UID-GID. @@ -72,8 +2309,7 @@ 2007-08-28 Glenn Morris <rgm@gnu.org> - * progmodes/cc-langs.el (c-constant-kwds): Add java: null, true, - false. + * progmodes/cc-langs.el (c-constant-kwds): Add java: null, true, false. 2007-08-27 Thien-Thi Nguyen <ttn@gnuvola.org> @@ -150,7 +2386,7 @@ * emacs-lisp/avl-tree.el: New file. -2007-08-26 Micha,bk(Bl Cadilhac <michael@cadilhac.name> +2007-08-26 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> * hi-lock.el (hi-lock-unface-buffer): Show a x-menu only if the mouse was used. @@ -294,8 +2530,8 @@ 2007-08-23 Masatake YAMATO <jet@gyve.org> - * progmodes/cc-fonts.el (gtkdoc-font-lock-doc-comments): - Highlight name of parameters in document body. + * progmodes/cc-fonts.el (gtkdoc-font-lock-doc-comments): Highlight + name of parameters in document body. 2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca> @@ -992,11 +3228,6 @@ (tex-font-script-display, tex-font-lock-suscript): Change from a cons cell to a list of 2 elements to simplify the unfontify code. -2007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change) - - * url/url-auth.el (url-basic-auth): When prompting for username - and password, default to the username and password in the URL. - 2007-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br> * ps-print.el (ps-default-fg, ps-default-bg): Docstring fix. @@ -2057,7 +4288,9 @@ 2007-07-19 Eric S. Raymond <esr@snark.thyrsus.com> - * vc-cvs.el: vc-cvs-checkin had some reference problems, now fixed. + * vc-cvs.el (vc-cvs-checkin, vc-cvs-diff): Finish transition from + having a single file argument to having a list of files as the + first argument. 2007-07-19 Stefan Monnier <monnier@iro.umontreal.ca> @@ -2074,11 +4307,68 @@ 2007-07-18 Eric S. Raymond <esr@snark.thyrsus.com> - * vc-hooks.el: Generalize stay-local-p to operate on lists of - files. Change two keybindings to point to new function names. - * vc-arch.el, vc-bzr.el, vc-cvs.el, vc-hg.el, vc-mcvs.el, vc-rcs.el, - vc-sccs.el, vc-svn.el: These now implement the NewVC-fileset. - * vc.el: Adapted for NewVC-fileset, but no functional changes yet. + * vc.el (revision-granularity, create-repo): Document new vc + backend properties. + (vc-rollback): Renamed from vc-cancel-version. Update + references. Pass a list instead of a file. + (vc-revert): Renamed from vc-revert-buffer. Update references. + (vc-delistify, vc-expand-dirs): New functions. + (vc-do-command): Rename FILE to FILE-OR-LIST and deal with a list + of files instead of a single file. + (vc-position-context, vc-resync-window, vc-diff-internal) + (vc-print-log): Pass a list instead of a file. + + * vc-hooks.el (vc-stay-local-p, vc-backend) + (vc-backend-subdirectory-name): Work on a file list, not a single + file. + (vc-workfile-version): Update docstring. + (vc-menu-map): Use vc-rollback instead of vc-cancel-version and + vc-revert instead of vc-revert-buffer. + (vc-prefix-map): Likewise. Bind vc-update. + + * vc-svn.el (vc-svn-revision-granularity, vc-svn-create-repo) + (vc-svn-wash-log): New functions. + (vc-svn-register, vc-svn-checkin, vc-svn-print-log) + (vc-svn-command): Deal with a list of files, not a single file. + + * vc-rcs.el (vc-rcs-revision-granularity, vc-rcs-create-repo) + (vc-rcs-wash-log): New functions. + (vc-rcs-register, vc-rcs-checkin, vc-rcs-diff, vc-rcs-print-log): + Deal with a list of files, not a single file. + (vc-rcs-rollback): Likewise. Rename from vc-rcs-cancel-version. + + * vc-sccs.el (vc-sccs-revision-granularity, vc-sccs-wash-log): New + functions. + (vc-sccs-register, vc-sccs-checkin, vc-sccs-diff): Deal with a + list of files, not a single file. + + * vc-mcvs.el (vc-mcvs-revision-granularity, vc-mcvs-create-repo): + New functions. + (vc-mcvs-register, vc-mcvs-checkin, vc-mcvs-print-log) + (vc-mcvs-diff): Deal with a list of files, not a single file. + + * vc-hg.el (vc-hg-revision-granularity, vc-hg-create-repo): New + functions. + (vc-hg-print-log): Deal with a list of files, not a single file. + (vc-hg-diff-tree): New function, replace defalias with the same + name. + (vc-hg-register, vc-hg-checkin, vc-hg-command): Rename FILE to + FILES to denote that it is a file list, not a single file. + + * vc-cvs.el (vc-cvs-create-repo, vc-cvs-wash-log): New functions. + (vc-cvs-register, vc-cvs-checkin): Deal with a list of files, not + a single file. + (vc-cvs-print-log, vc-cvs-command): Rename FILE to FILES to denote + that it is a file list, not a single file. + (vc-cvs-diff): Likewise. Simplify. + + * vc-arch.el (vc-arch-register, vc-arch-checkin, vc-arch-diff): + Deal with a list of files, not a single file. + + * vc-bzr.el (vc-bzr-register, vc-bzr-command, vc-bzr-checkin) + (vc-bzr-print-log): Update FILE parameter name to denote that it + is a file list, not a single file. + (vc-bzr-diff): Likewise. Use the car of files. 2007-07-18 Juanma Barranquero <lekktu@gmail.com> @@ -2266,7 +4556,8 @@ * replace.el (match): Use yellow1 instead of yellow. - * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of red. + * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of + red. * pcvs-info.el (cvs-unknown): Likewise. @@ -2539,7 +4830,7 @@ * net/tramp-util.el: * net/tramp-vc.el: Removed. - * net/ange-ftp.el: Add ange-ftp property to 'start-file-process + * net/ange-ftp.el: Add ange-ftp property to 'start-file-process. (ange-ftp-file-remote-p): Handle optional parameter CONNECTED. * net/rcompile.el (remote-compile): Handle Tramp 2.1 arguments. diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5 index 5d2c4766d73..1b6609f1727 100644 --- a/lisp/ChangeLog.5 +++ b/lisp/ChangeLog.5 @@ -137,7 +137,7 @@ * vc-hooks.el (vc-fetch-properties): Don't use vc-backend-dispatch, as that is in vc.el. - * vc.el (vc-register): Inhibit backups for the file's buffer + * vc.el (vc-register): Inhibit backups for the file's buffer. * vc.el (vc-add-triple, vc-lookup-triple, vc-record-rename): Use absolute file names to access the SCCS named configuration files @@ -201,7 +201,7 @@ pgp and forward blocks. (ispell-message-end-skip): New variable for block skips, set up for pgp and forward blocks. - (ispell-message): Added block message skipping. + (ispell-message): Added block message skipping. (ispell-buffer-local-parsing): Added html-mode. * mouse.el (mouse-set-region): Bind last-command with this-command. @@ -261,7 +261,7 @@ the new 'none-value of vc-locking-user. (vc-consult-rcs-headers): Fixed bug that prevented - (not vc-consult-headers) from working + (not vc-consult-headers) from working. (vc-file-not-found-hook): Set the default-directory of the new buffer before check-out. @@ -280,7 +280,7 @@ Use vc-file-clear-masterprops, and adjust those properties that are not cleared. - (vc-resynch-window): Temporarily remove vc-find-file-hook, so + (vc-resynch-window): Temporarily remove vc-find-file-hook, so that we don't lose the file properties during check-in/out. (vc-resynch-window): Do not try to delete the current window if @@ -305,7 +305,7 @@ * winnt.el (null-device): Set to "NUL". (grep-regexp-alist): Match entries with drive letters. - (save-to-unix-hook,revert-from-unix-hook): Defined. + (save-to-unix-hook, revert-from-unix-hook): Defined. (using-unix-filesystems): Defined. (window-frame): Unaliased. @@ -331,7 +331,7 @@ 1995-06-14 Johan Vromans <jv@NL.net> - * forms.el (forms--mode-menu-edit,forms--mode-menu-ro): + * forms.el (forms--mode-menu-edit, forms--mode-menu-ro): Set `mouse-major-mode-menu'. 1995-06-14 Simon Marshall <simon@duality.gnu.ai.mit.edu> @@ -358,30 +358,30 @@ 1995-06-13 Per Bothner <bothner@kalessin.cygnus.com> - * term.el: Various optimizations. The main one is to optimize for + * term.el: Various optimizations. The main one is to optimize for simple output at the end of the buffer, with no paging, and in that case to defer scrolling while we can. - (term-emulate-terminal): Don't call term-handle-scroll in + (term-emulate-terminal): Don't call term-handle-scroll in simple cases unless we are either paging or term-scroll-with-delete. - (term-down): Likewise. - (term-handle-scroll): Modify accordingly. - (term-emulate-terminal): Avoid deleting old text in common case. + (term-down): Likewise. + (term-handle-scroll): Modify accordingly. + (term-emulate-terminal): Avoid deleting old text in common case. Optimize the simple case of CRLF when we're at buffer end. Handle deferred scroll when done processing output. - (term-handle-deferred-scroll): New function. - (term-down): Simplify - no longer take RIGHT argument. Tune. - (term-goto): Use term-move-columns to compensate for the above. + (term-handle-deferred-scroll): New function. + (term-down): Simplify - no longer take RIGHT argument. Tune. + (term-goto): Use term-move-columns to compensate for the above. - * term.el (term-escape-char, term-set-escape-char): Add doc-string. - (term-mouse-paste): Add xemacs support. + * term.el (term-escape-char, term-set-escape-char): Add doc-string. + (term-mouse-paste): Add XEmacs support. - * term.el: Various speed enhencements: - (term-handle-scroll): Don't clear term-current-row; maybe adjust it. - (term-down): Don't call term-adjust-current-row-cache if we've + * term.el: Various speed enhencements: + (term-handle-scroll): Don't clear term-current-row; maybe adjust it. + (term-down): Don't call term-adjust-current-row-cache if we've done term-handle-scroll. - (term-emulate-terminal): Don't call term-adjust-current-row-cache. - (term-emulate-terminal): For TAB, don't nil term-start-line-column. - (term-goto): Possible optimization. + (term-emulate-terminal): Don't call term-adjust-current-row-cache. + (term-emulate-terminal): For TAB, don't nil term-start-line-column. + (term-goto): Possible optimization. 1995-06-13 Karl Heuer <kwzh@nutrimat.gnu.ai.mit.edu> @@ -472,7 +472,7 @@ * viper.el (vip-envelop-ESC-key): If an ESC-sequence translates into a function key, pretend that this key was the last command event. - * viper.el (vip-put-back,vip-Put-back): Now emulate Vi's behavior + * viper.el (vip-put-back, vip-Put-back): Now emulate Vi's behavior more closely. * viper.el (vip-line): No longer not bombs out. @@ -486,8 +486,8 @@ * viper.el, viper-mous.el, viper-util.el, viper-ex.el: Changed vip-*-frame-* to *-frame-*, incorporated overlay strings, - unread-command-events, removed support for emacs versions 19.28 and - xemacs 19.11 and earlier. + unread-command-events, removed support for Emacs versions 19.28 and + XEmacs 19.11 and earlier. * viper-macs.el, viper-keym.el: Likewise. 1995-06-08 Roland McGrath <roland@churchy.gnu.ai.mit.edu> @@ -571,22 +571,22 @@ * ediff.el (ediff-documentation: New function. - * ediff-wind.el: Got rid of toolbars in control frame in xemacs + * ediff-wind.el: Got rid of toolbars in control frame in XEmacs. - * ediff-wind.el: Changed window-min-height from 1 to 2 + * ediff-wind.el: Changed window-min-height from 1 to 2. * ediff-wind.el (ediff-diff-at-point, ediff-toggle-multiframe): Bug fixes. (ediff-destroy-control-frame, ediff-window-display-p): New functions. * ediff.el, ediff-wind.el, ediff-util.el, ediff-init.el: - Converted xemacs *screen* nomenclature to *frame*. - Incorporated overlay strings. Ediff no longer runs under emacs + Converted XEmacs *screen* nomenclature to *frame*. + Incorporated overlay strings. Ediff no longer runs under Emacs 19.28 and earlier and XEmacs 19.11 and earlier. * ediff.el (ediff-patch-buffer): Now handles buffers that don't visit any file. (ediff-windows): Renamed to ediff-windows-wordwise, added (ediff-windows-linewise): New function. - Changed ediff-small/large-regions to ediff-regions-wordwise/linewise + Changed ediff-small/large-regions to ediff-regions-wordwise/linewise. * ediff.el, ediff-wind.el: Changed window-system to ediff-window-display. @@ -893,11 +893,11 @@ (ada-indent-function): Handle "elsif" the same way as "if", added "separate" for no indent. (ada-get-indent-type): If "type ... is .." is followed by code on - the same line, it is a broken statement. Test it. + the same line, it is a broken statement. Test it. (ada-check-defun-name): Check for "protected" records. (ada-goto-matching-decl-start): Use of ada-ident-re. (ada-goto-matching-start): Extend regexp for "protected" record. - (ada-in-limit-line): Rename from in-limit-line. Don't use + (ada-in-limit-line): Rename from in-limit-line. Don't use count-lines, but test if beginning-of-line/end-of-line puts us to bob/eob. (ada-goto-previous-nonblank-line): Save a beginning-of-line @@ -906,7 +906,7 @@ (ada-tabsize): Remove. (keymap): Use C-M-a and C-M-e for proc/func movement. No keybinding anymore for next/prev-package. - (ada-font-lock-keywords-[1|2]): Add protected records. "when" removed + (ada-font-lock-keywords-[1|2]): Add protected records. "when" removed from 'reference'-face. (initial comments): Update CREDITS list. (ada-add-ada-menu): Capitalize menu entries. Add menu statement @@ -914,14 +914,14 @@ * ada-mode.el: Change all Ada94 to Ada95. - * ada-mode.el: (ada-xemacs): New function, detect if we are - running on XEmacs. Ada keymap definition and menus use it. + * ada-mode.el (ada-xemacs): New function, detect if we are + running on XEmacs. Ada keymap definition and menus use it. (ada-create-syntax-table): Correct comments explaining use of 2nd syntax table. Added creation of ada-mode-symbol-syntax-table with '_' as word constituent. (ada-adjust-case): Add test, if symbol is preceeded by a "'". If true, change case according to ada-case-attribute. - (ada-which-function-are-we-in): New routine. Save name of the current + (ada-which-function-are-we-in): New routine. Save name of the current function in the old buffer; we can place cursor now at the same function in the new buffer using find-file. (ada-make-body): New function. Generates body stubs if the body @@ -941,13 +941,12 @@ (ada-krunch-args): Initialized to 0 exploiting the new capability of 'gnatk8' as of gnat-2.0. (ada-make-filename-from-adaname): Remove downcasing and replacement - of dots. This is done in external program gnatk8 (gnat-2.0). + of dots. This is done in external program gnatk8 (gnat-2.0). (ada-in-open-paren-p): Complete rewrite for speed-up. (ada-search-ignore-string-comment): Ignore # as a string terminator in all searches. (ada-add-ada-menu): Use real variables instead of t for invoking - 'easymenu' - (require 'easymenu). + 'easymenu'. (imenu-create-ada-index): We accept forward definitions again. (ada-indent-region): Catch errors, simplified code. @@ -989,7 +988,7 @@ * easymenu.el (easy-menu-do-define): Add autoload cookie. -1995-05-19 Kevin Rodgers <kevinr@ihs.com> (tiny change) +1995-05-19 Kevin Rodgers <kevinr@ihs.com> (tiny change) * mailalias.el (expand-mail-aliases): Expand aliases in From and Reply-to headers as well, plus the Resent- variants. @@ -1082,7 +1081,7 @@ * ps-print.el (ps-faces-list): Delete. Added alias for list-faces if face-list isn't fbound. - * ps-print.el: (ps-print-ensure-fontified) added to make sure + * ps-print.el (ps-print-ensure-fontified): Added to make sure ps-print works correctly in conjunction with lazy-lock. * ps-print.el: RMS's changes for Emacs. @@ -1212,7 +1211,7 @@ 1995-05-02 Karl Heuer <kwzh@hal.gnu.ai.mit.edu> - * scribe.el: (scribe-chapter): Change to C-c C-c. + * scribe.el (scribe-chapter): Change to C-c C-c. (scribe-section): Change to C-c C-t. (scribe-subsection): Change to C-c C-s. (scribe-insert-environment): Change to C-c C-v. @@ -1407,8 +1406,8 @@ 1995-04-25 Johan Vromans <jv@squirrel.NL.net> - * forms.el: (forms--make-format-elt-using-text-properties) - forms--make-format): Add `intangible' text property to read-only areas. + * forms.el (forms--make-format-elt-using-text-properties) + (forms--make-format): Add `intangible' text property to read-only areas. (forms-next-field, forms-previous-field): Use `inhibit-point-motion-hooks' to allow move between two intangible areas. @@ -1672,7 +1671,7 @@ 1995-04-16 Ethan Bradford <ethanb@phys.washington.edu> * ispell.el (ispell-init-ispell): Don't barf if there is a - warning message before the version line when Ispell starts up. + warning message before the version line when Ispell starts up. 1995-04-16 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -1973,7 +1972,7 @@ 1995-04-08 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * etags.el (next-file): Handle empty list returned by - (tags-table-files). + `tags-table-files'. 1995-04-08 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -2149,9 +2148,9 @@ Added the P tag and modified the s tag accordingly (tempo-insert-named): Checks for valid name, insert mark otherwise. - * tempo.el (tempo-dolist): Changed (cadr ...) to (car (cdr ...)) + * tempo.el (tempo-dolist): Changed (cadr ...) to (car (cdr ...)). - * tempo.el (tempo-expand-if-complete): New function + * tempo.el (tempo-expand-if-complete): New function. 1995-04-03 Karl Heuer <kwzh@hal.gnu.ai.mit.edu> @@ -2207,7 +2206,7 @@ * unrmail.el (unrmail): Don't make or switch to a summary buffer. * rmail.el (rmail-displayed-headers): New variable. - (rmail-clear-headers): Handle rmail-displayed-headers + (rmail-clear-headers): Handle rmail-displayed-headers. 1995-03-31 Michael Ernst <mernst@research.microsoft.com> @@ -2370,8 +2369,8 @@ 1995-03-20 Karl Fogel <kfogel@floss.cyclic.com> - * bookmark.el (bookmark-automatically-show-annotations): new var. - (bookmark-jump): only show annotation if above var is non-nil. + * bookmark.el (bookmark-automatically-show-annotations): New var. + (bookmark-jump): Only show annotation if above var is non-nil. 1995-03-20 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -2534,13 +2533,13 @@ 1995-03-15 Per Bothner <bothner@kalessin.cygnus.com> - * term.el (term-mouse-paste): Make work for xemacs-19.11. - For GNU emacs, don't mouse-set-point, but do - run-hooks on mouse-leave-buffer-hook, + * term.el (term-mouse-paste): Make work for XEmacs-19.11. + For GNU Emacs, don't mouse-set-point, but do + run-hooks on mouse-leave-buffer-hook. - * term.el (term-char-mode): Fix paren error that caused - the arrow keys to not be recognized under xemacs. - Also, simplify/fix [(button2)] to [button2] for paste under xemacs. + * term.el (term-char-mode): Fix paren error that caused + the arrow keys to not be recognized under XEmacs. + Also, simplify/fix [(button2)] to [button2] for paste under XEmacs. 1995-03-15 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -2572,7 +2571,7 @@ 1995-03-15 Karl Fogel <kfogel@spiff.gnu.ai.mit.edu> - * bookmark.el: (bookmark-bmenu-2-window): Go to correct position + * bookmark.el (bookmark-bmenu-2-window): Go to correct position as well as correct buffer. (bookmark-bmenu-other-window): Same. (bookmark-bmenu-switch-other-window): Same. @@ -2786,11 +2785,11 @@ 1995-03-07 Per Bothner <bothner@kalessin.cygnus.com> - * term.el (term-eol-on-send): New variable. - (term-send-input): Move point to eol before sending only if + * term.el (term-eol-on-send): New variable. + (term-send-input): Move point to eol before sending only if term-eol-on-send is true. - * term.el (term-send-input): Don't move process-mark until + * term.el (term-send-input): Don't move process-mark until after possible 'history processing. 1995-03-07 Francesco Potorti` (pot@cnuce.cnr.it) @@ -2860,24 +2859,24 @@ * gnus-uu.el (gnus-uu-post-reply-mode): Likewise. * icon.el (icon-mode): Likewise. * mh-comp.el (mh-letter-mode): Likewise. - * mim-mode.el (mim-mode): Likewise. - * modula2.el (modula-2-mode): Likewise. - * nroff-mode.el (nroff-mode): Likewise. - * options.el (Edit-options-mode): Likewise. - * outline.el (outline-mode): Likewise. - * perl-mode.el (perl-mode): Likewise. - * prolog.el (prolog-mode-variables): Likewise. - * rnewspost.el (news-reply-mode): Likewise. - * scheme.el (scheme-mode-variables): Likewise. - * scribe.el (scribe-mode): Likewise. - * sendmail.el (mail-mode): Likewise. - * simula.el (simula-mode): Likewise. - * texinfmt.el (texinfo-format-refill): Likewise. - * texinfo.el (texinfo-mode): Likewise. - * tex-mode.el (tex-common-initialization,latex-mode,slitex-mode): + * mim-mode.el (mim-mode): Likewise. + * modula2.el (modula-2-mode): Likewise. + * nroff-mode.el (nroff-mode): Likewise. + * options.el (Edit-options-mode): Likewise. + * outline.el (outline-mode): Likewise. + * perl-mode.el (perl-mode): Likewise. + * prolog.el (prolog-mode-variables): Likewise. + * rnewspost.el (news-reply-mode): Likewise. + * scheme.el (scheme-mode-variables): Likewise. + * scribe.el (scribe-mode): Likewise. + * sendmail.el (mail-mode): Likewise. + * simula.el (simula-mode): Likewise. + * texinfmt.el (texinfo-format-refill): Likewise. + * texinfo.el (texinfo-mode): Likewise. + * tex-mode.el (tex-common-initialization, latex-mode, slitex-mode): Likewise. - * text-mode.el (indented-text-mode): Likewise. - * vc.el (vc-comment-to-change-log): Likewise. + * text-mode.el (indented-text-mode): Likewise. + * vc.el (vc-comment-to-change-log): Likewise. 1995-03-02 Simon Marshall <simon@duality.gnu.ai.mit.edu> @@ -2906,7 +2905,7 @@ inserted line to left-margin. * paragraphs.el (paragraph-start, paragraph-separate): - Default values no longer start with ^. Doc fix. + Default values no longer start with ^. Doc fix. (use-hard-newlines): Moved here from cmds.c. Made buffer-local. Doc fix. (looking-at-hard): Deleted, not needed. @@ -3125,7 +3124,7 @@ (delete-to-left-margin): Use move-to-left-margin. Doc fix. Make arguments optional. - (set-left-margin): Make region include following spaces and tabs, + (set-left-margin): Make region include following spaces and tabs, so that later insertions there will inherit new setting. Always reindent text to show new setting, not only when auto-fill is active; auto-fill controls only whether to re-fill text. @@ -3407,32 +3406,32 @@ 1995-02-04 Per Bothner <bothner@kalessin.cygnus.com> - * term.el (term-version): Increased to 0.95. - (term-pager-enabled): New macro. Use it a bunch of places. - (term-terminal-menu): Clean up initialization so we don't get + * term.el (term-version): Increased to 0.95. + (term-pager-enabled): New macro. Use it a bunch of places. + (term-terminal-menu): Clean up initialization so we don't get complaints when re-loading term.el. - (term-send-raw-meta): Redo to handle meta-symbols (e.g. meta-delete). + (term-send-raw-meta): Redo to handle meta-symbols (e.g. meta-delete). More robust checking of parameter to make-string. - (term-update-mode-line): New function. Call it whenever we change + (term-update-mode-line): New function. Call it whenever we change char/line/paging mode. Now includes "page" in mode-line-process if paging is abled. - * term.el: Remove causes for byte-compilation to complain: - (term-terminal-pos): Declare x and y in let-binding. - (term-send-invisible): Remove bogus second "iteractive" call. + * term.el: Remove causes for byte-compilation to complain: + (term-terminal-pos): Declare x and y in let-binding. + (term-send-invisible): Remove bogus second "iteractive" call. (term-*): Provide defvars for lots of buffer-local variables. - (term-mode): Make comments and initial value setting from + (term-mode): Make comments and initial value setting from here to the corresponding defvar. - (term-line-start-column): Remove unused variable. - (term-erase-in-line): Fix syntax (incorrect parenthesis) error. - (term-erase-in-display): Fix typo "\?n" -> "?\n". + (term-line-start-column): Remove unused variable. + (term-erase-in-line): Fix syntax (incorrect parenthesis) error. + (term-erase-in-display): Fix typo "\?n" -> "?\n". - * term.el: Make Unix "resize" command work: - (term-handle-ansi-escape): On "\e[row;colH", limit row + * term.el: Make Unix "resize" command work: + (term-handle-ansi-escape): On "\e[row;colH", limit row and col to size of window. (Resize sends "999;999".) - (term-handle-ansi-escape): Implement "\e[6n" "Report cursor + (term-handle-ansi-escape): Implement "\e[6n" "Report cursor position". This requires that we pass proc as an extra parameter. - (term-scroll-region): An empty region means extend to window bottom. + (term-scroll-region): An empty region means extend to window bottom. 1995-02-05 Richard Stallman <rms@pogo.gnu.ai.mit.edu> @@ -3650,9 +3649,10 @@ 1995-01-25 Richard Stallman <rms@mole.gnu.ai.mit.edu> - * mouse.el (mouse-save-then-kill): Ignore mouse-selection-click-count if no active mark. - (mouse-drag-region): Modify previous change--don't run the ordinary binding - in the case of a multiple click. + * mouse.el (mouse-save-then-kill): Ignore mouse-selection-click-count + if no active mark. + (mouse-drag-region): Modify previous change--don't run the ordinary + binding in the case of a multiple click. * tex-mode.el (tex-display-shell): New function. (tex-file, tex-region, tex-show-print-queue, tex-bibtex-file): @@ -3670,12 +3670,12 @@ * etags.el : Changes to support filenames as tags too and provided a drop-in replacement for list-tags. (find-tag-noselect): Recognize filenames as valid tags too. - (find-tag-file-order): New variable added. This contains the name of + (find-tag-file-order): New variable added. This contains the name of the function used to qualify a matched filename. (last-tag-file): New variable; stores the filename looked for via find-tag fmaily of functions. (find-tag-in-order): In case tag searched for is a file, don't do - anything fancy to locate position of tag in file. Just seek to + anything fancy to locate position of tag in file. Just seek to beginning of file. (etags-recognize-tags-table): Added new var find-tag-file-order to tags-table-format variables and also set the priority of searching @@ -3687,7 +3687,7 @@ (tags-list-functions-in-file): New function which is a backend for list-tags function. (tags-locate-file-in-tags-table): New function which locates a - file in `tags-table-list'. Its used by list-tags. + file in `tags-table-list'. Its used by list-tags. 1995-01-24 Frederic Lepied <fred@sugix.frmug.fr.net> @@ -3702,7 +3702,7 @@ Add a newsgroups-update-description menu. (gnus-newsgroups-regex, gnus-newsgroups-display, gnus-newsgroups-alist) (gnus-newsgroups-hashtb, gnus-newsgroups-showall): New variables. - (gnus-group-group-name): Changed the regexp to avoid conflict + (gnus-group-group-name): Changed the regexp to avoid conflict with descriptions which have a ':' inside. (gnus-group-mode): Doc fix. @@ -3723,7 +3723,7 @@ 1995-01-23 Espen Skoglund <espensk@tklab3.cs.uit.no> - * pascal.el: (pascal-*-completion, pascal-comp-defun) + * pascal.el (pascal-*-completion, pascal-comp-defun) (pascal-complete-word, pascal-completion-response, pascal-completion) (pascal-get-completion-decl): Rename some internal variables to start with 'pascal-'. @@ -3772,12 +3772,12 @@ * tempo.el (tempo-region-start, tempo-region-stop): New variables (tempo-insert-template, tempo-insert): Don't affect the - mark. Check for Transient Mark mode + mark. Check for Transient Mark mode. - * tempo.el (tempo-find-match-string): Removed the stupid 1+ again + * tempo.el (tempo-find-match-string): Removed the stupid 1+ again. * tempo.el (tempo-use-tag-list): - Set tempo-match-finder to completion-function + Set tempo-match-finder to completion-function. * tempo.el (tempo-match-finder): Renamed variable from tempo-default-match-finder. Change the value too. @@ -3794,31 +3794,31 @@ 1995-01-21 Per Bothner <bothner@kalessin.cygnus.com> - * term.el (term-version): Increased to 0.94. - (term-if-emacs19, term-if-xemacs, term-ifnot-xemacs): New macros - to conditionalize at compile-time for different emacs versions. - (various places): Use them (instead of term-is-XXXX). - (term-is-emacs19): Removed, no longer needed. + * term.el (term-version): Increased to 0.94. + (term-if-emacs19, term-if-xemacs, term-ifnot-xemacs): New macros + to conditionalize at compile-time for different Emacs versions. + (various places): Use them (instead of term-is-XXXX). + (term-is-emacs19): Removed, no longer needed. - * term.el: Change keybindings to not use C-c LETTER, for + * term.el: Change keybindings to not use C-c LETTER, for term-char-mode, term-line-mode. Keybindings for term-pager-enable and term-pager-disable replaced by one for term-pager-toggle. - (term-pager-toggle): New function. + (term-pager-toggle): New function. * term.el (term-fake-pager-enable, term-fake-pager-disable): Define as aliases, so that menubar code will find proper keybindings. - (term-char-mode): Make no-op if already in char mode. - (term-line-mode): Make no-op if already in line mode. - (term-mode-map): Add keybinding for no-op term-line-mode, so + (term-char-mode): Make no-op if already in char mode. + (term-line-mode): Make no-op if already in line mode. + (term-mode-map): Add keybinding for no-op term-line-mode, so code to display menubar keybindings doesn't lose it. (Needed as long as char-mode and line-mode share term-terminal-menu.) - (term-raw-escape-map): Likewise for term-char-mode. - (term-char-mode, term-line-mode): Better documentation strings. + (term-raw-escape-map): Likewise for term-char-mode. + (term-char-mode, term-line-mode): Better documentation strings. - * term.el: Added menubar for pager sub-mode. + * term.el: Added menubar for pager sub-mode. - * term.el (term-command-hook): Disabled the feature that allowed - inferior to send a lisp command to emacs - too big a security hole. + * term.el (term-command-hook): Disabled the feature that allowed + inferior to send a lisp command to Emacs - too big a security hole. 1995-01-21 Roland McGrath <roland@churchy.gnu.ai.mit.edu> @@ -3981,7 +3981,8 @@ (facemenu-unlisted-faces): Doc fix. * facemenu.el: Revise keybindings; doc fix. - (facemenu-new-faces-at-end): New vbl. (facemenu-add-new-face): Use it. + (facemenu-new-faces-at-end): New vbl. + (facemenu-add-new-face): Use it. (facemenu-set-face, facemenu-set-face-from-menu): Check read-only. (facemenu-set-face): Doc fix. @@ -3992,7 +3993,7 @@ (facemenu-add-new-face): New function. (facemenu-update): Don't redo top-level menu; nothing should change. Move menu setup to defvars. - Use facemenu-add-new-face. Changed global binding to C-down-mouse-3. + Use facemenu-add-new-face. Changed global binding to C-down-mouse-3. (facemenu-menu): "Update" item removed; should no longer be needed interactively. (facemenu-complete-face-list): Just return faces, not keybindings. @@ -4014,8 +4015,8 @@ 1995-01-17 Richard Stallman <rms@mole.gnu.ai.mit.edu> * gud.el (gud-new-keymap): New function. - (gud-xdb-find-file, gud-dbx-find-file, gud-sdb-find-file, gud-gdb-find-file): - Use it for keymap inheritance. + (gud-xdb-find-file, gud-dbx-find-file, gud-sdb-find-file) + (gud-gdb-find-file): Use it for keymap inheritance. 1995-01-17 Dave Love <d.love@dl.ac.uk> @@ -4125,7 +4126,7 @@ * files.el (revert-buffer): Recompute buffer-file-truename. - * c-mode.el (indent-c-exp): Handle `{ if (x)\n foo;\n bar;' case. + * c-mode.el (indent-c-exp): Handle `{ if (x)\n foo;\n bar;' case. * cplus-md.el (indent-c++-exp): Handle `{ if (x)\n foo;\n bar;' case. * etags.el (etags-goto-tag-location): Add 1 to char positions in TAGS. @@ -4255,8 +4256,8 @@ default directory. Also, mark the *vc* output buffer unmodified. (vc-revert-buffer1): Handle font-lock mode correctly. (vc-diff, vc-print-log): vc-do-command no longer sets the default - directory, but doing so is advantageous for these cases. - (file-executable-p-18): Better portability to Emacs 18. + directory, but doing so is advantageous for these cases. + (file-executable-p-18): Better portability to Emacs 18. (vc-directory-exclusion-list, vc-file-tree-walk-internal): Implement the new variable vc-directory-exclusion-list to prune tree walks. Initial value tells it to ignore SCCS and RCS @@ -4358,7 +4359,7 @@ 1994-12-28 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * etags.el (find-tag-in-order): Don't set buffer-local value of - tags-file-name. + tags-file-name. 1994-12-27 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4518,10 +4519,10 @@ 1994-12-22 Dave Love <d.love@dl.ac.uk> - * gud.el (gdb): Correct tbreak doc string. - (gud-mode): Define a Gud menu. - (gdb): Set debugger-specific menu entries. - (sdb) (dbx) (xdb): Likewise. + * gud.el (gdb): Correct tbreak doc string. + (gud-mode): Define a Gud menu. + (gdb): Set debugger-specific menu entries. + (sdb) (dbx) (xdb): Likewise. 1994-12-22 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4532,139 +4533,139 @@ * imenu.el (imenu-always-use-completion-buffer-p): A value of `never' now means never display a completion buffer. - (imenu--completion-buffer): implement 'never behaviour. + (imenu--completion-buffer): Implement 'never behaviour. 1994-12-21 Stefan Schoef <schoef@informatik.uni-oldenburg.de> * bibtex.el: Changed keybinding for bibtex-print-help-message - (from \C-ch to \C-c?). Therefore, describe-mode is not longer on - \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to - \C-c\C-r. - (bibtex-string-files): Changed documentation. - (bibtex-mode-map): Inscriptions of menu bar changed from "Entry - Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". - (bibtex-string-files): Changed documentation. - (bibtex-mode): If environment variable BIBINPUTS isn't defined, - string files are searched in the current directory. - (bibtex-completion-candidates): Now buffer-local to allow - evaluation of different bibtex-string-files in different buffers. - (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable - that determines, if the user is allowed to edit auto-generated - reference keys before they are used. - (bibtex-generate-autokey, bibtex-clean-entry): New function to - generate an autokey if necessary. - (bibtex-autokey-names, bibtex-autokey-name-change-strings, - bibtex-autokey-name-length, bibtex-autokey-name-separator, - bibtex-autokey-year-length, bibtex-autokey-titlewords, - bibtex-autokey-title-terminators, - bibtex-autokey-titlewords-stretch, - bibtex-autokey-titleword-first-ignore, - bibtex-autokey-titleword-abbrevs, - bibtex-autokey-titleword-change-strings, - bibtex-autokey-titleword-length, - bibtex-autokey-titleword-separator, - bibtex-autokey-name-year-separator, - bibtex-autokey-year-title-separator): New variables related to - bibtex-generate-autokey. - (bibtex-find-entry-location): Optional second parameter maybedup - to tell it that entering a duplicate entry isn't to report by an - error but by the return value of the function (necessary for - bibtex-clean-entry to find the correct position of an entry with - an autogenerated key without disturbing the user with unwanted - messages). - (bibtex-help-message): New variable to avoid printing of help - messages in the echo area. - (assoc-of-regexp): New function to match an alist of regexps. - (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): - New variables to allow bibtex-complete-string to work on strings - initialized from a variable and from @String definitions in a list - of files, too. - (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to - user options. - (bibtex-mode): Changed doc string. - (many functions and variables): Changed documentation strings of - variables and functions to hold a complete sentence in the first - line. - (bibtex-print-help-message): Now line dependent and reports if it - is called outside a BibTeX field. - (validate-bibtex-buffer): Completely rewritten to validate, if - buffer is syntactically correct. - (find-bibtex-duplicates): Moved into validate-bibtex-buffer. - (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, - bibtex-ispell-entry, beginning-of-bibtex-entry, - bibtex-beginning-of-entry, end-of-bibtex-entry, - bibtex-end-of-entry, hide-bibtex-entry-bodies, - bibtex-hide-entry-bodies, narrow-to-bibtex-entry, - bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, - validate-bibtex-buffer, bibtex-validate-buffer, - find-bibtex-entry-location, bibtex-find-entry-location): All - interactive functions are renamed, so that any interface function - begins with "bibtex-". Mapping: - ispell-abstract --> bibtex-ispell-abstract - ispell-bibtex-entry --> bibtex-ispell-entry - beginning-of-bibtex-entry --> bibtex-beginning-of-entry - end-of-bibtex-entry --> bibtex-end-of-entry - hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies - narrow-to-bibtex-entry --> bibtex-narrow-to-entry - sort-bibtex-entries --> bibtex-sort-entries - validate-bibtex-buffer --> bibtex-validate-buffer - find-bibtex-entry-location --> bibtex-find-entry-location - (bibtex-maintain-sorted-entries, - bibtex-sort-ignore-string-entries): Default is now t. - (bibtex-complete-string): String list is built from additional - string list bibtex-predefined-string and current strings in file. - (string-equalp): Deleted and substituted by string-equal. - (assoc-string-equalp): Renamed to assoc-ignore-case. - (bibtex-entry): Reference key can be entered with completion. All - reference keys that are defined in buffer and all labels that - appear in crossreference entries are object to completion. - (Entry types): Changed order of entries in menu "entry types". - (bibtex-entry-field-alist): Changed order of entries slightly to - be more conform with standard BibTeX style layouts. - (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often - used types on control keys, sometimes used types on normal keys, - rarely used types on shift keys, almost never used types on meta - keys). - (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart - widen and function hide-bibtex-entry-bodies and counterpart - show-all bounded to appropriate local keys. - (bibtex-abbrev-table): Deleted - (bibtex-current-entry-label, put-string-on-kill-ring): Deleted - (AUCTeX provides all the functionality needed for citation - completion). - (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, - bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and - bibtex-pop-next were to slow for larger BibTeX files). - (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous - or next entry are changed to actual delimters if necessary. - (bibtex-entry): Fixed bug (False entry wasn't reported in error - message if bibtex-entry was called with undefined reference name). - (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, - bibtex-next-field, bibtex-clean-entry): Every reference entry now - contains a comment in addition to the name of the reference. This - comment appears in the echo area if you start editing that field - (after calling bibtex-next-field). - (bibtex-include-OPTcrossref, bibtex-entry): Changed - bibtex-include-OPTcrossref from single boolean variable to hold a - list of reference names which should have a crossref field. - (bibtex-complete-word): New function, which completes word - fragment before point to the longest prefix of predefined strings - in the buffer in the same way that ispell-complete-word operates - for words found in the dictionary. - (bibtex-reference-head): Start of bibtex-reference-head changed - from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and - bibtex-pop-next didn't work, probably due to a bug in - re-search-forward). - (several functions): Added support for {} as field delimiters - (better than '"' for accented characters. - (bibtex-clean-entry): If optional field crossref is empty or - missing, former optional fields (if bibtex-include-OPTcrossref was - t) are necessary again. bibtex-clean-entry complains if they are - empty but not if they are missing, so you can intenionally omit - them, e. g. for a pseudo @Journal entry (needed for - crossreferences) made out of an @article with missing non-optional - fields. - Menu bar entries aren't centered anymore. + (from \C-ch to \C-c?). Therefore, describe-mode is not longer on + \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to + \C-c\C-r. + (bibtex-string-files): Changed documentation. + (bibtex-mode-map): Inscriptions of menu bar changed from "Entry + Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". + (bibtex-string-files): Changed documentation. + (bibtex-mode): If environment variable BIBINPUTS isn't defined, + string files are searched in the current directory. + (bibtex-completion-candidates): Now buffer-local to allow + evaluation of different bibtex-string-files in different buffers. + (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable + that determines, if the user is allowed to edit auto-generated + reference keys before they are used. + (bibtex-generate-autokey, bibtex-clean-entry): New function to + generate an autokey if necessary. + (bibtex-autokey-names, bibtex-autokey-name-change-strings, + bibtex-autokey-name-length, bibtex-autokey-name-separator, + bibtex-autokey-year-length, bibtex-autokey-titlewords, + bibtex-autokey-title-terminators, + bibtex-autokey-titlewords-stretch, + bibtex-autokey-titleword-first-ignore, + bibtex-autokey-titleword-abbrevs, + bibtex-autokey-titleword-change-strings, + bibtex-autokey-titleword-length, + bibtex-autokey-titleword-separator, + bibtex-autokey-name-year-separator, + bibtex-autokey-year-title-separator): New variables related to + bibtex-generate-autokey. + (bibtex-find-entry-location): Optional second parameter maybedup + to tell it that entering a duplicate entry isn't to report by an + error but by the return value of the function (necessary for + bibtex-clean-entry to find the correct position of an entry with + an autogenerated key without disturbing the user with unwanted + messages). + (bibtex-help-message): New variable to avoid printing of help + messages in the echo area. + (assoc-of-regexp): New function to match an alist of regexps. + (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): + New variables to allow bibtex-complete-string to work on strings + initialized from a variable and from @String definitions in a list + of files, too. + (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to + user options. + (bibtex-mode): Changed doc string. + (many functions and variables): Changed documentation strings of + variables and functions to hold a complete sentence in the first + line. + (bibtex-print-help-message): Now line dependent and reports if it + is called outside a BibTeX field. + (validate-bibtex-buffer): Completely rewritten to validate, if + buffer is syntactically correct. + (find-bibtex-duplicates): Moved into validate-bibtex-buffer. + (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, + bibtex-ispell-entry, beginning-of-bibtex-entry, + bibtex-beginning-of-entry, end-of-bibtex-entry, + bibtex-end-of-entry, hide-bibtex-entry-bodies, + bibtex-hide-entry-bodies, narrow-to-bibtex-entry, + bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, + validate-bibtex-buffer, bibtex-validate-buffer, + find-bibtex-entry-location, bibtex-find-entry-location): All + interactive functions are renamed, so that any interface function + begins with "bibtex-". Mapping: + ispell-abstract --> bibtex-ispell-abstract + ispell-bibtex-entry --> bibtex-ispell-entry + beginning-of-bibtex-entry --> bibtex-beginning-of-entry + end-of-bibtex-entry --> bibtex-end-of-entry + hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies + narrow-to-bibtex-entry --> bibtex-narrow-to-entry + sort-bibtex-entries --> bibtex-sort-entries + validate-bibtex-buffer --> bibtex-validate-buffer + find-bibtex-entry-location --> bibtex-find-entry-location + (bibtex-maintain-sorted-entries, + bibtex-sort-ignore-string-entries): Default is now t. + (bibtex-complete-string): String list is built from additional + string list bibtex-predefined-string and current strings in file. + (string-equalp): Deleted and substituted by string-equal. + (assoc-string-equalp): Renamed to assoc-ignore-case. + (bibtex-entry): Reference key can be entered with completion. All + reference keys that are defined in buffer and all labels that + appear in crossreference entries are object to completion. + (Entry types): Changed order of entries in menu "entry types". + (bibtex-entry-field-alist): Changed order of entries slightly to + be more conform with standard BibTeX style layouts. + (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often + used types on control keys, sometimes used types on normal keys, + rarely used types on shift keys, almost never used types on meta + keys). + (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart + widen and function hide-bibtex-entry-bodies and counterpart + show-all bounded to appropriate local keys. + (bibtex-abbrev-table): Deleted + (bibtex-current-entry-label, put-string-on-kill-ring): Deleted + (AUCTeX provides all the functionality needed for citation + completion). + (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, + bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and + bibtex-pop-next were to slow for larger BibTeX files). + (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous + or next entry are changed to actual delimters if necessary. + (bibtex-entry): Fixed bug (False entry wasn't reported in error + message if bibtex-entry was called with undefined reference name). + (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, + bibtex-next-field, bibtex-clean-entry): Every reference entry now + contains a comment in addition to the name of the reference. This + comment appears in the echo area if you start editing that field + (after calling bibtex-next-field). + (bibtex-include-OPTcrossref, bibtex-entry): Changed + bibtex-include-OPTcrossref from single boolean variable to hold a + list of reference names which should have a crossref field. + (bibtex-complete-word): New function, which completes word + fragment before point to the longest prefix of predefined strings + in the buffer in the same way that ispell-complete-word operates + for words found in the dictionary. + (bibtex-reference-head): Start of bibtex-reference-head changed + from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and + bibtex-pop-next didn't work, probably due to a bug in + re-search-forward). + (several functions): Added support for {} as field delimiters + (better than '"' for accented characters. + (bibtex-clean-entry): If optional field crossref is empty or + missing, former optional fields (if bibtex-include-OPTcrossref was + t) are necessary again. bibtex-clean-entry complains if they are + empty but not if they are missing, so you can intenionally omit + them, e. g. for a pseudo @Journal entry (needed for + crossreferences) made out of an @article with missing non-optional + fields. + Menu bar entries aren't centered anymore. 1994-12-21 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4677,8 +4678,8 @@ 1994-12-21 Dave Love <d.love@dl.ac.uk> - * gud.el (gud-irixdbx-marker-filter): Changes for Irix dbx. - (dbx): gud-up, gud-down are now special cases for Irix. + * gud.el (gud-irixdbx-marker-filter): Changes for Irix dbx. + (dbx): gud-up, gud-down are now special cases for Irix. 1994-12-21 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4687,8 +4688,8 @@ 1994-12-21 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * tex-mode.el (tex-shell-map,tex-start-shell): Start with - shell-mode-map. + * tex-mode.el (tex-shell-map, tex-start-shell): Start with + shell-mode-map. 1994-12-21 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4722,7 +4723,7 @@ 1994-12-19 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * tex-mode.el (tex-start-shell): Use comint prompt and mode-map. + * tex-mode.el (tex-start-shell): Use comint prompt and mode-map. 1994-12-18 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4761,7 +4762,7 @@ and pass it along to vc-next-action. * font-lock.el (font-lock-hack-keywords): Turn off undo generation. - (font-lock-unfontify-region. font-lock-fontify-region): Likewise. + (font-lock-unfontify-region, font-lock-fontify-region): Likewise. * c-mode.el (indent-c-exp): Don't be fooled by else_ or while_. (c-indent-line): Likewise. @@ -4790,7 +4791,7 @@ * replace.el (perform-replace): Report number of replacements when done. (query-replace, query-replace-regexp, replace-string) - (map-query-replace-regexp. replace-regexp): No message here. + (map-query-replace-regexp, replace-regexp): No message here. 1994-12-13 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -4824,20 +4825,20 @@ 1994-12-09 Ken Stevens <stevensk@afit.af.mil> * ispell.el: Added ispell-offset for version consistency. - (ispell-dictionary-alist): updated dictionaries & better match defaults - (ispell-alternate-dictionary): added /usr/shar path - (ispell-menu-map-needed): redo changes that made this incompatible - with earlier versions of emacs19. - (ispell-required-version): changed to assure version 3.1.12 accessed. + (ispell-dictionary-alist): Updated dictionaries & better match defaults + (ispell-alternate-dictionary): Added /usr/shar path + (ispell-menu-map-needed): Redo changes that made this incompatible + with earlier versions of Emacs19. + (ispell-required-version): Changed to assure version 3.1.12 accessed. (ispell-word): Correctly accept buffer-local information. - Does not try to modify read-only buffer on 'm' command. - (ispell-command-loop): fixed bug that corrupted buffers. - removed scrolling when *Choices* buffer shrinks. + Does not try to modify read-only buffer on 'm' command. + (ispell-command-loop): Fixed bug that corrupted buffers. + removed scrolling when *Choices* buffer shrinks. (check-ispell-version): Correctly identifies new version requirements. (ispell-region): Interaction updated for version 3.1.12+ Buffer read-only modification improvement. Dictionary messages added. - (ispell-message-text-end): skips additional shell files. - (ispell-buffer-local-parsing): extended-char mode now matches text mode + (ispell-message-text-end): Skips additional shell files. + (ispell-buffer-local-parsing): extended-char mode now matches text mode. 1994-12-09 Karl Heuer <kwzh@nutrimat.gnu.ai.mit.edu> @@ -4857,8 +4858,8 @@ 1994-12-08 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * cal-mayan.el (calendar-mayan-days-before-absolute-zero): Mention - Hochleitner's correlation. + * cal-mayan.el (calendar-mayan-days-before-absolute-zero): Mention + Hochleitner's correlation. 1994-12-07 Richard Stallman <rms@green-hill> @@ -4979,7 +4980,7 @@ 1994-11-30 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * compile.el (compilation-next-error-locus): Parsed column numbers - are 1-origin. + are 1-origin. 1994-11-29 Richard Stallman <rms@bethel> @@ -4989,9 +4990,9 @@ 1994-11-29 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * cal-x.el: New file. + * cal-x.el: New file. - * calendar.el: Mention cal-x.el in comments. + * calendar.el: Mention cal-x.el in comments. 1994-11-28 Richard Stallman <rms@bethel> @@ -5067,7 +5068,7 @@ 1994-11-21 Per Bothner <bothner@kalessin.cygnus.com> - * term.el (term-termcap-format): Add cd capability. Fix ei. + * term.el (term-termcap-format): Add cd capability. Fix ei. (term-exec-1): Pass $TERMINFO instead of $TERMCAP if appropriate. Pass emacs-version and term-version in $TERM. Rewrite to set process-environment. @@ -5145,7 +5146,7 @@ 1994-11-15 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * etags.el (tags-query-replace): Use query-replace-read-args in - interactive spec. + interactive spec. 1994-11-15 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -5217,7 +5218,7 @@ 1994-11-10 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * compile.el (compile): With prefix arg, prompt even if (not - compilation-read-command). + compilation-read-command). (compilation-error-regexp-alist): Make first regexp match column numbers too. Remove regexp for "prog:file:line: error". Replace GNAT 1.82 regexp with "prog: file:line\(:col\)?: error". @@ -5297,7 +5298,7 @@ 1994-11-07 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * solar.el (solar-sunrise-sunset): Check for nil time before + * solar.el (solar-sunrise-sunset): Check for nil time before trying to adjust it for dst. 1994-11-07 Francesco Potorti` (pot@cnuce.cnr.it) @@ -5404,7 +5405,7 @@ 1994-10-30 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * calendar.el (calendar-mode): Delete to window configuration var. + * calendar.el (calendar-mode): Delete to window configuration var. 1994-10-30 Richard Stallman <rms@pogo.gnu.ai.mit.edu> @@ -5428,7 +5429,7 @@ 1994-10-29 Ed Reingold <reingold@albert.gnu.ai.mit.edu> * calendar.el (calendar, calendar-other-month): Fix use of - calendar-read-date. + calendar-read-date. (calendar-read-date): Fix noday option. * lunar.el (phases-of-moon): Fix use of calendar-read-date. @@ -5542,7 +5543,7 @@ (calendar-latitude, calendar-longitude, calendar-location): Include vector form; suggest setting values in site-local.el. (solar-sin-degrees, solar-cosine-degrees): Change to macros. - (solar-degrees-to-hours, solar-hours-to-days): Change to defsubst. + (solar-degrees-to-hours, solar-hours-to-days): Change to defsubst. (solar-sunrise, solar-sunset): Allow use of vector forms of latitude/longitude. (calendar-latitude, calendar-longitude): New macros to allow use @@ -5594,13 +5595,13 @@ 1994-10-24 Francesco Potorti` (pot@cnuce.cnr.it) - * man.el (Man-cleanup-manpage): do all the work if called + * man.el (Man-cleanup-manpage): Do all the work if called interactively. 1994-10-23 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * dired.el (dired-mode-map): Add query-replace and search items to - operate menu. + operate menu. 1994-10-23 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -5634,7 +5635,7 @@ 1994-10-22 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * dired-aux.el (dired-do-tags-search, - dired-do-tags-query-replace): New functions. + dired-do-tags-query-replace): New functions. * dired.el (dired-mode-map): Bind A to dired-do-tags-search, Q to dired-do-tags-query-replace. @@ -5664,10 +5665,10 @@ 1994-10-20 Noah Friedman <friedman@splode.com> - * timer.el (timer-error, timer-abnormal-termination, - timer-filter-error): New error conditions. - (timer-process-filter, timer-process-sentinel): Signal an error, - don't just print a message. + * timer.el (timer-error, timer-abnormal-termination, + timer-filter-error): New error conditions. + (timer-process-filter, timer-process-sentinel): Signal an error, + don't just print a message. 1994-10-20 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -5700,9 +5701,9 @@ 1994-10-19 Noah Friedman <friedman@splode.com> - * timer.el (timer-program): Make defvar, not defconst. - Expand name of timer program in exec-directory here. - (run-at-time): Not here. + * timer.el (timer-program): Make defvar, not defconst. + Expand name of timer program in exec-directory here. + (run-at-time): Not here. 1994-10-19 Boris Goldowsky <boris@cs.rochester.edu> @@ -5713,7 +5714,7 @@ * facemenu.el (facemenu-add-new-face): New function. * facemenu.el (facemenu-update): Don't redo top-level menu; nothing should change. Move menu setup to defvars. Use - facemenu-add-new-face. Changed global binding to C-down-mouse-3. + facemenu-add-new-face. Changed global binding to C-down-mouse-3. * facemenu.el (facemenu-menu): "Update" item removed; should no longer be needed interactively. * facemenu.el (facemenu-complete-face-list): Just return faces, @@ -5767,7 +5768,7 @@ 1994-10-17 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> - * paths.el (rmail-spool-directory): Add a condition to test + * paths.el (rmail-spool-directory): Add a condition to test the Bull DPX/2. 1994-10-17 Morten Welinder <terra@mole.gnu.ai.mit.edu> @@ -5895,7 +5896,7 @@ * facemenu.el (facemenu-read-color, facemenu-colors): New fn, var. (facemenu-set-face, facemenu-set-face-from-menu, - facemenu-after-change): Face property can take a list value; add + facemenu-after-change): Face property can take a list value; add to it rather than completely replacing the property. (facemenu-add-face, facemenu-discard-redundant-faces): New functions. @@ -6149,13 +6150,13 @@ 1994-10-06 Noah Friedman <friedman@splode.com> - * type-break.el: Do not call type-break-mode upon loading. - (type-break-time-sum): New function. - (type-break-schedule): Use it. Make function interactive. - (type-break-guestimate-keystroke-threshold): Use `N' interactive - spec, not `n'. - (type-break-demo-boring): Show elapsed time of break, or number of - minutes left for good break. + * type-break.el: Do not call type-break-mode upon loading. + (type-break-time-sum): New function. + (type-break-schedule): Use it. Make function interactive. + (type-break-guestimate-keystroke-threshold): Use `N' interactive + spec, not `n'. + (type-break-demo-boring): Show elapsed time of break, or number of + minutes left for good break. 1994-10-06 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -6196,10 +6197,10 @@ * perl-mode.el (perl-font-lock-keywords): New variable. - * pascal.el (pascal-font-lock-keywords): New variable. + * pascal.el (pascal-font-lock-keywords): New variable. (pascal-mode): Set comment-start-skip and comment-end. - * font-lock.el: (font-lock-mode): Doc fix; use add/remove-hook, not + * font-lock.el (font-lock-mode): Doc fix; use add/remove-hook, not setq; removed make-local-variable of font-lock-no-comments. (font-lock-set-defaults): Do it there, and use: (font-lock-defaults-alist): Use it to set font-lock-keywords, @@ -6207,14 +6208,14 @@ (turn-on-font-lock): New function. (font-lock-fontify-buffer): Made interruptible; deleted messages. - * font-lock.el: (font-lock-fontify-region): Made syntax state reliable + * font-lock.el (font-lock-fontify-region): Made syntax state reliable by widening within new restriction; let cstart and cend for speed; outputs message. (font-lock-after-change-function): Remove spurious goto-char and use forward-line, not 1+ end-of-line, for end of fontification region. (font-lock-any-properties-p): Removed, use text-property-not-all. - * font-lock.el (font-lock-*-face): facename values are themselves. + * font-lock.el (font-lock-*-face): Facename values are themselves. (font-lock-variable-name-face, font-lock-reference-face): New vars. (font-lock-doc-string-face): Removed. (font-lock-keywords): Extended value syntax. @@ -6383,8 +6384,8 @@ 1994-09-30 Francesco Potorti` (pot@cnuce.cnr.it) - * man.el (Man-init-defvars, Man-cleanup-manpage, - Man-fontify-manpage): fix previous fix. + * man.el (Man-init-defvars, Man-cleanup-manpage) + (Man-fontify-manpage): Fix previous fix. 1994-09-30 Michael Ernst <mernst@research.microsoft.com> @@ -6468,18 +6469,18 @@ 1994-09-27 Christopher J. Madsen <ac608@yfn.ysu.edu> - * files.el (hack-one-local-variable): + * files.el (hack-one-local-variable): Support safe-local-variable property. (compile-command): Add safe-local-variable property. 1994-09-27 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * etags.el (etags-tags-completion-table): Allow ? and : in guessed - tag names. + tag names. 1994-09-26 Joe Ramey <ramey@csc.ti.com> - * rmailsum.el (rmail-summary-delete-forward): Regexp for + * rmailsum.el (rmail-summary-delete-forward): Regexp for recognizing deleted message should not require a space at the beginning of the line. @@ -6574,7 +6575,7 @@ * cc-mode.el (c-just-after-func-arglist-p) (c-guess-basic-syntax, c-lineup-objc-method-args-2): - More objc patches from Lele + More objc patches from Lele. * cc-mode.el (c-indent-command): With optional arg, shift-amt had wrong sign. @@ -6586,7 +6587,6 @@ recognize empty arglists with close paren on separate line. * cc-mode.el (c-mode-menu, c-emacs-features, c-mode-map) - (c-common-init): Remove dependency on string "Lucid" in emacs-version. Use features to distinguish. @@ -6615,7 +6615,7 @@ * cc-mode.el (c-offsets-alist-default, c-offsets-alist) (c-guess-basic-syntax): - Changed syntactic symbol c++-funcdecl-cont to ansi-funcdecl-cont + Changed syntactic symbol c++-funcdecl-cont to ansi-funcdecl-cont. * cc-mode.el (c-offsets-alist, c-read-offset, c-set-offset): Accept variable symbols as offsets. @@ -6728,7 +6728,7 @@ 1994-09-23 Jonathan I. Kamens (jik@gza-client1) - * files.el (find-alternate-file): Confirm killing buffer + * files.el (find-alternate-file): Confirm killing buffer only if it is visiting a file. 1994-09-23 Roland McGrath <roland@churchy.gnu.ai.mit.edu> @@ -6812,8 +6812,8 @@ * rmail.el (rmail-ignored-headers): Add resent-message-id. - * simple.el (insert-buffer): Default to first other buffer, - not first non-visible buffer. + * simple.el (insert-buffer): Default to first other buffer, + not first non-visible buffer. 1994-09-21 Erik Naggum <erik@naggum.no> @@ -6843,57 +6843,57 @@ 1994-09-19 Francesco Potorti` <pot@cnuce.cnr.it> - * man.el (Man-notify-flag): replaces the old Man-notify + * man.el (Man-notify-flag): Replaces the old Man-notify variable, use the old one if it is bound as initial value. - (Man-reuse-okay-flag): replaces Man-reuse-okay. - (Man-downcase-section-letters-flag): replaces + (Man-reuse-okay-flag): Replaces Man-reuse-okay. + (Man-downcase-section-letters-flag): Replaces Man-downcase-section-letters. - (Man-circular-pages-flag): replaces Man-circular-pages. - (Man-auto-section-alist): variable deleted. - (Man-section-translations-alist): removed the "3x" translation. - (Man-untabify-command, Man-untabify-command-args): new vars. - (Man-sed-command, Man-awk-command): new variables. - (Man-sysv-sed-script, Man-berkeley-sed-script): new constants. - (Man-name-regexp, Man-page-header-regexp): new variable. - (Man-heading-regexp): changed default value. - (Man-reference-regexp): now refers to previous regexps. - (Man-arguments): new buffer-local variable. - (Man-page-mode-string): changed default value. - (Man-mode-map): changed the meanings of ",", ".", "q". Added new + (Man-circular-pages-flag): Replaces Man-circular-pages. + (Man-auto-section-alist): Variable deleted. + (Man-section-translations-alist): Removed the "3x" translation. + (Man-untabify-command, Man-untabify-command-args): New vars. + (Man-sed-command, Man-awk-command): New variables. + (Man-sysv-sed-script, Man-berkeley-sed-script): New constants. + (Man-name-regexp, Man-page-header-regexp): New variable. + (Man-heading-regexp): Changed default value. + (Man-reference-regexp): Now refers to previous regexps. + (Man-arguments): New buffer-local variable. + (Man-page-mode-string): Changed default value. + (Man-mode-map): Changed the meanings of ",", ".", "q". Added new keys ">", "<", "k". - (Man-page-mode-string): function deleted. + (Man-page-mode-string): Function deleted. (Man-init-defvars): New function used for initialising the system and environment dependent variables Man-fontify-manpage-flag, Man-uses-untabify, Man-sed-script, Man-filter-list. - (Man-delete-trailing-newlines): function deleted. - (Man-make-page-mode-string): new subst. - (Man-build-man-command): now subst instead of function. Modified + (Man-delete-trailing-newlines): Function deleted. + (Man-make-page-mode-string): New subst. + (Man-build-man-command): Now subst instead of function. Modified to comply with the new format of Man-filter-list. - (Man-downcase): function deleted. - (Man-translate-references): complete rewrite. - (Man-linepos): function deleted. - (Man-match-substring): new function. - (Man-default-man-args): function deleted. - (Man-default-man-entry): complete rewrite. - (man, manual-entry): function-alias relationship reversed. - (man): prompt changed, prompt using interactive, call + (Man-downcase): Function deleted. + (Man-translate-references): Complete rewrite. + (Man-linepos): Function deleted. + (Man-match-substring): New function. + (Man-default-man-args): Function deleted. + (Man-default-man-entry): Complete rewrite. + (man, manual-entry): Function-alias relationship reversed. + (man): Prompt changed, prompt using interactive, call Man-init-defvars, set Man-arguments. - (Man-notify-when-ready): manage the 'pushy value. - (Man-fontify-manpage): substitute Man-set-fonts. - (Man-cleanup-manpage): new function. - (Man-bgproc-sentinel): cleanup, call Man-fontify-manpage and + (Man-notify-when-ready): Manage the 'pushy value. + (Man-fontify-manpage): Substitute Man-set-fonts. + (Man-cleanup-manpage): New function. + (Man-bgproc-sentinel): Cleanup, call Man-fontify-manpage and Man-cleanup-page when necessary. - (Man-mode): call Man-strip-page-headers and Man-unindent. + (Man-mode): Call Man-strip-page-headers and Man-unindent. (Man-build-section-alist, Man-build-references-alist, Man-build-page-list): substs instead of functions. - (Man-build-references-alist): cleanup. - (Man-build-page-list): new algorithm. - (Man-strip-page-headers, Man-unindent): new substs. - (Man-find-section): assume section names start in column 1. - (Man-quit): bury the buffer instead of killing it, delete the + (Man-build-references-alist): Cleanup. + (Man-build-page-list): New algorithm. + (Man-strip-page-headers, Man-unindent): New substs. + (Man-find-section): Assume section names start in column 1. + (Man-quit): Bury the buffer instead of killing it, delete the frame when necessary. - (Man-kill): new function. - (Man-goto-page): do the right thing when the manpage is not found, + (Man-kill): New function. + (Man-goto-page): Do the right thing when the manpage is not found, do not assume that Man-build-references-alist is broken. 1994-09-21 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -6948,14 +6948,14 @@ (describe-display-table): Describe the window border glyph. (display-table-len): New constant. (make-display-table, standard-display-8bit, - standard-display-default, standard-display-ascii, - standard-display-g1, standard-display-graphic, - standard-display-underline): Use display-table-len, instead of - hard-coding the display table length. + standard-display-default, standard-display-ascii, + standard-display-g1, standard-display-graphic, + standard-display-underline): Use display-table-len, instead of + hard-coding the display table length. 1994-09-19 Francesco Potorti` <pot@cnuce.cnr.it> - * rlogin.el (rlogin): recognise the `-l user' option to rlogin and + * rlogin.el (rlogin): Recognise the `-l user' option to rlogin and let comint and ange-ftp know about the correct home directory. 1994-09-19 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -6994,16 +6994,16 @@ (rmail-find-all-files, rmail-list-to-menu): New functions. (rmail-construct-io-menu): New functions. (rmail-input-menu): Function deleted. - (rmail). Call rmail-construct-io-menu. + (rmail): Call rmail-construct-io-menu. (rmail-mode-map): 'Input Rmail file (menu)' renamed to - 'Input Rmail file'. 'Output (Rmail menu)' renamed to + 'Input Rmail file'. 'Output (Rmail menu)' renamed to 'Output Rmail file'. * rmailout.el (rmail-output-menu): Function deleted. * rmailsum.el (rmail-summary-construct-io-menu): New function. (rmail-new-summary): Call rmail-summary-construct-io-menu. (rmail-summary-mode-map): New menu items 'Input Rmail File' and 'Output Rmail File'. - (rmail-summary-output-to-rmail-file): New arg 'file-name'. If it + (rmail-summary-output-to-rmail-file): New arg 'file-name'. If it non-nil, call rmail-output-to-rmail-file. 1994-09-18 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -7089,7 +7089,7 @@ 1994-09-16 Karl Heuer <kwzh@churchy.gnu.ai.mit.edu> - * emacsbug.el: (report-emacs-bug): Insert configuration options. + * emacsbug.el (report-emacs-bug): Insert configuration options. * ispell.el (ispell-menu-map): Order menu items by size: buffer > region > word. @@ -7104,7 +7104,7 @@ (Info-edit-mode): Put them here. Also enable undo, and call Info-edit-mode-hook. - * time.el: (display-time-24hr-format): Doc fix. + * time.el (display-time-24hr-format): Doc fix. (display-time-filter): Reenable code that got deleted during a mispatch. @@ -7166,11 +7166,11 @@ expressions to include backup files with version numbers. * jka-compr.el (jka-compr-insert-file-contents): Run the - functions in after-insert-file-functions after the - buffer-file-name has been set, not before. + functions in after-insert-file-functions after the + buffer-file-name has been set, not before. * jka-compr.el (jka-compr-insert-file-contents): Properly - handle the 'replace' argument for compressed files. + handle the 'replace' argument for compressed files. 1994-09-15 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -7283,7 +7283,7 @@ 1994-09-05 Lawrence R. Dodd <dodd@roebling.poly.edu> - * dired-x.el: (dired-omit-expunge): Avoid setting buffer modified + * dired-x.el (dired-omit-expunge): Avoid setting buffer modified unless it was modified before and some mark is set so `%*' won't appear in mode-line of omitted buffers. @@ -7341,9 +7341,9 @@ 1994-09-01 Francesco Potorti` (pot@cnuce.cnr.it) - * cmacexp.el (c-macro-prompt-flag): set default to t. + * cmacexp.el (c-macro-prompt-flag): Set default to t. (c-macro-expand): buffer-flush-undo is outdated. - (c-macro-expansion): make exit-status a local variable. + (c-macro-expansion): Make exit-status a local variable. 1994-09-01 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -7446,7 +7446,7 @@ * lpr.el (lpr-headers-switches): Don't use -p on dgux, irix. * edebug.el (edebug-read-and-maybe-wrap-form): Increment - max-specpdl-size by 2000. + max-specpdl-size by 2000. * jka-compr.el (jka-compr-insert-file-contents): Run the after-insert-file-functions. @@ -7517,7 +7517,7 @@ 1994-08-13 Richard Stallman <rms@mole.gnu.ai.mit.edu> * cmacexp.el (c-macro-expansion): If the CPP output is empty, just - show error messages. + show error messages. * mouse.el (mouse-set-mark): Select the window before saving point. @@ -7539,7 +7539,7 @@ * compile.el (compilation-set-window-height): Add save-excursion. * rmail.el (rmail-maybe-display-summary): Don't set summary window - height if its frame isn't split. + height if its frame isn't split. * subr.el (one-window-p): Doc fix. @@ -7882,9 +7882,9 @@ * imenu.el (imenu, imenu--flatten-index-alist): Add marker support. (imenu--cleanup): New function. - (imenu-example--name-and-position): Now uses markers. + (imenu-example--name-and-position): Now uses markers. - * imenu.el (imenu-add-to-menubar): New function to add an entry + * imenu.el (imenu-add-to-menubar): New function to add an entry to the menubar for the buffer's current local keymap. 1994-07-29 Richard Stallman <rms@mole.gnu.ai.mit.edu> @@ -7975,10 +7975,10 @@ 1994-07-25 Johan Vromans (jv@squirrel.NL.net) - * forms.el (forms-read-file-filter): new hook function to + * forms.el (forms-read-file-filter): New hook function to preprocess file contents before being passed to forms mode. - (forms-write-file-filter): new hook function to preprocess file - contents before it is being saved to disk. Can be used to undo the + (forms-write-file-filter): New hook function to preprocess file + contents before it is being saved to disk. Can be used to undo the effects of `forms-read-file-filter'. (forms-mode): Supply a default format if no `forms-format-list' was specified. @@ -8022,7 +8022,7 @@ 1994-07-24 Erik Naggum <erik@naggum.no> - * dired.el (dired-internal-noselect): a zero modtime means + * dired.el (dired-internal-noselect): A zero modtime means directory is unchanged. 1994-07-23 David Robinson (drtr@mail.ast.cam.ac.uk) @@ -8054,8 +8054,8 @@ 1994-07-22 Ed Reingold <reingold@albert.gnu.ai.mit.edu> - * cal-menu.el (calendar-mode-map): Change reference from renamed - calendar-current-month to calendar-goto-today. + * cal-menu.el (calendar-mode-map): Change reference from renamed + calendar-current-month to calendar-goto-today. 1994-07-20 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8111,7 +8111,7 @@ 1994-07-19 Michael Kifer (kifer@cs.sunysb.edu) - * ediff.el (ediff-find-file, ediff-files-internal, ediff-patch-file): + * ediff.el (ediff-find-file, ediff-files-internal, ediff-patch-file): Modified to work with remote and compressed files. * ediff.el (ediff-read-file-name, ediff-buffers): Better defaults. @@ -8139,7 +8139,7 @@ New or modified functions and variables attempting to prohibit submission of empty bug reporters. - * reporter.el: (reporter-prompt-for-summary-p): Default value now nil. + * reporter.el (reporter-prompt-for-summary-p): Default value now nil. * reporter.el (reporter-dump-state): Make sure there's a final newline after the setq sexp. @@ -8206,15 +8206,15 @@ 1994-07-13 Noah Friedman (friedman@splode.com) - * rsz-mini.el: (resize-minibuffer-setup): Copy post-command-hook - when handling minibuffer windows in other frames, not just - minibuffer-exclusive frames. - Resize the minibuffer window/frame now, in case it has already - been initialized with text. + * rsz-mini.el (resize-minibuffer-setup): Copy post-command-hook + when handling minibuffer windows in other frames, not just + minibuffer-exclusive frames. + Resize the minibuffer window/frame now, in case it has already + been initialized with text. 1994-07-13 Ed Reingold (reingold@albert.gnu.ai.mit.edu) - * diary-lib.el: Correct file name on last line of file. + * diary-lib.el: Correct file name on last line of file. 1994-07-13 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8278,7 +8278,7 @@ * indent.el (move-to-tab-stop): Delete spurious multiple definition. -1994-07-11 Kevin Rodgers <kevinr@ihs.com> (tiny change) +1994-07-11 Kevin Rodgers <kevinr@ihs.com> (tiny change) * mailabbrev.el (define-mail-abbrev): Don't try to parse empty aliases. @@ -8302,7 +8302,7 @@ * lisp.el (lisp-complete-symbol): Bind completion-fixup-function. * mouse.el (mouse-choose-completion): Use mouse-face properties to - find string to use. + find string to use. * simple.el (completion-setup-function): Put on mouse-face prop even if no window-system. Call completion-fixup-function if not nil. @@ -8361,7 +8361,7 @@ * gud.el (gud-mips-p): Check for OSF system on Alpha also. - * files.el (process-environment, exec-path, load-path,exec-directory): + * files.el (process-environment, exec-path, load-path, exec-directory): Mark these as risky. (hack-one-local-variable): Treat vars ending in -program and -command as risky. @@ -8403,7 +8403,7 @@ 1994-07-06 Ed Reingold (reingold@albert.gnu.ai.mit.edu) - * diary-lib.el (fancy-diary-display): Consistently turn off selective + * diary-lib.el (fancy-diary-display): Consistently turn off selective display in diary buffer before doing anything. 1994-07-06 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8446,9 +8446,9 @@ 1994-07-05 Ed Reingold (reingold@albert.gnu.ai.mit.edu) - * calendar.el (generate-calendar-month): Make highlighted text for - mouse-2 a one character wide for single-digit dates (this undoes - the incorrect fix of May 30, 1994). + * calendar.el (generate-calendar-month): Make highlighted text for + mouse-2 a one character wide for single-digit dates (this undoes + the incorrect fix of May 30, 1994). 1994-07-04 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8460,7 +8460,7 @@ 1994-07-04 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * add-log.el (add-change-log-entry): Apply expand-file-name to - FILE-NAME. + FILE-NAME. 1994-07-03 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8490,7 +8490,7 @@ 1994-07-02 Morten Welinder (terra@diku.dk) * meese.el: Use add-hook, (provide 'meese). - (protect-innocence-hook): compare expanded file names for the sake + (protect-innocence-hook): Compare expanded file names for the sake of non-unix file systems. Use expand-file-name instead of concat to create "celibacy.1" file name. Check that the "sex.6" exists. @@ -8512,7 +8512,7 @@ * bytecomp.el (byte-compile-defalias): Fix typo in prev change. - * bytecomp.el (byte-compile-callargs-warn): Handle function defnition + * bytecomp.el (byte-compile-callargs-warn): Handle function definition that is not a lambda expression or byte code function. (byte-compile-arglist-warn): Likewise. (byte-compile-defalias): New function, used to compile defalias. @@ -8563,8 +8563,8 @@ 1994-06-29 Noah Friedman (friedman@splode.com) - * comint.el (comint-password-prompt-regexp): New variable. - (comint-watch-for-password-prompt): Use it. + * comint.el (comint-password-prompt-regexp): New variable. + (comint-watch-for-password-prompt): Use it. 1994-06-29 Richard Stallman (rms@gnu.ai.mit.edu) @@ -8581,11 +8581,11 @@ 1994-06-28 Lawrence R. Dodd (dodd@roebling.poly.edu) - * dired-x.el (dired-x-hands-off-my-keys): New user-defined variable. - (dired-x-bind-find-file): Use it. - (dired-x-find-file): New function to substitute find-file. - (dired-x-find-file-other-window): New function to substitute - find-file-other-window. + * dired-x.el (dired-x-hands-off-my-keys): New user-defined variable. + (dired-x-bind-find-file): Use it. + (dired-x-find-file): New function to substitute find-file. + (dired-x-find-file-other-window): New function to substitute + find-file-other-window. 1994-06-28 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8715,19 +8715,19 @@ 1994-06-22 Noah Friedman (friedman@splode.com) - * rsz-mini.el (resize-minibuffer-window-exactly, - resize-minibuffer-frame, resize-minibuffer-frame-exactly): Doc - fixes. - (resize-minibuffer-frame-exactly): make default t. - (resize-minibuffer-frame-original-height): New variable. - (resize-minibuffer-setup): Set it locally in the minibuffer. - (resize-minibuffer-frame): Use it instead of minibuffer-frame-alist's - height. - (resize-minibuffer-setup): Append resize-minibuffer-window and - resize-minibuffer-frame to the end of post-command-hook, don't - insert on the front. - (resize-minibuffer-window-restore): New function. - (resize-minibuffer-setup): Put it on minibuffer-exit-hook. + * rsz-mini.el (resize-minibuffer-window-exactly, + resize-minibuffer-frame, resize-minibuffer-frame-exactly): Doc + fixes. + (resize-minibuffer-frame-exactly): Make default t. + (resize-minibuffer-frame-original-height): New variable. + (resize-minibuffer-setup): Set it locally in the minibuffer. + (resize-minibuffer-frame): Use it instead of minibuffer-frame-alist's + height. + (resize-minibuffer-setup): Append resize-minibuffer-window and + resize-minibuffer-frame to the end of post-command-hook, don't + insert on the front. + (resize-minibuffer-window-restore): New function. + (resize-minibuffer-setup): Put it on minibuffer-exit-hook. 1994-06-22 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -8856,7 +8856,7 @@ * tpu-extras.el: Require tpu-edt. (tpu-extras-revision): Variable deleted. - * tpu-mapper.el: Change size of selected screen. Reposition after + * tpu-mapper.el: Change size of selected screen. Reposition after printing help. Null default directory for save. Produce minibuffer key bindings for kp4 and kp5. (tpu-kp4, tpu-kp5): New variables. @@ -8906,7 +8906,7 @@ * faces.el (x-create-frame-with-faces): Set the cursor color last. -1994-06-17 Kevin Rodgers (kevinr@ihs.com) (tiny change) +1994-06-17 Kevin Rodgers (kevinr@ihs.com) (tiny change) * mailabbrev.el (build-mail-abbrevs): Pass a recursivep argument in recursive call. @@ -8914,7 +8914,7 @@ 1994-06-17 Roland McGrath (roland@geech.gnu.ai.mit.edu) * etags.el (tags-table-computed-list, - tags-table-computed-list-for): New variables. + tags-table-computed-list-for): New variables. (tags-table-list-pointer, tags-table-list-started-at): Doc fixes. (tags-table-parent-pointer-list): Variable removed. (tags-table-check-computed-list, tags-table-extend-computed-list): New @@ -8939,12 +8939,12 @@ 1994-06-16 Noah Friedman (friedman@splode.com) - * rlogin.el (rlogin-password-paranoia): Variable deleted. - (rlogin-password): Function deleted. - This functionality is handled by comint-watch-for-password-prompt. + * rlogin.el (rlogin-password-paranoia): Variable deleted. + (rlogin-password): Function deleted. + This functionality is handled by comint-watch-for-password-prompt. - * rlogin.el (rlogin-filter): Function deleted. - (rlogin): Do not set the process filter to rlogin-filter. + * rlogin.el (rlogin-filter): Function deleted. + (rlogin): Do not set the process filter to rlogin-filter. 1994-06-15 Morten Welinder (terra@diku.dk) @@ -8981,8 +8981,8 @@ 1994-06-14 Ed Reingold (reingold@albert.gnu.ai.mit.edu) * cal-menu.el (calendar-mode-map): Change moon menu bar to pop up - a menu instead doing it directly. - (calendar-mouse-2-date-menu): Remove moon phase. + a menu instead doing it directly. + (calendar-mouse-2-date-menu): Remove moon phase. 1994-06-14 Richard Stallman (rms@albert.gnu.ai.mit.edu) @@ -9052,7 +9052,7 @@ (forms--local-write-file-function): New function to be used as `local-write-file-hooks'. (forms-mode): Use it. - (forms-find-file,forms-find-file-other-window): Locally set + (forms-find-file, forms-find-file-other-window): Locally set `enable-local-eval' and `enable-local-variables' to t. (forms-find-file-other-window): Remove extraneous call to `eval-current-buffer'. @@ -9065,10 +9065,10 @@ 1994-06-12 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * iso-cvt.el (iso-iso2tex-trans-tab): Add a few characters. - (iso-iso2gtex-trans-tab): Likewise. - (iso-tex2iso-trans-tab): Recognize TeX accent sequences without braces. - (iso-gtex2iso-trans-tab): Likewise. + * iso-cvt.el (iso-iso2tex-trans-tab): Add a few characters. + (iso-iso2gtex-trans-tab): Likewise. + (iso-tex2iso-trans-tab): Recognize TeX accent sequences without braces. + (iso-gtex2iso-trans-tab): Likewise. * info.el (Info-fontify-node): Require some whitespace after *Note. @@ -9142,7 +9142,7 @@ 1994-06-07 Morten Welinder (terra@diku.dk) - * dos-fns.el (Info-default-directory-list): Setting this no + * dos-fns.el (Info-default-directory-list): Setting this no longer needed. 1994-06-07 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -9198,7 +9198,7 @@ solar-equinoxes-solstices): Revised to use the rewritten and new fcns. * calendar.el (solar-holidays): Revised to use the rewritten and - new fcns. + new fcns. * lunar.el (lunar-phase): Revised to use the rewritten and new fcns. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index a00b482a943..39d74ce003e 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -130,7 +130,7 @@ cvs-update: recompile autoloads finder-data custom-deps # Update the AUTHORS file. update-authors: - $(emacs) -l authors -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) + $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir) TAGS: $(lisptagsfiles1) $(lisptagsfiles2) els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \ diff --git a/lisp/add-log.el b/lisp/add-log.el index 4b6b3452a9e..546f87b4e4d 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -27,6 +27,15 @@ ;; This facility is documented in the Emacs Manual. +;; Todo: + +;; - Find/use/create _MTN/log if there's a _MTN directory. +;; - Find/use/create ++log.* if there's an {arch} directory. +;; - Use an open *VC-Log* or *cvs-commit* buffer if it's related to the +;; source file. +;; - Don't add TAB indents (and username?) if inserting entries in those +;; special places. + ;;; Code: (eval-when-compile @@ -41,7 +50,7 @@ (defcustom change-log-default-name nil - "*Name of a change log file for \\[add-change-log-entry]." + "Name of a change log file for \\[add-change-log-entry]." :type '(choice (const :tag "default" nil) string) :group 'change-log) @@ -1007,7 +1016,7 @@ Has a preference of looking backwards." ((derived-mode-p 'texinfo-mode) (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t) (match-string-no-properties 1))) - ((derived-mode-p '(perl-mode cperl-mode)) + ((derived-mode-p 'perl-mode 'cperl-mode) (if (re-search-backward "^sub[ \t]+\\([^({ \t\n]+\\)" nil t) (match-string-no-properties 1))) ;; Emacs's autoconf-mode installs its own diff --git a/lisp/allout.el b/lisp/allout.el index d243a188812..49dfef21547 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1130,17 +1130,17 @@ Built on top of optional BASE-MAP, or empty sparse map if none specified. See doc string for allout-keybindings-list for format of binding list." (let ((map (or base-map (make-sparse-keymap))) (pref (list allout-command-prefix))) - (mapcar (function - (lambda (cell) - (let ((add-pref (null (cdr (cdr cell)))) - (key-suff (list (car cell)))) - (apply 'define-key - (list map - (apply 'concat (if add-pref - (append pref key-suff) - key-suff)) - (car (cdr cell))))))) - keymap-list) + (mapc (function + (lambda (cell) + (let ((add-pref (null (cdr (cdr cell)))) + (key-suff (list (car cell)))) + (apply 'define-key + (list map + (apply 'concat (if add-pref + (append pref key-suff) + key-suff)) + (car (cdr cell))))))) + keymap-list) map)) ;;;_ : Menu bar (defvar allout-mode-exposure-menu) @@ -2191,7 +2191,7 @@ See allout-overlay-interior-modification-handler for details." (when (and (featurep 'xemacs) (allout-mode-p)) ;; process all of the pending overlays: (save-excursion - (got-char beg) + (goto-char beg) (let ((overlay (allout-get-invisibility-overlay))) (allout-overlay-interior-modification-handler overlay nil beg end nil))))) @@ -5463,7 +5463,7 @@ Defaults: (progn (set-buffer frombuf) (allout-listify-exposed from to format)))) (set-buffer tobuf) - (mapcar func listified) + (mapc func listified) (pop-to-buffer tobuf))) ;;;_ - Copy exposed diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 769b21a38f3..9b022876ca2 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -557,14 +557,14 @@ The face definitions are based upon the variables (let ((ansi-color-map (make-vector 50 nil)) (index 0)) ;; miscellaneous attributes - (mapcar + (mapc (function (lambda (e) (aset ansi-color-map index e) (setq index (1+ index)) )) ansi-color-faces-vector) ;; foreground attributes (setq index 30) - (mapcar + (mapc (function (lambda (e) (aset ansi-color-map index (ansi-color-make-face 'foreground e)) @@ -572,7 +572,7 @@ The face definitions are based upon the variables ansi-color-names-vector) ;; background attributes (setq index 40) - (mapcar + (mapc (function (lambda (e) (aset ansi-color-map index (ansi-color-make-face 'background e)) diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 20757586aea..421283da9e0 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -54,17 +54,17 @@ ;; ARCHIVE TYPES: Currently only the archives below are handled, but the ;; structure for handling just about anything is in place. ;; -;; Arc Lzh Zip Zoo -;; -------------------------------- -;; View listing Intern Intern Intern Intern -;; Extract member Y Y Y Y -;; Save changed member Y Y Y Y -;; Add new member N N N N -;; Delete member Y Y Y Y -;; Rename member Y Y N N -;; Chmod - Y Y - -;; Chown - Y - - -;; Chgrp - Y - - +;; Arc Lzh Zip Zoo Rar +;; ---------------------------------------- +;; View listing Intern Intern Intern Intern Y +;; Extract member Y Y Y Y Y +;; Save changed member Y Y Y Y N +;; Add new member N N N N N +;; Delete member Y Y Y Y N +;; Rename member Y Y N N N +;; Chmod - Y Y - N +;; Chown - Y - - N +;; Chgrp - Y - - N ;; ;; Special thanks to Bill Brodie <wbrodie@panix.com> for very useful tips ;; on the first released version of this package. @@ -104,7 +104,7 @@ ;;; Code: ;; ------------------------------------------------------------------------- -;; Section: Configuration. +;;; Section: Configuration. (defgroup archive nil "Simple editing of archives." @@ -318,7 +318,7 @@ Archive and member name will be added." (string :format "%v"))) :group 'archive-zoo) ;; ------------------------------------------------------------------------- -;; Section: Variables +;;; Section: Variables (defvar archive-subtype nil "Symbol describing archive type.") (defvar archive-file-list-start nil "Position of first contents line.") @@ -463,7 +463,7 @@ Each descriptor is a vector of the form (make-variable-buffer-local 'archive-files) ;; ------------------------------------------------------------------------- -;; Section: Support functions. +;;; Section: Support functions. (eval-when-compile (defsubst byte-after (pos) @@ -619,7 +619,7 @@ Does not signal an error if optional argument NOERROR is non-nil." (if (not noerror) (error "Line does not describe a member of the archive"))))) ;; ------------------------------------------------------------------------- -;; Section: the mode definition +;;; Section: the mode definition ;;;###autoload (defun archive-mode (&optional force) @@ -727,8 +727,18 @@ archive. ;; Have seen capital "LHA's", and file has lower case "LHa's" too. ;; Note this regexp is also in archive-exe-p. ((looking-at "MZ\\(.\\|\n\\)\\{34\\}LH[aA]'s SFX ") 'lzh-exe) + ((looking-at "Rar!") 'rar) (t (error "Buffer format not recognized"))))) ;; ------------------------------------------------------------------------- + +(defun archive-desummarize () + (let ((inhibit-read-only t) + (modified (buffer-modified-p))) + (widen) + (delete-region (point-min) archive-proper-file-start) + (restore-buffer-modified-p modified))) + + (defun archive-summarize (&optional shut-up) "Parse the contents of the archive file in the current buffer. Place a dired-like listing on the front; @@ -738,6 +748,8 @@ Optional argument SHUT-UP, if non-nil, means don't print messages when parsing the archive." (widen) (let ((inhibit-read-only t)) + (setq archive-proper-file-start (copy-marker (point-min) t)) + (set (make-local-variable 'change-major-mode-hook) 'archive-desummarize) (or shut-up (message "Parsing archive file...")) (buffer-disable-undo (current-buffer)) @@ -753,13 +765,9 @@ when parsing the archive." (defun archive-resummarize () "Recreate the contents listing of an archive." - (let ((modified (buffer-modified-p)) - (no (archive-get-lineno)) - (inhibit-read-only t)) - (widen) - (delete-region (point-min) archive-proper-file-start) + (let ((no (archive-get-lineno))) + (archive-desummarize) (archive-summarize t) - (restore-buffer-modified-p modified) (goto-char archive-file-list-start) (archive-next-line no))) @@ -796,7 +804,7 @@ This function changes the set of information shown for each files." (setq archive-alternate-display (not archive-alternate-display)) (archive-resummarize)) ;; ------------------------------------------------------------------------- -;; Section: Local archive copy handling +;;; Section: Local archive copy handling (defun archive-unique-fname (fname dir) "Make sure a file FNAME can be created uniquely in directory DIR. @@ -878,7 +886,7 @@ using `make-temp-file', and the generated name is returned." (error nil)) (if (string= name top) (setq again nil))))) ;; ------------------------------------------------------------------------- -;; Section: Member extraction +;;; Section: Member extraction (defun archive-file-name-handler (op &rest args) (or (eq op 'file-exists-p) @@ -1100,7 +1108,7 @@ using `make-temp-file', and the generated name is returned." (funcall func buffer-file-name membuf name)) (error "Adding a new member is not supported for this archive type")))) ;; ------------------------------------------------------------------------- -;; Section: IO stuff +;;; Section: IO stuff (defun archive-write-file-member () (save-excursion @@ -1170,7 +1178,7 @@ using `make-temp-file', and the generated name is returned." (set-buffer-modified-p nil)) t)) ;; ------------------------------------------------------------------------- -;; Section: Marking and unmarking. +;;; Section: Marking and unmarking. (defun archive-flag-deleted (p &optional type) "In archive mode, mark this member to be deleted from the archive. @@ -1235,7 +1243,7 @@ Use \\[archive-unmark-all-files] to remove all marks." (and default (list (archive-get-descr)))))) ;; ------------------------------------------------------------------------- -;; Section: Operate +;;; Section: Operate (defun archive-next-line (p) (interactive "p") @@ -1353,7 +1361,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (let ((inhibit-read-only t)) (undo))) ;; ------------------------------------------------------------------------- -;; Section: Arc Archives +;;; Section: Arc Archives (defun archive-arc-summarize () (let ((p 1) @@ -1423,7 +1431,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (delete-char 13) (insert-unibyte name))))) ;; ------------------------------------------------------------------------- -;; Section: Lzh Archives +;;; Section: Lzh Archives (defun archive-lzh-summarize (&optional start) (let ((p (or start 1)) ;; 1 for .lzh, something further on for .exe @@ -1646,7 +1654,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." files "a unix-style mode" 8)) ;; ------------------------------------------------------------------------- -;; Section: Lzh Self-Extracting .exe Archives +;;; Section: Lzh Self-Extracting .exe Archives ;; ;; No support for modifying these files. It looks like the lha for unix ;; program (as of version 1.14i) can't create or retain the DOS exe part. @@ -1673,7 +1681,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." "Extract a member from an LZH self-extracting exe, for `archive-mode'.") ;; ------------------------------------------------------------------------- -;; Section: Zip Archives +;;; Section: Zip Archives (defun archive-zip-summarize () (goto-char (- (point-max) (- 22 18))) @@ -1780,7 +1788,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (t (message "Don't know how to change mode for this member")))) )))) ;; ------------------------------------------------------------------------- -;; Section: Zoo Archives +;;; Section: Zoo Archives (defun archive-zoo-summarize () (let ((p (1+ (archive-l-e 25 4))) @@ -1848,6 +1856,87 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (defun archive-zoo-extract (archive name) (archive-extract-by-stdout archive name archive-zoo-extract)) + +;; ------------------------------------------------------------------------- +;;; Section: Rar Archives + +(defun archive-rar-summarize () + (let* ((file buffer-file-name) + (copy (file-local-copy file)) + header footer + (maxname 10) + (maxsize 5) + (files ())) + (with-temp-buffer + (call-process "unrar-free" nil t nil "--list" (or file copy)) + (if copy (delete-file copy)) + (goto-char (point-min)) + (re-search-forward "^-+\n") + (setq header + (buffer-substring (save-excursion (re-search-backward "^[^ ]")) + (point))) + (while (looking-at (concat " \\(.*\\)\n" ;Name. + ;; Size ; Packed. + " +\\([0-9]+\\) +[0-9]+" + ;; Ratio ; Date' + " +\\([0-9%]+\\) +\\([-0-9]+\\)" + ;; Time ; Attr. + " +\\([0-9:]+\\) +......" + ;; CRC; Meth ; Var. + " +[0-9A-F]+ +[^ \n]+ +[0-9.]+\n")) + (goto-char (match-end 0)) + (let ((name (match-string 1)) + (size (match-string 2))) + (if (> (length name) maxname) (setq maxname (length name))) + (if (> (length size) maxsize) (setq maxsize (length size))) + (push (vector name name nil nil + ;; Size, Ratio. + size (match-string 3) + ;; Date, Time. + (match-string 4) (match-string 5)) + files))) + (setq footer (buffer-substring (point) (point-max)))) + (setq files (nreverse files)) + (goto-char (point-min)) + (let* ((format (format " %%s %%s %%%ds %%5s %%s" maxsize)) + (sep (format format "--------" "-----" (make-string maxsize ?-) + "-----" "")) + (column (length sep))) + (insert (format format " Date " "Time " "Size " "Ratio" " Filename") "\n") + (insert sep (make-string maxname ?-) "\n") + (archive-summarize-files (mapcar (lambda (desc) + (let ((text + (format format + (aref desc 6) + (aref desc 7) + (aref desc 4) + (aref desc 5) + (aref desc 1)))) + (vector text + column + (length text)))) + files)) + (insert sep (make-string maxname ?-) "\n") + (apply 'vector files)))) + +(defun archive-rar-extract (archive name) + ;; unrar-free seems to have no way to extract to stdout or even to a file. + (if (file-name-absolute-p name) + ;; The code below assumes the name is relative and may do undesirable + ;; things otherwise. + (error "Can't extract files with non-relative names") + (let ((dest (make-temp-file "arc-rar" 'dir))) + (unwind-protect + (progn + (call-process "unrar-free" nil nil nil + "--extract" archive name dest) + (insert-file-contents-literally (expand-file-name name dest))) + (delete-file (expand-file-name name dest)) + (while (file-name-directory name) + (setq name (directory-file-name (file-name-directory name))) + (delete-directory (expand-file-name name dest))) + (delete-directory dest))))) + ;; ------------------------------------------------------------------------- ;; This line was a mistake; it is kept now for compatibility. ;; rms 15 Oct 98 diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 91bfb396b0e..5887529ba43 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -212,7 +212,88 @@ If this contains a %s, that will be replaced by the matching rule." \(provide '" (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) ") -\;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n")) +\;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n") + (("\\.texi\\(nfo\\)?\\'" . "Texinfo file skeleton") + "Title: " + "\\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename " + (file-name-sans-extension + (file-name-nondirectory (buffer-file-name))) ".info\n" + "@settitle " str " +@c %**end of header +@copying\n" + (setq short-description (read-string "Short description: ")) + ".\n\n" + "Copyright @copyright{} " (substring (current-time-string) -4) " " + (getenv "ORGANIZATION") | (progn user-full-name) " + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, and no Cover Texts. A copy of the license is +included in the section entitled ``GNU Free Documentation License.'' + +A copy of the license is also available from the Free Software +Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. + +@end quotation + +The document was typeset with +@uref{http://www.texinfo.org/, GNU Texinfo}. + +@end copying + +@titlepage +@title " str " +@subtitle " short-description " +@author " (getenv "ORGANIZATION") | (progn user-full-name) + " <" (progn user-mail-address) "> +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@c Output the table of the contents at the beginning. +@contents + +@ifnottex +@node Top +@top " str " + +@insertcopying +@end ifnottex + +@c Generate the nodes for this menu with `C-c C-u C-m'. +@menu +@end menu + +@c Update all node entries with `C-c C-u C-n'. +@c Insert new nodes with `C-c C-c n'. +@node Chapter One +@chapter Chapter One + +" _ " + +@node Copying This Manual +@appendix Copying This Manual + +@menu +* GNU Free Documentation License:: License for copying this manual. +@end menu + +@c Get fdl.texi from http://www.gnu.org/licenses/fdl.html +@include fdl.texi + +@node Index +@unnumbered Index + +@printindex cp + +@bye + +@c " (file-name-nondirectory (buffer-file-name)) " ends here\n")) "A list specifying text to insert by default into a new file. Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION). CONDITION may be a regexp that must match the new file's name, or it may be @@ -272,7 +353,7 @@ Matches the visited file name against the elements of `auto-insert-alist'." (eq this-command 'auto-insert)) (y-or-n-p (format auto-insert-prompt desc))) t) - (mapcar + (mapc (lambda (action) (if (stringp action) (if (file-readable-p diff --git a/lisp/autorevert.el b/lisp/autorevert.el index f1e5b146058..49e83c514a9 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -416,12 +416,16 @@ will use an up-to-date value of `auto-revert-interval'" "Revert current buffer, if appropriate. This is an internal function used by Auto-Revert Mode." (when (or auto-revert-tail-mode (not (buffer-modified-p))) - (let* ((buffer (current-buffer)) + (let* ((buffer (current-buffer)) size (revert (or (and buffer-file-name (not (file-remote-p buffer-file-name)) (file-readable-p buffer-file-name) - (not (verify-visited-file-modtime buffer))) + (if auto-revert-tail-mode + (/= auto-revert-tail-pos + (setq size + (nth 7 (file-attributes buffer-file-name)))) + (not (verify-visited-file-modtime buffer)))) (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function @@ -445,7 +449,7 @@ This is an internal function used by Auto-Revert Mode." (push window eoblist))) 'no-mini t)) (if auto-revert-tail-mode - (auto-revert-tail-handler) + (auto-revert-tail-handler size) ;; Bind buffer-read-only in case user has done C-x C-q, ;; so as not to forget that. This gives undesirable results ;; when the file's mode changes, but that is less common. @@ -460,20 +464,22 @@ This is an internal function used by Auto-Revert Mode." (when (or revert auto-revert-check-vc-info) (vc-find-file-hook))))) -(defun auto-revert-tail-handler () - (let ((size (nth 7 (file-attributes buffer-file-name))) - (modified (buffer-modified-p)) +(defun auto-revert-tail-handler (size) + (let ((modified (buffer-modified-p)) (inhibit-read-only t) ; Ignore. (file buffer-file-name) (buffer-file-name nil)) ; Ignore that file has changed. - (when (> size auto-revert-tail-pos) + (when (/= auto-revert-tail-pos size) (run-hooks 'before-revert-hook) (undo-boundary) (save-restriction (widen) (save-excursion (goto-char (point-max)) - (insert-file-contents file nil auto-revert-tail-pos size))) + (insert-file-contents file nil + (and (< auto-revert-tail-pos size) + auto-revert-tail-pos) + size))) (run-hooks 'after-revert-hook) (undo-boundary) (setq auto-revert-tail-pos size) diff --git a/lisp/bindings.el b/lisp/bindings.el index 9fd4b3b9569..0e7bd15a494 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -170,6 +170,12 @@ corresponding to the mode line clicked." (push (cons eol (cons mnemonic desc)) mode-line-eol-desc-cache) desc))) +(defvar mode-line-client + `("" + (:propertize ("" (:eval (if (frame-parameter nil 'client) "@" ""))) + help-echo "Emacsclient frame")) + "Mode-line control for identifying Emacsclient frames.") + (defvar mode-line-mule-info `("" (current-input-method @@ -209,7 +215,7 @@ mnemonics of the following coding systems: (make-variable-buffer-local 'mode-line-mule-info) -(defvar mode-line-frame-identification '("-%F ") +(defvar mode-line-frame-identification '(window-system " " "-%F ") "Mode-line control to describe the current frame.") (defvar mode-line-process nil "\ @@ -302,6 +308,7 @@ Keymap to display on minor modes.") "%e" (propertize "-" 'help-echo help-echo) 'mode-line-mule-info + 'mode-line-client 'mode-line-modified 'mode-line-remote 'mode-line-frame-identification @@ -331,6 +338,7 @@ Keymap to display on minor modes.") 'local-map (make-mode-line-mouse-map 'mouse-2 #'mode-line-widen)) (propertize ")%]--" 'help-echo help-echo))) + (standard-mode-line-position `((-3 ,(propertize "%p" 'help-echo help-echo)) (size-indication-mode @@ -643,6 +651,10 @@ language you are using." (define-key global-map "\e\e\e" 'keyboard-escape-quit) (define-key global-map "\C-g" 'keyboard-quit) +;; Used to be in termdev.el: when using several terminals, make C-z +;; suspend only the relevant terminal. +(substitute-key-definition 'suspend-emacs 'suspend-frame global-map) + (define-key global-map "\C-j" 'newline-and-indent) (define-key global-map "\C-m" 'newline) (define-key global-map "\C-o" 'open-line) @@ -1023,8 +1035,7 @@ language you are using." (define-key ctl-x-map "rw" 'window-configuration-to-register) (define-key ctl-x-map "rf" 'frame-configuration-to-register) -(define-key esc-map "q" 'fill-paragraph) -;; (define-key esc-map "g" 'fill-region) +(define-key esc-map "q" 'fill-paragraph-or-region) (define-key ctl-x-map "." 'set-fill-prefix) (define-key esc-map "{" 'backward-paragraph) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index c1904cb0393..184f9de518c 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -207,11 +207,6 @@ following in your `.emacs' file: ;;; No user-serviceable parts beyond this point. -;; Is it XEmacs? -(defconst bookmark-xemacsp - (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)) - - ;; Added for lucid emacs compatibility, db (or (fboundp 'defalias) (fset 'defalias 'fset)) @@ -495,7 +490,7 @@ Optional fourth arg INFO-NODE means this bookmark is at info node INFO-NODE, so record this fact in the bookmark's entry." (bookmark-maybe-load-default-file) (let ((stripped-name (copy-sequence name))) - (or bookmark-xemacsp + (or (featurep 'xemacs) ;; XEmacs's `set-text-properties' doesn't work on ;; free-standing strings, apparently. (set-text-properties 0 (length stripped-name) nil stripped-name)) @@ -1590,7 +1585,7 @@ deletion, or > if it is flagged for displaying." (insert "% Bookmark\n- --------\n") (add-text-properties (point-min) (point) '(font-lock-face bookmark-menu-heading)) - (mapcar + (mapc (lambda (full-record) ;; if a bookmark has an annotation, prepend a "*" ;; in the list of bookmarks. @@ -1807,7 +1802,7 @@ if an annotation exists." (let ((old-buf (current-buffer))) (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) (delete-region (point-min) (point-max)) - (mapcar + (mapc (lambda (full-record) (let* ((name (bookmark-name-from-full-record full-record)) (ann (bookmark-get-annotation name))) diff --git a/lisp/bs.el b/lisp/bs.el index 9d89eb17b2d..4d13c97c2fd 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -131,8 +131,6 @@ ;;; Code: -(defvar font-lock-verbose) - ;; ---------------------------------------------------------------------- ;; Globals for customization ;; ---------------------------------------------------------------------- @@ -244,7 +242,8 @@ The function gets one argument - the buffer to test.") (defvar bs-buffer-sort-function nil "Sort function to sort the buffers that appear in Buffer Selection Menu. -The function gets two arguments - the buffers to compare.") +The function gets two arguments - the buffers to compare. +It must return non-nil if the first buffer should sort before the second.") (defcustom bs-maximal-buffer-name-column 45 "*Maximum column width for buffer names. @@ -337,7 +336,7 @@ Must be a string used in `bs-configurations' for naming a configuration." :type 'string) (defcustom bs-string-show-normally " " - "*String added in column 1 indicating a unmarked buffer." + "*String added in column 1 indicating an unmarked buffer." :group 'bs-appearance :type 'string) @@ -393,9 +392,9 @@ A value of `always' means to show buffer regardless of the configuration.") ("by nothing" nil nil nil)) "*List of all possible sorting aspects for Buffer Selection Menu. You can add a new entry with a call to `bs-define-sort-function'. -Each element is a list of four elements (NAME FUNCTION REGEXP-FOR-SORTING FACE) +Each element is a list of four elements (NAME FUNCTION REGEXP-FOR-SORTING FACE). NAME specifies the sort order defined by function FUNCTION. -FUNCTION nil means don't sort the buffer list. Otherwise the functions +FUNCTION nil means don't sort the buffer list. Otherwise the function must have two parameters - the buffers to compare. REGEXP-FOR-SORTING is a regular expression which describes the column title to highlight. @@ -620,7 +619,7 @@ actually the line which begins with character in `bs-string-current' or \\<bs-mode-map> Aside from two header lines each line describes one buffer. Move to a line representing the buffer you want to edit and select -buffer by \\[bs-select] or SPC. Abort buffer list with \\[bs-kill]. +buffer by \\[bs-select] or SPC. Abort buffer list with \\[bs-kill]. There are many key commands similar to `Buffer-menu-mode' for manipulating the buffer list and buffers. For faster navigation each digit key is a digit argument. @@ -653,11 +652,14 @@ to show always. (use-local-map bs-mode-map) (make-local-variable 'font-lock-defaults) (make-local-variable 'font-lock-verbose) + (make-local-variable 'font-lock-global-modes) (buffer-disable-undo) (setq major-mode 'bs-mode mode-name "Buffer-Selection-Menu" buffer-read-only t truncate-lines t + show-trailing-whitespace nil + font-lock-global-modes '(not bs-mode) font-lock-defaults '(bs-mode-font-lock-keywords t) font-lock-verbose nil) (run-mode-hooks 'bs-mode-hook)) @@ -669,7 +671,7 @@ to show always. (setq bs--window-config-coming-from nil))) (defun bs-kill () - "Let buffer disappear and reset window-configuration." + "Let buffer disappear and reset window configuration." (interactive) (bury-buffer (current-buffer)) (bs--restore-window-config)) @@ -778,7 +780,7 @@ Leave Buffer Selection Menu." (defun bs-mouse-select-other-frame (event) "Select selected line's buffer in new created frame. Leave Buffer Selection Menu. -EVENT: a mouse click EVENT." +EVENT: a mouse click event." (interactive "e") (mouse-set-point event) (bs-select-other-frame)) @@ -929,7 +931,7 @@ WHAT is a value of nil, `never', or `always'." (bs-up 1)))) (defun bs-show-sorted () - "Show buffer list sorted by buffer name." + "Show buffer list sorted by next sort aspect." (interactive) (setq bs--current-sort-function (bs-next-config-aux (car bs--current-sort-function) @@ -1020,13 +1022,13 @@ If at end of buffer list go to first line." (forward-line 1))) (defun bs-visits-non-file (buffer) - "Return t or nil whether BUFFER visits no file. + "Return whether BUFFER visits no file. A value of t means BUFFER belongs to no file. A value of nil means BUFFER belongs to a file." (not (buffer-file-name buffer))) (defun bs-sort-buffer-interns-are-last (b1 b2) - "Function for sorting internal buffers B1 and B2 at the end of all buffers." + "Function for sorting internal buffers at the end of all buffers." (string-match "^\\*" (buffer-name b2))) ;; ---------------------------------------------------------------------- @@ -1034,7 +1036,7 @@ A value of nil means BUFFER belongs to a file." ;; ---------------------------------------------------------------------- (defun bs-config-clear () - "*Reset all variables which specify a configuration. + "Reset all variables which specify a configuration. These variables are `bs-dont-show-regexp', `bs-must-show-regexp', `bs-dont-show-function', `bs-must-show-function' and `bs-buffer-sort-function'." @@ -1274,7 +1276,7 @@ or a string." (defun bs--get-marked-string (start-buffer all-buffers) "Return a string which describes whether current buffer is marked. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu. +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu. The result string is one of `bs-string-current', `bs-string-current-marked', `bs-string-marked', `bs-string-show-normally', `bs-string-show-never', or `bs-string-show-always'." @@ -1299,19 +1301,19 @@ The result string is one of `bs-string-current', `bs-string-current-marked', (defun bs--get-modified-string (start-buffer all-buffers) "Return a string which describes whether current buffer is modified. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." (if (buffer-modified-p) "*" " ")) (defun bs--get-readonly-string (start-buffer all-buffers) "Return a string which describes whether current buffer is read only. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." (if buffer-read-only "%" " ")) (defun bs--get-size-string (start-buffer all-buffers) "Return a string which describes the size of current buffer. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." (int-to-string (buffer-size))) (defun bs--get-name (start-buffer all-buffers) @@ -1319,7 +1321,7 @@ ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." The name of current buffer gets additional text properties for mouse highlighting. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." (propertize (buffer-name) 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" 'mouse-face 'highlight)) @@ -1327,7 +1329,7 @@ ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." (defun bs--get-mode-name (start-buffer all-buffers) "Return the name of mode of current buffer for Buffer Selection Menu. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." mode-name) (defun bs--get-file-name (start-buffer all-buffers) @@ -1336,7 +1338,7 @@ This is the variable `buffer-file-name' of current buffer. If current mode is `dired-mode' or `shell-mode' it returns the default directory. START-BUFFER is the buffer where we started buffer selection. -ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." +ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." (propertize (if (member major-mode '(shell-mode dired-mode)) default-directory (or buffer-file-name "")) @@ -1372,7 +1374,7 @@ normally *buffer-selection*." string)) (defun bs--format-aux (string align len) - "Generate a string with STRING with alignment ALIGN and length LEN. + "Pad STRING to length LEN with alignment ALIGN. ALIGN is one of the symbols `left', `middle', or `right'." (let* ((width (length string)) (len (max len width))) @@ -1383,9 +1385,8 @@ ALIGN is one of the symbols `left', `middle', or `right'." (defun bs--show-header () "Insert header for Buffer Selection Menu in current buffer." - (mapcar '(lambda (string) - (insert string "\n")) - (bs--create-header))) + (dolist (string (bs--create-header)) + (insert string "\n"))) (defun bs--get-name-length () "Return value of `bs--name-entry-length'." @@ -1471,7 +1472,7 @@ Otherwise return `bs-alternative-configuration'." "Make a menu of buffers so you can manipulate buffers or the buffer list. \\<bs-mode-map> There are many key commands similar to `Buffer-menu-mode' for -manipulating buffer list and buffers itself. +manipulating the buffer list and the buffers themselves. User can move with [up] or [down], select a buffer by \\[bs-select] or [SPC]\n Type \\[bs-kill] to leave Buffer Selection Menu without a selection. diff --git a/lisp/button.el b/lisp/button.el index 3afe9302042..85180a92356 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -470,5 +470,5 @@ Returns the button found." (provide 'button) -;;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9 +;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9 ;;; button.el ends here diff --git a/lisp/calculator.el b/lisp/calculator.el index 6f3c2a0e593..2676bedadba 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -5,7 +5,7 @@ ;; Author: Eli Barzilay <eli@barzilay.org> ;; Keywords: tools, convenience -;; Time-stamp: <2006-02-06 13:36:00 ttn> +;; Time-stamp: <2007-08-31 03:00:11 ttn> ;; This file is part of GNU Emacs. @@ -47,6 +47,7 @@ ;;; History: ;; I hate history. +(eval-when-compile (require 'cl)) (eval-and-compile (if (fboundp 'defgroup) nil (defmacro defgroup (&rest forms) nil) diff --git a/lisp/comint.el b/lisp/comint.el index e8a6a139db5..d08b2013426 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -643,9 +643,15 @@ Entry to this mode runs the hooks on `comint-mode-hook'." (make-local-variable 'comint-move-point-for-output) (make-local-variable 'comint-scroll-show-maximum-output) (make-local-variable 'comint-stored-incomplete-input) + ;; Following disabled because it seems to break the case when + ;; comint-scroll-show-maximum-output is nil, and no-one can remember + ;; what the original problem was. If there are problems with point + ;; not going to the end, consider re-enabling this. + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00827.html + ;; ;; This makes it really work to keep point at the bottom. - (make-local-variable 'scroll-conservatively) - (setq scroll-conservatively 10000) +;;; (make-local-variable 'scroll-conservatively) +;;; (setq scroll-conservatively 10000) (add-hook 'pre-command-hook 'comint-preinput-scroll-to-bottom t t) (make-local-variable 'comint-ptyp) (make-local-variable 'comint-process-echoes) diff --git a/lisp/complete.el b/lisp/complete.el index 01db126c5f8..bc581052508 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -596,9 +596,10 @@ GOTO-END is non-nil, however, it instead replaces up to END." (setq poss (all-completions (if env-on basestr str) table pred)) - (unless poss + (unless (or poss (string-equal str "")) ;; Try completion as an abbreviation, e.g. "mvb" -> - ;; "m-v-b" -> "multiple-value-bind" + ;; "m-v-b" -> "multiple-value-bind", but only for + ;; non-empty strings. (setq origstr str abbreviated t) (if filename diff --git a/lisp/completion.el b/lisp/completion.el index b8bf5bd93b8..c2e9ac9493f 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2231,15 +2231,19 @@ Patched to remove the most recent completion." (defun completion-separator-self-insert-command (arg) (interactive "p") - (use-completion-before-separator) - (self-insert-command arg)) + (if (command-remapping 'self-insert-command) + (funcall (command-remapping 'self-insert-command) arg) + (use-completion-before-separator) + (self-insert-command arg))) (defun completion-separator-self-insert-autofilling (arg) (interactive "p") - (use-completion-before-separator) - (self-insert-command arg) - (and auto-fill-function - (funcall auto-fill-function))) + (if (command-remapping 'self-insert-command) + (funcall (command-remapping 'self-insert-command) arg) + (use-completion-before-separator) + (self-insert-command arg) + (and auto-fill-function + (funcall auto-fill-function)))) ;;----------------------------------------------- ;; Wrapping Macro diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 869533b3c3e..8f7ad22dce6 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1550,7 +1550,8 @@ possibly because you started Emacs with `-q'.") ;; Insert custom command buttons if the toolbar is not in use. (widget-insert "\n") - (when (not (and tool-bar-mode (display-graphic-p))) + ;; tool-bar is not dumped in builds without x. + (when (not (and (bound-and-true-p tool-bar-mode) (display-graphic-p))) (if custom-buffer-verbose-help (widget-insert "\n Operate on all settings in this buffer that are not marked HIDDEN:\n")) @@ -3010,7 +3011,7 @@ Also change :reverse-video to :inverse-video." (cons value (cons from (- (point) from)))))))) (defun custom-face-edit-activate (widget) - "Make face widget WIDGET inactive for user modifications." + "Make face widget WIDGET active for user modifications." (let ((inactive (widget-get widget :inactive)) (inhibit-read-only t) (inhibit-modification-hooks t)) diff --git a/lisp/cus-face.el b/lisp/cus-face.el index be88b499fef..92274dcbe21 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -40,15 +40,18 @@ (when (fboundp 'facep) (unless (facep face) ;; If the user has already created the face, respect that. - (let ((value (or (get face 'saved-face) spec))) + (let ((value (or (get face 'saved-face) spec)) + (have-window-system (memq initial-window-system '(x w32)))) ;; Create global face. (make-empty-face face) ;; Create frame-local faces (dolist (frame (frame-list)) - (face-spec-set face value frame))) - ;; When making a face after frames already exist - (if (memq window-system '(x w32 mac)) - (make-face-x-resource-internal face)))) + (face-spec-set face value frame) + (when (memq (window-system frame) '(x w32 mac)) + (setq have-window-system t))) + ;; When making a face after frames already exist + (if have-window-system + (make-face-x-resource-internal face))))) ;; Don't record SPEC until we see it causes no errors. (put face 'face-defface-spec spec) (push (cons 'defface face) current-load-list) @@ -339,16 +342,16 @@ FACE's list property `theme-face' \(using `custom-push-theme')." (unless (facep face) (make-empty-face face)) (put face 'face-comment comment) - (face-spec-set face spec)) - (setq args (cdr args))) - ;; Old format, a plist of FACE SPEC pairs. - (let ((face (nth 0 args)) - (spec (nth 1 args))) - (if (get face 'face-alias) - (setq face (get face 'face-alias))) - (put face 'saved-face spec) - (custom-push-theme 'theme-face face theme 'set spec)) - (setq args (cdr (cdr args)))))))) + (face-spec-set face spec nil)) + (setq args (cdr args))) + ;; Old format, a plist of FACE SPEC pairs. + (let ((face (nth 0 args)) + (spec (nth 1 args))) + (if (get face 'face-alias) + (setq face (get face 'face-alias))) + (put face 'saved-face spec) + (custom-push-theme 'theme-face face theme 'set spec)) + (setq args (cdr (cdr args)))))))) ;; XEmacs compability function. In XEmacs, when you reset a Custom ;; Theme, you have to specify the theme to reset it to. We just apply diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 8f5c4e13489..ee6491a1a79 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -173,6 +173,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of ;; fns.c (use-dialog-box menu boolean "21.1") (use-file-dialog menu boolean "22.1") + (focus-follows-mouse frames boolean "20.3") ;; frame.c (default-frame-alist frames (repeat (cons :format "%v" @@ -345,6 +346,15 @@ since it could result in memory overflow and make Emacs crash." (even-window-heights windows boolean) (next-screen-context-lines windows integer) (split-height-threshold windows integer) + (split-window-preferred-function + windows + (choice (const :tag "vertically" split-window) + ;; FIXME: Add `sensibly' which chooses between + ;; vertical or horizontal splits depending on the size + ;; and shape of the window. + (const :tag "horizontally" + (lambda (window) + (split-window window nil 'horiz))))) (window-min-height windows integer) (window-min-width windows integer) (scroll-preserve-screen-position @@ -425,14 +435,10 @@ since it could result in memory overflow and make Emacs crash." (eq system-type 'ms-dos)) ((string-match "\\`w32-" (symbol-name symbol)) (eq system-type 'windows-nt)) - ((string-match "\\`mac-" (symbol-name symbol)) - (eq window-system 'mac)) + ((string-match "\\`mac-" (symbol-name symbol)) + (or (eq system-type 'mac) (eq system-type 'darwin))) ((string-match "\\`x-.*gtk" (symbol-name symbol)) - (or (boundp 'gtk) - (and window-system - (not (eq window-system 'pc)) - (not (eq window-system 'mac)) - (not (eq system-type 'windows-nt))))) + (featurep 'gtk)) ((string-match "\\`x-" (symbol-name symbol)) (fboundp 'x-create-frame)) ((string-match "selection" (symbol-name symbol)) @@ -471,5 +477,5 @@ since it could result in memory overflow and make Emacs crash." (unless purify-flag (provide 'cus-start)) -;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60 +;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60 ;;; cus-start.el ends here diff --git a/lisp/delsel.el b/lisp/delsel.el index b4ae7965a3f..82593985650 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -93,6 +93,7 @@ any selection." ;; That would make yank a no-op. (when (and (string= (buffer-substring-no-properties (point) (mark)) (car kill-ring)) + (fboundp 'mouse-region-match) (mouse-region-match)) (current-kill 1)) (delete-active-region)) diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 68f7995a494..609c5ef6490 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -48,8 +48,6 @@ ;; Or maybe just make it into a ".rej to diff3-markers converter". ;; Maybe just use `wiggle' (by Neil Brown) to do it for us. ;; -;; - Refine hunk on a word-by-word basis. -;; ;; - in diff-apply-hunk, strip context in replace-match to better ;; preserve markers and spacing. ;; - Handle `diff -b' output in context->unified. @@ -112,6 +110,8 @@ when editing big diffs)." ("N" . diff-file-next) ("p" . diff-hunk-prev) ("P" . diff-file-prev) + ("\t" . diff-hunk-next) + ([backtab] . diff-hunk-prev) ("k" . diff-hunk-kill) ("K" . diff-file-kill) ;; From compilation-minor-mode. @@ -156,6 +156,7 @@ when editing big diffs)." ;; `d' because it duplicates the context :-( --Stef ("\C-c\C-d" . diff-unified->context) ("\C-c\C-w" . diff-refine-ignore-spaces-hunk) + ("\C-c\C-b" . diff-fine-highlight) ;No reason for `b' :-( ("\C-c\C-f" . next-error-follow-minor-mode)) "Keymap for `diff-mode'. See also `diff-mode-shared-map'.") @@ -173,7 +174,8 @@ when editing big diffs)." ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)] "-----" ["Split hunk" diff-split-hunk (diff-splittable-p)] - ["Refine hunk" diff-refine-ignore-spaces-hunk t] + ["Ignore whitespace changes" diff-refine-ignore-spaces-hunk t] + ["Highlight fine changes" diff-fine-highlight t] ["Kill current hunk" diff-hunk-kill t] ["Kill current file's hunks" diff-file-kill t] "-----" @@ -386,12 +388,15 @@ when editing big diffs)." (defconst diff-file-header-re (concat "^\\(--- .+\n\\+\\+\\+ \\|\\*\\*\\* .+\n--- \\|[^-+!<>0-9@* ]\\).+\n" (substring diff-hunk-header-re 1))) (defvar diff-narrowed-to nil) -(defun diff-end-of-hunk (&optional style) +(defun diff-hunk-style (&optional style) (when (looking-at diff-hunk-header-re) - (unless style - ;; Especially important for unified (because headers are ambiguous). - (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context)))))) + (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context))))) (goto-char (match-end 0))) + style) + +(defun diff-end-of-hunk (&optional style) + ;; Especially important for unified (because headers are ambiguous). + (setq style (diff-hunk-style style)) (let ((end (and (re-search-forward (case style ;; A `unified' header is ambiguous. (unified (concat "^[^-+# \\]\\|" @@ -843,68 +848,89 @@ With a prefix argument, convert unified format to context format." (diff-unified->context start end) (unless (markerp end) (setq end (copy-marker end t))) (let ( ;;(diff-inhibit-after-change t) - (inhibit-read-only t)) + (inhibit-read-only t)) (save-excursion - (goto-char start) - (while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t) - (< (point) end)) - (combine-after-change-calls - (if (match-beginning 2) - ;; we matched a file header - (progn - ;; use reverse order to make sure the indices are kept valid - (replace-match "+++" t t nil 3) - (replace-match "---" t t nil 2)) - ;; we matched a hunk header - (let ((line1s (match-string 4)) - (line1e (match-string 5)) - (pt1 (match-beginning 0))) - (replace-match "") - (unless (re-search-forward - "^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t) - (error "Can't find matching `--- n1,n2 ----' line")) - (let ((line2s (match-string 1)) - (line2e (match-string 2)) - (pt2 (progn - (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point))) - (point-marker)))) - (goto-char pt1) - (forward-line 1) - (while (< (point) pt2) - (case (char-after) - ((?! ?-) (delete-char 2) (insert "-") (forward-line 1)) - (?\s ;merge with the other half of the chunk - (let* ((endline2 - (save-excursion - (goto-char pt2) (forward-line 1) (point))) - (c (char-after pt2))) - (case c - ((?! ?+) - (insert "+" - (prog1 (buffer-substring (+ pt2 2) endline2) - (delete-region pt2 endline2)))) - (?\s ;FIXME: check consistency - (delete-region pt2 endline2) - (delete-char 1) - (forward-line 1)) - (?\\ (forward-line 1)) - (t (delete-char 1) (forward-line 1))))) - (t (forward-line 1)))) - (while (looking-at "[+! ] ") - (if (/= (char-after) ?!) (forward-char 1) - (delete-char 1) (insert "+")) - (delete-char 1) (forward-line 1)) - (save-excursion - (goto-char pt1) - (insert "@@ -" line1s "," - (number-to-string (- (string-to-number line1e) - (string-to-number line1s) - -1)) - " +" line2s "," - (number-to-string (- (string-to-number line2e) - (string-to-number line2s) - -1)) " @@"))))))))))) + (goto-char start) + (while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t) + (< (point) end)) + (combine-after-change-calls + (if (match-beginning 2) + ;; we matched a file header + (progn + ;; use reverse order to make sure the indices are kept valid + (replace-match "+++" t t nil 3) + (replace-match "---" t t nil 2)) + ;; we matched a hunk header + (let ((line1s (match-string 4)) + (line1e (match-string 5)) + (pt1 (match-beginning 0)) + ;; Variables to use the special undo function. + (old-undo buffer-undo-list) + (old-end (marker-position end)) + (reversible t)) + (replace-match "") + (unless (re-search-forward + "^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t) + (error "Can't find matching `--- n1,n2 ----' line")) + (let ((line2s (match-string 1)) + (line2e (match-string 2)) + (pt2 (progn + (delete-region (progn (beginning-of-line) (point)) + (progn (forward-line 1) (point))) + (point-marker)))) + (goto-char pt1) + (forward-line 1) + (while (< (point) pt2) + (case (char-after) + (?! (delete-char 2) (insert "-") (forward-line 1)) + (?- (forward-char 1) (delete-char 1) (forward-line 1)) + (?\s ;merge with the other half of the chunk + (let* ((endline2 + (save-excursion + (goto-char pt2) (forward-line 1) (point)))) + (case (char-after pt2) + ((?! ?+) + (insert "+" + (prog1 (buffer-substring (+ pt2 2) endline2) + (delete-region pt2 endline2)))) + (?\s + (unless (= (- endline2 pt2) + (- (line-beginning-position 2) (point))) + ;; If the two lines we're merging don't have the + ;; same length (can happen with "diff -b"), then + ;; diff-unified->context will not properly undo + ;; this operation. + (setq reversible nil)) + (delete-region pt2 endline2) + (delete-char 1) + (forward-line 1)) + (?\\ (forward-line 1)) + (t (setq reversible nil) + (delete-char 1) (forward-line 1))))) + (t (setq reversible nil) (forward-line 1)))) + (while (looking-at "[+! ] ") + (if (/= (char-after) ?!) (forward-char 1) + (delete-char 1) (insert "+")) + (delete-char 1) (forward-line 1)) + (save-excursion + (goto-char pt1) + (insert "@@ -" line1s "," + (number-to-string (- (string-to-number line1e) + (string-to-number line1s) + -1)) + " +" line2s "," + (number-to-string (- (string-to-number line2e) + (string-to-number line2s) + -1)) " @@")) + (set-marker pt2 nil) + ;; The whole procedure succeeded, let's replace the myriad + ;; of undo elements with just a single special one. + (unless (or (not reversible) (eq buffer-undo-list t)) + (setq buffer-undo-list + (cons (list 'apply (- old-end end) pt1 (point) + 'diff-unified->context pt1 (point)) + old-undo))) + ))))))))) (defun diff-reverse-direction (start end) "Reverse the direction of the diffs. @@ -1217,31 +1243,44 @@ Only works for unified diffs." ;; A context diff. ((eq (char-after) ?*) - (if (not (looking-at "\\*\\{15\\}\\(?: .*\\)?\n\\*\\*\\* \\([0-9]+\\),\\([0-9]+\\) \\*\\*\\*\\*")) + (if (not (looking-at "\\*\\{15\\}\\(?: .*\\)?\n\\*\\*\\* \\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? \\*\\*\\*\\*")) (error "Unrecognized context diff first hunk header format") (forward-line 2) (diff-sanity-check-context-hunk-half - (1+ (- (string-to-number (match-string 2)) - (string-to-number (match-string 1))))) - (if (not (looking-at "--- \\([0-9]+\\),\\([0-9]+\\) ----$")) + (if (match-string 2) + (1+ (- (string-to-number (match-string 2)) + (string-to-number (match-string 1)))) + 1)) + (if (not (looking-at "--- \\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? ----$")) (error "Unrecognized context diff second hunk header format") (forward-line) (diff-sanity-check-context-hunk-half - (1+ (- (string-to-number (match-string 2)) - (string-to-number (match-string 1)))))))) + (if (match-string 2) + (1+ (- (string-to-number (match-string 2)) + (string-to-number (match-string 1)))) + 1))))) ;; A unified diff. ((eq (char-after) ?@) (if (not (looking-at - "@@ -[0-9]+,\\([0-9]+\\) \\+[0-9]+,\\([0-9]+\\) @@")) + "@@ -[0-9]+\\(?:,\\([0-9]+\\)\\)? \\+[0-9]+\\(?:,\\([0-9]+\\)\\)? @@")) (error "Unrecognized unified diff hunk header format") - (let ((before (string-to-number (match-string 1))) - (after (string-to-number (match-string 2)))) + (let ((before (if (match-string 1) (string-to-number (match-string 1)) 1)) + (after (if (match-string 2) (string-to-number (match-string 2)) 1))) (forward-line) (while (case (char-after) (?\s (decf before) (decf after) t) - (?- (decf before) t) + (?- + (if (and (looking-at diff-file-header-re) + (zerop before) (zerop after)) + ;; No need to query: this is a case where two patches + ;; are concatenated and only counting the lines will + ;; give the right result. Let's just add an empty + ;; line so that our code which doesn't count lines + ;; will not get confused. + (progn (save-excursion (insert "\n")) nil) + (decf before) t)) (?+ (decf after) t) (t (cond @@ -1606,6 +1645,63 @@ For use in `add-log-current-defun-function'." (delete-file file1) (delete-file file2)))) +;;; Fine change highlighting. + +(defface diff-fine-change + '((t :background "yellow")) + "Face used for char-based changes shown by `diff-fine-highlight'.") + +(defun diff-fine-highlight-preproc () + (while (re-search-forward "^." nil t) + ;; Replace the hunk's leading prefix (+, -, !, <, or >) on each line + ;; with something constant, otherwise it'll be flagged as changes + ;; (since it's typically "-" on one side and "+" on the other). + ;; Note that we keep the same number of chars: we treat the prefix + ;; as part of the texts-to-diff, so that finding the right char + ;; afterwards will be easier. This only makes sense because we make + ;; diffs at char-granularity. + (replace-match " "))) + +(defun diff-fine-highlight () + "Highlight changes of hunk at point at a finer granularity." + (interactive) + (require 'smerge-mode) + (diff-beginning-of-hunk 'try-harder) + (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. + (beg (point)) + (props '((diff-mode . fine) (face diff-fine-change))) + (end (progn (diff-end-of-hunk) (point)))) + + (remove-overlays beg end 'diff-mode 'fine) + + (goto-char beg) + (case style + (unified + (while (re-search-forward "^\\(?:-.*\n\\)+\\(\\)\\(?:\\+.*\n\\)+" end t) + (smerge-refine-subst (match-beginning 0) (match-end 1) + (match-end 1) (match-end 0) + props 'diff-fine-highlight-preproc))) + (context + (let* ((middle (save-excursion (re-search-forward "^---"))) + (other middle)) + (while (re-search-forward "^\\(?:!.*\n\\)+" middle t) + (smerge-refine-subst (match-beginning 0) (match-end 0) + (save-excursion + (goto-char other) + (re-search-forward "^\\(?:!.*\n\\)+" end) + (setq other (match-end 0)) + (match-beginning 0)) + other + props 'diff-fine-highlight-preproc)))) + (t ;; Normal diffs. + (let ((beg1 (1+ (point)))) + (when (re-search-forward "^---.*\n" end t) + ;; It's a combined add&remove, so there's something to do. + (smerge-refine-subst beg1 (match-beginning 0) + (match-end 0) end + props 'diff-fine-highlight-preproc))))))) + + ;; provide the package (provide 'diff-mode) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 124c53b44c5..e0749f375ae 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -253,9 +253,20 @@ List has a form of (file-name full-file-name (attribute-list))" ;;;###autoload (defun dired-do-chmod (&optional arg) "Change the mode of the marked (or next ARG) files. -This calls chmod, thus symbolic modes like `g+w' are allowed." +Symbolic modes like `g+w' are allowed." (interactive "P") - (dired-do-chxxx "Mode" dired-chmod-program 'chmod arg)) + (let* ((files (dired-get-marked-files t arg)) + (modes (dired-mark-read-string + "Change mode of %s to: " nil + 'chmod arg files)) + (num-modes (if (string-match "^[0-7]+" modes) + (string-to-number modes 8)))) + (dolist (file files) + (set-file-modes + file + (if num-modes num-modes + (file-modes-symbolic-to-number modes (file-modes file))))) + (dired-do-redisplay arg))) ;;;###autoload (defun dired-do-chgrp (&optional arg) @@ -1319,7 +1330,7 @@ Special value `always' suppresses confirmation." skipped (success-count 0) (total (length fn-list))) (let (to overwrite-query overwrite-backup-query) ; for dired-handle-overwrite - (mapcar + (mapc (function (lambda (from) (setq to (funcall name-constructor from)) diff --git a/lisp/dired.el b/lisp/dired.el index d263f0b3044..74e6876fd28 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -335,7 +335,9 @@ Subexpression 2 must end right before the \\n or \\r.") "Face name used for flagged files.") (defface dired-warning - '((t (:inherit font-lock-comment-face))) + ;; Inherit from font-lock-warning-face since with min-colors 8 + ;; font-lock-comment-face is not colored any more. + '((t (:inherit font-lock-warning-face))) "Face used to highlight a part of a buffer that needs user attention." :group 'dired-faces :version "22.1") @@ -3336,7 +3338,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." (dired dired-dir) ;; The following elements of `desktop-buffer-misc' are the keys ;; from `dired-subdir-alist'. - (mapcar 'dired-maybe-insert-subdir (cdr desktop-buffer-misc)) + (mapc 'dired-maybe-insert-subdir (cdr desktop-buffer-misc)) (current-buffer)) (message "Desktop: Directory %s no longer exists." dir) (when desktop-missing-file-warning (sit-for 1)) diff --git a/lisp/doc-view.el b/lisp/doc-view.el new file mode 100644 index 00000000000..d7d2bb47abb --- /dev/null +++ b/lisp/doc-view.el @@ -0,0 +1,766 @@ +;;; doc-view.el --- View PDF/PostScript/DVI files in Emacs + +;; Copyright (C) 2007 Free Software Foundation, Inc. +;; +;; Author: Tassilo Horn <tassilo@member.fsf.org> +;; Maintainer: Tassilo Horn <tassilo@member.fsf.org> +;; Keywords: files, pdf, ps, dvi +;; Version: <2007-10-02 Tue 18:21> + +;; 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, 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; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Requirements: + +;; doc-view.el requires GNU Emacs 22.1 or newer. You also need GhostScript, +;; `dvipdfm' which comes with TeTeX and `pdftotext', which comes with poppler +;; (http://poppler.freedesktop.org/). + +;;; Commentary: + +;; DocView is a document viewer for Emacs. It converts PDF, PS and DVI files +;; to a set of PNG files, one PNG for each page, and displays the PNG images +;; inside an Emacs buffer. This buffer uses `doc-view-mode' which provides +;; convenient key bindings for browsing the document. +;; +;; To use it simply do +;; +;; M-x doc-view RET +;; +;; and you'll be queried for a document to open. +;; +;; Since conversion may take some time all the PNG images are cached in a +;; subdirectory of `doc-view-cache-directory' and reused when you want to view +;; that file again. This reusing can be omitted if you provide a prefx +;; argument to `doc-view'. To delete all cached files use +;; `doc-view-clear-cache'. To open the cache with dired, so that you can tidy +;; it out use `doc-view-dired-cache'. +;; +;; When conversion in underway the first page will be displayed as soon as it +;; is available and the available pages are refreshed every +;; `doc-view-conversion-refresh-interval' seconds. If that variable is nil the +;; pages won't be displayed before conversion of the document finished +;; completely. +;; +;; DocView lets you select a slice of the displayed pages. This slice will be +;; remembered and applied to all pages of the current document. This enables +;; you to cut away the margins of a document to save some space. To select a +;; slice you can use `doc-view-set-slice' (bound to `s s') which will query you +;; for the coordinates of the slice's top-left corner and its width and height. +;; A much more convenient way to do the same is offered by the command +;; `doc-view-set-slice-using-mouse' (bound to `s m'). After invokation you +;; only have to press mouse-1 at the top-left corner and drag it to the +;; bottom-right corner of the desired slice. To reset the slice use +;; `doc-view-reset-slice' (bound to `s r'). +;; +;; Dired users should have a look at `doc-view-dired'. +;; +;; You can also search within the document. The command `doc-view-search' +;; (bound to `C-s') queries for a search regexp and initializes a list of all +;; matching pages and messages how many match-pages were found. After that you +;; can jump to the next page containing a match with +;; `doc-view-search-next-match' (bound to `C-S-n') or to the previous matching +;; page with `doc-view-search-previous-match' (bound to `C-S-p'). This works +;; by searching a plain text representation of the document. If that doesn't +;; already exist the first invokation of `doc-view-search' starts the +;; conversion. When that finishes and you're still viewing the document +;; (i.e. you didn't switch to another buffer) you're queried for the regexp +;; then. + +;;; Configuration: + +;; Basically doc-view should be quite usable with its standard settings, so +;; putting +;; +;; (require 'doc-view) +;; +;; into your `user-init-file' should be enough. If the images are too small or +;; too big you should set the "-rXXX" option in `doc-view-ghostscript-options' +;; to another value. (The bigger your screen, the higher the value.) +;; +;; This and all other options can be set with the customization interface. +;; Simply do +;; +;; M-x customize-group RET doc-view RET +;; +;; and modify them to your needs. + +;;; Code: + +(require 'dired) +(eval-when-compile (require 'cl)) + +;;;; Customization Options + +(defgroup doc-view nil + "In-buffer viewer for PDF, PostScript and DVI files." + :link '(function-link doc-view) + :version "22.2" + :group 'applications + :group 'multimedia + :prefix "doc-view-") + +(defcustom doc-view-ghostscript-program "gs" + "Program to convert PS and PDF files to PNG." + :type '(file) + :group 'doc-view) + +(defcustom doc-view-ghostscript-options + '("-dNOPAUSE" "-sDEVICE=png16m" "-dTextAlphaBits=4" + "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET" + "-r100") + "A list of options to give to ghostview." + :type '(sexp) + :group 'doc-view) + +(defcustom doc-view-dvipdfm-program "dvipdfm" + "Program to convert DVI files to PDF. + +DVI file will be converted to PDF before the resulting PDF is +converted to PNG." + :type '(file) + :group 'doc-view) + +(defcustom doc-view-ps2pdf-program "ps2pdf" + "Program to convert PS files to PDF. + +PS files will be converted to PDF before searching is possible." + :type '(file) + :group 'doc-view) + +(defcustom doc-view-pdftotext-program "pdftotext" + "Program to convert PDF files to plain text. + +Needed for searching." + :type '(file) + :group 'doc-view) + +(defcustom doc-view-cache-directory (concat temporary-file-directory + "doc-view") + "The base directory, where the PNG images will be saved." + :type '(directory) + :group 'doc-view) + +(defcustom doc-view-conversion-buffer "*doc-view conversion output*" + "The buffer where messages from the converter programs go to." + :type '(string) + :group 'doc-view) + +(defcustom doc-view-conversion-refresh-interval 3 + "Every how much seconds the DocView buffer gets refreshed while conversion. +After such an refresh newly converted pages will be available for +viewing. If set to nil there won't be any refreshes and the +pages won't be displayed before conversion of the whole document +has finished." + :type '(string) + :group 'doc-view) + +;;;; Internal Variables + +(defvar doc-view-current-files nil + "Only used internally.") + +(defvar doc-view-current-page nil + "Only used internally.") + +(defvar doc-view-current-doc nil + "Only used internally.") + +(defvar doc-view-current-converter-process nil + "Only used internally.") + +(defvar doc-view-current-timer nil + "Only used internally.") + +(defvar doc-view-current-slice nil + "Only used internally.") + +(defvar doc-view-current-cache-dir nil + "Only used internally.") + +(defvar doc-view-current-search-matches nil + "Only used internally.") + +(defvar doc-view-current-image nil + "Only used internally.") + +(defvar doc-view-current-info nil + "Only used internally.") + +;;;; DocView Keymap + +(defvar doc-view-mode-map + (let ((map (make-sparse-keymap))) + ;; Navigation in the document + (define-key map (kbd "n") 'doc-view-next-page) + (define-key map (kbd "p") 'doc-view-previous-page) + (define-key map (kbd "<next>") 'doc-view-next-page) + (define-key map (kbd "<prior>") 'doc-view-previous-page) + (define-key map (kbd "SPC") 'doc-view-scroll-up-or-next-page) + (define-key map (kbd "DEL") 'doc-view-scroll-down-or-previous-page) + (define-key map (kbd "M-<") 'doc-view-first-page) + (define-key map (kbd "M->") 'doc-view-last-page) + (define-key map (kbd "g") 'doc-view-goto-page) + ;; Killing/burying the buffer (and the process) + (define-key map (kbd "q") 'bury-buffer) + (define-key map (kbd "k") 'doc-view-kill-proc-and-buffer) + (define-key map (kbd "C-x k") 'doc-view-kill-proc-and-buffer) + ;; Slicing the image + (define-key map (kbd "s s") 'doc-view-set-slice) + (define-key map (kbd "s m") 'doc-view-set-slice-using-mouse) + (define-key map (kbd "s r") 'doc-view-reset-slice) + ;; Searching + (define-key map (kbd "C-s") 'doc-view-search) + (define-key map (kbd "<find>") 'doc-view-search) + (define-key map (kbd "C-S-n") 'doc-view-search-next-match) + (define-key map (kbd "C-S-p") 'doc-view-search-previous-match) + ;; Scrolling + (define-key map (kbd "C-v") 'scroll-up) + (define-key map (kbd "<mouse-4>") 'mwheel-scroll) + (define-key map (kbd "<mouse-5>") 'mwheel-scroll) + (define-key map (kbd "M-v") 'scroll-down) + ;; Show the tooltip + (define-key map (kbd "C-t") 'doc-view-show-tooltip) + (suppress-keymap map) + map) + "Keymap used by `doc-view-mode'.") + +;;;; Navigation Commands + +(defun doc-view-goto-page (page) + "View the page given by PAGE." + (interactive "nPage: ") + (let ((len (length doc-view-current-files))) + (if (< page 1) + (setq page 1) + (when (> page len) + (setq page len))) + (setq doc-view-current-page page + doc-view-current-info + (concat + (propertize + (format "Page %d of %d." + doc-view-current-page + len) 'face 'bold) + ;; Tell user if converting isn't finished yet + (if doc-view-current-converter-process + " (still converting...)\n" + "\n") + ;; Display context infos if this page matches the last search + (when (and doc-view-current-search-matches + (assq doc-view-current-page + doc-view-current-search-matches)) + (concat (propertize "Search matches:\n" 'face 'bold) + (let ((contexts "")) + (dolist (m (cdr (assq doc-view-current-page + doc-view-current-search-matches))) + (setq contexts (concat contexts " - \"" m "\"\n"))) + contexts))))) + ;; Update the buffer + (setq inhibit-read-only t) + (erase-buffer) + (let ((beg (point))) + (doc-view-insert-image (nth (1- page) doc-view-current-files) + :pointer 'arrow) + (put-text-property beg (point) 'help-echo doc-view-current-info)) + (insert "\n" doc-view-current-info) + (goto-char (point-min)) + (forward-char) + (setq inhibit-read-only nil))) + +(defun doc-view-next-page (&optional arg) + "Browse ARG pages forward." + (interactive "p") + (doc-view-goto-page (+ doc-view-current-page (or arg 1)))) + +(defun doc-view-previous-page (&optional arg) + "Browse ARG pages backward." + (interactive "p") + (doc-view-goto-page (- doc-view-current-page (or arg 1)))) + +(defun doc-view-first-page () + "View the first page." + (interactive) + (doc-view-goto-page 1)) + +(defun doc-view-last-page () + "View the last page." + (interactive) + (doc-view-goto-page (length doc-view-current-files))) + +(defun doc-view-scroll-up-or-next-page () + "Scroll page up if possible, else goto next page." + (interactive) + (condition-case nil + (scroll-up) + (error (doc-view-next-page)))) + +(defun doc-view-scroll-down-or-previous-page () + "Scroll page down if possible, else goto previous page." + (interactive) + (condition-case nil + (scroll-down) + (error (doc-view-previous-page) + (goto-char (point-max))))) + +(defun doc-view-kill-proc-and-buffer () + "Kill the current converter process and buffer." + (interactive) + (when (eq major-mode 'doc-view-mode) + (when doc-view-current-converter-process + (kill-process doc-view-current-converter-process)) + (when doc-view-current-timer + (cancel-timer doc-view-current-timer) + (setq doc-view-current-timer nil)) + (kill-buffer (current-buffer)))) + +;;;; Conversion Functions + +(defun doc-view-file-name-to-directory-name (file) + "Return the directory where the png files of FILE should be saved. + +It'a a subdirectory of `doc-view-cache-directory'." + (if doc-view-current-cache-dir + doc-view-current-cache-dir + (file-name-as-directory + (concat (file-name-as-directory doc-view-cache-directory) + (with-temp-buffer + (insert-file-contents-literally file) + (md5 (current-buffer))))))) + +(defun doc-view-dvi->pdf-sentinel (proc event) + "If DVI->PDF conversion was successful, convert the PDF to PNG now." + (if (not (string-match "finished" event)) + (message "DocView: dvi->pdf process changed status to %s." event) + (set-buffer (process-get proc 'buffer)) + (setq doc-view-current-converter-process nil) + (message "DocView: finished conversion from DVI to PDF!") + ;; Now go on converting this PDF to a set of PNG files. + (let* ((pdf (process-get proc 'pdf-file)) + (png (concat (doc-view-file-name-to-directory-name + doc-view-current-doc) + "page-%d.png"))) + (doc-view-pdf/ps->png pdf png)))) + +(defun doc-view-dvi->pdf (dvi pdf) + "Convert DVI to PDF asynchrounously." + (message "DocView: converting DVI to PDF now!") + (setq doc-view-current-converter-process + (start-process "doc-view-dvi->pdf" doc-view-conversion-buffer + doc-view-dvipdfm-program + "-o" pdf dvi)) + (set-process-sentinel doc-view-current-converter-process + 'doc-view-dvi->pdf-sentinel) + (process-put doc-view-current-converter-process 'buffer (current-buffer)) + (process-put doc-view-current-converter-process 'pdf-file pdf)) + +(defun doc-view-pdf/ps->png-sentinel (proc event) + "If PDF/PS->PNG conversion was successful, update the display." + (if (not (string-match "finished" event)) + (message "DocView: converter process changed status to %s." event) + (set-buffer (process-get proc 'buffer)) + (setq doc-view-current-converter-process nil) + (when doc-view-current-timer + (cancel-timer doc-view-current-timer) + (setq doc-view-current-timer nil)) + (message "DocView: finished conversion from PDF/PS to PNG!") + ;; Yippie, finished. Update the display! + (doc-view-display doc-view-current-doc))) + +(defun doc-view-pdf/ps->png (pdf-ps png) + "Convert PDF-PS to PNG asynchrounously." + (message "DocView: converting PDF or PS to PNG now!") + (setq doc-view-current-converter-process + (apply 'start-process + (append (list "doc-view-pdf/ps->png" doc-view-conversion-buffer + doc-view-ghostscript-program) + doc-view-ghostscript-options + (list (concat "-sOutputFile=" png)) + (list pdf-ps)))) + (process-put doc-view-current-converter-process + 'buffer (current-buffer)) + (set-process-sentinel doc-view-current-converter-process + 'doc-view-pdf/ps->png-sentinel) + (when doc-view-conversion-refresh-interval + (setq doc-view-current-timer + (run-at-time "1 secs" doc-view-conversion-refresh-interval + 'doc-view-display + doc-view-current-doc)))) + +(defun doc-view-pdf->txt-sentinel (proc event) + (if (not (string-match "finished" event)) + (message "DocView: converter process changed status to %s." event) + (let ((current-buffer (current-buffer)) + (proc-buffer (process-get proc 'buffer))) + (set-buffer proc-buffer) + (setq doc-view-current-converter-process nil) + (message "DocView: finished conversion from PDF to TXT!") + ;; If the user looks at the DocView buffer where the conversion was + ;; performed, search anew. This time it will be queried for a regexp. + (when (eq current-buffer proc-buffer) + (doc-view-search))))) + +(defun doc-view-pdf->txt (pdf txt) + "Convert PDF to TXT asynchrounously." + (message "DocView: converting PDF to TXT now!") + (setq doc-view-current-converter-process + (start-process "doc-view-pdf->txt" doc-view-conversion-buffer + doc-view-pdftotext-program "-raw" + pdf txt)) + (set-process-sentinel doc-view-current-converter-process + 'doc-view-pdf->txt-sentinel) + (process-put doc-view-current-converter-process 'buffer (current-buffer))) + +(defun doc-view-ps->pdf-sentinel (proc event) + (if (not (string-match "finished" event)) + (message "DocView: converter process changed status to %s." event) + (set-buffer (process-get proc 'buffer)) + (setq doc-view-current-converter-process nil) + (message "DocView: finished conversion from PS to PDF!") + ;; Now we can transform to plain text. + (doc-view-pdf->txt (process-get proc 'pdf-file) + (concat (doc-view-file-name-to-directory-name + doc-view-current-doc) + "doc.txt")))) + +(defun doc-view-ps->pdf (ps pdf) + "Convert PS to PDF asynchronously." + (message "DocView: converting PS to PDF now!") + (setq doc-view-current-converter-process + (start-process "doc-view-ps->pdf" doc-view-conversion-buffer + doc-view-ps2pdf-program + ps pdf)) + (set-process-sentinel doc-view-current-converter-process + 'doc-view-ps->pdf-sentinel) + (process-put doc-view-current-converter-process 'buffer (current-buffer)) + (process-put doc-view-current-converter-process 'pdf-file pdf)) + +(defun doc-view-convert-doc (doc) + "Convert DOC to a set of png files, one file per page. + +Those files are saved in the directory given by +`doc-view-file-name-to-directory-name'." + (clear-image-cache) + (let* ((dir (doc-view-file-name-to-directory-name doc)) + (png-file (concat (file-name-as-directory dir) "page-%d.png"))) + (when (file-exists-p dir) + (dired-delete-file dir 'always)) + (make-directory dir t) + (if (not (string= (file-name-extension doc) "dvi")) + ;; Convert to PNG images. + (doc-view-pdf/ps->png doc png-file) + ;; DVI files have to be converted to PDF before GhostScript can process + ;; it. + (doc-view-dvi->pdf doc + (concat (file-name-as-directory dir) + "doc.pdf"))))) + +;;;; DocView Mode + +(define-derived-mode doc-view-mode nil "DocView" + "Major mode in DocView buffers. + +\\{doc-view-mode-map}" + :group 'doc-view + (setq buffer-read-only t) + (make-local-variable 'doc-view-current-files) + (make-local-variable 'doc-view-current-doc) + (make-local-variable 'doc-view-current-image) + (make-local-variable 'doc-view-current-page) + (make-local-variable 'doc-view-current-converter-process) + (make-local-variable 'doc-view-current-timer) + (make-local-variable 'doc-view-current-slice) + (make-local-variable 'doc-view-current-cache-dir) + (make-local-variable 'doc-view-current-info) + (make-local-variable 'doc-view-current-search-matches)) + +;;;; Slicing + +(defun doc-view-set-slice (x y width height) + "Set the slice of the images that should be displayed. +You can use this function to tell doc-view not to display the +margins of the document. It prompts for the top-left corner (X +and Y) of the slice to display and its WIDTH and HEIGHT. + +See `doc-view-set-slice-using-mouse' for a more convenient way to +do that. To reset the slice use `doc-view-reset-slice'." + (interactive + (let* ((size (image-size doc-view-current-image t)) + (a (read-number (format "Top-left X (0..%d): " (car size)))) + (b (read-number (format "Top-left Y (0..%d): " (cdr size)))) + (c (read-number (format "Width (0..%d): " (- (car size) a)))) + (d (read-number (format "Height (0..%d): " (- (cdr size) b))))) + (list a b c d))) + (setq doc-view-current-slice (list x y width height)) + ;; Redisplay + (doc-view-goto-page doc-view-current-page)) + +(defun doc-view-set-slice-using-mouse () + "Set the slice of the images that should be displayed. +You set the slice by pressing mouse-1 at its top-left corner and +dragging it to its bottom-right corner. See also +`doc-view-set-slice' and `doc-view-reset-slice'." + (interactive) + (let (x y w h done) + (while (not done) + (let ((e (read-event + (concat "Press mouse-1 at the top-left corner and " + "drag it to the bottom-right corner!")))) + (when (eq (car e) 'drag-mouse-1) + (setq x (car (posn-object-x-y (event-start e)))) + (setq y (cdr (posn-object-x-y (event-start e)))) + (setq w (- (car (posn-object-x-y (event-end e))) x)) + (setq h (- (cdr (posn-object-x-y (event-end e))) y)) + (setq done t)))) + (doc-view-set-slice x y w h))) + +(defun doc-view-reset-slice () + "Reset the current slice. +After calling this function the whole pages will be visible +again." + (interactive) + (setq doc-view-current-slice nil) + ;; Redisplay + (doc-view-goto-page doc-view-current-page)) + +;;;; Display + +(defun doc-view-insert-image (file &rest args) + "Insert the given png FILE. +ARGS is a list of image descriptors." + (let ((image (apply 'create-image file 'png nil args))) + (setq doc-view-current-image image) + (insert-image image (concat "[" file "]") nil doc-view-current-slice))) + +(defun doc-view-sort (a b) + "Return non-nil if A should be sorted before B. +Predicate for sorting `doc-view-current-files'." + (if (< (length a) (length b)) + t + (if (> (length a) (length b)) + nil + (string< a b)))) + +(defun doc-view-display (doc) + "Start viewing the document DOC." + (let ((dir (doc-view-file-name-to-directory-name doc))) + (set-buffer (format "*DocView: %s*" doc)) + (setq doc-view-current-files + (sort (directory-files dir t "page-[0-9]+\\.png" t) + 'doc-view-sort)) + (when (> (length doc-view-current-files) 0) + (doc-view-goto-page doc-view-current-page)))) + +(defun doc-view-buffer-message () + (setq inhibit-read-only t) + (erase-buffer) + (insert (propertize "Welcome to DocView!" 'face 'bold) + "\n" + " +If you see this buffer it means that the document you want to +view gets converted to PNG now and the conversion of the first +page hasn't finished yet or +`doc-view-conversion-refresh-interval' is set to nil. + +For now these keys are useful: + +`q' : Bury this buffer. Conversion will go on in background. +`k' : Kill the conversion process and this buffer.\n") + (setq inhibit-read-only nil)) + +(defun doc-view-show-tooltip () + (interactive) + (tooltip-show doc-view-current-info)) + +;;;; Searching + +(defun doc-view-search-internal (regexp file) + "Return a list of FILE's pages that contain text matching REGEXP. +The value is an alist of the form (PAGE CONTEXTS) where PAGE is +the pagenumber and CONTEXTS are all lines of text containing a match." + (with-temp-buffer + (insert-file-contents file) + (let ((page 1) + (lastpage 1) + matches) + (while (re-search-forward (concat "\\(?:\\([]\\)\\|\\(" + regexp "\\)\\)") nil t) + (when (match-string 1) (incf page)) + (when (match-string 2) + (if (/= page lastpage) + (setq matches (push (cons page + (list (buffer-substring + (line-beginning-position) + (line-end-position)))) + matches)) + (setq matches (cons + (append + (or + ;; This page already is a match. + (car matches) + ;; This is the first match on page. + (list page)) + (list (buffer-substring + (line-beginning-position) + (line-end-position)))) + (cdr matches)))) + (setq lastpage page))) + (nreverse matches)))) + +(defun doc-view-search-no-of-matches (list) + "Extract the number of matches from the search result LIST." + (let ((no 0)) + (dolist (p list) + (setq no (+ no (1- (length p))))) + no)) + +(defun doc-view-search () + "Query for a regexp and search the current document. +If the current document hasn't been transformed to plain text +till now do that first. You should try searching anew when the +conversion finished." + (interactive) + ;; New search, so forget the old results. + (setq doc-view-current-search-matches nil) + (let ((txt (concat (doc-view-file-name-to-directory-name + doc-view-current-doc) + "doc.txt"))) + (if (file-readable-p txt) + (progn + (setq doc-view-current-search-matches + (doc-view-search-internal + (read-from-minibuffer "Regexp: ") + txt)) + (message "DocView: search yielded %d matches." + (doc-view-search-no-of-matches + doc-view-current-search-matches))) + ;; We must convert to TXT first! + (if doc-view-current-converter-process + (message "DocView: please wait till conversion finished.") + (let ((ext (file-name-extension doc-view-current-doc))) + (cond + ((string= ext "pdf") + ;; Doc is a PDF, so convert it to TXT + (doc-view-pdf->txt doc-view-current-doc txt)) + ((string= ext "ps") + ;; Doc is a PS, so convert it to PDF (which will be converted to + ;; TXT thereafter). + (doc-view-ps->pdf doc-view-current-doc + (concat (doc-view-file-name-to-directory-name + doc-view-current-doc) + "doc.pdf"))) + ((string= ext "dvi") + ;; Doc is a DVI. This means that a doc.pdf already exists in its + ;; cache subdirectory. + (doc-view-pdf->txt (concat (doc-view-file-name-to-directory-name + doc-view-current-doc) + "doc.pdf") + txt)) + (t (error "DocView doesn't know what to do")))))))) + +(defun doc-view-search-next-match (arg) + "Go to the ARGth next matching page." + (interactive "p") + (let* ((next-pages (remove-if (lambda (i) (<= (car i) doc-view-current-page)) + doc-view-current-search-matches)) + (page (car (nth (1- arg) next-pages)))) + (if page + (doc-view-goto-page page) + (when (and + doc-view-current-search-matches + (y-or-n-p "No more matches after current page. Wrap to first match? ")) + (doc-view-goto-page (caar doc-view-current-search-matches)))))) + +(defun doc-view-search-previous-match (arg) + "Go to the ARGth previous matching page." + (interactive "p") + (let* ((prev-pages (remove-if (lambda (i) (>= (car i) doc-view-current-page)) + doc-view-current-search-matches)) + (page (car (nth (1- arg) (nreverse prev-pages))))) + (if page + (doc-view-goto-page page) + (when (and + doc-view-current-search-matches + (y-or-n-p "No more matches before current page. Wrap to last match? ")) + (doc-view-goto-page (caar (last doc-view-current-search-matches))))))) + +;;;; User Interface Commands + +;;;###autoload +(defun doc-view (no-cache &optional file) + "Convert FILE to png and start viewing it. +If no FILE is given, query for on. +If this FILE is still in the cache, don't convert and use the +existing page files. With prefix arg NO-CACHE, don't use the +cached files and convert anew." + (interactive "P") + (if (not (and (image-type-available-p 'png) + (display-images-p))) + (message "DocView: your emacs or display doesn't support png images.") + (let* ((doc (or file + (expand-file-name + (let ((completion-ignored-extensions + ;; Don't hide files doc-view can display + (remove-if (lambda (str) + (string-match "\\.\\(ps\\|pdf\\|dvi\\)$" + str)) + completion-ignored-extensions))) + (read-file-name "File: " nil nil t))))) + (buffer (get-buffer-create (format "*DocView: %s*" doc))) + (dir (doc-view-file-name-to-directory-name doc))) + (switch-to-buffer buffer) + (doc-view-buffer-message) + (doc-view-mode) + (setq doc-view-current-doc doc) + (setq doc-view-current-page 1) + (if (not (and (file-exists-p dir) + (not no-cache))) + (progn + (setq doc-view-current-cache-dir nil) + (doc-view-convert-doc doc-view-current-doc)) + (message "DocView: using cached files!") + (doc-view-display doc-view-current-doc))))) + +(defun doc-view-dired (no-cache) + "View the current dired file with doc-view. +NO-CACHE is the same as in `doc-view'. + +You might want to bind this command to a dired key, e.g. + + (define-key dired-mode-map (kbd \"C-c d\") 'doc-view-dired)" + (interactive "P") + (doc-view no-cache (dired-get-file-for-visit))) + +(defun doc-view-clear-cache () + "Delete the whole cache (`doc-view-cache-directory')." + (interactive) + (dired-delete-file doc-view-cache-directory 'always) + (make-directory doc-view-cache-directory)) + +(defun doc-view-dired-cache () + "Open `dired' in `doc-view-cache-directory'." + (interactive) + (dired doc-view-cache-directory)) + +(provide 'doc-view) + +;; Local Variables: +;; mode: outline-minor +;; End: + +;; arch-tag: 5d6e5c5e-095f-489e-b4e4-1ca90a7d79be +;;; doc-view.el ends here diff --git a/lisp/double.el b/lisp/double.el index 0b5cf110fbd..39a55744a05 100644 --- a/lisp/double.el +++ b/lisp/double.el @@ -145,11 +145,12 @@ but not `C-u X' or `ESC X' since the X is not the prefix key." (if enable-flag (progn ;; Set up key-translation-map as indicated by `double-map'. + ;; XXX I don't think key-translation-map should be made local here. -- Lorentey (kill-local-variable 'key-translation-map) (make-local-variable 'key-translation-map) (setq key-translation-map (if (keymapp key-translation-map) - (copy-keymap key-translation-map) - (make-sparse-keymap))) + (copy-keymap key-translation-map) + (make-sparse-keymap))) (mapcar (function (lambda (entry) (define-key key-translation-map (vector (nth 0 entry)) diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 744a7ba4617..3b2b17fe188 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -175,7 +175,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of (let ((map (make-keymap))) (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) (define-key map "\e" nil) - (define-key map "\C-z" 'suspend-emacs) + (define-key map "\C-z" 'suspend-frame) (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) (define-key map (char-to-string help-char) 'Helper-help) (define-key map "?" 'Helper-describe-bindings) diff --git a/lisp/echistory.el b/lisp/echistory.el index 8d5b5e2beea..7468dd0b7fd 100644 --- a/lisp/echistory.el +++ b/lisp/echistory.el @@ -66,7 +66,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing." (define-key electric-history-map "\C-c" nil) (define-key electric-history-map "\C-c\C-c" 'Electric-history-quit) (define-key electric-history-map "\C-]" 'Electric-history-quit) - (define-key electric-history-map "\C-z" 'suspend-emacs) + (define-key electric-history-map "\C-z" 'suspend-frame) (define-key electric-history-map (char-to-string help-char) 'Helper-help) (define-key electric-history-map "?" 'Helper-describe-bindings) (define-key electric-history-map "\e>" 'end-of-buffer) diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index ec153fde625..451f87e142d 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -138,7 +138,7 @@ Options `-c', `-u', and `-i' are not allowed. Case sensitivity can be toggled interactively using \\[ediff-toggle-ignore-case]. This variable is not for customizing the look of the differences produced by -the command \\[ediff-show-diff-output]. Use the variable +the command \\[ediff-show-diff-output]. Use the variable `ediff-custom-diff-options' for that." :set 'ediff-reset-diff-options :type 'string @@ -348,20 +348,20 @@ one optional arguments, diff-number to refine.") ;; fixup diff-list (if diff3-job (cond ((not file-A) - (mapcar (lambda (elt) - (aset elt 0 nil) - (aset elt 1 nil)) - (cdr diff-list))) + (mapc (lambda (elt) + (aset elt 0 nil) + (aset elt 1 nil)) + (cdr diff-list))) ((not file-B) - (mapcar (lambda (elt) - (aset elt 2 nil) - (aset elt 3 nil)) - (cdr diff-list))) + (mapc (lambda (elt) + (aset elt 2 nil) + (aset elt 3 nil)) + (cdr diff-list))) ((not file-C) - (mapcar (lambda (elt) - (aset elt 4 nil) - (aset elt 5 nil)) - (cdr diff-list))) + (mapc (lambda (elt) + (aset elt 4 nil) + (aset elt 5 nil)) + (cdr diff-list))) )) (ediff-convert-fine-diffs-to-overlays diff-list reg-num) @@ -1533,7 +1533,7 @@ affects only files whose names match the expression." (defun ediff-set-actual-diff-options () (if ediff-ignore-case - (setq ediff-actual-diff-options + (setq ediff-actual-diff-options (concat ediff-diff-options " " ediff-ignore-case-option) ediff-actual-diff3-options (concat ediff-diff3-options " " ediff-ignore-case-option3)) diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 21bf73ff76a..21e6bf660ee 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el @@ -1410,7 +1410,7 @@ This property can be toggled interactively." ;;; Misc ;; if nil, this silences some messages -(defconst ediff-verbose-p t) +(defvar ediff-verbose-p t) (defcustom ediff-autostore-merges 'group-jobs-only "*Save the results of merge jobs automatically. diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index d94e7515932..3696d8ae776 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el @@ -370,7 +370,7 @@ buffers." (ediff-defvar-local ediff-verbose-help-enabled nil "If t, display redundant help in ediff-directories and other meta buffers. Toggled by ediff-toggle-verbose-help-meta-buffer" ) - + ;; Toggle verbose help in meta-buffers ;; TODO: Someone who understands all this can make it better. (defun ediff-toggle-verbose-help-meta-buffer () @@ -641,15 +641,15 @@ behavior." ;; If file belongs to dir 1 only, the membership code is 2. ;; If it is in dir1 and dir3, then the membership code is 2*5=10; ;; if it is in dir1 and dir2, then the membership code is 2*3=6, etc. - (mapcar (lambda (elt) - (if (member (car elt) lis1) - (setcdr elt (* (cdr elt) ediff-membership-code1))) - (if (member (car elt) lis2) - (setcdr elt (* (cdr elt) ediff-membership-code2))) - (if (member (car elt) lis3) - (setcdr elt (* (cdr elt) ediff-membership-code3))) - ) - difflist) + (mapc (lambda (elt) + (if (member (car elt) lis1) + (setcdr elt (* (cdr elt) ediff-membership-code1))) + (if (member (car elt) lis2) + (setcdr elt (* (cdr elt) ediff-membership-code2))) + (if (member (car elt) lis3) + (setcdr elt (* (cdr elt) ediff-membership-code3))) + ) + difflist) (setq difflist (cons ;; diff metalist header (ediff-make-new-meta-list-header regexp @@ -941,7 +941,7 @@ behavior." ;; was redrawn (ediff-cond-compile-for-xemacs-or-emacs (map-extents 'delete-extent) ; xemacs - (mapcar 'delete-overlay (overlays-in 1 1)) ; emacs + (mapc 'delete-overlay (overlays-in 1 1)) ; emacs ) (setq regexp (ediff-get-group-regexp meta-list) @@ -1329,7 +1329,7 @@ Useful commands: ;; copy file to directories where it doesn't exist, update ;; ediff-dir-difference-list and redisplay - (mapcar + (mapc (lambda (otherfile-struct) (let ((otherfile (car otherfile-struct)) (file-mem-code (cdr otherfile-struct))) @@ -1390,7 +1390,7 @@ Useful commands: ;; was redrawn (ediff-cond-compile-for-xemacs-or-emacs (map-extents 'delete-extent) ; xemacs - (mapcar 'delete-overlay (overlays-in 1 1)) ; emacs + (mapc 'delete-overlay (overlays-in 1 1)) ; emacs ) (insert "This is a registry of all active Ediff sessions. @@ -1410,11 +1410,11 @@ Useful commands: ") ;; purge registry list from dead buffers - (mapcar (lambda (elt) - (if (not (ediff-buffer-live-p elt)) - (setq ediff-session-registry - (delq elt ediff-session-registry)))) - ediff-session-registry) + (mapc (lambda (elt) + (if (not (ediff-buffer-live-p elt)) + (setq ediff-session-registry + (delq elt ediff-session-registry)))) + ediff-session-registry) (if (null ediff-session-registry) (insert " ******* No active Ediff sessions *******\n")) diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el index 7a469879274..2efa2ac3012 100644 --- a/lisp/ediff-ptch.el +++ b/lisp/ediff-ptch.el @@ -292,43 +292,43 @@ program." ) ;; chop off base-dirs - (mapcar (lambda (session-info) - (let* ((proposed-file-names - ;; Filename-spec is objA; it is represented as - ;; (file1 . file2). Get it using ediff-get-session-objA. - (ediff-get-session-objA-name session-info)) - ;; base-dir1 is the dir part of the 1st file in the patch - (base-dir1 - (or (file-name-directory (car proposed-file-names)) - "")) - ;; directory part of the 2nd file in the patch - (base-dir2 - (or (file-name-directory (cdr proposed-file-names)) - "")) - ) - ;; If both base-dir1 and base-dir2 are relative and exist, - ;; assume that - ;; these dirs lead to the actual files starting at the present - ;; directory. So, we don't strip these relative dirs from the - ;; file names. This is a heuristic intended to improve guessing - (let ((default-directory (file-name-directory filename))) - (unless (or (file-name-absolute-p base-dir1) - (file-name-absolute-p base-dir2) - (not (file-exists-p base-dir1)) - (not (file-exists-p base-dir2))) - (setq base-dir1 "" - base-dir2 ""))) - (or (string= (car proposed-file-names) "/dev/null") - (setcar proposed-file-names - (ediff-file-name-sans-prefix - (car proposed-file-names) base-dir1))) - (or (string= - (cdr proposed-file-names) "/dev/null") - (setcdr proposed-file-names - (ediff-file-name-sans-prefix - (cdr proposed-file-names) base-dir2))) - )) - ediff-patch-map) + (mapc (lambda (session-info) + (let* ((proposed-file-names + ;; Filename-spec is objA; it is represented as + ;; (file1 . file2). Get it using ediff-get-session-objA. + (ediff-get-session-objA-name session-info)) + ;; base-dir1 is the dir part of the 1st file in the patch + (base-dir1 + (or (file-name-directory (car proposed-file-names)) + "")) + ;; directory part of the 2nd file in the patch + (base-dir2 + (or (file-name-directory (cdr proposed-file-names)) + "")) + ) + ;; If both base-dir1 and base-dir2 are relative and exist, + ;; assume that + ;; these dirs lead to the actual files starting at the present + ;; directory. So, we don't strip these relative dirs from the + ;; file names. This is a heuristic intended to improve guessing + (let ((default-directory (file-name-directory filename))) + (unless (or (file-name-absolute-p base-dir1) + (file-name-absolute-p base-dir2) + (not (file-exists-p base-dir1)) + (not (file-exists-p base-dir2))) + (setq base-dir1 "" + base-dir2 ""))) + (or (string= (car proposed-file-names) "/dev/null") + (setcar proposed-file-names + (ediff-file-name-sans-prefix + (car proposed-file-names) base-dir1))) + (or (string= + (cdr proposed-file-names) "/dev/null") + (setcdr proposed-file-names + (ediff-file-name-sans-prefix + (cdr proposed-file-names) base-dir2))) + )) + ediff-patch-map) ;; take the given file name into account (or (file-directory-p filename) @@ -338,19 +338,19 @@ program." (file-name-nondirectory filename)))) ;; prepend actual-dir - (mapcar (lambda (session-info) - (let ((proposed-file-names - (ediff-get-session-objA-name session-info))) - (if (and (string-match "^/null/" (car proposed-file-names)) - (string-match "^/null/" (cdr proposed-file-names))) - ;; couldn't intuit the file name to patch, so - ;; something is amiss - (progn - (with-output-to-temp-buffer ediff-msg-buffer - (ediff-with-current-buffer standard-output - (fundamental-mode)) - (princ - (format " + (mapc (lambda (session-info) + (let ((proposed-file-names + (ediff-get-session-objA-name session-info))) + (if (and (string-match "^/null/" (car proposed-file-names)) + (string-match "^/null/" (cdr proposed-file-names))) + ;; couldn't intuit the file name to patch, so + ;; something is amiss + (progn + (with-output-to-temp-buffer ediff-msg-buffer + (ediff-with-current-buffer standard-output + (fundamental-mode)) + (princ + (format " The patch file contains a context diff for %s %s @@ -361,31 +361,31 @@ please enter it now. If you don't know and still would like to apply patches to other files, enter /dev/null " - (substring (car proposed-file-names) 6) - (substring (cdr proposed-file-names) 6)))) - (let ((directory t) - user-file) - (while directory - (setq user-file - (read-file-name - "Please enter file name: " - actual-dir actual-dir t)) - (if (not (file-directory-p user-file)) - (setq directory nil) - (setq directory t) - (beep) - (message "%s is a directory" user-file) - (sit-for 2))) - (setcar (ediff-get-session-objA session-info) - (cons user-file user-file)))) - (setcar proposed-file-names - (expand-file-name - (concat actual-dir (car proposed-file-names)))) - (setcdr proposed-file-names - (expand-file-name - (concat actual-dir (cdr proposed-file-names))))) - )) - ediff-patch-map) + (substring (car proposed-file-names) 6) + (substring (cdr proposed-file-names) 6)))) + (let ((directory t) + user-file) + (while directory + (setq user-file + (read-file-name + "Please enter file name: " + actual-dir actual-dir t)) + (if (not (file-directory-p user-file)) + (setq directory nil) + (setq directory t) + (beep) + (message "%s is a directory" user-file) + (sit-for 2))) + (setcar (ediff-get-session-objA session-info) + (cons user-file user-file)))) + (setcar proposed-file-names + (expand-file-name + (concat actual-dir (car proposed-file-names)))) + (setcdr proposed-file-names + (expand-file-name + (concat actual-dir (cdr proposed-file-names))))) + )) + ediff-patch-map) ;; Check for the existing files in each pair and discard the nonexisting ;; ones. If both exist, ask the user. (mapcar (lambda (session-info) diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index e60faa0a0da..14b1be963d7 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -122,7 +122,7 @@ Commands: ;; modified by minor modes and such. So, run-mode-hooks doesn't do anything ;; useful here on top of what run-hooks does. ;; Second, changing run-hooks to run-mode-hooks would require an - ;; if-statement, since XEmacs doesn't have this. + ;; if-statement, since XEmacs doesn't have this. (run-hooks 'ediff-mode-hook)) @@ -1317,10 +1317,10 @@ which see." ;; change default (setq-default ediff-window-setup-function window-setup-func) ;; change in all active ediff sessions - (mapcar (lambda(buf) (ediff-with-current-buffer buf - (setq ediff-window-setup-function window-setup-func - ediff-window-B nil))) - ediff-session-registry) + (mapc (lambda(buf) (ediff-with-current-buffer buf + (setq ediff-window-setup-function window-setup-func + ediff-window-B nil))) + ediff-session-registry) (if (ediff-in-control-buffer-p) (ediff-recenter 'no-rehighlight)))) @@ -1341,12 +1341,12 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." ;; do this only after killing the toolbar (setq ediff-use-toolbar-p (not ediff-use-toolbar-p)) - (mapcar (lambda(buf) - (ediff-with-current-buffer buf - ;; force redisplay - (setq ediff-window-config-saved "") - )) - ediff-session-registry) + (mapc (lambda(buf) + (ediff-with-current-buffer buf + ;; force redisplay + (setq ediff-window-config-saved "") + )) + ediff-session-registry) (if (ediff-in-control-buffer-p) (ediff-recenter 'no-rehighlight))))) @@ -2439,14 +2439,14 @@ temporarily reverses the meaning of this variable." ;; Apply selective display to narrow or widen (ediff-visible-region) - (mapcar (lambda (overl) - (if (ediff-overlayp overl) - (ediff-delete-overlay overl))) - ediff-wide-bounds) - (mapcar (lambda (overl) - (if (ediff-overlayp overl) - (ediff-delete-overlay overl))) - ediff-narrow-bounds) + (mapc (lambda (overl) + (if (ediff-overlayp overl) + (ediff-delete-overlay overl))) + ediff-wide-bounds) + (mapc (lambda (overl) + (if (ediff-overlayp overl) + (ediff-delete-overlay overl))) + ediff-narrow-bounds) ;; restore buffer mode line id's in buffer-A/B/C (let ((control-buffer ediff-control-buffer) @@ -3747,13 +3747,13 @@ Ediff Control Panel to restore highlighting." ;; VEC is either a difference vector or a fine-diff vector (defun ediff-clear-diff-vector (vec-var &optional fine-diffs-also) (if (vectorp (symbol-value vec-var)) - (mapcar (lambda (elt) - (ediff-delete-overlay - (ediff-get-diff-overlay-from-diff-record elt)) - (if fine-diffs-also - (ediff-clear-fine-diff-vector elt)) - ) - (symbol-value vec-var))) + (mapc (lambda (elt) + (ediff-delete-overlay + (ediff-get-diff-overlay-from-diff-record elt)) + (if fine-diffs-also + (ediff-clear-fine-diff-vector elt)) + ) + (symbol-value vec-var))) ;; allow them to be garbage collected (set vec-var nil)) diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el index 897845c182a..c2c130ac6bb 100644 --- a/lisp/ediff-wind.el +++ b/lisp/ediff-wind.el @@ -72,15 +72,15 @@ :group 'frames) -(defcustom ediff-window-setup-function (if (ediff-window-display-p) - 'ediff-setup-windows-multiframe - 'ediff-setup-windows-plain) +(defcustom ediff-window-setup-function 'ediff-setup-windows-automatic "*Function called to set up windows. -Ediff provides a choice of two functions: `ediff-setup-windows-plain', for -doing everything in one frame, and `ediff-setup-windows-multiframe', -which sets the control panel in a separate frame. Also, if the latter -function detects that one of the buffers A/B is seen in some other frame, -it will try to keep that buffer in that frame. +Ediff provides a choice of three functions: `ediff-setup-windows-plain', for +doing everything in one frame, `ediff-setup-windows-multiframe', which sets +the control panel in a separate frame, and +`ediff-setup-windows-automatic' (the default), which chooses an appropriate +behaviour based on the current window system. If the multiframe function +detects that one of the buffers A/B is seen in some other frame, it will try +to keep that buffer in that frame. If you don't like the two functions provided---write your own one. The basic guidelines: @@ -94,7 +94,8 @@ The basic guidelines: Buffer C may not be used in jobs that compare only two buffers. If you plan to do something fancy, take a close look at how the two provided functions are written." - :type '(choice (const :tag "Multi Frame" ediff-setup-windows-multiframe) + :type '(choice (const :tag "Automatic" ediff-setup-windows-automatic) + (const :tag "Multi Frame" ediff-setup-windows-multiframe) (const :tag "Single Frame" ediff-setup-windows-plain) (function :tag "Other function")) :group 'ediff-window) @@ -335,6 +336,12 @@ into icons, regardless of the window manager." buffer-A buffer-B buffer-C control-buffer)) (run-hooks 'ediff-after-setup-windows-hook)) +;; Set up windows using the correct method based on the current window system. +(defun ediff-setup-windows-automatic (buffer-A buffer-B buffer-C control-buffer) + (if (ediff-window-display-p) + (ediff-setup-windows-multiframe buffer-A buffer-B buffer-C control-buffer) + (ediff-setup-windows-plain buffer-A buffer-B buffer-C control-buffer))) + ;; Just set up 3 windows. ;; Usually used without windowing systems ;; With windowing, we want to use dedicated frames. diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 6a0b28a4b82..55138f18bca 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -486,9 +486,9 @@ doubt, use whitespace." (fkey nil) tlen tkey (bind (or (loop for map in maps for b = (lookup-key map key) thereis (and (not (integerp b)) b)) - (and (setq fkey (lookup-key function-key-map rest-mac)) + (and (setq fkey (lookup-key local-function-key-map rest-mac)) (setq tlen fkey tkey (edmacro-subseq rest-mac 0 tlen) - fkey (lookup-key function-key-map tkey)) + fkey (lookup-key local-function-key-map tkey)) (loop for map in maps for b = (lookup-key map fkey) when (and (not (integerp b)) b) diff --git a/lisp/emerge.el b/lisp/emerge.el index 447e45f14f3..0c1b3b170cd 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -1886,13 +1886,13 @@ buffer after this will cause serious problems." (emerge-restore-buffer-characteristics) ;; null out the difference markers so they don't slow down future editing ;; operations - (mapcar (function (lambda (d) - (set-marker (aref d 0) nil) - (set-marker (aref d 1) nil) - (set-marker (aref d 2) nil) - (set-marker (aref d 3) nil) - (set-marker (aref d 4) nil) - (set-marker (aref d 5) nil))) + (mapc (function (lambda (d) + (set-marker (aref d 0) nil) + (set-marker (aref d 1) nil) + (set-marker (aref d 2) nil) + (set-marker (aref d 3) nil) + (set-marker (aref d 4) nil) + (set-marker (aref d 5) nil))) emerge-difference-list) ;; allow them to be garbage collected (setq emerge-difference-list nil) diff --git a/lisp/env.el b/lisp/env.el index d04df5e48b6..128228be3db 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -36,6 +36,8 @@ ;;; Code: +(eval-when-compile (require 'cl)) + ;; History list for environment variable names. (defvar read-envvar-name-history nil) @@ -52,7 +54,9 @@ If it is also not t, RET does not exit if it does non-null completion." locale-coding-system t) (substring enventry 0 (string-match "=" enventry))))) - process-environment) + (append process-environment + nil ;;(frame-parameter (frame-with-environment) 'environment) + )) nil mustmatch nil 'read-envvar-name-history)) ;; History list for VALUE argument to setenv. @@ -88,27 +92,70 @@ Use `$$' to insert a single dollar sign." start (+ (match-beginning 0) 1))))) string)) -;; Fixme: Should `process-environment' be recoded if LC_CTYPE &c is set? -(defun setenv (variable &optional value substitute-env-vars) +(defun setenv-internal (env variable value keep-empty) + "Set VARIABLE to VALUE in ENV, adding empty entries if KEEP-EMPTY. +Changes ENV by side-effect, and returns its new value." + (let ((pattern (concat "\\`" (regexp-quote variable) "\\(=\\|\\'\\)")) + (case-fold-search nil) + (scan env) + prev found) + ;; Handle deletions from the beginning of the list specially. + (if (and (null value) + (not keep-empty) + env + (stringp (car env)) + (string-match pattern (car env))) + (cdr env) + ;; Try to find existing entry for VARIABLE in ENV. + (while (and scan (stringp (car scan))) + (when (string-match pattern (car scan)) + (if value + (setcar scan (concat variable "=" value)) + (if keep-empty + (setcar scan variable) + (setcdr prev (cdr scan)))) + (setq found t + scan nil)) + (setq prev scan + scan (cdr scan))) + (if (and (not found) (or value keep-empty)) + (cons (if value + (concat variable "=" value) + variable) + env) + env)))) + +;; Fixme: Should the environment be recoded if LC_CTYPE &c is set? + +(defun setenv (variable &optional value substitute-env-vars frame) "Set the value of the environment variable named VARIABLE to VALUE. VARIABLE should be a string. VALUE is optional; if not provided or nil, the environment variable VARIABLE will be removed. -Interactively, a prefix argument means to unset the variable. -Interactively, the current value (if any) of the variable -appears at the front of the history list when you type in the new value. -Interactively, always replace environment variables in the new value. +Interactively, a prefix argument means to unset the variable, and +otherwise the current value (if any) of the variable appears at +the front of the history list when you type in the new value. +This function always replaces environment variables in the new +value when called interactively. SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment variables in VALUE with `substitute-env-vars', which see. This is normally used only for interactive calls. +If optional parameter FRAME is non-nil, this function modifies +only the frame-local value of VARIABLE on FRAME, ignoring +`process-environment'. Note that frames on the same terminal +device usually share their environment, so calling `setenv' on +one of them affects the others as well. + +If FRAME is nil, `setenv' changes the global value of VARIABLE by +modifying `process-environment'. Note that the global value +overrides any frame-local values. + The return value is the new value of VARIABLE, or nil if it was removed from the environment. -This function works by modifying `process-environment'. - As a special case, setting variable `TZ' calls `set-time-zone-rule' as a side-effect." (interactive @@ -138,48 +185,130 @@ a side-effect." (if (and value (multibyte-string-p value)) (setq value (encode-coding-string value locale-coding-system))) (if (string-match "=" variable) - (error "Environment variable name `%s' contains `='" variable) - (let ((pattern (concat "\\`" (regexp-quote (concat variable "=")))) - (case-fold-search nil) - (scan process-environment) - found) - (if (string-equal "TZ" variable) - (set-time-zone-rule value)) - (while scan - (cond ((string-match pattern (car scan)) - (setq found t) - (if (eq nil value) - (setq process-environment (delq (car scan) - process-environment)) - (setcar scan (concat variable "=" value))) - (setq scan nil))) - (setq scan (cdr scan))) - (or found - (if value - (setq process-environment - (cons (concat variable "=" value) - process-environment)))))) + (error "Environment variable name `%s' contains `='" variable)) + (if (string-equal "TZ" variable) + (set-time-zone-rule value)) + (if (null frame) + (setq process-environment (setenv-internal process-environment + variable value t)) + (setq frame (frame-with-environment frame)) + (setq process-environment (setenv-internal process-environment + variable value nil))) value) -(defun getenv (variable) +(defun getenv (variable &optional frame) "Get the value of environment variable VARIABLE. VARIABLE should be a string. Value is nil if VARIABLE is undefined in the environment. Otherwise, value is a string. -This function consults the variable `process-environment' -for its value." +If optional parameter FRAME is non-nil, then it should be a +frame. This function will look up VARIABLE in its 'environment +parameter. + +Otherwise, this function searches `process-environment' for +VARIABLE. If it is not found there, then it continues the search +in the environment list of the selected frame." (interactive (list (read-envvar-name "Get environment variable: " t))) (let ((value (getenv-internal (if (multibyte-string-p variable) (encode-coding-string variable locale-coding-system) - variable)))) + variable) + frame))) (if (and enable-multibyte-characters value) (setq value (decode-coding-string value locale-coding-system))) (when (interactive-p) (message "%s" (if value value "Not set"))) value)) +(defun environment (&optional frame) + "Return a list of environment variables with their values. +Each entry in the list is a string of the form NAME=VALUE. + +The returned list can not be used to change environment +variables, only read them. See `setenv' to do that. + +If optional parameter FRAME is non-nil, then it should be a +frame. The function returns the environment of that frame. + +The list is constructed by concatenating the elements of +`process-environment' and the 'environment parameter of the +selected frame, and removing duplicated and empty values. + +Non-ASCII characters are encoded according to the initial value of +`locale-coding-system', i.e. the elements must normally be decoded for use. +See `setenv' and `getenv'." + (let* ((env (append process-environment +;; (frame-parameter (frame-with-environment frame) +;; 'environment) + nil)) + (scan env) + prev seen) + ;; Remove unset variables from the beginning of the list. + (while (and env + (or (not (stringp (car env))) + (not (string-match "=" (car env))))) + (or (member (car env) seen) + (setq seen (cons (car env) seen))) + (setq env (cdr env) + scan env)) + (let (name) + (while scan + (cond ((or (not (stringp (car scan))) + (not (string-match "=" (car scan)))) + ;; Unset variable. + (or (member (car scan) seen) + (setq seen (cons (car scan) seen))) + (setcdr prev (cdr scan))) + ((member (setq name (substring (car scan) 0 (string-match "=" (car scan)))) seen) + ;; Duplicated variable. + (setcdr prev (cdr scan))) + (t + ;; New variable. + (setq seen (cons name seen)))) + (setq prev scan + scan (cdr scan)))) + env)) + +(defmacro let-environment (varlist &rest body) + "Evaluate BODY with environment variables set according to VARLIST. +The environment variables are then restored to their previous +values. +The value of the last form in BODY is returned. + +Each element of VARLIST is either a string (which variable is +then removed from the environment), or a list (NAME +VALUEFORM) (which sets NAME to the value of VALUEFORM, a string). +All the VALUEFORMs are evaluated before any variables are set." + (declare (indent 2)) + (let ((old-env (make-symbol "old-env")) + (name (make-symbol "name")) + (value (make-symbol "value")) + (entry (make-symbol "entry")) + (frame (make-symbol "frame"))) + `(let ((,frame (selected-frame)) + ,old-env) + ;; Evaluate VALUEFORMs and replace them in VARLIST with their values. + (dolist (,entry ,varlist) + (unless (stringp ,entry) + (if (cdr (cdr ,entry)) + (error "`let-environment' bindings can have only one value-form")) + (setcdr ,entry (eval (cadr ,entry))))) + ;; Set the variables. + (dolist (,entry ,varlist) + (let ((,name (if (stringp ,entry) ,entry (car ,entry))) + (,value (if (consp ,entry) (cdr ,entry)))) + (setq ,old-env (cons (cons ,name (getenv ,name)) ,old-env)) + (setenv ,name ,value))) + (unwind-protect + (progn ,@body) + ;; Restore old values. + (with-selected-frame (if (frame-live-p ,frame) + ,frame + (selected-frame)) + (dolist (,entry ,old-env) + (setenv (car ,entry) (cdr ,entry)))))))) + (provide 'env) -;;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8 +;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8 ;;; env.el ends here diff --git a/lisp/faces.el b/lisp/faces.el index 72751002765..55be1fad20e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1002,7 +1002,7 @@ an integer value." (let ((valid (case attribute (:family - (if window-system + (if (window-system frame) (mapcar #'(lambda (x) (cons (car x) (car x))) (x-font-family-list)) ;; Only one font on TTYs. @@ -1011,7 +1011,7 @@ an integer value." (mapcar #'(lambda (x) (cons (symbol-name x) x)) (internal-lisp-face-attribute-values attribute))) ((:underline :overline :strike-through :box) - (if window-system + (if (window-system frame) (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x)) (internal-lisp-face-attribute-values attribute)) (mapcar #'(lambda (c) (cons c c)) @@ -1024,7 +1024,7 @@ an integer value." ((:height) 'integerp) (:stipple - (and (memq window-system '(x w32 mac)) + (and (memq (window-system frame) '(x w32 mac)) (mapcar #'list (apply #'nconc (mapcar (lambda (dir) @@ -1142,7 +1142,7 @@ of a global face. Value is the new attribute value." ;; explicitly in VALID, using color approximation code ;; in tty-colors.el. (when (and (memq attribute '(:foreground :background)) - (not (memq window-system '(x w32 mac))) + (not (memq (window-system frame) '(x w32 mac))) (not (member new-value '("unspecified" "unspecified-fg" "unspecified-bg")))) @@ -1439,14 +1439,14 @@ If FRAME is nil, the current FRAME is used." req (car conjunct) options (cdr conjunct) match (cond ((eq req 'type) - (or (memq window-system options) + (or (memq (window-system frame) options) ;; FIXME: This should be revisited to use ;; display-graphic-p, provided that the ;; color selection depends on the number ;; of supported colors, and all defface's ;; are changed to look at number of colors ;; instead of (type graphic) etc. - (and (null window-system) + (and (null (window-system frame)) (memq 'tty options)) (and (memq 'motif options) (featurep 'motif)) @@ -1517,29 +1517,32 @@ If SPEC is nil, return nil." FRAME is the frame whose frame-local face is set. FRAME nil means do it on all frames. See `defface' for information about SPEC. If SPEC is nil, do nothing." - (let ((attrs (face-spec-choose spec frame))) - (when spec - (face-spec-reset-face face frame)) - (while attrs - (let ((attribute (car attrs)) - (value (car (cdr attrs)))) - ;; Support some old-style attribute names and values. - (case attribute - (:bold (setq attribute :weight value (if value 'bold 'normal))) - (:italic (setq attribute :slant value (if value 'italic 'normal))) - ((:foreground :background) - ;; Compatibility with 20.x. Some bogus face specs seem to - ;; exist containing things like `:foreground nil'. - (if (null value) (setq value 'unspecified))) - (t (unless (assq attribute face-x-resources) - (setq attribute nil)))) - (when attribute - (set-face-attribute face frame attribute value))) - (setq attrs (cdr (cdr attrs))))) - ;; When we reset the face based on its spec, then it is unmodified - ;; as far as Custom is concerned. - (if (null frame) - (put (or (get face 'face-alias) face) 'face-modified nil))) + (if frame + (let ((attrs (face-spec-choose spec frame))) + (when spec + (face-spec-reset-face face frame)) + (while attrs + (let ((attribute (car attrs)) + (value (car (cdr attrs)))) + ;; Support some old-style attribute names and values. + (case attribute + (:bold (setq attribute :weight value (if value 'bold 'normal))) + (:italic (setq attribute :slant value (if value 'italic 'normal))) + ((:foreground :background) + ;; Compatibility with 20.x. Some bogus face specs seem to + ;; exist containing things like `:foreground nil'. + (if (null value) (setq value 'unspecified))) + (t (unless (assq attribute face-x-resources) + (setq attribute nil)))) + (when attribute + (set-face-attribute face frame attribute value))) + (setq attrs (cdr (cdr attrs))))) + ;; When we reset the face based on its spec, then it is unmodified + ;; as far as Custom is concerned. + (put (or (get face 'face-alias) face) 'face-modified nil) + ;; Set each frame according to the rules implied by SPEC. + (dolist (frame (frame-list)) + (face-spec-set face spec frame)))) (defun face-attr-match-p (face attrs &optional frame) @@ -1683,35 +1686,40 @@ variable with `setq'; this won't have the expected effect." (const light) (const :tag "automatic" nil))) -(defvar default-frame-background-mode nil - "Internal variable for the default brightness of the background. -Emacs sets it automatically depending on the terminal type. -The value `nil' means `dark'. If Emacs runs in non-windowed -mode from `xterm' or a similar terminal emulator, the value is -`light'. On rxvt terminals, the value depends on the environment -variable COLORFGBG.") (defun frame-set-background-mode (frame) "Set up display-dependent faces on FRAME. Display-dependent faces are those which have different definitions according to the `background-mode' and `display-type' frame parameters." (let* ((bg-resource - (and window-system + (and (window-system frame) (x-get-resource "backgroundMode" "BackgroundMode"))) (bg-color (frame-parameter frame 'background-color)) + (terminal-bg-mode (terminal-parameter frame 'background-mode)) + (tty-type (tty-type frame)) (bg-mode (cond (frame-background-mode) (bg-resource (intern (downcase bg-resource))) - ((and (null window-system) (null bg-color)) - ;; No way to determine this automatically (?). - (or default-frame-background-mode 'dark)) - ;; Unspecified frame background color can only happen - ;; on tty's. - ((member bg-color '(unspecified "unspecified-bg")) - (or default-frame-background-mode 'dark)) + (terminal-bg-mode) + ((and (null (window-system frame)) + ;; Unspecified frame background color can only + ;; happen on tty's. + (member bg-color '(nil unspecified "unspecified-bg"))) + ;; There is no way to determine the background mode + ;; automatically, so we make a guess based on the + ;; terminal type. + (if (and tty-type + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + tty-type)) + 'light + 'dark)) ((equal bg-color "unspecified-fg") ; inverted colors - (if (eq default-frame-background-mode 'light) 'dark 'light)) + (if (and tty-type + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + tty-type)) + 'dark + 'light)) ((>= (apply '+ (color-values bg-color frame)) ;; Just looking at the screen, colors whose ;; values add up to .6 of the white total @@ -1720,7 +1728,7 @@ according to the `background-mode' and `display-type' frame parameters." 'light) (t 'dark))) (display-type - (cond ((null window-system) + (cond ((null (window-system frame)) (if (tty-display-color-p frame) 'color 'mono)) ((display-color-p frame) 'color) @@ -1817,15 +1825,24 @@ the X resource ``reverseVideo'' is present, handle that. Value is the new frame created." (setq parameters (x-handle-named-frame-geometry parameters)) (let ((visibility-spec (assq 'visibility parameters)) - (frame-list (frame-list)) - (frame (x-create-frame (cons '(visibility . nil) parameters))) + (frame (x-create-frame `((visibility . nil) . ,parameters))) success) (unwind-protect (progn + (x-setup-function-keys frame) (x-handle-reverse-video frame parameters) (frame-set-background-mode frame) (face-set-after-frame-default frame) - (if (or (null frame-list) (null visibility-spec)) + ;; Arrange for the kill and yank functions to set and check the clipboard. + (modify-frame-parameters + frame '((interprogram-cut-function . x-select-text))) + (modify-frame-parameters + frame '((interprogram-paste-function . x-cut-buffer-or-selection-value))) + ;; Make sure the tool-bar is ready to be enabled. The + ;; `tool-bar-lines' frame parameter will not take effect + ;; without this call. + (tool-bar-setup frame) + (if (null visibility-spec) (make-frame-visible frame) (modify-frame-parameters frame (list visibility-spec))) (setq success t)) @@ -1884,7 +1901,7 @@ Initialize colors of certain faces from frame parameters." (condition-case () (progn (face-spec-set face (face-user-default-spec face) frame) - (if (memq window-system '(x w32 mac)) + (if (memq (window-system frame) '(x w32 mac)) (make-face-x-resource-internal face frame)) (internal-merge-in-global-face face frame)) (error nil))) @@ -1920,8 +1937,15 @@ created." (let ((frame (make-terminal-frame parameters)) success) (unwind-protect - (progn + (with-selected-frame frame (tty-handle-reverse-video frame (frame-parameters frame)) + + ;; Make sure the kill and yank functions do not touch the X clipboard. + (modify-frame-parameters frame '((interprogram-cut-function . nil))) + (modify-frame-parameters frame '((interprogram-paste-function . nil))) + + (set-locale-environment nil frame) + (tty-run-terminal-initialization frame) (frame-set-background-mode frame) (face-set-after-frame-default frame) (setq success t)) @@ -1929,6 +1953,52 @@ created." (delete-frame frame))) frame)) +(defun tty-find-type (pred type) + "Return the longest prefix of TYPE to which PRED returns non-nil. +TYPE should be a tty type name such as \"xterm-16color\". + +The function tries only those prefixes that are followed by a +dash or underscore in the original type name, like \"xterm\" in +the above example." + (let (hyphend) + (while (and type + (not (funcall pred type))) + ;; Strip off last hyphen and what follows, then try again + (setq type + (if (setq hyphend (string-match "[-_][^-_]+$" type)) + (substring type 0 hyphend) + nil)))) + type) + +(defun tty-run-terminal-initialization (frame &optional type) + "Run the special initialization code for the terminal type of FRAME. +The optional TYPE parameter may be used to override the autodetected +terminal type to a different value." + (setq type (or type (tty-type frame))) + ;; Load library for our terminal type. + ;; User init file can set term-file-prefix to nil to prevent this. + (with-selected-frame frame + (unless (or (null term-file-prefix) + ;; Don't reinitialize the terminal each time a new + ;; frame is opened on it. + (terminal-parameter frame 'terminal-initted)) + (let* (term-init-func) + ;; First, load the terminal initialization file, if it is + ;; available and it hasn't been loaded already. + (tty-find-type #'(lambda (type) + (let ((file (locate-library (concat term-file-prefix type)))) + (and file + (or (assoc file load-history) + (load file t t))))) + type) + ;; Next, try to find a matching initialization function, and call it. + (tty-find-type #'(lambda (type) + (fboundp (setq term-init-func + (intern (concat "terminal-init-" type))))) + type) + (when (fboundp term-init-func) + (funcall term-init-func)) + (set-terminal-parameter frame 'terminal-initted term-init-func))))) ;; Called from C function init_display to initialize faces of the ;; dumped terminal frame on startup. diff --git a/lisp/ffap.el b/lisp/ffap.el index 80b94a4d3ba..8c338bd947a 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -482,7 +482,7 @@ Returned values: "In remote FULLNAME, replace path with NAME. May return nil." ;; Use ange-ftp or efs if loaded, but do not load them otherwise. (let (found) - (mapcar + (mapc (function (lambda (sym) (and (fboundp sym) (setq found sym)))) '( efs-replace-path-component diff --git a/lisp/filecache.el b/lisp/filecache.el index baa171d535a..18c537fed7c 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -280,11 +280,11 @@ be added to the cache." (dir-files (directory-files dir t regexp)) ) ;; Filter out files we don't want to see - (mapcar + (mapc '(lambda (file) (if (file-directory-p file) (setq dir-files (delq file dir-files)) - (mapcar + (mapc '(lambda (regexp) (if (string-match regexp file) (setq dir-files (delq file dir-files)))) @@ -386,7 +386,7 @@ in each directory, not to the directory list itself." (lambda(file) (or (file-directory-p file) (let (filtered) - (mapcar + (mapc (function (lambda(regexp) (and (string-match regexp file) @@ -402,7 +402,7 @@ in each directory, not to the directory list itself." Each entry matches the regular expression `file-cache-buffer-default-regexp' or the optional REGEXP argument." (set-buffer file-cache-buffer) - (mapcar + (mapc (function (lambda (elt) (goto-char (point-min)) (delete-matching-lines elt))) @@ -443,10 +443,10 @@ or the optional REGEXP argument." "Delete files matching REGEXP from the file cache." (interactive "sRegexp: ") (let ((delete-list)) - (mapcar '(lambda (elt) - (and (string-match regexp (car elt)) - (setq delete-list (cons (car elt) delete-list)))) - file-cache-alist) + (mapc '(lambda (elt) + (and (string-match regexp (car elt)) + (setq delete-list (cons (car elt) delete-list)))) + file-cache-alist) (file-cache-delete-file-list delete-list) (message "Filecache: deleted %d files from file cache" (length delete-list)))) @@ -456,7 +456,7 @@ or the optional REGEXP argument." (interactive "DDelete directory from file cache: ") (let ((dir (expand-file-name directory)) (result 0)) - (mapcar + (mapc '(lambda (entry) (if (file-cache-do-delete-directory dir entry) (setq result (1+ result)))) @@ -719,7 +719,7 @@ the name is considered already unique; only the second substitution "Output a list of files whose names (not including directories) match REGEXP." (let ((results)) - (mapcar + (mapc (function (lambda(cache-element) (and (string-match regexp @@ -768,11 +768,11 @@ match REGEXP." (with-current-buffer (get-buffer-create buf) (erase-buffer) - (mapcar + (mapc (function - (lambda(item) - (insert (nth 1 item) (nth 0 item) "\n"))) - file-cache-alist) + (lambda(item) + (insert (nth 1 item) (nth 0 item) "\n"))) + file-cache-alist) (pop-to-buffer buf) ))) diff --git a/lisp/files.el b/lisp/files.el index d50e447aeb7..f4881911381 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -643,7 +643,7 @@ The path separator is colon in GNU and GNU-like systems." (let ((trypath (parse-colon-path (getenv "CDPATH")))) (setq cd-path (or trypath (list "./"))))) (if (not (catch 'found - (mapcar + (mapc (function (lambda (x) (let ((f (expand-file-name (concat x dir)))) (if (file-directory-p f) @@ -1107,6 +1107,13 @@ Interactively, the default if you just type RET is the current directory, but the visited file name is available through the minibuffer history: type M-n to pull it into the minibuffer. +You can visit files on remote machines by specifying something +like /ssh:SOME_REMOTE_MACHINE:FILE for the file name. You can +also visit local files as a different user by specifying +/sudo::FILE for the file name. +See the Info node `(tramp)Filename Syntax' in the Tramp Info +manual, for more about this. + Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand wildcards (if any) and visit multiple files. You can suppress wildcard expansion by setting `find-file-wildcards' to nil. @@ -1123,8 +1130,9 @@ automatically choosing a major mode, use \\[find-file-literally]." (defun find-file-other-window (filename &optional wildcards) "Edit file FILENAME, in another window. -May create a new window, or reuse an existing one. -See the function `display-buffer'. + +Like \\[find-file] (which see), but creates a new window or reuses +an existing one. See the function `display-buffer'. Interactively, the default if you just type RET is the current directory, but the visited file name is available through the minibuffer history: @@ -1145,8 +1153,9 @@ expand wildcards (if any) and visit multiple files." (defun find-file-other-frame (filename &optional wildcards) "Edit file FILENAME, in another frame. -May create a new frame, or reuse an existing one. -See the function `display-buffer'. + +Like \\[find-file] (which see), but creates a new frame or reuses +an existing one. See the function `display-buffer'. Interactively, the default if you just type RET is the current directory, but the visited file name is available through the minibuffer history: @@ -1167,7 +1176,7 @@ expand wildcards (if any) and visit multiple files." (defun find-file-existing (filename) "Edit the existing file FILENAME. -Like \\[find-file] but only allow a file that exists, and do not allow +Like \\[find-file], but only allow a file that exists, and do not allow file names with wildcards." (interactive (nbutlast (find-file-read-args "Find existing file: " t))) (if (and (not (interactive-p)) (not (file-exists-p filename))) @@ -1177,7 +1186,7 @@ file names with wildcards." (defun find-file-read-only (filename &optional wildcards) "Edit file FILENAME but don't allow changes. -Like \\[find-file] but marks buffer as read-only. +Like \\[find-file], but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive (find-file-read-args "Find file read-only: " @@ -1194,7 +1203,7 @@ Use \\[toggle-read-only] to permit editing." (defun find-file-read-only-other-window (filename &optional wildcards) "Edit file FILENAME in another window but don't allow changes. -Like \\[find-file-other-window] but marks buffer as read-only. +Like \\[find-file-other-window], but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive (find-file-read-args "Find file read-only other window: " @@ -1211,7 +1220,7 @@ Use \\[toggle-read-only] to permit editing." (defun find-file-read-only-other-frame (filename &optional wildcards) "Edit file FILENAME in another frame but don't allow changes. -Like \\[find-file-other-frame] but marks buffer as read-only. +Like \\[find-file-other-frame], but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive (find-file-read-args "Find file read-only other frame: " @@ -1230,6 +1239,8 @@ Use \\[toggle-read-only] to permit editing." "Find file FILENAME as a replacement for the file in the next window. This command does not select that window. +See \\[find-file] for the possible forms of the FILENAME argument. + Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand wildcards (if any) and replace the file with multiple files." (interactive @@ -1255,6 +1266,8 @@ expand wildcards (if any) and replace the file with multiple files." If the current buffer now contains an empty file that you just visited \(presumably by mistake), use this command to visit the file you really want. +See \\[find-file] for the possible forms of the FILENAME argument. + Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand wildcards (if any) and replace the file with multiple files. @@ -1319,11 +1332,14 @@ killed." (defun create-file-buffer (filename) "Create a suitably named buffer for visiting FILENAME, and return it. FILENAME (sans directory) is used unchanged if that name is free; -otherwise a string <2> or <3> or ... is appended to get an unused name." +otherwise a string <2> or <3> or ... is appended to get an unused name. +Spaces at the start of FILENAME (sans directory) are removed." (let ((lastname (file-name-nondirectory filename))) (if (string= lastname "") (setq lastname filename)) - (generate-new-buffer lastname))) + (save-match-data + (string-match "^ *\\(.*\\)" lastname) + (generate-new-buffer (match-string 1 lastname))))) (defun generate-new-buffer (name) "Create and return a buffer with a name based on NAME. @@ -2010,8 +2026,9 @@ since only a single case-insensitive search through the alist is made." ("\\.tar\\'" . tar-mode) ;; The list of archive file extensions should be in sync with ;; `auto-coding-alist' with `no-conversion' coding system. - ("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\)\\'" . archive-mode) - ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . archive-mode) + ("\\.\\(\ +arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|\ +ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" . archive-mode) ("\\.\\(sx[dmicw]\\|odt\\)\\'" . archive-mode) ; OpenOffice.org ;; Mailer puts message to be edited in ;; /tmp/Re.... or Message @@ -2485,6 +2502,7 @@ asking you for confirmation." minor-mode-overriding-map-alist mode-line-buffer-identification mode-line-format + mode-line-client mode-line-modes mode-line-modified mode-line-mule-info @@ -2537,7 +2555,11 @@ asking you for confirmation." (put 'c-set-style 'safe-local-eval-function t) -(defun hack-local-variables-confirm (vars unsafe-vars risky-vars) +(defun hack-local-variables-confirm (all-vars unsafe-vars risky-vars) + "Get confirmation before setting up local variable values. +ALL-VARS is the list of all variables to be set up. +UNSAFE-VARS is the list of those that aren't marked as safe or risky. +RISKY-VARS is the list of those that are marked as risky." (if noninteractive nil (let ((name (if buffer-file-name @@ -2568,7 +2590,7 @@ n -- to ignore the local variables list.") ! -- to apply the local variables list, and permanently mark these values (*) as safe (in the future, they will be set automatically.)\n\n") (insert "\n\n")) - (dolist (elt vars) + (dolist (elt all-vars) (cond ((member elt unsafe-vars) (insert " * ")) ((member elt risky-vars) @@ -3178,18 +3200,22 @@ BACKUPNAME is the backup file name, which is the old file renamed." ;; loosen them later, whereas it's impossible to close the ;; time-window of loose permissions otherwise. (set-default-file-modes ?\700) - (while (condition-case () - (progn - (and (file-exists-p to-name) - (delete-file to-name)) - (copy-file from-name to-name nil t) - nil) - (file-already-exists t)) - ;; The file was somehow created by someone else between - ;; `delete-file' and `copy-file', so let's try again. - ;; rms says "I think there is also a possible race - ;; condition for making backup files" (emacs-devel 20070821). - nil)) + (when (condition-case nil + ;; Try to overwrite old backup first. + (copy-file from-name to-name t t) + (error t)) + (while (condition-case nil + (progn + (when (file-exists-p to-name) + (delete-file to-name)) + (copy-file from-name to-name nil t) + nil) + (file-already-exists t)) + ;; The file was somehow created by someone else between + ;; `delete-file' and `copy-file', so let's try again. + ;; rms says "I think there is also a possible race + ;; condition for making backup files" (emacs-devel 20070821). + nil))) ;; Reset the umask. (set-default-file-modes umask))) (and modes @@ -3218,7 +3244,7 @@ we do not remove backup version numbers, only true file version numbers." (length name)) (if keep-backup-version (length name) - (or (string-match "\\.~[0-9.]+~\\'" name) + (or (string-match "\\.~[-[:alnum:]:#@^._]+~\\'" name) (string-match "~\\'" name) (length name)))))))) @@ -5299,6 +5325,22 @@ With prefix arg, silently save all file-visiting buffers, then kill." (or (null confirm-kill-emacs) (funcall confirm-kill-emacs "Really exit Emacs? ")) (kill-emacs))) + +(defun save-buffers-kill-terminal (&optional arg) + "Offer to save each buffer, then kill the current connection. +If the current frame has no client, kill Emacs itself. + +With prefix arg, silently save all file-visiting buffers, then kill. + +If emacsclient was started with a list of filenames to edit, then +only these files will be asked to be saved." + (interactive "P") + (let ((proc (frame-parameter (selected-frame) 'client)) + (frame (selected-frame))) + (if (null proc) + (save-buffers-kill-emacs) + (server-save-buffers-kill-terminal proc arg)))) + ;; We use /: as a prefix to "quote" a file name ;; so that magic file name handlers will not apply to it. @@ -5387,6 +5429,98 @@ With prefix arg, silently save all file-visiting buffers, then kill." (t (apply operation arguments))))) +;; Symbolic modes and read-file-modes. + +(defun file-modes-char-to-who (char) + "Convert CHAR to a who-mask from a symbolic mode notation. +CHAR is in [ugoa] and represents the users on which rights are applied." + (cond ((= char ?u) #o4700) + ((= char ?g) #o2070) + ((= char ?o) #o1007) + ((= char ?a) #o7777) + (t (error "%c: bad `who' character" char)))) + +(defun file-modes-char-to-right (char &optional from) + "Convert CHAR to a right-mask from a symbolic mode notation. +CHAR is in [rwxXstugo] and represents a right. +If CHAR is in [Xugo], the value is extracted from FROM (or 0 if nil)." + (or from (setq from 0)) + (cond ((= char ?r) #o0444) + ((= char ?w) #o0222) + ((= char ?x) #o0111) + ((= char ?s) #o1000) + ((= char ?t) #o6000) + ;; Rights relative to the previous file modes. + ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111)) + ((= char ?u) (let ((uright (logand #o4700 from))) + (+ uright (/ uright #o10) (/ uright #o100)))) + ((= char ?g) (let ((gright (logand #o2070 from))) + (+ gright (/ gright #o10) (* gright #o10)))) + ((= char ?o) (let ((oright (logand #o1007 from))) + (+ oright (* oright #o10) (* oright #o100)))) + (t (error "%c: bad right character" char)))) + +(defun file-modes-rights-to-number (rights who-mask &optional from) + "Convert a right string to a right-mask from a symbolic modes notation. +RIGHTS is the right string, it should match \"([+=-][rwxXstugo]+)+\". +WHO-MASK is the mask number of the users on which the rights are to be applied. +FROM (or 0 if nil) is the orginal modes of the file to be chmod'ed." + (let* ((num-rights (or from 0)) + (list-rights (string-to-list rights)) + (op (pop list-rights))) + (while (memq op '(?+ ?- ?=)) + (let ((num-right 0) + char-right) + (while (memq (setq char-right (pop list-rights)) + '(?r ?w ?x ?X ?s ?t ?u ?g ?o)) + (setq num-right + (logior num-right + (file-modes-char-to-right char-right num-rights)))) + (setq num-right (logand who-mask num-right) + num-rights + (cond ((= op ?+) (logior num-rights num-right)) + ((= op ?-) (logand num-rights (lognot num-right))) + (t (logior (logand num-rights (lognot who-mask)) num-right))) + op char-right))) + num-rights)) + +(defun file-modes-symbolic-to-number (modes &optional from) + "Convert symbolic file modes to numeric file modes. +MODES is the string to convert, it should match +\"[ugoa]*([+-=][rwxXstugo]+)+,...\". +See (info \"(coreutils)File permissions\") for more information on this +notation. +FROM (or 0 if nil) is the orginal modes of the file to be chmod'ed." + (save-match-data + (let ((case-fold-search nil) + (num-modes (or from 0))) + (while (/= (string-to-char modes) 0) + (if (string-match "^\\([ugoa]*\\)\\([+=-][rwxXstugo]+\\)+\\(,\\|\\)" modes) + (let ((num-who (apply 'logior 0 + (mapcar 'file-modes-char-to-who + (match-string 1 modes))))) + (when (= num-who 0) + (setq num-who (default-file-modes))) + (setq num-modes + (file-modes-rights-to-number (substring modes (match-end 1)) + num-who num-modes) + modes (substring modes (match-end 3)))) + (error "Parse error in modes near `%s'" (substring modes 0)))) + num-modes))) + +(defun read-file-modes (&optional prompt orig-file) + "Read file modes in octal or symbolic notation. +PROMPT is used as the prompt, default to `File modes (octal or symbolic): '. +ORIG-FILE is the original file of which modes will be change." + (let* ((modes (or (if orig-file (file-modes orig-file) 0) + (error "File not found"))) + (value (read-string (or prompt "File modes (octal or symbolic): ")))) + (save-match-data + (if (string-match "^[0-7]+" value) + (string-to-number value 8) + (file-modes-symbolic-to-number value modes))))) + + (define-key ctl-x-map "\C-f" 'find-file) (define-key ctl-x-map "\C-r" 'find-file-read-only) (define-key ctl-x-map "\C-v" 'find-alternate-file) @@ -5396,7 +5530,7 @@ With prefix arg, silently save all file-visiting buffers, then kill." (define-key ctl-x-map "i" 'insert-file) (define-key esc-map "~" 'not-modified) (define-key ctl-x-map "\C-d" 'list-directory) -(define-key ctl-x-map "\C-c" 'save-buffers-kill-emacs) +(define-key ctl-x-map "\C-c" 'save-buffers-kill-terminal) (define-key ctl-x-map "\C-q" 'toggle-read-only) (define-key ctl-x-4-map "f" 'find-file-other-window) diff --git a/lisp/filesets.el b/lisp/filesets.el index ae605e6806c..e5dde847853 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -92,9 +92,6 @@ ;;; Some variables -(eval-and-compile - (defvar filesets-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) - "Non-nil means we are running XEmacs.")) (defvar filesets-menu-cache nil "The whole filesets menu.") @@ -115,12 +112,11 @@ (defvar filesets-updated-buffers nil "A list of buffers with updated menu bars.") (defvar filesets-menu-use-cached-flag nil - "Use cached data. See `filesets-menu-ensure-use-cached' for details.") + "Use cached data. See `filesets-menu-ensure-use-cached' for details.") (defvar filesets-update-cache-file-flag nil "Non-nil means the cache needs updating.") (defvar filesets-ignore-next-set-default nil - "A list of custom variables for which the next `set-default' will be -ignored.") + "List of custom variables for which the next `set-default' will be ignored.") (defvar filesets-output-buffer-flag nil "Non-nil means the current buffer is an output buffer created by filesets. @@ -131,7 +127,7 @@ Is buffer local variable.") 0 means no messages at all.") (defvar filesets-menu-ensure-use-cached - (and filesets-running-xemacs + (and (featurep 'xemacs) (if (fboundp 'emacs-version>=) (not (emacs-version>= 21 5)))) "Make sure (X)Emacs uses filesets' cache. @@ -184,7 +180,7 @@ Like `some', return the first value of FSS-PRED that is non-nil." (defun filesets-member (fsm-item fsm-lst &rest fsm-keys) "Find the first occurrence of FSM-ITEM in FSM-LST. -It is supposed to work like cl's `member*'. At the moment only the :test +It is supposed to work like cl's `member*'. At the moment only the :test key is supported." (let ((fsm-test (or (plist-get fsm-keys ':test) (function equal)))) @@ -214,11 +210,11 @@ key is supported." (file-name-nondirectory (substring this 0 (- (length this) 1)))))) (defun filesets-which-command (cmd) - "Calls \"which CMD\"." + "Call \"which CMD\"." (shell-command-to-string (format "which %s" cmd))) (defun filesets-which-command-p (cmd) - "Calls \"which CMD\" and returns non-nil if the command was found." + "Call \"which CMD\" and return non-nil if the command was found." (when (string-match (format "\\(/[^/]+\\)?/%s" cmd) (filesets-which-command cmd)) cmd)) @@ -252,7 +248,7 @@ key is supported." ; (filesets-build-menu)) ;; It seems this is a workaround for the XEmacs issue described in the -;; doc-string of filesets-menu-ensure-use-cached. Under Emacs this is +;; doc-string of filesets-menu-ensure-use-cached. Under Emacs this is ;; essentially just `set-default'. (defun filesets-set-default (sym val &optional init-flag) "Set-default wrapper function used in conjunction with `defcustom'. @@ -307,55 +303,55 @@ SYM to VAL and return t. If INIT-FLAG is non-nil, set with :version "22.1") (defcustom filesets-menu-name "Filesets" - "*Filesets' menu name." + "Filesets' menu name." :set (function filesets-set-default) :type 'sexp :group 'filesets) (defcustom filesets-menu-path nil - "*The menu under which the filesets menu should be inserted. + "The menu under which the filesets menu should be inserted. See `add-submenu' for documentation." :set (function filesets-set-default) :type 'sexp :group 'filesets) (defcustom filesets-menu-before "File" - "*The name of a menu before which this menu should be added. + "The name of a menu before which this menu should be added. See `add-submenu' for documentation." :set (function filesets-set-default) :type 'sexp :group 'filesets) (defcustom filesets-menu-in-menu nil - "*Use that instead of `current-menubar' as the menu to change. + "Use that instead of `current-menubar' as the menu to change. See `add-submenu' for documentation." :set (function filesets-set-default) :type 'sexp :group 'filesets) (defcustom filesets-menu-shortcuts-flag t - "*Non-nil means to prepend menus with hopefully unique shortcuts." + "Non-nil means to prepend menus with hopefully unique shortcuts." :set (function filesets-set-default!) :type 'boolean :group 'filesets) (defcustom filesets-menu-shortcuts-marker "%_" - "*String for marking menu shortcuts." + "String for marking menu shortcuts." :set (function filesets-set-default!) :type 'string :group 'filesets) -;(defcustom filesets-menu-cnvfp-flag nil -; "*Non-nil means show \"Convert :pattern to :files\" entry for :pattern menus." -; :set (function filesets-set-default!) -; :type 'boolean -; :group 'filesets) +;;(defcustom filesets-menu-cnvfp-flag nil +;; "*Non-nil means show \"Convert :pattern to :files\" entry for :pattern menus." +;; :set (function filesets-set-default!) +;; :type 'boolean +;; :group 'filesets) (defcustom filesets-menu-cache-file - (if filesets-running-xemacs + (if (featurep 'xemacs) "~/.xemacs/filesets-cache.el" (concat user-emacs-directory "filesets-cache.el")) - "*File to be used for saving the filesets menu between sessions. + "File to be used for saving the filesets menu between sessions. Set this to \"\", to disable caching of menus. Don't forget to check out `filesets-menu-ensure-use-cached'." :set (function filesets-set-default) @@ -368,16 +364,16 @@ Don't forget to check out `filesets-menu-ensure-use-cached'." filesets-submenus filesets-menu-cache filesets-ingroup-cache) - "*Stuff we want to save in `filesets-menu-cache-file'. + "Stuff we want to save in `filesets-menu-cache-file'. Possible uses: don't save configuration data in the main startup files but in filesets's own cache. In this case add `filesets-data' to this list. -There is a second reason for putting `filesets-data' on this list. If +There is a second reason for putting `filesets-data' on this list. If you frequently add and remove buffers on the fly to :files filesets, you don't need to save your customizations if `filesets-data' is being -mirrored in the cache file. In this case the version in the cache file +mirrored in the cache file. In this case the version in the cache file is the current one, and the version in your startup file will be silently updated later on. @@ -407,7 +403,7 @@ Don't forget to check out `filesets-menu-ensure-use-cached'." :group 'filesets) (defcustom filesets-cache-fill-content-hooks nil - "*Hooks to run when writing the contents of filesets' cache file. + "Hooks to run when writing the contents of filesets' cache file. The hook is called with the cache file as current buffer and the cursor at the last position. I.e. each hook has to make sure that the cursor is @@ -429,7 +425,7 @@ Don't forget to check out `filesets-menu-ensure-use-cached'." :group 'filesets) (defcustom filesets-cache-hostname-flag nil - "*Non-nil means cache the hostname. + "Non-nil means cache the hostname. If the current name differs from the cached one, rebuild the menu and create a new cache file." :set (function filesets-set-default) @@ -437,16 +433,16 @@ rebuild the menu and create a new cache file." :group 'filesets) (defcustom filesets-cache-save-often-flag nil - "*Non-nil means save buffer on every change of the filesets menu. + "Non-nil means save buffer on every change of the filesets menu. If this variable is set to nil and if Emacs crashes, the cache and -filesets-data could get out of sync. Set this to t if this happens from +filesets-data could get out of sync. Set this to t if this happens from time to time or if the fileset cache causes troubles." :set (function filesets-set-default) :type 'boolean :group 'filesets) (defcustom filesets-max-submenu-length 25 - "*Maximum length of submenus. + "Maximum length of submenus. Set this value to 0 to turn menu splitting off. BTW, parts of submenus will not be rewrapped if their length exceeds this value." :set (function filesets-set-default) @@ -454,13 +450,13 @@ will not be rewrapped if their length exceeds this value." :group 'filesets) (defcustom filesets-max-entry-length 50 - "*Truncate names of splitted submenus to this length." + "Truncate names of splitted submenus to this length." :set (function filesets-set-default) :type 'integer :group 'filesets) (defcustom filesets-browse-dir-function 'dired - "*A function or command used for browsing directories. + "A function or command used for browsing directories. When using an external command, \"%s\" will be replaced with the directory's name. @@ -478,7 +474,7 @@ Note: You have to manually rebuild the menu if you change this value." :group 'filesets) (defcustom filesets-open-file-function 'filesets-find-or-display-file - "*The function used for opening files. + "The function used for opening files. `filesets-find-or-display-file' ... Filesets' default function for visiting files. This function checks if an external viewer is defined @@ -486,7 +482,7 @@ for a specific file type. Either this viewer, if defined, or `find-file' will be used to visit a file. `filesets-find-file' ... An alternative function that always uses -`find-file'. If `filesets-be-docile-flag' is true, a file, which isn't +`find-file'. If `filesets-be-docile-flag' is true, a file, which isn't readable, will not be opened. Caveat: Changes will take effect only after rebuilding the menu." @@ -501,7 +497,7 @@ Caveat: Changes will take effect only after rebuilding the menu." :group 'filesets) (defcustom filesets-save-buffer-function 'save-buffer - "*The function used to save a buffer. + "The function used to save a buffer. Caveat: Changes will take effect after rebuilding the menu." :set (function filesets-set-default) :type '(choice :tag "Function:" @@ -512,10 +508,10 @@ Caveat: Changes will take effect after rebuilding the menu." :group 'filesets) (defcustom filesets-find-file-delay - (if (and filesets-running-xemacs gutter-buffers-tab-visible-p) + (if (and (featurep 'xemacs) gutter-buffers-tab-visible-p) 0.5 0) - "*Delay before calling find-file. + "Delay before calling `find-file'. This is for calls via `filesets-find-or-display-file' or `filesets-find-file'. @@ -525,7 +521,7 @@ Set this to 0, if you don't use XEmacs' buffer tabs." :group 'filesets) (defcustom filesets-be-docile-flag nil - "*Non-nil means don't complain if a file or a directory doesn't exist. + "Non-nil means don't complain if a file or a directory doesn't exist. This is useful if you want to use the same startup files in different computer environments." :set (function filesets-set-default) @@ -533,19 +529,19 @@ computer environments." :group 'filesets) (defcustom filesets-sort-menu-flag t - "*Non-nil means sort the filesets menu alphabetically." + "Non-nil means sort the filesets menu alphabetically." :set (function filesets-set-default) :type 'boolean :group 'filesets) (defcustom filesets-sort-case-sensitive-flag t - "*Non-nil means sorting of the filesete menu is case sensitive." + "Non-nil means sorting of the filesete menu is case sensitive." :set (function filesets-set-default) :type 'boolean :group 'filesets) (defcustom filesets-tree-max-level 3 - "*Maximum scan depth for directory trees. + "Maximum scan depth for directory trees. A :tree fileset is defined by a base directory the contents of which will be recursively added to the menu. `filesets-tree-max-level' tells up to which level the directory structure should be scanned/listed, @@ -579,7 +575,7 @@ including directory trees to the menu can take a lot of memory." ("Run Shell Command" filesets-cmd-shell-command (filesets-cmd-shell-command-getargs))) - "*Commands to run on filesets. + "Commands to run on filesets. An association list of names, functions, and an argument list (or a function that returns one) to be run on a filesets' files. @@ -607,16 +603,16 @@ the filename." (defcustom filesets-external-viewers (let -; ((ps-cmd (or (and (boundp 'my-ps-viewer) my-ps-viewer) -; (filesets-select-command "ggv gv"))) -; (pdf-cmd (or (and (boundp 'my-ps-viewer) my-pdf-viewer) -; (filesets-select-command "xpdf acroread"))) -; (dvi-cmd (or (and (boundp 'my-ps-viewer) my-dvi-viewer) -; (filesets-select-command "xdvi tkdvi"))) -; (doc-cmd (or (and (boundp 'my-ps-viewer) my-doc-viewer) -; (filesets-select-command "antiword"))) -; (pic-cmd (or (and (boundp 'my-ps-viewer) my-pic-viewer) -; (filesets-select-command "gqview ee display")))) + ;; ((ps-cmd (or (and (boundp 'my-ps-viewer) my-ps-viewer) + ;; (filesets-select-command "ggv gv"))) + ;; (pdf-cmd (or (and (boundp 'my-ps-viewer) my-pdf-viewer) + ;; (filesets-select-command "xpdf acroread"))) + ;; (dvi-cmd (or (and (boundp 'my-ps-viewer) my-dvi-viewer) + ;; (filesets-select-command "xdvi tkdvi"))) + ;; (doc-cmd (or (and (boundp 'my-ps-viewer) my-doc-viewer) + ;; (filesets-select-command "antiword"))) + ;; (pic-cmd (or (and (boundp 'my-ps-viewer) my-pic-viewer) + ;; (filesets-select-command "gqview ee display")))) ((ps-cmd "ggv") (pdf-cmd "xpdf") (dvi-cmd "xdvi") @@ -644,7 +640,7 @@ the filename." ((:ignore-on-open-all t) (:ignore-on-read-text t) (:constraint-flag ,pic-cmd))))) - "*Association list of file patterns and external viewers for use with + "Association list of file patterns and external viewers for use with `filesets-find-or-display-file'. Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a @@ -674,21 +670,20 @@ variables my-ps-viewer, my-pdf-viewer, my-dvi-viewer, my-pic-viewer. In order to view pdf or rtf files in an Emacs buffer, you could use these: - \(\"^.+\\.pdf$\" \"pdftotext\" + \(\"^.+\\\\.pdf\\\\'\" \"pdftotext\" \((:capture-output t) \(:args (\"%S - | fmt -w \" window-width)) \(:ignore-on-read-text t) \(:constraintp (lambda () \(and \(filesets-which-command-p \"pdftotext\") \(filesets-which-command-p \"fmt\")))))) - \(\"^.+\\.rtf$\" \"rtf2htm\" + \(\"^.+\\\\.rtf\\\\'\" \"rtf2htm\" \((:capture-output t) \(:args (\"%S 2> /dev/null | w3m -dump -T text/html\")) \(:ignore-on-read-text t) \(:constraintp (lambda () \(and (filesets-which-command-p \"rtf2htm\") - \(filesets-which-command-p \"w3m\")))))) -" + \(filesets-which-command-p \"w3m\"))))))" :set (function filesets-set-default) :type '(repeat :tag "Viewer" (list :tag "Definition" @@ -814,7 +809,7 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: emacs-wiki-directories nil)))))))) - "*Inclusion group definitions. + "Inclusion group definitions. Define how to find included file according to a file's mode (being defined by a file pattern). @@ -865,8 +860,8 @@ Stubs: First, a stub is a file that shows up in the menu but will not be included in an ingroup's file listing -- i.e. filesets will never -operate on this file automatically. Secondly, in opposition to normal -files stubs are not scanned for new inclusion groups. This is useful if +operate on this file automatically. Secondly, in opposition to normal +files stubs are not scanned for new inclusion groups. This is useful if you want to have quick access to library headers. In the menu, an asterisk is appended to the stub's name. @@ -937,9 +932,8 @@ With duplicates removed, it would be: :group 'filesets) (put 'filesets-ingroup-patterns 'risky-local-variable t) -(defcustom filesets-data - nil - "*Fileset definitions. +(defcustom filesets-data nil + "Fileset definitions. A fileset is either a list of files, a file pattern, a base directory and a search pattern (for files), or a base file. Changes to this @@ -1065,27 +1059,27 @@ defined in `filesets-ingroup-patterns'." (defcustom filesets-query-user-limit 15 - "*Query the user before opening a fileset with that many files." + "Query the user before opening a fileset with that many files." :set (function filesets-set-default) :type 'integer :group 'filesets) ;;; Emacs compatibility (eval-and-compile - (if filesets-running-xemacs + (if (featurep 'xemacs) (fset 'filesets-error 'error) (require 'easymenu) (defun filesets-error (class &rest args) "`error' wrapper." - (error (mapconcat 'identity args " "))) + (error "%s" (mapconcat 'identity args " "))) )) (defun filesets-filter-dir-names (lst &optional negative) - "Remove non-directory names from a list of strings. If NEGATIVE is -non-nil, remove all directory names." + "Remove non-directory names from a list of strings. +If NEGATIVE is non-nil, remove all directory names." (filesets-filter-list lst (lambda (x) (and (not (string-match "^\\.+/$" x)) @@ -1093,7 +1087,7 @@ non-nil, remove all directory names." (not (string-match "[:/\\]$" x)) (string-match "[:/\\]$" x)))))) -(defun filesets-conditional-sort (lst &optional access-fn simply-do-it) +(defun filesets-conditional-sort (lst &optional access-fn) "Return a sorted copy of LST, LST being a list of strings. If `filesets-sort-menu-flag' is nil, return LST itself. @@ -1116,10 +1110,11 @@ If SIMPLY-DO-IT is non-nil, the list is sorted regardless of (defun filesets-directory-files (dir &optional pattern what full-flag match-dirs-flag) - "Get WHAT (:files or :dirs) in DIR. If PATTERN is provided return only -those entries matching this regular expression. If MATCH-DIRS-FLAG is -non-nil, also match directory entries. Return full path if FULL-FLAG is -non-nil." + "Get WHAT (:files or :dirs) in DIR. +If PATTERN is provided return only those entries matching this +regular expression. +If MATCH-DIRS-FLAG is non-nil, also match directory entries. +Return full path if FULL-FLAG is non-nil." (filesets-message 2 "Filesets: scanning %S" dir) (cond ((file-exists-p dir) @@ -1262,7 +1257,7 @@ non-nil." filesets-external-viewers))) (defun filesets-filetype-property (filename event &optional entry) - "Returns non-nil if a file of a specific type has special flags/tags. + "Return non-nil if a file of a specific type has special flags/tags. Events (corresponding tag): @@ -1291,7 +1286,7 @@ on-close-all ... not used" nil t))) (defun filesets-filetype-get-prop (property filename &optional entry) - "Returns PROPERTY for filename -- use ENTRY if provided." + "Return PROPERTY for filename -- use ENTRY if provided." (let ((def (filesets-eviewer-get-props (or entry (filesets-get-external-viewer filename))))) @@ -1411,7 +1406,7 @@ not be opened." name args))))) (defun filesets-get-fileset-name (something) - "Get SOMETHING's name. (Don't ask.)" + "Get SOMETHING's name (Don't ask)." (cond ((listp something) (car something)) @@ -1419,11 +1414,11 @@ not be opened." something))) (defun filesets-data-get-name (entry) - "Access to `filesets-data'. Get the entry's name" + "Access to `filesets-data'. Get the entry's name." (car entry)) (defun filesets-data-get-data (entry) - "Access to `filesets-data'. Get the entry's data section" + "Access to `filesets-data'. Get the entry's data section." (cdr entry)) (defun filesets-alist-get (alist key &optional default carp) @@ -1534,8 +1529,8 @@ Use FILESET-ENTRY for finding the save function, if provided." (filesets-data-get entry ':ingroup nil t)) (defun filesets-file-open (open-function file-name &optional fileset-name) - "Open FILE-NAME using OPEN-FUNCTION. If OPEN-FUNCTION is nil, its -value will be deduced from FILESET-NAME." + "Open FILE-NAME using OPEN-FUNCTION. +If OPEN-FUNCTION is nil, its value will be deduced from FILESET-NAME." (let ((open-function (or open-function (filesets-entry-get-open-fn fileset-name)))) (if (file-readable-p file-name) @@ -1597,7 +1592,7 @@ SAVE-FUNCTION takes no argument, but works on the current buffer." (newline)) (defun filesets-run-cmd--repl-fn (arg &optional format-fn) - "Helper function for `filesets-run-cmd'. Apply FORMAT-FN to arg. + "Helper function for `filesets-run-cmd'. Apply FORMAT-FN to arg. Replace <file-name> or <<file-name>> with filename." (funcall format-fn (cond ((equal arg "<file-name>") @@ -1787,7 +1782,7 @@ Use LOOKUP-NAME for deducing the save-function, if provided." (filesets-error 'error "Filesets: Unknown fileset: " name)))) (defun filesets-add-buffer (&optional name buffer) - "Add BUFFER (or current-buffer) to the fileset called NAME. + "Add BUFFER (or current buffer) to the fileset called NAME. User will be queried, if no fileset name is provided." (interactive) (let* ((buffer (or buffer @@ -1822,7 +1817,7 @@ User will be queried, if no fileset name is provided." (message "Filesets: Can't add '%s' to fileset '%s'" this name))))))) (defun filesets-remove-buffer (&optional name buffer) - "Remove BUFFER (or current-buffer) to fileset NAME. + "Remove BUFFER (or current buffer) to fileset NAME. User will be queried, if no fileset name is provided." (interactive) (let* ((buffer (or buffer @@ -2014,11 +2009,11 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." "Access to `filesets-ingroup-patterns'. Extract remove-duplicates-flag." (filesets-ingroup-get-data master 1)) -(defun filesets-ingroup-collect-finder (patt case-sencitivep) +(defun filesets-ingroup-collect-finder (patt case-sensitivep) "Helper function for `filesets-ingroup-collect'. Find pattern PATT." (let ((cfs case-fold-search) (rv (progn - (setq case-fold-search (not case-sencitivep)) + (setq case-fold-search (not case-sensitivep)) (re-search-forward patt nil t)))) (setq case-fold-search cfs) rv)) @@ -2107,8 +2102,8 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." (filesets-message 2 "Filesets: no patterns defined for %S" master))))) (defun filesets-ingroup-collect-build-menu (fs flist &optional other-count) - "Helper function for `filesets-ingroup-collect'. Build the menu. -FS is a fileset's name. FLIST is a list returned by + "Helper function for `filesets-ingroup-collect'. Build the menu. +FS is a fileset's name. FLIST is a list returned by `filesets-ingroup-collect-files'." (if (null flist) nil @@ -2150,7 +2145,7 @@ FS is a fileset's name. FLIST is a list returned by ,@(filesets-get-menu-epilog master ':ingroup fsn))) `([,nm (filesets-file-open nil ',master ',fsn)]))))))))) -(defun filesets-ingroup-collect (fs remdupl-flag master &optional depth) +(defun filesets-ingroup-collect (fs remdupl-flag master) "Collect names of included files & build submenu." (filesets-ingroup-cache-put master nil) (filesets-message 2 "Filesets: parsing %S" master) @@ -2306,7 +2301,7 @@ Construct a shortcut from COUNT." lookup-name t))))))))))) (defun filesets-remove-from-ubl (&optional buffer) - "BUFFER or current-buffer require update of the filesets menu." + "BUFFER or current buffer require update of the filesets menu." (let ((b (or buffer (current-buffer)))) (if (member b filesets-updated-buffers) @@ -2470,7 +2465,7 @@ We apologize for the inconvenience.")) (find-file-other-window cf)) (filesets-error 'error msg)))) -(defun filesets-update (version cached-version) +(defun filesets-update (cached-version) "Do some cleanup after updating filesets.el." (cond ((or (not cached-version) @@ -2492,7 +2487,7 @@ We apologize for the inconvenience.")) (progn (setq filesets-update-cache-file-flag nil) t) - (filesets-update filesets-version filesets-cache-version))) + (filesets-update filesets-cache-version))) (t (setq filesets-update-cache-file-flag t) nil))) @@ -2504,7 +2499,7 @@ We apologize for the inconvenience.")) (defun filesets-init () "Filesets initialization. Set up hooks, load the cache file -- if existing -- and build the menu." - (add-hook (if filesets-running-xemacs 'activate-menubar-hook 'menu-bar-update-hook) + (add-hook (if (featurep 'xemacs) 'activate-menubar-hook 'menu-bar-update-hook) (function filesets-build-menu-maybe)) (add-hook 'kill-buffer-hook (function filesets-remove-from-ubl)) (add-hook 'first-change-hook (function filesets-reset-filename-on-change)) @@ -2522,9 +2517,9 @@ Set up hooks, load the cache file -- if existing -- and build the menu." (provide 'filesets) -;;; Local Variables: -;;; sentence-end-double-space:t -;;; End: +;; Local Variables: +;; sentence-end-double-space:t +;; End: -;;; arch-tag: 2c03f85f-c3df-4cec-b0a3-b46fd5592d70 +;; arch-tag: 2c03f85f-c3df-4cec-b0a3-b46fd5592d70 ;;; filesets.el ends here diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index 9b1f3275dfc..4c8d8bea215 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el @@ -270,7 +270,7 @@ It is a function which takes two arguments, the directory and its parent." ;; No analog for find-lisp? (insert find-lisp-line-indent "\n") ;; Run the find function - (mapcar + (mapc (function (lambda(file) (find-lisp-find-dired-insert-file diff --git a/lisp/finder.el b/lisp/finder.el index 26830ae1c3a..d1438dbf17e 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -134,7 +134,7 @@ no arguments compiles from `load-path'." (insert ";; Don't edit this file. It's generated by finder.el\n\n") (insert ";;; Code:\n") (insert "\n(setq finder-package-info '(\n") - (mapcar + (mapc (lambda (d) (when (file-exists-p (directory-file-name d)) (message "Directory %s" d) @@ -179,12 +179,12 @@ no arguments compiles from `load-path'." \(provide '" (file-name-sans-extension (file-name-nondirectory generated-finder-keywords-file)) ") -;;; Local Variables: -;;; version-control: never -;;; no-byte-compile: t -;;; no-update-autoloads: t -;;; End: -;;; " (file-name-nondirectory generated-finder-keywords-file) " ends here\n") +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +\;;; " (file-name-nondirectory generated-finder-keywords-file) " ends here\n") (kill-buffer "*finder-scratch*") (eval-buffer) ;; So we get the new keyword list immediately (basic-save-buffer)))) @@ -207,7 +207,7 @@ no arguments compiles from `load-path'." (defun finder-mouse-face-on-line () "Put `mouse-face' and `help-echo' properties on the previous line." (save-excursion - (previous-line 1) + (forward-line -1) (unless finder-help-echo (setq finder-help-echo (let* ((keys1 (where-is-internal 'finder-select @@ -372,5 +372,5 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help"))) (provide 'finder) -;;; arch-tag: ec85ff49-8cb8-41f5-a63f-9131d53ce2c5 +;; arch-tag: ec85ff49-8cb8-41f5-a63f-9131d53ce2c5 ;;; finder.el ends here diff --git a/lisp/follow.el b/lisp/follow.el index 87663fae9f7..e6538e5a350 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -35,7 +35,7 @@ ;; The feeling of a "virtual window" has been accomplished by the use ;; of two major techniques: ;; -;; * The windows always displays adjacent sections of the buffer. +;; * The windows always display adjacent sections of the buffer. ;; This means that whenever one window is moved, all the ;; others will follow. (Hence the name Follow Mode.) ;; @@ -46,8 +46,8 @@ ;; ;; Follow mode comes to its prime when a large screen and two ;; side-by-side window are used. The user can, with the help of Follow -;; mode, use two full-height windows as though they would have been -;; one. Imagine yourself editing a large function, or section of text, +;; mode, use two full-height windows as though they are one. +;; Imagine yourself editing a large function, or section of text, ;; and being able to use 144 lines instead of the normal 72... (your ;; mileage may vary). @@ -77,7 +77,7 @@ ;; ;; As you can see, the right-hand window starts at line 73, the line ;; immediately below the end of the left-hand window. As long as -;; `follow-mode' is active, the two windows will follow eachother! +;; `follow-mode' is active, the two windows will follow each other! ;; ;; * Play around and enjoy! Scroll one window and watch the other. ;; Jump to the beginning or end. Press `Cursor down' at the last @@ -101,10 +101,9 @@ ;; (global-set-key [f7] 'follow-delete-other-windows-and-split) -;; There exists two system variables that controls the appearence of -;; lines that are wider than the window containing them. The default -;; is to truncate long lines whenever a window isn't as wide as the -;; frame. +;; There exist two system variables that control the appearence of +;; lines wider than the window containing them. The default is to +;; truncate long lines whenever a window isn't as wide as the frame. ;; ;; To make sure lines are never truncated, please place the following ;; lines in your init file: @@ -123,8 +122,8 @@ ;; The correct way to cofigurate Follow mode, or any other mode for -;; that matter, is to create one (or more) function that does -;; whatever you would like to do. The function is then added to +;; that matter, is to create one or more functions that do +;; whatever you would like to do. These functions are then added to ;; a hook. ;; ;; When `Follow' mode is activated, functions stored in the hook @@ -144,8 +143,8 @@ ;; Usage: ;; -;; To activate issue the command "M-x follow-mode" -;; and press return. To deactivate, do it again. +;; To activate, issue the command "M-x follow-mode" +;; and press Return. To deactivate, do it again. ;; ;; The following is a list of commands useful when follow-mode is active. ;; @@ -156,10 +155,10 @@ ;; Like `follow-scroll-up', but in the other direction. ;; ;; follow-delete-other-windows-and-split C-c . 1 -;; Maximise the visible area of the current buffer, +;; Maximize the visible area of the current buffer, ;; and enter Follow Mode. This is a very convenient -;; way to start Follow Mode, hence it is recomended -;; that this command is added to the global keymap. +;; way to start Follow Mode, hence we recomend that +;; this command be added to the global keymap. ;; ;; follow-recenter C-c . C-l ;; Place the point in the center of the middle window, @@ -170,7 +169,7 @@ ;; in this frame. ;; ;; follow-switch-to-buffer-all C-c . C-b -;; Switch buffer in all windows in the active frame. +;; Switch buffer in all windows in the selected frame. ;; ;; follow-switch-to-current-buffer-all ;; Show the current buffer in all windows on the current @@ -207,7 +206,7 @@ ;; ;; In an ideal world, follow mode would have been implemented in the ;; kernel of the display routines, making sure that the windows (using -;; follow mode) ALWAYS are aligned. On planet earth, however, we must +;; follow mode) ALWAYS are aligned. On planet Earth, however, we must ;; accept a solution where we ALMOST ALWAYS can make sure that the ;; windows are aligned. ;; @@ -255,6 +254,8 @@ ;; Should someone come up with a better solution, please let me ;; know. +(require 'easymenu) + (eval-when-compile (if (or (featurep 'bytecomp) (featurep 'byte-compile)) @@ -278,7 +279,7 @@ :group 'convenience) (defcustom follow-mode-hook nil - "Hooks to run when Follow mode is turned on." + "Normal hook run by `follow-mode'." :type 'hook :group 'follow) @@ -286,7 +287,7 @@ "Hooks to run when Follow mode is turned off." :type 'hook :group 'follow) - +(make-obsolete-variable 'follow-mode-off-hook 'follow-mode-hook "22.2") ;;{{{ Keymap/Menu @@ -517,26 +518,23 @@ If the variable `follow-intercept-processes' is non-nil, Follow mode will listen to the output of processes and redisplay accordingly. \(This is the default.) -When Follow mode is switched on, the hook `follow-mode-hook' -is called. When turned off, `follow-mode-off-hook' is called. +This command runs the normal hook `follow-mode-hook'. Keys specific to Follow mode: \\{follow-mode-map}" :keymap follow-mode-map - (if (and follow-mode follow-intercept-processes) - (follow-intercept-process-output)) + (when (and follow-mode follow-intercept-processes) + (follow-intercept-process-output)) (cond (follow-mode ; On ;; XEmacs: If this is non-nil, the window will scroll before ;; the point will have a chance to get into the next window. - (if (boundp 'scroll-on-clipped-lines) - (setq scroll-on-clipped-lines nil)) + (when (boundp 'scroll-on-clipped-lines) + (setq scroll-on-clipped-lines nil)) (force-mode-line-update) - (add-hook 'post-command-hook 'follow-post-command-hook t) - (run-hooks 'follow-mode-hook)) + (add-hook 'post-command-hook 'follow-post-command-hook t)) ((not follow-mode) ; Off - (force-mode-line-update) - (run-hooks 'follow-mode-off-hook)))) + (force-mode-line-update)))) ;;}}} ;;{{{ Find file hook @@ -1968,13 +1966,13 @@ report this using the `report-emacs-bug' function." (follow-invalidate-cache) ;; Normally, if the display has been changed, it is redrawn. All - ;; windows showing only the end of a buffer is unconditionally - ;; recentered, we can't prevent it by calling + ;; windows showing only the end of a buffer are unconditionally + ;; recentered; we can't prevent that by calling ;; `follow-avoid-tail-recenter'. ;; - ;; By performing a redisplay on our own, Emacs need not perform - ;; the above described redisplay. (However, bu performing it when - ;; there are input available just seems to make things worse.) + ;; We force a redisplay here on our own, so Emacs does need to. + ;; (However, redisplaying when there's input available just seems + ;; to make things worse, so we exclude that case.) (if (and follow-avoid-tail-recenter-p (not (input-pending-p))) (sit-for 0))) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index e254b040ce7..d7882d3e988 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2228,7 +2228,7 @@ other modes in which C preprocessor directives are used. e.g. `asm-mode' and `(;; Control structures. Emacs Lisp forms. (,(concat "(" (regexp-opt - '("cond" "if" "while" "while-no-input" "let" "let*" + '("cond" "if" "while" "while-no-input" "let" "let*" "let-environment" "prog" "progn" "progv" "prog1" "prog2" "prog*" "inline" "lambda" "save-restriction" "save-excursion" "save-window-excursion" "save-selected-window" @@ -2240,7 +2240,7 @@ other modes in which C preprocessor directives are used. e.g. `asm-mode' and "with-current-buffer" "with-electric-help" "with-local-quit" "with-no-warnings" "with-output-to-string" "with-output-to-temp-buffer" - "with-selected-window" "with-syntax-table" + "with-selected-window" "with-selected-frame" "with-syntax-table" "with-temp-buffer" "with-temp-file" "with-temp-message" "with-timeout" "with-timeout-handler") t) "\\>") diff --git a/lisp/frame.el b/lisp/frame.el index 3246efc31a1..d9688804266 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -27,10 +27,27 @@ ;;; Code: -(defvar frame-creation-function nil - "Window-system dependent function to call to create a new frame. -The window system startup file should set this to its frame creation -function, which should take an alist of parameters as its argument.") +(defvar frame-creation-function-alist + (list (cons nil + (if (fboundp 'tty-create-frame-with-faces) + 'tty-create-frame-with-faces + (lambda (parameters) + (error "Can't create multiple frames without a window system"))))) + "Alist of window-system dependent functions to call to create a new frame. +The window system startup file should add its frame creation +function to this list, which should take an alist of parameters +as its argument.") + +(defvar window-system-default-frame-alist nil + "Alist of window-system dependent default frame parameters. +You can set this in your `.emacs' file; for example, + + ;; Disable menubar and toolbar on the console, but enable them under X. + (setq window-system-default-frame-alist + '((x (menu-bar-lines . 1) (tool-bar-lines . 1)) + (nil (menu-bar-lines . 0) (tool-bar-lines . 0)))) + +Parameters specified here supersede the values given in `default-frame-alist'.") ;; The initial value given here used to ask for a minibuffer. ;; But that's not necessary, because the default is to have one. @@ -189,7 +206,9 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." (defun frame-initialize () "Create an initial frame if necessary." ;; Are we actually running under a window system at all? - (if (and window-system (not noninteractive) (not (eq window-system 'pc))) + (if (and initial-window-system + (not noninteractive) + (not (eq initial-window-system 'pc))) (progn ;; Turn on special-display processing only if there's a window system. (setq special-display-function 'special-display-popup-frame) @@ -206,6 +225,9 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." (setq frame-initial-frame-alist (cons '(horizontal-scroll-bars . t) frame-initial-frame-alist))) + (setq frame-initial-frame-alist + (cons (cons 'window-system initial-window-system) + frame-initial-frame-alist)) (setq default-minibuffer-frame (setq frame-initial-frame (make-frame frame-initial-frame-alist))) @@ -215,20 +237,13 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." ;; because that would override explicit user resizing. (setq initial-frame-alist (frame-remove-geometry-params initial-frame-alist)))) + ;; Copy the environment of the Emacs process into the new frame. + (set-frame-parameter frame-initial-frame 'environment + (frame-parameter terminal-frame 'environment)) ;; At this point, we know that we have a frame open, so we ;; can delete the terminal frame. (delete-frame terminal-frame) - (setq terminal-frame nil)) - - ;; No, we're not running a window system. Use make-terminal-frame if - ;; we support that feature, otherwise arrange to cause errors. - (or (eq window-system 'pc) - (setq frame-creation-function - (if (fboundp 'tty-create-frame-with-faces) - 'tty-create-frame-with-faces - (lambda (parameters) - (error - "Can't create multiple frames without a window system"))))))) + (setq terminal-frame nil)))) (defvar frame-notice-user-settings t "Non-nil means function `frame-notice-user-settings' wasn't run yet.") @@ -238,7 +253,9 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." ;; information to which we must react; do what needs to be done. (defun frame-notice-user-settings () "Act on user's init file settings of frame parameters. -React to settings of `default-frame-alist', `initial-frame-alist' there." +React to settings of `initial-frame-alist', +`window-system-default-frame-alist' and `default-frame-alist' +there (in decreasing order of priority)." ;; Make menu-bar-mode and default-frame-alist consistent. (when (boundp 'menu-bar-mode) (let ((default (assq 'menu-bar-lines default-frame-alist))) @@ -253,20 +270,30 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; parameter in default-frame-alist in a dumped Emacs, which is not ;; what we want. (when (and (boundp 'tool-bar-mode) - (not noninteractive)) + (not noninteractive)) (let ((default (assq 'tool-bar-lines default-frame-alist))) (if default - (setq tool-bar-mode (not (eq (cdr default) 0))) - (setq default-frame-alist - (cons (cons 'tool-bar-lines (if tool-bar-mode 1 0)) - default-frame-alist))))) + (setq tool-bar-mode (not (eq (cdr default) 0))) + ;; If Emacs was started on a tty, changing default-frame-alist + ;; would disable the toolbar on X frames created later. We + ;; want to keep the default of showing a toolbar under X even + ;; in this case. + ;; + ;; If the user explicitly called `tool-bar-mode' in .emacs, + ;; then default-frame-alist is already changed anyway. + (when initial-window-system + (setq default-frame-alist + (cons (cons 'tool-bar-lines (if tool-bar-mode 1 0)) + default-frame-alist)))))) ;; Creating and deleting frames may shift the selected frame around, ;; and thus the current buffer. Protect against that. We don't ;; want to use save-excursion here, because that may also try to set ;; the buffer of the selected window, which fails when the selected ;; window is the minibuffer. - (let ((old-buffer (current-buffer))) + (let ((old-buffer (current-buffer)) + (window-system-frame-alist (cdr (assq initial-window-system + window-system-default-frame-alist)))) (when (and frame-notice-user-settings (null frame-initial-frame)) @@ -278,8 +305,9 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; Can't modify the minibuffer parameter, so don't try. (setq parms (delq (assq 'minibuffer parms) parms)) (modify-frame-parameters nil - (if (null window-system) + (if (null initial-window-system) (append initial-frame-alist + window-system-frame-alist default-frame-alist parms nil) @@ -287,7 +315,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; default-frame-alist were already ;; applied in pc-win.el. parms)) - (if (null window-system) ;; MS-DOS does this differently in pc-win.el + (if (null initial-window-system) ;; MS-DOS does this differently in pc-win.el (let ((newparms (frame-parameters)) (frame (selected-frame))) (tty-handle-reverse-video frame newparms) @@ -309,6 +337,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; switch `tool-bar-mode' off. (when (display-graphic-p) (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist) + (assq 'tool-bar-lines window-system-frame-alist) (assq 'tool-bar-lines default-frame-alist)))) (when (and tool-bar-originally-present (or (null tool-bar-lines) @@ -369,6 +398,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; create here, so that its new value, gleaned from the user's ;; .emacs file, will be applied to the existing screen. (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) + (assq 'minibuffer window-system-frame-alist) (assq 'minibuffer default-frame-alist) '(minibuffer . t))) t)) @@ -388,6 +418,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." (setq parms (delq (assq 'name parms) parms))) (setq parms (append initial-frame-alist + window-system-frame-alist default-frame-alist parms nil)) @@ -463,6 +494,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." ;; the new parameters. (let (newparms allparms tail) (setq allparms (append initial-frame-alist + window-system-frame-alist default-frame-alist nil)) (if (assq 'height frame-initial-geometry-arguments) (setq allparms (assq-delete-all 'height allparms))) @@ -519,19 +551,25 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." (defun modify-all-frames-parameters (alist) "Modify all current and future frames' parameters according to ALIST. This changes `default-frame-alist' and possibly `initial-frame-alist'. +Furthermore, this function removes all parameters in ALIST from +`window-system-default-frame-alist'. See help of `modify-frame-parameters' for more information." - (let (element) ;; temp - (dolist (frame (frame-list)) - (modify-frame-parameters frame alist)) - - (dolist (pair alist) ;; conses to add/replace - ;; initial-frame-alist needs setting only when - ;; frame-notice-user-settings is true - (and frame-notice-user-settings - (setq element (assoc (car pair) initial-frame-alist)) - (setq initial-frame-alist (delq element initial-frame-alist))) - (and (setq element (assoc (car pair) default-frame-alist)) - (setq default-frame-alist (delq element default-frame-alist))))) + (dolist (frame (frame-list)) + (modify-frame-parameters frame alist)) + + (dolist (pair alist) ;; conses to add/replace + ;; initial-frame-alist needs setting only when + ;; frame-notice-user-settings is true. + (and frame-notice-user-settings + (setq initial-frame-alist + (assq-delete-all (car pair) initial-frame-alist))) + (setq default-frame-alist + (assq-delete-all (car pair) default-frame-alist)) + ;; Remove any similar settings from the window-system specific + ;; parameters---they would override default-frame-alist. + (dolist (w window-system-default-frame-alist) + (setcdr w (assq-delete-all (car pair) (cdr w))))) + (and frame-notice-user-settings (setq initial-frame-alist (append initial-frame-alist alist))) (setq default-frame-alist (append default-frame-alist alist))) @@ -562,12 +600,28 @@ is not considered (see `next-frame')." (select-frame-set-input-focus (selected-frame))) (defun make-frame-on-display (display &optional parameters) - "Make a frame on display DISPLAY. + "Make a frame on X display DISPLAY. The optional second argument PARAMETERS specifies additional frame parameters." (interactive "sMake frame on display: ") (or (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display) (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN")) - (make-frame (cons (cons 'display display) parameters))) + (when (and (boundp 'x-initialized) (not x-initialized)) + (setq x-display-name display) + (x-initialize-window-system)) + (make-frame `((window-system . x) (display . ,display) . ,parameters))) + +(defun make-frame-on-tty (tty type &optional parameters) + "Make a frame on terminal device TTY. +TTY should be the file name of the tty device to use. TYPE +should be the terminal type string of TTY, for example \"xterm\" +or \"vt100\". The optional third argument PARAMETERS specifies +additional frame parameters." + (interactive "fOpen frame on tty device: \nsTerminal type of %s: ") + (unless tty + (error "Invalid terminal device")) + (unless type + (error "Invalid terminal type")) + (make-frame `((window-system . nil) (tty . ,tty) (tty-type . ,type) . ,parameters))) (defun close-display-connection (display) "Close the connection to a display, deleting all its associated frames. @@ -636,7 +690,12 @@ You cannot specify either `width' or `height', you must use neither or both. (minibuffer . only) The frame should contain only a minibuffer. (minibuffer . WINDOW) The frame should use WINDOW as its minibuffer window. -Before the frame is created (via `frame-creation-function'), functions on the + (window-system . nil) The frame should be displayed on a terminal device. + (window-system . x) The frame should be displayed in an X window. + + (terminal . ID) The frame should use the terminal identified by ID. + +Before the frame is created (via `frame-creation-function-alist'), functions on the hook `before-make-frame-hook' are run. After the frame is created, functions on `after-make-frame-functions' are run with one arg, the newly created frame. @@ -646,8 +705,33 @@ window system may select the new frame for its own reasons, for instance if the frame appears under the mouse pointer and your setup is for focus to follow the pointer." (interactive) - (run-hooks 'before-make-frame-hook) - (let ((frame (funcall frame-creation-function parameters))) + (let* ((w (cond + ((assq 'terminal parameters) + (let ((type (terminal-live-p (cdr (assq 'terminal parameters))))) + (cond + ((eq type t) nil) + ((eq type nil) (error "Terminal %s does not exist" (cdr (assq 'terminal parameters)))) + (t type)))) + ((assq 'window-system parameters) + (cdr (assq 'window-system parameters))) + (t window-system))) + (frame-creation-function (cdr (assq w frame-creation-function-alist))) + (oldframe (selected-frame)) + frame) + (unless frame-creation-function + (error "Don't know how to create a frame on window system %s" w)) + (run-hooks 'before-make-frame-hook) + (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) + (normal-erase-is-backspace-setup-frame frame) + ;; Inherit the 'environment and 'client parameters. + (let ((env (frame-parameter oldframe 'environment)) + (client (frame-parameter oldframe 'client))) + (if (not (framep env)) + (setq env oldframe)) + (if (and env (not (assq 'environment parameters))) + (set-frame-parameter frame 'environment env)) + (if (and client (not (assq 'client parameters))) + (set-frame-parameter frame 'client client))) (run-hook-with-args 'after-make-frame-functions frame) frame)) @@ -667,23 +751,48 @@ setup is for focus to follow the pointer." (lambda (frame) (eq frame (window-frame (minibuffer-window frame)))))) -(defun frames-on-display-list (&optional display) - "Return a list of all frames on DISPLAY. -DISPLAY is a name of a display, a string of the form HOST:SERVER.SCREEN. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." - (let* ((display (or display (frame-parameter nil 'display))) +;; Used to be called `terminal-id' in termdev.el. +(defun get-device-terminal (device) + "Return the terminal corresponding to DEVICE. +DEVICE can be a terminal, a frame, nil (meaning the selected frame's terminal), +the name of an X display device (HOST.SERVER.SCREEN) or a tty device file." + (cond + ((or (null device) (framep device)) + (frame-terminal device)) + ((stringp device) + (let ((f (car (filtered-frame-list + (lambda (frame) + (or (equal (frame-parameter frame 'display) device) + (equal (frame-parameter frame 'tty) device))))))) + (or f (error "Display %s does not exist" device)) + (frame-terminal f))) + ((terminal-live-p device) device) + (t + (error "Invalid argument %s in `get-device-terminal'" device)))) + +(defun frames-on-display-list (&optional device) + "Return a list of all frames on DEVICE. + +DEVICE should be a terminal, a frame, +or a name of an X display or tty (a string of the form +HOST:SERVER.SCREEN). + +If DEVICE is omitted or nil, it defaults to the selected +frame's terminal device." + (let* ((terminal (get-device-terminal device)) (func #'(lambda (frame) - (equal (frame-parameter frame 'display) display)))) + (eq (frame-terminal frame) terminal)))) (filtered-frame-list func))) -(defun framep-on-display (&optional display) - "Return the type of frames on DISPLAY. -DISPLAY may be a display name or a frame. If it is a frame, its type is -returned. -If DISPLAY is omitted or nil, it defaults to the selected frame's display. -All frames on a given display are of the same type." - (or (framep display) - (framep (car (frames-on-display-list display))))) +(defun framep-on-display (&optional terminal) + "Return the type of frames on TERMINAL. +TERMINAL may be a terminal id, a display name or a frame. If it +is a frame, its type is returned. If TERMINAL is omitted or nil, +it defaults to the selected frame's terminal device. All frames +on a given display are of the same type." + (or (terminal-live-p terminal) + (framep terminal) + (framep (car (frames-on-display-list terminal))))) (defun frame-remove-geometry-params (param-list) "Return the parameter list PARAM-LIST, but with geometry specs removed. @@ -706,26 +815,13 @@ the user during startup." (nreverse frame-initial-geometry-arguments)) (cdr param-list)) -(defcustom focus-follows-mouse (not (eq window-system 'mac)) - "*Non-nil if window system changes focus when you move the mouse. -You should set this variable to tell Emacs how your window manager -handles focus, since there is no way in general for Emacs to find out -automatically. - -This variable does not have any effect on MS-Windows." - :type 'boolean - :group 'frames - :version "20.3") - (defun select-frame-set-input-focus (frame) "Select FRAME, raise it, and set input focus, if possible." (select-frame frame) (raise-frame frame) ;; Ensure, if possible, that frame gets input focus. - (cond ((memq window-system '(x mac)) - (x-focus-frame frame)) - ((eq window-system 'w32) - (w32-focus-frame frame))) + (cond ((memq (window-system frame) '(x max w32)) + (x-focus-frame frame))) (cond (focus-follows-mouse (set-mouse-position (selected-frame) (1- (frame-width)) 0)))) @@ -761,6 +857,21 @@ Otherwise, that variable should be nil." (iconify-frame) (make-frame-visible))) +(defun suspend-frame () + "Do whatever is right to suspend the current frame. +Calls `suspend-emacs' if invoked from the controlling tty device, +`suspend-tty' from a secondary tty device, and +`iconify-or-deiconify-frame' from an X frame." + (interactive) + (let ((type (framep (selected-frame)))) + (cond + ((memq type '(x w32)) (iconify-or-deiconify-frame)) + ((eq type t) + (if (controlling-tty-p) + (suspend-emacs) + (suspend-tty))) + (t (suspend-emacs))))) + (defun make-frame-names-alist () (let* ((current-frame (selected-frame)) (falist @@ -794,10 +905,8 @@ If there is no frame by that name, signal an error." (raise-frame frame) (select-frame frame) ;; Ensure, if possible, that frame gets input focus. - (cond ((memq window-system '(x mac)) - (x-focus-frame frame)) - ((eq window-system 'w32) - (w32-focus-frame frame))) + (cond ((memq (window-system frame) '(x w32)) + (x-focus-frame frame))) (when focus-follows-mouse (set-mouse-position frame (1- (frame-width frame)) 0)))) @@ -1006,6 +1115,10 @@ bars (top, bottom, or nil)." (cons vert hor))) ;;;; Frame/display capabilities. +(defun selected-terminal () + "Return the terminal that is now selected." + (frame-terminal (selected-frame))) + (defun display-mouse-p (&optional display) "Return non-nil if DISPLAY has a mouse available. DISPLAY can be a display name, a frame, or nil (meaning the selected @@ -1183,7 +1296,7 @@ the question is inapplicable to a certain kind of display." ((eq frame-type 'pc) 16) (t - (tty-display-color-cells))))) + (tty-display-color-cells display))))) (defun display-visual-class (&optional display) "Returns the visual class of DISPLAY. @@ -1377,6 +1490,9 @@ cursor shapes." (defcustom cursor-in-non-selected-windows t "*Non-nil means show a hollow box cursor in non-selected windows. If nil, don't show a cursor except in the selected window. +If t, display a cursor related to the usual cursor type + \(a solid box becomes hollow, a bar becomes a narrower bar). +You can also specify the cursor type as in the `cursor-type' variable. Use Custom to set this variable to get the display updated." :tag "Cursor In Non-selected Windows" :type 'boolean diff --git a/lisp/fringe.el b/lisp/fringe.el index 3160d960ffd..7ea3e8a2b5d 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -104,40 +104,13 @@ This is usually invoked when setting `fringe-mode' via customize." See `fringe-mode' for possible values and their effect." (setq fringe-mode value) - ;; Apply it to default-frame-alist. - (let ((parameter (assq 'left-fringe default-frame-alist))) - (if (consp parameter) - (setcdr parameter (if (consp fringe-mode) - (car fringe-mode) - fringe-mode)) - (setq default-frame-alist - (cons (cons 'left-fringe (if (consp fringe-mode) - (car fringe-mode) - fringe-mode)) - default-frame-alist)))) - (let ((parameter (assq 'right-fringe default-frame-alist))) - (if (consp parameter) - (setcdr parameter (if (consp fringe-mode) - (cdr fringe-mode) - fringe-mode)) - (setq default-frame-alist - (cons (cons 'right-fringe (if (consp fringe-mode) - (cdr fringe-mode) - fringe-mode)) - default-frame-alist)))) - - ;; Apply it to existing frames. - (let ((frames (frame-list))) - (while frames - (modify-frame-parameters - (car frames) - (list (cons 'left-fringe (if (consp fringe-mode) - (car fringe-mode) - fringe-mode)) - (cons 'right-fringe (if (consp fringe-mode) - (cdr fringe-mode) - fringe-mode)))) - (setq frames (cdr frames))))) + (modify-all-frames-parameters + (list (cons 'left-fringe (if (consp fringe-mode) + (car fringe-mode) + fringe-mode)) + (cons 'right-fringe (if (consp fringe-mode) + (cdr fringe-mode) + fringe-mode))))) ;; For initialization of fringe-mode, take account of changes ;; made explicitly to default-frame-alist. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 04b359865d4..25e8ca7ed3b 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -446,10 +446,11 @@ If ANY-SYMBOL is non-nil, don't insist the symbol be bound." 0)) ;;;###autoload -(defun describe-variable (variable &optional buffer) +(defun describe-variable (variable &optional buffer frame) "Display the full documentation of VARIABLE (a symbol). Returns the documentation as a string, also. -If VARIABLE has a buffer-local value in BUFFER (default to the current buffer), +If VARIABLE has a buffer-local value in BUFFER or FRAME +\(default to the current buffer and current frame), it is displayed along with the global value." (interactive (let ((v (variable-at-point)) @@ -468,14 +469,19 @@ it is displayed along with the global value." (list (if (equal val "") v (intern val))))) (unless (buffer-live-p buffer) (setq buffer (current-buffer))) + (unless (frame-live-p frame) (setq frame (selected-frame))) (if (not (symbolp variable)) (message "You did not specify a variable") (save-excursion - (let* ((valvoid (not (with-current-buffer buffer (boundp variable)))) - ;; Extract the value before setting up the output buffer, - ;; in case `buffer' *is* the output buffer. - (val (unless valvoid (buffer-local-value variable buffer))) - val-start-pos) + (let ((valvoid (not (with-current-buffer buffer (boundp variable)))) + val val-start-pos locus) + ;; Extract the value before setting up the output buffer, + ;; in case `buffer' *is* the output buffer. + (unless valvoid + (with-selected-frame frame + (with-current-buffer buffer + (setq val (symbol-value variable) + locus (variable-binding-locus variable))))) (help-setup-xref (list #'describe-variable variable buffer) (interactive-p)) (with-output-to-temp-buffer (help-buffer) @@ -537,11 +543,13 @@ it is displayed along with the global value." (delete-region (1- from) from))))) (terpri) - (when (local-variable-p variable) - (princ (format "%socal in buffer %s; " - (if (get variable 'permanent-local) - "Permanently l" "L") - (buffer-name))) + (when locus + (if (bufferp locus) + (princ (format "%socal in buffer %s; " + (if (get variable 'permanent-local) + "Permanently l" "L") + (buffer-name))) + (princ (format "It is a frame-local variable; "))) (if (not (default-boundp variable)) (princ "globally void") (let ((val (default-value variable))) @@ -558,13 +566,6 @@ it is displayed along with the global value." ;; (help-xref-on-pp from (point)) (if (< (point) (+ from 20)) (delete-region (1- from) from))))))) - ;; Add a note for variables that have been make-var-buffer-local. - (when (and (local-variable-if-set-p variable) - (or (not (local-variable-p variable)) - (with-temp-buffer - (local-variable-if-set-p variable)))) - (princ "\nAutomatically becomes buffer-local when set in any fashion.\n")) - (terpri) ;; If the value is large, move it to the end. (with-current-buffer standard-output @@ -589,35 +590,49 @@ it is displayed along with the global value." 'follow-link t 'help-echo "mouse-2, RET: show value") (insert ".\n"))) + (terpri) - ;; Mention if it's an alias (let* ((alias (condition-case nil (indirect-variable variable) (error variable))) (obsolete (get variable 'byte-obsolete-variable)) (safe-var (get variable 'safe-local-variable)) (doc (or (documentation-property variable 'variable-documentation) - (documentation-property alias 'variable-documentation)))) + (documentation-property alias 'variable-documentation))) + (extra-line nil)) + ;; Add a note for variables that have been make-var-buffer-local. + (when (and (local-variable-if-set-p variable) + (or (not (local-variable-p variable)) + (with-temp-buffer + (local-variable-if-set-p variable)))) + (setq extra-line t) + (princ " Automatically becomes buffer-local when set in any fashion.\n")) + + ;; Mention if it's an alias (unless (eq alias variable) - (princ (format "\nThis variable is an alias for `%s'.\n" alias))) - (if (or obsolete safe-var) - (terpri)) + (setq extra-line t) + (princ (format " This variable is an alias for `%s'.\n" alias))) (when obsolete - (princ "This variable is obsolete") + (setq extra-line t) + (princ " This variable is obsolete") (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) (princ ";") (terpri) (princ (if (stringp (car obsolete)) (car obsolete) (format "use `%s' instead." (car obsolete)))) (terpri)) (when safe-var - (princ "This variable is safe as a file local variable ") - (princ "if its value\nsatisfies the predicate ") + (setq extra-line t) + (princ " This variable is safe as a file local variable ") + (princ "if its value\n satisfies the predicate ") (princ (if (byte-code-function-p safe-var) "which is byte-compiled expression.\n" (format "`%s'.\n" safe-var)))) - (princ "\nDocumentation:\n") - (princ (or doc "Not documented as a variable."))) + + (if extra-line (terpri)) + (princ "Documentation:\n") + (with-current-buffer standard-output + (insert (or doc "Not documented as a variable.")))) ;; Make a link to customize if this variable can be customized. (if (custom-variable-p variable) (let ((customize-label "customize")) diff --git a/lisp/help.el b/lisp/help.el index 4a94fd35bc7..b957f88a7e4 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -46,6 +46,7 @@ (define-key map "." 'display-local-help) (define-key map "?" 'help-for-help) + (define-key map "\C-a" 'about-emacs) (define-key map "\C-c" 'describe-copying) (define-key map "\C-d" 'describe-distribution) (define-key map "\C-e" 'view-emacs-problems) @@ -225,6 +226,7 @@ w where-is. Type a command name; it displays which keystrokes . display-local-help. Display any available local help at point in the echo area. +C-a Display information about Emacs. C-c Display Emacs copying permission (GNU General Public License). C-d Display Emacs ordering information. C-e Display info about Emacs problems. @@ -332,7 +334,7 @@ With argument, display info only for the selected version." (when (consp version) (let* ((all-versions (let (res) - (mapcar + (mapc (lambda (file) (with-temp-buffer (insert-file-contents diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index b5e62e7a909..d65dd01ee1c 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -309,7 +309,7 @@ called interactively, are: Write active REGEXPs into buffer as comments (if possible). They may be read the next time file is loaded or when the \\[hi-lock-find-patterns] command is issued. The inserted regexps are in the form of font lock keywords. - (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], + (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], any valid `font-lock-keywords' form is acceptable. When a file is loaded the patterns are read if `hi-lock-file-patterns-policy is 'ask and the user responds y to the prompt, or if @@ -515,7 +515,7 @@ be found in variable `hi-lock-interactive-patterns'." (if (null hi-lock-interactive-patterns) (error "There are no interactive patterns")) (let ((beg (point))) - (mapcar + (mapc (lambda (pattern) (insert (format "%s: (%s)\n" hi-lock-file-patterns-prefix diff --git a/lisp/ido.el b/lisp/ido.el index ca44e99b594..27e9d66e25c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3354,7 +3354,7 @@ for first matching file." (defun ido-to-end (items) ;; Move the elements from ITEMS to the end of `ido-temp-list' - (mapcar + (mapc (lambda (elem) (setq ido-temp-list (delq elem ido-temp-list))) items) @@ -3603,7 +3603,7 @@ for first matching file." full-matches suffix-matches prefix-matches matches) (setq ido-incomplete-regexp nil) (condition-case error - (mapcar + (mapc (lambda (item) (let ((name (ido-name item))) (if (and (or non-prefix-dot @@ -3648,7 +3648,7 @@ for first matching file." (setq re (mapconcat #'regexp-quote (split-string ido-text "") ".*")) (if ido-enable-prefix (setq re (concat "\\`" re))) - (mapcar + (mapc (lambda (item) (let ((name (ido-name item))) (if (string-match re name) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index c2c2a1476da..0353f6eb881 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -820,7 +820,7 @@ thumbnail buffer to be selected." (if (not append) (erase-buffer) (goto-char (point-max))) - (mapcar + (mapc (lambda (curr-file) (setq thumb-name (image-dired-thumb-name curr-file)) (if (and (not (file-exists-p thumb-name)) @@ -918,7 +918,7 @@ is an alist in the following form: (if (stringp files) (setq files (list files)) (error "Files must be a string or a list of strings!"))) - (mapcar + (mapc (lambda (file) (goto-char (point-min)) (when (search-forward-regexp @@ -1854,7 +1854,7 @@ With prefix argument ARG, display image in its original size." (image-dired-display-image (dired-get-filename) arg)) (defun image-dired-image-at-point-p () - "Return true if there is a image-dired thumbnail at point." + "Return true if there is an image-dired thumbnail at point." (get-text-property (point) 'image-dired-thumbnail)) (defun image-dired-rotate-thumbnail (degrees) @@ -2170,7 +2170,7 @@ matching tags will be marked in the dired buffer." (setq files (append (list (match-string 1)) files))) (kill-buffer buf) ;; Mark files - (mapcar + (mapc ;; I tried using `dired-mark-files-regexp' but it was ;; waaaay to slow. (lambda (curr-file) diff --git a/lisp/image.el b/lisp/image.el index e6c5b2e2d2c..99632b84307 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -323,7 +323,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." (or (image-type-from-file-header source) (image-type-from-file-name source)))) (or type (error "Cannot determine image type"))) - (or (memq type image-types) + (or (memq type (and (boundp 'image-types) image-types)) (error "Invalid image type `%s'" type)) type) @@ -343,10 +343,12 @@ This function is intended to be used from `magic-fallback-mode-alist'. The buffer is considered to contain an auto-detectable image if its beginning matches an image type in `image-type-header-regexps', -and that image type is present in `image-type-auto-detectable'." +and that image type is present in `image-type-auto-detectable' with a +non-nil value. If that value is non-nil, but not t, then the image type +must be available." (let* ((type (image-type-from-buffer)) (auto (and type (cdr (assq type image-type-auto-detectable))))) - (and type + (and auto (or (eq auto t) (image-type-available-p type))))) diff --git a/lisp/indent.el b/lisp/indent.el index b580e3aa3ce..db8958bd1ca 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -78,14 +78,20 @@ special; we don't actually use them here." (funcall indent-line-function))) (defun indent-for-tab-command (&optional arg) - "Indent line in proper way for current major mode or insert a tab. + "Indent line or region in proper way for current major mode or insert a tab. Depending on `tab-always-indent', either insert a tab or indent. If initial point was within line's indentation, position after the indentation. Else stay at same point in text. -The function actually called to indent is determined by the value of +If `transient-mark-mode' is turned on the region is active, +indent the region. +The function actually called to indent the line is determined by the value of `indent-line-function'." (interactive "P") (cond + ;; The region is active, indent it. + ((and transient-mark-mode mark-active + (not (eq (region-beginning) (region-end)))) + (indent-region (region-beginning) (region-end))) ((or ;; indent-to-left-margin is only meant for indenting, ;; so we force it to always insert a tab here. (eq indent-line-function 'indent-to-left-margin) @@ -97,7 +103,8 @@ The function actually called to indent is determined by the value of ;; indenting, so we can't pass them to indent-according-to-mode. ((memq indent-line-function '(indent-relative indent-relative-maybe)) (funcall indent-line-function)) - (t ;; The normal case. + ;; Indent the line. + (t (indent-according-to-mode)))) (defun insert-tab (&optional arg) diff --git a/lisp/isearch.el b/lisp/isearch.el index 3b9218077f3..7dac134fc0e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1663,7 +1663,7 @@ Isearch mode." (keylist (listify-key-sequence key)) scroll-command isearch-point) (cond ((and (= (length key) 1) - (let ((lookup (lookup-key function-key-map key))) + (let ((lookup (lookup-key local-function-key-map key))) (not (or (null lookup) (integerp lookup) (keymapp lookup))))) ;; Handle a function key that translates into something else. @@ -1677,7 +1677,7 @@ Isearch mode." (isearch-done) (apply 'isearch-unread keylist)) (setq keylist - (listify-key-sequence (lookup-key function-key-map key))) + (listify-key-sequence (lookup-key local-function-key-map key))) (while keylist (setq key (car keylist)) ;; If KEY is a printing char, we handle it here diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el index fb17fb37f0c..8c388d0cb34 100644 --- a/lisp/jka-cmpr-hook.el +++ b/lisp/jka-cmpr-hook.el @@ -97,7 +97,7 @@ The determination as to which compression scheme, if any, to use is based on the filename itself and `jka-compr-compression-info-list'." (catch 'compression-info (let ((case-fold-search nil)) - (mapcar + (mapc (function (lambda (x) (and (string-match (jka-compr-info-regexp x) filename) (throw 'compression-info x)))) @@ -186,7 +186,8 @@ options through Custom does this automatically." ;; can-append strip-extension-flag file-magic-bytes] '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" "compressing" "compress" ("-c") - "uncompressing" "uncompress" ("-c") + ;; gzip is more common than uncompress. It can only read, not write. + "uncompressing" "gzip" ("-c" "-q" "-d") nil t "\037\235"] ;; Formerly, these had an additional arg "-c", but that fails with ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index b12fe880074..3ef40e14987 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -4,7 +4,7 @@ ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" -;;;;;; "play/5x5.el" (17941 38806)) +;;;;;; "play/5x5.el" (18104 24760)) ;;; Generated autoloads from play/5x5.el (autoload (quote 5x5) "5x5" "\ @@ -63,14 +63,14 @@ should return a grid vector array that is the new solution. ;;;*** -;;;### (autoloads nil "abbrev" "abbrev.el" (17905 55681)) +;;;### (autoloads nil "abbrev" "abbrev.el" (18104 24730)) ;;; Generated autoloads from abbrev.el (put 'abbrev-mode 'safe-local-variable 'booleanp) ;;;*** ;;;### (autoloads (list-one-abbrev-table) "abbrevlist" "abbrevlist.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24730)) ;;; Generated autoloads from abbrevlist.el (autoload (quote list-one-abbrev-table) "abbrevlist" "\ @@ -81,7 +81,7 @@ Display alphabetical listing of ABBREV-TABLE in buffer OUTPUT-BUFFER. ;;;*** ;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24762)) ;;; Generated autoloads from progmodes/ada-mode.el (autoload (quote ada-add-extensions) "ada-mode" "\ @@ -142,7 +142,7 @@ If you use ada-xref.el: ;;;*** ;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24762)) ;;; Generated autoloads from progmodes/ada-stmt.el (autoload (quote ada-header) "ada-stmt" "\ @@ -153,7 +153,7 @@ Insert a descriptive header at the top of the file. ;;;*** ;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24762)) ;;; Generated autoloads from progmodes/ada-xref.el (autoload (quote ada-find-file) "ada-xref" "\ @@ -164,22 +164,22 @@ Completion is available. ;;;*** -;;;### (autoloads (change-log-redate change-log-merge add-log-current-defun -;;;;;; change-log-mode 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" -;;;;;; "add-log.el" (17851 44469)) +;;;### (autoloads (change-log-merge add-log-current-defun change-log-mode +;;;;;; 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" "add-log.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from add-log.el (defvar add-log-current-defun-function nil "\ -*If non-nil, function to guess name of surrounding function. +If non-nil, function to guess name of surrounding function. It is used by `add-log-current-defun' in preference to built-in rules. Returns function's name as a string, or nil if outside a function.") (custom-autoload (quote add-log-current-defun-function) "add-log" t) (defvar add-log-full-name nil "\ -*Full name of user, for inclusion in ChangeLog daily headers. +Full name of user, for inclusion in ChangeLog daily headers. This defaults to the value returned by the function `user-full-name'.") (custom-autoload (quote add-log-full-name) "add-log" t) @@ -267,7 +267,7 @@ Runs `change-log-mode-hook'. (defvar add-log-c-like-modes (quote (c-mode c++-mode c++-c-mode objc-mode)) "\ *Modes that look like C to `add-log-current-defun'.") -(defvar add-log-tex-like-modes (quote (TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)) "\ +(defvar add-log-tex-like-modes (quote (TeX-mode plain-TeX-mode LaTeX-mode tex-mode)) "\ *Modes that look like TeX to `add-log-current-defun'.") (autoload (quote add-log-current-defun) "add-log" "\ @@ -297,16 +297,11 @@ old-style time formats for entries are supported. \(fn OTHER-LOG)" t nil) -(autoload (quote change-log-redate) "add-log" "\ -Fix any old-style date entries in the current log file to default format. - -\(fn)" t nil) - ;;;*** ;;;### (autoloads (defadvice ad-activate ad-add-advice ad-disable-advice ;;;;;; ad-enable-advice ad-default-compilation-action ad-redefinition-action) -;;;;;; "advice" "emacs-lisp/advice.el" (17992 30878)) +;;;;;; "advice" "emacs-lisp/advice.el" (18104 24745)) ;;; Generated autoloads from emacs-lisp/advice.el (defvar ad-redefinition-action (quote warn) "\ @@ -383,7 +378,7 @@ The syntax of `defadvice' is as follows: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) [DOCSTRING] [INTERACTIVE-FORM] - BODY... ) + BODY...) FUNCTION ::= Name of the function to be advised. CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'. @@ -434,7 +429,7 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation. ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule ;;;;;; align-highlight-rule align-current align-entire align-regexp -;;;;;; align) "align" "align.el" (17842 58280)) +;;;;;; align) "align" "align.el" (18104 24730)) ;;; Generated autoloads from align.el (autoload (quote align) "align" "\ @@ -524,7 +519,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;*** ;;;### (autoloads (outlineify-sticky allout-mode) "allout" "allout.el" -;;;;;; (17892 52945)) +;;;;;; (18104 24730)) ;;; Generated autoloads from allout.el (put (quote allout-show-bodies) (quote safe-local-variable) (if (fboundp (quote booleanp)) (quote booleanp) (quote (lambda (x) (member x (quote (t nil))))))) @@ -830,7 +825,7 @@ setup for auto-startup. ;;;*** ;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" -;;;;;; "net/ange-ftp.el" (17905 9579)) +;;;;;; "net/ange-ftp.el" (18104 24759)) ;;; Generated autoloads from net/ange-ftp.el (defalias (quote ange-ftp-re-read-dir) (quote ange-ftp-reread-dir)) @@ -852,7 +847,7 @@ Not documented ;;;*** ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) -;;;;;; "animate" "play/animate.el" (17941 38806)) +;;;;;; "animate" "play/animate.el" (18104 24760)) ;;; Generated autoloads from play/animate.el (autoload (quote animate-string) "animate" "\ @@ -880,7 +875,7 @@ You can specify the one's name by NAME; the default value is \"Sarah\". ;;;*** ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) -;;;;;; "ansi-color" "ansi-color.el" (17842 58280)) +;;;;;; "ansi-color" "ansi-color.el" (18104 24730)) ;;; Generated autoloads from ansi-color.el (autoload (quote ansi-color-for-comint-mode-on) "ansi-color" "\ @@ -906,7 +901,7 @@ This is a good function to put in `comint-output-filter-functions'. ;;;*** ;;;### (autoloads (antlr-set-tabs antlr-mode antlr-show-makefile-rules) -;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (17833 42928)) +;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (18104 24763)) ;;; Generated autoloads from progmodes/antlr-mode.el (autoload (quote antlr-show-makefile-rules) "antlr-mode" "\ @@ -945,7 +940,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;### (autoloads (appt-activate appt-make-list appt-delete appt-add ;;;;;; appt-display-diary appt-display-duration appt-display-mode-line ;;;;;; appt-msg-window appt-visible appt-audible appt-message-warning-time -;;;;;; appt-issue-message) "appt" "calendar/appt.el" (17952 17513)) +;;;;;; appt-issue-message) "appt" "calendar/appt.el" (18104 24745)) ;;; Generated autoloads from calendar/appt.el (defvar appt-issue-message t "\ @@ -1033,7 +1028,7 @@ ARG is positive, otherwise off. ;;;### (autoloads (apropos-documentation apropos-value apropos apropos-documentation-property ;;;;;; apropos-command apropos-variable apropos-read-pattern) "apropos" -;;;;;; "apropos.el" (17842 58280)) +;;;;;; "apropos.el" (18104 24730)) ;;; Generated autoloads from apropos.el (autoload (quote apropos-read-pattern) "apropos" "\ @@ -1129,8 +1124,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (17960 -;;;;;; 49045)) +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from arc-mode.el (autoload (quote archive-mode) "arc-mode" "\ @@ -1150,7 +1145,7 @@ archive. ;;;*** -;;;### (autoloads (array-mode) "array" "array.el" (17842 58280)) +;;;### (autoloads (array-mode) "array" "array.el" (18104 24730)) ;;; Generated autoloads from array.el (autoload (quote array-mode) "array" "\ @@ -1221,8 +1216,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (17842 -;;;;;; 58277)) +;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (18104 +;;;;;; 24770)) ;;; Generated autoloads from textmodes/artist.el (autoload (quote artist-mode) "artist" "\ @@ -1427,8 +1422,8 @@ Keymap summary ;;;*** -;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (17842 -;;;;;; 56333)) +;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (18104 +;;;;;; 24763)) ;;; Generated autoloads from progmodes/asm-mode.el (autoload (quote asm-mode) "asm-mode" "\ @@ -1455,8 +1450,24 @@ Special commands: ;;;*** +;;;### (autoloads (auto-show-mode auto-show-mode) "auto-show" "obsolete/auto-show.el" +;;;;;; (17994 6715)) +;;; Generated autoloads from obsolete/auto-show.el + +(defvar auto-show-mode nil "\ +Obsolete.") + +(custom-autoload (quote auto-show-mode) "auto-show" t) + +(autoload (quote auto-show-mode) "auto-show" "\ +This command is obsolete. + +\(fn ARG)" t nil) + +;;;*** + ;;;### (autoloads (autoarg-kp-mode autoarg-mode) "autoarg" "autoarg.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24730)) ;;; Generated autoloads from autoarg.el (defvar autoarg-mode nil "\ @@ -1510,7 +1521,7 @@ etc. to supply digit arguments. ;;;*** ;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24763)) ;;; Generated autoloads from progmodes/autoconf.el (autoload (quote autoconf-mode) "autoconf" "\ @@ -1521,7 +1532,7 @@ Major mode for editing Autoconf configure.in files. ;;;*** ;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert) -;;;;;; "autoinsert" "autoinsert.el" (17842 58280)) +;;;;;; "autoinsert" "autoinsert.el" (18104 24730)) ;;; Generated autoloads from autoinsert.el (autoload (quote auto-insert) "autoinsert" "\ @@ -1560,9 +1571,11 @@ 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" -;;;;;; (17860 50557)) +;;;;;; (18104 24745)) ;;; Generated autoloads from emacs-lisp/autoload.el +(put (quote generated-autoload-file) (quote safe-local-variable) (quote stringp)) + (autoload (quote update-file-autoloads) "autoload" "\ Update the autoloads for FILE in `generated-autoload-file' \(which FILE might bind in its local variables). @@ -1595,7 +1608,7 @@ Calls `update-directory-autoloads' on the command line arguments. ;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-tail-mode ;;;;;; auto-revert-tail-mode turn-on-auto-revert-mode auto-revert-mode) -;;;;;; "autorevert" "autorevert.el" (17925 15265)) +;;;;;; "autorevert" "autorevert.el" (18104 24730)) ;;; Generated autoloads from autorevert.el (autoload (quote auto-revert-mode) "autorevert" "\ @@ -1664,7 +1677,7 @@ Use `auto-revert-mode' to revert a particular buffer. ;;;*** ;;;### (autoloads (mouse-avoidance-mode mouse-avoidance-mode) "avoid" -;;;;;; "avoid.el" (17842 58280)) +;;;;;; "avoid.el" (18104 24730)) ;;; Generated autoloads from avoid.el (defvar mouse-avoidance-mode nil "\ @@ -1705,7 +1718,7 @@ definition of \"random distance\".) ;;;*** ;;;### (autoloads (backquote) "backquote" "emacs-lisp/backquote.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24745)) ;;; Generated autoloads from emacs-lisp/backquote.el (autoload (quote backquote) "backquote" "\ @@ -1730,7 +1743,7 @@ Vectors work just like lists. Nested backquotes are permitted. ;;;*** ;;;### (autoloads (display-battery-mode battery) "battery" "battery.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24730)) ;;; Generated autoloads from battery.el (put 'battery-mode-line-string 'risky-local-variable t) @@ -1762,7 +1775,7 @@ seconds. ;;;*** ;;;### (autoloads (benchmark benchmark-run-compiled benchmark-run) -;;;;;; "benchmark" "emacs-lisp/benchmark.el" (17842 54152)) +;;;;;; "benchmark" "emacs-lisp/benchmark.el" (18104 24745)) ;;; Generated autoloads from emacs-lisp/benchmark.el (autoload (quote benchmark-run) "benchmark" "\ @@ -1794,8 +1807,8 @@ non-interactive use see also `benchmark-run' and ;;;*** -;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (17956 -;;;;;; 21270)) +;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (18104 +;;;;;; 24770)) ;;; Generated autoloads from textmodes/bibtex.el (autoload (quote bibtex-mode) "bibtex" "\ @@ -1855,9 +1868,21 @@ if that value is non-nil. ;;;*** +;;;### (autoloads (bibtex-style-mode) "bibtex-style" "textmodes/bibtex-style.el" +;;;;;; (18104 24770)) +;;; Generated autoloads from textmodes/bibtex-style.el + (add-to-list 'auto-mode-alist '("\\.bst\\'" . bibtex-style-mode)) + +(autoload (quote bibtex-style-mode) "bibtex-style" "\ +Major mode for editing BibTeX style files. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (binhex-decode-region binhex-decode-region-external ;;;;;; binhex-decode-region-internal) "binhex" "gnus/binhex.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/binhex.el (defconst binhex-begin-line "^:...............................................................$") @@ -1880,8 +1905,8 @@ Binhex decode region between START and END. ;;;*** -;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (17842 -;;;;;; 55395)) +;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (18104 +;;;;;; 24760)) ;;; Generated autoloads from play/blackbox.el (autoload (quote blackbox) "blackbox" "\ @@ -2002,8 +2027,9 @@ a reflection. ;;;### (autoloads (bookmark-bmenu-list bookmark-load bookmark-save ;;;;;; bookmark-write bookmark-delete bookmark-insert bookmark-rename -;;;;;; bookmark-insert-location bookmark-relocate bookmark-jump -;;;;;; bookmark-set) "bookmark" "bookmark.el" (17842 58280)) +;;;;;; bookmark-insert-location bookmark-relocate bookmark-jump-other-window +;;;;;; bookmark-jump bookmark-set) "bookmark" "bookmark.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-map "rb" 'bookmark-jump) (define-key ctl-x-map "rm" 'bookmark-set) @@ -2017,12 +2043,13 @@ key of your choice to `bookmark-map'. All interactive bookmark functions have a binding in this keymap.") (define-prefix-command 'bookmark-map) (define-key bookmark-map "x" 'bookmark-set) - (define-key bookmark-map "m" 'bookmark-set) ; "m" for "mark" + (define-key bookmark-map "m" 'bookmark-set) ;"m"ark (define-key bookmark-map "j" 'bookmark-jump) - (define-key bookmark-map "g" 'bookmark-jump) ; "g" for "go" + (define-key bookmark-map "g" 'bookmark-jump) ;"g"o + (define-key bookmark-map "o" 'bookmark-jump-other-window) (define-key bookmark-map "i" 'bookmark-insert) (define-key bookmark-map "e" 'edit-bookmarks) - (define-key bookmark-map "f" 'bookmark-insert-location) ; "f" for "find" + (define-key bookmark-map "f" 'bookmark-insert-location) ;"f"ind (define-key bookmark-map "r" 'bookmark-rename) (define-key bookmark-map "d" 'bookmark-delete) (define-key bookmark-map "l" 'bookmark-load) @@ -2068,6 +2095,12 @@ of the old one in the permanent bookmark record. \(fn BOOKMARK)" t nil) +(autoload (quote bookmark-jump-other-window) "bookmark" "\ +Jump to BOOKMARK (a point in some file) in another window. +See `bookmark-jump'. + +\(fn BOOKMARK)" t nil) + (autoload (quote bookmark-relocate) "bookmark" "\ Relocate BOOKMARK to another file (reading file name with minibuffer). This makes an already existing bookmark point to that file, instead of @@ -2193,7 +2226,7 @@ deletion, or > if it is flagged for displaying. ;;;;;; browse-url browse-url-of-region browse-url-of-dired-file ;;;;;; browse-url-of-buffer browse-url-of-file browse-url-url-at-point ;;;;;; browse-url-galeon-program browse-url-firefox-program browse-url-browser-function) -;;;;;; "browse-url" "net/browse-url.el" (17842 55218)) +;;;;;; "browse-url" "net/browse-url.el" (18104 24759)) ;;; Generated autoloads from net/browse-url.el (defvar browse-url-browser-function (cond ((memq system-type (quote (windows-nt ms-dos cygwin))) (quote browse-url-default-windows-browser)) ((memq system-type (quote (darwin))) (quote browse-url-default-macosx-browser)) (t (quote browse-url-default-browser))) "\ @@ -2524,8 +2557,8 @@ Default to the URL around or before point. ;;;*** -;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (17842 -;;;;;; 55395)) +;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (18104 +;;;;;; 24760)) ;;; Generated autoloads from play/bruce.el (autoload (quote bruce) "bruce" "\ @@ -2541,7 +2574,7 @@ Return a vector containing the lines from `bruce-phrases-file'. ;;;*** ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) -;;;;;; "bs" "bs.el" (17842 58280)) +;;;;;; "bs" "bs.el" (18104 24730)) ;;; Generated autoloads from bs.el (autoload (quote bs-cycle-next) "bs" "\ @@ -2582,8 +2615,8 @@ name of buffer configuration. ;;;*** ;;;### (autoloads (insert-text-button make-text-button insert-button -;;;;;; make-button define-button-type) "button" "button.el" (17992 -;;;;;; 30877)) +;;;;;; make-button define-button-type) "button" "button.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from button.el (defvar button-map (let ((map (make-sparse-keymap))) (define-key map "
" (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\ @@ -2671,7 +2704,7 @@ Also see `make-text-button'. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp" -;;;;;; "emacs-lisp/bytecomp.el" (17949 41467)) +;;;;;; "emacs-lisp/bytecomp.el" (18104 24746)) ;;; 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) @@ -2777,7 +2810,7 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (17956 13479)) +;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (18104 24745)) ;;; Generated autoloads from calendar/cal-dst.el (put (quote calendar-daylight-savings-starts) (quote risky-local-variable) t) @@ -2787,7 +2820,7 @@ and corresponding effects. ;;;*** ;;;### (autoloads (list-yahrzeit-dates) "cal-hebrew" "calendar/cal-hebrew.el" -;;;;;; (17956 13479)) +;;;;;; (18104 24745)) ;;; Generated autoloads from calendar/cal-hebrew.el (autoload (quote list-yahrzeit-dates) "cal-hebrew" "\ @@ -2802,7 +2835,7 @@ from the cursor position. ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc ;;;;;; full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el" -;;;;;; (17965 11665)) +;;;;;; (18104 24745)) ;;; Generated autoloads from calc/calc.el (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\ @@ -2880,8 +2913,8 @@ Not documented ;;;*** -;;;### (autoloads (calculator) "calculator" "calculator.el" (17870 -;;;;;; 28179)) +;;;### (autoloads (calculator) "calculator" "calculator.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from calculator.el (autoload (quote calculator) "calculator" "\ @@ -2909,7 +2942,7 @@ See the documentation for `calculator-mode' for more information. ;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar ;;;;;; view-diary-entries-initially calendar-offset) "calendar" -;;;;;; "calendar/calendar.el" (17956 13479)) +;;;;;; "calendar/calendar.el" (18104 24745)) ;;; Generated autoloads from calendar/calendar.el (defvar calendar-offset 0 "\ @@ -3482,7 +3515,7 @@ movement commands will not work correctly.") ;;;*** ;;;### (autoloads (canlock-verify canlock-insert-header) "canlock" -;;;;;; "gnus/canlock.el" (17842 54741)) +;;;;;; "gnus/canlock.el" (18104 24750)) ;;; Generated autoloads from gnus/canlock.el (autoload (quote canlock-insert-header) "canlock" "\ @@ -3499,15 +3532,15 @@ it fails. ;;;*** -;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (17842 -;;;;;; 56333)) +;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (18104 +;;;;;; 24763)) ;;; Generated autoloads from progmodes/cc-compat.el (put 'c-indent-level 'safe-local-variable 'integerp) ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" -;;;;;; (17942 63381)) +;;;;;; (18104 24763)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload (quote c-guess-basic-syntax) "cc-engine" "\ @@ -3519,7 +3552,7 @@ Return the syntactic context of the current line. ;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode ;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24763)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload (quote c-initialize-cc-mode) "cc-mode" "\ @@ -3677,7 +3710,7 @@ Key bindings: ;;;*** ;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles" -;;;;;; "progmodes/cc-styles.el" (17842 56333)) +;;;;;; "progmodes/cc-styles.el" (18104 24764)) ;;; Generated autoloads from progmodes/cc-styles.el (autoload (quote c-set-style) "cc-styles" "\ @@ -3728,14 +3761,14 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (17949 -;;;;;; 41467)) +;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (18104 +;;;;;; 24764)) ;;; Generated autoloads from progmodes/cc-subword.el (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t) ;;;*** -;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17941 38806)) +;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (18104 24764)) ;;; Generated autoloads from progmodes/cc-vars.el (put 'c-basic-offset 'safe-local-variable 'integerp) (put 'c-backslash-column 'safe-local-variable 'integerp) @@ -3745,7 +3778,7 @@ and exists only for compatibility reasons. ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program ;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el" -;;;;;; (17842 54888)) +;;;;;; (18104 24756)) ;;; Generated autoloads from international/ccl.el (autoload (quote ccl-compile) "ccl" "\ @@ -4004,7 +4037,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;*** ;;;### (autoloads (cfengine-mode) "cfengine" "progmodes/cfengine.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24764)) ;;; Generated autoloads from progmodes/cfengine.el (autoload (quote cfengine-mode) "cfengine" "\ @@ -4026,7 +4059,7 @@ to the action header. ;;;;;; checkdoc-comments checkdoc-continue checkdoc-start checkdoc-current-buffer ;;;;;; checkdoc-eval-current-buffer checkdoc-message-interactive ;;;;;; checkdoc-interactive checkdoc) "checkdoc" "emacs-lisp/checkdoc.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24746)) ;;; Generated autoloads from emacs-lisp/checkdoc.el (autoload (quote checkdoc) "checkdoc" "\ @@ -4209,8 +4242,8 @@ checking of documentation strings. ;;;*** ;;;### (autoloads (encode-hz-buffer encode-hz-region decode-hz-buffer -;;;;;; decode-hz-region) "china-util" "language/china-util.el" (17842 -;;;;;; 58278)) +;;;;;; decode-hz-region) "china-util" "language/china-util.el" (18104 +;;;;;; 24757)) ;;; Generated autoloads from language/china-util.el (autoload (quote decode-hz-region) "china-util" "\ @@ -4238,7 +4271,7 @@ Encode the text in the current buffer to HZ. ;;;*** ;;;### (autoloads (command-history list-command-history repeat-matching-complex-command) -;;;;;; "chistory" "chistory.el" (17842 58280)) +;;;;;; "chistory" "chistory.el" (18104 24730)) ;;; Generated autoloads from chistory.el (autoload (quote repeat-matching-complex-command) "chistory" "\ @@ -4277,7 +4310,7 @@ and runs the normal hook `command-history-hook'. ;;;*** -;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (17842 54152)) +;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/cl.el (defvar custom-print-functions nil "\ @@ -4293,7 +4326,7 @@ a future Emacs interpreter will be able to use it.") ;;;*** ;;;### (autoloads (common-lisp-indent-function) "cl-indent" "emacs-lisp/cl-indent.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24746)) ;;; Generated autoloads from emacs-lisp/cl-indent.el (autoload (quote common-lisp-indent-function) "cl-indent" "\ @@ -4304,7 +4337,7 @@ Not documented ;;;*** ;;;### (autoloads (c-macro-expand) "cmacexp" "progmodes/cmacexp.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24764)) ;;; Generated autoloads from progmodes/cmacexp.el (autoload (quote c-macro-expand) "cmacexp" "\ @@ -4324,8 +4357,8 @@ For use inside Lisp programs, see also `c-macro-expansion'. ;;;*** -;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (17842 -;;;;;; 58280)) +;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from cmuscheme.el (autoload (quote run-scheme) "cmuscheme" "\ @@ -4348,7 +4381,7 @@ is run). ;;;### (autoloads (codepage-setup cp-supported-codepages cp-offset-for-codepage ;;;;;; cp-language-for-codepage cp-charset-for-codepage cp-make-coding-systems-for-codepage) -;;;;;; "codepage" "international/codepage.el" (17842 54888)) +;;;;;; "codepage" "international/codepage.el" (18104 24756)) ;;; Generated autoloads from international/codepage.el (autoload (quote cp-make-coding-systems-for-codepage) "codepage" "\ @@ -4407,7 +4440,7 @@ read/written by MS-DOS software, or for display on the MS-DOS terminal. ;;;### (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" -;;;;;; (17937 3189)) +;;;;;; (18104 24730)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions (quote (comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt)) "\ @@ -4429,9 +4462,9 @@ either globally or locally.") Make a Comint process NAME in BUFFER, running PROGRAM. If BUFFER is nil, it defaults to NAME surrounded by `*'s. PROGRAM should be either a string denoting an executable program to create -via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP -connection to be opened via `open-network-stream'. If there is already a -running process in that buffer, it is not restarted. Optional fourth arg +via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting +a TCP connection to be opened via `open-network-stream'. If there is already +a running process in that buffer, it is not restarted. Optional fourth arg STARTFILE is the name of a file to send the contents of to the process. If PROGRAM is a string, any more args are arguments to PROGRAM. @@ -4442,9 +4475,9 @@ If PROGRAM is a string, any more args are arguments to PROGRAM. Make a Comint process NAME in a buffer, running PROGRAM. The name of the buffer is made by surrounding NAME with `*'s. PROGRAM should be either a string denoting an executable program to create -via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP -connection to be opened via `open-network-stream'. If there is already a -running process in that buffer, it is not restarted. Optional third arg +via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting +a TCP connection to be opened via `open-network-stream'. If there is already +a running process in that buffer, it is not restarted. Optional third arg STARTFILE is the name of a file to send the contents of the process to. If PROGRAM is a string, any more args are arguments to PROGRAM. @@ -4497,8 +4530,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use. ;;;*** -;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (17926 -;;;;;; 45410)) +;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (18104 +;;;;;; 24730)) ;;; Generated autoloads from compare-w.el (autoload (quote compare-windows) "compare-w" "\ @@ -4535,16 +4568,16 @@ 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-mode-hook) -;;;;;; "compile" "progmodes/compile.el" (18006 55797)) +;;;;;; "compile" "progmodes/compile.el" (18104 24764)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ -*List of hook functions run by `compilation-mode' (see `run-mode-hooks').") +List of hook functions run by `compilation-mode' (see `run-mode-hooks').") (custom-autoload (quote compilation-mode-hook) "compile" t) (defvar compilation-window-height nil "\ -*Number of lines in a compilation window. If nil, use Emacs default.") +Number of lines in a compilation window. If nil, use Emacs default.") (custom-autoload (quote compilation-window-height) "compile" t) @@ -4560,7 +4593,7 @@ bound to the compilation buffer and window, respectively.") Function to compute the name of a compilation buffer. The function receives one argument, the name of the major mode of the compilation buffer. It should return a string. -nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") +If nil, compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") (defvar compilation-finish-function nil "\ Function to call when a compilation process finishes. @@ -4574,20 +4607,20 @@ and a string describing how the process finished.") (put 'compilation-directory 'safe-local-variable 'stringp) (defvar compilation-ask-about-save t "\ -*Non-nil means \\[compile] asks which buffers to save before compiling. +Non-nil means \\[compile] asks which buffers to save before compiling. Otherwise, it saves all modified buffers without asking.") (custom-autoload (quote compilation-ask-about-save) "compile" t) (defvar compilation-search-path (quote (nil)) "\ -*List of directories to search for source files named in error messages. +List of directories to search for source files named in error messages. Elements should be directory names, not file names of directories. -nil as an element means to try the default directory.") +The value nil as an element means to try the default directory.") (custom-autoload (quote compilation-search-path) "compile" t) (defvar compile-command "make -k " "\ -*Last shell command used to do a compilation; default for next compilation. +Last shell command used to do a compilation; default for next compilation. Sometimes it is useful for files to supply local values for this variable. You might also use mode hooks to specify it in certain modes, like this: @@ -4604,7 +4637,7 @@ You might also use mode hooks to specify it in certain modes, like this: (put 'compile-command 'safe-local-variable 'stringp) (defvar compilation-disable-input nil "\ -*If non-nil, send end-of-file as compilation process input. +If non-nil, send end-of-file as compilation process input. This only affects platforms that support asynchronous processes (see `start-process'); synchronous compilation processes never accept input.") @@ -4626,11 +4659,13 @@ non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. Additionally, with universal prefix arg, compilation buffer will be in comint mode, i.e. interactive. -To run more than one compilation at once, start one and rename +To run more than one compilation at once, start one then rename the `*compilation*' buffer to some other name with -\\[rename-buffer]. Then start the next one. On most systems, -termination of the main compilation process kills its -subprocesses. +\\[rename-buffer]. Then _switch buffers_ and start the new compilation. +It will create a new `*compilation*' buffer. + +On most systems, termination of the main compilation process +kills its subprocesses. The name used for the buffer is actually whatever is returned by the function in `compilation-buffer-name-function', so you can set that @@ -4645,8 +4680,11 @@ The rest of the arguments are optional; for them, nil means use the default. MODE is the major mode to set in the compilation buffer. Mode may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'. + If NAME-FUNCTION is non-nil, call it with one argument (the mode name) -to determine the buffer name. +to determine the buffer name. Otherwise, the default is to +reuses the current buffer if it has the proper major mode, +else use or create a buffer with name based on the major mode. If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight the matching section of the visited source line; the default is to use the @@ -4698,7 +4736,7 @@ This is the value of `next-error-function' in Compilation buffers. ;;;*** ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" -;;;;;; (17954 15344)) +;;;;;; (18104 24730)) ;;; Generated autoloads from complete.el (defvar partial-completion-mode nil "\ @@ -4740,7 +4778,7 @@ second TAB brings up the `*Completions*' buffer. ;;;*** ;;;### (autoloads (dynamic-completion-mode) "completion" "completion.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24731)) ;;; Generated autoloads from completion.el (defvar dynamic-completion-mode nil "\ @@ -4762,7 +4800,7 @@ Enable dynamic word-completion. ;;;### (autoloads (decompose-composite-char compose-last-chars compose-chars-after ;;;;;; find-composition compose-chars decompose-string compose-string ;;;;;; decompose-region compose-region encode-composition-rule) -;;;;;; "composite" "composite.el" (17842 58280)) +;;;;;; "composite" "composite.el" (18104 24731)) ;;; Generated autoloads from composite.el (defconst reference-point-alist (quote ((tl . 0) (tc . 1) (tr . 2) (Bl . 3) (Bc . 4) (Br . 5) (bl . 6) (bc . 7) (br . 8) (cl . 9) (cc . 10) (cr . 11) (top-left . 0) (top-center . 1) (top-right . 2) (base-left . 3) (base-center . 4) (base-right . 5) (bottom-left . 6) (bottom-center . 7) (bottom-right . 8) (center-left . 9) (center-center . 10) (center-right . 11) (ml . 3) (mc . 10) (mr . 5) (mid-left . 3) (mid-center . 10) (mid-right . 5))) "\ @@ -4984,7 +5022,7 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored. ;;;### (autoloads (conf-xdefaults-mode conf-ppd-mode conf-colon-mode ;;;;;; conf-space-keywords conf-space-mode conf-javaprop-mode conf-windows-mode ;;;;;; conf-unix-mode conf-mode) "conf-mode" "textmodes/conf-mode.el" -;;;;;; (17842 58277)) +;;;;;; (18104 24770)) ;;; Generated autoloads from textmodes/conf-mode.el (autoload (quote conf-mode) "conf-mode" "\ @@ -5140,7 +5178,7 @@ For details see `conf-mode'. Example: ;;;*** ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) -;;;;;; "cookie1" "play/cookie1.el" (17842 55395)) +;;;;;; "cookie1" "play/cookie1.el" (18104 24760)) ;;; Generated autoloads from play/cookie1.el (autoload (quote cookie) "cookie1" "\ @@ -5172,7 +5210,7 @@ Randomly permute the elements of VECTOR (all permutations equally likely). ;;;*** ;;;### (autoloads (copyright copyright-fix-years copyright-update) -;;;;;; "copyright" "emacs-lisp/copyright.el" (17842 54152)) +;;;;;; "copyright" "emacs-lisp/copyright.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/copyright.el (autoload (quote copyright-update) "copyright" "\ @@ -5200,7 +5238,7 @@ Insert a copyright by $ORGANIZATION notice at cursor. ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17955 36604)) +;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (18104 24764)) ;;; Generated autoloads from progmodes/cperl-mode.el (autoload (quote cperl-mode) "cperl-mode" "\ @@ -5391,7 +5429,7 @@ Run a `perldoc' on the word around point. ;;;*** ;;;### (autoloads (cpp-parse-edit cpp-highlight-buffer) "cpp" "progmodes/cpp.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24764)) ;;; Generated autoloads from progmodes/cpp.el (autoload (quote cpp-highlight-buffer) "cpp" "\ @@ -5410,7 +5448,7 @@ Edit display information for cpp conditionals. ;;;*** ;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" -;;;;;; (17842 54264)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/crisp.el (defvar crisp-mode nil "\ @@ -5434,7 +5472,7 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise. ;;;*** ;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24747)) ;;; Generated autoloads from emacs-lisp/crm.el (autoload (quote completing-read-multiple) "crm" "\ @@ -5469,8 +5507,20 @@ INHERIT-INPUT-METHOD. ;;;*** +;;;### (autoloads (css-mode) "css-mode" "textmodes/css-mode.el" (18104 +;;;;;; 24771)) +;;; Generated autoloads from textmodes/css-mode.el + (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode)) + +(autoload (quote css-mode) "css-mode" "\ +Major mode to edit Cascading Style Sheets. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (cua-selection-mode cua-mode) "cua-base" "emulation/cua-base.el" -;;;;;; (17888 45995)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/cua-base.el (defvar cua-mode nil "\ @@ -5538,7 +5588,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. ;;;;;; customize-mode customize 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" -;;;;;; (17952 11093)) +;;;;;; (18104 24731)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@ -5622,12 +5672,12 @@ then prompt for the MODE to customize. (autoload (quote customize-group) "cus-edit" "\ Customize GROUP, which must be a customization group. -\(fn GROUP)" t nil) +\(fn &optional GROUP)" t nil) (autoload (quote customize-group-other-window) "cus-edit" "\ -Customize GROUP, which must be a customization group. +Customize GROUP, which must be a customization group, in another window. -\(fn GROUP)" t nil) +\(fn &optional GROUP)" t nil) (defalias (quote customize-variable) (quote customize-option)) @@ -5836,7 +5886,7 @@ The format is suitable for use with `easy-menu-define'. ;;;*** ;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-set-faces -;;;;;; custom-declare-face) "cus-face" "cus-face.el" (17842 58280)) +;;;;;; custom-declare-face) "cus-face" "cus-face.el" (18104 24732)) ;;; Generated autoloads from cus-face.el (autoload (quote custom-declare-face) "cus-face" "\ @@ -5906,7 +5956,7 @@ This means reset FACE to its value in FROM-THEME. ;;;*** ;;;### (autoloads (customize-create-theme) "cus-theme" "cus-theme.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24732)) ;;; Generated autoloads from cus-theme.el (autoload (quote customize-create-theme) "cus-theme" "\ @@ -5917,7 +5967,7 @@ Create a custom theme. ;;;*** ;;;### (autoloads (cvs-status-mode) "cvs-status" "cvs-status.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24732)) ;;; Generated autoloads from cvs-status.el (autoload (quote cvs-status-mode) "cvs-status" "\ @@ -5928,7 +5978,7 @@ Mode used for cvs status output. ;;;*** ;;;### (autoloads (global-cwarn-mode turn-on-cwarn-mode cwarn-mode) -;;;;;; "cwarn" "progmodes/cwarn.el" (17860 50532)) +;;;;;; "cwarn" "progmodes/cwarn.el" (18104 24764)) ;;; Generated autoloads from progmodes/cwarn.el (autoload (quote cwarn-mode) "cwarn" "\ @@ -5971,7 +6021,7 @@ See `cwarn-mode' for more information on Cwarn mode. ;;;### (autoloads (standard-display-cyrillic-translit cyrillic-encode-alternativnyj-char ;;;;;; cyrillic-encode-koi8-r-char) "cyril-util" "language/cyril-util.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24757)) ;;; Generated autoloads from language/cyril-util.el (autoload (quote cyrillic-encode-koi8-r-char) "cyril-util" "\ @@ -6000,7 +6050,7 @@ If the argument is nil, we return the display table to its standard state. ;;;*** ;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el" -;;;;;; (18006 55794)) +;;;;;; (18104 24732)) ;;; Generated autoloads from dabbrev.el (define-key esc-map "/" 'dabbrev-expand) (define-key esc-map [?\C-/] 'dabbrev-completion) @@ -6044,8 +6094,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** -;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (17949 -;;;;;; 41468)) +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (18104 +;;;;;; 24764)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload (quote dcl-mode) "dcl-mode" "\ @@ -6172,7 +6222,7 @@ There is some minimal font-lock support (see vars ;;;*** ;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug" -;;;;;; "emacs-lisp/debug.el" (17842 54152)) +;;;;;; "emacs-lisp/debug.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/debug.el (setq debugger (quote debug)) @@ -6216,7 +6266,7 @@ To specify a nil argument interactively, exit with an empty minibuffer. ;;;*** ;;;### (autoloads (decipher-mode decipher) "decipher" "play/decipher.el" -;;;;;; (17842 55395)) +;;;;;; (18104 24760)) ;;; Generated autoloads from play/decipher.el (autoload (quote decipher) "decipher" "\ @@ -6245,8 +6295,8 @@ The most useful commands are: ;;;*** ;;;### (autoloads (delimit-columns-rectangle delimit-columns-region -;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (17842 -;;;;;; 58280)) +;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (18104 +;;;;;; 24732)) ;;; Generated autoloads from delim-col.el (autoload (quote delimit-columns-customize) "delim-col" "\ @@ -6270,8 +6320,8 @@ START and END delimits the corners of text rectangle. ;;;*** -;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (17842 -;;;;;; 56333)) +;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (18104 +;;;;;; 24765)) ;;; Generated autoloads from progmodes/delphi.el (autoload (quote delphi-mode) "delphi" "\ @@ -6321,8 +6371,8 @@ no args, if that value is non-nil. ;;;*** -;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (17842 -;;;;;; 58280)) +;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (18104 +;;;;;; 24732)) ;;; Generated autoloads from delsel.el (defalias (quote pending-delete-mode) (quote delete-selection-mode)) @@ -6351,7 +6401,7 @@ any selection. ;;;*** ;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode) -;;;;;; "derived" "emacs-lisp/derived.el" (17842 54152)) +;;;;;; "derived" "emacs-lisp/derived.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/derived.el (autoload (quote define-derived-mode) "derived" "\ @@ -6416,7 +6466,7 @@ the first time the mode is used. ;;;*** ;;;### (autoloads (describe-char describe-text-properties) "descr-text" -;;;;;; "descr-text.el" (17874 62047)) +;;;;;; "descr-text.el" (18104 24732)) ;;; Generated autoloads from descr-text.el (autoload (quote describe-text-properties) "descr-text" "\ @@ -6442,7 +6492,7 @@ as well as widgets, buttons, overlays, and text properties. ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" -;;;;;; "desktop.el" (17949 41467)) +;;;;;; "desktop.el" (18104 24732)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6576,9 +6626,10 @@ Furthermore, it clears the variables listed in `desktop-globals-to-clear'. (autoload (quote desktop-save) "desktop" "\ Save the desktop in a desktop file. Parameter DIRNAME specifies where to save the desktop file. +Optional parameter RELEASE says whether we're done with this desktop. See also `desktop-base-file-name'. -\(fn DIRNAME)" t nil) +\(fn DIRNAME &optional RELEASE)" t nil) (autoload (quote desktop-remove) "desktop" "\ Delete desktop file in `desktop-dirname'. @@ -6625,7 +6676,7 @@ Revert to the last loaded desktop. ;;;### (autoloads (gnus-article-outlook-deuglify-article gnus-outlook-deuglify-article ;;;;;; gnus-article-outlook-repair-attribution gnus-article-outlook-unwrap-lines) -;;;;;; "deuglify" "gnus/deuglify.el" (17842 54741)) +;;;;;; "deuglify" "gnus/deuglify.el" (18104 24750)) ;;; Generated autoloads from gnus/deuglify.el (autoload (quote gnus-article-outlook-unwrap-lines) "deuglify" "\ @@ -6658,7 +6709,7 @@ Deuglify broken Outlook (Express) articles and redisplay. ;;;*** ;;;### (autoloads (devanagari-post-read-conversion devanagari-compose-region) -;;;;;; "devan-util" "language/devan-util.el" (17842 58278)) +;;;;;; "devan-util" "language/devan-util.el" (18104 24757)) ;;; Generated autoloads from language/devan-util.el (defconst devanagari-consonant "[\x51ad5-\x51af9\x51b38-\x51b3f]") @@ -6676,7 +6727,7 @@ Not documented ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" -;;;;;; "calendar/diary-lib.el" (17958 11887)) +;;;;;; "calendar/diary-lib.el" (18104 24745)) ;;; Generated autoloads from calendar/diary-lib.el (autoload (quote diary) "diary-lib" "\ @@ -6722,7 +6773,7 @@ Major mode for editing the diary file. ;;;*** ;;;### (autoloads (diff-backup diff diff-command diff-switches) "diff" -;;;;;; "diff.el" (17992 30877)) +;;;;;; "diff.el" (18104 24733)) ;;; Generated autoloads from diff.el (defvar diff-switches "-c" "\ @@ -6756,7 +6807,7 @@ With prefix arg, prompt for diff switches. ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" -;;;;;; (17992 30877)) +;;;;;; (18104 24733)) ;;; Generated autoloads from diff-mode.el (autoload (quote diff-mode) "diff-mode" "\ @@ -6788,7 +6839,7 @@ Minor mode for viewing/editing context diffs. ;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink ;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename ;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches) -;;;;;; "dired" "dired.el" (18015 32019)) +;;;;;; "dired" "dired.el" (18104 24733)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches "-al" "\ @@ -6993,7 +7044,7 @@ Keybindings: ;;;;;; dired-run-shell-command dired-do-shell-command dired-clean-directory ;;;;;; dired-do-print dired-do-touch dired-do-chown dired-do-chgrp ;;;;;; dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" (17859 20444)) +;;;;;; dired-diff) "dired-aux" "dired-aux.el" (18104 24733)) ;;; Generated autoloads from dired-aux.el (autoload (quote dired-diff) "dired-aux" "\ @@ -7408,7 +7459,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; (17992 30877)) +;;;;;; (18104 24733)) ;;; Generated autoloads from dired-x.el (autoload (quote dired-jump) "dired-x" "\ @@ -7437,7 +7488,7 @@ For absolute symlinks, use \\[dired-do-symlink]. ;;;*** -;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (17842 58280)) +;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (18104 24733)) ;;; Generated autoloads from dirtrack.el (autoload (quote dirtrack) "dirtrack" "\ @@ -7456,8 +7507,8 @@ You can enable directory tracking by adding this function to ;;;*** -;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (17842 -;;;;;; 54152)) +;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (18104 +;;;;;; 24747)) ;;; Generated autoloads from emacs-lisp/disass.el (autoload (quote disassemble) "disass" "\ @@ -7476,7 +7527,7 @@ redefine OBJECT if it is a symbol. ;;;;;; standard-display-g1 standard-display-ascii standard-display-default ;;;;;; standard-display-8bit describe-current-display-table describe-display-table ;;;;;; set-display-table-slot display-table-slot make-display-table) -;;;;;; "disp-table" "disp-table.el" (17874 62056)) +;;;;;; "disp-table" "disp-table.el" (18104 24734)) ;;; Generated autoloads from disp-table.el (autoload (quote make-display-table) "disp-table" "\ @@ -7573,7 +7624,7 @@ with either the `--unibyte' option or the EMACS_UNIBYTE environment variable, or else customize `enable-multibyte-characters'. With prefix argument, this command enables European character display -if arg is positive, disables it otherwise. Otherwise, it toggles +if ARG is positive, disables it otherwise. Otherwise, it toggles European character display. When this mode is enabled, characters in the range of 160 to 255 @@ -7592,7 +7643,7 @@ for users who call this function in `.emacs'. ;;;*** ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" -;;;;;; (17941 38806)) +;;;;;; (18104 24760)) ;;; Generated autoloads from play/dissociate.el (autoload (quote dissociated-press) "dissociate" "\ @@ -7608,7 +7659,7 @@ Default is 2. ;;;*** -;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (17949 41467)) +;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (18104 24734)) ;;; Generated autoloads from dnd.el (defvar dnd-protocol-alist (quote (("^file:///" . dnd-open-local-file) ("^file://" . dnd-open-file) ("^file:" . dnd-open-local-file) ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . dnd-open-file))) "\ @@ -7629,7 +7680,7 @@ if some action was made, or nil if the URL is ignored.") ;;;*** ;;;### (autoloads (dns-mode-soa-increment-serial dns-mode) "dns-mode" -;;;;;; "textmodes/dns-mode.el" (17842 58277)) +;;;;;; "textmodes/dns-mode.el" (18104 24771)) ;;; Generated autoloads from textmodes/dns-mode.el (autoload (quote dns-mode) "dns-mode" "\ @@ -7653,7 +7704,7 @@ Locate SOA record and increment the serial field. ;;;*** -;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17941 38806)) +;;;### (autoloads (doctor) "doctor" "play/doctor.el" (18104 24760)) ;;; Generated autoloads from play/doctor.el (autoload (quote doctor) "doctor" "\ @@ -7664,7 +7715,7 @@ Switch to *doctor* buffer and start giving psychotherapy. ;;;*** ;;;### (autoloads (double-mode double-mode) "double" "double.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24734)) ;;; Generated autoloads from double.el (defvar double-mode nil "\ @@ -7685,7 +7736,7 @@ when pressed twice. See variable `double-map' for details. ;;;*** -;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (17842 55395)) +;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (18104 24761)) ;;; Generated autoloads from play/dunnet.el (autoload (quote dunnet) "dunnet" "\ @@ -7696,7 +7747,7 @@ Switch to *dungeon* buffer and start game. ;;;*** ;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/earcon.el (autoload (quote gnus-earcon-display) "earcon" "\ @@ -7708,7 +7759,7 @@ Play sounds in message buffers. ;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap ;;;;;; define-globalized-minor-mode define-minor-mode) "easy-mmode" -;;;;;; "emacs-lisp/easy-mmode.el" (17992 30878)) +;;;;;; "emacs-lisp/easy-mmode.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/easy-mmode.el (defalias (quote easy-mmode-define-minor-mode) (quote define-minor-mode)) @@ -7730,7 +7781,7 @@ used (see below). BODY contains code to execute each time the mode is activated or deactivated. It is executed after toggling the mode, - and before running the hook variable `mode-HOOK'. + and before running the hook variable `MODE-hook'. Before the actual body code, you can write keyword arguments (alternating keywords and values). These following keyword arguments are supported (other keywords will be passed to `defcustom' if the minor mode is global): @@ -7802,8 +7853,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX). ;;;*** ;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define -;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (17842 -;;;;;; 54152)) +;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (18104 +;;;;;; 24747)) ;;; Generated autoloads from emacs-lisp/easymenu.el (put (quote easy-menu-define) (quote lisp-indent-function) (quote defun)) @@ -7947,12 +7998,12 @@ To implement dynamic menus, either call this from ;;;### (autoloads (ebnf-pop-style ebnf-push-style ebnf-reset-style ;;;;;; ebnf-apply-style ebnf-merge-style ebnf-delete-style ebnf-insert-style -;;;;;; ebnf-setup ebnf-syntax-region ebnf-syntax-buffer ebnf-syntax-file -;;;;;; ebnf-syntax-directory ebnf-eps-region ebnf-eps-buffer ebnf-eps-file -;;;;;; ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ebnf-spool-file -;;;;;; ebnf-spool-directory ebnf-print-region ebnf-print-buffer +;;;;;; ebnf-find-style ebnf-setup ebnf-syntax-region ebnf-syntax-buffer +;;;;;; ebnf-syntax-file ebnf-syntax-directory ebnf-eps-region ebnf-eps-buffer +;;;;;; ebnf-eps-file ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer +;;;;;; ebnf-spool-file ebnf-spool-directory ebnf-print-region ebnf-print-buffer ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" -;;;;;; "progmodes/ebnf2ps.el" (17952 11093)) +;;;;;; "progmodes/ebnf2ps.el" (18104 24765)) ;;; Generated autoloads from progmodes/ebnf2ps.el (autoload (quote ebnf-customize) "ebnf2ps" "\ @@ -8081,7 +8132,7 @@ The EPS file name has the following form: file name used in this case will be \"ebnf--A_B_+_C.eps\". WARNING: This function does *NOT* ask any confirmation to override existing - files. + files. \(fn)" t nil) @@ -8103,7 +8154,7 @@ The EPS file name has the following form: file name used in this case will be \"ebnf--A_B_+_C.eps\". WARNING: This function does *NOT* ask any confirmation to override existing - files. + files. \(fn FROM TO)" t nil) @@ -8137,7 +8188,7 @@ Do a syntactic analysis of the current buffer. \(fn)" t nil) (autoload (quote ebnf-syntax-region) "ebnf2ps" "\ -Do a syntactic analysis of region. +Do a syntactic analysis of a region. \(fn FROM TO)" t nil) @@ -8146,6 +8197,13 @@ Return the current ebnf2ps setup. \(fn)" nil nil) +(autoload (quote ebnf-find-style) "ebnf2ps" "\ +Return style definition if NAME is already defined; otherwise, return nil. + +See `ebnf-style-database' documentation. + +\(fn NAME)" t nil) + (autoload (quote ebnf-insert-style) "ebnf2ps" "\ Insert a new style NAME with inheritance INHERITS and values VALUES. @@ -8219,8 +8277,8 @@ See `ebnf-style-database' documentation. ;;;;;; ebrowse-tags-find-declaration-other-window ebrowse-tags-find-definition ;;;;;; ebrowse-tags-view-definition ebrowse-tags-find-declaration ;;;;;; ebrowse-tags-view-declaration ebrowse-member-mode ebrowse-electric-choose-tree -;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (17821 -;;;;;; 5918)) +;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (18104 +;;;;;; 24765)) ;;; Generated autoloads from progmodes/ebrowse.el (autoload (quote ebrowse-tree-mode) "ebrowse" "\ @@ -8371,7 +8429,7 @@ Display statistics for a class tree. ;;;*** ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24735)) ;;; Generated autoloads from ebuff-menu.el (autoload (quote electric-buffer-list) "ebuff-menu" "\ @@ -8396,7 +8454,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. ;;;*** ;;;### (autoloads (Electric-command-history-redo-expression) "echistory" -;;;;;; "echistory.el" (17842 58280)) +;;;;;; "echistory.el" (18104 24735)) ;;; Generated autoloads from echistory.el (autoload (quote Electric-command-history-redo-expression) "echistory" "\ @@ -8409,7 +8467,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;### (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" (17952 11093)) +;;;;;; "emacs-lisp/edebug.el" (18104 24747)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -8482,7 +8540,7 @@ Toggle edebugging of all forms. ;;;;;; ediff-merge-directory-revisions ediff-merge-directories-with-ancestor ;;;;;; ediff-merge-directories ediff-directories3 ediff-directory-revisions ;;;;;; ediff-directories ediff-buffers3 ediff-buffers ediff-backup -;;;;;; ediff-files3 ediff-files) "ediff" "ediff.el" (17846 30361)) +;;;;;; ediff-files3 ediff-files) "ediff" "ediff.el" (18104 24735)) ;;; Generated autoloads from ediff.el (autoload (quote ediff-files) "ediff" "\ @@ -8714,7 +8772,7 @@ With optional NODE, goes to that node. ;;;*** ;;;### (autoloads (ediff-customize) "ediff-help" "ediff-help.el" -;;;;;; (17842 58280)) +;;;;;; (18104 24735)) ;;; Generated autoloads from ediff-help.el (autoload (quote ediff-customize) "ediff-help" "\ @@ -8724,7 +8782,7 @@ Not documented ;;;*** -;;;### (autoloads nil "ediff-hook" "ediff-hook.el" (17842 58280)) +;;;### (autoloads nil "ediff-hook" "ediff-hook.el" (18104 24735)) ;;; Generated autoloads from ediff-hook.el (defvar ediff-window-setup-function) @@ -8737,7 +8795,7 @@ Not documented ;;;*** ;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff-mult.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24735)) ;;; Generated autoloads from ediff-mult.el (autoload (quote ediff-show-registry) "ediff-mult" "\ @@ -8750,7 +8808,7 @@ Display Ediff's registry. ;;;*** ;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) -;;;;;; "ediff-util" "ediff-util.el" (17846 30361)) +;;;;;; "ediff-util" "ediff-util.el" (18104 24735)) ;;; Generated autoloads from ediff-util.el (autoload (quote ediff-toggle-multiframe) "ediff-util" "\ @@ -8771,7 +8829,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. ;;;### (autoloads (format-kbd-macro read-kbd-macro edit-named-kbd-macro ;;;;;; edit-last-kbd-macro edit-kbd-macro) "edmacro" "edmacro.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24735)) ;;; Generated autoloads from edmacro.el (defvar edmacro-eight-bits nil "\ @@ -8824,7 +8882,7 @@ or nil, use a compact 80-column format. ;;;*** ;;;### (autoloads (edt-emulation-on edt-set-scroll-margins) "edt" -;;;;;; "emulation/edt.el" (17842 54264)) +;;;;;; "emulation/edt.el" (18104 24748)) ;;; Generated autoloads from emulation/edt.el (autoload (quote edt-set-scroll-margins) "edt" "\ @@ -8842,7 +8900,7 @@ Turn on EDT Emulation. ;;;*** ;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "ehelp.el" -;;;;;; (17873 45892)) +;;;;;; (18104 24735)) ;;; Generated autoloads from ehelp.el (autoload (quote with-electric-help) "ehelp" "\ @@ -8879,7 +8937,7 @@ Not documented ;;;*** ;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string) -;;;;;; "eldoc" "emacs-lisp/eldoc.el" (17992 30878)) +;;;;;; "eldoc" "emacs-lisp/eldoc.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/eldoc.el (defvar eldoc-minor-mode-string " ElDoc" "\ @@ -8917,8 +8975,8 @@ Emacs Lisp mode) that support Eldoc.") ;;;*** -;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (18104 +;;;;;; 24735)) ;;; Generated autoloads from elide-head.el (autoload (quote elide-head) "elide-head" "\ @@ -8934,7 +8992,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks. ;;;*** ;;;### (autoloads (elint-initialize) "elint" "emacs-lisp/elint.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/elint.el (autoload (quote elint-initialize) "elint" "\ @@ -8945,8 +9003,8 @@ Initialize elint. ;;;*** ;;;### (autoloads (elp-results elp-instrument-package elp-instrument-list -;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (17842 -;;;;;; 54152)) +;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emacs-lisp/elp.el (autoload (quote elp-instrument-function) "elp" "\ @@ -8980,7 +9038,7 @@ displayed. ;;;*** ;;;### (autoloads (report-emacs-bug) "emacsbug" "mail/emacsbug.el" -;;;;;; (17907 23437)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/emacsbug.el (autoload (quote report-emacs-bug) "emacsbug" "\ @@ -8995,7 +9053,7 @@ Prompts for bug subject. Leaves you in a mail buffer. ;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote ;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor ;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" -;;;;;; "emerge.el" (17166 62192)) +;;;;;; "emerge.el" (17994 6715)) ;;; Generated autoloads from emerge.el (defvar menu-bar-emerge-menu (make-sparse-keymap "Emerge")) @@ -9072,37 +9130,21 @@ Not documented ;;;*** -;;;### (autoloads (encoded-kbd-mode) "encoded-kb" "international/encoded-kb.el" -;;;;;; (17842 54888)) +;;;### (autoloads (encoded-kbd-setup-display) "encoded-kb" "international/encoded-kb.el" +;;;;;; (18104 24756)) ;;; Generated autoloads from international/encoded-kb.el -(defvar encoded-kbd-mode nil "\ -Non-nil if Encoded-Kbd mode is enabled. -See the command `encoded-kbd-mode' for a description of this minor mode. -Setting this variable directly does not take effect; -either customize it (see the info node `Easy Customization') -or call the function `encoded-kbd-mode'.") +(autoload (quote encoded-kbd-setup-display) "encoded-kb" "\ +Set up a `key-translation-map' for `keyboard-coding-system' on DISPLAY. -(custom-autoload (quote encoded-kbd-mode) "encoded-kb" nil) +DISPLAY may be a display id, a frame, or nil for the selected frame's display. -(autoload (quote encoded-kbd-mode) "encoded-kb" "\ -Toggle Encoded-kbd minor mode. -With arg, turn Encoded-kbd mode on if and only if arg is positive. - -You should not turn this mode on manually, instead use the command -\\[set-keyboard-coding-system] which turns on or off this mode -automatically. - -In Encoded-kbd mode, a text sent from keyboard is accepted -as a multilingual text encoded in a coding system set by -\\[set-keyboard-coding-system]. - -\(fn &optional ARG)" t nil) +\(fn DISPLAY)" nil nil) ;;;*** ;;;### (autoloads (enriched-decode enriched-encode enriched-mode) -;;;;;; "enriched" "textmodes/enriched.el" (17842 58277)) +;;;;;; "enriched" "textmodes/enriched.el" (18104 24771)) ;;; Generated autoloads from textmodes/enriched.el (autoload (quote enriched-mode) "enriched" "\ @@ -9133,7 +9175,7 @@ Not documented ;;;*** ;;;### (autoloads (erc-handle-irc-url erc erc-select-read-args) "erc" -;;;;;; "erc/erc.el" (17935 53318)) +;;;;;; "erc/erc.el" (18104 24749)) ;;; Generated autoloads from erc/erc.el (autoload (quote erc-select-read-args) "erc" "\ @@ -9175,33 +9217,33 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;;*** -;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (17935 -;;;;;; 53318)) +;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from erc/erc-autoaway.el (autoload 'erc-autoaway-mode "erc-autoaway") ;;;*** -;;;### (autoloads nil "erc-button" "erc/erc-button.el" (17935 53318)) +;;;### (autoloads nil "erc-button" "erc/erc-button.el" (18104 24749)) ;;; Generated autoloads from erc/erc-button.el (autoload 'erc-button-mode "erc-button" nil t) ;;;*** -;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (17935 53318)) +;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (18104 24749)) ;;; Generated autoloads from erc/erc-capab.el (autoload 'erc-capab-identify-mode "erc-capab" nil t) ;;;*** -;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (17935 53318)) +;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (18104 24749)) ;;; Generated autoloads from erc/erc-compat.el (autoload 'erc-define-minor-mode "erc-compat") ;;;*** ;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC) -;;;;;; "erc-dcc" "erc/erc-dcc.el" (17842 54344)) +;;;;;; "erc-dcc" "erc/erc-dcc.el" (18104 24749)) ;;; Generated autoloads from erc/erc-dcc.el (autoload (quote erc-cmd-DCC) "erc-dcc" "\ @@ -9233,7 +9275,7 @@ that subcommand. ;;;;;; erc-ezb-add-session erc-ezb-end-of-session-list erc-ezb-init-session-list ;;;;;; erc-ezb-identify erc-ezb-notice-autodetect erc-ezb-lookup-action ;;;;;; erc-ezb-get-login erc-cmd-ezb) "erc-ezbounce" "erc/erc-ezbounce.el" -;;;;;; (17842 54344)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-ezbounce.el (autoload (quote erc-cmd-ezb) "erc-ezbounce" "\ @@ -9295,8 +9337,8 @@ Add EZBouncer convenience functions to ERC. ;;;*** -;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (17935 -;;;;;; 53318)) +;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from erc/erc-fill.el (autoload 'erc-fill-mode "erc-fill" nil t) @@ -9308,15 +9350,15 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'. ;;;*** -;;;### (autoloads nil "erc-hecomplete" "erc/erc-hecomplete.el" (17842 -;;;;;; 54344)) +;;;### (autoloads nil "erc-hecomplete" "erc/erc-hecomplete.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from erc/erc-hecomplete.el (autoload 'erc-hecomplete-mode "erc-hecomplete" nil t) ;;;*** ;;;### (autoloads (erc-identd-stop erc-identd-start) "erc-identd" -;;;;;; "erc/erc-identd.el" (17935 53318)) +;;;;;; "erc/erc-identd.el" (18104 24749)) ;;; Generated autoloads from erc/erc-identd.el (autoload 'erc-identd-mode "erc-identd") @@ -9338,7 +9380,7 @@ Not documented ;;;*** ;;;### (autoloads (erc-create-imenu-index) "erc-imenu" "erc/erc-imenu.el" -;;;;;; (17842 54344)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-imenu.el (autoload (quote erc-create-imenu-index) "erc-imenu" "\ @@ -9348,14 +9390,14 @@ Not documented ;;;*** -;;;### (autoloads nil "erc-join" "erc/erc-join.el" (17842 54344)) +;;;### (autoloads nil "erc-join" "erc/erc-join.el" (18104 24749)) ;;; Generated autoloads from erc/erc-join.el (autoload 'erc-autojoin-mode "erc-join" nil t) ;;;*** ;;;### (autoloads (erc-save-buffer-in-logs erc-logging-enabled) "erc-log" -;;;;;; "erc/erc-log.el" (17935 53318)) +;;;;;; "erc/erc-log.el" (18104 24749)) ;;; Generated autoloads from erc/erc-log.el (autoload 'erc-log-mode "erc-log" nil t) @@ -9387,7 +9429,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" -;;;;;; (17935 53318)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-match.el (autoload 'erc-match-mode "erc-match") @@ -9433,14 +9475,14 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'. ;;;*** -;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (17935 53318)) +;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (18104 24749)) ;;; Generated autoloads from erc/erc-menu.el (autoload 'erc-menu-mode "erc-menu" nil t) ;;;*** ;;;### (autoloads (erc-cmd-WHOLEFT) "erc-netsplit" "erc/erc-netsplit.el" -;;;;;; (17935 53318)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-netsplit.el (autoload 'erc-netsplit-mode "erc-netsplit") @@ -9452,7 +9494,7 @@ Show who's gone. ;;;*** ;;;### (autoloads (erc-server-select erc-determine-network) "erc-networks" -;;;;;; "erc/erc-networks.el" (17935 53318)) +;;;;;; "erc/erc-networks.el" (18104 24749)) ;;; Generated autoloads from erc/erc-networks.el (autoload (quote erc-determine-network) "erc-networks" "\ @@ -9470,7 +9512,7 @@ Interactively select a server to connect to using `erc-server-alist'. ;;;*** ;;;### (autoloads (pcomplete/erc-mode/NOTIFY erc-cmd-NOTIFY) "erc-notify" -;;;;;; "erc/erc-notify.el" (17935 53318)) +;;;;;; "erc/erc-notify.el" (18104 24749)) ;;; Generated autoloads from erc/erc-notify.el (autoload 'erc-notify-mode "erc-notify" nil t) @@ -9488,33 +9530,33 @@ Not documented ;;;*** -;;;### (autoloads nil "erc-page" "erc/erc-page.el" (17842 54344)) +;;;### (autoloads nil "erc-page" "erc/erc-page.el" (18104 24749)) ;;; Generated autoloads from erc/erc-page.el (autoload 'erc-page-mode "erc-page") ;;;*** -;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (17935 -;;;;;; 53318)) +;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from erc/erc-pcomplete.el (autoload 'erc-completion-mode "erc-pcomplete" nil t) ;;;*** -;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (17842 54344)) +;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (18104 24749)) ;;; Generated autoloads from erc/erc-replace.el (autoload 'erc-replace-mode "erc-replace") ;;;*** -;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (17935 53318)) +;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (18104 24749)) ;;; Generated autoloads from erc/erc-ring.el (autoload 'erc-ring-mode "erc-ring" nil t) ;;;*** ;;;### (autoloads (erc-nickserv-identify erc-nickserv-identify-mode) -;;;;;; "erc-services" "erc/erc-services.el" (17935 53318)) +;;;;;; "erc-services" "erc/erc-services.el" (18104 24749)) ;;; Generated autoloads from erc/erc-services.el (autoload 'erc-services-mode "erc-services" nil t) @@ -9531,14 +9573,14 @@ When called interactively, read the password using `read-passwd'. ;;;*** -;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (17842 54344)) +;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (18104 24749)) ;;; Generated autoloads from erc/erc-sound.el (autoload 'erc-sound-mode "erc-sound") ;;;*** ;;;### (autoloads (erc-speedbar-browser) "erc-speedbar" "erc/erc-speedbar.el" -;;;;;; (17935 53318)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-speedbar.el (autoload (quote erc-speedbar-browser) "erc-speedbar" "\ @@ -9549,21 +9591,21 @@ This will add a speedbar major display mode. ;;;*** -;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (17935 -;;;;;; 53318)) +;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from erc/erc-spelling.el (autoload 'erc-spelling-mode "erc-spelling" nil t) ;;;*** -;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (17935 53318)) +;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (18104 24749)) ;;; Generated autoloads from erc/erc-stamp.el (autoload 'erc-timestamp-mode "erc-stamp" nil t) ;;;*** ;;;### (autoloads (erc-track-minor-mode) "erc-track" "erc/erc-track.el" -;;;;;; (17935 53318)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-track.el (defvar erc-track-minor-mode nil "\ @@ -9586,7 +9628,7 @@ module, otherwise the keybindings will not do anything useful. ;;;*** ;;;### (autoloads (erc-truncate-buffer erc-truncate-buffer-to-size) -;;;;;; "erc-truncate" "erc/erc-truncate.el" (17842 54344)) +;;;;;; "erc-truncate" "erc/erc-truncate.el" (18104 24749)) ;;; Generated autoloads from erc/erc-truncate.el (autoload 'erc-truncate-mode "erc-truncate" nil t) @@ -9606,7 +9648,7 @@ Meant to be used in hooks, like `erc-insert-post-hook'. ;;;*** ;;;### (autoloads (erc-xdcc-add-file) "erc-xdcc" "erc/erc-xdcc.el" -;;;;;; (17842 54344)) +;;;;;; (18104 24749)) ;;; Generated autoloads from erc/erc-xdcc.el (autoload (quote erc-xdcc-add-file) "erc-xdcc" "\ @@ -9616,8 +9658,8 @@ Add a file to `erc-xdcc-files'. ;;;*** -;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (17914 -;;;;;; 52082)) +;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from eshell/esh-mode.el (autoload (quote eshell-mode) "esh-mode" "\ @@ -9629,8 +9671,8 @@ Emacs shell interactive mode. ;;;*** -;;;### (autoloads (eshell-test) "esh-test" "eshell/esh-test.el" (17842 -;;;;;; 54411)) +;;;### (autoloads (eshell-test) "esh-test" "eshell/esh-test.el" (18104 +;;;;;; 24749)) ;;; Generated autoloads from eshell/esh-test.el (autoload (quote eshell-test) "esh-test" "\ @@ -9641,7 +9683,7 @@ Test Eshell to verify that it works as expected. ;;;*** ;;;### (autoloads (eshell-report-bug eshell-command-result eshell-command -;;;;;; eshell) "eshell" "eshell/eshell.el" (17842 54411)) +;;;;;; eshell) "eshell" "eshell/eshell.el" (18104 24749)) ;;; Generated autoloads from eshell/eshell.el (autoload (quote eshell) "eshell" "\ @@ -9687,7 +9729,7 @@ Please include any configuration details that might be involved. ;;;;;; visit-tags-table tags-table-mode find-tag-default-function ;;;;;; find-tag-hook tags-add-tables tags-compression-info-list ;;;;;; tags-table-list tags-case-fold-search) "etags" "progmodes/etags.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24765)) ;;; Generated autoloads from progmodes/etags.el (defvar tags-file-name nil "\ @@ -9989,7 +10031,7 @@ for \\[find-tag] (which see). ;;;;;; ethio-fidel-to-sera-buffer ethio-fidel-to-sera-region ethio-sera-to-fidel-marker ;;;;;; ethio-sera-to-fidel-mail ethio-sera-to-fidel-mail-or-marker ;;;;;; ethio-sera-to-fidel-buffer ethio-sera-to-fidel-region setup-ethiopic-environment-internal) -;;;;;; "ethio-util" "language/ethio-util.el" (17842 58278)) +;;;;;; "ethio-util" "language/ethio-util.el" (18104 24757)) ;;; Generated autoloads from language/ethio-util.el (autoload (quote setup-ethiopic-environment-internal) "ethio-util" "\ @@ -10184,7 +10226,7 @@ Transcribe Ethiopic characters in ASCII depending on the file extension. ;;;### (autoloads (eudc-load-eudc eudc-query-form eudc-expand-inline ;;;;;; eudc-get-phone eudc-get-email eudc-set-server) "eudc" "net/eudc.el" -;;;;;; (17842 55218)) +;;;;;; (18104 24759)) ;;; Generated autoloads from net/eudc.el (autoload (quote eudc-set-server) "eudc" "\ @@ -10240,7 +10282,7 @@ This does nothing except loading eudc by autoload side-effect. ;;;### (autoloads (eudc-display-jpeg-as-button eudc-display-jpeg-inline ;;;;;; eudc-display-sound eudc-display-mail eudc-display-url eudc-display-generic-binary) -;;;;;; "eudc-bob" "net/eudc-bob.el" (17842 55218)) +;;;;;; "eudc-bob" "net/eudc-bob.el" (18104 24759)) ;;; Generated autoloads from net/eudc-bob.el (autoload (quote eudc-display-generic-binary) "eudc-bob" "\ @@ -10276,7 +10318,7 @@ Display a button for the JPEG DATA. ;;;*** ;;;### (autoloads (eudc-try-bbdb-insert eudc-insert-record-at-point-into-bbdb) -;;;;;; "eudc-export" "net/eudc-export.el" (17842 55218)) +;;;;;; "eudc-export" "net/eudc-export.el" (18104 24759)) ;;; Generated autoloads from net/eudc-export.el (autoload (quote eudc-insert-record-at-point-into-bbdb) "eudc-export" "\ @@ -10293,7 +10335,7 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record. ;;;*** ;;;### (autoloads (eudc-edit-hotlist) "eudc-hotlist" "net/eudc-hotlist.el" -;;;;;; (17842 55218)) +;;;;;; (18104 24759)) ;;; Generated autoloads from net/eudc-hotlist.el (autoload (quote eudc-edit-hotlist) "eudc-hotlist" "\ @@ -10303,8 +10345,8 @@ Edit the hotlist of directory servers in a specialized buffer. ;;;*** -;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (17933 -;;;;;; 14283)) +;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emacs-lisp/ewoc.el (autoload (quote ewoc-create) "ewoc" "\ @@ -10333,7 +10375,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" -;;;;;; (17842 56333)) +;;;;;; (18104 24765)) ;;; Generated autoloads from progmodes/executable.el (autoload (quote executable-command-find-posix-p) "executable" "\ @@ -10376,7 +10418,7 @@ file modes. ;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot ;;;;;; expand-abbrev-hook expand-add-abbrevs) "expand" "expand.el" -;;;;;; (17925 52793)) +;;;;;; (18104 24735)) ;;; Generated autoloads from expand.el (autoload (quote expand-add-abbrevs) "expand" "\ @@ -10425,7 +10467,7 @@ This is used only in conjunction with `expand-add-abbrevs'. ;;;*** -;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (17842 56333)) +;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (18104 24765)) ;;; Generated autoloads from progmodes/f90.el (autoload (quote f90-mode) "f90" "\ @@ -10492,7 +10534,7 @@ with no args, if that value is non-nil. ;;;;;; facemenu-remove-all facemenu-remove-face-props facemenu-set-read-only ;;;;;; facemenu-set-intangible facemenu-set-invisible facemenu-set-face-from-menu ;;;;;; facemenu-set-background facemenu-set-foreground facemenu-set-face) -;;;;;; "facemenu" "facemenu.el" (17842 58279)) +;;;;;; "facemenu" "facemenu.el" (18104 24735)) ;;; Generated autoloads from facemenu.el (define-key global-map "\M-o" 'facemenu-keymap) (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap) @@ -10659,9 +10701,49 @@ argument BUFFER-NAME is nil, it defaults to *Colors*. ;;;*** +;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" +;;;;;; "obsolete/fast-lock.el" (18104 24760)) +;;; Generated autoloads from obsolete/fast-lock.el + +(autoload (quote fast-lock-mode) "fast-lock" "\ +Toggle Fast Lock mode. +With arg, turn Fast Lock mode on if and only if arg is positive and the buffer +is associated with a file. Enable it automatically in your `~/.emacs' by: + + (setq font-lock-support-mode 'fast-lock-mode) + +If Fast Lock mode is enabled, and the current buffer does not contain any text +properties, any associated Font Lock cache is used if its timestamp matches the +buffer's file, and its `font-lock-keywords' match those that you are using. + +Font Lock caches may be saved: +- When you save the file's buffer. +- When you kill an unmodified file's buffer. +- When you exit Emacs, for all unmodified or saved buffers. +Depending on the value of `fast-lock-save-events'. +See also the commands `fast-lock-read-cache' and `fast-lock-save-cache'. + +Use \\[font-lock-fontify-buffer] to fontify the buffer if the cache is bad. + +Various methods of control are provided for the Font Lock cache. In general, +see variable `fast-lock-cache-directories' and function `fast-lock-cache-name'. +For saving, see variables `fast-lock-minimum-size', `fast-lock-save-events', +`fast-lock-save-others' and `fast-lock-save-faces'. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-fast-lock) "fast-lock" "\ +Unconditionally turn on Fast Lock mode. + +\(fn)" nil nil) + +(when (fboundp (quote add-minor-mode)) (defvar fast-lock-mode nil) (add-minor-mode (quote fast-lock-mode) nil)) + +;;;*** + ;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue ;;;;;; feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts -;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (17888 29839)) +;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (17900 45314)) ;;; Generated autoloads from mail/feedmail.el (autoload (quote feedmail-send-it) "feedmail" "\ @@ -10715,7 +10797,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu -;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (17943 4602)) +;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (18104 24735)) ;;; Generated autoloads from ffap.el (autoload (quote ffap-next) "ffap" "\ @@ -10774,7 +10856,7 @@ Evaluate the forms in variable `ffap-bindings'. ;;;### (autoloads (file-cache-minibuffer-complete file-cache-add-directory-recursively ;;;;;; file-cache-add-directory-using-locate file-cache-add-directory-using-find ;;;;;; file-cache-add-file file-cache-add-directory-list file-cache-add-directory) -;;;;;; "filecache" "filecache.el" (17842 58279)) +;;;;;; "filecache" "filecache.el" (18104 24735)) ;;; Generated autoloads from filecache.el (autoload (quote file-cache-add-directory) "filecache" "\ @@ -10833,8 +10915,8 @@ the name is considered already unique; only the second substitution ;;;*** -;;;### (autoloads (filesets-init) "filesets" "filesets.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (filesets-init) "filesets" "filesets.el" (18104 +;;;;;; 24735)) ;;; Generated autoloads from filesets.el (autoload (quote filesets-init) "filesets" "\ @@ -10845,7 +10927,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu. ;;;*** -;;;### (autoloads nil "fill" "textmodes/fill.el" (18007 39658)) +;;;### (autoloads nil "fill" "textmodes/fill.el" (18104 24771)) ;;; Generated autoloads from textmodes/fill.el (put 'colon-double-space 'safe-local-variable 'booleanp) @@ -10853,7 +10935,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu. ;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options ;;;;;; find-ls-subdir-switches find-ls-option) "find-dired" "find-dired.el" -;;;;;; (17992 30877)) +;;;;;; (18104 24736)) ;;; Generated autoloads from find-dired.el (defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\ @@ -10914,7 +10996,7 @@ Thus ARG can also contain additional grep options. ;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file ;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24736)) ;;; Generated autoloads from find-file.el (defvar ff-special-constructs (quote (("^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]" lambda nil (buffer-substring (match-beginning 2) (match-end 2))))) "\ @@ -11008,7 +11090,7 @@ Visit the file you click on in another window. ;;;;;; find-variable find-variable-noselect find-function-other-frame ;;;;;; find-function-other-window find-function find-function-noselect ;;;;;; find-function-search-for-symbol find-library) "find-func" -;;;;;; "emacs-lisp/find-func.el" (17842 54152)) +;;;;;; "emacs-lisp/find-func.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/find-func.el (autoload (quote find-library) "find-func" "\ @@ -11162,7 +11244,7 @@ Define some key bindings for the find-function family of functions. ;;;*** ;;;### (autoloads (find-lisp-find-dired-filter find-lisp-find-dired-subdirectories -;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (17893 23802)) +;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (18104 24736)) ;;; Generated autoloads from find-lisp.el (autoload (quote find-lisp-find-dired) "find-lisp" "\ @@ -11183,7 +11265,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP. ;;;*** ;;;### (autoloads (finder-by-keyword finder-commentary finder-list-keywords) -;;;;;; "finder" "finder.el" (17842 58279)) +;;;;;; "finder" "finder.el" (18104 24736)) ;;; Generated autoloads from finder.el (autoload (quote finder-list-keywords) "finder" "\ @@ -11205,7 +11287,7 @@ Find packages matching a given keyword. ;;;*** ;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" -;;;;;; "flow-ctrl.el" (17842 58279)) +;;;;;; "flow-ctrl.el" (18104 24736)) ;;; Generated autoloads from flow-ctrl.el (autoload (quote enable-flow-control) "flow-ctrl" "\ @@ -11227,7 +11309,7 @@ to get the effect of a C-q. ;;;*** ;;;### (autoloads (fill-flowed fill-flowed-encode) "flow-fill" "gnus/flow-fill.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/flow-fill.el (autoload (quote fill-flowed-encode) "flow-fill" "\ @@ -11243,7 +11325,7 @@ Not documented ;;;*** ;;;### (autoloads (flymake-mode-off flymake-mode-on flymake-mode) -;;;;;; "flymake" "progmodes/flymake.el" (17934 27588)) +;;;;;; "flymake" "progmodes/flymake.el" (18104 24765)) ;;; Generated autoloads from progmodes/flymake.el (autoload (quote flymake-mode) "flymake" "\ @@ -11267,7 +11349,7 @@ Turn flymake mode off. ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off ;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode) -;;;;;; "flyspell" "textmodes/flyspell.el" (18006 55797)) +;;;;;; "flyspell" "textmodes/flyspell.el" (18104 24771)) ;;; Generated autoloads from textmodes/flyspell.el (autoload (quote flyspell-prog-mode) "flyspell" "\ @@ -11336,18 +11418,18 @@ Flyspell whole buffer. ;;;### (autoloads (follow-delete-other-windows-and-split follow-mode ;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24736)) ;;; Generated autoloads from follow.el (autoload (quote turn-on-follow-mode) "follow" "\ Turn on Follow mode. Please see the function `follow-mode'. -\(fn)" t nil) +\(fn)" nil nil) (autoload (quote turn-off-follow-mode) "follow" "\ Turn off Follow mode. Please see the function `follow-mode'. -\(fn)" t nil) +\(fn)" nil nil) (autoload (quote follow-mode) "follow" "\ Minor mode that combines windows into one tall virtual window. @@ -11365,16 +11447,16 @@ of two major techniques: movement commands. Follow mode comes to its prime when used on a large screen and two -side-by-side window are used. The user can, with the help of Follow +side-by-side windows are used. The user can, with the help of Follow mode, use two full-height windows as though they would have been -one. Imagine yourself editing a large function, or section of text, +one. Imagine yourself editing a large function, or section of text, and being able to use 144 lines instead of the normal 72... (your mileage may vary). To split one large window into two side-by-side windows, the commands `\\[split-window-horizontally]' or `M-x follow-delete-other-windows-and-split' can be used. -Only windows displayed in the same frame follow each-other. +Only windows displayed in the same frame follow each other. If the variable `follow-intercept-processes' is non-nil, Follow mode will listen to the output of processes and redisplay accordingly. @@ -11394,11 +11476,11 @@ Create two side by side windows and enter Follow Mode. Execute this command to display as much as possible of the text in the selected window. All other windows, in the current frame, are deleted and the selected window is split in two -side-by-side windows. Follow Mode is activated, hence the +side-by-side windows. Follow Mode is activated, hence the two windows always will display two successive pages. \(If one window is moved, the other one will follow.) -If ARG is positive, the leftmost window is selected. If it negative, +If ARG is positive, the leftmost window is selected. If negative, the rightmost is selected. If ARG is nil, the leftmost window is selected if the original window is the first one in the frame. @@ -11410,8 +11492,8 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: ;;;*** -;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (17954 -;;;;;; 24686)) +;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from mail/footnote.el (autoload (quote footnote-mode) "footnote" "\ @@ -11432,7 +11514,7 @@ key binding ;;;*** ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) -;;;;;; "forms" "forms.el" (17842 58279)) +;;;;;; "forms" "forms.el" (18104 24736)) ;;; Generated autoloads from forms.el (autoload (quote forms-mode) "forms" "\ @@ -11468,18 +11550,10 @@ Visit a file in Forms mode in other window. ;;;*** -;;;### (autoloads (fortran-mode fortran-tab-mode-default) "fortran" -;;;;;; "progmodes/fortran.el" (17842 56333)) +;;;### (autoloads (fortran-mode) "fortran" "progmodes/fortran.el" +;;;;;; (18104 24766)) ;;; Generated autoloads from progmodes/fortran.el -(defvar fortran-tab-mode-default nil "\ -*Default tabbing/carriage control style for empty files in Fortran mode. -A non-nil value specifies tab-digit style of continuation control. -A value of nil specifies that continuation lines are marked -with a character in column 6.") - -(custom-autoload (quote fortran-tab-mode-default) "fortran" t) - (autoload (quote fortran-mode) "fortran" "\ Major mode for editing Fortran code in fixed format. For free format code, use `f90-mode'. @@ -11555,7 +11629,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (fortune fortune-to-signature fortune-compile fortune-from-region -;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (17842 55395)) +;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (18104 24761)) ;;; Generated autoloads from play/fortune.el (autoload (quote fortune-add-fortune) "fortune" "\ @@ -11605,7 +11679,7 @@ and choose the directory as the fortune-file. ;;;*** ;;;### (autoloads (gdb-enable-debug gdba) "gdb-ui" "progmodes/gdb-ui.el" -;;;;;; (17941 38806)) +;;;;;; (18104 24766)) ;;; Generated autoloads from progmodes/gdb-ui.el (autoload (quote gdba) "gdb-ui" "\ @@ -11668,8 +11742,8 @@ Non-nil means record the process input and output in `gdb-debug-log'.") ;;;*** ;;;### (autoloads (generic-make-keywords-list generic-mode generic-mode-internal -;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (17842 -;;;;;; 54152)) +;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emacs-lisp/generic.el (defvar generic-mode-list nil "\ @@ -11744,7 +11818,7 @@ regular expression that can be used as an element of ;;;*** ;;;### (autoloads (glasses-mode) "glasses" "progmodes/glasses.el" -;;;;;; (17842 56333)) +;;;;;; (18104 24766)) ;;; Generated autoloads from progmodes/glasses.el (autoload (quote glasses-mode) "glasses" "\ @@ -11757,7 +11831,7 @@ at places they belong to. ;;;*** ;;;### (autoloads (gmm-tool-bar-from-list gmm-widget-p gmm-error -;;;;;; gmm-message) "gmm-utils" "gnus/gmm-utils.el" (17934 27588)) +;;;;;; gmm-message) "gmm-utils" "gnus/gmm-utils.el" (18104 24750)) ;;; Generated autoloads from gnus/gmm-utils.el (autoload (quote gmm-message) "gmm-utils" "\ @@ -11804,7 +11878,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. ;;;*** ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server -;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (17842 54741)) +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (18104 24751)) ;;; Generated autoloads from gnus/gnus.el (when (fboundp 'custom-autoload) (custom-autoload 'gnus-select-method "gnus")) @@ -11857,7 +11931,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" (17842 54741)) +;;;;;; "gnus/gnus-agent.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload (quote gnus-unplugged) "gnus-agent" "\ @@ -11948,7 +12022,7 @@ If CLEAN, obsolete (ignore). ;;;*** ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" -;;;;;; (17960 49045)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-art.el (autoload (quote gnus-article-prepare-display) "gnus-art" "\ @@ -11959,7 +12033,7 @@ Make the current buffer look like a nice article. ;;;*** ;;;### (autoloads (gnus-audio-play) "gnus-audio" "gnus/gnus-audio.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-audio.el (autoload (quote gnus-audio-play) "gnus-audio" "\ @@ -11971,8 +12045,8 @@ Play a sound FILE through the speaker. ;;;### (autoloads (gnus-cache-delete-group gnus-cache-rename-group ;;;;;; gnus-cache-generate-nov-databases gnus-cache-generate-active -;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (17842 -;;;;;; 54741)) +;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (18104 +;;;;;; 24750)) ;;; Generated autoloads from gnus/gnus-cache.el (autoload (quote gnus-jog-cache) "gnus-cache" "\ @@ -12014,7 +12088,7 @@ supported. ;;;*** ;;;### (autoloads (gnus-delay-initialize gnus-delay-send-queue gnus-delay-article) -;;;;;; "gnus-delay" "gnus/gnus-delay.el" (17842 54741)) +;;;;;; "gnus-delay" "gnus/gnus-delay.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-delay.el (autoload (quote gnus-delay-article) "gnus-delay" "\ @@ -12050,7 +12124,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil. ;;;*** ;;;### (autoloads (gnus-user-format-function-D gnus-user-format-function-d) -;;;;;; "gnus-diary" "gnus/gnus-diary.el" (17992 30878)) +;;;;;; "gnus-diary" "gnus/gnus-diary.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-diary.el (autoload (quote gnus-user-format-function-d) "gnus-diary" "\ @@ -12066,7 +12140,7 @@ Not documented ;;;*** ;;;### (autoloads (turn-on-gnus-dired-mode) "gnus-dired" "gnus/gnus-dired.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-dired.el (autoload (quote turn-on-gnus-dired-mode) "gnus-dired" "\ @@ -12077,7 +12151,7 @@ Convenience method to turn on gnus-dired-mode. ;;;*** ;;;### (autoloads (gnus-draft-reminder) "gnus-draft" "gnus/gnus-draft.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-draft.el (autoload (quote gnus-draft-reminder) "gnus-draft" "\ @@ -12089,8 +12163,8 @@ Reminder user if there are unsent drafts. ;;;### (autoloads (gnus-convert-png-to-face gnus-convert-face-to-png ;;;;;; gnus-face-from-file gnus-x-face-from-file gnus-insert-random-x-face-header -;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (17842 -;;;;;; 54741)) +;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (18104 +;;;;;; 24750)) ;;; Generated autoloads from gnus/gnus-fun.el (autoload (quote gnus-random-x-face) "gnus-fun" "\ @@ -12129,7 +12203,7 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to ;;;*** ;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group) -;;;;;; "gnus-group" "gnus/gnus-group.el" (17842 54741)) +;;;;;; "gnus-group" "gnus/gnus-group.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-group.el (autoload (quote gnus-fetch-group) "gnus-group" "\ @@ -12146,7 +12220,7 @@ Pop up a frame and enter GROUP. ;;;*** ;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-kill.el (defalias (quote gnus-batch-kill) (quote gnus-batch-score)) @@ -12161,7 +12235,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score ;;;### (autoloads (gnus-mailing-list-mode gnus-mailing-list-insinuate ;;;;;; turn-on-gnus-mailing-list-mode) "gnus-ml" "gnus/gnus-ml.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-ml.el (autoload (quote turn-on-gnus-mailing-list-mode) "gnus-ml" "\ @@ -12186,7 +12260,7 @@ Minor mode for providing mailing-list commands. ;;;### (autoloads (gnus-group-split-fancy gnus-group-split gnus-group-split-update ;;;;;; gnus-group-split-setup) "gnus-mlspl" "gnus/gnus-mlspl.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-mlspl.el (autoload (quote gnus-group-split-setup) "gnus-mlspl" "\ @@ -12287,7 +12361,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: ;;;*** ;;;### (autoloads (gnus-change-server) "gnus-move" "gnus/gnus-move.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-move.el (autoload (quote gnus-change-server) "gnus-move" "\ @@ -12299,7 +12373,7 @@ Update the .newsrc.eld file to reflect the change of nntp server. ;;;*** ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) -;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17949 41467)) +;;;;;; "gnus-msg" "gnus/gnus-msg.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload (quote gnus-msg-mail) "gnus-msg" "\ @@ -12324,7 +12398,7 @@ Like `message-reply'. ;;;*** ;;;### (autoloads (gnus-nocem-load-cache gnus-nocem-scan-groups) -;;;;;; "gnus-nocem" "gnus/gnus-nocem.el" (17842 54741)) +;;;;;; "gnus-nocem" "gnus/gnus-nocem.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-nocem.el (autoload (quote gnus-nocem-scan-groups) "gnus-nocem" "\ @@ -12341,7 +12415,7 @@ Load the NoCeM cache. ;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon ;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-picon.el (autoload (quote gnus-treat-from-picon) "gnus-picon" "\ @@ -12368,7 +12442,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" (17842 54741)) +;;;;;; "gnus/gnus-range.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-range.el (autoload (quote gnus-sorted-difference) "gnus-range" "\ @@ -12436,7 +12510,7 @@ Add NUM into sorted LIST by side effect. ;;;*** ;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize) -;;;;;; "gnus-registry" "gnus/gnus-registry.el" (17934 27588)) +;;;;;; "gnus-registry" "gnus/gnus-registry.el" (18104 24750)) ;;; Generated autoloads from gnus/gnus-registry.el (autoload (quote gnus-registry-initialize) "gnus-registry" "\ @@ -12452,8 +12526,8 @@ Install the registry hooks. ;;;*** ;;;### (autoloads (gnus-sieve-article-add-rule gnus-sieve-generate -;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (17842 -;;;;;; 54741)) +;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (18104 +;;;;;; 24750)) ;;; Generated autoloads from gnus/gnus-sieve.el (autoload (quote gnus-sieve-update) "gnus-sieve" "\ @@ -12481,7 +12555,7 @@ Not documented ;;;*** ;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-soup.el (autoload (quote gnus-batch-brew-soup) "gnus-soup" "\ @@ -12501,7 +12575,7 @@ Note -- this function hasn't been implemented yet. ;;;*** ;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24750)) ;;; Generated autoloads from gnus/gnus-spec.el (autoload (quote gnus-update-format) "gnus-spec" "\ @@ -12512,8 +12586,8 @@ Update the format specification near point. ;;;*** ;;;### (autoloads (gnus-fixup-nnimap-unread-after-getting-new-news -;;;;;; gnus-declare-backend) "gnus-start" "gnus/gnus-start.el" (17842 -;;;;;; 54741)) +;;;;;; gnus-declare-backend) "gnus-start" "gnus/gnus-start.el" (18104 +;;;;;; 24750)) ;;; Generated autoloads from gnus/gnus-start.el (autoload (quote gnus-declare-backend) "gnus-start" "\ @@ -12529,7 +12603,7 @@ Not documented ;;;*** ;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24751)) ;;; Generated autoloads from gnus/gnus-win.el (autoload (quote gnus-add-configuration) "gnus-win" "\ @@ -12539,7 +12613,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** -;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17941 38806)) +;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (18104 24761)) ;;; Generated autoloads from play/gomoku.el (autoload (quote gomoku) "gomoku" "\ @@ -12566,7 +12640,7 @@ Use \\[describe-mode] for more info. ;;;*** ;;;### (autoloads (goto-address goto-address-at-point) "goto-addr" -;;;;;; "net/goto-addr.el" (17842 55218)) +;;;;;; "net/goto-addr.el" (18104 24759)) ;;; Generated autoloads from net/goto-addr.el (define-obsolete-function-alias (quote goto-address-at-mouse) (quote goto-address-at-point) "22.1") @@ -12596,7 +12670,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and ;;;### (autoloads (rgrep lgrep grep-find grep grep-mode grep-compute-defaults ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command -;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17944 20144)) +;;;;;; grep-window-height) "grep" "progmodes/grep.el" (18104 24766)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12736,7 +12810,7 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]. ;;;*** -;;;### (autoloads (gs-load-image) "gs" "gs.el" (17842 58279)) +;;;### (autoloads (gs-load-image) "gs" "gs.el" (18104 24737)) ;;; Generated autoloads from gs.el (autoload (quote gs-load-image) "gs" "\ @@ -12750,7 +12824,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb) -;;;;;; "gud" "progmodes/gud.el" (17992 30878)) +;;;;;; "gud" "progmodes/gud.el" (18104 24766)) ;;; Generated autoloads from progmodes/gud.el (autoload (quote gdb) "gud" "\ @@ -12824,7 +12898,7 @@ gud, see `gud-mode'. \(fn COMMAND-LINE)" t nil) (add-hook 'same-window-regexps "\\*gud-.*\\*\\(\\|<[0-9]+>\\)") -(add-to-list (quote auto-mode-alist) (quote ("/\\.gdbinit" . gdb-script-mode))) +(add-to-list (quote auto-mode-alist) (quote ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode))) (autoload (quote gdb-script-mode) "gud" "\ Major mode for editing GDB scripts @@ -12833,8 +12907,8 @@ Major mode for editing GDB scripts ;;;*** -;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (17842 -;;;;;; 55395)) +;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (18104 +;;;;;; 24761)) ;;; Generated autoloads from play/handwrite.el (autoload (quote handwrite) "handwrite" "\ @@ -12852,7 +12926,7 @@ Variables: handwrite-linespace (default 12) ;;;*** ;;;### (autoloads (hanoi-unix-64 hanoi-unix hanoi) "hanoi" "play/hanoi.el" -;;;;;; (17742 40275)) +;;;;;; (17754 24255)) ;;; Generated autoloads from play/hanoi.el (autoload (quote hanoi) "hanoi" "\ @@ -12882,7 +12956,7 @@ to be updated. ;;;### (autoloads (scan-buf-previous-region scan-buf-next-region ;;;;;; scan-buf-move-to-region help-at-pt-display-when-idle help-at-pt-set-timer ;;;;;; help-at-pt-cancel-timer display-local-help help-at-pt-kbd-string -;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (17842 58279)) +;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (18104 24737)) ;;; Generated autoloads from help-at-pt.el (autoload (quote help-at-pt-string) "help-at-pt" "\ @@ -13012,7 +13086,7 @@ different regions. With numeric argument ARG, behaves like ;;;### (autoloads (describe-categories describe-syntax describe-variable ;;;;;; variable-at-point describe-function-1 describe-simplify-lib-file-name ;;;;;; help-C-file-name describe-function) "help-fns" "help-fns.el" -;;;;;; (17845 46651)) +;;;;;; (18104 24737)) ;;; Generated autoloads from help-fns.el (autoload (quote describe-function) "help-fns" "\ @@ -13046,10 +13120,11 @@ If ANY-SYMBOL is non-nil, don't insist the symbol be bound. (autoload (quote describe-variable) "help-fns" "\ Display the full documentation of VARIABLE (a symbol). Returns the documentation as a string, also. -If VARIABLE has a buffer-local value in BUFFER (default to the current buffer), +If VARIABLE has a buffer-local value in BUFFER or FRAME +\(default to the current buffer and current frame), it is displayed along with the global value. -\(fn VARIABLE &optional BUFFER)" t nil) +\(fn VARIABLE &optional BUFFER FRAME)" t nil) (autoload (quote describe-syntax) "help-fns" "\ Describe the syntax specifications in the syntax table of BUFFER. @@ -13069,7 +13144,7 @@ BUFFER should be a buffer or a buffer name. ;;;*** ;;;### (autoloads (three-step-help) "help-macro" "help-macro.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24737)) ;;; Generated autoloads from help-macro.el (defvar three-step-help nil "\ @@ -13085,7 +13160,7 @@ A value of nil means skip the middle step, so that ;;;### (autoloads (help-xref-on-pp help-insert-xref-button help-xref-button ;;;;;; help-make-xrefs help-setup-xref help-mode-finish help-mode-setup -;;;;;; help-mode) "help-mode" "help-mode.el" (17842 58279)) +;;;;;; help-mode) "help-mode" "help-mode.el" (18104 24737)) ;;; Generated autoloads from help-mode.el (autoload (quote help-mode) "help-mode" "\ @@ -13168,7 +13243,7 @@ Add xrefs for symbols in `pp's output between FROM and TO. ;;;*** ;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" -;;;;;; "emacs-lisp/helper.el" (17842 54152)) +;;;;;; "emacs-lisp/helper.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/helper.el (autoload (quote Helper-describe-bindings) "helper" "\ @@ -13184,7 +13259,7 @@ Provide help for current mode. ;;;*** ;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" -;;;;;; "hexl.el" (17844 53657)) +;;;;;; "hexl.el" (18104 24737)) ;;; Generated autoloads from hexl.el (autoload (quote hexl-mode) "hexl" "\ @@ -13281,7 +13356,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" -;;;;;; (17992 30877)) +;;;;;; (18104 24737)) ;;; Generated autoloads from hi-lock.el (autoload (quote hi-lock-mode) "hi-lock" "\ @@ -13411,7 +13486,7 @@ be found in variable `hi-lock-interactive-patterns'. ;;;*** ;;;### (autoloads (hide-ifdef-lines hide-ifdef-read-only hide-ifdef-initially -;;;;;; hide-ifdef-mode) "hideif" "progmodes/hideif.el" (17842 56333)) +;;;;;; hide-ifdef-mode) "hideif" "progmodes/hideif.el" (18104 24766)) ;;; Generated autoloads from progmodes/hideif.el (autoload (quote hide-ifdef-mode) "hideif" "\ @@ -13466,7 +13541,7 @@ how the hiding is done: ;;;*** ;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el" -;;;;;; (17934 43341)) +;;;;;; (18104 24766)) ;;; Generated autoloads from progmodes/hideshow.el (defvar hs-special-modes-alist (quote ((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning))) "\ @@ -13529,7 +13604,7 @@ Unconditionally turn off `hs-minor-mode'. ;;;;;; highlight-compare-buffers highlight-changes-rotate-faces ;;;;;; highlight-changes-previous-change highlight-changes-next-change ;;;;;; highlight-changes-mode highlight-changes-remove-highlight) -;;;;;; "hilit-chg" "hilit-chg.el" (17842 58279)) +;;;;;; "hilit-chg" "hilit-chg.el" (18104 24737)) ;;; Generated autoloads from hilit-chg.el (autoload (quote highlight-changes-remove-highlight) "hilit-chg" "\ @@ -13659,7 +13734,7 @@ variable `highlight-changes-global-changes-existing-buffers' is non-nil). ;;;;;; hippie-expand-ignore-buffers hippie-expand-max-buffers hippie-expand-no-restriction ;;;;;; hippie-expand-dabbrev-as-symbol hippie-expand-dabbrev-skip-space ;;;;;; hippie-expand-verbose hippie-expand-try-functions-list) "hippie-exp" -;;;;;; "hippie-exp.el" (17842 58279)) +;;;;;; "hippie-exp.el" (18104 24737)) ;;; Generated autoloads from hippie-exp.el (defvar hippie-expand-try-functions-list (quote (try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol)) "\ @@ -13732,7 +13807,7 @@ argument VERBOSE non-nil makes the function verbose. ;;;*** ;;;### (autoloads (global-hl-line-mode hl-line-mode) "hl-line" "hl-line.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24737)) ;;; Generated autoloads from hl-line.el (autoload (quote hl-line-mode) "hl-line" "\ @@ -13773,7 +13848,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and ;;;*** ;;;### (autoloads (list-holidays holidays) "holidays" "calendar/holidays.el" -;;;;;; (17956 13479)) +;;;;;; (18104 24745)) ;;; Generated autoloads from calendar/holidays.el (autoload (quote holidays) "holidays" "\ @@ -13809,8 +13884,8 @@ The optional LABEL is used to label the buffer created. ;;;*** -;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (17842 -;;;;;; 54741)) +;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (18104 +;;;;;; 24751)) ;;; Generated autoloads from gnus/html2text.el (autoload (quote html2text) "html2text" "\ @@ -13842,7 +13917,7 @@ Convert HTML to plain text in the current buffer. ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (17842 58279)) +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (18104 24737)) ;;; Generated autoloads from ibuf-ext.el (autoload (quote ibuffer-auto-mode) "ibuf-ext" "\ @@ -14179,7 +14254,7 @@ Mark buffers whose associated file is compressed. \(fn)" t nil) (autoload (quote ibuffer-mark-old-buffers) "ibuf-ext" "\ -Mark buffers which have not been viewed in `ibuffer-old-time' days. +Mark buffers which have not been viewed in `ibuffer-old-time' hours. \(fn)" t nil) @@ -14208,8 +14283,8 @@ defaults to one. ;;;*** ;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter -;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (17842 -;;;;;; 58279)) +;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from ibuf-macs.el (autoload (quote define-ibuffer-column) "ibuf-macs" "\ @@ -14298,7 +14373,7 @@ bound to the current value of the filter. ;;;*** ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) -;;;;;; "ibuffer" "ibuffer.el" (17842 58279)) +;;;;;; "ibuffer" "ibuffer.el" (18104 24737)) ;;; Generated autoloads from ibuffer.el (autoload (quote ibuffer-list-buffers) "ibuffer" "\ @@ -14339,7 +14414,7 @@ FORMATS is the value to use for `ibuffer-formats'. ;;;### (autoloads (icalendar-import-buffer icalendar-import-file ;;;;;; icalendar-export-region icalendar-export-file) "icalendar" -;;;;;; "calendar/icalendar.el" (17921 16827)) +;;;;;; "calendar/icalendar.el" (18104 24745)) ;;; Generated autoloads from calendar/icalendar.el (autoload (quote icalendar-export-file) "icalendar" "\ @@ -14391,8 +14466,8 @@ buffer `*icalendar-errors*'. ;;;*** -;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (17907 -;;;;;; 1407)) +;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from icomplete.el (defvar icomplete-mode nil "\ @@ -14412,7 +14487,7 @@ With a numeric argument, turn Icomplete mode on iff ARG is positive. ;;;*** -;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (17842 56333)) +;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (18104 24766)) ;;; Generated autoloads from progmodes/icon.el (autoload (quote icon-mode) "icon" "\ @@ -14453,7 +14528,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el" -;;;;;; (17965 23638)) +;;;;;; (18104 24767)) ;;; Generated autoloads from progmodes/idlw-shell.el (autoload (quote idlwave-shell) "idlw-shell" "\ @@ -14479,7 +14554,7 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24767)) ;;; Generated autoloads from progmodes/idlwave.el (autoload (quote idlwave-mode) "idlwave" "\ @@ -14614,8 +14689,8 @@ The main features of this mode are ;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file ;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer ;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window -;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17963 -;;;;;; 25911)) +;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -14876,7 +14951,7 @@ DEF, if non-nil, is the default value. ;;;*** -;;;### (autoloads (ielm) "ielm" "ielm.el" (17842 58279)) +;;;### (autoloads (ielm) "ielm" "ielm.el" (18104 24737)) ;;; Generated autoloads from ielm.el (add-hook 'same-window-buffer-names "*ielm*") @@ -14889,7 +14964,7 @@ Switches to the buffer `*ielm*', or creates it if it does not exist. ;;;*** ;;;### (autoloads (iimage-mode turn-on-iimage-mode) "iimage" "iimage.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24737)) ;;; Generated autoloads from iimage.el (autoload (quote turn-on-iimage-mode) "iimage" "\ @@ -14908,7 +14983,7 @@ Toggle inline image minor mode. ;;;;;; insert-image put-image 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" (17868 42568)) +;;;;;; "image" "image.el" (18104 24737)) ;;; Generated autoloads from image.el (autoload (quote image-type-from-data) "image" "\ @@ -14941,14 +15016,14 @@ be determined. (autoload (quote image-type) "image" "\ Determine and return image type. -FILE-OR-DATA is an image file name or image data. +SOURCE is an image file name or image data. Optional TYPE is a symbol describing the image type. If TYPE is omitted or nil, try to determine the image type from its first few bytes -of image data. If that doesn't work, and FILE-OR-DATA is a file name, +of image data. If that doesn't work, and SOURCE is a file name, use its file extension as image type. -Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. +Optional DATA-P non-nil means SOURCE is a string containing image data. -\(fn FILE-OR-DATA &optional TYPE DATA-P)" nil nil) +\(fn SOURCE &optional TYPE DATA-P)" nil nil) (autoload (quote image-type-available-p) "image" "\ Return non-nil if image type TYPE is available. @@ -14958,15 +15033,11 @@ Image types are symbols like `xbm' or `jpeg'. (autoload (quote image-type-auto-detected-p) "image" "\ Return t iff the current buffer contains an auto-detectable image. -This function is intended to be used from `magic-mode-alist' (which see). +This function is intended to be used from `magic-fallback-mode-alist'. -First, compare the beginning of the buffer with `image-type-header-regexps'. -If an appropriate image type is found, check if that image type can be -autodetected using the variable `image-type-auto-detectable'. Finally, -if `buffer-file-name' is non-nil, check if it matches another major mode -in `auto-mode-alist' apart from `image-mode'; if there is another match, -the autodetection is considered to have failed. Return t if all the above -steps succeed. +The buffer is considered to contain an auto-detectable image if +its beginning matches an image type in `image-type-header-regexps', +and that image type is present in `image-type-auto-detectable'. \(fn)" nil nil) @@ -15089,7 +15160,7 @@ Example: ;;;;;; image-dired-jump-thumbnail-buffer image-dired-delete-tag ;;;;;; image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs ;;;;;; image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs) -;;;;;; "image-dired" "image-dired.el" (17992 30877)) +;;;;;; "image-dired" "image-dired.el" (18104 24737)) ;;; Generated autoloads from image-dired.el (autoload (quote image-dired-dired-insert-marked-thumbs) "image-dired" "\ @@ -15223,7 +15294,7 @@ easy-to-use form. ;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp ;;;;;; image-file-name-regexps image-file-name-extensions) "image-file" -;;;;;; "image-file.el" (17842 58279)) +;;;;;; "image-file.el" (18104 24737)) ;;; Generated autoloads from image-file.el (defvar image-file-name-extensions (quote ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm")) "\ @@ -15285,7 +15356,7 @@ Image files are those whose name has an extension in ;;;*** ;;;### (autoloads (image-mode-maybe image-minor-mode image-mode) -;;;;;; "image-mode" "image-mode.el" (17868 42581)) +;;;;;; "image-mode" "image-mode.el" (18104 24737)) ;;; Generated autoloads from image-mode.el (push '("\\.jpe?g\\'" . image-mode) auto-mode-alist) (push '("\\.png\\'" . image-mode) auto-mode-alist) @@ -15323,7 +15394,7 @@ information on these modes. ;;;*** ;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar -;;;;;; imenu-sort-function) "imenu" "imenu.el" (17842 58279)) +;;;;;; imenu-sort-function) "imenu" "imenu.el" (18104 24737)) ;;; Generated autoloads from imenu.el (defvar imenu-sort-function nil "\ @@ -15438,7 +15509,7 @@ for more information. ;;;### (autoloads (indian-char-glyph indian-glyph-char in-is13194-pre-write-conversion ;;;;;; in-is13194-post-read-conversion indian-compose-string indian-compose-region) -;;;;;; "ind-util" "language/ind-util.el" (17842 58278)) +;;;;;; "ind-util" "language/ind-util.el" (18104 24757)) ;;; Generated autoloads from language/ind-util.el (autoload (quote indian-compose-region) "ind-util" "\ @@ -15481,7 +15552,7 @@ See also the function `indian-glyph-char'. ;;;### (autoloads (inferior-lisp inferior-lisp-prompt inferior-lisp-load-command ;;;;;; inferior-lisp-program inferior-lisp-filter-regexp) "inf-lisp" -;;;;;; "progmodes/inf-lisp.el" (17842 56332)) +;;;;;; "progmodes/inf-lisp.el" (18104 24767)) ;;; Generated autoloads from progmodes/inf-lisp.el (defvar inferior-lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "\ @@ -15548,7 +15619,7 @@ of `inferior-lisp-program'). Runs the hooks from ;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node ;;;;;; Info-goto-emacs-command-node Info-mode info-apropos Info-index ;;;;;; Info-directory Info-on-current-buffer info-standalone info-emacs-manual -;;;;;; info info-other-window) "info" "info.el" (18006 55795)) +;;;;;; info info-other-window) "info" "info.el" (18104 24737)) ;;; Generated autoloads from info.el (autoload (quote info-other-window) "info" "\ @@ -15714,7 +15785,7 @@ This will add a speedbar major display mode. ;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file ;;;;;; info-lookup-symbol info-lookup-reset) "info-look" "info-look.el" -;;;;;; (17878 61008)) +;;;;;; (18104 24737)) ;;; Generated autoloads from info-look.el (autoload (quote info-lookup-reset) "info-look" "\ @@ -15762,7 +15833,7 @@ Perform completion on file preceding point. ;;;*** ;;;### (autoloads (info-xref-check-all-custom info-xref-check-all -;;;;;; info-xref-check) "info-xref" "info-xref.el" (17842 58279)) +;;;;;; info-xref-check) "info-xref" "info-xref.el" (18104 24737)) ;;; Generated autoloads from info-xref.el (autoload (quote info-xref-check) "info-xref" "\ @@ -15789,7 +15860,7 @@ quite a while. ;;;*** ;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) -;;;;;; "informat" "informat.el" (17842 58279)) +;;;;;; "informat" "informat.el" (18104 24737)) ;;; Generated autoloads from informat.el (autoload (quote Info-tagify) "informat" "\ @@ -15830,7 +15901,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method ;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el" -;;;;;; (17903 2305)) +;;;;;; (18104 24756)) ;;; Generated autoloads from international/isearch-x.el (autoload (quote isearch-toggle-specified-input-method) "isearch-x" "\ @@ -15850,8 +15921,8 @@ Not documented ;;;*** -;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (17918 -;;;;;; 44913)) +;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from isearchb.el (autoload (quote isearchb-activate) "isearchb" "\ @@ -15864,10 +15935,41 @@ accessed via isearchb. ;;;*** +;;;### (autoloads (iso-accents-mode) "iso-acc" "obsolete/iso-acc.el" +;;;;;; (18104 24760)) +;;; Generated autoloads from obsolete/iso-acc.el + +(autoload (quote iso-accents-mode) "iso-acc" "\ +Toggle ISO Accents mode, in which accents modify the following letter. +This permits easy insertion of accented characters according to ISO-8859-1. +When Iso-accents mode is enabled, accent character keys +\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following +letter key so that it inserts an ISO accented letter. + +You can customize ISO Accents mode to a particular language +with the command `iso-accents-customize'. + +Special combinations: ~c gives a c with cedilla, +~d gives an Icelandic eth (d with dash). +~t gives an Icelandic thorn. +\"s gives German sharp s. +/a gives a with ring. +/e gives an a-e ligature. +~< and ~> give guillemots. +~! gives an inverted exclamation mark. +~? gives an inverted question mark. + +With an argument, a positive argument enables ISO Accents mode, +and a negative argument disables it. + +\(fn &optional ARG)" t nil) + +;;;*** + ;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only ;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso ;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt" -;;;;;; "international/iso-cvt.el" (17992 30878)) +;;;;;; "international/iso-cvt.el" (18104 24756)) ;;; Generated autoloads from international/iso-cvt.el (autoload (quote iso-spanish) "iso-cvt" "\ @@ -15951,7 +16053,7 @@ Add submenus to the File menu, to convert to and from various formats. ;;;*** ;;;### (autoloads nil "iso-transl" "international/iso-transl.el" -;;;;;; (17842 54888)) +;;;;;; (18104 24756)) ;;; Generated autoloads from international/iso-transl.el (or key-translation-map (setq key-translation-map (make-sparse-keymap))) (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) @@ -15964,7 +16066,7 @@ Add submenus to the File menu, to convert to and from various formats. ;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell ;;;;;; ispell-help ispell-pdict-save ispell-word ispell-local-dictionary-alist ;;;;;; ispell-personal-dictionary) "ispell" "textmodes/ispell.el" -;;;;;; (18006 55797)) +;;;;;; (18104 24771)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@ -16251,8 +16353,8 @@ You can bind this to the key C-c i in GNUS or mail by adding to ;;;*** -;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (17819 -;;;;;; 9451)) +;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from iswitchb.el (defvar iswitchb-mode nil "\ @@ -16277,7 +16379,7 @@ This mode enables switching between buffers using substrings. See ;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region ;;;;;; japanese-hiragana-region japanese-katakana-region japanese-zenkaku ;;;;;; japanese-hankaku japanese-hiragana japanese-katakana setup-japanese-environment-internal) -;;;;;; "japan-util" "language/japan-util.el" (17842 58278)) +;;;;;; "japan-util" "language/japan-util.el" (18104 24757)) ;;; Generated autoloads from language/japan-util.el (autoload (quote setup-japanese-environment-internal) "japan-util" "\ @@ -16355,7 +16457,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading. ;;;*** ;;;### (autoloads (jka-compr-uninstall jka-compr-handler) "jka-compr" -;;;;;; "jka-compr.el" (17853 24893)) +;;;;;; "jka-compr.el" (18104 24737)) ;;; Generated autoloads from jka-compr.el (defvar jka-compr-inhibit nil "\ @@ -16380,7 +16482,7 @@ by `jka-compr-installed'. ;;;### (autoloads (keypad-setup keypad-numlock-shifted-setup keypad-shifted-setup ;;;;;; keypad-numlock-setup keypad-setup) "keypad" "emulation/keypad.el" -;;;;;; (17833 41203)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/keypad.el (defvar keypad-setup nil "\ @@ -16436,7 +16538,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.' ;;;*** ;;;### (autoloads (kinsoku) "kinsoku" "international/kinsoku.el" -;;;;;; (17842 54888)) +;;;;;; (18104 24756)) ;;; Generated autoloads from international/kinsoku.el (autoload (quote kinsoku) "kinsoku" "\ @@ -16457,8 +16559,8 @@ the context of text formatting. ;;;*** -;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (17842 -;;;;;; 54888)) +;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (18104 +;;;;;; 24757)) ;;; Generated autoloads from international/kkc.el (defvar kkc-after-update-conversion-functions nil "\ @@ -16483,7 +16585,7 @@ and the return value is the length of the conversion. ;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro ;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter ;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro) "kmacro" -;;;;;; "kmacro.el" (17833 41350)) +;;;;;; "kmacro.el" (18104 24737)) ;;; Generated autoloads from kmacro.el (global-set-key "\C-x(" 'kmacro-start-macro) (global-set-key "\C-x)" 'kmacro-end-macro) @@ -16590,7 +16692,7 @@ If kbd macro currently being defined end it before activating it. ;;;### (autoloads (kannada-post-read-conversion kannada-compose-string ;;;;;; kannada-compose-region) "knd-util" "language/knd-util.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24757)) ;;; Generated autoloads from language/knd-util.el (defconst kannada-consonant "[\x51f75-\x51fb9]") @@ -16613,7 +16715,7 @@ Not documented ;;;*** ;;;### (autoloads (setup-korean-environment-internal) "korea-util" -;;;;;; "language/korea-util.el" (17842 58278)) +;;;;;; "language/korea-util.el" (18104 24757)) ;;; Generated autoloads from language/korea-util.el (defvar default-korean-keyboard (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "") "\ @@ -16628,7 +16730,7 @@ Not documented ;;;*** ;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" -;;;;;; (17941 38806)) +;;;;;; (18104 24762)) ;;; Generated autoloads from play/landmark.el (defalias (quote landmark-repeat) (quote lm-test-run)) @@ -16662,8 +16764,8 @@ Use \\[describe-mode] for more info. ;;;### (autoloads (lao-compose-region lao-composition-function lao-post-read-conversion ;;;;;; lao-transcribe-roman-to-lao-string lao-transcribe-single-roman-syllable-to-lao -;;;;;; lao-compose-string) "lao-util" "language/lao-util.el" (17842 -;;;;;; 58278)) +;;;;;; lao-compose-string) "lao-util" "language/lao-util.el" (18104 +;;;;;; 24757)) ;;; Generated autoloads from language/lao-util.el (autoload (quote lao-compose-string) "lao-util" "\ @@ -16712,7 +16814,7 @@ Not documented ;;;### (autoloads (latexenc-find-file-coding-system latexenc-coding-system-to-inputenc ;;;;;; latexenc-inputenc-to-coding-system latex-inputenc-coding-alist) -;;;;;; "latexenc" "international/latexenc.el" (17842 54888)) +;;;;;; "latexenc" "international/latexenc.el" (18104 24757)) ;;; Generated autoloads from international/latexenc.el (defvar latex-inputenc-coding-alist (quote (("ansinew" . windows-1252) ("applemac" . mac-roman) ("ascii" . us-ascii) ("cp1250" . windows-1250) ("cp1252" . windows-1252) ("cp1257" . cp1257) ("cp437de" . cp437) ("cp437" . cp437) ("cp850" . cp850) ("cp852" . cp852) ("cp858" . cp858) ("cp865" . cp865) ("latin1" . iso-8859-1) ("latin2" . iso-8859-2) ("latin3" . iso-8859-3) ("latin4" . iso-8859-4) ("latin5" . iso-8859-5) ("latin9" . iso-8859-15) ("next" . next) ("utf8" . utf-8) ("utf8x" . utf-8))) "\ @@ -16744,7 +16846,7 @@ coding system names is determined from `latex-inputenc-coding-alist'. ;;;*** ;;;### (autoloads (latin1-display-ucs-per-lynx latin1-display latin1-display) -;;;;;; "latin1-disp" "international/latin1-disp.el" (17874 62081)) +;;;;;; "latin1-disp" "international/latin1-disp.el" (18104 24757)) ;;; Generated autoloads from international/latin1-disp.el (defvar latin1-display nil "\ @@ -16787,8 +16889,76 @@ use either \\[customize] or the function `latin1-display'.") ;;;*** +;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" +;;;;;; "obsolete/lazy-lock.el" (18104 24760)) +;;; Generated autoloads from obsolete/lazy-lock.el + +(autoload (quote lazy-lock-mode) "lazy-lock" "\ +Toggle Lazy Lock mode. +With arg, turn Lazy Lock mode on if and only if arg is positive. Enable it +automatically in your `~/.emacs' by: + + (setq font-lock-support-mode 'lazy-lock-mode) + +For a newer font-lock support mode with similar functionality, see +`jit-lock-mode'. Eventually, Lazy Lock mode will be deprecated in +JIT Lock's favor. + +When Lazy Lock mode is enabled, fontification can be lazy in a number of ways: + +- Demand-driven buffer fontification if `lazy-lock-minimum-size' is non-nil. + This means initial fontification does not occur if the buffer is greater than + `lazy-lock-minimum-size' characters in length. Instead, fontification occurs + when necessary, such as when scrolling through the buffer would otherwise + reveal unfontified areas. This is useful if buffer fontification is too slow + for large buffers. + +- Deferred scroll fontification if `lazy-lock-defer-on-scrolling' is non-nil. + This means demand-driven fontification does not occur as you scroll. + Instead, fontification is deferred until after `lazy-lock-defer-time' seconds + of Emacs idle time, while Emacs remains idle. This is useful if + fontification is too slow to keep up with scrolling. + +- Deferred on-the-fly fontification if `lazy-lock-defer-on-the-fly' is non-nil. + This means on-the-fly fontification does not occur as you type. Instead, + fontification is deferred until after `lazy-lock-defer-time' seconds of Emacs + idle time, while Emacs remains idle. This is useful if fontification is too + slow to keep up with your typing. + +- Deferred context fontification if `lazy-lock-defer-contextually' is non-nil. + This means fontification updates the buffer corresponding to true syntactic + context, after `lazy-lock-defer-time' seconds of Emacs idle time, while Emacs + remains idle. Otherwise, fontification occurs on modified lines only, and + subsequent lines can remain fontified corresponding to previous syntactic + contexts. This is useful where strings or comments span lines. + +- Stealthy buffer fontification if `lazy-lock-stealth-time' is non-nil. + This means remaining unfontified areas of buffers are fontified if Emacs has + been idle for `lazy-lock-stealth-time' seconds, while Emacs remains idle. + This is useful if any buffer has any deferred fontification. + +Basic Font Lock mode on-the-fly fontification behavior fontifies modified +lines only. Thus, if `lazy-lock-defer-contextually' is non-nil, Lazy Lock mode +on-the-fly fontification may fontify differently, albeit correctly. In any +event, to refontify some lines you can use \\[font-lock-fontify-block]. + +Stealth fontification only occurs while the system remains unloaded. +If the system load rises above `lazy-lock-stealth-load' percent, stealth +fontification is suspended. Stealth fontification intensity is controlled via +the variable `lazy-lock-stealth-nice' and `lazy-lock-stealth-lines', and +verbosity is controlled via the variable `lazy-lock-stealth-verbose'. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-lazy-lock) "lazy-lock" "\ +Unconditionally turn on Lazy Lock mode. + +\(fn)" nil nil) + +;;;*** + ;;;### (autoloads (ld-script-mode) "ld-script" "progmodes/ld-script.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24767)) ;;; Generated autoloads from progmodes/ld-script.el (add-to-list (quote auto-mode-alist) (quote ("\\.ld[si]?\\>" . ld-script-mode))) @@ -16803,7 +16973,7 @@ A major mode to edit GNU ld script files ;;;*** ;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "ledit.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24737)) ;;; Generated autoloads from ledit.el (defconst ledit-save-files t "\ @@ -16838,7 +17008,7 @@ Not documented ;;;*** -;;;### (autoloads (life) "life" "play/life.el" (17842 55395)) +;;;### (autoloads (life) "life" "play/life.el" (18104 24762)) ;;; Generated autoloads from play/life.el (autoload (quote life) "life" "\ @@ -16851,8 +17021,8 @@ generations (this defaults to 1). ;;;*** -;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (17942 -;;;;;; 63381)) +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (18104 +;;;;;; 24737)) ;;; Generated autoloads from loadhist.el (autoload (quote unload-feature) "loadhist" "\ @@ -16875,7 +17045,7 @@ such as redefining an Emacs function. ;;;*** ;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches) -;;;;;; "locate" "locate.el" (17992 30877)) +;;;;;; "locate" "locate.el" (18104 24737)) ;;; Generated autoloads from locate.el (defvar locate-ls-subdir-switches "-al" "\ @@ -16926,7 +17096,7 @@ except that FILTER is not optional. ;;;*** -;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (18010 5298)) +;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (18104 24738)) ;;; Generated autoloads from log-edit.el (autoload (quote log-edit) "log-edit" "\ @@ -16947,8 +17117,8 @@ If BUFFER is non-nil `log-edit' will jump to that buffer, use it to edit the ;;;*** -;;;### (autoloads (log-view-mode) "log-view" "log-view.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (log-view-mode) "log-view" "log-view.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from log-view.el (autoload (quote log-view-mode) "log-view" "\ @@ -16958,8 +17128,8 @@ Major mode for browsing CVS log output. ;;;*** -;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (17992 -;;;;;; 30877)) +;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from longlines.el (autoload (quote longlines-mode) "longlines" "\ @@ -16980,8 +17150,8 @@ are indicated with a symbol. ;;;*** ;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer -;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (17842 -;;;;;; 58279)) +;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from lpr.el (defvar lpr-windows-system (memq system-type (quote (emx win32 w32 mswindows ms-dos windows-nt)))) @@ -17075,7 +17245,7 @@ for further customization of the printer command. ;;;*** ;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el" -;;;;;; (18006 55796)) +;;;;;; (18104 24738)) ;;; Generated autoloads from ls-lisp.el (defvar ls-lisp-support-shell-wildcards t "\ @@ -17086,8 +17256,8 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).") ;;;*** -;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (17956 -;;;;;; 13479)) +;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (18104 +;;;;;; 24745)) ;;; Generated autoloads from calendar/lunar.el (autoload (quote phases-of-moon) "lunar" "\ @@ -17100,8 +17270,8 @@ This function is suitable for execution in a .emacs file. ;;;*** -;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (17923 -;;;;;; 63540)) +;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (18104 +;;;;;; 24767)) ;;; Generated autoloads from progmodes/m4-mode.el (autoload (quote m4-mode) "m4-mode" "\ @@ -17113,7 +17283,7 @@ A major mode to edit m4 macro files. ;;;*** ;;;### (autoloads (macroexpand-all) "macroexp" "emacs-lisp/macroexp.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/macroexp.el (autoload (quote macroexpand-all) "macroexp" "\ @@ -17127,7 +17297,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. ;;;*** ;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro -;;;;;; name-last-kbd-macro) "macros" "macros.el" (17842 58279)) +;;;;;; name-last-kbd-macro) "macros" "macros.el" (18104 24738)) ;;; Generated autoloads from macros.el (autoload (quote name-last-kbd-macro) "macros" "\ @@ -17216,7 +17386,7 @@ and then select the region of un-tablified names and use ;;;*** ;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" -;;;;;; "mail/mail-extr.el" (17842 55035)) +;;;;;; "mail/mail-extr.el" (18104 24758)) ;;; Generated autoloads from mail/mail-extr.el (autoload (quote mail-extract-address-components) "mail-extr" "\ @@ -17248,7 +17418,7 @@ Convert mail domain DOMAIN to the country it corresponds to. ;;;### (autoloads (mail-hist-put-headers-into-history mail-hist-keep-history ;;;;;; mail-hist-enable mail-hist-define-keys) "mail-hist" "mail/mail-hist.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/mail-hist.el (autoload (quote mail-hist-define-keys) "mail-hist" "\ @@ -17279,8 +17449,8 @@ This function normally would be called when the message is sent. ;;;### (autoloads (mail-fetch-field mail-unquote-printable-region ;;;;;; mail-unquote-printable mail-quote-printable mail-file-babyl-p -;;;;;; mail-use-rfc822) "mail-utils" "mail/mail-utils.el" (17842 -;;;;;; 55035)) +;;;;;; mail-use-rfc822) "mail-utils" "mail/mail-utils.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from mail/mail-utils.el (defvar mail-use-rfc822 nil "\ @@ -17332,7 +17502,7 @@ If 4th arg LIST is non-nil, return a list of all such fields. ;;;*** ;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup) -;;;;;; "mailabbrev" "mail/mailabbrev.el" (17992 30878)) +;;;;;; "mailabbrev" "mail/mailabbrev.el" (18104 24758)) ;;; Generated autoloads from mail/mailabbrev.el (autoload (quote mail-abbrevs-setup) "mailabbrev" "\ @@ -17355,8 +17525,8 @@ If DEFINITION contains multiple addresses, separate them with commas. ;;;*** ;;;### (autoloads (mail-complete define-mail-alias expand-mail-aliases -;;;;;; mail-complete-style) "mailalias" "mail/mailalias.el" (17842 -;;;;;; 55035)) +;;;;;; mail-complete-style) "mailalias" "mail/mailalias.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from mail/mailalias.el (defvar mail-complete-style (quote angles) "\ @@ -17402,7 +17572,7 @@ current header, calls `mail-complete-function' and passes prefix arg if any. ;;;*** ;;;### (autoloads (mailclient-send-it) "mailclient" "mail/mailclient.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/mailclient.el (autoload (quote mailclient-send-it) "mailclient" "\ @@ -17416,7 +17586,7 @@ The mail client is taken to be the handler of mailto URLs. ;;;### (autoloads (makefile-imake-mode makefile-bsdmake-mode makefile-makepp-mode ;;;;;; makefile-gmake-mode makefile-automake-mode makefile-mode) -;;;;;; "make-mode" "progmodes/make-mode.el" (17842 56332)) +;;;;;; "make-mode" "progmodes/make-mode.el" (18104 24767)) ;;; Generated autoloads from progmodes/make-mode.el (autoload (quote makefile-mode) "make-mode" "\ @@ -17533,8 +17703,8 @@ An adapted `makefile-mode' that knows about imake. ;;;*** -;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from makesum.el (autoload (quote make-command-summary) "makesum" "\ @@ -17545,7 +17715,7 @@ Previous contents of that buffer are killed first. ;;;*** -;;;### (autoloads (man-follow man) "man" "man.el" (17992 30877)) +;;;### (autoloads (man-follow man) "man" "man.el" (18104 24738)) ;;; Generated autoloads from man.el (defalias (quote manual-entry) (quote man)) @@ -17572,7 +17742,7 @@ Get a Un*x manual page of the item under point and put it in a buffer. ;;;*** -;;;### (autoloads (master-mode) "master" "master.el" (17842 58279)) +;;;### (autoloads (master-mode) "master" "master.el" (18104 24738)) ;;; Generated autoloads from master.el (autoload (quote master-mode) "master" "\ @@ -17594,8 +17764,34 @@ yourself the value of `master-of' by calling `master-show-slave'. ;;;*** -;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (17942 -;;;;;; 63381)) +;;;### (autoloads (minibuffer-indicate-depth-mode) "mb-depth" "mb-depth.el" +;;;;;; (18104 24738)) +;;; Generated autoloads from mb-depth.el + +(defvar minibuffer-indicate-depth-mode nil "\ +Non-nil if Minibuffer-Indicate-Depth mode is enabled. +See the command `minibuffer-indicate-depth-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `minibuffer-indicate-depth-mode'.") + +(custom-autoload (quote minibuffer-indicate-depth-mode) "mb-depth" nil) + +(autoload (quote minibuffer-indicate-depth-mode) "mb-depth" "\ +Toggle Minibuffer Indicate Depth mode. +When active, any recursive use of the minibuffer will show +the recursion depth in the minibuffer prompt. This is only +useful if `enable-recursive-minibuffers' is non-nil. + +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from menu-bar.el (put (quote menu-bar-mode) (quote standard-value) (quote (t))) @@ -17630,7 +17826,7 @@ turn on menu bars; otherwise, turn off menu bars. ;;;;;; message-cite-function message-yank-prefix message-citation-line-function ;;;;;; message-send-mail-function message-user-organization-file ;;;;;; message-signature-separator message-from-style) "message" -;;;;;; "gnus/message.el" (18010 19867)) +;;;;;; "gnus/message.el" (18104 24751)) ;;; Generated autoloads from gnus/message.el (defvar message-from-style (quote default) "\ @@ -17886,7 +18082,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24767)) ;;; Generated autoloads from progmodes/meta-mode.el (autoload (quote metafont-mode) "meta-mode" "\ @@ -17913,7 +18109,7 @@ Turning on MetaPost mode calls the value of the variable ;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body ;;;;;; metamail-interpret-header) "metamail" "mail/metamail.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/metamail.el (autoload (quote metamail-interpret-header) "metamail" "\ @@ -17958,7 +18154,7 @@ redisplayed as output is inserted. ;;;### (autoloads (mh-fully-kill-draft mh-send-letter mh-user-agent-compose ;;;;;; mh-smail-batch mh-smail-other-window mh-smail) "mh-comp" -;;;;;; "mh-e/mh-comp.el" (17842 55144)) +;;;;;; "mh-e/mh-comp.el" (18104 24759)) ;;; Generated autoloads from mh-e/mh-comp.el (autoload (quote mh-smail) "mh-comp" "\ @@ -18045,7 +18241,7 @@ delete the draft message. ;;;*** -;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (17842 55144)) +;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (18104 24759)) ;;; Generated autoloads from mh-e/mh-e.el (put (quote mh-progs) (quote risky-local-variable) t) @@ -18062,7 +18258,7 @@ Display version information about MH-E and the MH mail handling system. ;;;*** ;;;### (autoloads (mh-folder-mode mh-nmail mh-rmail) "mh-folder" -;;;;;; "mh-e/mh-folder.el" (17842 55144)) +;;;;;; "mh-e/mh-folder.el" (18104 24759)) ;;; Generated autoloads from mh-e/mh-folder.el (autoload (quote mh-rmail) "mh-folder" "\ @@ -18144,7 +18340,7 @@ perform the operation on all messages in that region. ;;;*** ;;;### (autoloads (midnight-delay-set clean-buffer-list) "midnight" -;;;;;; "midnight.el" (17842 58279)) +;;;;;; "midnight.el" (18104 24738)) ;;; Generated autoloads from midnight.el (autoload (quote clean-buffer-list) "midnight" "\ @@ -18171,7 +18367,7 @@ to its second argument TM. ;;;*** ;;;### (autoloads (minibuffer-electric-default-mode) "minibuf-eldef" -;;;;;; "minibuf-eldef.el" (17842 58279)) +;;;;;; "minibuf-eldef.el" (18104 24738)) ;;; Generated autoloads from minibuf-eldef.el (defvar minibuffer-electric-default-mode nil "\ @@ -18199,7 +18395,7 @@ Returns non-nil if the new state is enabled. ;;;*** ;;;### (autoloads (mixal-mode) "mixal-mode" "progmodes/mixal-mode.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/mixal-mode.el (autoload (quote mixal-mode) "mixal-mode" "\ @@ -18214,7 +18410,7 @@ Major mode for the mixal asm language. ;;;### (autoloads (malayalam-composition-function malayalam-post-read-conversion ;;;;;; malayalam-compose-region) "mlm-util" "language/mlm-util.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24758)) ;;; Generated autoloads from language/mlm-util.el (autoload (quote malayalam-compose-region) "mlm-util" "\ @@ -18237,7 +18433,7 @@ PATTERN regexp. ;;;*** ;;;### (autoloads (mm-inline-external-body mm-extern-cache-contents) -;;;;;; "mm-extern" "gnus/mm-extern.el" (17842 54741)) +;;;;;; "mm-extern" "gnus/mm-extern.el" (18104 24752)) ;;; Generated autoloads from gnus/mm-extern.el (autoload (quote mm-extern-cache-contents) "mm-extern" "\ @@ -18256,7 +18452,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** ;;;### (autoloads (mm-inline-partial) "mm-partial" "gnus/mm-partial.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24752)) ;;; Generated autoloads from gnus/mm-partial.el (autoload (quote mm-inline-partial) "mm-partial" "\ @@ -18270,7 +18466,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** ;;;### (autoloads (mm-url-insert-file-contents-external mm-url-insert-file-contents) -;;;;;; "mm-url" "gnus/mm-url.el" (17842 54741)) +;;;;;; "mm-url" "gnus/mm-url.el" (18104 24752)) ;;; Generated autoloads from gnus/mm-url.el (autoload (quote mm-url-insert-file-contents) "mm-url" "\ @@ -18287,7 +18483,7 @@ Insert file contents of URL using `mm-url-program'. ;;;*** ;;;### (autoloads (mm-uu-dissect-text-parts mm-uu-dissect) "mm-uu" -;;;;;; "gnus/mm-uu.el" (17842 54741)) +;;;;;; "gnus/mm-uu.el" (18104 24752)) ;;; Generated autoloads from gnus/mm-uu.el (autoload (quote mm-uu-dissect) "mm-uu" "\ @@ -18307,7 +18503,7 @@ Assume text has been decoded if DECODED is non-nil. ;;;*** ;;;### (autoloads (mml1991-sign mml1991-encrypt) "mml1991" "gnus/mml1991.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24752)) ;;; Generated autoloads from gnus/mml1991.el (autoload (quote mml1991-encrypt) "mml1991" "\ @@ -18324,7 +18520,7 @@ Not documented ;;;### (autoloads (mml2015-self-encrypt mml2015-sign mml2015-encrypt ;;;;;; mml2015-verify-test mml2015-verify mml2015-decrypt-test mml2015-decrypt) -;;;;;; "mml2015" "gnus/mml2015.el" (17842 54741)) +;;;;;; "mml2015" "gnus/mml2015.el" (18104 24752)) ;;; Generated autoloads from gnus/mml2015.el (autoload (quote mml2015-decrypt) "mml2015" "\ @@ -18365,7 +18561,7 @@ Not documented ;;;*** ;;;### (autoloads (modula-2-mode) "modula2" "progmodes/modula2.el" -;;;;;; (17276 13069)) +;;;;;; (17279 21317)) ;;; Generated autoloads from progmodes/modula2.el (autoload (quote modula-2-mode) "modula2" "\ @@ -18397,7 +18593,7 @@ followed by the first character of the construct. ;;;*** ;;;### (autoloads (unmorse-region morse-region) "morse" "play/morse.el" -;;;;;; (17842 55395)) +;;;;;; (18104 24762)) ;;; Generated autoloads from play/morse.el (autoload (quote morse-region) "morse" "\ @@ -18412,8 +18608,8 @@ Convert morse coded text in region to ordinary ASCII text. ;;;*** -;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from mouse-sel.el (defvar mouse-sel-mode nil "\ @@ -18465,7 +18661,7 @@ primary selection and region. ;;;*** -;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (17862 6157)) +;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (18104 24762)) ;;; Generated autoloads from play/mpuz.el (autoload (quote mpuz) "mpuz" "\ @@ -18475,7 +18671,7 @@ Multiplication puzzle with GNU Emacs. ;;;*** -;;;### (autoloads (msb-mode) "msb" "msb.el" (18006 55796)) +;;;### (autoloads (msb-mode) "msb" "msb.el" (18104 24738)) ;;; Generated autoloads from msb.el (defvar msb-mode nil "\ @@ -18502,7 +18698,7 @@ different buffer menu using the function `msb'. ;;;;;; describe-current-coding-system describe-current-coding-system-briefly ;;;;;; describe-coding-system describe-character-set list-charset-chars ;;;;;; read-charset list-character-sets) "mule-diag" "international/mule-diag.el" -;;;;;; (17842 54888)) +;;;;;; (18104 24757)) ;;; Generated autoloads from international/mule-diag.el (defvar non-iso-charset-alist (\` ((mac-roman (ascii latin-iso8859-1 mule-unicode-2500-33ff mule-unicode-0100-24ff mule-unicode-e000-ffff) mac-roman-decoder ((0 255))) (viscii (ascii vietnamese-viscii-lower vietnamese-viscii-upper) viet-viscii-nonascii-translation-table ((0 255))) (vietnamese-tcvn (ascii vietnamese-viscii-lower vietnamese-viscii-upper) viet-tcvn-nonascii-translation-table ((0 255))) (koi8-r (ascii cyrillic-iso8859-5) cyrillic-koi8-r-nonascii-translation-table ((32 255))) (alternativnyj (ascii cyrillic-iso8859-5) cyrillic-alternativnyj-nonascii-translation-table ((32 255))) (koi8-u (ascii cyrillic-iso8859-5 mule-unicode-0100-24ff) cyrillic-koi8-u-nonascii-translation-table ((32 255))) (big5 (ascii chinese-big5-1 chinese-big5-2) decode-big5-char ((32 127) ((161 254) 64 126 161 254))) (sjis (ascii katakana-jisx0201 japanese-jisx0208) decode-sjis-char ((32 127 161 223) ((129 159 224 239) 64 126 128 252))))) "\ @@ -18676,7 +18872,7 @@ system which uses fontsets). ;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion ;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist ;;;;;; truncate-string-to-width store-substring string-to-sequence) -;;;;;; "mule-util" "international/mule-util.el" (17842 54888)) +;;;;;; "mule-util" "international/mule-util.el" (18104 24757)) ;;; Generated autoloads from international/mule-util.el (autoload (quote string-to-sequence) "mule-util" "\ @@ -18805,7 +19001,7 @@ basis, this may not be accurate. ;;;*** ;;;### (autoloads (mwheel-install mouse-wheel-mode) "mwheel" "mwheel.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24738)) ;;; Generated autoloads from mwheel.el (defvar mouse-wheel-mode nil "\ @@ -18834,7 +19030,7 @@ Enable mouse wheel support. ;;;### (autoloads (network-connection network-connection-to-service ;;;;;; whois-reverse-lookup whois finger ftp run-dig dns-lookup-host ;;;;;; nslookup nslookup-host route arp netstat ipconfig ping traceroute) -;;;;;; "net-utils" "net/net-utils.el" (17891 7215)) +;;;;;; "net-utils" "net/net-utils.el" (18104 24760)) ;;; Generated autoloads from net/net-utils.el (autoload (quote traceroute) "net-utils" "\ @@ -18930,7 +19126,7 @@ Open a network connection to HOST on PORT. ;;;;;; uncomment-region comment-kill comment-set-column comment-indent ;;;;;; comment-indent-default comment-normalize-vars comment-multi-line ;;;;;; comment-padding comment-style comment-column) "newcomment" -;;;;;; "newcomment.el" (17992 30877)) +;;;;;; "newcomment.el" (18104 24738)) ;;; Generated autoloads from newcomment.el (defalias (quote indent-for-comment) (quote comment-indent)) @@ -18950,10 +19146,10 @@ Major modes should set this variable.") (defvar comment-column 32 "\ Column to indent right-margin comments to. -Each mode establishes a different default value for this variable; you +Each mode may establish a different default value for this variable; you can set the value for a particular mode using that mode's hook. -Comments might be indented to a value smaller than this in order -not to go beyond `comment-fill-column'.") +Comments might be indented to a different value in order not to go beyond +`comment-fill-column' or in order to align them with surrounding comments.") (custom-autoload (quote comment-column) "newcomment" t) (put 'comment-column 'safe-local-variable 'integerp) @@ -19126,7 +19322,7 @@ unless optional argument SOFT is non-nil. ;;;### (autoloads (newsticker-show-news newsticker-start-ticker newsticker-start ;;;;;; newsticker-ticker-running-p newsticker-running-p) "newsticker" -;;;;;; "net/newsticker.el" (17873 44590)) +;;;;;; "net/newsticker.el" (18104 24760)) ;;; Generated autoloads from net/newsticker.el (autoload (quote newsticker-running-p) "newsticker" "\ @@ -19168,7 +19364,7 @@ Switch to newsticker buffer. You may want to bind this to a key. ;;;*** ;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24753)) ;;; Generated autoloads from gnus/nndiary.el (autoload (quote nndiary-generate-nov-databases) "nndiary" "\ @@ -19178,8 +19374,8 @@ Generate NOV databases in all nndiary directories. ;;;*** -;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (17842 -;;;;;; 54741)) +;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (18104 +;;;;;; 24753)) ;;; Generated autoloads from gnus/nndoc.el (autoload (quote nndoc-add-type) "nndoc" "\ @@ -19194,7 +19390,7 @@ symbol in the alist. ;;;*** ;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24753)) ;;; Generated autoloads from gnus/nnfolder.el (autoload (quote nnfolder-generate-active-file) "nnfolder" "\ @@ -19206,7 +19402,7 @@ This command does not work if you use short group names. ;;;*** ;;;### (autoloads (nnkiboze-generate-groups) "nnkiboze" "gnus/nnkiboze.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24753)) ;;; Generated autoloads from gnus/nnkiboze.el (autoload (quote nnkiboze-generate-groups) "nnkiboze" "\ @@ -19218,7 +19414,7 @@ Finds out what articles are to be part of the nnkiboze groups. ;;;*** ;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24754)) ;;; Generated autoloads from gnus/nnml.el (autoload (quote nnml-generate-nov-databases) "nnml" "\ @@ -19229,7 +19425,7 @@ Generate NOV databases in all nnml directories. ;;;*** ;;;### (autoloads (nnsoup-revert-variables nnsoup-set-variables nnsoup-pack-replies) -;;;;;; "nnsoup" "gnus/nnsoup.el" (17842 54741)) +;;;;;; "nnsoup" "gnus/nnsoup.el" (18104 24754)) ;;; Generated autoloads from gnus/nnsoup.el (autoload (quote nnsoup-pack-replies) "nnsoup" "\ @@ -19250,7 +19446,7 @@ Revert posting and mailing methods to the standard Emacs methods. ;;;*** ;;;### (autoloads (disable-command enable-command disabled-command-function) -;;;;;; "novice" "novice.el" (17842 58279)) +;;;;;; "novice" "novice.el" (18104 24738)) ;;; Generated autoloads from novice.el (defvar disabled-command-function (quote disabled-command-function) "\ @@ -19283,7 +19479,7 @@ to future sessions. ;;;*** ;;;### (autoloads (nroff-mode) "nroff-mode" "textmodes/nroff-mode.el" -;;;;;; (17842 58277)) +;;;;;; (18104 24771)) ;;; Generated autoloads from textmodes/nroff-mode.el (autoload (quote nroff-mode) "nroff-mode" "\ @@ -19298,7 +19494,7 @@ closing requests for requests that are used in matched pairs. ;;;*** ;;;### (autoloads (octave-help) "octave-hlp" "progmodes/octave-hlp.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/octave-hlp.el (autoload (quote octave-help) "octave-hlp" "\ @@ -19312,7 +19508,7 @@ If KEY is not a string, prompt for it with completion. ;;;*** ;;;### (autoloads (inferior-octave) "octave-inf" "progmodes/octave-inf.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/octave-inf.el (autoload (quote inferior-octave) "octave-inf" "\ @@ -19335,7 +19531,7 @@ startup file, `~/.emacs-octave'. ;;;*** ;;;### (autoloads (octave-mode) "octave-mod" "progmodes/octave-mod.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/octave-mod.el (autoload (quote octave-mode) "octave-mod" "\ @@ -19433,13 +19629,36 @@ including a reproducible test case and send the message. ;;;*** +;;;### (autoloads (edit-options list-options) "options" "obsolete/options.el" +;;;;;; (18104 24760)) +;;; Generated autoloads from obsolete/options.el + +(autoload (quote list-options) "options" "\ +Display a list of Emacs user options, with values and documentation. +It is now better to use Customize instead. + +\(fn)" t nil) + +(autoload (quote edit-options) "options" "\ +Edit a list of Emacs user option values. +Selects a buffer containing such a list, +in which there are commands to set the option values. +Type \\[describe-mode] in that buffer for a list of commands. + +The Custom feature is intended to make this obsolete. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files ;;;;;; org-export-icalendar-this-file org-diary org-tags-view org-todo-list -;;;;;; org-agenda-list org-cycle-agenda-files org-batch-agenda org-agenda -;;;;;; org-remember-handler org-remember org-remember-apply-template +;;;;;; org-agenda-list org-cycle-agenda-files org-batch-store-agenda-views +;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda +;;;;;; org-agenda org-remember-handler org-remember org-remember-apply-template ;;;;;; org-remember-annotation org-store-link orgtbl-mode turn-on-orgtbl -;;;;;; org-global-cycle org-cycle org-mode) "org" "textmodes/org.el" -;;;;;; (17922 37459)) +;;;;;; turn-on-orgstruct orgstruct-mode org-global-cycle org-cycle +;;;;;; org-mode) "org" "textmodes/org.el" (18104 24771)) ;;; Generated autoloads from textmodes/org.el (autoload (quote org-mode) "org" "\ @@ -19488,7 +19707,7 @@ Visibility cycling for Org-mode. `indent-relative', like TAB normally does. See the option `org-cycle-emulate-tab' for details. -- Special case: if point is the the beginning of the buffer and there is +- Special case: if point is at the beginning of the buffer and there is no headline in line 1, this function will act as if called with prefix arg. \(fn &optional ARG)" t nil) @@ -19498,6 +19717,36 @@ Cycle the global visibility. For details see `org-cycle'. \(fn &optional ARG)" t nil) +(autoload (quote orgstruct-mode) "org" "\ +Toggle the minor more `orgstruct-mode'. +This mode is for using Org-mode structure commands in other modes. +The following key behave as if Org-mode was active, if the cursor +is on a headline, or on a plain list item (both in the definition +of Org-mode). + +M-up Move entry/item up +M-down Move entry/item down +M-left Promote +M-right Demote +M-S-up Move entry/item up +M-S-down Move entry/item down +M-S-left Promote subtree +M-S-right Demote subtree +M-q Fill paragraph and items like in Org-mode +C-c ^ Sort entries +C-c - Cycle list bullet +TAB Cycle item visibility +M-RET Insert new heading/item +S-M-RET Insert new TODO heading / Chekbox item +C-c C-c Set tags / toggle checkbox + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-orgstruct) "org" "\ +Unconditionally turn on `orgstruct-mode'. + +\(fn)" nil nil) + (autoload (quote turn-on-orgtbl) "org" "\ Unconditionally turn on `orgtbl-mode'. @@ -19588,7 +19837,8 @@ T Call `org-todo-list' to display the global todo list, select only m Call `org-tags-view' to display headlines with tags matching a condition (the user is prompted for the condition). M Like `m', but select only TODO entries, no ordinary headlines. -l Create a timeeline for the current buffer. +l Create a timeline for the current buffer. +e Export views to associated files. More commands can be added by configuring the variable `org-agenda-custom-commands'. In particular, specific tags and TODO keyword @@ -19601,13 +19851,62 @@ next use of \\[org-agenda]) restricted to the current file. \(fn ARG)" t nil) (autoload (quote org-batch-agenda) "org" "\ -Run an agenda command in batch mode, send result to STDOUT. -CMD-KEY is a string that is also a key in `org-agenda-custom-commands'. +Run an agenda command in batch mode and send the result to STDOUT. +If CMD-KEY is a string of length 1, it is used as a key in +`org-agenda-custom-commands' and triggers this command. If it is a +longer string is is used as a tags/todo match string. Paramters are alternating variable names and values that will be bound before running the agenda command. \(fn CMD-KEY &rest PARAMETERS)" nil (quote macro)) +(autoload (quote org-batch-agenda-csv) "org" "\ +Run an agenda command in batch mode and send the result to STDOUT. +If CMD-KEY is a string of length 1, it is used as a key in +`org-agenda-custom-commands' and triggers this command. If it is a +longer string is is used as a tags/todo match string. +Paramters are alternating variable names and values that will be bound +before running the agenda command. + +The output gives a line for each selected agenda item. Each +item is a list of comma-separated values, like this: + +category,head,type,todo,tags,date,time,extra,priority-l,priority-n + +category The category of the item +head The headline, without TODO kwd, TAGS and PRIORITY +type The type of the agenda entry, can be + todo selected in TODO match + tagsmatch selected in tags match + diary imported from diary + deadline a deadline on given date + scheduled scheduled on given date + timestamp entry has timestamp on given date + closed entry was closed on given date + upcoming-deadline warning about deadline + past-scheduled forwarded scheduled item + block entry has date block including g. date +todo The todo keyword, if any +tags All tags including inherited ones, separated by colons +date The relevant date, like 2007-2-14 +time The time, like 15:00-16:50 +extra Sting with extra planning info +priority-l The priority letter if any was given +priority-n The computed numerical priority +agenda-day The day in the agenda where this is listed + +\(fn CMD-KEY &rest PARAMETERS)" nil (quote macro)) + +(autoload (quote org-store-agenda-views) "org" "\ +Not documented + +\(fn &rest PARAMETERS)" t nil) + +(autoload (quote org-batch-store-agenda-views) "org" "\ +Run all custom agenda commands that have a file argument. + +\(fn &rest PARAMETERS)" nil (quote macro)) + (autoload (quote org-cycle-agenda-files) "org" "\ Cycle through the files in `org-agenda-files'. If the current buffer visits an agenda file, find the next one in the list. @@ -19635,7 +19934,7 @@ Show all TODO entries from all agenda file in a single list. The prefix arg can be used to select a specific TODO keyword and limit the list to these. When using \\[universal-argument], you will be prompted for a keyword. A numeric prefix directly selects the Nth keyword in -`org-todo-keywords'. +`org-todo-keywords-1'. \(fn ARG)" t nil) @@ -19656,6 +19955,8 @@ items should be listed. The following arguments are allowed: date range matching the selected date. Deadlines will also be listed, on the expiration day. + :sexp FIXME + :deadline List any deadlines past due, or due within `org-deadline-warning-days'. The listing occurs only in the diary for *today*, not at any other date. If @@ -19680,10 +19981,10 @@ all files listed in `org-agenda-files' will be checked automatically: &%%(org-diary) If you don't give any arguments (as in the example above), the default -arguments (:deadline :scheduled :timestamp) are used. So the example above may -also be written as +arguments (:deadline :scheduled :timestamp :sexp) are used. +So the example above may also be written as - &%%(org-diary :deadline :timestamp :scheduled) + &%%(org-diary :deadline :timestamp :sexp :scheduled) The function expects the lisp variables `entry' and `date' to be provided by the caller, because this is how the calendar works. Don't use this @@ -19713,8 +20014,38 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. ;;;*** +;;;### (autoloads (org-publish-all org-publish-current-file org-publish-current-project +;;;;;; org-publish) "org-publish" "textmodes/org-publish.el" (18104 +;;;;;; 24771)) +;;; Generated autoloads from textmodes/org-publish.el + +(autoload (quote org-publish) "org-publish" "\ +Publish the project PROJECT-NAME. + +\(fn PROJECT-NAME &optional FORCE)" t nil) + +(autoload (quote org-publish-current-project) "org-publish" "\ +Publish the project associated with the current file. +With prefix argument, force publishing all files in project. + +\(fn &optional FORCE)" t nil) + +(autoload (quote org-publish-current-file) "org-publish" "\ +Publish the current file. +With prefix argument, force publish the file. + +\(fn &optional FORCE)" t nil) + +(autoload (quote org-publish-all) "org-publish" "\ +Publish all projects. +With prefix argument, force publish all files. + +\(fn &optional FORCE)" t nil) + +;;;*** + ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" -;;;;;; (17952 11093)) +;;;;;; (18104 24738)) ;;; Generated autoloads from outline.el (put 'outline-regexp 'safe-local-variable 'string-or-null-p) @@ -19770,8 +20101,8 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads nil "paragraphs" "textmodes/paragraphs.el" (17842 -;;;;;; 58277)) +;;;### (autoloads nil "paragraphs" "textmodes/paragraphs.el" (18104 +;;;;;; 24772)) ;;; Generated autoloads from textmodes/paragraphs.el (put 'paragraph-start 'safe-local-variable 'stringp) (put 'paragraph-separate 'safe-local-variable 'stringp) @@ -19785,7 +20116,7 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads (show-paren-mode) "paren" "paren.el" (18016 8765)) +;;;### (autoloads (show-paren-mode) "paren" "paren.el" (18104 24738)) ;;; Generated autoloads from paren.el (defvar show-paren-mode nil "\ @@ -19810,7 +20141,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time. ;;;*** ;;;### (autoloads (parse-time-string) "parse-time" "calendar/parse-time.el" -;;;;;; (17957 43164)) +;;;;;; (18104 24745)) ;;; Generated autoloads from calendar/parse-time.el (autoload (quote parse-time-string) "parse-time" "\ @@ -19822,8 +20153,8 @@ unknown are returned as nil. ;;;*** -;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (17842 -;;;;;; 56332)) +;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (18104 +;;;;;; 24768)) ;;; Generated autoloads from progmodes/pascal.el (autoload (quote pascal-mode) "pascal" "\ @@ -19876,7 +20207,7 @@ no args, if that value is non-nil. ;;;*** ;;;### (autoloads (pc-bindings-mode) "pc-mode" "emulation/pc-mode.el" -;;;;;; (17842 54264)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/pc-mode.el (autoload (quote pc-bindings-mode) "pc-mode" "\ @@ -19894,7 +20225,7 @@ C-Escape does list-buffers. ;;;*** ;;;### (autoloads (pc-selection-mode pc-selection-mode) "pc-select" -;;;;;; "emulation/pc-select.el" (17842 54264)) +;;;;;; "emulation/pc-select.el" (18104 24748)) ;;; Generated autoloads from emulation/pc-select.el (defvar pc-selection-mode nil "\ @@ -19970,8 +20301,8 @@ you must modify it using \\[customize] or \\[pc-selection-mode].") ;;;*** -;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from pcmpl-cvs.el (autoload (quote pcomplete/cvs) "pcmpl-cvs" "\ @@ -19982,7 +20313,7 @@ Completion rules for the `cvs' command. ;;;*** ;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip) -;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (17842 58279)) +;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (18104 24738)) ;;; Generated autoloads from pcmpl-gnu.el (autoload (quote pcomplete/gzip) "pcmpl-gnu" "\ @@ -20010,7 +20341,7 @@ Completion for the GNU tar utility. ;;;*** ;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill) -;;;;;; "pcmpl-linux" "pcmpl-linux.el" (17842 58279)) +;;;;;; "pcmpl-linux" "pcmpl-linux.el" (18104 24738)) ;;; Generated autoloads from pcmpl-linux.el (autoload (quote pcomplete/kill) "pcmpl-linux" "\ @@ -20030,8 +20361,8 @@ Completion for GNU/Linux `mount'. ;;;*** -;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from pcmpl-rpm.el (autoload (quote pcomplete/rpm) "pcmpl-rpm" "\ @@ -20047,7 +20378,7 @@ You can use \\[eshell-report-bug] to do so. ;;;### (autoloads (pcomplete/chgrp pcomplete/chown pcomplete/which ;;;;;; pcomplete/xargs pcomplete/rm pcomplete/rmdir pcomplete/cd) -;;;;;; "pcmpl-unix" "pcmpl-unix.el" (17842 58279)) +;;;;;; "pcmpl-unix" "pcmpl-unix.el" (18104 24738)) ;;; Generated autoloads from pcmpl-unix.el (autoload (quote pcomplete/cd) "pcmpl-unix" "\ @@ -20093,8 +20424,8 @@ Completion for the `chgrp' command. ;;;### (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" (17944 -;;;;;; 62194)) +;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (18104 +;;;;;; 24738)) ;;; Generated autoloads from pcomplete.el (autoload (quote pcomplete) "pcomplete" "\ @@ -20153,7 +20484,7 @@ Setup shell-mode to use pcomplete. ;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status ;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs" -;;;;;; "pcvs.el" (18006 55796)) +;;;;;; "pcvs.el" (18104 24738)) ;;; Generated autoloads from pcvs.el (autoload (quote cvs-checkout) "pcvs" "\ @@ -20230,7 +20561,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** -;;;### (autoloads nil "pcvs-defs" "pcvs-defs.el" (17842 58279)) +;;;### (autoloads nil "pcvs-defs" "pcvs-defs.el" (18104 24738)) ;;; Generated autoloads from pcvs-defs.el (defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] (quote (menu-item "Directory Status" cvs-status :help "A more verbose status of a workarea"))) (define-key m [checkout] (quote (menu-item "Checkout Module" cvs-checkout :help "Check out a module from the repository"))) (define-key m [update] (quote (menu-item "Update Directory" cvs-update :help "Fetch updates from the repository"))) (define-key m [examine] (quote (menu-item "Examine Directory" cvs-examine :help "Examine the current state of a workarea"))) (fset (quote cvs-global-menu) m))) @@ -20238,7 +20569,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" -;;;;;; (17962 28280)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/perl-mode.el (autoload (quote perl-mode) "perl-mode" "\ @@ -20296,7 +20627,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'. ;;;### (autoloads (pgg-snarf-keys pgg-snarf-keys-region pgg-insert-key ;;;;;; pgg-verify pgg-verify-region pgg-sign pgg-sign-region pgg-decrypt ;;;;;; pgg-decrypt-region pgg-encrypt pgg-encrypt-symmetric pgg-encrypt-symmetric-region -;;;;;; pgg-encrypt-region) "pgg" "pgg.el" (17842 58279)) +;;;;;; pgg-encrypt-region) "pgg" "pgg.el" (18104 24738)) ;;; Generated autoloads from pgg.el (autoload (quote pgg-encrypt-region) "pgg" "\ @@ -20367,7 +20698,7 @@ If the optional 3rd argument CLEARTEXT is non-nil, it does not create a detached signature. If this function is called interactively, CLEARTEXT is enabled -and the the output is displayed. +and the output is displayed. If optional PASSPHRASE is not specified, it will be obtained from the passphrase cache or user. @@ -20384,7 +20715,7 @@ If optional arguments START and END are specified, only sign data within the region. If this function is called interactively, CLEARTEXT is enabled -and the the output is displayed. +and the output is displayed. If optional PASSPHRASE is not specified, it will be obtained from the passphrase cache or user. @@ -20430,7 +20761,7 @@ Import public keys in the current buffer. ;;;*** ;;;### (autoloads (pgg-gpg-symmetric-key-p) "pgg-gpg" "pgg-gpg.el" -;;;;;; (17887 33207)) +;;;;;; (18104 24738)) ;;; Generated autoloads from pgg-gpg.el (autoload (quote pgg-gpg-symmetric-key-p) "pgg-gpg" "\ @@ -20441,7 +20772,7 @@ True if decoded armor MESSAGE-KEYS has symmetric encryption indicator. ;;;*** ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" -;;;;;; (17842 58277)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/picture.el (autoload (quote picture-mode) "picture" "\ @@ -20522,7 +20853,7 @@ they are not defaultly assigned to keys. ;;;*** ;;;### (autoloads (po-find-file-coding-system) "po" "textmodes/po.el" -;;;;;; (17842 58277)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/po.el (autoload (quote po-find-file-coding-system) "po" "\ @@ -20533,7 +20864,7 @@ Called through `file-coding-system-alist', before the file is visited for real. ;;;*** -;;;### (autoloads (pong) "pong" "play/pong.el" (17842 55395)) +;;;### (autoloads (pong) "pong" "play/pong.el" (18104 24762)) ;;; Generated autoloads from play/pong.el (autoload (quote pong) "pong" "\ @@ -20550,7 +20881,7 @@ pong-mode keybindings:\\<pong-mode-map> ;;;*** ;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp pp-buffer -;;;;;; pp-to-string) "pp" "emacs-lisp/pp.el" (17852 19612)) +;;;;;; pp-to-string) "pp" "emacs-lisp/pp.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/pp.el (autoload (quote pp-to-string) "pp" "\ @@ -20606,7 +20937,7 @@ Ignores leading comment characters. ;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview ;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript ;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" -;;;;;; (18006 55796)) +;;;;;; (18104 24738)) ;;; Generated autoloads from printing.el (autoload (quote pr-interface) "printing" "\ @@ -21194,7 +21525,7 @@ are both set to t. ;;;*** ;;;### (autoloads (switch-to-prolog prolog-mode) "prolog" "progmodes/prolog.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/prolog.el (autoload (quote prolog-mode) "prolog" "\ @@ -21217,7 +21548,7 @@ With prefix argument \\[universal-prefix], prompt for the program to use. ;;;*** -;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (17842 58279)) +;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (18104 24739)) ;;; Generated autoloads from ps-bdf.el (defvar bdf-directory-list (if (memq system-type (quote (ms-dos windows-nt))) (list (expand-file-name "fonts/bdf" installation-directory)) (quote ("/usr/local/share/emacs/fonts/bdf"))) "\ @@ -21226,8 +21557,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") ;;;*** -;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (17842 -;;;;;; 56332)) +;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (18104 +;;;;;; 24768)) ;;; Generated autoloads from progmodes/ps-mode.el (autoload (quote ps-mode) "ps-mode" "\ @@ -21273,132 +21604,13 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number ;;;*** -;;;### (autoloads (ps-mule-begin-page ps-mule-begin-job ps-mule-encode-header-string -;;;;;; ps-mule-initialize ps-mule-plot-composition ps-mule-plot-string -;;;;;; ps-mule-set-ascii-font ps-mule-prepare-ascii-font ps-multibyte-buffer) -;;;;;; "ps-mule" "ps-mule.el" (17842 58279)) -;;; Generated autoloads from ps-mule.el - -(defvar ps-multibyte-buffer nil "\ -*Specifies the multi-byte buffer handling. - -Valid values are: - - nil This is the value to use the default settings which - is by default for printing buffer with only ASCII - and Latin characters. The default setting can be - changed by setting the variable - `ps-mule-font-info-database-default' differently. - The initial value of this variable is - `ps-mule-font-info-database-latin' (see - documentation). - - `non-latin-printer' This is the value to use when you have a Japanese - or Korean PostScript printer and want to print - buffer with ASCII, Latin-1, Japanese (JISX0208 and - JISX0201-Kana) and Korean characters. At present, - it was not tested the Korean characters printing. - If you have a korean PostScript printer, please, - test it. - - `bdf-font' This is the value to use when you want to print - buffer with BDF fonts. BDF fonts include both latin - and non-latin fonts. BDF (Bitmap Distribution - Format) is a format used for distributing X's font - source file. BDF fonts are included in - `intlfonts-1.2' which is a collection of X11 fonts - for all characters supported by Emacs. In order to - use this value, be sure to have installed - `intlfonts-1.2' and set the variable - `bdf-directory-list' appropriately (see ps-bdf.el for - documentation of this variable). - - `bdf-font-except-latin' This is like `bdf-font' except that it is used - PostScript default fonts to print ASCII and Latin-1 - characters. This is convenient when you want or - need to use both latin and non-latin characters on - the same buffer. See `ps-font-family', - `ps-header-font-family' and `ps-font-info-database'. - -Any other value is treated as nil.") - -(custom-autoload (quote ps-multibyte-buffer) "ps-mule" t) - -(autoload (quote ps-mule-prepare-ascii-font) "ps-mule" "\ -Setup special ASCII font for STRING. -STRING should contain only ASCII characters. - -\(fn STRING)" nil nil) - -(autoload (quote ps-mule-set-ascii-font) "ps-mule" "\ -Not documented - -\(fn)" nil nil) - -(autoload (quote ps-mule-plot-string) "ps-mule" "\ -Generate PostScript code for plotting characters in the region FROM and TO. - -It is assumed that all characters in this region belong to the same charset. - -Optional argument BG-COLOR specifies background color. - -Returns the value: - - (ENDPOS . RUN-WIDTH) - -Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of -the sequence. - -\(fn FROM TO &optional BG-COLOR)" nil nil) - -(autoload (quote ps-mule-plot-composition) "ps-mule" "\ -Generate PostScript code for plotting composition in the region FROM and TO. - -It is assumed that all characters in this region belong to the same -composition. - -Optional argument BG-COLOR specifies background color. - -Returns the value: - - (ENDPOS . RUN-WIDTH) - -Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of -the sequence. - -\(fn FROM TO &optional BG-COLOR)" nil nil) - -(autoload (quote ps-mule-initialize) "ps-mule" "\ -Initialize global data for printing multi-byte characters. - -\(fn)" nil nil) - -(autoload (quote ps-mule-encode-header-string) "ps-mule" "\ -Generate PostScript code for ploting STRING by font FONTTAG. -FONTTAG should be a string \"/h0\" or \"/h1\". - -\(fn STRING FONTTAG)" nil nil) - -(autoload (quote ps-mule-begin-job) "ps-mule" "\ -Start printing job for multi-byte chars between FROM and TO. -This checks if all multi-byte characters in the region are printable or not. - -\(fn FROM TO)" nil nil) - -(autoload (quote ps-mule-begin-page) "ps-mule" "\ -Not documented - -\(fn)" nil nil) - -;;;*** - ;;;### (autoloads (ps-extend-face ps-extend-face-list ps-setup ps-nb-pages-region ;;;;;; ps-nb-pages-buffer ps-line-lengths ps-despool ps-spool-region-with-faces ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (18006 -;;;;;; 55796)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (18104 +;;;;;; 24739)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (list (list (quote a4) (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list (quote a3) (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list (quote letter) (* 72 8.5) (* 72 11.0) "Letter") (list (quote legal) (* 72 8.5) (* 72 14.0) "Legal") (list (quote letter-small) (* 72 7.68) (* 72 10.16) "LetterSmall") (list (quote tabloid) (* 72 11.0) (* 72 17.0) "Tabloid") (list (quote ledger) (* 72 17.0) (* 72 11.0) "Ledger") (list (quote statement) (* 72 5.5) (* 72 8.5) "Statement") (list (quote executive) (* 72 7.5) (* 72 10.0) "Executive") (list (quote a4small) (* 72 7.47) (* 72 10.85) "A4Small") (list (quote b4) (* 72 10.125) (* 72 14.33) "B4") (list (quote b5) (* 72 7.16) (* 72 10.125) "B5")) "\ @@ -21595,7 +21807,7 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/python.el (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) @@ -21670,7 +21882,7 @@ Runs `jython-mode-hook' after `python-mode-hook'. ;;;*** ;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24754)) ;;; Generated autoloads from gnus/qp.el (autoload (quote quoted-printable-decode-region) "qp" "\ @@ -21693,7 +21905,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" (17921 16827)) +;;;;;; "international/quail.el" (18104 24757)) ;;; Generated autoloads from international/quail.el (autoload (quote quail-title) "quail" "\ @@ -21924,8 +22136,8 @@ of each directory. ;;;### (autoloads (quickurl-list quickurl-list-mode quickurl-edit-urls ;;;;;; quickurl-browse-url-ask quickurl-browse-url quickurl-add-url -;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (17842 -;;;;;; 55218)) +;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (18104 +;;;;;; 24760)) ;;; Generated autoloads from net/quickurl.el (defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\ @@ -21997,12 +22209,15 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. ;;;*** ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc" -;;;;;; "net/rcirc.el" (18006 55797)) +;;;;;; "net/rcirc.el" (18104 24760)) ;;; Generated autoloads from net/rcirc.el (autoload (quote rcirc) "rcirc" "\ -Connect to IRC. -If ARG is non-nil, prompt for a server to connect to. +Connect to all servers in `rcirc-server-alist'. + +Do not connect to a server if it is already connected. + +If ARG is non-nil, instead prompt for connection parameters. \(fn ARG)" t nil) @@ -22011,7 +22226,7 @@ If ARG is non-nil, prompt for a server to connect to. (autoload (quote rcirc-connect) "rcirc" "\ Not documented -\(fn &optional SERVER PORT NICK USER-NAME FULL-NAME STARTUP-CHANNELS)" nil nil) +\(fn SERVER &optional PORT NICK USER-NAME FULL-NAME STARTUP-CHANNELS)" nil nil) (defvar rcirc-track-minor-mode nil "\ Non-nil if Rcirc-Track minor mode is enabled. @@ -22029,8 +22244,8 @@ Global minor mode for tracking activity in rcirc buffers. ;;;*** -;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (17842 -;;;;;; 55218)) +;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (18104 +;;;;;; 24760)) ;;; Generated autoloads from net/rcompile.el (autoload (quote remote-compile) "rcompile" "\ @@ -22042,7 +22257,7 @@ See \\[compile]. ;;;*** ;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el" -;;;;;; (17917 37732)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/re-builder.el (defalias (quote regexp-builder) (quote re-builder)) @@ -22054,7 +22269,7 @@ Construct a regexp interactively. ;;;*** -;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (17930 34071)) +;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (18104 24739)) ;;; Generated autoloads from recentf.el (defvar recentf-mode nil "\ @@ -22081,8 +22296,8 @@ that were operated on recently. ;;;### (autoloads (clear-rectangle string-insert-rectangle string-rectangle ;;;;;; delete-whitespace-rectangle open-rectangle insert-rectangle ;;;;;; yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle -;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (17842 -;;;;;; 58279)) +;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (18104 +;;;;;; 24739)) ;;; Generated autoloads from rect.el (autoload (quote move-to-column-force) "rect" "\ @@ -22210,8 +22425,8 @@ rectangle which were empty. ;;;*** -;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (17842 -;;;;;; 58277)) +;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (18104 +;;;;;; 24772)) ;;; Generated autoloads from textmodes/refill.el (autoload (quote refill-mode) "refill" "\ @@ -22227,7 +22442,7 @@ refilling if they would cause auto-filling. ;;;*** ;;;### (autoloads (reftex-reset-scanning-information reftex-mode -;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (17923 8784)) +;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (18104 24772)) ;;; Generated autoloads from textmodes/reftex.el (autoload (quote turn-on-reftex) "reftex" "\ @@ -22277,7 +22492,7 @@ This enforces rescanning the buffer on next use. ;;;*** ;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el" -;;;;;; (17923 8784)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/reftex-cite.el (autoload (quote reftex-citation) "reftex-cite" "\ @@ -22307,7 +22522,7 @@ While entering the regexp, completion on knows citation keys is possible. ;;;*** ;;;### (autoloads (reftex-isearch-minor-mode) "reftex-global" "textmodes/reftex-global.el" -;;;;;; (17923 8784)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/reftex-global.el (autoload (quote reftex-isearch-minor-mode) "reftex-global" "\ @@ -22324,7 +22539,7 @@ With no argument, this command toggles ;;;*** ;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el" -;;;;;; (17923 8784)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/reftex-index.el (autoload (quote reftex-index-phrases-mode) "reftex-index" "\ @@ -22357,7 +22572,7 @@ Here are all local bindings. ;;;*** ;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el" -;;;;;; (17923 8784)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/reftex-parse.el (autoload (quote reftex-all-document-files) "reftex-parse" "\ @@ -22369,8 +22584,8 @@ of master file. ;;;*** -;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (17923 -;;;;;; 8784)) +;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (18104 +;;;;;; 24772)) ;;; 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)))) @@ -22380,7 +22595,7 @@ of master file. ;;;*** ;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/regexp-opt.el (autoload (quote regexp-opt) "regexp-opt" "\ @@ -22407,7 +22622,7 @@ This means the number of non-shy regexp grouping constructs ;;;*** -;;;### (autoloads (repeat) "repeat" "repeat.el" (17842 58279)) +;;;### (autoloads (repeat) "repeat" "repeat.el" (18104 24739)) ;;; Generated autoloads from repeat.el (autoload (quote repeat) "repeat" "\ @@ -22425,7 +22640,7 @@ can be modified by the global variable `repeat-on-final-keystroke'. ;;;*** ;;;### (autoloads (reporter-submit-bug-report) "reporter" "mail/reporter.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/reporter.el (autoload (quote reporter-submit-bug-report) "reporter" "\ @@ -22457,7 +22672,7 @@ mail-sending package is used for editing and sending the message. ;;;*** ;;;### (autoloads (reposition-window) "reposition" "reposition.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24739)) ;;; Generated autoloads from reposition.el (autoload (quote reposition-window) "reposition" "\ @@ -22484,8 +22699,8 @@ first comment line visible (if point is in a comment). ;;;*** -;;;### (autoloads (resume-suspend-hook) "resume" "resume.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (resume-suspend-hook) "resume" "resume.el" (18104 +;;;;;; 24739)) ;;; Generated autoloads from resume.el (autoload (quote resume-suspend-hook) "resume" "\ @@ -22496,7 +22711,7 @@ Clear out the file used for transmitting args when Emacs resumes. ;;;*** ;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24739)) ;;; Generated autoloads from reveal.el (autoload (quote reveal-mode) "reveal" "\ @@ -22531,7 +22746,7 @@ With zero or negative ARG turn mode off. ;;;*** ;;;### (autoloads (make-ring ring-p) "ring" "emacs-lisp/ring.el" -;;;;;; (17842 54152)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/ring.el (autoload (quote ring-p) "ring" "\ @@ -22546,7 +22761,7 @@ Make a ring that can contain SIZE elements. ;;;*** -;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (17842 55218)) +;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (18104 24760)) ;;; Generated autoloads from net/rlogin.el (add-hook 'same-window-regexps "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)") @@ -22597,8 +22812,8 @@ variable. ;;;;;; rmail-mail-new-frame rmail-primary-inbox-list rmail-delete-after-output ;;;;;; rmail-highlight-face rmail-highlighted-headers rmail-retry-ignored-headers ;;;;;; rmail-displayed-headers rmail-ignored-headers rmail-dont-reply-to-names -;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (18006 -;;;;;; 55797)) +;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from mail/rmail.el (autoload (quote rmail-movemail-variant-p) "rmail" "\ @@ -22863,7 +23078,7 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server. ;;;*** ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "mail/rmailedit.el" -;;;;;; (17887 18399)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/rmailedit.el (autoload (quote rmail-edit-current-message) "rmailedit" "\ @@ -22875,7 +23090,7 @@ Edit the contents of this message. ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" -;;;;;; "mail/rmailkwd.el" (17842 55035)) +;;;;;; "mail/rmailkwd.el" (18104 24758)) ;;; Generated autoloads from mail/rmailkwd.el (autoload (quote rmail-add-label) "rmailkwd" "\ @@ -22914,7 +23129,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "mail/rmailmsc.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/rmailmsc.el (autoload (quote set-rmail-inbox-list) "rmailmsc" "\ @@ -22928,7 +23143,7 @@ If FILE-NAME is empty, remove any existing inbox list. ;;;### (autoloads (rmail-output-body-to-file rmail-output rmail-fields-not-to-output ;;;;;; rmail-output-to-rmail-file rmail-output-file-alist) "rmailout" -;;;;;; "mail/rmailout.el" (17842 55035)) +;;;;;; "mail/rmailout.el" (18104 24758)) ;;; Generated autoloads from mail/rmailout.el (defvar rmail-output-file-alist nil "\ @@ -22995,8 +23210,8 @@ FILE-NAME defaults, interactively, from the Subject field of the message. ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject -;;;;;; rmail-sort-by-date) "rmailsort" "mail/rmailsort.el" (17842 -;;;;;; 55035)) +;;;;;; rmail-sort-by-date) "rmailsort" "mail/rmailsort.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from mail/rmailsort.el (autoload (quote rmail-sort-by-date) "rmailsort" "\ @@ -23048,7 +23263,7 @@ KEYWORDS is a comma-separated list of labels. ;;;;;; rmail-summary-by-senders rmail-summary-by-topic rmail-summary-by-regexp ;;;;;; rmail-summary-by-recipients rmail-summary-by-labels rmail-summary ;;;;;; rmail-summary-line-count-flag rmail-summary-scroll-between-messages) -;;;;;; "rmailsum" "mail/rmailsum.el" (17842 55035)) +;;;;;; "rmailsum" "mail/rmailsum.el" (18104 24758)) ;;; Generated autoloads from mail/rmailsum.el (defvar rmail-summary-scroll-between-messages t "\ @@ -23129,8 +23344,21 @@ Setting this variable has an effect only before reading a mail.") ;;;*** +;;;### (autoloads (news-post-news) "rnewspost" "obsolete/rnewspost.el" +;;;;;; (18104 24760)) +;;; Generated autoloads from obsolete/rnewspost.el + +(autoload (quote news-post-news) "rnewspost" "\ +Begin editing a new USENET news article to be posted. +Type \\[describe-mode] once editing the article to get a list of commands. +If NOQUERY is non-nil, we do not query before doing the work. + +\(fn &optional NOQUERY)" t nil) + +;;;*** + ;;;### (autoloads (toggle-rot13-mode rot13-other-window rot13-region -;;;;;; rot13-string rot13) "rot13" "rot13.el" (17842 58279)) +;;;;;; rot13-string rot13) "rot13" "rot13.el" (18104 24739)) ;;; Generated autoloads from rot13.el (autoload (quote rot13) "rot13" "\ @@ -23167,8 +23395,8 @@ Toggle the use of ROT13 encoding for the current window. ;;;*** -;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (17833 -;;;;;; 43069)) +;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (18104 +;;;;;; 24739)) ;;; Generated autoloads from ruler-mode.el (autoload (quote ruler-mode) "ruler-mode" "\ @@ -23178,8 +23406,8 @@ Display a ruler in the header line if ARG > 0. ;;;*** -;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (18011 -;;;;;; 44080)) +;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emacs-lisp/rx.el (autoload (quote rx-to-string) "rx" "\ @@ -23492,7 +23720,7 @@ enclosed in `(and ...)'. ;;;*** ;;;### (autoloads (savehist-mode savehist-mode) "savehist" "savehist.el" -;;;;;; (17842 58279)) +;;;;;; (18104 24739)) ;;; Generated autoloads from savehist.el (defvar savehist-mode nil "\ @@ -23518,7 +23746,7 @@ which is probably undesirable. ;;;*** ;;;### (autoloads (dsssl-mode scheme-mode) "scheme" "progmodes/scheme.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/scheme.el (autoload (quote scheme-mode) "scheme" "\ @@ -23560,7 +23788,7 @@ that variable's value is a string. ;;;*** ;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24755)) ;;; Generated autoloads from gnus/score-mode.el (autoload (quote gnus-score-mode) "score-mode" "\ @@ -23573,8 +23801,33 @@ This mode is an extended emacs-lisp mode. ;;;*** +;;;### (autoloads (scribe-mode) "scribe" "obsolete/scribe.el" (18104 +;;;;;; 24760)) +;;; Generated autoloads from obsolete/scribe.el + +(autoload (quote scribe-mode) "scribe" "\ +Major mode for editing files of Scribe (a text formatter) source. +Scribe-mode is similar to text-mode, with a few extra commands added. +\\{scribe-mode-map} + +Interesting variables: + +`scribe-fancy-paragraphs' + Non-nil makes Scribe mode use a different style of paragraph separation. + +`scribe-electric-quote' + Non-nil makes insert of double quote use `` or '' depending on context. + +`scribe-electric-parenthesis' + Non-nil makes an open-parenthesis char (one of `([<{') + automatically insert its close if typed after an @Command form. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (scroll-all-mode) "scroll-all" "scroll-all.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24739)) ;;; Generated autoloads from scroll-all.el (defvar scroll-all-mode nil "\ @@ -23597,11 +23850,11 @@ apply to all visible windows in the same frame. ;;;*** ;;;### (autoloads (scroll-lock-mode) "scroll-lock" "scroll-lock.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24739)) ;;; Generated autoloads from scroll-lock.el (autoload (quote scroll-lock-mode) "scroll-lock" "\ -Minor mode for pager-like scrolling. +Buffer-local minor mode for pager-like scrolling. Keys which normally move point by line or paragraph will scroll the buffer by the respective amount of lines instead and point will be kept vertically fixed relative to window boundaries @@ -23619,7 +23872,7 @@ during scrolling. ;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name ;;;;;; mail-header-separator send-mail-function mail-interactive ;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style) -;;;;;; "sendmail" "mail/sendmail.el" (17942 63381)) +;;;;;; "sendmail" "mail/sendmail.el" (18104 24758)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style (quote angles) "\ @@ -23919,15 +24172,15 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** -;;;### (autoloads (server-mode server-start) "server" "server.el" -;;;;;; (17921 16827)) +;;;### (autoloads (server-save-buffers-kill-terminal server-mode +;;;;;; server-start) "server" "server.el" (18104 24739)) ;;; Generated autoloads from server.el (autoload (quote server-start) "server" "\ Allow this Emacs process to be a server for client processes. This starts a server communications subprocess through which -client \"editors\" can send your editing commands to this Emacs job. -To use the server, set up the program `emacsclient' in the +client \"editors\" can send your editing commands to this Emacs +job. To use the server, set up the program `emacsclient' in the Emacs distribution as your standard \"editor\". Optional argument LEAVE-DEAD (interactively, a prefix arg) means just @@ -23952,9 +24205,19 @@ Server mode runs a process that accepts commands from the \(fn &optional ARG)" t nil) +(autoload (quote server-save-buffers-kill-terminal) "server" "\ +Offer to save each buffer, then kill PROC. + +With prefix arg, silently save all file-visiting buffers, then kill. + +If emacsclient was started with a list of filenames to edit, then +only these files will be asked to be saved. + +\(fn PROC &optional ARG)" nil nil) + ;;;*** -;;;### (autoloads (ses-mode) "ses" "ses.el" (17902 31690)) +;;;### (autoloads (ses-mode) "ses" "ses.el" (18104 24739)) ;;; Generated autoloads from ses.el (autoload (quote ses-mode) "ses" "\ @@ -23973,7 +24236,7 @@ These are active only in the minibuffer, when entering or editing a formula: ;;;*** ;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el" -;;;;;; (18010 58080)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload (quote sgml-mode) "sgml-mode" "\ @@ -24041,7 +24304,7 @@ To work around that, do: ;;;*** ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24768)) ;;; Generated autoloads from progmodes/sh-script.el (put 'sh-shell 'safe-local-variable 'symbolp) @@ -24105,7 +24368,7 @@ with your script for an edit-interpret-debug cycle. ;;;*** -;;;### (autoloads (sha1) "sha1" "gnus/sha1.el" (17842 54741)) +;;;### (autoloads (sha1) "sha1" "gnus/sha1.el" (18104 24755)) ;;; Generated autoloads from gnus/sha1.el (autoload (quote sha1) "sha1" "\ @@ -24120,7 +24383,7 @@ If BINARY is non-nil, return a string in binary form. ;;;*** ;;;### (autoloads (list-load-path-shadows) "shadow" "emacs-lisp/shadow.el" -;;;;;; (17853 57352)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/shadow.el (autoload (quote list-load-path-shadows) "shadow" "\ @@ -24167,8 +24430,8 @@ buffer called `*Shadows*'. Shadowings are located by calling the ;;;*** ;;;### (autoloads (shadow-initialize shadow-define-regexp-group shadow-define-literal-group -;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (17842 -;;;;;; 58278)) +;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (18104 +;;;;;; 24739)) ;;; Generated autoloads from shadowfile.el (autoload (quote shadow-define-cluster) "shadowfile" "\ @@ -24207,7 +24470,7 @@ Set up file shadowing. ;;;*** ;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" -;;;;;; (17899 1575)) +;;;;;; (18104 24739)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp "cmd\\(proxy\\)?\\.exe" "\ @@ -24254,7 +24517,7 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** ;;;### (autoloads (sieve-upload-and-bury sieve-upload sieve-manage) -;;;;;; "sieve" "gnus/sieve.el" (17842 54741)) +;;;;;; "sieve" "gnus/sieve.el" (18104 24755)) ;;; Generated autoloads from gnus/sieve.el (autoload (quote sieve-manage) "sieve" "\ @@ -24275,7 +24538,7 @@ Not documented ;;;*** ;;;### (autoloads (sieve-mode) "sieve-mode" "gnus/sieve-mode.el" -;;;;;; (17842 54741)) +;;;;;; (18104 24755)) ;;; Generated autoloads from gnus/sieve-mode.el (autoload (quote sieve-mode) "sieve-mode" "\ @@ -24290,14 +24553,14 @@ Turning on Sieve mode runs `sieve-mode-hook'. ;;;*** -;;;### (autoloads nil "simple" "simple.el" (18009 38727)) +;;;### (autoloads nil "simple" "simple.el" (18104 24740)) ;;; Generated autoloads from simple.el (put 'fill-prefix 'safe-local-variable 'string-or-null-p) ;;;*** -;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (17842 -;;;;;; 56332)) +;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (18104 +;;;;;; 24769)) ;;; Generated autoloads from progmodes/simula.el (autoload (quote simula-mode) "simula" "\ @@ -24346,7 +24609,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" (17842 58278)) +;;;;;; define-skeleton) "skeleton" "skeleton.el" (18104 24740)) ;;; Generated autoloads from skeleton.el (defvar skeleton-filter-function (quote identity) "\ @@ -24456,7 +24719,7 @@ symmetrical ones, and the same character twice for the others. ;;;*** ;;;### (autoloads (smerge-mode smerge-ediff) "smerge-mode" "smerge-mode.el" -;;;;;; (17904 28230)) +;;;;;; (18104 24740)) ;;; Generated autoloads from smerge-mode.el (autoload (quote smerge-ediff) "smerge-mode" "\ @@ -24475,7 +24738,7 @@ Minor mode to simplify editing output from the diff3 program. ;;;*** ;;;### (autoloads (smiley-buffer smiley-region) "smiley" "gnus/smiley.el" -;;;;;; (17875 18370)) +;;;;;; (18104 24755)) ;;; Generated autoloads from gnus/smiley.el (autoload (quote smiley-region) "smiley" "\ @@ -24493,7 +24756,7 @@ interactively. If there's no argument, do it at the current buffer ;;;*** ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" -;;;;;; "mail/smtpmail.el" (17939 50716)) +;;;;;; "mail/smtpmail.el" (18104 24758)) ;;; Generated autoloads from mail/smtpmail.el (autoload (quote smtpmail-send-it) "smtpmail" "\ @@ -24508,7 +24771,7 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'. ;;;*** -;;;### (autoloads (snake) "snake" "play/snake.el" (17842 55395)) +;;;### (autoloads (snake) "snake" "play/snake.el" (18104 24762)) ;;; Generated autoloads from play/snake.el (autoload (quote snake) "snake" "\ @@ -24532,7 +24795,7 @@ Snake mode keybindings: ;;;*** ;;;### (autoloads (snmpv2-mode snmp-mode) "snmp-mode" "net/snmp-mode.el" -;;;;;; (17842 55218)) +;;;;;; (18104 24760)) ;;; Generated autoloads from net/snmp-mode.el (autoload (quote snmp-mode) "snmp-mode" "\ @@ -24563,7 +24826,7 @@ then `snmpv2-mode-hook'. ;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset calendar-location-name ;;;;;; calendar-longitude calendar-latitude calendar-time-display-form) -;;;;;; "solar" "calendar/solar.el" (17956 13479)) +;;;;;; "solar" "calendar/solar.el" (18104 24745)) ;;; Generated autoloads from calendar/solar.el (defvar calendar-time-display-form (quote (12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")"))) "\ @@ -24634,8 +24897,8 @@ Requires floating point. ;;;*** -;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (17842 -;;;;;; 55395)) +;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (18104 +;;;;;; 24762)) ;;; Generated autoloads from play/solitaire.el (autoload (quote solitaire) "solitaire" "\ @@ -24712,7 +24975,7 @@ Pick your favourite 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" (17842 58278)) +;;;;;; sort-lines sort-subr) "sort" "sort.el" (18104 24740)) ;;; Generated autoloads from sort.el (autoload (quote sort-subr) "sort" "\ @@ -24854,8 +25117,8 @@ From a program takes two point or marker arguments, BEG and END. ;;;*** -;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (17842 -;;;;;; 54741)) +;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (18104 +;;;;;; 24755)) ;;; Generated autoloads from gnus/spam.el (autoload (quote spam-initialize) "spam" "\ @@ -24867,7 +25130,7 @@ Install the spam.el hooks and do other initialization ;;;### (autoloads (spam-report-deagentize spam-report-agentize spam-report-url-to-file ;;;;;; spam-report-url-ping-mm-url spam-report-process-queue) "spam-report" -;;;;;; "gnus/spam-report.el" (17842 54741)) +;;;;;; "gnus/spam-report.el" (18104 24755)) ;;; Generated autoloads from gnus/spam-report.el (autoload (quote spam-report-process-queue) "spam-report" "\ @@ -24910,7 +25173,7 @@ Spam reports will be queued with the method used when ;;;*** ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" -;;;;;; "speedbar.el" (17881 43027)) +;;;;;; "speedbar.el" (18104 24740)) ;;; Generated autoloads from speedbar.el (defalias (quote speedbar) (quote speedbar-frame-mode)) @@ -24935,7 +25198,7 @@ selected. If the speedbar frame is active, then select the attached frame. ;;;*** ;;;### (autoloads (spell-string spell-region spell-word spell-buffer) -;;;;;; "spell" "textmodes/spell.el" (17842 58276)) +;;;;;; "spell" "textmodes/spell.el" (18104 24772)) ;;; Generated autoloads from textmodes/spell.el (put (quote spell-filter) (quote risky-local-variable) t) @@ -24971,8 +25234,8 @@ Check spelling of string supplied as argument. ;;;*** -;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (17842 -;;;;;; 55395)) +;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (18104 +;;;;;; 24762)) ;;; Generated autoloads from play/spook.el (autoload (quote spook) "spook" "\ @@ -24990,8 +25253,8 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;### (autoloads (sql-linter sql-db2 sql-interbase sql-postgres ;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix ;;;;;; sql-sybase sql-oracle sql-product-interactive sql-mode sql-help -;;;;;; sql-add-product-keywords) "sql" "progmodes/sql.el" (17842 -;;;;;; 56332)) +;;;;;; sql-add-product-keywords) "sql" "progmodes/sql.el" (18104 +;;;;;; 24769)) ;;; Generated autoloads from progmodes/sql.el (autoload (quote sql-add-product-keywords) "sql" "\ @@ -25422,8 +25685,8 @@ input. See `sql-interactive-mode'. ;;;;;; 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" (17842 -;;;;;; 58278)) +;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (18104 +;;;;;; 24740)) ;;; Generated autoloads from strokes.el (autoload (quote strokes-global-set-stroke) "strokes" "\ @@ -25533,7 +25796,7 @@ Read a complex stroke and insert its glyph into the current buffer. ;;;*** ;;;### (autoloads (studlify-buffer studlify-word studlify-region) -;;;;;; "studly" "play/studly.el" (16211 27038)) +;;;;;; "studly" "play/studly.el" (17994 6715)) ;;; Generated autoloads from play/studly.el (autoload (quote studlify-region) "studly" "\ @@ -25553,7 +25816,7 @@ Studlify-case the current buffer. ;;;*** -;;;### (autoloads (locate-library) "subr" "subr.el" (17964 48351)) +;;;### (autoloads (locate-library) "subr" "subr.el" (18104 24740)) ;;; Generated autoloads from subr.el (autoload (quote locate-library) "subr" "\ @@ -25575,7 +25838,7 @@ and the file name is displayed in the echo area. ;;;*** ;;;### (autoloads (sc-cite-original) "supercite" "mail/supercite.el" -;;;;;; (17854 7564)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/supercite.el (autoload (quote sc-cite-original) "supercite" "\ @@ -25607,7 +25870,7 @@ before, and `sc-post-hook' is run after the guts of this function. ;;;*** -;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (18006 55796)) +;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (18104 24740)) ;;; Generated autoloads from t-mouse.el (defvar t-mouse-mode nil "\ @@ -25631,7 +25894,7 @@ It requires the `mev' program, part of the `gpm' utilities. ;;;*** -;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (17842 58278)) +;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (18104 24740)) ;;; Generated autoloads from tabify.el (autoload (quote untabify) "tabify" "\ @@ -25666,7 +25929,7 @@ The variable `tab-width' controls the spacing of tab stops. ;;;;;; table-recognize table-insert-row-column table-insert-column ;;;;;; table-insert-row table-insert table-point-left-cell-hook ;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook) -;;;;;; "table" "textmodes/table.el" (18012 17784)) +;;;;;; "table" "textmodes/table.el" (18104 24772)) ;;; Generated autoloads from textmodes/table.el (defvar table-cell-map-hook nil "\ @@ -26254,7 +26517,7 @@ converts a table into plain text without frames. It is a companion to ;;;*** -;;;### (autoloads (talk-connect) "talk" "talk.el" (17842 58278)) +;;;### (autoloads (talk talk-connect) "talk" "talk.el" (18104 24740)) ;;; Generated autoloads from talk.el (autoload (quote talk-connect) "talk" "\ @@ -26262,9 +26525,14 @@ Connect to display DISPLAY for the Emacs talk group. \(fn DISPLAY)" t nil) +(autoload (quote talk) "talk" "\ +Connect to the Emacs talk group from the current X display or tty frame. + +\(fn)" t nil) + ;;;*** -;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (18010 5426)) +;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (18104 24740)) ;;; Generated autoloads from tar-mode.el (autoload (quote tar-mode) "tar-mode" "\ @@ -26288,7 +26556,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. ;;;*** ;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" -;;;;;; "progmodes/tcl.el" (17842 56332)) +;;;;;; "progmodes/tcl.el" (18104 24769)) ;;; Generated autoloads from progmodes/tcl.el (autoload (quote tcl-mode) "tcl" "\ @@ -26339,7 +26607,7 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'. ;;;*** -;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (17842 55218)) +;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (18104 24760)) ;;; Generated autoloads from net/telnet.el (add-hook 'same-window-regexps "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)") @@ -26366,8 +26634,8 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads (ansi-term term make-term) "term" "term.el" (17952 -;;;;;; 11093)) +;;;### (autoloads (ansi-term term make-term) "term" "term.el" (18104 +;;;;;; 24740)) ;;; Generated autoloads from term.el (autoload (quote make-term) "term" "\ @@ -26395,8 +26663,8 @@ Start a terminal-emulator in a new buffer. ;;;*** -;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (17842 -;;;;;; 58278)) +;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (18104 +;;;;;; 24740)) ;;; Generated autoloads from terminal.el (autoload (quote terminal-emulator) "terminal" "\ @@ -26433,7 +26701,7 @@ subprocess started. ;;;*** ;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el" -;;;;;; (17925 52793)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/testcover.el (autoload (quote testcover-this-defun) "testcover" "\ @@ -26443,7 +26711,7 @@ Start coverage on function under point. ;;;*** -;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17941 38806)) +;;;### (autoloads (tetris) "tetris" "play/tetris.el" (18104 24762)) ;;; Generated autoloads from play/tetris.el (autoload (quote tetris) "tetris" "\ @@ -26474,7 +26742,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" -;;;;;; (17992 30878)) +;;;;;; (18104 24772)) ;;; Generated autoloads from textmodes/tex-mode.el (defvar tex-shell-file-name nil "\ @@ -26776,7 +27044,7 @@ Major mode to edit DocTeX files. ;;;*** ;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer) -;;;;;; "texinfmt" "textmodes/texinfmt.el" (17842 58276)) +;;;;;; "texinfmt" "textmodes/texinfmt.el" (18104 24773)) ;;; Generated autoloads from textmodes/texinfmt.el (autoload (quote texinfo-format-buffer) "texinfmt" "\ @@ -26785,8 +27053,8 @@ The Info file output is generated in a buffer visiting the Info file name specified in the @setfilename command. Non-nil argument (prefix, if interactive) means don't make tag table -and don't split the file if large. You can use Info-tagify and -Info-split to do these manually. +and don't split the file if large. You can use `Info-tagify' and +`Info-split' to do these manually. \(fn &optional NOSPLIT)" t nil) @@ -26809,14 +27077,14 @@ is automatically removed when the Info file is created. The original Texinfo source buffer is not changed. Non-nil argument (prefix, if interactive) means don't split the file -if large. You can use Info-split to do this manually. +if large. You can use `Info-split' to do this manually. \(fn &optional NOSPLIT)" t nil) ;;;*** ;;;### (autoloads (texinfo-mode texinfo-close-quote texinfo-open-quote) -;;;;;; "texinfo" "textmodes/texinfo.el" (17842 58276)) +;;;;;; "texinfo" "textmodes/texinfo.el" (18104 24773)) ;;; Generated autoloads from textmodes/texinfo.el (defvar texinfo-open-quote "``" "\ @@ -26903,7 +27171,7 @@ value of `texinfo-mode-hook'. ;;;### (autoloads (thai-auto-composition-mode thai-composition-function ;;;;;; thai-post-read-conversion thai-compose-buffer thai-compose-string ;;;;;; thai-compose-region) "thai-util" "language/thai-util.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24758)) ;;; Generated autoloads from language/thai-util.el (autoload (quote thai-compose-region) "thai-util" "\ @@ -26947,7 +27215,7 @@ Minor mode for automatically correct Thai character composition. ;;;### (autoloads (list-at-point number-at-point symbol-at-point ;;;;;; sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing) -;;;;;; "thingatpt" "thingatpt.el" (17842 58278)) +;;;;;; "thingatpt" "thingatpt.el" (18104 24740)) ;;; Generated autoloads from thingatpt.el (autoload (quote forward-thing) "thingatpt" "\ @@ -26959,7 +27227,7 @@ Move forward to the end of the Nth next THING. Determine the start and end buffer locations for the THING at point. THING is a symbol which specifies the kind of syntactic entity you want. Possibilities include `symbol', `list', `sexp', `defun', `filename', `url', -`word', `sentence', `whitespace', `line', `page' and others. +`email', `word', `sentence', `whitespace', `line', `page' and others. See the file `thingatpt.el' for documentation on how to define a symbol as a valid THING. @@ -26973,7 +27241,7 @@ of the textual entity that was found. Return the THING at point. THING is a symbol which specifies the kind of syntactic entity you want. Possibilities include `symbol', `list', `sexp', `defun', `filename', `url', -`word', `sentence', `whitespace', `line', `page' and others. +`email', `word', `sentence', `whitespace', `line', `page' and others. See the file `thingatpt.el' for documentation on how to define a symbol as a valid THING. @@ -27004,7 +27272,7 @@ Not documented ;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show thumbs-dired-show-marked ;;;;;; thumbs-show-from-dir thumbs-find-thumb) "thumbs" "thumbs.el" -;;;;;; (17963 26308)) +;;;;;; (18104 24740)) ;;; Generated autoloads from thumbs.el (autoload (quote thumbs-find-thumb) "thumbs" "\ @@ -27043,7 +27311,7 @@ In dired, call the setroot program on the image at point. ;;;;;; tibetan-composition-function tibetan-decompose-string tibetan-decompose-region ;;;;;; tibetan-compose-region tibetan-compose-string tibetan-transcription-to-tibetan ;;;;;; tibetan-tibetan-to-transcription tibetan-char-p) "tibet-util" -;;;;;; "language/tibet-util.el" (17842 58278)) +;;;;;; "language/tibet-util.el" (18104 24758)) ;;; Generated autoloads from language/tibet-util.el (autoload (quote tibetan-char-p) "tibet-util" "\ @@ -27122,7 +27390,7 @@ Not documented ;;;*** ;;;### (autoloads (tildify-buffer tildify-region) "tildify" "textmodes/tildify.el" -;;;;;; (17842 58276)) +;;;;;; (18104 24773)) ;;; Generated autoloads from textmodes/tildify.el (autoload (quote tildify-region) "tildify" "\ @@ -27146,7 +27414,7 @@ This function performs no refilling of the changed text. ;;;*** ;;;### (autoloads (display-time-mode display-time display-time-day-and-date) -;;;;;; "time" "time.el" (18006 55796)) +;;;;;; "time" "time.el" (18104 24740)) ;;; Generated autoloads from time.el (defvar display-time-day-and-date nil "\ @@ -27188,8 +27456,8 @@ This runs the normal hook `display-time-hook' after each update. ;;;### (autoloads (safe-date-to-time time-to-days time-to-day-in-year ;;;;;; date-leap-year-p days-between date-to-day time-add time-subtract ;;;;;; time-since days-to-time time-less-p seconds-to-time time-to-seconds -;;;;;; date-to-time) "time-date" "calendar/time-date.el" (17842 -;;;;;; 53792)) +;;;;;; date-to-time) "time-date" "calendar/time-date.el" (18104 +;;;;;; 24745)) ;;; Generated autoloads from calendar/time-date.el (autoload (quote date-to-time) "time-date" "\ @@ -27275,7 +27543,7 @@ If DATE is malformed, return a time value of zeros. ;;;*** ;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" -;;;;;; "time-stamp.el" (17842 58278)) +;;;;;; "time-stamp.el" (18104 24740)) ;;; Generated autoloads from time-stamp.el (put 'time-stamp-format 'safe-local-variable 'stringp) (put 'time-stamp-line-limit 'safe-local-variable 'integerp) @@ -27318,7 +27586,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-modeline-display) "timeclock" "calendar/timeclock.el" -;;;;;; (17992 30878)) +;;;;;; (18104 24745)) ;;; Generated autoloads from calendar/timeclock.el (autoload (quote timeclock-modeline-display) "timeclock" "\ @@ -27419,7 +27687,7 @@ relative only to the time worked today, and not to past time. ;;;### (autoloads (with-timeout run-with-idle-timer add-timeout run-with-timer ;;;;;; run-at-time cancel-function-timers cancel-timer) "timer" -;;;;;; "emacs-lisp/timer.el" (17935 13348)) +;;;;;; "emacs-lisp/timer.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/timer.el (defalias (quote disable-timeout) (quote cancel-timer)) @@ -27500,7 +27768,7 @@ be detected. ;;;*** ;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv" -;;;;;; "international/titdic-cnv.el" (17870 32853)) +;;;;;; "international/titdic-cnv.el" (18104 24757)) ;;; Generated autoloads from international/titdic-cnv.el (autoload (quote titdic-convert) "titdic-cnv" "\ @@ -27523,8 +27791,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\". ;;;*** ;;;### (autoloads (tamil-composition-function tamil-post-read-conversion -;;;;;; tamil-compose-region) "tml-util" "language/tml-util.el" (17842 -;;;;;; 58278)) +;;;;;; tamil-compose-region) "tml-util" "language/tml-util.el" (18104 +;;;;;; 24758)) ;;; Generated autoloads from language/tml-util.el (autoload (quote tamil-compose-region) "tml-util" "\ @@ -27547,10 +27815,9 @@ PATTERN regexp. ;;;*** ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" -;;;;;; "tmm.el" (17952 58711)) +;;;;;; "tmm.el" (18104 24740)) ;;; Generated autoloads from tmm.el (define-key global-map "\M-`" 'tmm-menubar) - (define-key global-map [f10] 'tmm-menubar) (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) (autoload (quote tmm-menubar) "tmm" "\ @@ -27588,7 +27855,7 @@ Its value should be an event that has a binding in MENU. ;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities ;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category) -;;;;;; "todo-mode" "calendar/todo-mode.el" (17962 52848)) +;;;;;; "todo-mode" "calendar/todo-mode.el" (18104 24745)) ;;; Generated autoloads from calendar/todo-mode.el (autoload (quote todo-add-category) "todo-mode" "\ @@ -27648,10 +27915,16 @@ Show TODO list. ;;;*** ;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu -;;;;;; tool-bar-local-item tool-bar-add-item) "tool-bar" "tool-bar.el" -;;;;;; (17842 58278)) +;;;;;; tool-bar-local-item tool-bar-add-item toggle-tool-bar-mode-from-frame) +;;;;;; "tool-bar" "tool-bar.el" (18104 24740)) ;;; Generated autoloads from tool-bar.el +(autoload (quote toggle-tool-bar-mode-from-frame) "tool-bar" "\ +Toggle tool bar on or off, based on the status of the current frame. +See `tool-bar-mode' for more information. + +\(fn &optional ARG)" t nil) + (put (quote tool-bar-mode) (quote standard-value) (quote (t))) (autoload (quote tool-bar-add-item) "tool-bar" "\ @@ -27716,7 +27989,7 @@ holds a keymap. ;;;*** ;;;### (autoloads (tpu-edt-on tpu-edt-mode) "tpu-edt" "emulation/tpu-edt.el" -;;;;;; (18006 55796)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/tpu-edt.el (defvar tpu-edt-mode nil "\ @@ -27743,7 +28016,7 @@ Turn on TPU/edt emulation. ;;;*** ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins) -;;;;;; "tpu-extras" "emulation/tpu-extras.el" (17842 54264)) +;;;;;; "tpu-extras" "emulation/tpu-extras.el" (18104 24748)) ;;; Generated autoloads from emulation/tpu-extras.el (autoload (quote tpu-set-scroll-margins) "tpu-extras" "\ @@ -27763,7 +28036,7 @@ Constrain the cursor to the flow of the text. ;;;*** -;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (17842 54152)) +;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/tq.el (autoload (quote tq-create) "tq" "\ @@ -27777,7 +28050,7 @@ to a tcp server on another machine. ;;;*** ;;;### (autoloads (trace-function-background trace-function trace-buffer) -;;;;;; "trace" "emacs-lisp/trace.el" (17842 54152)) +;;;;;; "trace" "emacs-lisp/trace.el" (18104 24748)) ;;; Generated autoloads from emacs-lisp/trace.el (defvar trace-buffer "*trace-output*" "\ @@ -27813,32 +28086,43 @@ 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-completion-file-name-regexp -;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17934 45069)) +;;;;;; tramp-file-name-handler tramp-syntax) "tramp" "net/tramp.el" +;;;;;; (18104 24760)) ;;; Generated autoloads from net/tramp.el -(defvar tramp-unified-filenames (not (featurep (quote xemacs))) "\ -Non-nil means to use unified Ange-FTP/Tramp filename syntax. -Otherwise, use a separate filename syntax for Tramp.") +(defvar tramp-syntax (if (featurep (quote xemacs)) (quote sep) (quote ftp)) "\ +Tramp filename syntax to be used. + +It can have the following values: + + 'ftp -- Ange-FTP respective EFS like syntax (GNU Emacs default) + 'sep -- Syntax as defined for XEmacs (not available yet for GNU Emacs) + 'url -- URL-like syntax.") + +(custom-autoload (quote tramp-syntax) "tramp" t) (defconst tramp-file-name-regexp-unified "\\`/[^/:]+:" "\ Value for `tramp-file-name-regexp' for unified remoting. Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and -Tramp. See `tramp-file-name-structure-unified' for more explanations.") +Tramp. See `tramp-file-name-structure' for more explanations.") (defconst tramp-file-name-regexp-separate "\\`/\\[.*\\]" "\ Value for `tramp-file-name-regexp' for separate remoting. XEmacs uses a separate filename syntax for Tramp and EFS. -See `tramp-file-name-structure-separate' for more explanations.") +See `tramp-file-name-structure' for more explanations.") + +(defconst tramp-file-name-regexp-url "\\`/[^/:]+://" "\ +Value for `tramp-file-name-regexp' for URL-like remoting. +See `tramp-file-name-structure' for more explanations.") -(defvar tramp-file-name-regexp (if tramp-unified-filenames tramp-file-name-regexp-unified tramp-file-name-regexp-separate) "\ +(defconst tramp-file-name-regexp (cond ((equal tramp-syntax (quote ftp)) tramp-file-name-regexp-unified) ((equal tramp-syntax (quote sep)) tramp-file-name-regexp-separate) ((equal tramp-syntax (quote url)) tramp-file-name-regexp-url) (t (error "Wrong `tramp-syntax' defined"))) "\ *Regular expression matching file names handled by tramp. This regexp should match tramp file names but no other file names. \(When tramp.el is loaded, this regular expression is prepended to `file-name-handler-alist', and that is searched sequentially. Thus, if the tramp entry appears rather early in the `file-name-handler-alist' and is a bit too general, then some files might be considered tramp -files which are not really tramp files. +files which are not really Tramp files. Please note that the entry in `file-name-handler-alist' is made when this file (tramp.el) is loaded. This means that this variable must be set @@ -27847,19 +28131,21 @@ updated after changing this variable. Also see `tramp-file-name-structure'.") -(custom-autoload (quote tramp-file-name-regexp) "tramp" t) - -(defconst tramp-completion-file-name-regexp-unified "^/$\\|^/[^/:][^/]*$" "\ +(defconst tramp-completion-file-name-regexp-unified (if (memq system-type (quote (cygwin windows-nt))) "^\\([a-zA-Z]:\\)?/$\\|^\\([a-zA-Z]:\\)?/[^/:][^/]*$" "^/$\\|^/[^/:][^/]*$") "\ Value for `tramp-completion-file-name-regexp' for unified remoting. Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and -Tramp. See `tramp-file-name-structure-unified' for more explanations.") +Tramp. See `tramp-file-name-structure' for more explanations.") -(defconst tramp-completion-file-name-regexp-separate "^/\\([[][^]]*\\)?$" "\ +(defconst tramp-completion-file-name-regexp-separate (if (memq system-type (quote (cygwin windows-nt))) "^\\([a-zA-Z]:\\)?/\\([[][^]]*\\)?$" "^/\\([[][^]]*\\)?$") "\ Value for `tramp-completion-file-name-regexp' for separate remoting. XEmacs uses a separate filename syntax for Tramp and EFS. -See `tramp-file-name-structure-separate' for more explanations.") +See `tramp-file-name-structure' for more explanations.") + +(defconst tramp-completion-file-name-regexp-url (if (memq system-type (quote (cygwin windows-nt))) "^\\([a-zA-Z]:\\)?/$\\|^\\([a-zA-Z]:\\)?/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?$" "^/$\\|^/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?$") "\ +Value for `tramp-completion-file-name-regexp' for URL-like remoting. +See `tramp-file-name-structure' for more explanations.") -(defvar tramp-completion-file-name-regexp (if tramp-unified-filenames tramp-completion-file-name-regexp-unified tramp-completion-file-name-regexp-separate) "\ +(defconst tramp-completion-file-name-regexp (cond ((equal tramp-syntax (quote ftp)) tramp-completion-file-name-regexp-unified) ((equal tramp-syntax (quote sep)) tramp-completion-file-name-regexp-separate) ((equal tramp-syntax (quote url)) tramp-completion-file-name-regexp-url) (t (error "Wrong `tramp-syntax' defined"))) "\ *Regular expression matching file names handled by tramp completion. This regexp should match partial tramp file names only. @@ -27870,8 +28156,6 @@ updated after changing this variable. Also see `tramp-file-name-structure'.") -(custom-autoload (quote tramp-completion-file-name-regexp) "tramp" t) - (defconst tramp-completion-file-name-handler-alist (quote ((file-name-all-completions . tramp-completion-handle-file-name-all-completions) (file-name-completion . tramp-completion-handle-file-name-completion))) "\ Alist of completion handler functions. Used for file names matching `tramp-file-name-regexp'. Operations not @@ -27899,11 +28183,11 @@ Invoke tramp file name completion handler. Falls back to normal file name handler if no tramp file name handler exists." (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) (if fn (save-match-data (apply (cdr fn) args)) (tramp-completion-run-real-handler operation args)))) (defsubst tramp-register-file-name-handler nil "\ -Add tramp file name handler to `file-name-handler-alist'." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist)))))) +Add tramp file name handler to `file-name-handler-alist'." (let ((a1 (rassq (quote tramp-file-name-handler) file-name-handler-alist))) (setq file-name-handler-alist (delete a1 file-name-handler-alist))) (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist)))))) +(tramp-register-file-name-handler) (defsubst tramp-register-completion-file-name-handler nil "\ -Add tramp completion file name handler to `file-name-handler-alist'." (when (or (not (boundp (quote partial-completion-mode))) (symbol-value (quote partial-completion-mode)) (featurep (quote ido))) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist)))))) -(tramp-register-file-name-handler) +Add tramp completion file name handler to `file-name-handler-alist'." (let ((a1 (rassq (quote tramp-completion-file-name-handler) file-name-handler-alist))) (setq file-name-handler-alist (delete a1 file-name-handler-alist))) (when (or (not (boundp (quote partial-completion-mode))) (symbol-value (quote partial-completion-mode)) (featurep (quote ido))) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist)))))) (add-hook 'after-init-hook '(lambda () (tramp-register-completion-file-name-handler))) @@ -27914,12 +28198,12 @@ Not documented \(fn)" nil nil) (autoload (quote tramp-completion-handle-file-name-all-completions) "tramp" "\ -Like `file-name-all-completions' for partial tramp files. +Like `file-name-all-completions' for partial Tramp files. \(fn FILENAME DIRECTORY)" nil nil) (autoload (quote tramp-completion-handle-file-name-completion) "tramp" "\ -Like `file-name-completion' for tramp files. +Like `file-name-completion' for Tramp files. \(fn FILENAME DIRECTORY &optional PREDICATE)" nil nil) @@ -27931,7 +28215,7 @@ Discard Tramp from loading remote files. ;;;*** ;;;### (autoloads (tramp-ftp-enable-ange-ftp) "tramp-ftp" "net/tramp-ftp.el" -;;;;;; (17842 55218)) +;;;;;; (18104 24760)) ;;; Generated autoloads from net/tramp-ftp.el (autoload (quote tramp-ftp-enable-ange-ftp) "tramp-ftp" "\ @@ -27941,8 +28225,8 @@ Not documented ;;;*** -;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (18006 -;;;;;; 55796)) +;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (18104 +;;;;;; 24740)) ;;; Generated autoloads from tutorial.el (autoload (quote help-with-tutorial) "tutorial" "\ @@ -27967,7 +28251,7 @@ resumed later. ;;;*** ;;;### (autoloads (2C-split 2C-associate-buffer 2C-two-columns) "two-column" -;;;;;; "textmodes/two-column.el" (17842 58276)) +;;;;;; "textmodes/two-column.el" (18104 24773)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) (global-set-key "\C-x6" '2C-command) @@ -28018,7 +28302,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" -;;;;;; (17908 29123)) +;;;;;; (18104 24740)) ;;; Generated autoloads from type-break.el (defvar type-break-mode nil "\ @@ -28201,7 +28485,7 @@ FRAC should be the inverse of the fractional value; for example, a value of ;;;*** ;;;### (autoloads (ununderline-region underline-region) "underline" -;;;;;; "textmodes/underline.el" (17842 58276)) +;;;;;; "textmodes/underline.el" (18104 24773)) ;;; Generated autoloads from textmodes/underline.el (autoload (quote underline-region) "underline" "\ @@ -28222,7 +28506,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) -;;;;;; "undigest" "mail/undigest.el" (17842 55035)) +;;;;;; "undigest" "mail/undigest.el" (18104 24758)) ;;; Generated autoloads from mail/undigest.el (autoload (quote undigestify-rmail-message) "undigest" "\ @@ -28241,7 +28525,7 @@ following the containing message. ;;;*** ;;;### (autoloads (unrmail batch-unrmail) "unrmail" "mail/unrmail.el" -;;;;;; (17842 55035)) +;;;;;; (18104 24758)) ;;; Generated autoloads from mail/unrmail.el (autoload (quote batch-unrmail) "unrmail" "\ @@ -28260,8 +28544,8 @@ Convert Rmail file FILE to system inbox format file TO-FILE. ;;;*** -;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (17842 -;;;;;; 54152)) +;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emacs-lisp/unsafep.el (autoload (quote unsafep) "unsafep" "\ @@ -28274,7 +28558,7 @@ of symbols with local bindings. ;;;*** ;;;### (autoloads (url-retrieve-synchronously url-retrieve) "url" -;;;;;; "url/url.el" (17842 56569)) +;;;;;; "url/url.el" (18104 24773)) ;;; Generated autoloads from url/url.el (autoload (quote url-retrieve) "url" "\ @@ -28314,7 +28598,7 @@ no further processing). URL is either a string or a parsed URL. ;;;*** ;;;### (autoloads (url-register-auth-scheme url-get-authentication) -;;;;;; "url-auth" "url/url-auth.el" (17854 10173)) +;;;;;; "url-auth" "url/url-auth.el" (18104 24773)) ;;; Generated autoloads from url/url-auth.el (autoload (quote url-get-authentication) "url-auth" "\ @@ -28356,8 +28640,8 @@ RATING a rating between 1 and 10 of the strength of the authentication. ;;;*** ;;;### (autoloads (url-cache-expired url-cache-extract url-is-cached -;;;;;; url-store-in-cache) "url-cache" "url/url-cache.el" (17842 -;;;;;; 56569)) +;;;;;; url-store-in-cache) "url-cache" "url/url-cache.el" (18104 +;;;;;; 24773)) ;;; Generated autoloads from url/url-cache.el (autoload (quote url-store-in-cache) "url-cache" "\ @@ -28382,7 +28666,7 @@ Return t iff a cached file has expired. ;;;*** -;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (17842 56569)) +;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (18104 24773)) ;;; Generated autoloads from url/url-cid.el (autoload (quote url-cid) "url-cid" "\ @@ -28393,7 +28677,7 @@ Not documented ;;;*** ;;;### (autoloads (url-dav-vc-registered url-dav-supported-p) "url-dav" -;;;;;; "url/url-dav.el" (17842 56569)) +;;;;;; "url/url-dav.el" (18104 24773)) ;;; Generated autoloads from url/url-dav.el (autoload (quote url-dav-supported-p) "url-dav" "\ @@ -28408,8 +28692,8 @@ Not documented ;;;*** -;;;### (autoloads (url-file) "url-file" "url/url-file.el" (17842 -;;;;;; 56569)) +;;;### (autoloads (url-file) "url-file" "url/url-file.el" (18104 +;;;;;; 24773)) ;;; Generated autoloads from url/url-file.el (autoload (quote url-file) "url-file" "\ @@ -28420,7 +28704,7 @@ Handle file: and ftp: URLs. ;;;*** ;;;### (autoloads (url-open-stream url-gateway-nslookup-host) "url-gw" -;;;;;; "url/url-gw.el" (17842 56569)) +;;;;;; "url/url-gw.el" (18104 24773)) ;;; Generated autoloads from url/url-gw.el (autoload (quote url-gateway-nslookup-host) "url-gw" "\ @@ -28439,8 +28723,8 @@ Might do a non-blocking connection; use `process-status' to check. ;;;*** ;;;### (autoloads (url-insert-file-contents url-file-local-copy url-copy-file -;;;;;; url-handler-mode) "url-handlers" "url/url-handlers.el" (17842 -;;;;;; 56569)) +;;;;;; url-handler-mode) "url-handlers" "url/url-handlers.el" (18104 +;;;;;; 24773)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -28484,7 +28768,7 @@ Not documented ;;;*** ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p -;;;;;; url-http) "url-http" "url/url-http.el" (17952 11683)) +;;;;;; url-http) "url-http" "url/url-http.el" (18104 24773)) ;;; Generated autoloads from url/url-http.el (autoload (quote url-http) "url-http" "\ @@ -28549,7 +28833,7 @@ HTTPS retrievals are asynchronous.") ;;;*** -;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (17842 56569)) +;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (18104 24773)) ;;; Generated autoloads from url/url-irc.el (autoload (quote url-irc) "url-irc" "\ @@ -28559,8 +28843,8 @@ Not documented ;;;*** -;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (17842 -;;;;;; 56569)) +;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (18104 +;;;;;; 24773)) ;;; Generated autoloads from url/url-ldap.el (autoload (quote url-ldap) "url-ldap" "\ @@ -28574,7 +28858,7 @@ URL can be a URL string, or a URL vector of the type returned by ;;;*** ;;;### (autoloads (url-mailto url-mail) "url-mailto" "url/url-mailto.el" -;;;;;; (18012 18089)) +;;;;;; (18104 24773)) ;;; Generated autoloads from url/url-mailto.el (autoload (quote url-mail) "url-mailto" "\ @@ -28590,7 +28874,7 @@ Handle the mailto: URL syntax. ;;;*** ;;;### (autoloads (url-data url-generic-emulator-loader url-info -;;;;;; url-man) "url-misc" "url/url-misc.el" (17842 56569)) +;;;;;; url-man) "url-misc" "url/url-misc.el" (18104 24773)) ;;; Generated autoloads from url/url-misc.el (autoload (quote url-man) "url-misc" "\ @@ -28622,7 +28906,7 @@ Fetch a data URL (RFC 2397). ;;;*** ;;;### (autoloads (url-snews url-news) "url-news" "url/url-news.el" -;;;;;; (17842 56569)) +;;;;;; (18104 24773)) ;;; Generated autoloads from url/url-news.el (autoload (quote url-news) "url-news" "\ @@ -28639,7 +28923,7 @@ Not documented ;;;### (autoloads (url-ns-user-pref url-ns-prefs isInNet isResolvable ;;;;;; dnsResolve dnsDomainIs isPlainHostName) "url-ns" "url/url-ns.el" -;;;;;; (17842 56569)) +;;;;;; (18104 24773)) ;;; Generated autoloads from url/url-ns.el (autoload (quote isPlainHostName) "url-ns" "\ @@ -28680,7 +28964,7 @@ Not documented ;;;*** ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" -;;;;;; "url/url-parse.el" (17954 22157)) +;;;;;; "url/url-parse.el" (18104 24773)) ;;; Generated autoloads from url/url-parse.el (autoload (quote url-recreate-url) "url-parse" "\ @@ -28698,7 +28982,7 @@ Format is: ;;;*** ;;;### (autoloads (url-setup-privacy-info) "url-privacy" "url/url-privacy.el" -;;;;;; (17842 56569)) +;;;;;; (18104 24773)) ;;; Generated autoloads from url/url-privacy.el (autoload (quote url-setup-privacy-info) "url-privacy" "\ @@ -28714,7 +28998,7 @@ Setup variables that expose info about you and your system. ;;;;;; 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" -;;;;;; (17842 56569)) +;;;;;; (18104 24773)) ;;; Generated autoloads from url/url-util.el (defvar url-debug nil "\ @@ -28843,7 +29127,7 @@ This uses `url-current-object', set locally to the buffer. ;;;*** ;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) -;;;;;; "userlock" "userlock.el" (17842 58278)) +;;;;;; "userlock" "userlock.el" (18104 24740)) ;;; Generated autoloads from userlock.el (autoload (quote ask-user-about-lock) "userlock" "\ @@ -28873,7 +29157,7 @@ The buffer in question is current when this function is called. ;;;### (autoloads (uudecode-decode-region uudecode-decode-region-internal ;;;;;; uudecode-decode-region-external) "uudecode" "gnus/uudecode.el" -;;;;;; (17855 50203)) +;;;;;; (18104 24755)) ;;; Generated autoloads from gnus/uudecode.el (autoload (quote uudecode-decode-region-external) "uudecode" "\ @@ -28898,12 +29182,12 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;*** ;;;### (autoloads (vc-annotate vc-update-change-log vc-rename-file -;;;;;; vc-transfer-file vc-switch-backend vc-cancel-version vc-update -;;;;;; vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot +;;;;;; vc-transfer-file vc-switch-backend vc-rollback vc-update +;;;;;; vc-revert vc-print-log vc-retrieve-snapshot vc-create-snapshot ;;;;;; vc-directory vc-merge vc-insert-headers vc-version-other-window ;;;;;; vc-diff vc-register vc-next-action vc-do-command edit-vc-file ;;;;;; with-vc-file vc-branch-part vc-trunk-p vc-before-checkin-hook -;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (17992 30877)) +;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (18104 24741)) ;;; Generated autoloads from vc.el (defvar vc-checkout-hook nil "\ @@ -28959,12 +29243,12 @@ already current, set it up properly and erase it. The command is considered successful if its exit status does not exceed OKSTATUS (if OKSTATUS is nil, that means to ignore error status, if it is `async', that means not to wait for termination of the subprocess; if it is t it means to -ignore all execution errors). FILE is the -name of the working file (may also be nil, to execute commands that -don't expect a file name). If an optional list of FLAGS is present, +ignore all execution errors). FILE-OR-LIST is the name of a working file; +it may be a list of files or be nil (to execute commands that don't expect +a file name or set of files). If an optional list of FLAGS is present, that is inserted into the command line before the filename. -\(fn BUFFER OKSTATUS COMMAND FILE &rest FLAGS)" nil nil) +\(fn BUFFER OKSTATUS COMMAND FILE-OR-LIST &rest FLAGS)" nil nil) (autoload (quote vc-next-action) "vc" "\ Do the next logical version control operation on the current file. @@ -29095,7 +29379,7 @@ If FOCUS-REV is non-nil, leave the point at that revision. \(fn &optional FOCUS-REV)" t nil) -(autoload (quote vc-revert-buffer) "vc" "\ +(autoload (quote vc-revert) "vc" "\ Revert the current buffer's file to the version it was based on. This asks for confirmation if the buffer contents are not identical to that version. This function does not automatically pick up newer @@ -29112,11 +29396,10 @@ the current branch are merged into the working file. \(fn)" t nil) -(autoload (quote vc-cancel-version) "vc" "\ +(autoload (quote vc-rollback) "vc" "\ Get rid of most recently checked in version of this file. -A prefix argument NOREVERT means do not revert the buffer afterwards. -\(fn NOREVERT)" t nil) +\(fn)" t nil) (autoload (quote vc-switch-backend) "vc" "\ Make BACKEND the current version control system for FILE. @@ -29191,7 +29474,7 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** -;;;### (autoloads nil "vc-arch" "vc-arch.el" (17930 34221)) +;;;### (autoloads nil "vc-arch" "vc-arch.el" (18104 24740)) ;;; Generated autoloads from vc-arch.el (defun vc-arch-registered (file) (if (vc-find-root file "{arch}/=tagging-method") @@ -29201,7 +29484,19 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** -;;;### (autoloads nil "vc-cvs" "vc-cvs.el" (17842 58278)) +;;;### (autoloads nil "vc-bzr" "vc-bzr.el" (18104 24740)) +;;; Generated autoloads from vc-bzr.el + +(defconst vc-bzr-admin-dirname ".bzr") + (defun vc-bzr-registered (file) + (if (vc-find-root file vc-bzr-admin-dirname) + (progn + (load "vc-bzr") + (vc-bzr-registered file)))) + +;;;*** + +;;;### (autoloads nil "vc-cvs" "vc-cvs.el" (18104 24740)) ;;; Generated autoloads from vc-cvs.el (defun vc-cvs-registered (f) (when (file-readable-p (expand-file-name @@ -29211,7 +29506,29 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** -;;;### (autoloads nil "vc-mcvs" "vc-mcvs.el" (17842 58278)) +;;;### (autoloads nil "vc-git" "vc-git.el" (18104 24740)) +;;; Generated autoloads from vc-git.el + (defun vc-git-registered (file) + "Return non-nil if FILE is registered with git." + (if (vc-find-root file ".git") ; short cut + (progn + (load "vc-git") + (vc-git-registered file)))) + +;;;*** + +;;;### (autoloads nil "vc-hg" "vc-hg.el" (18104 24740)) +;;; Generated autoloads from vc-hg.el + (defun vc-hg-registered (file) + "Return non-nil if FILE is registered with hg." + (if (vc-find-root file ".hg") ; short cut + (progn + (load "vc-hg") + (vc-hg-registered file)))) + +;;;*** + +;;;### (autoloads nil "vc-mcvs" "vc-mcvs.el" (18104 24741)) ;;; Generated autoloads from vc-mcvs.el (defun vc-mcvs-registered (file) (if (vc-find-root file "MCVS/CVS") @@ -29222,7 +29539,7 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** ;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc-rcs.el" -;;;;;; (17925 15266)) +;;;;;; (18104 24741)) ;;; Generated autoloads from vc-rcs.el (defvar vc-rcs-master-templates (quote ("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ @@ -29235,7 +29552,7 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** ;;;### (autoloads (vc-sccs-master-templates) "vc-sccs" "vc-sccs.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24741)) ;;; Generated autoloads from vc-sccs.el (defvar vc-sccs-master-templates (quote ("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ @@ -29252,7 +29569,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** -;;;### (autoloads nil "vc-svn" "vc-svn.el" (17881 64914)) +;;;### (autoloads nil "vc-svn" "vc-svn.el" (18104 24741)) ;;; Generated autoloads from vc-svn.el (defun vc-svn-registered (f) (let ((admin-dir (cond ((and (eq system-type 'windows-nt) @@ -29269,8 +29586,66 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** +;;;### (autoloads (vera-mode) "vera-mode" "progmodes/vera-mode.el" +;;;;;; (18104 24769)) +;;; Generated autoloads from progmodes/vera-mode.el + (add-to-list 'auto-mode-alist '("\\.vr[hi]?\\'" . vera-mode)) + +(autoload (quote vera-mode) "vera-mode" "\ +Major mode for editing Vera code. + +Usage: +------ + + INDENTATION: Typing `TAB' at the beginning of a line indents the line. + The amount of indentation is specified by option `vera-basic-offset'. + Indentation can be done for an entire region (`M-C-\\') or buffer (menu). + `TAB' always indents the line if option `vera-intelligent-tab' is nil. + + WORD/COMMAND COMPLETION: Typing `TAB' after a (not completed) word looks + for a word in the buffer or a Vera keyword that starts alike, inserts it + and adjusts case. Re-typing `TAB' toggles through alternative word + completions. + + Typing `TAB' after a non-word character inserts a tabulator stop (if not + at the beginning of a line). `M-TAB' always inserts a tabulator stop. + + COMMENTS: `C-c C-c' comments out a region if not commented out, and + uncomments a region if already commented out. + + HIGHLIGHTING (fontification): Vera keywords, predefined types and + constants, function names, declaration names, directives, as well as + comments and strings are highlighted using different colors. + + VERA VERSION: OpenVera 1.4 and Vera version 6.2.8. + + +Maintenance: +------------ + +To submit a bug report, use the corresponding menu entry within Vera Mode. +Add a description of the problem and include a reproducible test case. + +Feel free to send questions and enhancement requests to <reto@gnu.org>. + +Official distribution is at +<http://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html>. + + + The Vera Mode Maintainer + Reto Zimmermann <reto@gnu.org> + +Key bindings: +------------- + +\\{vera-mode-map} + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" -;;;;;; (17962 27361)) +;;;;;; (18104 24769)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload (quote vhdl-mode) "vhdl-mode" "\ @@ -29811,7 +30186,7 @@ Key bindings: ;;;*** -;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (17788 40208)) +;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (17821 5856)) ;;; Generated autoloads from emulation/vi.el (autoload (quote vi-mode) "vi" "\ @@ -29866,7 +30241,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs. ;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion ;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer ;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util" -;;;;;; "language/viet-util.el" (17842 58278)) +;;;;;; "language/viet-util.el" (18104 24758)) ;;; Generated autoloads from language/viet-util.el (autoload (quote viet-encode-viscii-char) "viet-util" "\ @@ -29912,8 +30287,8 @@ Not documented ;;;### (autoloads (View-exit-and-edit view-mode-enter view-mode view-buffer-other-frame ;;;;;; view-buffer-other-window view-buffer view-file-other-frame -;;;;;; view-file-other-window view-file) "view" "view.el" (18006 -;;;;;; 55796)) +;;;;;; view-file-other-window view-file) "view" "view.el" (18104 +;;;;;; 24741)) ;;; Generated autoloads from view.el (defvar view-mode nil "\ @@ -30122,8 +30497,8 @@ Exit View mode and make the current buffer editable. ;;;*** -;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (17842 -;;;;;; 54264)) +;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (18104 +;;;;;; 24748)) ;;; Generated autoloads from emulation/vip.el (autoload (quote vip-setup) "vip" "\ @@ -30139,7 +30514,7 @@ Turn on VIP emulation of VI. ;;;*** ;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el" -;;;;;; (17921 23052)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/viper.el (autoload (quote toggle-viper-mode) "viper" "\ @@ -30156,7 +30531,7 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'. ;;;*** ;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el" -;;;;;; (17935 13348)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emacs-lisp/warnings.el (defvar warning-prefix-function nil "\ @@ -30246,7 +30621,7 @@ this is equivalent to `display-warning', using ;;;*** ;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24742)) ;;; Generated autoloads from wdired.el (autoload (quote wdired-change-to-wdired-mode) "wdired" "\ @@ -30262,7 +30637,7 @@ See `wdired-mode'. ;;;*** -;;;### (autoloads (webjump) "webjump" "net/webjump.el" (17842 55218)) +;;;### (autoloads (webjump) "webjump" "net/webjump.el" (18104 24760)) ;;; Generated autoloads from net/webjump.el (autoload (quote webjump) "webjump" "\ @@ -30279,7 +30654,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;;;*** ;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el" -;;;;;; (17842 56332)) +;;;;;; (18104 24769)) ;;; Generated autoloads from progmodes/which-func.el (put 'which-func-format 'risky-local-variable t) (put 'which-func-current 'risky-local-variable t) @@ -30312,7 +30687,7 @@ and off otherwise. ;;;;;; whitespace-buffer whitespace-toggle-ateol-check whitespace-toggle-spacetab-check ;;;;;; whitespace-toggle-indent-check whitespace-toggle-trailing-check ;;;;;; whitespace-toggle-leading-check) "whitespace" "whitespace.el" -;;;;;; (17925 15266)) +;;;;;; (18104 24742)) ;;; Generated autoloads from whitespace.el (autoload (quote whitespace-toggle-leading-check) "whitespace" "\ @@ -30403,7 +30778,7 @@ This is meant to be added buffer-locally to `write-file-functions'. ;;;*** ;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse -;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (17842 58278)) +;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (18104 24742)) ;;; Generated autoloads from wid-browse.el (autoload (quote widget-browse-at) "wid-browse" "\ @@ -30430,8 +30805,8 @@ With arg, turn widget mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (17952 -;;;;;; 11093)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (18104 +;;;;;; 24742)) ;;; Generated autoloads from wid-edit.el (autoload (quote widgetp) "wid-edit" "\ @@ -30475,8 +30850,8 @@ Setup current buffer so editing string widgets works. ;;;*** ;;;### (autoloads (windmove-default-keybindings windmove-down windmove-right -;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (17842 -;;;;;; 58278)) +;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (18104 +;;;;;; 24742)) ;;; Generated autoloads from windmove.el (autoload (quote windmove-left) "windmove" "\ @@ -30529,7 +30904,7 @@ Default MODIFIER is 'shift. ;;;*** ;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el" -;;;;;; (17842 58278)) +;;;;;; (18104 24743)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -30548,7 +30923,7 @@ With arg, turn Winner mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" -;;;;;; "woman.el" (17949 41467)) +;;;;;; "woman.el" (18104 24743)) ;;; Generated autoloads from woman.el (autoload (quote woman) "woman" "\ @@ -30584,7 +30959,7 @@ decompress the file if appropriate. See the documentation for the ;;;*** ;;;### (autoloads (wordstar-mode) "ws-mode" "emulation/ws-mode.el" -;;;;;; (17842 54264)) +;;;;;; (18104 24748)) ;;; Generated autoloads from emulation/ws-mode.el (autoload (quote wordstar-mode) "ws-mode" "\ @@ -30697,7 +31072,7 @@ The key bindings are: ;;;*** ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" -;;;;;; (17916 14776)) +;;;;;; (18104 24743)) ;;; Generated autoloads from xml.el (autoload (quote xml-parse-file) "xml" "\ @@ -30722,8 +31097,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded. ;;;*** -;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (18007 -;;;;;; 39657)) +;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (18104 +;;;;;; 24743)) ;;; Generated autoloads from xt-mouse.el (defvar xterm-mouse-mode nil "\ @@ -30751,7 +31126,7 @@ down the SHIFT key while pressing the mouse button. ;;;*** ;;;### (autoloads (yenc-extract-filename yenc-decode-region) "yenc" -;;;;;; "gnus/yenc.el" (17842 54741)) +;;;;;; "gnus/yenc.el" (18104 24756)) ;;; Generated autoloads from gnus/yenc.el (autoload (quote yenc-decode-region) "yenc" "\ @@ -30767,7 +31142,7 @@ Extract file name from an yenc header. ;;;*** ;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism -;;;;;; yow) "yow" "play/yow.el" (17842 55395)) +;;;;;; yow) "yow" "play/yow.el" (18104 24762)) ;;; Generated autoloads from play/yow.el (autoload (quote yow) "yow" "\ @@ -30793,7 +31168,7 @@ Zippy goes to the analyst. ;;;*** -;;;### (autoloads (zone) "zone" "play/zone.el" (17941 38806)) +;;;### (autoloads (zone) "zone" "play/zone.el" (18104 24762)) ;;; Generated autoloads from play/zone.el (autoload (quote zone) "zone" "\ @@ -30827,32 +31202,32 @@ Zone out, completely. ;;;;;; "ediff-init.el" "ediff-merg.el" "ediff-ptch.el" "ediff-vers.el" ;;;;;; "ediff-wind.el" "electric.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el" ;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/byte-run.el" -;;;;;; "emacs-lisp/cl-compat.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" -;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" -;;;;;; "emacs-lisp/find-gc.el" "emacs-lisp/float-sup.el" "emacs-lisp/gulp.el" -;;;;;; "emacs-lisp/levents.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/lisp-mode.el" -;;;;;; "emacs-lisp/lisp.el" "emacs-lisp/lmenu.el" "emacs-lisp/lselect.el" -;;;;;; "emacs-lisp/lucid.el" "emacs-lisp/map-ynp.el" "emacs-lisp/regi.el" -;;;;;; "emacs-lisp/sregex.el" "emacs-lisp/syntax.el" "emacs-lisp/tcover-ses.el" -;;;;;; "emacs-lisp/tcover-unsafep.el" "emacs-lock.el" "emulation/cua-gmrk.el" -;;;;;; "emulation/cua-rect.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" -;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/tpu-mapper.el" -;;;;;; "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el" -;;;;;; "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el" -;;;;;; "emulation/viper-util.el" "env.el" "erc/erc-backend.el" "erc/erc-goodies.el" -;;;;;; "erc/erc-ibuffer.el" "erc/erc-lang.el" "erc/erc-nicklist.el" -;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" -;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" -;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" -;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" -;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" -;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" -;;;;;; "eshell/esh-maint.el" "eshell/esh-module.el" "eshell/esh-opt.el" -;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" -;;;;;; "ezimage.el" "faces.el" "files.el" "finder-inf.el" "foldout.el" -;;;;;; "font-core.el" "font-lock.el" "format.el" "forms-d2.el" "forms-pass.el" -;;;;;; "frame.el" "fringe.el" "generic-x.el" "gnus/compface.el" +;;;;;; "emacs-lisp/cl-compat.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" +;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" +;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/find-gc.el" "emacs-lisp/float-sup.el" +;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/levents.el" "emacs-lisp/lisp-mnt.el" +;;;;;; "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" "emacs-lisp/lmenu.el" +;;;;;; "emacs-lisp/lselect.el" "emacs-lisp/lucid.el" "emacs-lisp/map-ynp.el" +;;;;;; "emacs-lisp/regi.el" "emacs-lisp/sregex.el" "emacs-lisp/syntax.el" +;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emacs-lock.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" +;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" +;;;;;; "emulation/edt-vt100.el" "emulation/tpu-mapper.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "env.el" "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" +;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" +;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" +;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" +;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" +;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" +;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" +;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el" +;;;;;; "eshell/esh-io.el" "eshell/esh-maint.el" "eshell/esh-module.el" +;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el" +;;;;;; "eshell/esh-var.el" "ezimage.el" "faces.el" "files.el" "finder-inf.el" +;;;;;; "foldout.el" "font-core.el" "font-lock.el" "format.el" "forms-d2.el" +;;;;;; "forms-pass.el" "frame.el" "fringe.el" "generic-x.el" "gnus/compface.el" ;;;;;; "gnus/dig.el" "gnus/dns.el" "gnus/format-spec.el" "gnus/gnus-async.el" ;;;;;; "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cus.el" ;;;;;; "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el" @@ -30900,17 +31275,17 @@ Zone out, completely. ;;;;;; "mh-e/mh-acros.el" "mh-e/mh-alias.el" "mh-e/mh-buffers.el" ;;;;;; "mh-e/mh-compat.el" "mh-e/mh-funcs.el" "mh-e/mh-gnus.el" ;;;;;; "mh-e/mh-identity.el" "mh-e/mh-inc.el" "mh-e/mh-junk.el" -;;;;;; "mh-e/mh-letter.el" "mh-e/mh-limit.el" "mh-e/mh-loaddefs.el" -;;;;;; "mh-e/mh-mime.el" "mh-e/mh-print.el" "mh-e/mh-scan.el" "mh-e/mh-search.el" +;;;;;; "mh-e/mh-letter.el" "mh-e/mh-limit.el" "mh-e/mh-mime.el" +;;;;;; "mh-e/mh-print.el" "mh-e/mh-scan.el" "mh-e/mh-search.el" ;;;;;; "mh-e/mh-seq.el" "mh-e/mh-show.el" "mh-e/mh-speed.el" "mh-e/mh-thread.el" ;;;;;; "mh-e/mh-tool-bar.el" "mh-e/mh-utils.el" "mh-e/mh-xface.el" ;;;;;; "misc.el" "mouse-copy.el" "mouse-drag.el" "mouse.el" "net/eudc-vars.el" ;;;;;; "net/eudcb-bbdb.el" "net/eudcb-ldap.el" "net/eudcb-mab.el" -;;;;;; "net/eudcb-ph.el" "net/ldap.el" "net/netrc.el" "net/tls.el" -;;;;;; "net/tramp-smb.el" "net/tramp-util.el" "net/tramp-uu.el" -;;;;;; "net/tramp-vc.el" "net/trampver.el" "patcomp.el" "paths.el" -;;;;;; "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" "pgg-def.el" -;;;;;; "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" +;;;;;; "net/eudcb-ph.el" "net/ldap.el" "net/netrc.el" "net/socks.el" +;;;;;; "net/tls.el" "net/tramp-cache.el" "net/tramp-fish.el" "net/tramp-gw.el" +;;;;;; "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" "patcomp.el" +;;;;;; "paths.el" "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" +;;;;;; "pgg-def.el" "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" ;;;;;; "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el" ;;;;;; "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" ;;;;;; "progmodes/cc-cmds.el" "progmodes/cc-defs.el" "progmodes/cc-fonts.el" @@ -30919,21 +31294,21 @@ Zone out, completely. ;;;;;; "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" ;;;;;; "progmodes/idlw-complete-structtag.el" "progmodes/idlw-help.el" ;;;;;; "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" "progmodes/xscheme.el" -;;;;;; "register.el" "replace.el" "rfn-eshadow.el" "s-region.el" -;;;;;; "saveplace.el" "sb-image.el" "scroll-bar.el" "select.el" -;;;;;; "soundex.el" "startup.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el" -;;;;;; "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/page.el" -;;;;;; "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el" -;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" -;;;;;; "textmodes/reftex-toc.el" "textmodes/texnfo-upd.el" "textmodes/text-mode.el" -;;;;;; "timezone.el" "tooltip.el" "tree-widget.el" "uniquify.el" -;;;;;; "url/url-about.el" "url/url-cookie.el" "url/url-dired.el" -;;;;;; "url/url-expand.el" "url/url-ftp.el" "url/url-history.el" -;;;;;; "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el" -;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el" -;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" -;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el" -;;;;;; "x-dnd.el") (18016 62249 573562)) +;;;;;; "ps-mule.el" "register.el" "replace.el" "rfn-eshadow.el" +;;;;;; "s-region.el" "saveplace.el" "sb-image.el" "scroll-bar.el" +;;;;;; "select.el" "soundex.el" "startup.el" "subdirs.el" "tempo.el" +;;;;;; "termdev.el" "textmodes/bib-mode.el" "textmodes/makeinfo.el" +;;;;;; "textmodes/page-ext.el" "textmodes/page.el" "textmodes/refbib.el" +;;;;;; "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el" +;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" +;;;;;; "textmodes/texnfo-upd.el" "textmodes/text-mode.el" "timezone.el" +;;;;;; "tooltip.el" "tree-widget.el" "uniquify.el" "url/url-about.el" +;;;;;; "url/url-cookie.el" "url/url-dired.el" "url/url-expand.el" +;;;;;; "url/url-ftp.el" "url/url-history.el" "url/url-imap.el" "url/url-methods.el" +;;;;;; "url/url-nfs.el" "url/url-proxy.el" "url/url-vars.el" "url/vc-dav.el" +;;;;;; "vc-hooks.el" "vcursor.el" "version.el" "vms-patch.el" "vmsproc.el" +;;;;;; "vt-control.el" "vt100-led.el" "w32-fns.el" "w32-vars.el" +;;;;;; "widget.el" "window.el" "x-dnd.el") (18104 28510 272741)) ;;;*** diff --git a/lisp/loadup.el b/lisp/loadup.el index 17ff7a423ba..8789c6db371 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -62,10 +62,10 @@ (load "widget") (load "custom") (load "emacs-lisp/map-ynp") -(load "env") (load "cus-start") (load "international/mule") (load "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake. +(load "env") (load "format") (load "bindings") (setq load-source-file-function 'load-with-code-conversion) @@ -74,6 +74,9 @@ (load "cus-face") (load "faces") ; after here, `defface' may be used. +(load "button") +(load "startup") + (message "Lists of integers (garbage collection statistics) are normal output") (message "while building Emacs; they do not indicate a problem.") (message "%s" (garbage-collect)) @@ -81,7 +84,6 @@ (message "%s" (garbage-collect)) (load "simple") -(load "button") (load "help") (load "jka-cmpr-hook") @@ -147,7 +149,6 @@ (message "%s" (garbage-collect)) (load "menu-bar") (load "paths.el") ;Don't get confused if someone compiled paths by mistake. -(load "startup") (load "emacs-lisp/lisp") (load "textmodes/page") (load "register") @@ -173,7 +174,10 @@ (load "mwheel") (load "tool-bar"))) (if (featurep 'x) - (load "x-dnd")) + (progn + (load "x-dnd") + (load "term/x-win"))) + (message "%s" (garbage-collect)) (if (eq system-type 'vax-vms) @@ -181,6 +185,9 @@ (load "vms-patch"))) (if (eq system-type 'windows-nt) (progn + (load "international/ccl") + (load "international/code-pages") + (load "term/w32-win") (load "ls-lisp") (load "disp-table") ; needed to setup ibm-pc char set, see internal.el (load "dos-w32") @@ -198,6 +205,9 @@ (if (eq system-type 'macos) (progn (load "ls-lisp"))) +(if (featurep 'mac-carbon) + (progn + (load "term/mac-win"))) (if (fboundp 'atan) ; preload some constants and (progn ; floating pt. functions if we have float support. (load "emacs-lisp/float-sup"))) diff --git a/lisp/log-view.el b/lisp/log-view.el index a904a0355dd..b215917a559 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -92,9 +92,12 @@ ("m" . log-view-toggle-mark-entry) ;; ("e" . cvs-mode-edit-log) ("d" . log-view-diff) + ("a" . log-view-annotate-version) ("f" . log-view-find-version) ("n" . log-view-msg-next) ("p" . log-view-msg-prev) + ("\t" . log-view-msg-next) + ([backtab] . log-view-msg-prev) ("N" . log-view-file-next) ("P" . log-view-file-prev) ("\M-n" . log-view-file-next) @@ -114,6 +117,7 @@ ["Mark Log Entry for Diff" set-mark-command] ["Diff Revisions" log-view-diff] ["Visit Version" log-view-find-version] + ["Annotate Version" log-view-annotate-version] ["Next Log Entry" log-view-msg-next] ["Previous Log Entry" log-view-msg-prev] ["Next File" log-view-file-next] @@ -187,6 +191,10 @@ The match group number 1 should match the revision number itself.") "Major mode for browsing CVS log output." (setq buffer-read-only t) (set (make-local-variable 'font-lock-defaults) log-view-font-lock-defaults) + (set (make-local-variable 'beginning-of-defun-function) + 'log-view-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) + 'log-view-end-of-defun) (set (make-local-variable 'cvs-minor-wrap-function) 'log-view-minor-wrap)) ;;;; @@ -214,7 +222,8 @@ The match group number 1 should match the revision number itself.") (save-excursion (forward-line 1) (or (re-search-backward log-view-file-re nil t) - (re-search-forward log-view-file-re)) + (re-search-forward log-view-file-re nil t) + (error "Unable to determine the current file")) (let* ((file (match-string 1)) (cvsdir (and (re-search-backward log-view-dir-re nil t) (match-string 1))) @@ -280,6 +289,51 @@ log entries." (setq pos (overlay-end ov)))) marked-list))) +(defun log-view-beginning-of-defun () + ;; This assumes that a log entry starts with a line matching + ;; `log-view-message-re'. Modes that derive from `log-view-mode' + ;; for which this assumption is not valid will have to provide + ;; another implementation of this function. `log-view-msg-prev' + ;; does a similar job to this function, we can't use it here + ;; directly because it prints messages that are not appropriate in + ;; this context and it does not move to the beginning of the buffer + ;; when the point is before the first log entry. + + ;; `log-view-beginning-of-defun' and `log-view-end-of-defun' have + ;; been checked to work with logs produced by RCS, CVS, git, + ;; mercurial and subversion. + + (re-search-backward log-view-message-re nil 'move)) + +(defun log-view-end-of-defun () + ;; The idea in this function is to search for the beginning of the + ;; next log entry using `log-view-message-re' and then go back one + ;; line when finding it. Modes that derive from `log-view-mode' for + ;; which this assumption is not valid will have to provide another + ;; implementation of this function. + + ;; Look back and if there is no entry there it means we are before + ;; the first log entry, so go forward until finding one. + (unless (save-excursion (re-search-backward log-view-message-re nil t)) + (re-search-forward log-view-message-re nil t)) + + ;; In case we are at the end of log entry going forward a line will + ;; make us find the next entry when searching. If we are inside of + ;; an entry going forward a line will still keep the point inside + ;; the same entry. + (forward-line 1) + + ;; In case we are at the beginning of an entry, move past it. + (when (looking-at log-view-message-re) + (goto-char (match-end 0)) + (forward-line 1)) + + ;; Search for the start of the next log entry. Go to the end of the + ;; buffer if we could not find a next entry. + (when (re-search-forward log-view-message-re nil 'move) + (goto-char (match-beginning 0)) + (forward-line -1))) + (defvar cvs-minor-current-files) (defvar cvs-branch-prefix) (defvar cvs-secondary-branch-prefix) @@ -319,6 +373,14 @@ log entries." (switch-to-buffer (vc-find-version (log-view-current-file) (log-view-current-tag))))) +(defun log-view-annotate-version (pos) + "Annotate the version at point." + (interactive "d") + (save-excursion + (goto-char pos) + (switch-to-buffer (vc-annotate (log-view-current-file) + (log-view-current-tag))))) + ;; ;; diff ;; diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index fbecb2ee593..96d69dc0bb7 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -189,7 +189,7 @@ cvs-update: recompile autoloads finder-data custom-deps # Update the AUTHORS file. update-authors: - $(emacs) -l authors -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) + $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir) TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2) diff --git a/lisp/man.el b/lisp/man.el index c7593e88dda..fc84f327271 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -652,7 +652,13 @@ If POS is nil, the current point is used." (skip-chars-backward "-a-zA-Z0-9._+:") (let ((start (point))) (skip-chars-forward "-a-zA-Z0-9._+:") - (setq word (buffer-substring-no-properties start (point)))) + ;; If there is a continuation at the end of line, check the + ;; following line too, eg: + ;; see this- + ;; command-here(1) + (setq word (buffer-substring-no-properties start (point))) + (if (looking-at "[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])") + (setq word (concat word (match-string 1))))) (if (string-match "[._]+$" word) (setq word (substring word 0 (match-beginning 0)))) ;; If looking at something like *strcat(... , remove the '*' diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el index 1d125e45d95..c1fd0780730 100644 --- a/lisp/mb-depth.el +++ b/lisp/mb-depth.el @@ -32,6 +32,11 @@ ;;; Code: +(defvar minibuf-depth-indicator-function nil + "If non-nil, function to set up the minibuffer depth indicator. +It is called with one argument, the minibuffer depth, +and must return a string.") + ;; An overlay covering the prompt. This is a buffer-local variable in ;; each affected minibuffer. ;; @@ -45,8 +50,9 @@ The prompt should already have been inserted." (when (> (minibuffer-depth) 1) (setq minibuf-depth-overlay (make-overlay (point-min) (1+ (point-min)))) (overlay-put minibuf-depth-overlay 'before-string - (propertize (format "[%d]" (minibuffer-depth)) - 'face 'highlight)) + (if minibuf-depth-indicator-function + (funcall minibuf-depth-indicator-function (minibuffer-depth)) + (propertize (format "[%d]" (minibuffer-depth)) 'face 'highlight))) (overlay-put minibuf-depth-overlay 'evaporate t))) ;;;###autoload diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 148e5916097..d0da787b8a9 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -929,15 +929,15 @@ mail status in mode line")) :button `(:toggle . tooltip-mode))) (define-key menu-bar-showhide-menu [menu-bar-mode] - '(menu-item "Menu-bar" menu-bar-mode + '(menu-item "Menu-bar" toggle-menu-bar-mode-from-frame :help "Turn menu-bar on/off" - :button (:toggle . menu-bar-mode))) + :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) (define-key menu-bar-showhide-menu [showhide-tool-bar] - (list 'menu-item "Tool-bar" 'tool-bar-mode - :help "Turn tool-bar on/off" + (list 'menu-item "Tool-bar" 'toggle-tool-bar-mode-from-frame + :help "Toggle tool-bar on/off" :visible `(display-graphic-p) - :button `(:toggle . tool-bar-mode))) + :button `(:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) (define-key menu-bar-options-menu [showhide] (list 'menu-item "Show/Hide" menu-bar-showhide-menu)) @@ -1253,7 +1253,8 @@ key, a click, or a menu-item")) '(menu-item "Describe Buffer Modes" describe-mode :help "Describe this buffer's major and minor mode")) -(defvar menu-bar-apropos-menu (make-sparse-keymap "Apropos")) +(defvar menu-bar-search-documentation-menu + (make-sparse-keymap "Search Documentation")) (defun menu-bar-read-lispref () "Display the Emacs Lisp Reference manual in Info mode." (interactive) @@ -1281,37 +1282,37 @@ key, a click, or a menu-item")) (info "elisp") (Info-index topic)) -(define-key menu-bar-apropos-menu [apropos-documentation] +(define-key menu-bar-search-documentation-menu [search-documentation-strings] '(menu-item "Search Documentation Strings..." apropos-documentation :help "Find functions and variables whose doc strings match a regexp")) -(define-key menu-bar-apropos-menu [apropos] +(define-key menu-bar-search-documentation-menu [find-any-object-by-name] '(menu-item "Find Any Object by Name..." apropos :help "Find symbols of any kind whose names match a regexp")) -(define-key menu-bar-apropos-menu [apropos-value] +(define-key menu-bar-search-documentation-menu [find-option-by-value] '(menu-item "Find Options by Value..." apropos-value :help "Find variables whose values match a regexp")) -(define-key menu-bar-apropos-menu [apropos-variables] +(define-key menu-bar-search-documentation-menu [find-options-by-name] '(menu-item "Find Options by Name..." apropos-variable :help "Find variables whose names match a regexp")) -(define-key menu-bar-apropos-menu [apropos-commands] +(define-key menu-bar-search-documentation-menu [find-commands-by-name] '(menu-item "Find Commands by Name..." apropos-command :help "Find commands whose names match a regexp")) -(define-key menu-bar-apropos-menu [sep1] +(define-key menu-bar-search-documentation-menu [sep1] '("--")) -(define-key menu-bar-apropos-menu [emacs-command-node] +(define-key menu-bar-search-documentation-menu [lookup-command-in-manual] '(menu-item "Look Up Command in User Manual..." Info-goto-emacs-command-node :help "Display manual section that describes a command")) -(define-key menu-bar-apropos-menu [emacs-key-command-node] +(define-key menu-bar-search-documentation-menu [lookup-key-in-manual] '(menu-item "Look Up Key in User Manual..." Info-goto-emacs-key-command-node :help "Display manual section that describes a key")) -(define-key menu-bar-apropos-menu [elisp-index-search] +(define-key menu-bar-search-documentation-menu [lookup-subject-in-elisp-manual] '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search :help "Find description of a subject in Emacs Lisp manual")) -(define-key menu-bar-apropos-menu [emacs-index-search] +(define-key menu-bar-search-documentation-menu [lookup-subject-in-emacs-manual] '(menu-item "Look Up Subject in User Manual..." emacs-index-search :help "Find description of a subject in Emacs User manual")) -(define-key menu-bar-apropos-menu [emacs-glossary] +(define-key menu-bar-search-documentation-menu [emacs-terminology] '(menu-item "Emacs Terminology" search-emacs-glossary :help "Display the Glossary section of the Emacs manual")) @@ -1325,22 +1326,25 @@ key, a click, or a menu-item")) (define-key menu-bar-manuals-menu [order-emacs-manuals] '(menu-item "Ordering Manuals" view-order-manuals :help "How to order manuals from the Free Software Foundation")) -(define-key menu-bar-manuals-menu [info-apropos] +(define-key menu-bar-manuals-menu [lookup-subject-in-all-manuals] '(menu-item "Lookup Subject in all manuals..." info-apropos :help "Find description of a subject in all installed manuals")) -(define-key menu-bar-manuals-menu [info] +(define-key menu-bar-manuals-menu [other-manuals] '(menu-item "All Other Manuals (Info)" Info-directory :help "Read any of the installed manuals")) -(define-key menu-bar-manuals-menu [info-elisp] +(define-key menu-bar-manuals-menu [emacs-lisp-reference] '(menu-item "Emacs Lisp Reference" menu-bar-read-lispref :help "Read the Emacs Lisp Reference manual")) -(define-key menu-bar-manuals-menu [info-elintro] +(define-key menu-bar-manuals-menu [emac-lisp-intro] '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro :help "Read the Introduction to Emacs Lisp Programming")) -(define-key menu-bar-help-menu [eliza] - '(menu-item "Emacs Psychotherapist" doctor - :help "Our doctor will help you feel better")) +(define-key menu-bar-help-menu [describe-project] + '(menu-item "About GNU" describe-project + :help "About the GNU System, GNU Project, and GNU/Linux")) +(define-key menu-bar-help-menu [about] + '(menu-item "About Emacs" about-emacs + :help "Display version number, copyright info, and basic help")) (define-key menu-bar-help-menu [sep4] '("--")) (define-key menu-bar-help-menu [describe-no-warranty] @@ -1349,15 +1353,9 @@ key, a click, or a menu-item")) (define-key menu-bar-help-menu [describe-copying] '(menu-item "Copying Conditions" describe-copying :help "Show the Emacs license (GPL)")) -(define-key menu-bar-help-menu [describe-project] - '(menu-item "About GNU" describe-project - :help "About the GNU System, GNU Project, and GNU/Linux")) (define-key menu-bar-help-menu [describe-distribution] '(menu-item "Getting New Versions" describe-distribution :help "How to get latest versions of Emacs")) -(define-key menu-bar-help-menu [more] - '(menu-item "External Packages" menu-bar-help-extra-packages - :help "Lisp packages distributed separately for use in Emacs")) (defun menu-bar-help-extra-packages () "Display help about some additional packages available for Emacs." (interactive) @@ -1365,29 +1363,32 @@ key, a click, or a menu-item")) (view-file (expand-file-name "MORE.STUFF" data-directory)) (goto-address))) -(define-key menu-bar-help-menu [about] - '(menu-item "About Emacs" about-emacs - :help "Display version number, copyright info, and basic help")) (define-key menu-bar-help-menu [sep2] '("--")) +(define-key menu-bar-help-menu [more] + '(menu-item "External Packages" menu-bar-help-extra-packages + :help "Lisp packages distributed separately for use in Emacs")) (define-key menu-bar-help-menu [finder-by-keyword] '(menu-item "Find Emacs Packages" finder-by-keyword :help "Find packages and features by keyword")) -(define-key menu-bar-help-menu [manuals] +(define-key menu-bar-help-menu [more-manuals] (list 'menu-item "More Manuals" menu-bar-manuals-menu)) (define-key menu-bar-help-menu [emacs-manual] '(menu-item "Read the Emacs Manual" info-emacs-manual :help "Full documentation of Emacs features")) (define-key menu-bar-help-menu [describe] (list 'menu-item "Describe" menu-bar-describe-menu)) -(define-key menu-bar-help-menu [apropos] - (list 'menu-item "Search Documentation" menu-bar-apropos-menu)) +(define-key menu-bar-help-menu [search-documentation] + (list 'menu-item "Search Documentation" menu-bar-search-documentation-menu)) (define-key menu-bar-help-menu [sep1] '("--")) +(define-key menu-bar-help-menu [eliza] + '(menu-item "Emacs Psychotherapist" doctor + :help "Our doctor will help you feel better")) (define-key menu-bar-help-menu [report-emacs-bug] '(menu-item "Send Bug Report..." report-emacs-bug :help "Send e-mail to Emacs maintainers")) -(define-key menu-bar-help-menu [emacs-problems] +(define-key menu-bar-help-menu [emacs-known-problems] '(menu-item "Emacs Known Problems" view-emacs-problems :help "Read about known problems with Emacs")) (define-key menu-bar-help-menu [emacs-news] @@ -1749,18 +1750,10 @@ turn on menu bars; otherwise, turn off menu bars." :init-value nil :global t :group 'frames + ;; Make menu-bar-mode and default-frame-alist consistent. - (let ((lines (if menu-bar-mode 1 0))) - ;; Alter existing frames... - (mapc (lambda (frame) - (modify-frame-parameters frame - (list (cons 'menu-bar-lines lines)))) - (frame-list)) - ;; ...and future ones. - (let ((elt (assq 'menu-bar-lines default-frame-alist))) - (if elt - (setcdr elt lines) - (add-to-list 'default-frame-alist (cons 'menu-bar-lines lines))))) + (modify-all-frames-parameters (list (cons 'menu-bar-lines + (if menu-bar-mode 1 0)))) ;; Make the message appear when Emacs is idle. We can not call message ;; directly. The minor-mode message "Menu-bar mode disabled" comes @@ -1770,6 +1763,30 @@ turn on menu bars; otherwise, turn off menu bars." "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear.")) menu-bar-mode) +(defun toggle-menu-bar-mode-from-frame (&optional arg) + "Toggle menu bar on or off, based on the status of the current frame. +See `menu-bar-mode' for more information." + (interactive (list (or current-prefix-arg 'toggle))) + (if (eq arg 'toggle) + (menu-bar-mode (if (> (frame-parameter nil 'menu-bar-lines) 0) 0 1)) + (menu-bar-mode arg))) + +(defun menu-bar-open (&optional frame) + "Start key navigation of the menu bar in FRAME. + +This function decides which method to use to access the menu +depending on FRAME's terminal device. On X displays, it calls +`x-menu-bar-open'; otherwise it calls `tmm-menubar'. + +If FRAME is nil or not given, use the selected frame." + (interactive) + (if (eq window-system 'x) + (x-menu-bar-open frame) + (with-selected-frame (or frame (selected-frame)) + (tmm-menubar)))) + +(global-set-key [f10] 'menu-bar-open) + (provide 'menu-bar) ;;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 71522cd1285..6b0589da43d 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -194,7 +194,7 @@ two semi-colons.") (extra-line . (t nil t t)) (box . (nil t t t)) (box-multi . (t t t t))) - "Possible comment styles of the form (STYLE . (MULTI ALIGN EXTRA INDENT)). + "Comment region styles of the form (STYLE . (MULTI ALIGN EXTRA INDENT)). STYLE should be a mnemonic symbol. MULTI specifies that comments are allowed to span multiple lines. ALIGN specifies that the `comment-end' markers should be aligned. @@ -208,7 +208,8 @@ INDENT specifies that the `comment-start' markers should not be put at the "Style to be used for `comment-region'. See `comment-styles' for a list of available styles." :type (if (boundp 'comment-styles) - `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles)) + `(choice ,@(mapcar (lambda (s) `(const ,(car s))) + comment-styles)) 'symbol) :group 'comment) @@ -938,9 +939,14 @@ indentation to be kept as it was before narrowing." (delete-char n) (setq ,bindent (- ,bindent n))))))))))) -(defun comment-add (arg) +;; Compute the number of extra semicolons to add to the comment starter +;; in Lisp mode, extra stars in C mode, etc. +;; If ARG is non-nil, just follow ARG. +;; If the comment-starter is multi-char, just follow ARG. +;; Otherwise obey comment-add, and double it if EXTRA is non-nil. +(defun comment-add (arg &optional extra) (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1)) - comment-add + (* comment-add (if extra 2 1)) (1- (prefix-numeric-value arg)))) (defun comment-region-internal (beg end cs ce @@ -1051,7 +1057,8 @@ The strings used as comment starts are built from (lines (nth 2 style)) (block (nth 1 style)) (multi (nth 0 style))) - ;; we use `chars' instead of `syntax' because `\n' might be + + ;; We use `chars' instead of `syntax' because `\n' might be ;; of end-comment syntax rather than of whitespace syntax. ;; sanitize BEG and END (goto-char beg) (skip-chars-forward " \t\n\r") (beginning-of-line) @@ -1079,7 +1086,10 @@ The strings used as comment starts are built from ((consp arg) (uncomment-region beg end)) ((< numarg 0) (uncomment-region beg end (- numarg))) (t - (setq numarg (comment-add arg)) + ;; Add an extra semicolon in Lisp and similar modes. + ;; If STYLE doesn't specify indenting the comments, + ;; then double the value of `comment-add'. + (setq numarg (comment-add arg (null (nth 3 style)))) (comment-region-internal beg end (let ((s (comment-padright comment-start numarg))) diff --git a/lisp/outline.el b/lisp/outline.el index 6eabd8f3d02..a1ed3d44f7f 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -187,12 +187,12 @@ in the file it applies to." :group 'outlines) (defface outline-4 - '((t :inherit font-lock-builtin-face)) + '((t :inherit font-lock-comment-face)) "Level 4." :group 'outlines) (defface outline-5 - '((t :inherit font-lock-comment-face)) + '((t :inherit font-lock-type-face)) "Level 5." :group 'outlines) @@ -202,7 +202,7 @@ in the file it applies to." :group 'outlines) (defface outline-7 - '((t :inherit font-lock-type-face)) + '((t :inherit font-lock-builtin-face)) "Level 7." :group 'outlines) @@ -215,8 +215,8 @@ in the file it applies to." [outline-1 outline-2 outline-3 outline-4 outline-5 outline-6 outline-7 outline-8]) -(defvar outline-font-lock-levels nil) -(make-variable-buffer-local 'outline-font-lock-levels) +;; (defvar outline-font-lock-levels nil) +;; (make-variable-buffer-local 'outline-font-lock-levels) (defun outline-font-lock-face () ;; (save-excursion @@ -241,9 +241,7 @@ in the file it applies to." (save-excursion (goto-char (match-beginning 0)) (looking-at outline-regexp) - (condition-case nil - (aref outline-font-lock-faces (1- (funcall outline-level))) - (error font-lock-warning-face)))) + (aref outline-font-lock-faces (% (1- (funcall outline-level)) (length outline-font-lock-faces))))) (defvar outline-view-change-hook nil "Normal hook to be run after outline visibility changes.") @@ -712,7 +710,10 @@ If nil, `show-entry' is called to reveal the invisible text.") If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (remove-overlays from to 'invisible 'outline) (when flag - (let ((o (make-overlay from to))) + ;; We use `front-advance' here because the invisible text begins at the + ;; very end of the heading, before the newline, so text inserted at FROM + ;; belongs to the heading rather than to the entry. + (let ((o (make-overlay from to nil 'front-advance))) (overlay-put o 'invisible 'outline) (overlay-put o 'isearch-open-invisible (or outline-isearch-open-invisible-function diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 5798be4b14d..87f543eac36 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el @@ -347,6 +347,8 @@ This variable is buffer local and only used in the *cvs* buffer.") (" " . cvs-mode-next-line) ("n" . cvs-mode-next-line) ("p" . cvs-mode-previous-line) + ("\t" . cvs-mode-next-line) + ([backtab] . cvs-mode-previous-line) ;; M- keys are usually those that operate on modules ;;("\M-C". cvs-mode-rcs2log) ; i.e. "Create a ChangeLog" ;;("\M-t". cvs-rtag) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 6f205772249..1e45fe6974b 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -227,7 +227,7 @@ (list* '("BASE") '("HEAD") (when marked (with-temp-buffer - (call-process cvs-program + (process-file cvs-program nil ;no input t ;output to current-buffer nil ;don't update display while running @@ -564,7 +564,7 @@ If non-nil, NEW means to create a new buffer no matter what." (process ;; the process will be run in the selected dir (let ((default-directory (cvs-expand-dir-name dir))) - (apply 'start-process "cvs" procbuf cvs-program args)))) + (apply 'start-file-process "cvs" procbuf cvs-program args)))) ;; setup the process. (process-put process 'cvs-buffer cvs-buffer) (with-current-buffer cvs-buffer (cvs-update-header msg 'add)) @@ -635,6 +635,9 @@ If non-nil, NEW means to create a new buffer no matter what." (if (not (string-match "." str)) (setq str "\n")) (setq str (concat "-- Running " cmd " ...\n" str))) (if (not (string-match + ;; FIXME: If `cmd' is large, this will bump into the + ;; compiled-regexp size limit. We could drop the "^" anchor + ;; and use search-forward to circumvent the problem. (concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str)) (error "Internal PCL-CVS error while removing message") (setq str (replace-match "" t t str)) @@ -1733,7 +1736,7 @@ Signal an error if there is no backup file." ;; problem when stdout and stderr are the same. (let ((res (let ((coding-system-for-read 'binary)) - (apply 'call-process cvs-program nil '(t nil) nil + (apply 'process-file cvs-program nil '(t nil) nil "-q" "update" "-p" ;; If `rev' is HEAD, don't pass it at all: ;; the default behavior is to get the head @@ -2003,7 +2006,7 @@ to hear about anymore." (defun cvs-find-modif (fi) (with-temp-buffer - (call-process cvs-program nil (current-buffer) nil + (process-file cvs-program nil (current-buffer) nil "-f" "diff" (cvs-fileinfo->file fi)) (goto-char (point-min)) (if (re-search-forward "^\\([0-9]+\\)" nil t) @@ -2210,13 +2213,21 @@ With prefix argument, prompt for cvs flags." (defun-cvs-mode cvs-mode-add-change-log-entry-other-window () "Add a ChangeLog entry in the ChangeLog of the current directory." (interactive) + ;; Require `add-log' explicitly, because if it gets autoloaded when we call + ;; add-change-log-entry-other-window below, the + ;; add-log-buffer-file-name-function ends up unbound when we leave the `let'. + (require 'add-log) (dolist (fi (cvs-mode-marked nil nil)) (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) - (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) - (if (file-directory-p buffer-file-name) - ;; Be careful to use a directory name, otherwise add-log starts - ;; looking for a ChangeLog file in the parent dir. - (setq buffer-file-name (file-name-as-directory buffer-file-name))) + (add-log-buffer-file-name-function + (lambda () + (let ((file (expand-file-name (cvs-fileinfo->file fi)))) + (if (file-directory-p file) + ;; Be careful to use a directory name, otherwise add-log + ;; starts looking for a ChangeLog file in the + ;; parent dir. + (file-name-as-directory file) + file))))) (kill-local-variable 'change-log-default-name) (save-excursion (add-change-log-entry-other-window))))) @@ -2257,7 +2268,7 @@ With prefix argument, prompt for cvs flags." program (split-string-and-unquote args))) ;; FIXME: return the exit status? - (apply 'call-process program nil t t args) + (apply 'process-file program nil t t args) (goto-char (point-max)))))) ;; FIXME: make this run in the background ala cvs-run-process... diff --git a/lisp/printing.el b/lisp/printing.el index a4b4c4217ed..0f589564083 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -5311,15 +5311,15 @@ If menu binding was not done, calls `pr-menu-bind'." (defun pr-eval-local-alist (alist) (let (local-list) - (mapcar #'(lambda (option) - (let ((var-sym (car option)) - (value (cdr option))) - (setq local-list - (if (eq var-sym 'inherits-from:) - (nconc (pr-eval-setting-alist value) local-list) - (set (make-local-variable var-sym) (eval value)) - (cons var-sym local-list))))) - alist) + (mapc #'(lambda (option) + (let ((var-sym (car option)) + (value (cdr option))) + (setq local-list + (if (eq var-sym 'inherits-from:) + (nconc (pr-eval-setting-alist value) local-list) + (set (make-local-variable var-sym) (eval value)) + (cons var-sym local-list))))) + alist) local-list)) @@ -5341,7 +5341,7 @@ If menu binding was not done, calls `pr-menu-bind'." (setq local-list (pr-eval-setting-alist inherits global (cons inherits old))))) - (mapcar + (mapc (cond ((not local) ; global settings #'(lambda (option) (let ((var-sym (car option))) diff --git a/lisp/recentf.el b/lisp/recentf.el index 85f00b2bc5f..ce342d87639 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -63,14 +63,14 @@ You should define the options of your own filters in this group." :group 'recentf) (defcustom recentf-max-saved-items 20 - "*Maximum number of items of the recent list that will be saved. + "Maximum number of items of the recent list that will be saved. A nil value means to save the whole list. See the command `recentf-save-list'." :group 'recentf :type 'integer) (defcustom recentf-save-file "~/.recentf" - "*File to save the recent list into." + "File to save the recent list into." :group 'recentf :type 'file :initialize 'custom-initialize-default @@ -91,7 +91,7 @@ file. See also the function `set-file-modes'." integer)) (defcustom recentf-exclude nil - "*List of regexps and predicates for filenames excluded from the recent list. + "List of regexps and predicates for filenames excluded from the recent list. When a filename matches any of the regexps or satisfies any of the predicates it is excluded from the recent list. A predicate is a function that is passed a filename to check and that @@ -109,7 +109,7 @@ It handles the case of remote files as well." (defcustom recentf-keep '(recentf-keep-default-predicate) - "*List of regexps and predicates for filenames kept in the recent list. + "List of regexps and predicates for filenames kept in the recent list. Regexps and predicates are tried in the specified order. When nil all filenames are kept in the recent list. When a filename matches any of the regexps or satisfies any of the @@ -135,13 +135,13 @@ Set VARIABLE with VALUE, and force a rebuild of the recentf menu." (set-default variable value))) (defcustom recentf-menu-title "Open Recent" - "*Name of the recentf menu." + "Name of the recentf menu." :group 'recentf :type 'string :set 'recentf-menu-customization-changed) (defcustom recentf-menu-path '("File") - "*Path where to add the recentf menu. + "Path where to add the recentf menu. If nil add it at top level (see also `easy-menu-add-item')." :group 'recentf :type '(choice (const :tag "Top Level" nil) @@ -149,7 +149,7 @@ If nil add it at top level (see also `easy-menu-add-item')." :set 'recentf-menu-customization-changed) (defcustom recentf-menu-before "Open File..." - "*Name of the menu before which the recentf menu will be added. + "Name of the menu before which the recentf menu will be added. If nil add it at end of menu (see also `easy-menu-add-item')." :group 'recentf :type '(choice (string :tag "Name") @@ -157,18 +157,18 @@ If nil add it at end of menu (see also `easy-menu-add-item')." :set 'recentf-menu-customization-changed) (defcustom recentf-menu-action 'find-file - "*Function to invoke with a filename item of the recentf menu. + "Function to invoke with a filename item of the recentf menu. The default is to call `find-file' to edit the selected file." :group 'recentf :type 'function) (defcustom recentf-max-menu-items 10 - "*Maximum number of items in the recentf menu." + "Maximum number of items in the recentf menu." :group 'recentf :type 'integer) (defcustom recentf-menu-filter nil - "*Function used to filter files displayed in the recentf menu. + "Function used to filter files displayed in the recentf menu. A nil value means no filter. The following functions are predefined: - `recentf-sort-ascending' @@ -222,13 +222,13 @@ elements (see `recentf-make-menu-element' for menu element form)." function)) (defcustom recentf-menu-open-all-flag nil - "*Non-nil means to show an \"All...\" item in the menu. + "Non-nil means to show an \"All...\" item in the menu. This item will replace the \"More...\" item." :group 'recentf :type 'boolean) (defcustom recentf-menu-append-commands-flag t - "*Non-nil means to append command items to the menu." + "Non-nil means to append command items to the menu." :group 'recentf :type 'boolean) @@ -237,7 +237,7 @@ This item will replace the \"More...\" item." "22.1") (defcustom recentf-auto-cleanup 'mode - "*Define when to automatically cleanup the recent list. + "Define when to automatically cleanup the recent list. The following values can be set: - `mode' @@ -270,13 +270,13 @@ cleanup the list." (recentf-auto-cleanup)))) (defcustom recentf-initialize-file-name-history t - "*Non-nil means to initialize `file-name-history' with the recent list. + "Non-nil means to initialize `file-name-history' with the recent list. If `file-name-history' is not empty, do nothing." :group 'recentf :type 'boolean) (defcustom recentf-load-hook nil - "*Normal hook run at end of loading the `recentf' package." + "Normal hook run at end of loading the `recentf' package." :group 'recentf :type 'hook) @@ -777,7 +777,7 @@ Filenames are relative to the `default-directory'." ("Java files (%d)" ".\\.java\\'") ("C/C++ files (%d)" "c\\(pp\\)?\\'") ) - "*List of rules used by `recentf-arrange-by-rule' to build sub-menus. + "List of rules used by `recentf-arrange-by-rule' to build sub-menus. A rule is a pair (SUB-MENU-TITLE . MATCHER). SUB-MENU-TITLE is the displayed title of the sub-menu where a '%d' `format' pattern is replaced by the number of items in the sub-menu. MATCHER is a regexp @@ -793,7 +793,7 @@ may have been modified to match another rule." (repeat regexp)))) (defcustom recentf-arrange-by-rule-others "Other files (%d)" - "*Title of the `recentf-arrange-by-rule' sub-menu. + "Title of the `recentf-arrange-by-rule' sub-menu. This is for the menu where items that don't match any `recentf-arrange-rules' are displayed. If nil these items are displayed in the main recent files menu. A '%d' `format' pattern in @@ -803,7 +803,7 @@ the title is replaced by the number of items in the sub-menu." (string :tag "Title"))) (defcustom recentf-arrange-by-rules-min-items 0 - "*Minimum number of items in a `recentf-arrange-by-rule' sub-menu. + "Minimum number of items in a `recentf-arrange-by-rule' sub-menu. If the number of items in a sub-menu is less than this value the corresponding sub-menu items are displayed in the main recent files menu or in the `recentf-arrange-by-rule-others' sub-menu if @@ -812,7 +812,7 @@ defined." :type 'number) (defcustom recentf-arrange-by-rule-subfilter nil - "*Function called by a rule based filter to filter sub-menu elements. + "Function called by a rule based filter to filter sub-menu elements. A nil value means no filter. See also `recentf-menu-filter'. You can't use another rule based filter here." :group 'recentf-filters @@ -966,7 +966,7 @@ duplicates. It is used by `recentf-arrange-by-dir' as its (recentf-arrange-by-dir . "Grouped by Directory") (recentf-arrange-by-rule . "Grouped by Custom Rules") ) - "*List of filters managed by `recentf-filter-changer'. + "List of filters managed by `recentf-filter-changer'. Each filter is defined by a pair (FUNCTION . LABEL), where FUNCTION is the filter function, and LABEL is the menu item displayed to select that filter." @@ -1280,9 +1280,9 @@ Write data into the file specified by `recentf-save-file'." (insert (format recentf-save-file-header (current-time-string))) (recentf-dump-variable 'recentf-list recentf-max-saved-items) (recentf-dump-variable 'recentf-filter-changer-current) - (insert "\n\n;;; Local Variables:\n" - (format ";;; coding: %s\n" recentf-save-file-coding-system) - ";;; End:\n") + (insert "\n\n;; Local Variables:\n" + (format ";; coding: %s\n" recentf-save-file-coding-system) + ";; End:\n") (write-file (expand-file-name recentf-save-file)) (when recentf-save-file-modes (set-file-modes recentf-save-file recentf-save-file-modes)) diff --git a/lisp/repeat.el b/lisp/repeat.el index ad8c4d818f8..1a1d081b06e 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -152,6 +152,11 @@ member of that sequence. If this variable is nil, no re-execution occurs." ;; with auto-filling. Most problems are eliminated by remembering what we're ;; self-inserting, so we only need to get it from the undo information once. +;; With Emacs 22.2 the variable `last-repeatable-command' stores the +;; most recently executed command that was not bound to an input event. +;; `repeat' now repeats that command instead of `real-last-command' to +;; avoid a "... must be bound to an event with parameters" error. + (defvar repeat-last-self-insert nil "If last repeated command was `self-insert-command', it inserted this.") @@ -198,13 +203,18 @@ this function is always whether the value of `this-command' would've been ;;;###autoload (defun repeat (repeat-arg) "Repeat most recently executed command. -With prefix arg, apply new prefix arg to that command; otherwise, use -the prefix arg that was used before (if any). +With prefix arg, apply new prefix arg to that command; otherwise, +use the prefix arg that was used before (if any). This command is like the `.' command in the vi editor. -If this command is invoked by a multi-character key sequence, it can then -be repeated by repeating the final character of that sequence. This behavior -can be modified by the global variable `repeat-on-final-keystroke'." +If this command is invoked by a multi-character key sequence, it +can then be repeated by repeating the final character of that +sequence. This behavior can be modified by the global variable +`repeat-on-final-keystroke'. + +`repeat' ignores commands bound to input events. Hence the term +\"most recently executed command\" shall be read as \"most +recently executed command not bound to an input event\"." ;; The most recently executed command could be anything, so surprises could ;; result if it were re-executed in a context where new dynamically ;; localized variables were shadowing global variables in a `let' clause in @@ -214,17 +224,19 @@ can be modified by the global variable `repeat-on-final-keystroke'." ;; "repeat-" prefix, reserved by this package, for *local* variables that ;; might be visible to re-executed commands, including this function's arg. (interactive "P") - (when (eq real-last-command 'repeat) - (setq real-last-command repeat-previous-repeated-command)) - (when (null real-last-command) + (when (eq last-repeatable-command 'repeat) + (setq last-repeatable-command repeat-previous-repeated-command)) + (cond + ((null last-repeatable-command) (error "There is nothing to repeat")) - (when (eq real-last-command 'mode-exit) - (error "real-last-command is mode-exit & can't be repeated")) - (when (memq real-last-command repeat-too-dangerous) - (error "Command %S too dangerous to repeat automatically" real-last-command)) - (setq this-command real-last-command - repeat-num-input-keys-at-repeat num-input-keys) - (setq repeat-previous-repeated-command this-command) + ((eq last-repeatable-command 'mode-exit) + (error "last-repeatable-command is mode-exit & can't be repeated")) + ((memq last-repeatable-command repeat-too-dangerous) + (error "Command %S too dangerous to repeat automatically" + last-repeatable-command))) + (setq this-command last-repeatable-command + repeat-previous-repeated-command last-repeatable-command + repeat-num-input-keys-at-repeat num-input-keys) (when (null repeat-arg) (setq repeat-arg last-prefix-arg)) ;; Now determine whether to loop on repeated taps of the final character @@ -234,25 +246,29 @@ can be modified by the global variable `repeat-on-final-keystroke'." ;; needs to be saved. (let ((repeat-repeat-char (if (eq repeat-on-final-keystroke t) - ;; allow any final input event that was a character - (when (eq last-command-char - last-command-event) - last-command-char) + ;; The following commented out since it's equivalent to + ;; last-comment-char (martin 2007-08-29). +;;; ;; allow any final input event that was a character +;;; (when (eq last-command-char +;;; last-command-event) +;;; last-command-char) + last-command-char ;; allow only specified final keystrokes (car (memq last-command-char (listify-key-sequence repeat-on-final-keystroke)))))) - (if (memq real-last-command '(exit-minibuffer - minibuffer-complete-and-exit - self-insert-and-exit)) + (if (memq last-repeatable-command '(exit-minibuffer + minibuffer-complete-and-exit + self-insert-and-exit)) (let ((repeat-command (car command-history))) (repeat-message "Repeating %S" repeat-command) (eval repeat-command)) (if (null repeat-arg) - (repeat-message "Repeating command %S" real-last-command) - (setq current-prefix-arg repeat-arg) - (repeat-message "Repeating command %S %S" repeat-arg real-last-command)) - (if (eq real-last-command 'self-insert-command) + (repeat-message "Repeating command %S" last-repeatable-command) + (setq current-prefix-arg repeat-arg) + (repeat-message + "Repeating command %S %S" repeat-arg last-repeatable-command)) + (if (eq last-repeatable-command 'self-insert-command) (let ((insertion (if (<= (- num-input-keys repeat-num-input-keys-at-self-insert) @@ -275,18 +291,22 @@ can be modified by the global variable `repeat-on-final-keystroke'." (setq insertion (substring insertion -1)) (let ((count (prefix-numeric-value repeat-arg)) (i 0)) + ;; Run pre- and post-command hooks for self-insertion too. + (run-hooks 'pre-command-hook) (while (< i count) (repeat-self-insert insertion) - (setq i (1+ i))))) - (let ((indirect (indirect-function real-last-command))) + (setq i (1+ i))) + (run-hooks 'post-command-hook))) + (let ((indirect (indirect-function last-repeatable-command))) (if (or (stringp indirect) (vectorp indirect)) - ;; Bind real-last-command so that executing the macro - ;; does not alter it. - (let ((real-last-command real-last-command)) - (execute-kbd-macro real-last-command)) + ;; Bind real-last-command so that executing the macro does + ;; not alter it. Do the same for last-repeatable-command. + (let ((real-last-command real-last-command) + (last-repeatable-command last-repeatable-command)) + (execute-kbd-macro last-repeatable-command)) (run-hooks 'pre-command-hook) - (call-interactively real-last-command) + (call-interactively last-repeatable-command) (run-hooks 'post-command-hook))))) (when repeat-repeat-char ;; A simple recursion here gets into trouble with max-lisp-eval-depth @@ -295,6 +315,7 @@ can be modified by the global variable `repeat-on-final-keystroke'." ;; max-lisp-eval-depth), but if I now locally disable the repeat char I ;; can iterate indefinitely here around a single level of recursion. (let (repeat-on-final-keystroke) + (setq real-last-command 'repeat) (while (eq (read-event) repeat-repeat-char) ;; Make each repetition undo separately. (undo-boundary) diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index daa66118b38..ced5ed3f368 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el @@ -119,6 +119,12 @@ system, `file-name-shadow-properties' is used instead." :group 'minibuffer :version "22.1") +(defvar rfn-eshadow-setup-minibuffer-hook nil + "Minibuffer setup functions from other packages.") + +(defvar rfn-eshadow-update-overlay-hook nil + "Customer overlay functions from other packages") + ;;; Internal variables @@ -153,7 +159,9 @@ The prompt and initial input should already have been inserted." (overlay-put rfn-eshadow-overlay 'evaporate t) ;; Add our post-command hook, and make sure can remove it later. (add-to-list 'rfn-eshadow-frobbed-minibufs (current-buffer)) - (add-hook 'post-command-hook #'rfn-eshadow-update-overlay nil t))) + (add-hook 'post-command-hook #'rfn-eshadow-update-overlay nil t) + ;; Run custom hook + (run-hooks 'rfn-eshadow-setup-minibuffer-hook))) (defsubst rfn-eshadow-sifn-equal (goal pos) (equal goal (condition-case nil @@ -193,7 +201,9 @@ been set up by `rfn-eshadow-setup-minibuffer'." (if (rfn-eshadow-sifn-equal goal mid) (setq start mid) (setq end mid))) - (move-overlay rfn-eshadow-overlay (minibuffer-prompt-end) start))) + (move-overlay rfn-eshadow-overlay (minibuffer-prompt-end) start)) + ;; Run custom hook + (run-hooks 'rfn-eshadow-update-overlay-hook)) ;; `substitute-in-file-name' can fail on partial input. (error nil))) diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index 770e01ccbca..0a373058f66 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -92,21 +92,8 @@ This is nil while loading `scroll-bar.el', and t afterward.") (setq scroll-bar-mode value) (when scroll-bar-mode-explicit - ;; Apply it to default-frame-alist. - (let ((parameter (assq 'vertical-scroll-bars default-frame-alist))) - (if (consp parameter) - (setcdr parameter scroll-bar-mode) - (setq default-frame-alist - (cons (cons 'vertical-scroll-bars scroll-bar-mode) - default-frame-alist)))) - - ;; Apply it to existing frames. - (let ((frames (frame-list))) - (while frames - (modify-frame-parameters - (car frames) - (list (cons 'vertical-scroll-bars scroll-bar-mode))) - (setq frames (cdr frames)))))) + (modify-all-frames-parameters (list (cons 'vertical-scroll-bars + scroll-bar-mode))))) (defcustom scroll-bar-mode default-frame-scroll-bars "*Specify whether to have vertical scroll bars, and on which side. diff --git a/lisp/server.el b/lisp/server.el index 89756fd0eca..02190a97c6f 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -8,6 +8,7 @@ ;; Keywords: processes ;; Changes by peck@sun.com and by rms. +;; Overhaul by Karoly Lorentey <lorentey@elte.hu> for multi-tty support. ;; This file is part of GNU Emacs. @@ -41,7 +42,7 @@ ;; This program transmits the file names to Emacs through ;; the server subprocess, and Emacs visits them and lets you edit them. -;; Note that any number of clients may dispatch files to emacs to be edited. +;; Note that any number of clients may dispatch files to Emacs to be edited. ;; When you finish editing a Server buffer, again call server-edit ;; to mark that buffer as done for the client and switch to the next @@ -74,6 +75,13 @@ ;; The global variable "server-clients" lists all the waiting clients, ;; and which files are yet to be edited for each. +;; Todo: + +;; - handle command-line-args-left. +;; - move most of the args processing and decision making from emacsclient.c +;; to here. +;; - fix up handling of the client's environment (place it in the terminal?). + ;;; Code: (eval-when-compile (require 'cl)) @@ -138,12 +146,10 @@ If set, the server accepts remote connections; otherwise it is local." (defvar server-clients nil "List of current server clients. -Each element is (CLIENTID BUFFERS...) where CLIENTID is a string -that can be given to the server process to identify a client. -When a buffer is marked as \"done\", it is removed from this list.") +Each element is a process.") (defvar server-buffer-clients nil - "List of client ids for clients requesting editing of current buffer.") + "List of client processes requesting editing of current buffer.") (make-variable-buffer-local 'server-buffer-clients) ;; Changing major modes should not erase this local. (put 'server-buffer-clients 'permanent-local t) @@ -178,10 +184,10 @@ invoke the Emacs server." (defcustom server-kill-new-buffers t "Whether to kill buffers when done with them. If non-nil, kill a buffer unless it already existed before editing -it with Emacs server. If nil, kill only buffers as specified by +it with the Emacs server. If nil, kill only buffers as specified by `server-temp-file-regexp'. -Please note that only buffers are killed that still have a client, -i.e. buffers visited which \"emacsclient --no-wait\" are never killed in +Please note that only buffers that still have a client are killed, +i.e. buffers visited with \"emacsclient --no-wait\" are never killed in this way." :group 'server :type 'boolean @@ -198,34 +204,111 @@ are done with it in the server.") (defvar server-name "server") -(defvar server-socket-dir - (format "/tmp/emacs%d" (user-uid))) +(defvar server-socket-dir nil + "The directory in which to place the server socket. +Initialized by `server-start'.") + +(defun server-clients-with (property value) + "Return a list of clients with PROPERTY set to VALUE." + (let (result) + (dolist (proc server-clients result) + (when (equal value (process-get proc property)) + (push proc result))))) + +(defun server-add-client (proc) + "Create a client for process PROC, if it doesn't already have one. +New clients have no properties." + (add-to-list 'server-clients proc)) + +(defmacro server-with-environment (env vars &rest body) + "Evaluate BODY with environment variables VARS set to those in ENV. +The environment variables are then restored to their previous values. + +VARS should be a list of strings. +ENV should be in the same format as `process-environment'." + (declare (indent 2)) + (let ((var (make-symbol "var")) + (value (make-symbol "value"))) + `(let ((process-environment process-environment)) + (dolist (,var ,vars) + (let ((,value (getenv-internal ,var ,env))) + (push (if (null ,value) + ,var + (concat ,var "=" ,value)) + process-environment))) + (progn ,@body)))) + +(defun server-delete-client (proc &optional noframe) + "Delete CLIENT, including its buffers, terminals and frames. +If NOFRAME is non-nil, let the frames live. (To be used from +`delete-frame-functions'.)" + (server-log (concat "server-delete-client" (if noframe " noframe")) + proc) + ;; Force a new lookup of client (prevents infinite recursion). + (when (memq proc server-clients) + (let ((buffers (process-get proc 'buffers))) + + ;; Kill the client's buffers. + (dolist (buf buffers) + (when (buffer-live-p buf) + (with-current-buffer buf + ;; Kill the buffer if necessary. + (when (and (equal server-buffer-clients + (list proc)) + (or (and server-kill-new-buffers + (not server-existing-buffer)) + (server-temp-file-p)) + (not (buffer-modified-p))) + (let (flag) + (unwind-protect + (progn (setq server-buffer-clients nil) + (kill-buffer (current-buffer)) + (setq flag t)) + (unless flag + ;; Restore clients if user pressed C-g in `kill-buffer'. + (setq server-buffer-clients (list proc))))))))) + + ;; Delete the client's frames. + (unless noframe + (dolist (frame (frame-list)) + (when (and (frame-live-p frame) + (equal proc (frame-parameter frame 'client))) + ;; Prevent `server-handle-delete-frame' from calling us + ;; recursively. + (set-frame-parameter frame 'client nil) + (delete-frame frame)))) + + (setq server-clients (delq proc server-clients)) + + ;; Delete the client's tty. + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal))) + + ;; Delete the client's process. + (if (eq (process-status proc) 'open) + (delete-process proc)) + + (server-log "Deleted" proc)))) (defun server-log (string &optional client) - "If a *server* buffer exists, write STRING to it for logging purposes." + "If a *server* buffer exists, write STRING to it for logging purposes. +If CLIENT is non-nil, add a description of it to the logged +message." (when (get-buffer "*server*") (with-current-buffer "*server*" (goto-char (point-max)) (insert (current-time-string) - (if client (format " %s:" client) " ") + (cond + ((null client) " ") + ((listp client) (format " %s: " (car client))) + (t (format " %s: " client))) string) (or (bolp) (newline))))) (defun server-sentinel (proc msg) - (let ((client (assq proc server-clients))) - ;; Remove PROC from the list of clients. - (when client - (setq server-clients (delq client server-clients)) - (dolist (buf (cdr client)) - (with-current-buffer buf - ;; Remove PROC from the clients of each buffer. - (setq server-buffer-clients (delq proc server-buffer-clients)) - ;; Kill the buffer if necessary. - (when (and (null server-buffer-clients) - (or (and server-kill-new-buffers - (not server-existing-buffer)) - (server-temp-file-p))) - (kill-buffer (current-buffer))))))) + "The process sentinel for Emacs server connections." ;; If this is a new client process, set the query-on-exit flag to nil ;; for this process (it isn't inherited from the server process). (when (and (eq (process-status proc) 'open) @@ -237,7 +320,8 @@ are done with it in the server.") ;; (and (process-contact proc :server) ;; (eq (process-status proc) 'closed) ;; (ignore-errors (delete-file (process-get proc :server-file)))) - (server-log (format "Status changed to %s" (process-status proc)) proc)) + (server-log (format "Status changed to %s: %s" (process-status proc) msg) proc) + (server-delete-client proc)) (defun server-select-display (display) ;; If the current frame is on `display' we're all set. @@ -259,25 +343,52 @@ are done with it in the server.") ;; unobtrusive as possible. (visibility . nil))))) (select-frame frame) - (set-window-buffer (selected-window) buffer))))) + (set-window-buffer (selected-window) buffer) + frame)))) (defun server-unselect-display (frame) - ;; If the temporary frame is in use (displays something real), make it - ;; visible. If not (which can happen if the user's customizations call - ;; pop-to-buffer etc.), delete it to avoid preserving the connection after - ;; the last real frame is deleted. - (if (and (eq (frame-first-window frame) - (next-window (frame-first-window frame) 'nomini)) - (eq (window-buffer (frame-first-window frame)) - (frame-parameter frame 'server-dummy-buffer))) - ;; The temp frame still only shows one buffer, and that is the - ;; internal temp buffer. - (delete-frame frame) - (set-frame-parameter frame 'visibility t)) - (kill-buffer (frame-parameter frame 'server-dummy-buffer)) - (set-frame-parameter frame 'server-dummy-buffer nil)) + (when (frame-live-p frame) + ;; If the temporary frame is in use (displays something real), make it + ;; visible. If not (which can happen if the user's customizations call + ;; pop-to-buffer etc.), delete it to avoid preserving the connection after + ;; the last real frame is deleted. + (if (and (eq (frame-first-window frame) + (next-window (frame-first-window frame) 'nomini)) + (eq (window-buffer (frame-first-window frame)) + (frame-parameter frame 'server-dummy-buffer))) + ;; The temp frame still only shows one buffer, and that is the + ;; internal temp buffer. + (delete-frame frame) + (set-frame-parameter frame 'visibility t)) + (kill-buffer (frame-parameter frame 'server-dummy-buffer)) + (set-frame-parameter frame 'server-dummy-buffer nil))) + +(defun server-handle-delete-frame (frame) + "Delete the client connection when the emacsclient frame is deleted." + (let ((proc (frame-parameter frame 'client))) + (when (and (frame-live-p frame) + proc + ;; See if this is the last frame for this client. + (>= 1 (let ((frame-num 0)) + (dolist (f (frame-list)) + (when (eq proc (frame-parameter f 'client)) + (setq frame-num (1+ frame-num)))) + frame-num))) + (server-log (format "server-handle-delete-frame, frame %s" frame) proc) + (server-delete-client proc 'noframe)))) ; Let delete-frame delete the frame later. + +(defun server-handle-suspend-tty (terminal) + "Notify the emacsclient process to suspend itself when its tty device is suspended." + (dolist (proc (server-clients-with 'terminal terminal)) + (server-log (format "server-handle-suspend-tty, terminal %s" terminal) proc) + (condition-case err + (server-send-string proc "-suspend \n") + (file-error ;The pipe/socket was closed. + (ignore-errors (server-delete-client proc)))))) (defun server-unquote-arg (arg) + "Remove &-quotation from ARG. +See `server-quote-arg' and `server-process-filter'." (replace-regexp-in-string "&." (lambda (s) (case (aref s 1) @@ -287,6 +398,26 @@ are done with it in the server.") (t " "))) arg t t)) +(defun server-quote-arg (arg) + "In ARG, insert a & before each &, each space, each newline, and -. +Change spaces to underscores, too, so that the return value never +contains a space. + +See `server-unquote-arg' and `server-process-filter'." + (replace-regexp-in-string + "[-&\n ]" (lambda (s) + (case (aref s 0) + (?& "&&") + (?- "&-") + (?\n "&n") + (?\s "&_"))) + arg t t)) + +(defun server-send-string (proc string) + "A wrapper around `proc-send-string' for logging." + (server-log (concat "Sent " string) proc) + (process-send-string proc string)) + (defun server-ensure-safe-dir (dir) "Make sure DIR is a directory with no race-condition issues. Creates the directory if necessary and makes sure: @@ -308,68 +439,100 @@ Creates the directory if necessary and makes sure: (defun server-start (&optional leave-dead) "Allow this Emacs process to be a server for client processes. This starts a server communications subprocess through which -client \"editors\" can send your editing commands to this Emacs job. -To use the server, set up the program `emacsclient' in the +client \"editors\" can send your editing commands to this Emacs +job. To use the server, set up the program `emacsclient' in the Emacs distribution as your standard \"editor\". Optional argument LEAVE-DEAD (interactively, a prefix arg) means just kill any existing server communications subprocess." (interactive "P") - (when server-process - ;; kill it dead! - (ignore-errors (delete-process server-process))) - ;; If this Emacs already had a server, clear out associated status. - (while server-clients - (let ((buffer (nth 1 (car server-clients)))) - (server-buffer-done buffer))) - ;; Now any previous server is properly stopped. - (unless leave-dead - (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) - (server-file (expand-file-name server-name server-dir))) - ;; Make sure there is a safe directory in which to place the socket. - (server-ensure-safe-dir server-dir) - ;; Remove any leftover socket or authentication file. - (ignore-errors (delete-file server-file)) - (when server-process - (server-log (message "Restarting server"))) - (letf (((default-file-modes) ?\700)) - (setq server-process - (apply #'make-network-process - :name server-name - :server t - :noquery t - :sentinel 'server-sentinel - :filter 'server-process-filter - ;; We must receive file names without being decoded. - ;; Those are decoded by server-process-filter according - ;; to file-name-coding-system. - :coding 'raw-text - ;; The rest of the args depends on the kind of socket used. - (if server-use-tcp - (list :family nil - :service t - :host (or server-host 'local) - :plist '(:authenticated nil)) - (list :family 'local - :service server-file - :plist '(:authenticated t))))) - (unless server-process (error "Could not start server process")) - (when server-use-tcp - (let ((auth-key - (loop - ;; The auth key is a 64-byte string of random chars in the - ;; range `!'..`~'. - for i below 64 - collect (+ 33 (random 94)) into auth - finally return (concat auth)))) - (process-put server-process :auth-key auth-key) - (with-temp-file server-file - (set-buffer-multibyte nil) - (setq buffer-file-coding-system 'no-conversion) - (insert (format-network-address - (process-contact server-process :local)) - " " (int-to-string (emacs-pid)) - "\n" auth-key)))))))) + (when (or + (not server-clients) + (yes-or-no-p + "The current server still has clients; delete them? ")) + ;; It is safe to get the user id now. + (setq server-socket-dir (or server-socket-dir + (format "/tmp/emacs%d" (user-uid)))) + (when server-process + ;; kill it dead! + (ignore-errors (delete-process server-process))) + ;; Delete the socket files made by previous server invocations. + (condition-case () + (delete-file (expand-file-name server-name server-socket-dir)) + (error nil)) + ;; If this Emacs already had a server, clear out associated status. + (while server-clients + (server-delete-client (car server-clients))) + ;; Now any previous server is properly stopped. + (if leave-dead + (progn + (server-log (message "Server stopped")) + (setq server-process nil)) + (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) + (server-file (expand-file-name server-name server-dir))) + ;; Make sure there is a safe directory in which to place the socket. + (server-ensure-safe-dir server-dir) + ;; Remove any leftover socket or authentication file. + (ignore-errors (delete-file server-file)) + (when server-process + (server-log (message "Restarting server"))) + (letf (((default-file-modes) ?\700)) + (add-hook 'suspend-tty-functions 'server-handle-suspend-tty) + (add-hook 'delete-frame-functions 'server-handle-delete-frame) + (add-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) + (add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) + (setq server-process + (apply #'make-network-process + :name server-name + :server t + :noquery t + :sentinel 'server-sentinel + :filter 'server-process-filter + ;; We must receive file names without being decoded. + ;; Those are decoded by server-process-filter according + ;; to file-name-coding-system. + :coding 'raw-text + ;; The rest of the args depends on the kind of socket used. + (if server-use-tcp + (list :family nil + :service t + :host (or server-host 'local) + :plist '(:authenticated nil)) + (list :family 'local + :service server-file + :plist '(:authenticated t))))) + (unless server-process (error "Could not start server process")) + (when server-use-tcp + (let ((auth-key + (loop + ;; The auth key is a 64-byte string of random chars in the + ;; range `!'..`~'. + for i below 64 + collect (+ 33 (random 94)) into auth + finally return (concat auth)))) + (process-put server-process :auth-key auth-key) + (with-temp-file server-file + (set-buffer-multibyte nil) + (setq buffer-file-coding-system 'no-conversion) + (insert (format-network-address + (process-contact server-process :local)) + " " (int-to-string (emacs-pid)) + "\n" auth-key))))))))) + +(defun server-running-p (&optional name) + "Test whether server NAME is running." + (interactive + (list (if current-prefix-arg + (read-string "Server name: " nil nil server-name)))) + (unless name (setq name server-name)) + (condition-case nil + (progn + (delete-process + (make-network-process + :name "server-client-test" :family 'local :server nil :noquery t + :service (expand-file-name name server-socket-dir))) + t) + (file-error nil))) ;;;###autoload (define-minor-mode server-mode @@ -384,143 +547,459 @@ Server mode runs a process that accepts commands from the ;; nothing if there is one (for multiple Emacs sessions)? (server-start (not server-mode))) +(defun server-eval-and-print (expr proc) + "Eval EXPR and send the result back to client PROC." + (let ((v (eval (car (read-from-string expr))))) + (when (and v proc) + (with-temp-buffer + (let ((standard-output (current-buffer))) + (pp v) + (let ((text (buffer-substring-no-properties + (point-min) (point-max)))) + (server-send-string + proc (format "-print %s\n" + (server-quote-arg text))))))))) + +(defun server-create-tty-frame (tty type proc) + (let ((frame + (server-with-environment (process-get proc 'env) + '("LANG" "LC_CTYPE" "LC_ALL" + ;; For tgetent(3); list according to ncurses(3). + "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES" + "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING" + "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO" + "TERMINFO_DIRS" "TERMPATH" + ;; rxvt wants these + "COLORFGBG" "COLORTERM") + (make-frame-on-tty tty type + ;; Ignore nowait here; we always need to + ;; clean up opened ttys when the client dies. + `((client . ,proc) + (environment . ,(process-get proc 'env))))))) + + ;; ttys don't use the `display' parameter, but callproc.c does to set + ;; the DISPLAY environment on subprocesses. + (set-frame-parameter frame 'display + (getenv-internal "DISPLAY" (process-get proc 'env))) + (select-frame frame) + (process-put proc 'frame frame) + (process-put proc 'terminal (frame-terminal frame)) + + ;; Display *scratch* by default. + (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) + + ;; Reply with our pid. + (server-send-string proc (concat "-emacs-pid " + (number-to-string (emacs-pid)) "\n")) + frame)) + +(defun server-create-window-system-frame (display nowait proc) + (if (not (fboundp 'make-frame-on-display)) + (progn + ;; This emacs does not support X. + (server-log "Window system unsupported" proc) + (server-send-string proc "-window-system-unsupported \n") + nil) + ;; Flag frame as client-created, but use a dummy client. + ;; This will prevent the frame from being deleted when + ;; emacsclient quits while also preventing + ;; `server-save-buffers-kill-terminal' from unexpectedly + ;; killing emacs on that frame. + (let* ((params `((client . ,(if nowait 'nowait proc)) + (environment . ,(process-get proc 'env)))) + (frame (make-frame-on-display + (or display + (frame-parameter nil 'display) + (getenv "DISPLAY") + (error "Please specify display")) + params))) + (server-log (format "%s created" frame) proc) + ;; XXX We need to ensure the parameters are + ;; really set because Emacs forgets unhandled + ;; initialization parameters for X frames at + ;; the moment. + (modify-frame-parameters frame params) + (select-frame frame) + (process-put proc 'frame frame) + (process-put proc 'terminal (frame-terminal frame)) + + ;; Display *scratch* by default. + (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) + frame))) + + +(defun server-goto-toplevel (proc) + (condition-case nil + ;; If we're running isearch, we must abort it to allow Emacs to + ;; display the buffer and switch to it. + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (when (bound-and-true-p isearch-mode) + (isearch-cancel)))) + ;; Signaled by isearch-cancel. + (quit (message nil))) + (when (> (recursion-depth) 0) + ;; We're inside a minibuffer already, so if the emacs-client is trying + ;; to open a frame on a new display, we might end up with an unusable + ;; frame because input from that display will be blocked (until exiting + ;; the minibuffer). Better exit this minibuffer right away. + ;; Similarly with recursive-edits such as the splash screen. + (run-with-timer 0 nil (lexical-let ((proc proc)) + (lambda () (server-execute-continuation proc)))) + (top-level))) + +;; We use various special properties on process objects: +;; - `env' stores the info about the environment of the emacsclient process. +;; - `continuation' is a no-arg function that we need to execute. It contains +;; commands we wanted to execute in some earlier invocation of the process +;; filter but that we somehow were unable to process at that time +;; (e.g. because we first need to throw to the toplevel). + +(defun server-execute-continuation (proc) + (let ((continuation (process-get proc 'continuation))) + (process-put proc 'continuation nil) + (if continuation (ignore-errors (funcall continuation))))) + (defun* server-process-filter (proc string) "Process a request from the server to edit some files. -PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." +PROC is the server process. STRING consists of a sequence of +commands prefixed by a dash. Some commands have arguments; these +are &-quoted and need to be decoded by `server-unquote-arg'. The +filter parses and executes these commands. + +To illustrate the protocol, here is an example command that +emacsclient sends to create a new X frame (note that the whole +sequence is sent on a single line): + + -env HOME /home/lorentey + -env DISPLAY :0.0 + ... lots of other -env commands + -display :0.0 + -window-system + +The following commands are accepted by the server: + +`-auth AUTH-STRING' + Authenticate the client using the secret authentication string + AUTH-STRING. + +`-env NAME=VALUE' + An environment variable on the client side. + +`-dir DIRNAME' + The current working directory of the client process. + +`-current-frame' + Forbid the creation of new frames. + +`-nowait' + Request that the next frame created should not be + associated with this client. + +`-display DISPLAY' + Set the display name to open X frames on. + +`-position LINE[:COLUMN]' + Go to the given line and column number + in the next file opened. + +`-file FILENAME' + Load the given file in the current frame. + +`-eval EXPR' + Evaluate EXPR as a Lisp expression and return the + result in -print commands. + +`-window-system' + Open a new X frame. + +`-tty DEVICENAME TYPE' + Open a new tty frame at the client. + +`-suspend' + Suspend this tty frame. The client sends this string in + response to SIGTSTP and SIGTTOU. The server must cease all I/O + on this tty until it gets a -resume command. + +`-resume' + Resume this tty frame. The client sends this string when it + gets the SIGCONT signal and it is the foreground process on its + controlling tty. + +`-ignore COMMENT' + Do nothing, but put the comment in the server + log. Useful for debugging. + + +The following commands are accepted by the client: + +`-emacs-pid PID' + Describes the process id of the Emacs process; + used to forward window change signals to it. + +`-window-system-unsupported' + Signals that the server does not + support creating X frames; the client must try again with a tty + frame. + +`-print STRING' + Print STRING on stdout. Used to send values + returned by -eval. + +`-error DESCRIPTION' + Signal an error (but continue processing). + +`-suspend' + Suspend this terminal, i.e., stop the client process. Sent + when the user presses C-z." + (server-log (concat "Received " string) proc) ;; First things first: let's check the authentication (unless (process-get proc :authenticated) (if (and (string-match "-auth \\(.*?\\)\n" string) - (equal (match-string 1 string) (process-get proc :auth-key))) - (progn - (setq string (substring string (match-end 0))) - (process-put proc :authenticated t) - (server-log "Authentication successful" proc)) + (equal (match-string 1 string) (process-get proc :auth-key))) + (progn + (setq string (substring string (match-end 0))) + (process-put proc :authenticated t) + (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) - (process-send-string proc "Authentication failed") + (server-send-string + proc (concat "-error " (server-quote-arg "Authentication failed"))) (delete-process proc) ;; We return immediately (return-from server-process-filter))) - (server-log string proc) - (let ((prev (process-get proc :previous-string))) + (let ((prev (process-get proc 'previous-string))) (when prev (setq string (concat prev string)) - (process-put proc :previous-string nil))) - (when (> (recursion-depth) 0) - ;; We're inside a minibuffer already, so if the emacs-client is trying - ;; to open a frame on a new display, we might end up with an unusable - ;; frame because input from that display will be blocked (until exiting - ;; the minibuffer). Better exit this minibuffer right away. - ;; Similarly with recursive-edits such as the splash screen. - (process-put proc :previous-string string) - (run-with-timer 0 nil (lexical-let ((proc proc)) - (lambda () (server-process-filter proc "")))) - (top-level)) - (condition-case nil - ;; If we're running isearch, we must abort it to allow Emacs to - ;; display the buffer and switch to it. - (mapc #'(lambda (buffer) - (with-current-buffer buffer - (when (bound-and-true-p isearch-mode) - (isearch-cancel)))) - (buffer-list)) - ;; Signaled by isearch-cancel - (quit (message nil))) - ;; If the input is multiple lines, - ;; process each line individually. - (while (string-match "\n" string) - (let ((request (substring string 0 (match-beginning 0))) - (coding-system (and default-enable-multibyte-characters - (or file-name-coding-system - default-file-name-coding-system))) - client nowait eval - (files nil) - (lineno 1) - (tmp-frame nil) ;; Sometimes used to embody the selected display. - (columnno 0)) - ;; Remove this line from STRING. - (setq string (substring string (match-end 0))) - (setq client (cons proc nil)) - (while (string-match "[^ ]* " request) - (let ((arg (substring request (match-beginning 0) (1- (match-end 0))))) - (setq request (substring request (match-end 0))) - (cond - ((equal "-nowait" arg) (setq nowait t)) - ((equal "-eval" arg) (setq eval t)) - ((and (equal "-display" arg) (string-match "\\([^ ]*\\) " request)) - (let ((display (server-unquote-arg (match-string 1 request)))) - (setq request (substring request (match-end 0))) - (condition-case err - (setq tmp-frame (server-select-display display)) - (error (process-send-string proc (nth 1 err)) - (setq request ""))))) - ;; ARG is a line number option. - ((string-match "\\`\\+[0-9]+\\'" arg) - (setq lineno (string-to-number (substring arg 1)))) - ;; ARG is line number:column option. - ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg) - (setq lineno (string-to-number (match-string 1 arg)) - columnno (string-to-number (match-string 2 arg)))) - (t - ;; Undo the quoting that emacsclient does - ;; for certain special characters. - (setq arg (server-unquote-arg arg)) - ;; Now decode the file name if necessary. - (when coding-system - (setq arg (decode-coding-string arg coding-system))) - (if eval - (let* (errorp - (v (condition-case errobj - (eval (car (read-from-string arg))) - (error (setq errorp t) errobj)))) - (when v - (with-temp-buffer - (let ((standard-output (current-buffer))) - (when errorp (princ "error: ")) - (pp v) - (ignore-errors - (process-send-region proc (point-min) (point-max))) - )))) - ;; ARG is a file name. - ;; Collapse multiple slashes to single slashes. - (setq arg (command-line-normalize-file-name arg)) - (push (list arg lineno columnno) files)) - (setq lineno 1) - (setq columnno 0))))) - (when files - (run-hooks 'pre-command-hook) - (server-visit-files files client nowait) - (run-hooks 'post-command-hook)) - ;; CLIENT is now a list (CLIENTNUM BUFFERS...) - (if (null (cdr client)) - ;; This client is empty; get rid of it immediately. - (progn - (delete-process proc) - (server-log "Close empty client" proc)) - ;; We visited some buffer for this client. - (or nowait (push client server-clients)) - (unless (or isearch-mode (minibufferp)) - (server-switch-buffer (nth 1 client)) - (run-hooks 'server-switch-hook) - (unless nowait - (message "%s" (substitute-command-keys + (process-put proc 'previous-string nil))) + (condition-case err + (progn + (server-add-client proc) + (if (not (string-match "\n" string)) + ;; Save for later any partial line that remains. + (when (> (length string) 0) + (process-put proc 'previous-string string)) + + ;; In earlier versions of server.el (where we used an `emacsserver' + ;; process), there could be multiple lines. Nowadays this is not + ;; supported any more. + (assert (eq (match-end 0) (length string))) + (let ((request (substring string 0 (match-beginning 0))) + (coding-system (and default-enable-multibyte-characters + (or file-name-coding-system + default-file-name-coding-system))) + nowait ; t if emacsclient does not want to wait for us. + frame ; The frame that was opened for the client (if any). + display ; Open the frame on this display. + dontkill ; t if the client should not be killed. + (commands ()) + dir + (tty-name nil) ;nil, `window-system', or the tty name. + tty-type ;string. + (files nil) + (lineno 1) + (columnno 0)) + ;; Remove this line from STRING. + (setq string (substring string (match-end 0))) + (while (string-match " *[^ ]* " request) + (let ((arg (substring request (match-beginning 0) + (1- (match-end 0))))) + (setq request (substring request (match-end 0))) + (cond + ;; -version CLIENT-VERSION: obsolete at birth. + ((and (equal "-version" arg) (string-match "[^ ]+ " request)) + (setq request (substring request (match-end 0)))) + + ;; -nowait: Emacsclient won't wait for a result. + ((equal "-nowait" arg) (setq nowait t)) + + ;; -current-frame: Don't create frames. + ((equal "-current-frame" arg) (setq tty-name nil)) + + ;; -display DISPLAY: + ;; Open X frames on the given display instead of the default. + ((and (equal "-display" arg) + (string-match "\\([^ ]*\\) " request)) + (setq display (match-string 1 request) + request (substring request (match-end 0)))) + + ;; -window-system: Open a new X frame. + ((equal "-window-system" arg) + (setq dontkill t) + (setq tty-name 'window-system)) + + ;; -resume: Resume a suspended tty frame. + ((equal "-resume" arg) + (lexical-let ((terminal (process-get proc 'terminal))) + (setq dontkill t) + (push (lambda () + (when (eq (terminal-live-p terminal) t) + (resume-tty terminal))) + commands))) + + ;; -suspend: Suspend the client's frame. (In case we + ;; get out of sync, and a C-z sends a SIGTSTP to + ;; emacsclient.) + ((equal "-suspend" arg) + (lexical-let ((terminal (process-get proc 'terminal))) + (setq dontkill t) + (push (lambda () + (when (eq (terminal-live-p terminal) t) + (suspend-tty terminal))) + commands))) + + ;; -ignore COMMENT: Noop; useful for debugging emacsclient. + ;; (The given comment appears in the server log.) + ((and (equal "-ignore" arg) (string-match "[^ ]* " request)) + (setq dontkill t + request (substring request (match-end 0)))) + + ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. + ((and (equal "-tty" arg) + (string-match "\\([^ ]*\\) \\([^ ]*\\) " request)) + (setq tty-name (match-string 1 request)) + (setq tty-type (match-string 2 request)) + (setq dontkill t) + (setq request (substring request (match-end 0)))) + + ;; -position LINE[:COLUMN]: Set point to the given + ;; position in the next file. + ((and (equal "-position" arg) + (string-match "\\+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)? " + request)) + (setq lineno (string-to-number (match-string 1 request)) + columnno (if (null (match-end 2)) 0 + (string-to-number (match-string 2 request))) + request (substring request (match-end 0)))) + + ;; -file FILENAME: Load the given file. + ((and (equal "-file" arg) + (string-match "\\([^ ]+\\) " request)) + (let ((file (server-unquote-arg (match-string 1 request)))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq file (decode-coding-string file coding-system))) + (setq file (command-line-normalize-file-name file)) + (push (list file lineno columnno) files) + (server-log (format "New file: %s (%d:%d)" + file lineno columnno) proc)) + (setq lineno 1 + columnno 0)) + + ;; -eval EXPR: Evaluate a Lisp expression. + ((and (equal "-eval" arg) + (string-match "\\([^ ]+\\) " request)) + (lexical-let ((expr (server-unquote-arg + (match-string 1 request)))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq expr (decode-coding-string expr coding-system))) + (push (lambda () (server-eval-and-print expr proc)) + commands) + (setq lineno 1 + columnno 0))) + + ;; -env NAME=VALUE: An environment variable. + ((and (equal "-env" arg) (string-match "\\([^ ]+\\) " request)) + (let ((var (server-unquote-arg (match-string 1 request)))) + ;; XXX Variables should be encoded as in getenv/setenv. + (setq request (substring request (match-end 0))) + (process-put proc 'env + (cons var (process-get proc 'env))))) + + ;; -dir DIRNAME: The cwd of the emacsclient process. + ((and (equal "-dir" arg) (string-match "\\([^ ]+\\) " request)) + (setq dir (server-unquote-arg (match-string 1 request))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq dir (decode-coding-string dir coding-system))) + (setq dir (command-line-normalize-file-name dir))) + + ;; Unknown command. + (t (error "Unknown command: %s" arg))))) + + (setq frame + (case tty-name + ((nil) (if display (server-select-display display))) + ((window-system) + (server-create-window-system-frame display nowait proc)) + (t (server-create-tty-frame tty-name tty-type proc)))) + + (process-put proc 'continuation + (lexical-let ((proc proc) + (files files) + (nowait nowait) + (commands commands) + (dontkill dontkill) + (frame frame) + (tty-name tty-name)) + (lambda () + (server-execute proc files nowait commands + dontkill frame tty-name)))) + + (when (or frame files) + (server-goto-toplevel proc)) + + (server-execute-continuation proc)))) + ;; condition-case + (error (server-return-error proc err)))) + +(defun server-execute (proc files nowait commands dontkill frame tty-name) + (condition-case err + (let* ((buffers + (when files + (run-hooks 'pre-command-hook) + (prog1 (server-visit-files files proc nowait) + (run-hooks 'post-command-hook))))) + + (mapc 'funcall (nreverse commands)) + + ;; Delete the client if necessary. + (cond + (nowait + ;; Client requested nowait; return immediately. + (server-log "Close nowait client" proc) + (server-delete-client proc)) + ((and (not dontkill) (null buffers)) + ;; This client is empty; get rid of it immediately. + (server-log "Close empty client" proc) + (server-delete-client proc))) + (cond + ((or isearch-mode (minibufferp)) + nil) + ((and frame (null buffers)) + (message "%s" (substitute-command-keys + "When done with this frame, type \\[delete-frame]"))) + ((not (null buffers)) + (server-switch-buffer (car buffers)) + (run-hooks 'server-switch-hook) + (unless nowait + (message "%s" (substitute-command-keys "When done with a buffer, type \\[server-edit]"))))) - (when (frame-live-p tmp-frame) - ;; Delete tmp-frame or make it visible depending on whether it's - ;; been used or not. - (server-unselect-display tmp-frame)))) - ;; Save for later any partial line that remains. - (when (> (length string) 0) - (process-put proc :previous-string string))) + (when (and frame (null tty-name)) + (server-unselect-display frame))) + (error (server-return-error proc err)))) + +(defun server-return-error (proc err) + (ignore-errors + (server-send-string + proc (concat "-error " (server-quote-arg + (error-message-string err)))) + (server-log (error-message-string err) proc) + (delete-process proc))) (defun server-goto-line-column (file-line-col) + "Move point to the position indicated in FILE-LINE-COL. +FILE-LINE-COL should be a three-element list as described in +`server-visit-files'." (goto-line (nth 1 file-line-col)) (let ((column-number (nth 2 file-line-col))) - (when (> column-number 0) - (move-to-column (1- column-number))))) + (if (> column-number 0) + (move-to-column (1- column-number))))) -(defun server-visit-files (files client &optional nowait) - "Find FILES and return the list CLIENT with the buffers nconc'd. +(defun server-visit-files (files proc &optional nowait) + "Find FILES and return a list of buffers created. FILES is an alist whose elements are (FILENAME LINENUMBER COLUMNNUMBER). +PROC is the client that requested this operation. NOWAIT non-nil means this client is not waiting for the results, so don't mark these buffers specially, just visit them normally." ;; Bind last-nonmenu-event to force use of keyboard, not mouse, for queries. @@ -534,7 +1013,7 @@ so don't mark these buffers specially, just visit them normally." ;; modified, revert it. If there is an existing buffer with ;; deleted file, offer to write it. (let* ((minibuffer-auto-raise (or server-raise-frame - minibuffer-auto-raise)) + minibuffer-auto-raise)) (filen (car file)) (obuf (get-file-buffer filen))) (add-to-history 'file-name-history filen) @@ -542,14 +1021,14 @@ so don't mark these buffers specially, just visit them normally." (progn (cond ((file-exists-p filen) (when (not (verify-visited-file-modtime obuf)) - (revert-buffer t nil))) + (revert-buffer t nil))) (t (when (y-or-n-p - (concat "File no longer exists: " - filen - ", write buffer to file? ")) - (write-file filen)))) - (setq server-existing-buffer t) + (concat "File no longer exists: " filen + ", write buffer to file? ")) + (write-file filen)))) + (unless server-buffer-clients + (setq server-existing-buffer t)) (server-goto-line-column file)) (set-buffer (find-file-noselect filen)) (server-goto-line-column file) @@ -557,9 +1036,12 @@ so don't mark these buffers specially, just visit them normally." (unless nowait ;; When the buffer is killed, inform the clients. (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) - (push (car client) server-buffer-clients)) + (push proc server-buffer-clients)) (push (current-buffer) client-record))) - (nconc client client-record))) + (unless nowait + (process-put proc 'buffers + (nconc (process-get proc 'buffers) client-record))) + client-record)) (defun server-buffer-done (buffer &optional for-killing) "Mark BUFFER as \"done\" for its client(s). @@ -569,27 +1051,24 @@ or nil. KILLED is t if we killed BUFFER (typically, because it was visiting a temp file). FOR-KILLING if non-nil indicates that we are called from `kill-buffer'." (let ((next-buffer nil) - (killed nil) - (old-clients server-clients)) - (while old-clients - (let ((client (car old-clients))) + (killed nil)) + (dolist (proc server-clients) + (let ((buffers (process-get proc 'buffers))) (or next-buffer - (setq next-buffer (nth 1 (memq buffer client)))) - (delq buffer client) - ;; Delete all dead buffers from CLIENT. - (let ((tail client)) - (while tail - (and (bufferp (car tail)) - (null (buffer-name (car tail))) - (delq (car tail) client)) - (setq tail (cdr tail)))) - ;; If client now has no pending buffers, - ;; tell it that it is done, and forget it entirely. - (unless (cdr client) - (delete-process (car client)) - (server-log "Close" (car client)) - (setq server-clients (delq client server-clients)))) - (setq old-clients (cdr old-clients))) + (setq next-buffer (nth 1 (memq buffer buffers)))) + (when buffers ; Ignore bufferless clients. + (setq buffers (delq buffer buffers)) + ;; Delete all dead buffers from PROC. + (dolist (b buffers) + (and (bufferp b) + (not (buffer-live-p b)) + (setq buffers (delq b buffers)))) + (process-put proc 'buffers buffers) + ;; If client now has no pending buffers, + ;; tell it that it is done, and forget it entirely. + (unless buffers + (server-log "Close" proc) + (server-delete-client proc))))) (when (and (bufferp buffer) (buffer-name buffer)) ;; We may or may not kill this buffer; ;; if we do, do not call server-buffer-done recursively @@ -654,30 +1133,32 @@ specifically for the clients and did not exist before their request for it." ;; but I think that is dangerous--the client would proceed ;; using whatever is on disk in that file. -- rms. (defun server-kill-buffer-query-function () + "Ask before killing a server buffer." (or (not server-buffer-clients) + (let ((res t)) + (dolist (proc server-buffer-clients res) + (when (and (memq proc server-clients) + (eq (process-status proc) 'open)) + (setq res nil)))) (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " (buffer-name (current-buffer)))))) -(add-hook 'kill-buffer-query-functions - 'server-kill-buffer-query-function) - (defun server-kill-emacs-query-function () - (let (live-client - (tail server-clients)) - ;; See if any clients have any buffers that are still alive. - (while tail - (when (memq t (mapcar 'stringp (mapcar 'buffer-name (cdr (car tail))))) - (setq live-client t)) - (setq tail (cdr tail))) - (or (not live-client) - (yes-or-no-p "Server buffers still have clients; exit anyway? ")))) - -(add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) + "Ask before exiting Emacs it has live clients." + (or (not server-clients) + (let (live-client) + (dolist (proc server-clients live-client) + (when (memq t (mapcar 'buffer-live-p (process-get + proc 'buffers))) + (setq live-client t)))) + (yes-or-no-p "This Emacs session has clients; exit anyway? "))) (defvar server-kill-buffer-running nil "Non-nil while `server-kill-buffer' or `server-buffer-done' is running.") (defun server-kill-buffer () + "Remove the current buffer from its clients' buffer list. +Designed to be added to `kill-buffer-hook'." ;; Prevent infinite recursion if user has made server-done-hook ;; call kill-buffer. (or server-kill-buffer-running @@ -711,18 +1192,26 @@ starts server process and that is all. Invoked by \\[server-edit]." (defun server-switch-buffer (&optional next-buffer killed-one) "Switch to another buffer, preferably one that has a client. -Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it." - ;; KILLED-ONE is t in a recursive call - ;; if we have already killed one temp-file server buffer. - ;; This means we should avoid the final "switch to some other buffer" - ;; since we've already effectively done that. +Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it. + +KILLED-ONE is t in a recursive call if we have already killed one +temp-file server buffer. This means we should avoid the final +\"switch to some other buffer\" since we've already effectively +done that." (if (null next-buffer) - (if server-clients - (server-switch-buffer (nth 1 (car server-clients)) killed-one) - (unless (or killed-one (window-dedicated-p (selected-window))) - (switch-to-buffer (other-buffer)) + (progn + (let ((rest server-clients)) + (while (and rest (not next-buffer)) + (let ((proc (car rest))) + ;; Only look at frameless clients. + (when (not (process-get proc 'frame)) + (setq next-buffer (car (process-get proc 'buffers)))) + (setq rest (cdr rest))))) + (and next-buffer (server-switch-buffer next-buffer killed-one)) + (unless (or next-buffer killed-one (window-dedicated-p (selected-window))) + ;; (switch-to-buffer (other-buffer)) (message "No server buffers remain to edit"))) - (if (not (buffer-name next-buffer)) + (if (not (buffer-live-p next-buffer)) ;; If NEXT-BUFFER is a dead buffer, remove the server records for it ;; and try the next surviving server buffer. (apply 'server-switch-buffer (server-buffer-done next-buffer)) @@ -750,8 +1239,8 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it." (get-window-with-predicate (lambda (w) (and (not (window-dedicated-p w)) - (equal (frame-parameter (window-frame w) 'display) - (frame-parameter (selected-frame) 'display)))) + (equal (frame-terminal (window-frame w)) + (frame-terminal (selected-frame))))) 'nomini 'visible (selected-window)))) (condition-case nil (switch-to-buffer next-buffer) @@ -761,10 +1250,31 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it." (when server-raise-frame (select-frame-set-input-focus (window-frame (selected-window)))))) +;;;###autoload +(defun server-save-buffers-kill-terminal (proc &optional arg) + "Offer to save each buffer, then kill PROC. + +With prefix arg, silently save all file-visiting buffers, then kill. + +If emacsclient was started with a list of filenames to edit, then +only these files will be asked to be saved." + (let ((buffers (process-get proc 'buffers))) + ;; If client is bufferless, emulate a normal Emacs session + ;; exit and offer to save all buffers. Otherwise, offer to + ;; save only the buffers belonging to the client. + (save-some-buffers arg + (if buffers + (lambda () (memq (current-buffer) buffers)) + t)) + (server-delete-client proc))) + (define-key ctl-x-map "#" 'server-edit) (defun server-unload-hook () + "Unload the server library." (server-mode -1) + (remove-hook 'suspend-tty-functions 'server-handle-suspend-tty) + (remove-hook 'delete-frame-functions 'server-handle-delete-frame) (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) (remove-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) (remove-hook 'kill-buffer-hook 'server-kill-buffer)) diff --git a/lisp/ses.el b/lisp/ses.el index e19b177ef42..3f904fde0d2 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -628,8 +628,9 @@ the old and FORCE is nil." (let ((oldval (ses-cell-value cell)) (formula (ses-cell-formula cell)) newval) - (if (eq (car-safe formula) 'ses-safe-formula) - (ses-set-cell row col 'formula (ses-safe-formula (cadr formula)))) + (when (eq (car-safe formula) 'ses-safe-formula) + (setq formula (ses-safe-formula (cadr formula))) + (ses-set-cell row col 'formula formula)) (condition-case sig (setq newval (eval formula)) (error diff --git a/lisp/shell.el b/lisp/shell.el index 6c09654a0e5..a8daf8b76d2 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -542,15 +542,16 @@ Otherwise, one argument `-i' is passed to the shell. (interactive (list (and current-prefix-arg - (read-buffer "Shell buffer: " - (generate-new-buffer-name "*shell*")) - (file-remote-p default-directory) - ;; It must be possible to declare a local default-directory. - (setq default-directory - (expand-file-name - (read-file-name - "Default directory: " default-directory default-directory - t nil 'file-directory-p)))))) + (prog1 + (read-buffer "Shell buffer: " + (generate-new-buffer-name "*shell*")) + (if (file-remote-p default-directory) + ;; It must be possible to declare a local default-directory. + (setq default-directory + (expand-file-name + (read-file-name + "Default directory: " default-directory default-directory + t nil 'file-directory-p)))))))) (setq buffer (get-buffer-create (or buffer "*shell*"))) ;; Pop to buffer, so that the buffer's window will be correctly set ;; when we call comint (so that comint sets the COLUMNS env var properly). @@ -807,51 +808,54 @@ new directory stack -- you lose. If this happens, just do the command again." (interactive) (let* ((proc (get-buffer-process (current-buffer))) - (pmark (process-mark proc))) - (goto-char pmark) - ;; If the process echoes commands, don't insert a fake command in - ;; the buffer or it will appear twice. - (unless comint-process-echoes - (insert shell-dirstack-query) (insert "\n")) - (sit-for 0) ; force redisplay - (comint-send-string proc shell-dirstack-query) - (comint-send-string proc "\n") - (set-marker pmark (point)) - (let ((pt (point)) - (regexp - (concat - (if comint-process-echoes - ;; Skip command echo if the process echoes - (concat "\\(" (regexp-quote shell-dirstack-query) "\n\\)") - "\\(\\)") - "\\(.+\n\\)"))) - ;; This extra newline prevents the user's pending input from spoofing us. - (insert "\n") (backward-char 1) - ;; Wait for one line. - (while (not (looking-at regexp)) - (accept-process-output proc) - (goto-char pt))) - (goto-char pmark) (delete-char 1) ; remove the extra newline - ;; That's the dirlist. grab it & parse it. - (let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2)))) - (dl-len (length dl)) - (ds '()) ; new dir stack - (i 0)) - (while (< i dl-len) - ;; regexp = optional whitespace, (non-whitespace), optional whitespace - (string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir - (setq ds (cons (concat comint-file-name-prefix - (substring dl (match-beginning 1) - (match-end 1))) - ds)) - (setq i (match-end 0))) - (let ((ds (nreverse ds))) - (condition-case nil - (progn (shell-cd (car ds)) - (setq shell-dirstack (cdr ds) - shell-last-dir (car shell-dirstack)) - (shell-dirstack-message)) - (error (message "Couldn't cd"))))))) + (pmark (process-mark proc)) + (started-at-pmark (= (point) (marker-position pmark)))) + (save-excursion + (goto-char pmark) + ;; If the process echoes commands, don't insert a fake command in + ;; the buffer or it will appear twice. + (unless comint-process-echoes + (insert shell-dirstack-query) (insert "\n")) + (sit-for 0) ; force redisplay + (comint-send-string proc shell-dirstack-query) + (comint-send-string proc "\n") + (set-marker pmark (point)) + (let ((pt (point)) + (regexp + (concat + (if comint-process-echoes + ;; Skip command echo if the process echoes + (concat "\\(" (regexp-quote shell-dirstack-query) "\n\\)") + "\\(\\)") + "\\(.+\n\\)"))) + ;; This extra newline prevents the user's pending input from spoofing us. + (insert "\n") (backward-char 1) + ;; Wait for one line. + (while (not (looking-at regexp)) + (accept-process-output proc) + (goto-char pt))) + (goto-char pmark) (delete-char 1) ; remove the extra newline + ;; That's the dirlist. grab it & parse it. + (let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2)))) + (dl-len (length dl)) + (ds '()) ; new dir stack + (i 0)) + (while (< i dl-len) + ;; regexp = optional whitespace, (non-whitespace), optional whitespace + (string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir + (setq ds (cons (concat comint-file-name-prefix + (substring dl (match-beginning 1) + (match-end 1))) + ds)) + (setq i (match-end 0))) + (let ((ds (nreverse ds))) + (condition-case nil + (progn (shell-cd (car ds)) + (setq shell-dirstack (cdr ds) + shell-last-dir (car shell-dirstack)) + (shell-dirstack-message)) + (error (message "Couldn't cd")))))) + (if started-at-pmark (goto-char (marker-position pmark))))) ;; For your typing convenience: (defalias 'dirs 'shell-resync-dirs) diff --git a/lisp/simple.el b/lisp/simple.el index 27d7abfc8e7..f2055faf385 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -85,34 +85,22 @@ If the optional third argument FRAME is non-nil, use that frame's buffer list instead of the selected frame's buffer list. If no other buffer exists, the buffer `*scratch*' is returned." (setq frame (or frame (selected-frame))) - (or (get-next-valid-buffer (frame-parameter frame 'buried-buffer-list) - buffer visible-ok frame) - (get-next-valid-buffer (nreverse (buffer-list frame)) - buffer visible-ok frame) + (or (get-next-valid-buffer (nreverse (buffer-list frame)) + buffer visible-ok frame) (progn (set-buffer-major-mode (get-buffer-create "*scratch*")) (get-buffer "*scratch*")))) - (defun next-buffer () "Switch to the next buffer in cyclic order." (interactive) - (let ((buffer (current-buffer)) - (bbl (frame-parameter nil 'buried-buffer-list))) + (let ((buffer (current-buffer))) (switch-to-buffer (other-buffer buffer t)) - (bury-buffer buffer) - (set-frame-parameter nil 'buried-buffer-list - (cons buffer (delq buffer bbl))))) + (bury-buffer buffer))) (defun previous-buffer () "Switch to the previous buffer in cyclic order." (interactive) - (let ((buffer (last-buffer (current-buffer) t)) - (bbl (frame-parameter nil 'buried-buffer-list))) - (switch-to-buffer buffer) - ;; Clean up buried-buffer-list up to and including the chosen buffer. - (while (and bbl (not (eq (car bbl) buffer))) - (setq bbl (cdr bbl))) - (set-frame-parameter nil 'buried-buffer-list bbl))) + (switch-to-buffer (last-buffer (current-buffer) t))) ;;; next-error support framework @@ -469,7 +457,7 @@ than the value of `fill-column' and ARG is nil." ;; Mark the newline(s) `hard'. (if use-hard-newlines (set-hard-newline-properties - (- (point) (if arg (prefix-numeric-value arg) 1)) (point))) + (- (point) (prefix-numeric-value arg)) (point))) ;; If the newline leaves the previous line blank, ;; and we have a left margin, delete that from the blank line. (or flag @@ -1055,7 +1043,7 @@ display the result of expression evaluation." (if (boundp 'edebug-active) edebug-active))) (let ((char-string (if (or (if (boundp 'edebug-active) edebug-active) - (memq this-command '(eval-last-sexp eval-print-last-sexp))) + (memq this-command '(eval-last-sexp eval-print-last-sexp))) (prin1-char value)))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) @@ -2557,6 +2545,8 @@ the text which should be made available. The second, optional, argument PUSH, has the same meaning as the similar argument to `x-set-cut-buffer', which see.") +(make-variable-frame-local 'interprogram-cut-function) + (defvar interprogram-paste-function nil "Function to call to get text cut from other programs. @@ -2577,6 +2567,8 @@ most recent string, the function should return nil. If it is difficult to tell whether Emacs or some other program provided the current string, it is probably good enough to return nil if the string is equal (according to `string=') to the last text Emacs provided.") + +(make-variable-frame-local 'interprogram-paste-function) @@ -2753,7 +2745,9 @@ text. See `insert-for-yank'." "Save the region as if killed, but don't kill it. In Transient Mark mode, deactivate the mark. If `interprogram-cut-function' is non-nil, also save the text for a window -system cut and paste." +system cut and paste. + +This command's old key binding has been given to `kill-ring-save'." (interactive "r") (if (eq last-command 'kill-region) (kill-append (filter-buffer-substring beg end) (< end beg)) @@ -2823,7 +2817,7 @@ The argument is used for internal purposes; do not supply one." (defcustom yank-excluded-properties '(read-only invisible intangible field mouse-face help-echo local-map keymap yank-handler follow-link fontified) - "*Text properties to discard when yanking. + "Text properties to discard when yanking. The value should be a list of text properties to discard or t, which means to discard all text properties." :type '(choice (const :tag "All" t) (repeat symbol)) @@ -3631,7 +3625,7 @@ The beginning of a blank line does not count as the end of a line." "Current goal column for vertical motion. It is the column where point was at the start of current run of vertical motion commands. -When the `track-eol' feature is doing its job, the value is 9999.") +When the `track-eol' feature is doing its job, the value is `most-positive-fixnum'.") (defcustom line-move-ignore-invisible t "*Non-nil means \\[next-line] and \\[previous-line] ignore invisible lines. @@ -3653,7 +3647,7 @@ Outline mode sets this." (vpos (nth 1 lh)) (ypos (nth 2 lh)) (rbot (nth 3 lh)) - ppos py vs) + py vs) (when (or (null lh) (>= rbot (frame-char-height)) (<= ypos (- (frame-char-height)))) @@ -3730,11 +3724,11 @@ Outline mode sets this." ;; Don't count beg of empty line as end of line ;; unless we just did explicit end-of-line. (or (not (bolp)) (eq last-command 'move-end-of-line))) - 9999 + most-positive-fixnum (current-column)))) - (if (and (not (integerp selective-display)) - (not line-move-ignore-invisible)) + (if (not (or (integerp selective-display) + line-move-ignore-invisible)) ;; Use just newline characters. ;; Set ARG to 0 if we move as many lines as requested. (or (if (> arg 0) @@ -3973,7 +3967,8 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (not (bobp)) (progn (while (and (not (bobp)) (invisible-p (1- (point)))) - (goto-char (previous-char-property-change (point)))) + (goto-char (previous-single-char-property-change + (point) 'invisible))) (backward-char 1))) (point))))) (goto-char newpos) @@ -4000,7 +3995,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (or arg (setq arg 1)) (let ((orig (point)) - start first-vis first-vis-field-value) + first-vis first-vis-field-value) ;; Move by lines, if ARG is not 1 (the default). (if (/= arg 1) @@ -4011,7 +4006,6 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (while (and (not (bobp)) (invisible-p (1- (point)))) (goto-char (previous-char-property-change (point))) (skip-chars-backward "^\n")) - (setq start (point)) ;; Now find first visible char in the line (while (and (not (eobp)) (invisible-p (point))) @@ -4662,86 +4656,82 @@ it skips the contents of comments that end before point." (skip-syntax-backward "/\\") (point)))))) (let* ((oldpos (point)) - blinkpos - message-log-max ; Don't log messages about paren matching. - matching-paren - open-paren-line-string) - (save-excursion - (save-restriction - (if blink-matching-paren-distance - (narrow-to-region (max (minibuffer-prompt-end) - (- (point) blink-matching-paren-distance)) - oldpos)) - (condition-case () - (let ((parse-sexp-ignore-comments - (and parse-sexp-ignore-comments - (not blink-matching-paren-dont-ignore-comments)))) - (setq blinkpos (scan-sexps oldpos -1))) - (error nil))) - (and blinkpos - ;; Not syntax '$'. - (not (eq (syntax-class (syntax-after blinkpos)) 8)) - (setq matching-paren - (let ((syntax (syntax-after blinkpos))) - (and (consp syntax) - (eq (syntax-class syntax) 4) - (cdr syntax))))) - (cond - ((not (or (eq matching-paren (char-before oldpos)) - ;; The cdr might hold a new paren-class info rather than - ;; a matching-char info, in which case the two CDRs - ;; should match. - (eq matching-paren (cdr (syntax-after (1- oldpos)))))) - (message "Mismatched parentheses")) - ((not blinkpos) - (if (not blink-matching-paren-distance) - (message "Unmatched parenthesis"))) - ((pos-visible-in-window-p blinkpos) - ;; Matching open within window, temporarily move to blinkpos but only - ;; if `blink-matching-paren-on-screen' is non-nil. - (and blink-matching-paren-on-screen - (not show-paren-mode) - (save-excursion - (goto-char blinkpos) - (sit-for blink-matching-delay)))) - (t - (save-excursion - (goto-char blinkpos) - (setq open-paren-line-string - ;; Show what precedes the open in its line, if anything. - (if (save-excursion - (skip-chars-backward " \t") - (not (bolp))) - (buffer-substring (line-beginning-position) - (1+ blinkpos)) - ;; Show what follows the open in its line, if anything. - (if (save-excursion - (forward-char 1) - (skip-chars-forward " \t") - (not (eolp))) - (buffer-substring blinkpos - (line-end-position)) - ;; Otherwise show the previous nonblank line, - ;; if there is one. - (if (save-excursion - (skip-chars-backward "\n \t") - (not (bobp))) - (concat - (buffer-substring (progn - (skip-chars-backward "\n \t") - (line-beginning-position)) - (progn (end-of-line) - (skip-chars-backward " \t") - (point))) - ;; Replace the newline and other whitespace with `...'. - "..." - (buffer-substring blinkpos (1+ blinkpos))) - ;; There is nothing to show except the char itself. - (buffer-substring blinkpos (1+ blinkpos))))))) - (message "Matches %s" - (substring-no-properties open-paren-line-string)))))))) - -;Turned off because it makes dbx bomb out. + (message-log-max nil) ; Don't log messages about paren matching. + (blinkpos + (save-excursion + (save-restriction + (if blink-matching-paren-distance + (narrow-to-region + (max (minibuffer-prompt-end) ;(point-min) unless minibuf. + (- (point) blink-matching-paren-distance)) + oldpos)) + (let ((parse-sexp-ignore-comments + (and parse-sexp-ignore-comments + (not blink-matching-paren-dont-ignore-comments)))) + (condition-case () + (scan-sexps oldpos -1) + (error nil)))))) + (matching-paren + (and blinkpos + ;; Not syntax '$'. + (not (eq (syntax-class (syntax-after blinkpos)) 8)) + (let ((syntax (syntax-after blinkpos))) + (and (consp syntax) + (eq (syntax-class syntax) 4) + (cdr syntax)))))) + (cond + ((not (or (eq matching-paren (char-before oldpos)) + ;; The cdr might hold a new paren-class info rather than + ;; a matching-char info, in which case the two CDRs + ;; should match. + (eq matching-paren (cdr (syntax-after (1- oldpos)))))) + (message "Mismatched parentheses")) + ((not blinkpos) + (if (not blink-matching-paren-distance) + (message "Unmatched parenthesis"))) + ((pos-visible-in-window-p blinkpos) + ;; Matching open within window, temporarily move to blinkpos but only + ;; if `blink-matching-paren-on-screen' is non-nil. + (and blink-matching-paren-on-screen + (not show-paren-mode) + (save-excursion + (goto-char blinkpos) + (sit-for blink-matching-delay)))) + (t + (save-excursion + (goto-char blinkpos) + (let ((open-paren-line-string + ;; Show what precedes the open in its line, if anything. + (cond + ((save-excursion (skip-chars-backward " \t") (not (bolp))) + (buffer-substring (line-beginning-position) + (1+ blinkpos))) + ;; Show what follows the open in its line, if anything. + ((save-excursion + (forward-char 1) + (skip-chars-forward " \t") + (not (eolp))) + (buffer-substring blinkpos + (line-end-position))) + ;; Otherwise show the previous nonblank line, + ;; if there is one. + ((save-excursion (skip-chars-backward "\n \t") (not (bobp))) + (concat + (buffer-substring (progn + (skip-chars-backward "\n \t") + (line-beginning-position)) + (progn (end-of-line) + (skip-chars-backward " \t") + (point))) + ;; Replace the newline and other whitespace with `...'. + "..." + (buffer-substring blinkpos (1+ blinkpos)))) + ;; There is nothing to show except the char itself. + (t (buffer-substring blinkpos (1+ blinkpos)))))) + (message "Matches %s" + (substring-no-properties open-paren-line-string))))))))) + +;; Turned off because it makes dbx bomb out. (setq blink-paren-function 'blink-matching-open) ;; This executes C-g typed while Emacs is waiting for a command. @@ -5558,13 +5548,13 @@ after it has been set up properly in other respects." (funcall mode) ;; Set up other local variables. - (mapcar (lambda (v) - (condition-case () ;in case var is read-only - (if (symbolp v) - (makunbound v) - (set (make-local-variable (car v)) (cdr v))) - (error nil))) - lvars) + (mapc (lambda (v) + (condition-case () ;in case var is read-only + (if (symbolp v) + (makunbound v) + (set (make-local-variable (car v)) (cdr v))) + (error nil))) + lvars) ;; Run any hooks (typically set up by the major mode ;; for cloning to work properly). @@ -5626,36 +5616,33 @@ front of the list of recently selected ones." ;;; Handling of Backspace and Delete keys. -(defcustom normal-erase-is-backspace - (and (not noninteractive) - (or (memq system-type '(ms-dos windows-nt)) - (eq window-system 'mac) - (and (memq window-system '(x)) - (fboundp 'x-backspace-delete-keys-p) - (x-backspace-delete-keys-p)) - ;; If the terminal Emacs is running on has erase char - ;; set to ^H, use the Backspace key for deleting - ;; backward and, and the Delete key for deleting forward. - (and (null window-system) - (eq tty-erase-char ?\^H)))) - "If non-nil, Delete key deletes forward and Backspace key deletes backward. - -On window systems, the default value of this option is chosen -according to the keyboard used. If the keyboard has both a Backspace -key and a Delete key, and both are mapped to their usual meanings, the -option's default value is set to t, so that Backspace can be used to -delete backward, and Delete can be used to delete forward. - -If not running under a window system, customizing this option accomplishes -a similar effect by mapping C-h, which is usually generated by the -Backspace key, to DEL, and by mapping DEL to C-d via -`keyboard-translate'. The former functionality of C-h is available on -the F1 key. You should probably not use this setting if you don't -have both Backspace, Delete and F1 keys. +(defcustom normal-erase-is-backspace 'maybe + "Set the default behaviour of the Delete and Backspace keys. + +If set to t, Delete key deletes forward and Backspace key deletes +backward. + +If set to nil, both Delete and Backspace keys delete backward. + +If set to 'maybe (which is the default), Emacs automatically +selects a behaviour. On window systems, the behaviour depends on +the keyboard used. If the keyboard has both a Backspace key and +a Delete key, and both are mapped to their usual meanings, the +option's default value is set to t, so that Backspace can be used +to delete backward, and Delete can be used to delete forward. + +If not running under a window system, customizing this option +accomplishes a similar effect by mapping C-h, which is usually +generated by the Backspace key, to DEL, and by mapping DEL to C-d +via `keyboard-translate'. The former functionality of C-h is +available on the F1 key. You should probably not use this +setting if you don't have both Backspace, Delete and F1 keys. Setting this variable with setq doesn't take effect. Programmatically, call `normal-erase-is-backspace-mode' (which see) instead." - :type 'boolean + :type '(choice (const :tag "Off" nil) + (const :tag "Maybe" maybe) + (other :tag "On" t)) :group 'editing-basics :version "21.1" :set (lambda (symbol value) @@ -5665,17 +5652,37 @@ call `normal-erase-is-backspace-mode' (which see) instead." (normal-erase-is-backspace-mode (or value 0)) (set-default symbol value)))) +(defun normal-erase-is-backspace-setup-frame (&optional frame) + "Set up `normal-erase-is-backspace-mode' on FRAME, if necessary." + (unless frame (setq frame (selected-frame))) + (with-selected-frame frame + (unless (terminal-parameter nil 'normal-erase-is-backspace) + (normal-erase-is-backspace-mode + (if (if (eq normal-erase-is-backspace 'maybe) + (and (not noninteractive) + (or (memq system-type '(ms-dos windows-nt)) + (eq window-system 'mac) + (and (memq window-system '(x)) + (fboundp 'x-backspace-delete-keys-p) + (x-backspace-delete-keys-p)) + ;; If the terminal Emacs is running on has erase char + ;; set to ^H, use the Backspace key for deleting + ;; backward, and the Delete key for deleting forward. + (and (null window-system) + (eq tty-erase-char ?\^H)))) + normal-erase-is-backspace) + 1 0))))) (defun normal-erase-is-backspace-mode (&optional arg) "Toggle the Erase and Delete mode of the Backspace and Delete keys. With numeric arg, turn the mode on if and only if ARG is positive. -On window systems, when this mode is on, Delete is mapped to C-d and -Backspace is mapped to DEL; when this mode is off, both Delete and -Backspace are mapped to DEL. (The remapping goes via -`function-key-map', so binding Delete or Backspace in the global or -local keymap will override that.) +On window systems, when this mode is on, Delete is mapped to C-d +and Backspace is mapped to DEL; when this mode is off, both +Delete and Backspace are mapped to DEL. (The remapping goes via +`local-function-key-map', so binding Delete or Backspace in the +global or local keymap will override that.) In addition, on window systems, the bindings of C-Delete, M-Delete, C-M-Delete, C-Backspace, M-Backspace, and C-M-Backspace are changed in @@ -5697,54 +5704,57 @@ have both Backspace, Delete and F1 keys. See also `normal-erase-is-backspace'." (interactive "P") - (setq normal-erase-is-backspace - (if arg - (> (prefix-numeric-value arg) 0) - (not normal-erase-is-backspace))) - - (cond ((or (memq window-system '(x w32 mac pc)) - (memq system-type '(ms-dos windows-nt))) - (let ((bindings - `(([C-delete] [C-backspace]) - ([M-delete] [M-backspace]) - ([C-M-delete] [C-M-backspace]) - (,esc-map - [C-delete] [C-backspace]))) - (old-state (lookup-key function-key-map [delete]))) - - (if normal-erase-is-backspace + (let ((enabled (or (and arg (> (prefix-numeric-value arg) 0)) + (and (not arg) + (not (eq 1 (terminal-parameter + nil 'normal-erase-is-backspace))))))) + (set-terminal-parameter nil 'normal-erase-is-backspace + (if enabled 1 0)) + + (cond ((or (memq window-system '(x w32 mac pc)) + (memq system-type '(ms-dos windows-nt))) + (let* ((bindings + `(([C-delete] [C-backspace]) + ([M-delete] [M-backspace]) + ([C-M-delete] [C-M-backspace]) + (,esc-map + [C-delete] [C-backspace]))) + (old-state (lookup-key local-function-key-map [delete]))) + + (if enabled + (progn + (define-key local-function-key-map [delete] [?\C-d]) + (define-key local-function-key-map [kp-delete] [?\C-d]) + (define-key local-function-key-map [backspace] [?\C-?])) + (define-key local-function-key-map [delete] [?\C-?]) + (define-key local-function-key-map [kp-delete] [?\C-?]) + (define-key local-function-key-map [backspace] [?\C-?])) + + ;; Maybe swap bindings of C-delete and C-backspace, etc. + (unless (equal old-state (lookup-key local-function-key-map [delete])) + (dolist (binding bindings) + (let ((map global-map)) + (when (keymapp (car binding)) + (setq map (car binding) binding (cdr binding))) + (let* ((key1 (nth 0 binding)) + (key2 (nth 1 binding)) + (binding1 (lookup-key map key1)) + (binding2 (lookup-key map key2))) + (define-key map key1 binding2) + (define-key map key2 binding1))))))) + (t + (if enabled (progn - (define-key function-key-map [delete] [?\C-d]) - (define-key function-key-map [kp-delete] [?\C-d]) - (define-key function-key-map [backspace] [?\C-?])) - (define-key function-key-map [delete] [?\C-?]) - (define-key function-key-map [kp-delete] [?\C-?]) - (define-key function-key-map [backspace] [?\C-?])) - - ;; Maybe swap bindings of C-delete and C-backspace, etc. - (unless (equal old-state (lookup-key function-key-map [delete])) - (dolist (binding bindings) - (let ((map global-map)) - (when (keymapp (car binding)) - (setq map (car binding) binding (cdr binding))) - (let* ((key1 (nth 0 binding)) - (key2 (nth 1 binding)) - (binding1 (lookup-key map key1)) - (binding2 (lookup-key map key2))) - (define-key map key1 binding2) - (define-key map key2 binding1))))))) - (t - (if normal-erase-is-backspace - (progn - (keyboard-translate ?\C-h ?\C-?) - (keyboard-translate ?\C-? ?\C-d)) - (keyboard-translate ?\C-h ?\C-h) - (keyboard-translate ?\C-? ?\C-?)))) - - (run-hooks 'normal-erase-is-backspace-hook) - (if (interactive-p) - (message "Delete key deletes %s" - (if normal-erase-is-backspace "forward" "backward")))) + (keyboard-translate ?\C-h ?\C-?) + (keyboard-translate ?\C-? ?\C-d)) + (keyboard-translate ?\C-h ?\C-h) + (keyboard-translate ?\C-? ?\C-?)))) + + (run-hooks 'normal-erase-is-backspace-hook) + (if (interactive-p) + (message "Delete key deletes %s" + (if (terminal-parameter nil 'normal-erase-is-backspace) + "forward" "backward"))))) (defvar vis-mode-saved-buffer-invisibility-spec nil "Saved value of `buffer-invisibility-spec' when Visible mode is on.") @@ -5800,7 +5810,8 @@ works by saving the value of `buffer-invisibility-spec' and setting it to nil." ;; Definitely 2.0pre3, probably all 2.0pre's before this. '((semantic semantic-version "2\\.0pre[1-3]" "The version of `semantic' loaded does not work in Emacs 22. -It can cause constant high CPU load. Upgrade to at least 2.0pre4.") +It can cause constant high CPU load. +Upgrade to at least Semantic 2.0pre4 (distributed with CEDET 1.0pre4).") ;; CUA-mode does not work with GNU Emacs version 22.1 and newer. ;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode ;; provided the `CUA-mode' feature. Since this is no longer true, diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index e3484bb0a48..5d4400958d6 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -645,8 +645,12 @@ Point is moved to the end of the conflict." (error nil))) found)) -(defun smerge-refine-chopup-region (beg end file) - "Chopup the region into small elements, one per line." +(defun smerge-refine-chopup-region (beg end file &optional preproc) + "Chopup the region into small elements, one per line. +Save the result into FILE. +If non-nil, PREPROC is called with no argument in a buffer that contains +a copy of the text, just before chopping it up. It can be used to replace +chars to try and eliminate some spurious differences." ;; ediff chops up into words, where the definition of a word is ;; customizable. Instead we here keep only one char per line. ;; The advantages are that there's nothing to configure, that we get very @@ -661,14 +665,18 @@ Point is moved to the end of the conflict." (let ((buf (current-buffer))) (with-temp-buffer (insert-buffer-substring buf beg end) + (when preproc (goto-char (point-min)) (funcall preproc)) (goto-char (point-min)) (while (not (eobp)) (forward-char 1) + ;; We add \n after each char except after \n, so we get one line per + ;; text char, where each line contains just one char, except for \n + ;; chars which are represented by the empty line. (unless (eq (char-before) ?\n) (insert ?\n))) (let ((coding-system-for-write 'emacs-mule)) (write-region (point-min) (point-max) file nil 'nomessage))))) -(defun smerge-refine-highlight-change (buf beg match-num1 match-num2) +(defun smerge-refine-highlight-change (buf beg match-num1 match-num2 props) (let* ((startline (string-to-number (match-string match-num1))) (ol (make-overlay (+ beg startline -1) @@ -676,30 +684,25 @@ Point is moved to the end of the conflict." (string-to-number (match-string match-num2)) startline)) buf + ;; Make them tend to shrink rather than spread when editing. 'front-advance nil))) - (overlay-put ol 'smerge 'refine) (overlay-put ol 'evaporate t) - (overlay-put ol 'face 'smerge-refined-change))) - - -(defun smerge-refine () - "Highlight the parts of the conflict that are different." - (interactive) - ;; FIXME: make it work with 3-way conflicts. - (smerge-match-conflict) - (remove-overlays (match-beginning 0) (match-end 0) 'smerge 'refine) - (smerge-ensure-match 1) - (smerge-ensure-match 3) - (let ((buf (current-buffer)) - ;; Read them before the match-data gets clobbered. - (beg1 (match-beginning 1)) (end1 (match-end 1)) - (beg2 (match-beginning 3)) (end2 (match-end 3)) - (file1 (make-temp-file "smerge1")) - (file2 (make-temp-file "smerge2"))) + (dolist (x props) + (overlay-put ol (car x) (cdr x))))) + +(defun smerge-refine-subst (beg1 end1 beg2 end2 props &optional preproc) + "Show fine differences in the two regions BEG1..END1 and BEG2..END2. +PROPS is an alist of properties to put (via overlays) on the changes. +If non-nil, PREPROC is called with no argument in a buffer that contains +a copy of a region, just before preparing it to for `diff'. It can be used to +replace chars to try and eliminate some spurious differences." + (let* ((buf (current-buffer)) + (file1 (make-temp-file "diff1")) + (file2 (make-temp-file "diff2"))) ;; Chop up regions into smaller elements and save into files. - (smerge-refine-chopup-region beg1 end1 file1) - (smerge-refine-chopup-region beg2 end2 file2) + (smerge-refine-chopup-region beg1 end1 file1 preproc) + (smerge-refine-chopup-region beg2 end2 file2 preproc) ;; Call diff on those files. (unwind-protect @@ -716,15 +719,28 @@ Point is moved to the end of the conflict." (buffer-substring (point) (line-end-position))) (let ((op (char-after (match-beginning 3)))) (when (memq op '(?d ?c)) - (smerge-refine-highlight-change buf beg1 1 2)) + (smerge-refine-highlight-change buf beg1 1 2 props)) (when (memq op '(?a ?c)) - (smerge-refine-highlight-change buf beg2 4 5))) + (smerge-refine-highlight-change buf beg2 4 5 props))) (forward-line 1) ;Skip hunk header. (and (re-search-forward "^[0-9]" nil 'move) ;Skip hunk body. (goto-char (match-beginning 0)))))) (delete-file file1) (delete-file file2)))) +(defun smerge-refine () + "Highlight the parts of the conflict that are different." + (interactive) + ;; FIXME: make it work with 3-way conflicts. + (smerge-match-conflict) + (remove-overlays (match-beginning 0) (match-end 0) 'smerge 'refine) + (smerge-ensure-match 1) + (smerge-ensure-match 3) + (smerge-refine-subst (match-beginning 1) (match-end 1) + (match-beginning 3) (match-end 3) + '((smerge . refine) + (face . smerge-refined-change)))) + (defun smerge-diff (n1 n2) (smerge-match-conflict) (smerge-ensure-match n1) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index c51d2ef9a80..6861615d468 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -994,7 +994,7 @@ supported at a time. 'speedbar-buffer "Speedbar" #'speedbar-frame-mode - (if dframe-xemacsp + (if (featurep 'xemacs) (append speedbar-frame-plist ;; This is a hack to get speedbar to iconfiy ;; with the selected frame. @@ -1020,7 +1020,7 @@ supported at a time. (defun speedbar-frame-reposition-smartly () "Reposition the speedbar frame to be next to the attached frame." - (cond ((and dframe-xemacsp + (cond ((and (featurep 'xemacs) (or (member 'left speedbar-frame-plist) (member 'top speedbar-frame-plist))) (dframe-reposition-frame @@ -1029,7 +1029,7 @@ supported at a time. (cons (car (cdr (member 'left speedbar-frame-plist))) (car (cdr (member 'top speedbar-frame-plist))))) ) - ((and (not dframe-xemacsp) + ((and (not (featurep 'xemacs)) (or (assoc 'left speedbar-frame-parameters) (assoc 'top speedbar-frame-parameters))) ;; if left/top were specified in the parameters, pass them @@ -1164,7 +1164,7 @@ return true without a query." This gives visual indications of what is up. It EXPECTS the speedbar frame and window to be the currently active frame and window." (if (and (frame-live-p (speedbar-current-frame)) - (or (not dframe-xemacsp) + (or (not (featurep 'xemacs)) (with-no-warnings (specifier-instance has-modeline-p))) speedbar-buffer) @@ -1252,7 +1252,7 @@ and the existence of packages." (if speedbar-previous-menu (easy-menu-remove speedbar-previous-menu)) (setq speedbar-previous-menu md) ;; Now add the new menu - (if (not dframe-xemacsp) + (if (not (featurep 'xemacs)) (easy-menu-define speedbar-menu-map (current-local-map) "Speedbar menu" md) (easy-menu-add md (current-local-map)) @@ -2915,7 +2915,7 @@ to add more types of version control systems." (not (or (and (featurep 'ange-ftp) (string-match (car (symbol-value - (if dframe-xemacsp + (if (featurep 'xemacs) 'ange-ftp-directory-format 'ange-ftp-name-format))) (expand-file-name default-directory))) diff --git a/lisp/startup.el b/lisp/startup.el index 3dcf65cc461..947fc0da57a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -36,24 +36,31 @@ (defvar command-line-processed nil "Non-nil once command line has been processed.") +(defvar window-system initial-window-system + "Name of window system the selected frame is displaying through. +The value is a symbol--for instance, `x' for X windows. +The value is nil if the selected frame is on a text-only-terminal.") + +(make-variable-frame-local 'window-system) + (defgroup initialization nil "Emacs start-up procedure." :group 'environment) (defcustom initial-buffer-choice nil "Buffer to show after starting Emacs. -If the value is nil and `inhibit-splash-screen' is nil, show the +If the value is nil and `inhibit-startup-screen' is nil, show the startup screen. If the value is string, visit the specified file or directory using `find-file'. If t, open the `*scratch*' buffer." :type '(choice - (const :tag "Splash screen" nil) + (const :tag "Startup screen" nil) (directory :tag "Directory" :value "~/") (file :tag "File" :value "~/file.txt") (const :tag "Lisp scratch buffer" t)) :version "23.1" :group 'initialization) -(defcustom inhibit-splash-screen nil +(defcustom inhibit-startup-screen nil "Non-nil inhibits the startup screen. It also inhibits display of the initial message in the `*scratch*' buffer. @@ -62,7 +69,10 @@ you are familiar with the contents of the startup screen." :type 'boolean :group 'initialization) -(defvaralias 'inhibit-startup-message 'inhibit-splash-screen) +(defvaralias 'inhibit-splash-screen 'inhibit-startup-screen) +(defvaralias 'inhibit-startup-message 'inhibit-startup-screen) + +(defvar startup-screen-inhibit-startup-screen nil) (defcustom inhibit-startup-echo-area-message nil "*Non-nil inhibits the initial startup echo area message. @@ -97,6 +107,12 @@ the remaining command-line args are in the variable `command-line-args-left'.") (defvar command-line-args-left nil "List of command-line args not yet processed.") +(defvaralias 'argv 'command-line-args-left + "List of command-line args not yet processed. +This is a convenience alias, so that one can write \(pop argv\) +inside of --eval command line arguments in order to access +following arguments.") + (defvar command-line-functions nil ;; lrs 7/31/89 "List of functions to process unrecognized command-line arguments. Each function should access the dynamically bound variables @@ -308,6 +324,10 @@ from being initialized." (defvar pure-space-overflow nil "Non-nil if building Emacs overflowed pure space.") +(defvar pure-space-overflow-message "\ +Warning Warning!!! Pure space overflow !!!Warning Warning +\(See the node Pure Storage in the Lisp manual for details.)\n") + (defvar tutorial-directory nil "Directory containing the Emacs TUTORIAL files.") @@ -458,36 +478,19 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; for instance due to a dense colormap. (when (or frame-initial-frame ;; If frame-initial-frame has no meaning, do this anyway. - (not (and window-system + (not (and initial-window-system (not noninteractive) - (not (eq window-system 'pc))))) + (not (eq initial-window-system 'pc))))) ;; Modify the initial frame based on what .emacs puts into ;; ...-frame-alist. (if (fboundp 'frame-notice-user-settings) (frame-notice-user-settings)) + ;; Set the faces for the initial background mode even if + ;; frame-notice-user-settings didn't (such as on a tty). + ;; frame-set-background-mode is idempotent, so it won't + ;; cause any harm if it's already been done. (if (fboundp 'frame-set-background-mode) - ;; Set the faces for the initial background mode even if - ;; frame-notice-user-settings didn't (such as on a tty). - ;; frame-set-background-mode is idempotent, so it won't - ;; cause any harm if it's already been done. - (let ((frame (selected-frame)) - term) - (when (and (null window-system) - ;; Don't override default set by files in lisp/term. - (null default-frame-background-mode) - (let ((bg (frame-parameter frame 'background-color))) - (or (null bg) - (member bg '(unspecified "unspecified-bg" - "unspecified-fg"))))) - - (setq term (getenv "TERM")) - ;; Some files in lisp/term do a better job with the - ;; background mode, but we leave this here anyway, in - ;; case they remove those files. - (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" - term) - (setq default-frame-background-mode 'light))) - (frame-set-background-mode (selected-frame))))) + (frame-set-background-mode (selected-frame)))) ;; Now we know the user's default font, so add it to the menu. (if (fboundp 'font-menu-add-default) @@ -496,7 +499,25 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (run-hooks 'window-setup-hook)) (or menubar-bindings-done (if (display-popup-menus-p) - (precompute-menubar-bindings))))))) + (precompute-menubar-bindings))))) + ;; Subprocesses of Emacs do not have direct access to the terminal, so + ;; unless told otherwise they should only assume a dumb terminal. + ;; We are careful to do it late (after term-setup-hook), although the + ;; new multi-tty code does not use $TERM any more there anyway. + (setenv "TERM" "dumb") + ;; Remove DISPLAY from the process-environment as well. This allows + ;; `callproc.c' to give it a useful adaptive default which is either + ;; the value of the `display' frame-parameter or the DISPLAY value + ;; from initial-environment. + (let ((display (frame-parameter nil 'display))) + ;; Be careful which DISPLAY to remove from process-environment: follow + ;; the logic of `callproc.c'. + (if (stringp display) (setq display (concat "DISPLAY=" display)) + (dolist (varval initial-environment) + (if (string-match "\\`DISPLAY=" varval) + (setq display varval)))) + (when display + (delete display process-environment))))) ;; Precompute the keyboard equivalents in the menu bar items. (defun precompute-menubar-bindings () @@ -528,6 +549,20 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (defvar tool-bar-originally-present nil "Non-nil if tool-bars are present before user and site init files are read.") +(defvar handle-args-function-alist '((nil . tty-handle-args)) + "Functions for processing window-system dependent command-line arguments. +Window system startup files should add their own function to this +alist, which should parse the command line arguments. Those +pertaining to the window system should be processed and removed +from the returned command line.") + +(defvar window-system-initialization-alist '((nil . ignore)) + "Alist of window-system initialization functions. +Window-system startup files should add their own initialization +function to this list. The function should take no arguments, +and initialize the window system environment to prepare for +opening the first frame (e.g. open a connection to an X server).") + ;; Handle the X-like command-line arguments "-fg", "-bg", "-name", etc. (defun tty-handle-args (args) (let (rest) @@ -632,16 +667,22 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (setq eol-mnemonic-dos "(DOS)" eol-mnemonic-mac "(Mac)"))) - ;; Read window system's init file if using a window system. + ;; Make sure window system's init file was loaded in loadup.el if using a window system. (condition-case error - (if (and window-system (not noninteractive)) - (load (concat term-file-prefix - (symbol-name window-system) - "-win") - ;; Every window system should have a startup file; - ;; barf if we can't find it. - nil t)) - ;; If we can't read it, print the error message and exit. + (unless noninteractive + (if (and initial-window-system + (not (featurep + (intern (concat (symbol-name initial-window-system) "-win"))))) + (error "Unsupported window system `%s'" initial-window-system)) + ;; Process window-system specific command line parameters. + (setq command-line-args + (funcall (or (cdr (assq initial-window-system handle-args-function-alist)) + (error "Unsupported window system `%s'" initial-window-system)) + command-line-args)) + ;; Initialize the window system. (Open connection, etc.) + (funcall (or (cdr (assq initial-window-system window-system-initialization-alist)) + (error "Unsupported window system `%s'" initial-window-system)))) + ;; If there was an error, print the error message and exit. (error (princ (if (eq (car error) 'error) @@ -657,13 +698,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (cdr error) ", ")))) 'external-debugging-output) (terpri 'external-debugging-output) - (setq window-system nil) + (setq initial-window-system nil) (kill-emacs))) - ;; Windowed displays do this inside their *-win.el. - (unless (or (display-graphic-p) noninteractive) - (setq command-line-args (tty-handle-args command-line-args))) - (set-locale-environment nil) ;; Convert preloaded file names in load-history to absolute. @@ -786,7 +823,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; If frame was created with a menu bar, set menu-bar-mode on. (unless (or noninteractive emacs-basic-display - (and (memq window-system '(x w32)) + (and (memq initial-window-system '(x w32)) (<= (frame-parameter nil 'menu-bar-lines) 0))) (menu-bar-mode 1)) @@ -800,7 +837,6 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; Can't do this init in defcustom because the relevant variables ;; are not set. (custom-reevaluate-setting 'blink-cursor-mode) - (custom-reevaluate-setting 'normal-erase-is-backspace) (custom-reevaluate-setting 'tooltip-mode) (custom-reevaluate-setting 'global-font-lock-mode) (custom-reevaluate-setting 'mouse-wheel-down-event) @@ -810,13 +846,15 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (custom-reevaluate-setting 'focus-follows-mouse) (custom-reevaluate-setting 'global-auto-composition-mode) + (normal-erase-is-backspace-setup-frame) + ;; Register default TTY colors for the case the terminal hasn't a - ;; terminal init file. - (unless (memq window-system '(x w32 mac)) - ;; We do this regardles of whether the terminal supports colors - ;; or not, since they can switch that support on or off in - ;; mid-session by setting the tty-color-mode frame parameter. - (tty-register-default-colors)) + ;; terminal init file. We do this regardles of whether the terminal + ;; supports colors or not and regardless the current display type, + ;; since users can connect to color-capable terminals and also + ;; switch color support on or off in mid-session by setting the + ;; tty-color-mode frame parameter. + (tty-register-default-colors) ;; Record whether the tool-bar is present before the user and site ;; init files are processed. frame-notice-user-settings uses this @@ -841,8 +879,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (load site-run-file t t)) ;; Sites should not disable this. Only individuals should disable - ;; the startup message. - (setq inhibit-startup-message nil) + ;; the startup screen. + (setq inhibit-startup-screen nil) ;; Warn for invalid user name. (when init-file-user @@ -936,7 +974,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (setq user-init-file source)))) (unless inhibit-default-init - (let ((inhibit-startup-message nil)) + (let ((inhibit-startup-screen nil)) ;; Users are supposed to be told their rights. ;; (Plus how to get help and how to undo.) ;; Don't you dare turn this off for anyone @@ -1001,11 +1039,11 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; buffers (probably *scratch*, *Messages*, *Minibuff-0*). ;; Arguably this should only be done if they're free of ;; multibyte characters. - (mapcar (lambda (buffer) - (with-current-buffer buffer - (if enable-multibyte-characters - (set-buffer-multibyte nil)))) - (buffer-list)) + (mapc (lambda (buffer) + (with-current-buffer buffer + (if enable-multibyte-characters + (set-buffer-multibyte nil)))) + (buffer-list)) ;; Also re-set the language environment in case it was ;; originally done before unibyte was set and is sensitive to ;; unibyte (display table, terminal coding system &c). @@ -1082,31 +1120,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this. (unless (or noninteractive - window-system - (null term-file-prefix)) - (let* ((TERM (getenv "TERM")) - (term TERM) - hyphend) - (while (and term - (not (load (concat term-file-prefix term) t t))) - ;; Strip off last hyphen and what follows, then try again - (setq term - (if (setq hyphend (string-match "[-_][^-_]+\\'" term)) - (substring term 0 hyphend) - nil))) - (setq term TERM) - ;; The terminal file has been loaded, now call the terminal specific - ;; initialization function. - (while term - (let ((term-init-func (intern-soft (concat "terminal-init-" term)))) - (if (not (fboundp term-init-func)) - ;; Strip off last hyphen and what follows, then try again - (setq term - (if (setq hyphend (string-match "[-_][^-_]+\\'" term)) - (substring term 0 hyphend) - nil)) - (setq term nil) - (funcall term-init-func)))))) + initial-window-system) + (tty-run-terminal-initialization (selected-frame))) ;; Update the out-of-memory error message based on user's key bindings ;; for save-some-buffers. @@ -1135,7 +1150,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ") "Initial message displayed in *scratch* buffer at startup. If this is nil, no message will be displayed. -If `inhibit-splash-screen' is non-nil, then no message is displayed, +If `inhibit-startup-screen' is non-nil, then no message is displayed, regardless of the value of this variable." :type '(choice (text :tag "Message") (const :tag "none" nil)) @@ -1146,90 +1161,151 @@ regardless of the value of this variable." ;;; Fancy splash screen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar fancy-splash-text - '((:face (variable-pitch :weight bold) - "Important Help menu items:\n" - :face variable-pitch - :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) - "\tLearn how to use Emacs efficiently" - (lambda () - (let* ((en "TUTORIAL") - (tut (or (get-language-info current-language-environment - 'tutorial) - en)) - (title (with-temp-buffer - (insert-file-contents - (expand-file-name tut tutorial-directory) - nil 0 256) - (search-forward ".") - (buffer-substring (point-min) (1- (point)))))) - ;; If there is a specific tutorial for the current language - ;; environment and it is not English, append its title. - (if (string= en tut) - "" - (concat " (" title ")")))) - "\n" - :face variable-pitch - :link ("Emacs FAQ" (lambda (button) (view-emacs-FAQ))) - "\tFrequently asked questions and answers\n" - :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) - "\tView the Emacs manual using Info\n" - :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) - "\tGNU Emacs comes with " - :face (variable-pitch :slant oblique) - "ABSOLUTELY NO WARRANTY\n" - :face variable-pitch - :link ("Copying Conditions" (lambda (button) (describe-copying))) - "\tConditions for redistributing and changing Emacs\n" - :link ("Getting New Versions" (lambda (button) (describe-distribution))) - "\tHow to obtain the latest version of Emacs\n" - :link ("More Manuals / Ordering Manuals" (lambda (button) (view-order-manuals))) - " Buying printed manuals from the FSF\n") - (:face (variable-pitch :weight bold) - "Useful tasks:\n" - :face variable-pitch - :link ("Visit New File" - (lambda (button) (call-interactively 'find-file))) - "\tSpecify a new file's name, to edit the file\n" - :link ("Open Home Directory" - (lambda (button) (dired "~"))) - "\tOpen your home directory, to operate on its files\n" - :link ("Open *scratch* buffer" - (lambda (button) (switch-to-buffer (get-buffer-create "*scratch*")))) - "\tOpen buffer for notes you don't want to save\n" - :link ("Customize Startup" - (lambda (button) (customize-group 'initialization))) - "\tChange initialization settings including this screen\n" - - "\nEmacs Guided Tour\tSee " - :link ("http://www.gnu.org/software/emacs/tour/" - (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) - - )) +(defvar fancy-startup-text + '((:face (variable-pitch :foreground "red") + "Welcome to " + :link ("GNU Emacs" + (lambda (button) (browse-url "http://www.gnu.org/software/emacs/")) + "Browse http://www.gnu.org/software/emacs/") + ", one component of the " + :link + (lambda () + (if (eq system-type 'gnu/linux) + '("GNU/Linux" + (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html")) + "Browse http://www.gnu.org/gnu/linux-and-gnu.html") + '("GNU" (lambda (button) (describe-project)) + "Display info on the GNU project"))) + " operating system.\n" + :face variable-pitch "To quit a partially entered command, type " + :face default "Control-g" + :face variable-pitch ".\n\n" + :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) + "\tLearn basic keystroke commands" + (lambda () + (let* ((en "TUTORIAL") + (tut (or (get-language-info current-language-environment + 'tutorial) + en)) + (title (with-temp-buffer + (insert-file-contents + (expand-file-name tut tutorial-directory) + nil 0 256) + (search-forward ".") + (buffer-substring (point-min) (1- (point)))))) + ;; If there is a specific tutorial for the current language + ;; environment and it is not English, append its title. + (if (string= en tut) + "" + (concat " (" title ")")))) + "\n" + :face variable-pitch + :link ("Emacs Guided Tour" + (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/")) + "Browse http://www.gnu.org/software/emacs/tour/") + "\tOverview of Emacs features\n" + :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) + "\tView the Emacs manual using Info\n" + :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) + "\tGNU Emacs comes with " + :face (variable-pitch :slant oblique) + "ABSOLUTELY NO WARRANTY\n" + :face variable-pitch + :link ("Copying Conditions" (lambda (button) (describe-copying))) + "\tConditions for redistributing and changing Emacs\n" + :link ("Ordering Manuals" (lambda (button) (view-order-manuals))) + "\tPurchasing printed copies of manuals\n" + "\n")) "A list of texts to show in the middle part of splash screens. Each element in the list should be a list of strings or pairs `:face FACE', like `fancy-splash-insert' accepts them.") +(defvar fancy-about-text + '((:face (variable-pitch :foreground "red") + "This is " + :link ("GNU Emacs" + (lambda (button) (browse-url "http://www.gnu.org/software/emacs/")) + "Browse http://www.gnu.org/software/emacs/") + ", one component of the " + :link + (lambda () + (if (eq system-type 'gnu/linux) + '("GNU/Linux" + (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html")) + "Browse http://www.gnu.org/gnu/linux-and-gnu.html") + '("GNU" (lambda (button) (describe-project)) + "Display info on the GNU project."))) + " operating system.\n" + :face (lambda () + (list 'variable-pitch :foreground + (if (eq (frame-parameter nil 'background-mode) 'dark) + "cyan" "darkblue"))) + "\n" + (lambda () (emacs-version)) + "\n" + :face (variable-pitch :height 0.5) + (lambda () emacs-copyright) + "\n\n" + :face variable-pitch + :link ("Authors" + (lambda (button) + (view-file (expand-file-name "AUTHORS" data-directory)) + (goto-char (point-min)))) + "\tMany people have contributed code included in GNU Emacs\n" + :link ("Contributing" + (lambda (button) + (view-file (expand-file-name "CONTRIBUTE" data-directory)) + (goto-char (point-min)))) + "\tHow to contribute improvements to Emacs\n" + "\n" + :link ("GNU and Freedom" (lambda (button) (describe-project))) + "\tWhy we developed GNU Emacs, and the GNU operating system\n" + :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) + "\tGNU Emacs comes with " + :face (variable-pitch :slant oblique) + "ABSOLUTELY NO WARRANTY\n" + :face variable-pitch + :link ("Copying Conditions" (lambda (button) (describe-copying))) + "\tConditions for redistributing and changing Emacs\n" + :link ("Getting New Versions" (lambda (button) (describe-distribution))) + "\tHow to obtain the latest version of Emacs\n" + :link ("Ordering Manuals" (lambda (button) (view-order-manuals))) + "\tBuying printed manuals from the FSF\n" + "\n" + :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) + "\tLearn basic Emacs keystroke commands" + (lambda () + (let* ((en "TUTORIAL") + (tut (or (get-language-info current-language-environment + 'tutorial) + en)) + (title (with-temp-buffer + (insert-file-contents + (expand-file-name tut tutorial-directory) + nil 0 256) + (search-forward ".") + (buffer-substring (point-min) (1- (point)))))) + ;; If there is a specific tutorial for the current language + ;; environment and it is not English, append its title. + (if (string= en tut) + "" + (concat " (" title ")")))) + "\n" + :link ("Emacs Guided Tour" + (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/")) + "Browse http://www.gnu.org/software/emacs/tour/") + "\tSee an overview of the many facilities of GNU Emacs" + )) + "A list of texts to show in the middle part of the About screen. +Each element in the list should be a list of strings or pairs +`:face FACE', like `fancy-splash-insert' accepts them.") + (defgroup fancy-splash-screen () "Fancy splash screen when Emacs starts." :version "21.1" :group 'initialization) - -(defcustom fancy-splash-delay 7 - "*Delay in seconds between splash screens." - :group 'fancy-splash-screen - :type 'integer) - - -(defcustom fancy-splash-max-time 30 - "*Show splash screens for at most this number of seconds. -Values less than twice `fancy-splash-delay' are ignored." - :group 'fancy-splash-screen - :type 'integer) - - (defcustom fancy-splash-image nil "*The image to show in the splash screens, or nil for defaults." :group 'fancy-splash-screen @@ -1249,27 +1325,35 @@ Values less than twice `fancy-splash-delay' are ignored." ;; These are temporary storage areas for the splash screen display. -(defvar fancy-current-text nil) (defvar fancy-splash-help-echo nil) -(defvar fancy-splash-stop-time nil) -(defvar fancy-splash-outer-buffer nil) (defun fancy-splash-insert (&rest args) "Insert text into the current buffer, with faces. -Arguments from ARGS should be either strings, functions called -with no args that return a string, or pairs `:face FACE', -where FACE is a valid face specification, as it can be used with -`put-text-property'." +Arguments from ARGS should be either strings; functions called +with no args that return a string; pairs `:face FACE', where FACE +is a face specification usable with `put-text-property'; or pairs +`:link LINK' where LINK is a list of arguments to pass to +`insert-button', of the form (LABEL ACTION [HELP-ECHO]), which +specifies the button's label, `action' property and help-echo string. +FACE and LINK can also be functions, which are evaluated to obtain +a face or button specification." (let ((current-face nil)) (while args (cond ((eq (car args) :face) - (setq args (cdr args) current-face (car args))) + (setq args (cdr args) current-face (car args)) + (if (functionp current-face) + (setq current-face (funcall current-face)))) ((eq (car args) :link) (setq args (cdr args)) (let ((spec (car args))) + (if (functionp spec) + (setq spec (funcall spec))) (insert-button (car spec) 'face (list 'link current-face) 'action (cadr spec) + 'help-echo (concat "mouse-2, RET: " + (or (nth 2 spec) + "Follow this link")) 'follow-link t))) (t (insert (propertize (let ((it (car args))) (if (functionp it) @@ -1309,49 +1393,38 @@ where FACE is a valid face specification, as it can be used with ;; Insert the image with a help-echo and a link. (make-button (prog1 (point) (insert-image img)) (point) 'face 'default - 'help-echo "mouse-2: browse http://www.gnu.org/" + 'help-echo "mouse-2, RET: Browse http://www.gnu.org/" 'action (lambda (button) (browse-url "http://www.gnu.org/")) 'follow-link t) - (insert "\n")))) - (fancy-splash-insert - :face '(variable-pitch :background "red") - "\n!! This version is ALPHA status. It may lose your data!!\n\n") - (fancy-splash-insert - :face '(variable-pitch :foreground "red") - (if (eq system-type 'gnu/linux) - "GNU Emacs is one component of the GNU/Linux operating system." - "GNU Emacs is one component of the GNU operating system.")) - (insert "\n") - (fancy-splash-insert - :face 'variable-pitch - "You can do basic editing with the menu bar and scroll bar \ -using the mouse.\n" - :face 'variable-pitch - "To quit a partially entered command, type " - :face 'default - "Control-g" - :face 'variable-pitch - "." - "\n\n") - (when fancy-splash-outer-buffer - (fancy-splash-insert - :face 'variable-pitch - "Type " - :face 'default - "`q'" - :face 'variable-pitch - " to exit from this screen.\n"))) - -(defun fancy-splash-tail () + (insert "\n\n"))))) + +(defun fancy-startup-tail (&optional concise) "Insert the tail part of the splash screen into the current buffer." (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark) "cyan" "darkblue"))) + (unless concise + (fancy-splash-insert + :face 'variable-pitch + "\nTo start... " + :link '("Open a File" + (lambda (button) (call-interactively 'find-file)) + "Specify a new file's name, to edit the file") + " " + :link '("Open Home Directory" + (lambda (button) (dired "~")) + "Open your home directory, to operate on its files") + " " + :link '("Customize Startup" + (lambda (button) (customize-group 'initialization)) + "Change initialization settings including this screen") + "\n")) (fancy-splash-insert :face `(variable-pitch :foreground ,fg) "\nThis is " (emacs-version) "\n" :face '(variable-pitch :height 0.5) - emacs-copyright) + emacs-copyright + "\n") (and auto-save-list-file-prefix ;; Don't signal an error if the ;; directory for auto-save-list files @@ -1366,104 +1439,111 @@ using the mouse.\n" auto-save-list-file-prefix))) t) (fancy-splash-insert :face '(variable-pitch :foreground "red") - "\n\nIf an Emacs session crashed recently, " + "\nIf an Emacs session crashed recently, " "type " :face '(fixed-pitch :foreground "red") "Meta-x recover-session RET" :face '(variable-pitch :foreground "red") "\nto recover" - " the files you were editing.\n")))) - -(defun fancy-splash-screens-1 (buffer) - "Timer function displaying a splash screen." - (when (> (float-time) fancy-splash-stop-time) - (throw 'stop-splashing nil)) - (unless fancy-current-text - (setq fancy-current-text fancy-splash-text)) - (let ((text (car fancy-current-text)) - (inhibit-read-only t)) - (set-buffer buffer) - (erase-buffer) - (if pure-space-overflow - (insert "\ -Warning Warning!!! Pure space overflow !!!Warning Warning -\(See the node Pure Storage in the Lisp manual for details.)\n")) - (fancy-splash-head) - (apply #'fancy-splash-insert text) - (fancy-splash-tail) - (unless (current-message) - (message fancy-splash-help-echo)) - (set-buffer-modified-p nil) - (goto-char (point-min)) - (force-mode-line-update) - (setq fancy-current-text (cdr fancy-current-text)))) + " the files you were editing.")) + + (when concise + (fancy-splash-insert + :face 'variable-pitch "\n\n" + :link '("Dismiss" (lambda (button) + (when startup-screen-inhibit-startup-screen + (customize-set-variable 'inhibit-startup-screen t) + (customize-mark-to-save 'inhibit-startup-screen) + (custom-save-all)) + (let ((w (get-buffer-window "*GNU Emacs*"))) + (and w (not (one-window-p)) (delete-window w))) + (kill-buffer "*GNU Emacs*"))) + " ") + (when (or user-init-file custom-file) + (let ((checked (create-image "\300\300\141\143\067\076\034\030" + 'xbm t :width 8 :height 8 :background "grey75" + :foreground "black" :relief -2 :ascent 'center)) + (unchecked (create-image (make-string 8 0) + 'xbm t :width 8 :height 8 :background "grey75" + :foreground "black" :relief -2 :ascent 'center))) + (insert-button + " " :on-glyph checked :off-glyph unchecked 'checked nil + 'display unchecked 'follow-link t + 'action (lambda (button) + (if (overlay-get button 'checked) + (progn (overlay-put button 'checked nil) + (overlay-put button 'display (overlay-get button :off-glyph)) + (setq startup-screen-inhibit-startup-screen nil)) + (overlay-put button 'checked t) + (overlay-put button 'display (overlay-get button :on-glyph)) + (setq startup-screen-inhibit-startup-screen t))))) + (fancy-splash-insert :face '(variable-pitch :height 0.9) + " Don't show this message again."))))) (defun exit-splash-screen () "Stop displaying the splash screen buffer." (interactive) - (if fancy-splash-outer-buffer - (throw 'exit nil) - (quit-window t))) - -(defun fancy-splash-screens (&optional static) - "Display fancy splash screens when Emacs starts." - (if (not static) - (let ((old-hourglass display-hourglass) - (fancy-splash-outer-buffer (current-buffer)) - splash-buffer - (frame (fancy-splash-frame)) - timer) - (save-selected-window - (select-frame frame) - (switch-to-buffer "*About GNU Emacs*") - (make-local-variable 'cursor-type) - (setq splash-buffer (current-buffer)) - (catch 'stop-splashing - (unwind-protect - (let ((cursor-type nil)) - (setq display-hourglass nil - buffer-undo-list t - mode-line-format (propertize "---- %b %-" - 'face 'mode-line-buffer-id) - fancy-splash-stop-time (+ (float-time) - fancy-splash-max-time) - timer (run-with-timer 0 fancy-splash-delay - #'fancy-splash-screens-1 - splash-buffer)) - (use-local-map splash-screen-keymap) - (setq tab-width 22) - (message "%s" (startup-echo-area-message)) - (setq buffer-read-only t) - (recursive-edit)) - (cancel-timer timer) - (setq display-hourglass old-hourglass) - (kill-buffer splash-buffer))))) - ;; If static is non-nil, don't show fancy splash screen. - (if (or (window-minibuffer-p) - (window-dedicated-p (selected-window))) - (pop-to-buffer (current-buffer)) - (switch-to-buffer "*GNU Emacs*")) - (setq buffer-read-only nil) - (erase-buffer) - (if pure-space-overflow - (insert "\ -Warning Warning!!! Pure space overflow !!!Warning Warning -\(See the node Pure Storage in the Lisp manual for details.)\n")) - (let (fancy-splash-outer-buffer) - (fancy-splash-head) - (dolist (text fancy-splash-text) + (quit-window t)) + +(defun fancy-startup-screen (&optional concise) + "Display fancy startup screen. +If CONCISE is non-nil, display a concise version of the +splash screen in another window." + (with-current-buffer (get-buffer-create "*GNU Emacs*") + (let ((inhibit-read-only t)) + (erase-buffer) + (make-local-variable 'startup-screen-inhibit-startup-screen) + (if pure-space-overflow + (insert pure-space-overflow-message)) + (unless concise + (fancy-splash-head)) + (dolist (text fancy-startup-text) (apply #'fancy-splash-insert text) (insert "\n")) (skip-chars-backward "\n") (delete-region (point) (point-max)) (insert "\n") - (fancy-splash-tail) + (fancy-startup-tail concise)) + (use-local-map splash-screen-keymap) + (setq tab-width 22) + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (if (and view-read-only (not view-mode)) + (view-mode-enter nil 'kill-buffer)) + (goto-char (point-min))) + (if (or (window-minibuffer-p) + (window-dedicated-p (selected-window))) + (pop-to-buffer (current-buffer))) + (if concise + (display-buffer (get-buffer "*GNU Emacs*")) + (switch-to-buffer "*GNU Emacs*"))) + +(defun fancy-about-screen () + "Display fancy About screen." + (let ((frame (fancy-splash-frame))) + (save-selected-window + (select-frame frame) + (switch-to-buffer "*About GNU Emacs*") + (setq buffer-undo-list t + mode-line-format (propertize "---- %b %-" + 'face 'mode-line-buffer-id)) + (let ((inhibit-read-only t)) + (erase-buffer) + (if pure-space-overflow + (insert pure-space-overflow-message)) + (fancy-splash-head) + (dolist (text fancy-about-text) + (apply #'fancy-splash-insert text) + (insert "\n")) + (unless (current-message) + (message fancy-splash-help-echo)) + (set-buffer-modified-p nil) + (goto-char (point-min)) + (force-mode-line-update)) (use-local-map splash-screen-keymap) (setq tab-width 22) - (set-buffer-modified-p nil) + (message "%s" (startup-echo-area-message)) (setq buffer-read-only t) - (if (and view-read-only (not view-mode)) - (view-mode-enter nil 'kill-buffer)) (goto-char (point-min))))) (defun fancy-splash-frame () @@ -1498,356 +1578,376 @@ we put it on this frame." (> frame-height (+ image-height 19))))))) -(defun normal-splash-screen (&optional static) - "Display splash screen when Emacs starts." +(defun normal-splash-screen (&optional startup) + "Display non-graphic splash screen. +If optional argument STARTUP is non-nil, display the startup screen +after Emacs starts. If STARTUP is nil, display the About screen." (let ((prev-buffer (current-buffer))) - (unwind-protect - (with-current-buffer (get-buffer-create "*About GNU Emacs*") - (setq buffer-read-only nil) - (erase-buffer) - (set (make-local-variable 'tab-width) 8) - (if (not static) - (set (make-local-variable 'mode-line-format) - (propertize "---- %b %-" 'face 'mode-line-buffer-id))) - - (if pure-space-overflow - (insert "\ -Warning Warning!!! Pure space overflow !!!Warning Warning -\(See the node Pure Storage in the Lisp manual for details.)\n")) - - ;; The convention for this piece of code is that - ;; each piece of output starts with one or two newlines - ;; and does not end with any newlines. - (insert "Welcome to GNU Emacs") - (insert - (if (eq system-type 'gnu/linux) - ", one component of the GNU/Linux operating system.\n" - ", a part of the GNU operating system.\n")) - - (if (not static) - (insert (substitute-command-keys - (concat - "\nType \\[recenter] to quit from this screen.\n")))) - - (if (display-mouse-p) - ;; The user can use the mouse to activate menus - ;; so give help in terms of menu items. - (progn - (insert "\ + (with-current-buffer (get-buffer-create "*About GNU Emacs*") + (setq buffer-read-only nil) + (erase-buffer) + (set (make-local-variable 'tab-width) 8) + (if (not startup) + (set (make-local-variable 'mode-line-format) + (propertize "---- %b %-" 'face 'mode-line-buffer-id))) + + (if pure-space-overflow + (insert pure-space-overflow-message)) + + ;; The convention for this piece of code is that + ;; each piece of output starts with one or two newlines + ;; and does not end with any newlines. + (insert (if startup "Welcome to GNU Emacs" "This is GNU Emacs")) + (insert + (if (eq system-type 'gnu/linux) + ", one component of the GNU/Linux operating system.\n" + ", a part of the GNU operating system.\n")) + + (if startup + (if (display-mouse-p) + ;; The user can use the mouse to activate menus + ;; so give help in terms of menu items. + (normal-mouse-startup-screen) + + ;; No mouse menus, so give help using kbd commands. + (normal-no-mouse-startup-screen)) + + (normal-about-screen)) + + ;; The rest of the startup screen is the same on all + ;; kinds of terminals. + + ;; Give information on recovering, if there was a crash. + (and startup + auto-save-list-file-prefix + ;; Don't signal an error if the + ;; directory for auto-save-list files + ;; does not yet exist. + (file-directory-p (file-name-directory + auto-save-list-file-prefix)) + (directory-files + (file-name-directory auto-save-list-file-prefix) + nil + (concat "\\`" + (regexp-quote (file-name-nondirectory + auto-save-list-file-prefix))) + t) + (insert "\n\nIf an Emacs session crashed recently, " + "type Meta-x recover-session RET\nto recover" + " the files you were editing.\n")) + + (use-local-map splash-screen-keymap) + + ;; Display the input that we set up in the buffer. + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (if (and view-read-only (not view-mode)) + (view-mode-enter nil 'kill-buffer)) + (switch-to-buffer "*About GNU Emacs*") + (if startup (rename-buffer "*GNU Emacs*" t)) + (goto-char (point-min))))) + +(defun normal-mouse-startup-screen () + ;; The user can use the mouse to activate menus + ;; so give help in terms of menu items. + (insert "\ You can do basic editing with the menu bar and scroll bar using the mouse. To quit a partially entered command, type Control-g.\n") - (insert "\nImportant Help menu items:\n") - (insert-button "Emacs Tutorial" - 'action (lambda (button) (help-with-tutorial)) - 'follow-link t) - (insert "\t\tLearn how to use Emacs efficiently\n") - (insert-button "Emacs FAQ" - 'action (lambda (button) (view-emacs-FAQ)) - 'follow-link t) - (insert "\t\tFrequently asked questions and answers\n") - (insert-button "Read the Emacs Manual" - 'action (lambda (button) (info-emacs-manual)) - 'follow-link t) - (insert "\tView the Emacs manual using Info\n") - (insert-button "\(Non)Warranty" - 'action (lambda (button) (describe-no-warranty)) - 'follow-link t) - (insert "\t\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") - (insert-button "Copying Conditions" - 'action (lambda (button) (describe-copying)) - 'follow-link t) - (insert "\tConditions for redistributing and changing Emacs\n") - (insert-button "Getting New Versions" - 'action (lambda (button) (describe-distribution)) - 'follow-link t) - (insert "\tHow to obtain the latest version of Emacs\n") - (insert-button "More Manuals / Ordering Manuals" - 'action (lambda (button) (view-order-manuals)) - 'follow-link t) - (insert " How to order printed manuals from the FSF\n") - - (insert "\nUseful tasks:\n") - (insert-button "Visit New File" - 'action (lambda (button) (call-interactively 'find-file)) - 'follow-link t) - (insert "\t\tSpecify a new file's name, to edit the file\n") - (insert-button "Open Home Directory" - 'action (lambda (button) (dired "~")) - 'follow-link t) - (insert "\tOpen your home directory, to operate on its files\n") - (insert-button "Open *scratch* buffer" - 'action (lambda (button) (switch-to-buffer - (get-buffer-create "*scratch*"))) - 'follow-link t) - (insert "\tOpen buffer for notes you don't want to save\n") - (insert-button "Customize Startup" - 'action (lambda (button) (customize-group 'initialization)) - 'follow-link t) - (insert "\tChange initialization settings including this screen\n") - - (insert "\n" (emacs-version) - "\n" emacs-copyright)) - - ;; No mouse menus, so give help using kbd commands. - - ;; If keys have their default meanings, - ;; use precomputed string to save lots of time. - (if (and (eq (key-binding "\C-h") 'help-command) - (eq (key-binding "\C-xu") 'advertised-undo) - (eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs) - (eq (key-binding "\C-ht") 'help-with-tutorial) - (eq (key-binding "\C-hi") 'info) - (eq (key-binding "\C-hr") 'info-emacs-manual) - (eq (key-binding "\C-h\C-n") 'view-emacs-news)) - (progn - (insert " -Get help C-h (Hold down CTRL and press h) + (insert "\nImportant Help menu items:\n") + (insert-button "Emacs Tutorial" + 'action (lambda (button) (help-with-tutorial)) + 'follow-link t) + (insert "\t\tLearn basic Emacs keystroke commands\n") + (insert-button "Read the Emacs Manual" + 'action (lambda (button) (info-emacs-manual)) + 'follow-link t) + (insert "\tView the Emacs manual using Info\n") + (insert-button "\(Non)Warranty" + 'action (lambda (button) (describe-no-warranty)) + 'follow-link t) + (insert "\t\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") + (insert-button "Copying Conditions" + 'action (lambda (button) (describe-copying)) + 'follow-link t) + (insert "\tConditions for redistributing and changing Emacs\n") + (insert-button "More Manuals / Ordering Manuals" + 'action (lambda (button) (view-order-manuals)) + 'follow-link t) + (insert " How to order printed manuals from the FSF\n") + + (insert "\nUseful tasks:\n") + (insert-button "Visit New File" + 'action (lambda (button) (call-interactively 'find-file)) + 'follow-link t) + (insert "\t\tSpecify a new file's name, to edit the file\n") + (insert-button "Open Home Directory" + 'action (lambda (button) (dired "~")) + 'follow-link t) + (insert "\tOpen your home directory, to operate on its files\n") + (insert-button "Customize Startup" + 'action (lambda (button) (customize-group 'initialization)) + 'follow-link t) + (insert "\tChange initialization settings including this screen\n") + + (insert "\n" (emacs-version) + "\n" emacs-copyright)) + +;; No mouse menus, so give help using kbd commands. +(defun normal-no-mouse-startup-screen () + + ;; If keys have their default meanings, + ;; use precomputed string to save lots of time. + (if (and (eq (key-binding "\C-h") 'help-command) + (eq (key-binding "\C-xu") 'advertised-undo) + (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal) + (eq (key-binding "\C-ht") 'help-with-tutorial) + (eq (key-binding "\C-hi") 'info) + (eq (key-binding "\C-hr") 'info-emacs-manual) + (eq (key-binding "\C-h\C-n") 'view-emacs-news)) + (progn + (insert " +Get help\t C-h (Hold down CTRL and press h) ") - (insert-button "Emacs manual" - 'action (lambda (button) (info-emacs-manual)) - 'follow-link t) - (insert " C-h r\t") - (insert-button "Browse manuals" - 'action (lambda (button) (Info-directory)) - 'follow-link t) - (insert "\t C-h i + (insert-button "Emacs manual" + 'action (lambda (button) (info-emacs-manual)) + 'follow-link t) + (insert " C-h r\t") + (insert-button "Browse manuals" + 'action (lambda (button) (Info-directory)) + 'follow-link t) + (insert "\t C-h i ") - (insert-button "Emacs tutorial" - 'action (lambda (button) (help-with-tutorial)) - 'follow-link t) - (insert " C-h t\tUndo changes\t C-x u + (insert-button "Emacs tutorial" + 'action (lambda (button) (help-with-tutorial)) + 'follow-link t) + (insert " C-h t\tUndo changes\t C-x u ") - (insert-button "Buy manuals" - 'action (lambda (button) (view-order-manuals)) - 'follow-link t) - (insert "\t C-h C-m\tExit Emacs\t C-x C-c")) + (insert-button "Buy manuals" + 'action (lambda (button) (view-order-manuals)) + 'follow-link t) + (insert "\t C-h C-m\tExit Emacs\t C-x C-c")) - (insert (format " -Get help %s + (insert (format " +Get help\t %s " - (let ((where (where-is-internal - 'help-command nil t))) - (if where - (key-description where) - "M-x help")))) - (insert-button "Emacs manual" - 'action (lambda (button) (info-emacs-manual)) - 'follow-link t) - (insert (substitute-command-keys" \\[info-emacs-manual]\t")) - (insert-button "Browse manuals" - 'action (lambda (button) (Info-directory)) - 'follow-link t) - (insert (substitute-command-keys "\t \\[info] + (let ((where (where-is-internal + 'help-command nil t))) + (if where + (key-description where) + "M-x help")))) + (insert-button "Emacs manual" + 'action (lambda (button) (info-emacs-manual)) + 'follow-link t) + (insert (substitute-command-keys"\t \\[info-emacs-manual]\t")) + (insert-button "Browse manuals" + 'action (lambda (button) (Info-directory)) + 'follow-link t) + (insert (substitute-command-keys "\t \\[info] ")) - (insert-button "Emacs tutorial" - 'action (lambda (button) (help-with-tutorial)) - 'follow-link t) - (insert (substitute-command-keys - " \\[help-with-tutorial]\tUndo changes\t \\[advertised-undo] + (insert-button "Emacs tutorial" + 'action (lambda (button) (help-with-tutorial)) + 'follow-link t) + (insert (substitute-command-keys + "\t \\[help-with-tutorial]\tUndo changes\t \\[advertised-undo] ")) - (insert-button "Buy manuals" - 'action (lambda (button) (view-order-manuals)) - 'follow-link t) - (insert (substitute-command-keys - "\t \\[view-order-manuals]\tExit Emacs\t \\[save-buffers-kill-emacs]"))) - - ;; Say how to use the menu bar with the keyboard. - (insert "\n") - (insert-button "Activate menubar" - 'action (lambda (button) (tmm-menubar)) - 'follow-link t) - (if (and (eq (key-binding "\M-`") 'tmm-menubar) - (eq (key-binding [f10]) 'tmm-menubar)) - (insert " F10 or ESC ` or M-`") - (insert (substitute-command-keys " \\[tmm-menubar]"))) - - ;; Many users seem to have problems with these. - (insert " + (insert-button "Buy manuals" + 'action (lambda (button) (view-order-manuals)) + 'follow-link t) + (insert (substitute-command-keys + "\t \\[view-order-manuals]\tExit Emacs\t \\[save-buffers-kill-terminal]"))) + + ;; Say how to use the menu bar with the keyboard. + (insert "\n") + (insert-button "Activate menubar" + 'action (lambda (button) (tmm-menubar)) + 'follow-link t) + (if (and (eq (key-binding "\M-`") 'tmm-menubar) + (eq (key-binding [f10]) 'tmm-menubar)) + (insert " F10 or ESC ` or M-`") + (insert (substitute-command-keys " \\[tmm-menubar]"))) + + ;; Many users seem to have problems with these. + (insert " \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. If you have no Meta key, you may instead type ESC followed by the character.)") - ;; Insert links to useful tasks - (insert "\nUseful tasks:\n") - - (insert-button "Visit New File" - 'action (lambda (button) (call-interactively 'find-file)) - 'follow-link t) - (insert "\t\t\t") - (insert-button "Open Home Directory" - 'action (lambda (button) (dired "~")) - 'follow-link t) - (insert "\n") - - (insert-button "Customize Startup" - 'action (lambda (button) (customize-group 'initialization)) - 'follow-link t) - (insert "\t\t") - (insert-button "Open *scratch* buffer" - 'action (lambda (button) (switch-to-buffer - (get-buffer-create "*scratch*"))) - 'follow-link t) - (insert "\n") - - (insert "\n" (emacs-version) - "\n" emacs-copyright) - - (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) - (eq (key-binding "\C-h\C-d") 'describe-distribution) - (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) - (progn - (insert - "\n + ;; Insert links to useful tasks + (insert "\nUseful tasks:\n") + + (insert-button "Visit New File" + 'action (lambda (button) (call-interactively 'find-file)) + 'follow-link t) + (insert "\t\t\t") + (insert-button "Open Home Directory" + 'action (lambda (button) (dired "~")) + 'follow-link t) + (insert "\n") + + (insert-button "Customize Startup" + 'action (lambda (button) (customize-group 'initialization)) + 'follow-link t) + (insert "\t\t") + (insert-button "Open *scratch* buffer" + 'action (lambda (button) (switch-to-buffer + (get-buffer-create "*scratch*"))) + 'follow-link t) + (insert "\n") + (insert "\n" (emacs-version) "\n" emacs-copyright "\n") + + (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) + (eq (key-binding "\C-h\C-d") 'describe-distribution) + (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) + (progn + (insert + " GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for ") - (insert-button "full details" - 'action (lambda (button) (describe-no-warranty)) - 'follow-link t) - (insert ". + (insert-button "full details" + 'action (lambda (button) (describe-no-warranty)) + 'follow-link t) + (insert ". Emacs is Free Software--Free as in Freedom--so you can redistribute copies of Emacs and modify it; type C-h C-c to see ") - (insert-button "the conditions" - 'action (lambda (button) (describe-copying)) - 'follow-link t) - (insert ". + (insert-button "the conditions" + 'action (lambda (button) (describe-copying)) + 'follow-link t) + (insert ". Type C-h C-d for information on ") - (insert-button "getting the latest version" - 'action (lambda (button) (describe-distribution)) - 'follow-link t) - (insert ".")) - (insert (substitute-command-keys - "\n + (insert-button "getting the latest version" + 'action (lambda (button) (describe-distribution)) + 'follow-link t) + (insert ".")) + (insert (substitute-command-keys + " GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for ")) - (insert-button "full details" - 'action (lambda (button) (describe-no-warranty)) - 'follow-link t) - (insert (substitute-command-keys ". + (insert-button "full details" + 'action (lambda (button) (describe-no-warranty)) + 'follow-link t) + (insert (substitute-command-keys ". Emacs is Free Software--Free as in Freedom--so you can redistribute copies of Emacs and modify it; type \\[describe-copying] to see ")) - (insert-button "the conditions" - 'action (lambda (button) (describe-copying)) - 'follow-link t) - (insert (substitute-command-keys". + (insert-button "the conditions" + 'action (lambda (button) (describe-copying)) + 'follow-link t) + (insert (substitute-command-keys". Type \\[describe-distribution] for information on ")) - (insert-button "getting the latest version" - 'action (lambda (button) (describe-distribution)) - 'follow-link t) - (insert "."))) - - ;; The rest of the startup screen is the same on all - ;; kinds of terminals. - - ;; Give information on recovering, if there was a crash. - (and auto-save-list-file-prefix - ;; Don't signal an error if the - ;; directory for auto-save-list files - ;; does not yet exist. - (file-directory-p (file-name-directory - auto-save-list-file-prefix)) - (directory-files - (file-name-directory auto-save-list-file-prefix) - nil - (concat "\\`" - (regexp-quote (file-name-nondirectory - auto-save-list-file-prefix))) - t) - (insert "\n\nIf an Emacs session crashed recently, " - "type Meta-x recover-session RET\nto recover" - " the files you were editing.\n")) - - (use-local-map splash-screen-keymap) - - ;; Display the input that we set up in the buffer. - (set-buffer-modified-p nil) - (setq buffer-read-only t) - (if (and view-read-only (not view-mode)) - (view-mode-enter nil 'kill-buffer)) - (goto-char (point-min)) - (if (not static) - (if (or (window-minibuffer-p) - (window-dedicated-p (selected-window))) - ;; If static is nil, creating a new frame will - ;; generate enough events that the subsequent `sit-for' - ;; will immediately return anyway. - nil ;; (pop-to-buffer (current-buffer)) - (save-window-excursion - (switch-to-buffer (current-buffer)) - (sit-for 120))) - (condition-case nil - (switch-to-buffer (current-buffer)) - ;; In case the window is dedicated or something. - (error (pop-to-buffer (current-buffer)))))) - ;; Unwind ... ensure splash buffer is killed - (if (not static) - (kill-buffer "*About GNU Emacs*") - (switch-to-buffer "*About GNU Emacs*") - (rename-buffer "*GNU Emacs*" t))))) - + (insert-button "getting the latest version" + 'action (lambda (button) (describe-distribution)) + 'follow-link t) + (insert "."))) + +(defun normal-about-screen () + (insert "\n" (emacs-version) "\n" emacs-copyright "\n\n") + + (insert "To follow a link, click Mouse-1 on it, or move to it and type RET.\n\n") + + (insert-button "Authors" + 'action + (lambda (button) + (view-file (expand-file-name "AUTHORS" data-directory)) + (goto-char (point-min))) + 'follow-link t) + (insert "\t\tMany people have contributed code included in GNU Emacs\n") + + (insert-button "Contributing" + 'action + (lambda (button) + (view-file (expand-file-name "CONTRIBUTE" data-directory)) + (goto-char (point-min))) + 'follow-link t) + (insert "\tHow to contribute improvements to Emacs\n\n") + + (insert-button "GNU and Freedom" + 'action (lambda (button) (describe-project)) + 'follow-link t) + (insert "\t\tWhy we developed GNU Emacs and the GNU system\n") + + (insert-button "Absence of Warranty" + 'action (lambda (button) (describe-no-warranty)) + 'follow-link t) + (insert "\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") + + (insert-button "Copying Conditions" + 'action (lambda (button) (describe-copying)) + 'follow-link t) + (insert "\tConditions for redistributing and changing Emacs\n") + + (insert-button "Getting New Versions" + 'action (lambda (button) (describe-distribution)) + 'follow-link t) + (insert "\tHow to get the latest version of GNU Emacs\n") + + (insert-button "More Manuals / Ordering Manuals" + 'action (lambda (button) (view-order-manuals)) + 'follow-link t) + (insert "\tBuying printed manuals from the FSF\n")) (defun startup-echo-area-message () (if (eq (key-binding "\C-h\C-p") 'describe-project) - "For information about the GNU system and GNU/Linux, type C-h C-p." + "For information about GNU Emacs and the GNU system, type C-h C-a." (substitute-command-keys - "For information about the GNU system and GNU/Linux, type \ -\\[describe-project]."))) + "For information about GNU Emacs and the GNU system, type \ +\\[about-emacs]."))) (defun display-startup-echo-area-message () (let ((resize-mini-windows t)) - (message "%s" (startup-echo-area-message)))) - - -(defun display-splash-screen (&optional static) - "Display splash screen according to display. -Fancy splash screens are used on graphic displays, -normal otherwise. -With a prefix argument, any user input hides the splash screen." - (interactive "P") + (or noninteractive ;(input-pending-p) init-file-had-error + ;; t if the init file says to inhibit the echo area startup message. + (and inhibit-startup-echo-area-message + user-init-file + (or (and (get 'inhibit-startup-echo-area-message 'saved-value) + (equal inhibit-startup-echo-area-message + (if (equal init-file-user "") + (user-login-name) + init-file-user))) + ;; Wasn't set with custom; see if .emacs has a setq. + (let ((buffer (get-buffer-create " *temp*"))) + (prog1 + (condition-case nil + (save-excursion + (set-buffer buffer) + (insert-file-contents user-init-file) + (re-search-forward + (concat + "([ \t\n]*setq[ \t\n]+" + "inhibit-startup-echo-area-message[ \t\n]+" + (regexp-quote + (prin1-to-string + (if (equal init-file-user "") + (user-login-name) + init-file-user))) + "[ \t\n]*)") + nil t)) + (error nil)) + (kill-buffer buffer))))) + (message "%s" (startup-echo-area-message))))) + +(defun display-startup-screen (&optional concise) + "Display startup screen according to display. +A fancy display is used on graphic displays, normal otherwise. + +If CONCISE is non-nil, display a concise version of the startup +screen." + ;; Prevent recursive calls from server-process-filter. + (if (not (get-buffer "*GNU Emacs*")) + (if (use-fancy-splash-screens-p) + (fancy-startup-screen concise) + (normal-splash-screen t)))) + +(defun display-about-screen () + "Display the *About GNU Emacs* buffer. +A fancy display is used on graphic displays, normal otherwise." + (interactive) (if (use-fancy-splash-screens-p) - (fancy-splash-screens static) - (normal-splash-screen static))) + (fancy-about-screen) + (normal-splash-screen nil))) -(defalias 'about-emacs 'display-splash-screen) +(defalias 'about-emacs 'display-about-screen) +(defalias 'display-splash-screen 'display-startup-screen) (defun command-line-1 (command-line-args-left) - (or noninteractive (input-pending-p) init-file-had-error - ;; t if the init file says to inhibit the echo area startup message. - (and inhibit-startup-echo-area-message - user-init-file - (or (and (get 'inhibit-startup-echo-area-message 'saved-value) - (equal inhibit-startup-echo-area-message - (if (equal init-file-user "") - (user-login-name) - init-file-user))) - ;; Wasn't set with custom; see if .emacs has a setq. - (let ((buffer (get-buffer-create " *temp*"))) - (prog1 - (condition-case nil - (save-excursion - (set-buffer buffer) - (insert-file-contents user-init-file) - (re-search-forward - (concat - "([ \t\n]*setq[ \t\n]+" - "inhibit-startup-echo-area-message[ \t\n]+" - (regexp-quote - (prin1-to-string - (if (equal init-file-user "") - (user-login-name) - init-file-user))) - "[ \t\n]*)") - nil t)) - (error nil)) - (kill-buffer buffer))))) - ;; display-splash-screen at the end of command-line-1 calls - ;; use-fancy-splash-screens-p. This can cause image.el to be - ;; loaded, putting "Loading image... done" in the echo area. - ;; This hides startup-echo-area-message. So - ;; use-fancy-splash-screens-p is called here simply to get the - ;; loading of image.el (if needed) out of the way before - ;; display-startup-echo-area-message runs. - (progn - (use-fancy-splash-screens-p) - (display-startup-echo-area-message))) + (display-startup-echo-area-message) ;; Delay 2 seconds after an init file error message ;; was displayed, so user can read it. @@ -1861,267 +1961,271 @@ With a prefix argument, any user input hides the splash screen." "Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)" :warning)) - (when command-line-args-left - ;; We have command args; process them. - (let ((dir command-line-default-directory) - (file-count 0) - first-file-buffer - tem - ;; This approach loses for "-batch -L DIR --eval "(require foo)", - ;; if foo is intended to be found in DIR. - ;; - ;; ;; The directories listed in --directory/-L options will *appear* - ;; ;; at the front of `load-path' in the order they appear on the - ;; ;; command-line. We cannot do this by *placing* them at the front - ;; ;; in the order they appear, so we need this variable to hold them, - ;; ;; temporarily. - ;; extra-load-path - ;; - ;; To DTRT we keep track of the splice point and modify `load-path' - ;; straight away upon any --directory/-L option. - splice - just-files ;; t if this follows the magic -- option. - ;; This includes our standard options' long versions - ;; and long versions of what's on command-switch-alist. - (longopts - (append '(("--funcall") ("--load") ("--insert") ("--kill") - ("--directory") ("--eval") ("--execute") ("--no-splash") - ("--find-file") ("--visit") ("--file") ("--no-desktop")) - (mapcar (lambda (elt) - (list (concat "-" (car elt)))) - command-switch-alist))) - (line 0) - (column 0)) - - ;; Add the long X options to longopts. - (dolist (tem command-line-x-option-alist) - (if (string-match "^--" (car tem)) - (push (list (car tem)) longopts))) - - ;; Loop, processing options. - (while command-line-args-left - (let* ((argi (car command-line-args-left)) - (orig-argi argi) - argval completion) - (setq command-line-args-left (cdr command-line-args-left)) - - ;; Do preliminary decoding of the option. - (if just-files - ;; After --, don't look for options; treat all args as files. - (setq argi "") - ;; Convert long options to ordinary options - ;; and separate out an attached option argument into argval. - (when (string-match "^\\(--[^=]*\\)=" argi) - (setq argval (substring argi (match-end 0)) - argi (match-string 1 argi))) - (if (equal argi "--") - (setq completion nil) - (setq completion (try-completion argi longopts))) - (if (eq completion t) - (setq argi (substring argi 1)) - (if (stringp completion) - (let ((elt (assoc completion longopts))) - (or elt - (error "Option `%s' is ambiguous" argi)) - (setq argi (substring (car elt) 1))) - (setq argval nil - argi orig-argi)))) - - ;; Execute the option. - (cond ((setq tem (assoc argi command-switch-alist)) - (if argval - (let ((command-line-args-left - (cons argval command-line-args-left))) - (funcall (cdr tem) argi)) - (funcall (cdr tem) argi))) - - ((equal argi "-no-splash") - (setq inhibit-startup-message t)) - - ((member argi '("-f" ; what the manual claims - "-funcall" - "-e")) ; what the source used to say - (setq tem (intern (or argval (pop command-line-args-left)))) - (if (commandp tem) - (command-execute tem) - (funcall tem))) - - ((member argi '("-eval" "-execute")) - (eval (read (or argval (pop command-line-args-left))))) - - ((member argi '("-L" "-directory")) - (setq tem (expand-file-name - (command-line-normalize-file-name - (or argval (pop command-line-args-left))))) - (cond (splice (setcdr splice (cons tem (cdr splice))) - (setq splice (cdr splice))) - (t (setq load-path (cons tem load-path) - splice load-path)))) - - ((member argi '("-l" "-load")) - (let* ((file (command-line-normalize-file-name - (or argval (pop command-line-args-left)))) - ;; Take file from default dir if it exists there; - ;; otherwise let `load' search for it. - (file-ex (expand-file-name file))) - (when (file-exists-p file-ex) - (setq file file-ex)) - (load file nil t))) - - ;; This is used to handle -script. It's not clear - ;; we need to document it. - ((member argi '("-scriptload")) - (let* ((file (command-line-normalize-file-name - (or argval (pop command-line-args-left)))) - ;; Take file from default dir. - (file-ex (expand-file-name file))) - (load file-ex nil t t))) - - ((equal argi "-insert") - (setq tem (or argval (pop command-line-args-left))) - (or (stringp tem) - (error "File name omitted from `-insert' option")) - (insert-file-contents (command-line-normalize-file-name tem))) - - ((equal argi "-kill") - (kill-emacs t)) - - ;; This is for when they use --no-desktop with -q, or - ;; don't load Desktop in their .emacs. If desktop.el - ;; _is_ loaded, it will handle this switch, and we - ;; won't see it by the time we get here. - ((equal argi "-no-desktop") - (message "\"--no-desktop\" ignored because the Desktop package is not loaded")) - - ((string-match "^\\+[0-9]+\\'" argi) - (setq line (string-to-number argi))) - - ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi) - (setq line (string-to-number (match-string 1 argi)) - column (string-to-number (match-string 2 argi)))) - - ((setq tem (assoc argi command-line-x-option-alist)) - ;; Ignore X-windows options and their args if not using X. - (setq command-line-args-left - (nthcdr (nth 1 tem) command-line-args-left))) - - ((member argi '("-find-file" "-file" "-visit")) - ;; An explicit option to specify visiting a file. - (setq tem (or argval (pop command-line-args-left))) - (unless (stringp tem) - (error "File name omitted from `%s' option" argi)) - (setq file-count (1+ file-count)) - (let ((file (expand-file-name - (command-line-normalize-file-name tem) dir))) - (if (= file-count 1) - (setq first-file-buffer (find-file file)) - (find-file-other-window file))) - (or (zerop line) - (goto-line line)) - (setq line 0) - (unless (< column 1) - (move-to-column (1- column))) - (setq column 0)) - - ((equal argi "--") - (setq just-files t)) - (t - ;; We have almost exhausted our options. See if the - ;; user has made any other command-line options available - (let ((hooks command-line-functions) ;; lrs 7/31/89 - (did-hook nil)) - (while (and hooks - (not (setq did-hook (funcall (car hooks))))) - (setq hooks (cdr hooks))) - (if (not did-hook) - ;; Presume that the argument is a file name. - (progn - (if (string-match "\\`-" argi) - (error "Unknown option `%s'" argi)) - (setq file-count (1+ file-count)) - (let ((file - (expand-file-name - (command-line-normalize-file-name orig-argi) - dir))) - (if (= file-count 1) - (setq first-file-buffer (find-file file)) - (find-file-other-window file))) - (or (zerop line) - (goto-line line)) - (setq line 0) - (unless (< column 1) - (move-to-column (1- column))) - (setq column 0)))))) - ;; In unusual circumstances, the execution of Lisp code due - ;; to command-line options can cause the last visible frame - ;; to be deleted. In this case, kill emacs to avoid an - ;; abort later. - (unless (frame-live-p (selected-frame)) (kill-emacs nil)))) - - ;; If 3 or more files visited, and not all visible, - ;; show user what they all are. But leave the last one current. - (and (> file-count 2) - (not noninteractive) - (not inhibit-startup-buffer-menu) - (or (get-buffer-window first-file-buffer) - (list-buffers))))) - - (when initial-buffer-choice - (cond ((eq initial-buffer-choice t) - (switch-to-buffer (get-buffer-create "*scratch*"))) - ((stringp initial-buffer-choice) - (find-file initial-buffer-choice)))) - - ;; Maybe display a startup screen. - (unless (or inhibit-startup-message - initial-buffer-choice - noninteractive - emacs-quick-startup) - ;; Display a startup screen, after some preparations. - - ;; If there are no switches to process, we might as well - ;; run this hook now, and there may be some need to do it - ;; before doing any output. - (run-hooks 'emacs-startup-hook) - (and term-setup-hook - (run-hooks 'term-setup-hook)) - (setq inhibit-startup-hooks t) - - ;; It's important to notice the user settings before we - ;; display the startup message; otherwise, the settings - ;; won't take effect until the user gives the first - ;; keystroke, and that's distracting. - (when (fboundp 'frame-notice-user-settings) - (frame-notice-user-settings)) - - ;; If there are no switches to process, we might as well - ;; run this hook now, and there may be some need to do it - ;; before doing any output. - (when window-setup-hook - (run-hooks 'window-setup-hook) - ;; Don't let the hook be run twice. - (setq window-setup-hook nil)) - - ;; Do this now to avoid an annoying delay if the user - ;; clicks the menu bar during the sit-for. - (when (display-popup-menus-p) - (precompute-menubar-bindings)) - (with-no-warnings - (setq menubar-bindings-done t)) - - ;; If *scratch* exists and is empty, insert initial-scratch-message. - (and initial-scratch-message - (get-buffer "*scratch*") - (with-current-buffer "*scratch*" - (when (zerop (buffer-size)) - (insert initial-scratch-message) - (set-buffer-modified-p nil)))) - - ;; If user typed input during all that work, - ;; abort the startup screen. Otherwise, display it now. - (unless (input-pending-p) - (display-splash-screen t)))) - + (let ((file-count 0) + first-file-buffer) + (when command-line-args-left + ;; We have command args; process them. + (let ((dir command-line-default-directory) + tem + ;; This approach loses for "-batch -L DIR --eval "(require foo)", + ;; if foo is intended to be found in DIR. + ;; + ;; ;; The directories listed in --directory/-L options will *appear* + ;; ;; at the front of `load-path' in the order they appear on the + ;; ;; command-line. We cannot do this by *placing* them at the front + ;; ;; in the order they appear, so we need this variable to hold them, + ;; ;; temporarily. + ;; extra-load-path + ;; + ;; To DTRT we keep track of the splice point and modify `load-path' + ;; straight away upon any --directory/-L option. + splice + just-files ;; t if this follows the magic -- option. + ;; This includes our standard options' long versions + ;; and long versions of what's on command-switch-alist. + (longopts + (append '(("--funcall") ("--load") ("--insert") ("--kill") + ("--directory") ("--eval") ("--execute") ("--no-splash") + ("--find-file") ("--visit") ("--file") ("--no-desktop")) + (mapcar (lambda (elt) + (list (concat "-" (car elt)))) + command-switch-alist))) + (line 0) + (column 0)) + + ;; Add the long X options to longopts. + (dolist (tem command-line-x-option-alist) + (if (string-match "^--" (car tem)) + (push (list (car tem)) longopts))) + + ;; Loop, processing options. + (while command-line-args-left + (let* ((argi (car command-line-args-left)) + (orig-argi argi) + argval completion) + (setq command-line-args-left (cdr command-line-args-left)) + + ;; Do preliminary decoding of the option. + (if just-files + ;; After --, don't look for options; treat all args as files. + (setq argi "") + ;; Convert long options to ordinary options + ;; and separate out an attached option argument into argval. + (when (string-match "^\\(--[^=]*\\)=" argi) + (setq argval (substring argi (match-end 0)) + argi (match-string 1 argi))) + (if (equal argi "--") + (setq completion nil) + (setq completion (try-completion argi longopts))) + (if (eq completion t) + (setq argi (substring argi 1)) + (if (stringp completion) + (let ((elt (assoc completion longopts))) + (or elt + (error "Option `%s' is ambiguous" argi)) + (setq argi (substring (car elt) 1))) + (setq argval nil + argi orig-argi)))) + + ;; Execute the option. + (cond ((setq tem (assoc argi command-switch-alist)) + (if argval + (let ((command-line-args-left + (cons argval command-line-args-left))) + (funcall (cdr tem) argi)) + (funcall (cdr tem) argi))) + + ((equal argi "-no-splash") + (setq inhibit-startup-screen t)) + + ((member argi '("-f" ; what the manual claims + "-funcall" + "-e")) ; what the source used to say + (setq inhibit-startup-screen t) + (setq tem (intern (or argval (pop command-line-args-left)))) + (if (commandp tem) + (command-execute tem) + (funcall tem))) + + ((member argi '("-eval" "-execute")) + (setq inhibit-startup-screen t) + (eval (read (or argval (pop command-line-args-left))))) + + ((member argi '("-L" "-directory")) + (setq tem (expand-file-name + (command-line-normalize-file-name + (or argval (pop command-line-args-left))))) + (cond (splice (setcdr splice (cons tem (cdr splice))) + (setq splice (cdr splice))) + (t (setq load-path (cons tem load-path) + splice load-path)))) + + ((member argi '("-l" "-load")) + (let* ((file (command-line-normalize-file-name + (or argval (pop command-line-args-left)))) + ;; Take file from default dir if it exists there; + ;; otherwise let `load' search for it. + (file-ex (expand-file-name file))) + (when (file-exists-p file-ex) + (setq file file-ex)) + (load file nil t))) + + ;; This is used to handle -script. It's not clear + ;; we need to document it. + ((member argi '("-scriptload")) + (let* ((file (command-line-normalize-file-name + (or argval (pop command-line-args-left)))) + ;; Take file from default dir. + (file-ex (expand-file-name file))) + (load file-ex nil t t))) + + ((equal argi "-insert") + (setq inhibit-startup-screen t) + (setq tem (or argval (pop command-line-args-left))) + (or (stringp tem) + (error "File name omitted from `-insert' option")) + (insert-file-contents (command-line-normalize-file-name tem))) + + ((equal argi "-kill") + (kill-emacs t)) + + ;; This is for when they use --no-desktop with -q, or + ;; don't load Desktop in their .emacs. If desktop.el + ;; _is_ loaded, it will handle this switch, and we + ;; won't see it by the time we get here. + ((equal argi "-no-desktop") + (message "\"--no-desktop\" ignored because the Desktop package is not loaded")) + + ((string-match "^\\+[0-9]+\\'" argi) + (setq line (string-to-number argi))) + + ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi) + (setq line (string-to-number (match-string 1 argi)) + column (string-to-number (match-string 2 argi)))) + + ((setq tem (assoc argi command-line-x-option-alist)) + ;; Ignore X-windows options and their args if not using X. + (setq command-line-args-left + (nthcdr (nth 1 tem) command-line-args-left))) + + ((member argi '("-find-file" "-file" "-visit")) + (setq inhibit-startup-screen t) + ;; An explicit option to specify visiting a file. + (setq tem (or argval (pop command-line-args-left))) + (unless (stringp tem) + (error "File name omitted from `%s' option" argi)) + (setq file-count (1+ file-count)) + (let ((file (expand-file-name + (command-line-normalize-file-name tem) dir))) + (if (= file-count 1) + (setq first-file-buffer (find-file file)) + (find-file-other-window file))) + (or (zerop line) + (goto-line line)) + (setq line 0) + (unless (< column 1) + (move-to-column (1- column))) + (setq column 0)) + + ((equal argi "--") + (setq just-files t)) + (t + ;; We have almost exhausted our options. See if the + ;; user has made any other command-line options available + (let ((hooks command-line-functions) + (did-hook nil)) + (while (and hooks + (not (setq did-hook (funcall (car hooks))))) + (setq hooks (cdr hooks))) + (if (not did-hook) + ;; Presume that the argument is a file name. + (progn + (if (string-match "\\`-" argi) + (error "Unknown option `%s'" argi)) + (unless initial-window-system + (setq inhibit-startup-screen t)) + (setq file-count (1+ file-count)) + (let ((file + (expand-file-name + (command-line-normalize-file-name orig-argi) + dir))) + (if (= file-count 1) + (setq first-file-buffer (find-file file)) + (find-file-other-window file))) + (or (zerop line) + (goto-line line)) + (setq line 0) + (unless (< column 1) + (move-to-column (1- column))) + (setq column 0)))))) + ;; In unusual circumstances, the execution of Lisp code due + ;; to command-line options can cause the last visible frame + ;; to be deleted. In this case, kill emacs to avoid an + ;; abort later. + (unless (frame-live-p (selected-frame)) (kill-emacs nil)))))) + + (when initial-buffer-choice + (cond ((eq initial-buffer-choice t) + (switch-to-buffer (get-buffer-create "*scratch*"))) + ((stringp initial-buffer-choice) + (find-file initial-buffer-choice)))) + + (if (or inhibit-startup-screen + initial-buffer-choice + noninteractive + emacs-quick-startup) + + ;; Not displaying a startup screen. If 3 or more files + ;; visited, and not all visible, show user what they all are. + (and (> file-count 2) + (not noninteractive) + (not inhibit-startup-buffer-menu) + (or (get-buffer-window first-file-buffer) + (list-buffers))) + + ;; Display a startup screen, after some preparations. + + ;; If there are no switches to process, we might as well + ;; run this hook now, and there may be some need to do it + ;; before doing any output. + (run-hooks 'emacs-startup-hook) + (and term-setup-hook + (run-hooks 'term-setup-hook)) + (setq inhibit-startup-hooks t) + + ;; It's important to notice the user settings before we + ;; display the startup message; otherwise, the settings + ;; won't take effect until the user gives the first + ;; keystroke, and that's distracting. + (when (fboundp 'frame-notice-user-settings) + (frame-notice-user-settings)) + + ;; If there are no switches to process, we might as well + ;; run this hook now, and there may be some need to do it + ;; before doing any output. + (when window-setup-hook + (run-hooks 'window-setup-hook) + ;; Don't let the hook be run twice. + (setq window-setup-hook nil)) + + ;; Do this now to avoid an annoying delay if the user + ;; clicks the menu bar during the sit-for. + (when (display-popup-menus-p) + (precompute-menubar-bindings)) + (with-no-warnings + (setq menubar-bindings-done t)) + + ;; If *scratch* exists and is empty, insert initial-scratch-message. + (and initial-scratch-message + (get-buffer "*scratch*") + (with-current-buffer "*scratch*" + (when (zerop (buffer-size)) + (insert initial-scratch-message) + (set-buffer-modified-p nil)))) + + (if (> file-count 0) + (display-startup-screen t) + (display-startup-screen nil))))) (defun command-line-normalize-file-name (file) "Collapse multiple slashes to one, to handle non-Emacs file names." diff --git a/lisp/subr.el b/lisp/subr.el index a74b6828dd5..89328826eef 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1629,7 +1629,7 @@ any other non-digit terminates the character code and is then used as input.")) ;; or C-q C-x might not return immediately since ESC or C-x might be ;; bound to some prefix in function-key-map or key-translation-map. (setq translated char) - (let ((translation (lookup-key function-key-map (vector char)))) + (let ((translation (lookup-key local-function-key-map (vector char)))) (if (arrayp translation) (setq translated (aref translation 0)))) (cond ((null translated)) @@ -2408,6 +2408,23 @@ See also `with-temp-buffer'." (if (window-live-p save-selected-window-window) (select-window save-selected-window-window 'norecord)))))) +(defmacro with-selected-frame (frame &rest body) + "Execute the forms in BODY with FRAME as the selected frame. +The value returned is the value of the last form in BODY. +See also `with-temp-buffer'." + (declare (indent 1) (debug t)) + (let ((old-frame (make-symbol "old-frame")) + (old-buffer (make-symbol "old-buffer"))) + `(let ((,old-frame (selected-frame)) + (,old-buffer (current-buffer))) + (unwind-protect + (progn (select-frame ,frame) + ,@body) + (if (frame-live-p ,old-frame) + (select-frame ,old-frame)) + (if (buffer-live-p ,old-buffer) + (set-buffer ,old-buffer)))))) + (defmacro with-temp-file (file &rest body) "Create a new buffer, evaluate BODY there, and write the buffer to FILE. The value returned is the value of the last form in BODY. diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index 821bad4e819..e88067b7fe5 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -40,29 +40,31 @@ ;;; Code: ;;;###autoload -(define-minor-mode t-mouse-mode - "Toggle t-mouse mode to use the mouse in Linux consoles. -With prefix arg, turn t-mouse mode on if arg is positive, otherwise turn it -off. +(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1") +;;;###autoload +(define-minor-mode gpm-mouse-mode + "Toggle gpm-mouse mode to use the mouse in GNU/Linux consoles. +With prefix arg, turn gpm-mouse mode on if arg is positive, +otherwise turn it off. -This allows the use of the mouse when operating on a Linux console, in the -same way as you can use the mouse under X11. -It requires the `mev' program, part of the `gpm' utilities." +This allows the use of the mouse when operating on a GNU/Linux console, +in the same way as you can use the mouse under X11. +It relies on the `gpm' daemon being activated." :global t :group 'mouse - (if window-system - (error "t-mouse only works in the console on GNU/Linux") - (if t-mouse-mode - (progn - (unless (fboundp 'term-open-connection) - (progn - (setq t-mouse-mode nil) - (error "Emacs must be built with Gpm to use this mode"))) - (unless (term-open-connection) - (progn - (setq t-mouse-mode nil) - (error "Can't open mouse connection")))) - ;; Turn it off - (term-close-connection)))) + (let ((activated nil)) + (unwind-protect + (progn + (unless (fboundp 'gpm-mouse-start) + (error "Emacs must be built with Gpm to use this mode")) + (when gpm-mouse-mode + (gpm-mouse-start) + (setq activated t))) + ;; If the user asked to turn it off do that. + ;; If something failed to turn it on, try to turn it off as well, + ;; just in case. + (when (and (fboundp 'gpm-mouse-stop) (not activated)) + (setq gpm-mouse-mode nil) + (gpm-mouse-stop))))) (provide 't-mouse) diff --git a/lisp/talk.el b/lisp/talk.el index 8af1577ac37..a46eadc745c 100644 --- a/lisp/talk.el +++ b/lisp/talk.el @@ -46,17 +46,44 @@ Each element has the form (DISPLAY FRAME BUFFER).") ;; Add the new buffers to all talk frames. (talk-update-buffers)) -(defun talk-add-display (display) - (let* ((elt (assoc display talk-display-alist)) - (name (concat "*talk-" display "*")) - buffer frame) - (if (not (and elt (frame-live-p (setq frame (nth 1 elt))))) - (setq frame (make-frame-on-display display (list (cons 'name name))))) +;;;###autoload +(defun talk () + "Connect to the Emacs talk group from the current X display or tty frame." + (interactive) + (let ((type (frame-live-p (selected-frame))) + (display (frame-terminal (selected-frame)))) + (cond + ((eq type t) + (talk-add-display (selected-frame))) + ((eq type 'x) + (talk-add-display (frame-terminal (selected-frame)))) + (t + (error "Unknown frame type")))) + (talk-update-buffers)) + +(defun talk-add-display (frame) + (let* ((display (if (frame-live-p frame) + (frame-terminal frame) + frame)) + (elt (assoc display talk-display-alist)) + (name (concat "*talk-" (terminal-name display) "*")) + buffer) + (unless (frame-live-p frame) + (setq frame (make-frame-on-display display (list (cons 'name name))))) + (if (and elt (frame-live-p (nth 1 elt))) + (setq frame (nth 1 elt))) (if (not (and elt (buffer-name (get-buffer (setq buffer (nth 2 elt)))))) (setq buffer (get-buffer-create name))) + (add-to-list 'delete-frame-functions 'talk-handle-delete-frame) (setq talk-display-alist (cons (list display frame buffer) (delq elt talk-display-alist))))) +(defun talk-handle-delete-frame (frame) + (dolist (d talk-display-alist) + (when (eq (nth 1 d) frame) + (setq talk-display-alist (delq d talk-display-alist)) + (talk-update-buffers)))) + (defun talk-disconnect () "Disconnect this display from the Emacs talk group." (interactive) diff --git a/lisp/tempo.el b/lisp/tempo.el index 261dac71818..383dcd40d24 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -315,9 +315,9 @@ mode, ON-REGION is ignored and assumed true if the region is active." (goto-char tempo-region-start)) (save-excursion (tempo-insert-mark (point-marker)) - (mapcar (function (lambda (elt) - (tempo-insert elt on-region))) - (symbol-value template)) + (mapc (function (lambda (elt) + (tempo-insert elt on-region))) + (symbol-value template)) (tempo-insert-mark (point-marker))) (tempo-forward-mark)) (tempo-forget-insertions) @@ -460,10 +460,10 @@ never prompted." "Tries all the user-defined element handlers in `tempo-user-elements'." ;; Sigh... I need (some list) (catch 'found - (mapcar (function (lambda (handler) - (let ((result (funcall handler element))) - (if result (throw 'found result))))) - tempo-user-elements) + (mapc (function (lambda (handler) + (let ((result (funcall handler element))) + (if result (throw 'found result))))) + tempo-user-elements) (throw 'found nil))) ;;; @@ -556,7 +556,7 @@ and insert the results." "Jump to the next mark in `tempo-forward-mark-list'." (interactive) (let ((next-mark (catch 'found - (mapcar + (mapc (function (lambda (mark) (if (< (point) mark) @@ -575,7 +575,7 @@ and insert the results." (interactive) (let ((prev-mark (catch 'found (let (last) - (mapcar + (mapc (function (lambda (mark) (if (<= (point) mark) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 274de28e6a0..bc0434e151a 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1562,7 +1562,7 @@ The returned value is suitable for the `x-popup-menu' function." (defun artist-mt-get-symbol-from-keyword-sub (table kwd) "Search TABLE for keyword KWD and return its symbol." (catch 'found - (mapcar + (mapc (lambda (element) (let ((element-tag (artist-mt-get-tag element))) (cond ((eq element-tag 'graphics-operation) @@ -1611,7 +1611,7 @@ info-variant-part." Calls RETRIEVE-FN to retrieve information from that symbol's info-variant-part." (catch 'found - (mapcar + (mapc (lambda (element) (let ((element-tag (artist-mt-get-tag element))) (cond ((eq element-tag 'graphics-operation) @@ -1700,7 +1700,7 @@ otherwise the shifted symbol." If IS-SHIFTED is non-nil, return the shifted symbol, otherwise the shifted symbol." (catch 'found - (mapcar + (mapc (lambda (element) (let ((element-tag (artist-mt-get-tag element))) (cond ((eq element-tag 'graphics-operation) @@ -1737,7 +1737,7 @@ info-variant-part." Calls RETRIEVE-FN to retrieve information from that symbol's info-variant-part." (catch 'found - (mapcar + (mapc (lambda (element) (let ((element-tag (artist-mt-get-tag element))) (cond ((eq element-tag 'function-call) @@ -3160,7 +3160,7 @@ Do this by replacing the characters that forms the line with `artist-erase-char'. Output is a list of endpoints for lines through X1, Y1. An endpoint is a cons pair, (ENDPOINT-X . ENDPOINT-Y)." (let ((endpoints (artist-vap-find-endpoints x1 y1))) - (mapcar + (mapc (lambda (endpoints) (let ((ep1 (car endpoints)) (ep2 (car (cdr endpoints)))) @@ -3213,14 +3213,14 @@ through X1, Y1. An endpoint is a cons pair, (ENDPOINT-X . ENDPOINT-Y)." (defun artist-vaporize-lines (x1 y1) "Vaporize lines reachable from point X1, Y1." (let ((ep-stack nil)) - (mapcar + (mapc (lambda (ep) (push ep ep-stack)) (artist-vap-find-endpoints x1 y1)) (while (not (null ep-stack)) (let* ((vaporize-point (pop ep-stack)) (new-endpoints (artist-vaporize-line (car vaporize-point) (cdr vaporize-point)))) - (mapcar + (mapc (lambda (endpoint) (push endpoint ep-stack)) new-endpoints))))) @@ -3340,7 +3340,7 @@ The POINT-LIST is expected to cover the first quadrant." ;; Create first half (the lower one (since y grows downwards)) from ;; the first quadrant. - (mapcar + (mapc (lambda (coord) (let* ((x (artist-coord-get-x coord)) (y (artist-coord-get-y coord)) @@ -3359,7 +3359,7 @@ The POINT-LIST is expected to cover the first quadrant." ;; Create the other half by mirroring the first half. (setq both-halves (append first-half - (mapcar + (mapc (lambda (i) (artist-new-fill-item (artist-fill-item-get-x i) (- (artist-fill-item-get-y i)) @@ -5361,7 +5361,7 @@ The event, EV, is the mouse event." artist-arrow-point-1 artist-arrow-point-2))) ;; Remove those variables from vars that are not bound - (mapcar + (mapc (function (lambda (x) (if (not (and (boundp x) (symbol-value x))) diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el index 99c2f92cab0..ee1a4f7d659 100644 --- a/lisp/textmodes/bibtex-style.el +++ b/lisp/textmodes/bibtex-style.el @@ -95,7 +95,8 @@ (defcustom bibtex-style-indent-basic 2 "Basic amount of indentation to use in BibTeX Style mode." - :type 'integer) + :type 'integer + :group 'bibtex) (defun bibtex-style-calculate-indentation (&optional virt) (or diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index b00fc356cce..079c362b504 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -33,6 +33,10 @@ ;;; Code: +(defgroup css nil + "Cascading Style Sheets (CSS) editing mode." + :group 'languages) + (defun css-extract-keyword-list (res) (with-temp-buffer (url-insert-file-contents "http://www.w3.org/TR/REC-CSS2/css2.txt") @@ -169,10 +173,11 @@ "word-spacing" "z-index") "Identifiers for properties.") -(defcustom css-electrick-keys '(?\} ?\;) ;; '() +(defcustom css-electric-keys '(?\} ?\;) ;; '() "Self inserting keys which should trigger re-indentation." :type '(repeat character) - :options '((?\} ?\;))) + :options '((?\} ?\;)) + :group 'css) (defvar css-mode-syntax-table (let ((st (make-syntax-table))) @@ -207,9 +212,11 @@ (defconst css-name-re (concat css-nmchar-re "+")) (defface css-selector '((t :inherit font-lock-function-name-face)) - "Face to use for selectors.") + "Face to use for selectors." + :group 'css) (defface css-property '((t :inherit font-lock-variable-name-face)) - "Face to use for properties.") + "Face to use for properties." + :group 'css) (defvar css-font-lock-keywords `(("!\\s-*important" . font-lock-builtin-face) @@ -263,10 +270,10 @@ (set (make-local-variable 'indent-line-function) 'css-indent-line) (set (make-local-variable 'fill-paragraph-function) 'css-fill-paragraph) - (when css-electrick-keys + (when css-electric-keys (let ((fc (make-char-table 'auto-fill-chars))) (set-char-table-parent fc auto-fill-chars) - (dolist (c css-electrick-keys) + (dolist (c css-electric-keys) (aset fc c 'indent-according-to-mode)) (set (make-local-variable 'auto-fill-chars) fc)))) @@ -390,7 +397,8 @@ (defcustom css-indent-offset 4 "Basic size of one indentation step." - :type 'integer) + :type 'integer + :group 'css) (defun css-indent-calculate () (let ((ppss (syntax-ppss)) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 48bb176e44c..e0f80b1b118 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1012,6 +1012,18 @@ space does not end a sentence, so don't break a line there." (goto-char end)))) fill-pfx)) +(defun fill-paragraph-or-region (arg) + "Fill the active region or current paragraph. +In Transient Mark mode, when the mark is active, it calls `fill-region' +on the active region. Otherwise, it calls `fill-paragraph'." + (interactive (progn + (barf-if-buffer-read-only) + (list (if current-prefix-arg 'full)))) + (if (and transient-mark-mode mark-active + (not (eq (region-beginning) (region-end)))) + (fill-region (region-beginning) (region-end) arg) + (fill-paragraph arg))) + (defcustom default-justification 'left "*Method of justifying text not otherwise specified. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 0b5dfa4cc54..69d8c814f46 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -67,11 +67,21 @@ Non-nil means use highlight, nil means use minibuffer messages." (defcustom flyspell-mark-duplications-flag t "Non-nil means Flyspell reports a repeated word as an error. +See `flyspell-mark-duplications-exceptions' to add exceptions to this rule. Detection of repeated words is not implemented in \"large\" regions; see `flyspell-large-region'." :group 'flyspell :type 'boolean) +(defcustom flyspell-mark-duplications-exceptions + '(("francais" . ("nous" "vous"))) + "A list of exceptions for duplicated words. +It should be a list of (LANGUAGE . EXCEPTION-LIST). LANGUAGE is matched +against the current dictionary and EXCEPTION-LIST is a list of strings. +The duplicated word is downcased before it is compared with the exceptions." + :group 'flyspell + :type '(alist :key-type string :value-type (repeat string))) + (defcustom flyspell-sort-corrections nil "Non-nil means, sort the corrections alphabetically before popping them." :group 'flyspell @@ -485,7 +495,10 @@ in your .emacs file. :keymap flyspell-mode-map :group 'flyspell (if flyspell-mode - (flyspell-mode-on) + (condition-case () + (flyspell-mode-on) + (error (message "Enabling Flyspell mode gave an error") + (flyspell-mode -1))) (flyspell-mode-off))) ;;;###autoload @@ -611,7 +624,7 @@ in your .emacs file. ;;*---------------------------------------------------------------------*/ (defun flyspell-delay-commands () "Install the standard set of Flyspell delayed commands." - (mapcar 'flyspell-delay-command flyspell-default-delayed-commands) + (mapc 'flyspell-delay-command flyspell-default-delayed-commands) (mapcar 'flyspell-delay-command flyspell-delayed-commands)) ;;*---------------------------------------------------------------------*/ @@ -630,7 +643,7 @@ It will be checked only after `flyspell-delay' seconds." ;;*---------------------------------------------------------------------*/ (defun flyspell-deplacement-commands () "Install the standard set of Flyspell deplacement commands." - (mapcar 'flyspell-deplacement-command flyspell-default-deplacement-commands) + (mapc 'flyspell-deplacement-command flyspell-default-deplacement-commands) (mapcar 'flyspell-deplacement-command flyspell-deplacement-commands)) ;;*---------------------------------------------------------------------*/ @@ -1022,6 +1035,13 @@ Mostly we check word delimiters." (and (> start (point-min)) (not (memq (char-after (1- start)) '(?\} ?\\))))) flyspell-mark-duplications-flag + (not (catch 'exception + (dolist (except flyspell-mark-duplications-exceptions) + (and (string= (or ispell-local-dictionary + ispell-dictionary) + (car except)) + (member (downcase word) (cdr except)) + (throw 'exception t))))) (save-excursion (goto-char start) (let* ((bound diff --git a/lisp/textmodes/org-export-latex.el b/lisp/textmodes/org-export-latex.el index f014870598b..9aedae9461b 100644 --- a/lisp/textmodes/org-export-latex.el +++ b/lisp/textmodes/org-export-latex.el @@ -3,27 +3,29 @@ ;; ;; Author: Bastien Guerry <bzg AT altern DOT org> ;; Keywords: org organizer latex export convert -;; X-URL: <http://www.cognition.ens.fr/~guerry/u/org-export-latex.el> +;; Homepage: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el +;; Version: 5.09 ;; ;; This file is part of GNU Emacs. ;; -;; This program 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 2, or (at your option) -;; any later version. +;; 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, or (at your option) any +;; later version. ;; -;; This program 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. +;; 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; see the file COPYING. If not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301, USA. ;; -;; You should have received a copy of the GNU General Public License -;; along with this program; if not, write to the Free Software -;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - ;;; Commentary: - -;; This library is a LaTeX exporter for org-mode. +;; +;; This library implements a LaTeX exporter for org-mode. ;; ;; Put this file into your load-path and the following into your ~/.emacs: ;; (require 'org-export-latex) @@ -35,23 +37,23 @@ ;; M-x `org-export-as-latex-to-buffer' ;; M-x `org-export-region-as-latex' ;; M-x `org-replace-region-by-latex' - -;;; History: -;; -;; I started this piece of code in may 2007. Special thanks to Carsten -;; Dominik for helping me on this. -;; - +;; ;;; Code: -(require 'org) +(eval-when-compile + (require 'cl)) + (require 'footnote) +(require 'org) +;;; Variables: (defvar org-latex-options-plist nil) (defvar org-latex-todo-keywords-1 nil) (defvar org-latex-all-targets-regexp nil) (defvar org-latex-add-level 0) (defvar org-latex-sectioning-depth 0) +(defvar org-export-latex-list-beginning-re + "^\\([ \t]*\\)\\([-+]\\|[0-9]+\\(?:\\.\\|)\\)\\) *?") (defvar org-latex-special-string-regexps '(org-ts-regexp @@ -60,6 +62,11 @@ org-clock-string) "A list of regexps to convert as special keywords.") +(defvar latexp) ; dynamically scoped from org.el +(defvar re-quote) ; dynamically scoped from org.el +(defvar commentsp) ; dynamically scoped from org.el + +;;; Custom variables: (defcustom org-export-latex-sectioning-alist '((1 "\\section{%s}" "\\section*{%s}") (2 "\\subsection{%s}" "\\subsection*{%s}") @@ -94,11 +101,17 @@ The %s formatter will be replaced by the title of the section." :group 'org-export-latex :type 'string) -(defcustom org-export-latex-date-format nil +(defcustom org-export-latex-date-format + "%d %B %Y" "Format string for \\date{...}." :group 'org-export-latex :type 'string) +(defcustom org-export-latex-tables-verbatim nil + "When non-nil, export tables as verbatim." + :group 'org-export-latex + :type 'boolean) + (defcustom org-export-latex-packages-alist nil "Alist of packages to be inserted in the preamble. Each cell is of the forma \( option . package \). @@ -121,7 +134,7 @@ headline is mandatory)." (symbol :tag "Convert as descriptive list" description) (string :tag "Use a section string" :value "\\subparagraph{%s}"))) -(defcustom org-export-latex-remove-from-headines +(defcustom org-export-latex-remove-from-headlines '(:todo t :priority t :tags t) "A plist of keywords to remove from headlines. Non-nil means remove this keyword type from the headline. @@ -130,13 +143,6 @@ Don't remove the keys, just change their values." :type 'plist :group 'org-export-latex) -(defcustom org-export-latex-quotation-marks-convention "en" - "Convention for conversion of the quotation marks. -This value is overriden by any infile language setup." - :group 'org-export-latex - :type '(choice (string :tag "english" "en") - (string :tag "french" "fr"))) - (defcustom org-export-latex-image-default-option "width=10em" "Default option for images." :group 'org-export-latex @@ -150,6 +156,7 @@ This value is overriden by any infile language setup." ;; FIXME Do we want this one? ;; (defun org-export-as-latex-and-open (arg) ...) +;;; Autoload functions: ;;;###autoload (defun org-export-as-latex-batch () "Call `org-export-as-latex', may be used in batch processing as @@ -273,16 +280,16 @@ in a window. A non-interactive call will only retunr the buffer." (if region-p (region-beginning) (point-min)) (if region-p (region-end) (point-max)))) (string-for-export - ;; FIXME Use org-cleaned-string-for-export instead, only when - ;; everyone uses Org >5.04 - (org-latex-cleaned-string-for-export - region :for-html nil - :comments nil + (org-cleaned-string-for-export + region :emph-multiline t :for-LaTeX t - :skip-before-1st-heading nil + :comments nil + :add-text text + :skip-before-1st-heading skip :LaTeX-fragments nil))) (set-buffer buffer) (erase-buffer) + (unless body-only (insert preamble)) (when text (insert (org-export-latex-content text) "\n\n")) (unless skip (insert first-lines)) @@ -303,9 +310,9 @@ in a window. A non-interactive call will only retunr the buffer." (setq org-latex-add-level (if odd (1- (/ (1+ asters) 2)) (1- asters))) (org-export-latex-parse-global level odd)))) - + (unless body-only (insert "\n\\end{document}")) - (or to-buffer (write-file filename)) + (or to-buffer (save-buffer)) (goto-char (point-min)) (message "Exporting to LaTeX...done") (if (eq to-buffer 'string) @@ -313,88 +320,7 @@ in a window. A non-interactive call will only retunr the buffer." (kill-buffer (current-buffer))) (current-buffer)))) -(defun org-export-latex-set-initial-vars (ext-plist) - "Store org local variables required for LaTeX export. -EXT-PLIST is an optional additional plist." - (setq org-latex-todo-keywords-1 org-todo-keywords-1 - org-latex-all-targets-regexp - (org-make-target-link-regexp (org-all-targets)) - org-latex-options-plist - (org-combine-plists (org-default-export-plist) ext-plist - (org-infile-export-plist)) - org-latex-sectioning-depth - (let ((hl-levels (plist-get org-latex-options-plist :headline-levels)) - (sec-depth (length org-export-latex-sectioning-alist))) - ;; Fall back on org-export-latex-sectioning-alist length if - ;; headline-levels goes beyond it - (if (> hl-levels sec-depth) sec-depth hl-levels)))) - -(defun org-export-latex-make-preamble (opt-plist) - "Make the LaTeX preamble and return it as a string. -Argument OPT-PLIST is the options plist for current buffer." - (let ((toc (plist-get opt-plist :table-of-contents))) - (format (concat org-export-latex-preamble - " -%s - -\\begin{document} - -\\title{%s} -%s -%s -\\maketitle -%s -%s -") - (if org-export-latex-packages-alist - (mapconcat (lambda(p) - (if (equal "" (car p)) - (format "\\usepackage{%s}" (cadr p)) - (format "\\usepackage[%s]{%s}" - (car p) (cadr p)))) - org-export-latex-packages-alist "\n") "") - (or (plist-get opt-plist :title) - (and (not - (plist-get opt-plist :skip-before-1st-heading)) - (org-export-grab-title-from-buffer)) - (and buffer-file-name - (file-name-sans-extension - (file-name-nondirectory buffer-file-name))) - "UNTITLED") - (if (plist-get opt-plist :author-info) - (format "\\author{%s}" - (or (plist-get opt-plist :author) user-full-name)) - (format "%%\\author{%s}" - (or (plist-get opt-plist :author) user-full-name))) - (if (plist-get opt-plist :timestamps) - (format "\\date{%s}" - (format-time-string (or org-export-latex-date-format - (car org-time-stamp-formats)))) - "%\\date{}") - (if (and (plist-get opt-plist :section-numbers) toc) - (format "\\setcounter{tocdepth}{%s}" - (plist-get opt-plist :headline-levels)) "") - (if (and (plist-get opt-plist :section-numbers) toc) - "\\tableofcontents" "")))) - -(defun org-export-latex-first-lines (&optional comments) - "Export the first lines before first headline. -COMMENTS is either nil to replace them with the empty string or a -formatting string like %%%%s if we want to comment them out." - (save-excursion - (goto-char (point-min)) - (let* ((end (if (re-search-forward "^\\*" nil t) - (goto-char (match-beginning 0)) - (goto-char (point-max))))) - (org-export-latex-content - (org-latex-cleaned-string-for-export - (buffer-substring (point-min) end) - :for-html nil - :for-LaTeX t - :comments nil - :skip-before-1st-heading nil - :LaTeX-fragments nil))))) - +;;; Parsing functions: (defun org-export-latex-parse-global (level odd) "Parse the current buffer recursively, starting at LEVEL. If ODD is non-nil, assume the buffer only contains odd sections. @@ -444,6 +370,52 @@ Return A list reflecting the document structure." (widen))) (list output)))) +(defun org-export-latex-parse-list (&optional delete) + "Parse the list at point. +Return a list containing first level items as strings and +sublevels as list of strings." + (let ((start (point)) + ;; Find the end of the list + (end (save-excursion + (catch 'exit + (while (or (looking-at org-export-latex-list-beginning-re) + (looking-at "^[ \t]+\\|^$")) + (if (eq (point) (point-max)) + (throw 'exit (point-max))) + (forward-line 1))) (point))) + output itemsep) + (while (re-search-forward org-export-latex-list-beginning-re end t) + (setq itemsep (if (save-match-data + (string-match "^[0-9]" (match-string 2))) + "[0-9]+\\(?:\\.\\|)\\)" "[-+]")) + (let* ((indent1 (match-string 1)) + (nextitem (save-excursion + (save-match-data + (or (and (re-search-forward + (concat "^" indent1 itemsep " *?") end t) + (match-beginning 0)) end)))) + (item (buffer-substring + (point) + (or (and (re-search-forward + org-export-latex-list-beginning-re end t) + (goto-char (match-beginning 0))) + (goto-char end)))) + (nextindent (match-string 1)) + (item (org-trim item)) + (item (if (string-match "^\\[.+\\]" item) + (replace-match "\\\\texttt{\\&}" + t nil item) item))) + (push item output) + (when (> (length nextindent) + (length indent1)) + (narrow-to-region (point) nextitem) + (push (org-export-latex-parse-list) output) + (widen)))) + (when delete (delete-region start end)) + (setq output (nreverse output)) + (push (if (string-match "^\\[0" itemsep) + 'ordered 'unordered) output))) + (defun org-export-latex-parse-content () "Extract the content of a section." (let ((beg (point)) @@ -463,6 +435,7 @@ If ODD Is non-nil, assume subcontent only contains odd sections." nil ; subcontent is nil (org-export-latex-parse-global (+ (if odd 2 1) level) odd))) +;;; Rendering functions: (defun org-export-latex-global (content) "Export CONTENT to LaTeX. CONTENT is an element of the list produced by @@ -475,9 +448,10 @@ CONTENT is an element of the list produced by "Export the list SUBCONTENT to LaTeX. SUBCONTENT is an alist containing information about the headline and its content." - (mapc (lambda(x) (org-export-latex-subcontent x)) subcontent)) + (let ((num (plist-get org-latex-options-plist :section-numbers))) + (mapc (lambda(x) (org-export-latex-subcontent x num)) subcontent))) -(defun org-export-latex-subcontent (subcontent) +(defun org-export-latex-subcontent (subcontent num) "Export each cell of SUBCONTENT to LaTeX." (let ((heading (org-export-latex-fontify-headline (cdr (assoc 'heading subcontent)))) @@ -485,8 +459,7 @@ and its content." org-latex-add-level)) (occur (number-to-string (cdr (assoc 'occur subcontent)))) (content (cdr (assoc 'content subcontent))) - (subcontent (cadr (assoc 'subcontent subcontent))) - (num (plist-get org-latex-options-plist :section-numbers))) + (subcontent (cadr (assoc 'subcontent subcontent)))) (cond ;; Normal conversion ((<= level org-latex-sectioning-depth) @@ -509,7 +482,111 @@ and its content." (cond ((stringp subcontent) (insert subcontent)) ((listp subcontent) (org-export-latex-sub subcontent))))))))) -(defun org-export-latex-special-keywords-maybe (remove-list) + +;;; Exporting internals: +(defun org-latex-protect (string) + (add-text-properties 0 (length string) '(org-protected t) string) string) + +(defun org-export-latex-protect-char-in-string (char-list string) + "Add org-protected text-property to char from CHAR-LIST in STRING." + (with-temp-buffer + (save-match-data + (insert string) + (goto-char (point-min)) + (while (re-search-forward (regexp-opt char-list) nil t) + (add-text-properties (match-beginning 0) + (match-end 0) '(org-protected t))) + (buffer-string)))) + +(defun org-export-latex-set-initial-vars (ext-plist) + "Store org local variables required for LaTeX export. +EXT-PLIST is an optional additional plist." + (setq org-latex-todo-keywords-1 org-todo-keywords-1 + org-latex-all-targets-regexp + (org-make-target-link-regexp (org-all-targets)) + org-latex-options-plist + (org-combine-plists (org-default-export-plist) ext-plist + (org-infile-export-plist)) + org-latex-sectioning-depth + (let ((hl-levels (plist-get org-latex-options-plist :headline-levels)) + (sec-depth (length org-export-latex-sectioning-alist))) + ;; Fall back on org-export-latex-sectioning-alist length if + ;; headline-levels goes beyond it + (if (> hl-levels sec-depth) sec-depth hl-levels)))) + +(defun org-export-latex-make-preamble (opt-plist) + "Make the LaTeX preamble and return it as a string. +Argument OPT-PLIST is the options plist for current buffer." + (let ((toc (plist-get opt-plist :table-of-contents))) + (concat (if (plist-get opt-plist :time-stamp-file) + (format-time-string "% Created %Y-%m-%d %a %H:%M\n")) + + ;; LaTeX custom preamble + org-export-latex-preamble "\n" + + ;; LaTeX packages + (if org-export-latex-packages-alist + (mapconcat (lambda(p) + (if (equal "" (car p)) + (format "\\usepackage{%s}" (cadr p)) + (format "\\usepackage[%s]{%s}" + (car p) (cadr p)))) + org-export-latex-packages-alist "\n") "") + "\n\\begin{document}\n\n" + + ;; title + (format + "\\title{%s}\n" + (or (plist-get opt-plist :title) + (and (not + (plist-get opt-plist :skip-before-1st-heading)) + (org-export-grab-title-from-buffer)) + (and buffer-file-name + (file-name-sans-extension + (file-name-nondirectory buffer-file-name))) + "UNTITLED")) + + ;; author info + (if (plist-get opt-plist :author-info) + (format "\\author{%s}\n" + (or (plist-get opt-plist :author) user-full-name)) + (format "%%\\author{%s}\n" + (or (plist-get opt-plist :author) user-full-name))) + + ;; date + (format "\\date{%s}\n" + (format-time-string + (or (plist-get opt-plist :date) + org-export-latex-date-format))) + + "\\maketitle\n\n" + ;; table of contents + (if (and (plist-get opt-plist :section-numbers) toc) + (format "\\setcounter{tocdepth}{%s}\n" + (plist-get opt-plist :headline-levels)) "") + (if (and (plist-get opt-plist :section-numbers) toc) + "\\tableofcontents\n" "\n")))) + +(defun org-export-latex-first-lines (&optional comments) + "Export the first lines before first headline. +COMMENTS is either nil to replace them with the empty string or a +formatting string like %%%%s if we want to comment them out." + (save-excursion + (goto-char (point-min)) + (let* ((end (if (re-search-forward "^\\*" nil t) + (goto-char (match-beginning 0)) + (goto-char (point-max))))) + (org-export-latex-content + (org-cleaned-string-for-export + (buffer-substring (point-min) end) + :for-LaTeX t + :emph-multiline t + :add-text nil + :comments nil + :skip-before-1st-heading nil + :LaTeX-fragments nil))))) + +(defun org-export-latex-keywords-maybe (remove-list) "Maybe remove keywords depending on rules in REMOVE-LIST." (goto-char (point-min)) (let ((re-todo (mapconcat 'identity org-latex-todo-keywords-1 "\\|"))) @@ -525,7 +602,8 @@ and its content." (replace-match (format "\\texttt{%s}" (match-string 0)) t t))) ;; convert tags (when (re-search-forward "\\(:[a-zA-Z0-9]+\\)+:" nil t) - (if (plist-get remove-list :tags) + (if (or (not org-export-with-tags) + (plist-get remove-list :tags)) (replace-match "") (replace-match (format "\\texttt{%s}" (match-string 0)) t t))))) @@ -536,11 +614,12 @@ and its content." ;; the beginning of the buffer - inserting "\n" is safe here though. (insert "\n" headline) (goto-char (point-min)) - (org-export-latex-fontify) + (when (plist-get org-latex-options-plist :emphasize) + (org-export-latex-fontify)) (org-export-latex-special-chars (plist-get org-latex-options-plist :sub-superscript)) - (org-export-latex-special-keywords-maybe - org-export-latex-remove-from-headines) + (org-export-latex-keywords-maybe + org-export-latex-remove-from-headlines) (org-export-latex-links) (org-trim (buffer-substring-no-properties (point-min) (point-max))))) @@ -554,29 +633,21 @@ and its content." (org-export-latex-special-chars (plist-get org-latex-options-plist :sub-superscript)) (org-export-latex-links) - (org-export-latex-special-keywords) - (org-export-latex-itemize) - (org-export-latex-enumerate) + (org-export-latex-keywords + (plist-get org-latex-options-plist :timestamps)) + (org-export-latex-lists) (org-export-latex-tables (plist-get org-latex-options-plist :tables)) (org-export-latex-fixed-width (plist-get org-latex-options-plist :fixed-width)) - (org-export-fix-invisible-strings) (buffer-substring (point-min) (point-max)))) -(defun org-export-fix-invisible-strings () - "Comment out (INVISIBLE) warnings." - (goto-char (point-min)) - (while (re-search-forward "(INVISIBLE)" nil t) - (replace-match "%\\&"))) - (defun org-export-latex-quotation-marks () "Export question marks depending on language conventions. Local definition of the language overrides `org-export-latex-quotation-marks-convention' which overrides `org-export-default-language'." - (let* ((lang (or (plist-get org-latex-options-plist :language) - org-export-latex-quotation-marks-convention)) + (let* ((lang (plist-get org-latex-options-plist :language)) (quote-rpl (if (equal lang "fr") '(("\\(\\s-\\)\"" "«~") ("\\(\\S-\\)\"" "~»") @@ -594,7 +665,7 @@ Local definition of the language overrides ;; | chars/string in Org | normal environment | math environment | ;; |-----------------------+-----------------------+-----------------------| ;; | & # % $ | \& \# \% \$ | \& \# \% \$ | -;; | { } _ ^ \ | \ { \ } \_ \^ \\ | { } _ ^ \ | +;; | { } _ ^ \ | \{ \} \_ \^ \\ | { } _ ^ \ | ;; |-----------------------+-----------------------+-----------------------| ;; | a_b and a^b | $a_b$ and $a^b$ | a_b and a^b | ;; | a_abc and a_{abc} | $a_a$bc and $a_{abc}$ | a_abc and a_{abc} | @@ -628,11 +699,12 @@ See the `org-export-latex.el' code for a complete conversion table." (replace-match (concat (match-string 1) "\\" (match-string 2)) t t))) ((equal (match-string 2) "~") - (unless (get-text-property 0 'org-protected (match-string 2)) - (if (equal (match-string 1) "\\") nil - (replace-match - (org-latex-protect - (concat (match-string 1) "\\textasciitilde{}")) t t)))) + (cond ((equal (match-string 1) "\\") nil) + ((eq 'org-link (get-text-property 0 'face (match-string 2))) + (replace-match (concat (match-string 1) "\\~") t t)) + (t (replace-match + (org-latex-protect + (concat (match-string 1) "\\~{}")) t t)))) ((member (match-string 2) '("{" "}")) (unless (save-match-data (org-inside-LaTeX-fragment-p)) (if (equal (match-string 1) "\\") @@ -653,8 +725,8 @@ See the `org-export-latex.el' code for a complete conversion table." (match-string 2) (match-string 3))) "") t t))))))) '("^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$" - "\\([a-za-z0-9]+\\|[ \t\n]\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" - "\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-za-z&#%{}]+\\)" + "\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" + "\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)" "\\(.\\|^\\)\\(&\\)" "\\(.\\|^\\)\\(#\\)" "\\(.\\|^\\)\\(%\\)" @@ -672,7 +744,7 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER." ;; this is part of a math formula ((and (string-match "\\S-+" string-before) (string-match "\\S-+" string-after)) - (cond ((get-text-property 0 'org-protected char) + (cond ((eq 'org-link (get-text-property 0 'face char)) (concat string-before "\\" char string-after)) ((save-match-data (org-inside-LaTeX-fragment-p)) (if subsup @@ -681,14 +753,16 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER." ((string-match "[({]?\\([^)}]+\\)[)}]?" string-after) (format "%s%s{%s}" string-before char (match-string 1 string-after)))))) - ((and subsup + ((and subsup (> (length string-after) 1) (string-match "[({]?\\([^)}]+\\)[)}]?" string-after)) (format "$%s%s{%s}$" string-before char (match-string 1 string-after))) - (subsup (concat "$" string-before char string-after "$")) - (t (concat string-before char string-after)))) - (t (concat string-before "\\" char string-after)))) + (subsup (concat "$" string-before char string-after "$")) + (t (org-latex-protect + (concat string-before "\\" char "{}" string-after))))) + (t (org-latex-protect + (concat string-before "\\" char "{}" string-after))))) (defun org-export-latex-treat-backslash-char (string-before string-after) "Convert the \"$\" special character to LaTeX. @@ -699,7 +773,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (or (cdar (member (list string-after) org-html-entities)) string-after) "$")) ((and (not (string-match "^[ \n\t]" string-after)) - (not (string-match "[ \n\t]\\'" string-before))) + (not (string-match "[ \t]\\'\\|^" string-before))) ;; backslash is inside a word (concat string-before "$\\backslash$" string-after)) ((not (or (equal string-after "") @@ -713,6 +787,17 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (concat string-before "$\\backslash$" string-after)) (t (concat string-before "$\\backslash$" string-after)))) +(defun org-export-latex-keywords (timestamps) + "Convert special keywords to LaTeX. +Regexps are those from `org-latex-special-string-regexps'." + (let ((rg org-latex-special-string-regexps) r) + (while (setq r (pop rg)) + (goto-char (point-min)) + (while (re-search-forward (eval r) nil t) + (if (not timestamps) + (replace-match (format "\\\\texttt{%s}" (match-string 0)) t) + (replace-match "")))))) + (defun org-export-latex-fixed-width (opt) "When OPT is non-nil convert fixed-width sections to LaTeX." (goto-char (point-min)) @@ -731,12 +816,79 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (match-string 2)) t t) (forward-line)))))) +;; FIXME Use org-export-highlight-first-table-line ? +(defun org-export-latex-lists () + "Convert lists to LaTeX." + (goto-char (point-min)) + (while (re-search-forward org-export-latex-list-beginning-re nil t) + (beginning-of-line) + (org-export-list-to-latex + (org-export-latex-parse-list t)))) + +(defun org-export-list-to-generic (list params) + "Convert a LIST parsed through `org-export-latex-parse-list' to other formats. + +Valid parameters are + +:ustart String to start an unordered list +:uend String to end an unordered list + +:ostart String to start an ordered list +:oend String to end an ordered list + +:splice When set to t, return only list body lines, don't wrap + them into :[u/o]start and :[u/o]end. Default is nil. + +:istart String to start a list item +:iend String to end a list item +:isep String to separate items +:lsep String to separate sublists" + (interactive) + (let* ((p params) sublist + (splicep (plist-get p :splice)) + (ostart (plist-get p :ostart)) + (oend (plist-get p :oend)) + (ustart (plist-get p :ustart)) + (uend (plist-get p :uend)) + (istart (plist-get p :istart)) + (iend (plist-get p :iend)) + (isep (plist-get p :isep)) + (lsep (plist-get p :lsep))) + (let ((wrapper + (cond ((eq (car list) 'ordered) + (concat ostart "\n%s" oend "\n")) + ((eq (car list) 'unordered) + (concat ustart "\n%s" uend "\n")))) + rtn) + (while (setq sublist (pop list)) + (cond ((symbolp sublist) nil) + ((stringp sublist) + (setq rtn (concat rtn istart sublist iend isep))) + (t + (setq rtn (concat rtn ;; previous list + lsep ;; list separator + (org-export-list-to-generic sublist p) + lsep ;; list separator + ))))) + (format wrapper rtn)))) + +(defun org-export-list-to-latex (list) + "Convert LIST into a LaTeX list." + (insert + (org-export-list-to-generic + list '(:splicep nil :ostart "\\begin{enumerate}" :oend "\\end{enumerate}" + :ustart "\\begin{itemize}" :uend "\\end{itemize}" + :istart "\\item " :iend "" + :isep "\n" :lsep "\n")) + ;; Add a trailing \n after list conversion + "\n")) + (defun org-export-latex-tables (opt) "When OPT is non-nil convert tables to LaTeX." (goto-char (point-min)) (while (re-search-forward "^\\([ \t]*\\)|" nil t) ;; Re-align the table to update org-table-last-alignment - (save-excursion (save-match-data (org-table-align))) + ;; (save-excursion (save-match-data (org-table-align))) (let (tbl-list (beg (match-beginning 0)) (end (save-excursion @@ -744,73 +896,22 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (concat "^" (regexp-quote (match-string 1)) "[^|]\\|\\'") nil t) (match-beginning 0)))) (beginning-of-line) - (while (not (eq end (point))) - (if (looking-at "[ \t]*|\\([^-|].+\\)|[ \t]*$") - (push (split-string (org-trim (match-string 1)) "|") tbl-list) - (push 'hline tbl-list)) - (forward-line)) - ;; comment region out instead of deleting it ? - (apply 'delete-region (list beg end)) - (when opt (insert (orgtbl-to-latex (nreverse tbl-list) - nil) "\n\n"))))) - -(defun org-export-latex-special-keywords () - "Convert special keywords to LaTeX. -Regexps are those from `org-latex-special-string-regexps'." - (let ((rg org-latex-special-string-regexps) r) - (while (setq r (pop rg)) - (goto-char (point-min)) - (while (re-search-forward (eval r) nil t) - (replace-match (format "\\\\texttt{%s}" (match-string 0)) t))))) - -;; FIXME - we need better implementation for nested lists -(defun org-export-latex-list (srch0 srch1 srch2 rpl0 rpl1) - "Convert lists to LaTeX." - (goto-char (point-min)) - (while (re-search-forward srch0 nil t) - (let* ((beg (match-beginning 0)) - (prefix (regexp-quote (match-string 1))) - (end-string (when (re-search-forward srch1 nil t) - (match-string 0)))) - (goto-char beg) (insert rpl0) - (while (re-search-forward - (concat "^" prefix srch2) - (if (not end-string) - (point-max) - (save-match-data - (save-excursion - (re-search-forward - (regexp-quote end-string) nil t)))) t) - (replace-match - (concat "\\item " - (if (match-string 1) - (format "\\texttt{%s}" (match-string 1)))) - t t)) - (goto-char (if end-string - (progn (re-search-forward - (regexp-quote end-string) nil t) - (match-beginning 0)) - (point-max))) - (skip-chars-backward "\n") (forward-line 2) - (insert rpl1)))) - -(defun org-export-latex-itemize () - "Convert item list to LaTeX." - (org-export-latex-list - "^\\([ \t]*\\)-" - "^[^ \n\t-]+.*$" - "- ?\\(\\[.+\\]\\)?" - "\\begin{itemize}\n" - "\\end{itemize}\n")) - -(defun org-export-latex-enumerate () - "Convert numeric list to LaTeX." - (org-export-latex-list - "^\\([ \t]*\\)[0-9]+[\.)] \\(\\[.+\\]\\)? ?" - "^[^ \n\t0-9]+.*$" - "[0-9]+[\.)] ?\\(\\[.+\\]\\)?" - "\\begin{enumerate}\n" - "\\end{enumerate}\n")) + (if org-export-latex-tables-verbatim + (let* ((raw-table (buffer-substring beg end)) + (tbl (concat "\\begin{verbatim}\n" raw-table + "\\end{verbatim}\n"))) + (apply 'delete-region (list beg end)) + (insert tbl)) + (progn + (while (not (eq end (point))) + (if (looking-at "[ \t]*|\\([^-|].+\\)|[ \t]*$") + (push (split-string (org-trim (match-string 1)) "|") tbl-list) + (push 'hline tbl-list)) + (forward-line)) + ;; comment region out instead of deleting it ? + (apply 'delete-region (list beg end)) + (when opt (insert (orgtbl-to-latex (nreverse tbl-list) + nil) "\n\n"))))))) (defun org-export-latex-fontify () "Convert fontification to LaTeX." @@ -829,17 +930,6 @@ Regexps are those from `org-latex-special-string-regexps'." (match-string 5)) t t) (backward-char)))) -(defun org-export-latex-protect-char-in-string (char-list string) - "Add org-protected text-property to char from CHAR-LIST in STRING." - (with-temp-buffer - (save-match-data - (insert string) - (goto-char (point-min)) - (while (re-search-forward (regexp-opt char-list) nil t) - (add-text-properties (match-beginning 0) - (match-end 0) '(org-protected t))) - (buffer-string)))) - (defun org-export-latex-links () ;; Make sure to use the LaTeX hyperref and graphicx package ;; or send some warnings. @@ -887,251 +977,57 @@ Regexps are those from `org-latex-special-string-regexps'." (path (insert (format "\\href{%s}{%s}" path desc))) (t (insert "\\texttt{" desc "}"))))))) - -(defun org-latex-cleaned-string-for-export (string &rest parameters) - "Cleanup a buffer STRING so that links can be created safely." - (interactive) - (let* ((re-radio (and org-target-link-regexp - (concat "\\([^<]\\)\\(" org-target-link-regexp "\\)"))) - (re-plain-link (concat "\\([^[<]\\)" org-plain-link-re)) - (re-angle-link (concat "\\([^[]\\)" org-angle-link-re)) - (re-archive (concat ":" org-archive-tag ":")) - (re-quote (concat "^\\*+[ \t]+" org-quote-string "\\>")) - (htmlp (plist-get parameters :for-html)) - (latexp (plist-get parameters :for-LaTeX)) - (commentsp (plist-get parameters :comments)) - (inhibit-read-only t) - (outline-regexp "\\*+ ") - a b xx - rtn p) - (save-excursion - (set-buffer (get-buffer-create " org-mode-tmp")) - (erase-buffer) - (insert string) - ;; Remove license-to-kill stuff - (while (setq p (text-property-any (point-min) (point-max) - :org-license-to-kill t)) - (delete-region p (next-single-property-change p :org-license-to-kill))) - - (let ((org-inhibit-startup t)) (org-mode)) - (untabify (point-min) (point-max)) - - ;; Get the correct stuff before the first headline - (when (plist-get parameters :skip-before-1st-heading) - (goto-char (point-min)) - (when (re-search-forward "^\\*+[ \t]" nil t) - (delete-region (point-min) (match-beginning 0)) - (goto-char (point-min)) - (insert "\n"))) - (when (plist-get parameters :add-text) - (goto-char (point-min)) - (insert (plist-get parameters :add-text) "\n")) - - ;; Get rid of archived trees - (when (not (eq org-export-with-archived-trees t)) - (goto-char (point-min)) - (while (re-search-forward re-archive nil t) - (if (not (org-on-heading-p t)) - (org-end-of-subtree t) - (beginning-of-line 1) - (setq a (if org-export-with-archived-trees - (1+ (point-at-eol)) (point)) - b (org-end-of-subtree t)) - (if (> b a) (delete-region a b))))) - - ;; Get rid of property drawers - (unless org-export-with-property-drawer - (goto-char (point-min)) - (while (re-search-forward "^[ \t]*:PROPERTIES:[ \t]*\n\\([^@]*?\n\\)?[ \t]*:END:[ \t]*\n" nil t) - (replace-match ""))) - - ;; Find targets in comments and move them out of comments, - ;; but mark them as targets that should be invisible - (goto-char (point-min)) - (while (re-search-forward "^#.*?\\(<<<?[^>\r\n]+>>>?\\).*" nil t) - (replace-match "\\1(INVISIBLE)")) - - ;; Specific LaTeX cleaning - (when latexp - (require 'org-export-latex nil t) - (org-export-latex-cleaned-string)) - - ;; Protect stuff from HTML processing - (goto-char (point-min)) - (let ((formatters `((,htmlp "HTML" "BEGIN_HTML" "END_HTML"))) fmt) - (while (re-search-forward "^[ \t]*:.*\\(\n[ \t]*:.*\\)*" nil t) - (add-text-properties (match-beginning 0) (match-end 0) - '(org-protected t))) - (while formatters - (setq fmt (pop formatters)) - (when (car fmt) - (goto-char (point-min)) - (while (re-search-forward (concat "^#\\+" (cadr fmt) - ":[ \t]*\\(.*\\)") nil t) - (replace-match "\\1" t) - (add-text-properties - (point-at-bol) (min (1+ (point-at-eol)) (point-max)) - '(org-protected t)))) - (goto-char (point-min)) - (while (re-search-forward - (concat "^#\\+" - (caddr fmt) "\\>.*\\(\\(\n.*\\)*?\n\\)#\\+" - (cadddr fmt) "\\>.*\n?") nil t) - (if (car fmt) - (add-text-properties (match-beginning 1) (1+ (match-end 1)) - '(org-protected t)) - (delete-region (match-beginning 0) (match-end 0)))) - (goto-char (point-min)) - (while (re-search-forward re-quote nil t) - (goto-char (match-beginning 0)) - (end-of-line 1) - (add-text-properties (point) (org-end-of-subtree t) - '(org-protected t))))) - - ;; Remove or replace comments - ;; If :comments is set, use this char for commenting out comments and - ;; protect them. otherwise delete them - (goto-char (point-min)) - (while (re-search-forward "^#\\(.*\n?\\)" nil t) - (if commentsp - (progn (add-text-properties - (match-beginning 0) (match-end 0) '(org-protected t)) - (replace-match (format commentsp (match-string 1)) t t)) - (replace-match ""))) - - ;; Find matches for radio targets and turn them into internal links - (goto-char (point-min)) - (when re-radio - (while (re-search-forward re-radio nil t) - (org-if-unprotected - (replace-match "\\1[[\\2]]")))) - - ;; Find all links that contain a newline and put them into a single line - (goto-char (point-min)) - (while (re-search-forward "\\(\\(\\[\\|\\]\\)\\[[^]]*?\\)[ \t]*\n[ \t]*\\([^]]*\\]\\(\\[\\|\\]\\)\\)" nil t) - (org-if-unprotected - (replace-match "\\1 \\3") - (goto-char (match-beginning 0)))) - - ;; Convert LaTeX fragments to images - (when (plist-get parameters :LaTeX-fragments) - (org-format-latex - (concat "ltxpng/" (file-name-sans-extension - (file-name-nondirectory - org-current-export-file))) - org-current-export-dir nil "Creating LaTeX image %s")) - (message "Exporting...") - - ;; Normalize links: Convert angle and plain links into bracket links - ;; Expand link abbreviations - (goto-char (point-min)) - (while (re-search-forward re-plain-link nil t) - (goto-char (1- (match-end 0))) - (org-if-unprotected - (let* ((s (concat (match-string 1) "[[" (match-string 2) - ":" (match-string 3) "]]"))) - ;; added 'org-protected property to links - (add-text-properties 0 (length s) '(org-protected t) s) - (replace-match s t t)))) - (goto-char (point-min)) - (while (re-search-forward re-angle-link nil t) - (goto-char (1- (match-end 0))) - (org-if-unprotected - (let* ((s (concat (match-string 1) "[[" (match-string 2) - ":" (match-string 3) "]]"))) - (add-text-properties 0 (length s) '(org-protected t) s) - (replace-match s t t)))) - (goto-char (point-min)) - (while (re-search-forward org-bracket-link-regexp nil t) - (org-if-unprotected - (let* ((s (concat "[[" (setq xx (save-match-data - (org-link-expand-abbrev (match-string 1)))) - "]" - (if (match-end 3) - (match-string 2) - (concat "[" xx "]")) - "]"))) - (add-text-properties 0 (length s) '(org-protected t) s) - (replace-match s t t)))) - - ;; Find multiline emphasis and put them into single line - (when (plist-get parameters :emph-multiline) - (goto-char (point-min)) - (while (re-search-forward org-emph-re nil t) - (if (not (= (char-after (match-beginning 3)) - (char-after (match-beginning 4)))) - (org-if-unprotected - (subst-char-in-region (match-beginning 0) (match-end 0) - ?\n ?\ t) - (goto-char (1- (match-end 0)))) - (goto-char (1+ (match-beginning 0)))))) - - (setq rtn (buffer-string))) - (kill-buffer " org-mode-tmp") - rtn)) - -(defsubst org-latex-protect (string) - (add-text-properties 0 (length string) '(org-protected t) string) - string) - -(defun org-export-latex-cleaned-string () +(defun org-export-latex-cleaned-string + ;; FIXME remove commentsp call in org.el and here + (&optional commentsp) "Clean stuff in the LaTeX export." - ;; preserve line breaks + ;; align all tables + (goto-char (point-min)) + (while (re-search-forward "^\\([ \t]*\\)|" nil t) + ;; Re-align the table to update org-table-last-alignment + (org-table-align)) + + ;; Preserve line breaks (goto-char (point-min)) (while (re-search-forward "\\\\\\\\" nil t) (add-text-properties (match-beginning 0) (match-end 0) '(org-protected t))) - ;; convert LaTeX to @LaTeX{} + ;; Convert LaTeX to \LaTeX{} (goto-char (point-min)) (let ((case-fold-search nil) rpl) (while (re-search-forward "\\([^+_]\\)LaTeX" nil t) (replace-match (org-latex-protect (concat (match-string 1) "\\LaTeX{}")) t t))) - ;; convert horizontal rules + ;; Convert horizontal rules (goto-char (point-min)) (while (re-search-forward "^----+.$" nil t) (replace-match (org-latex-protect "\\hrule") t t)) - ;; Remove COMMENT subtrees - ;; What about QUOTE subtrees? + ;; Protect LaTeX \commands{...} (goto-char (point-min)) - (while (re-search-forward - (concat "^\\*+ \\(" org-comment-string "\\)") - nil t) - (beginning-of-line) - (org-cut-subtree)) - - ;; protect LaTeX \commands{...} - (goto-char (point-min)) - (while (re-search-forward "\\\\[a-z]+{.+}" nil t) + (while (re-search-forward "\\\\[a-zA-Z]+\\(?:\\[.*\\]\\)?{.*}" nil t) (add-text-properties (match-beginning 0) (match-end 0) '(org-protected t))) - + ;; Replace radio links (goto-char (point-min)) - (let ((search (concat "<<<?" org-latex-all-targets-regexp ">?>>"))) - (while (re-search-forward search nil t) - (replace-match - (org-latex-protect (format "\\label{%s}" (match-string 1))) t t))) - - ;; delete @<br /> cookies + (while (re-search-forward + (concat "<<<?" org-latex-all-targets-regexp + ">>>?\\((INVISIBLE)\\)?") nil t) + (replace-match + (org-latex-protect + (format "\\label{%s}%s"(match-string 1) + (if (match-string 2) "" (match-string 1)))) t t)) + + ;; Delete @<...> constructs (goto-char (point-min)) - (while (re-search-forward "@<[^<>\n]*>" nil t) + ;; Thanks to Daniel Clemente for this regexp + (while (re-search-forward "@<\\(?:[^\"\n]\\|\".*\"\\)*?>" nil t) (replace-match "")) - - ;; add #+BEGIN_LaTeX before any \begin{...} - (goto-char (point-min)) - (while (re-search-forward "^ *\\\\begin{" nil t) - (replace-match "#+BEGIN_LaTeX:\n\\&" t)) - - ;; add #+END_LaTeX after any \end{...} - (goto-char (point-min)) - (while (re-search-forward "^ *\\\\end{.+}.*$" nil t) - (replace-match "\\&\n#+END_LaTeX" t)) - + ;; When converting to LaTeX, replace footnotes ;; FIXME: don't protect footnotes from conversion (when (plist-get org-latex-options-plist :footnotes) @@ -1149,18 +1045,18 @@ Regexps are those from `org-latex-special-string-regexps'." (let ((end (save-excursion (if (re-search-forward "^$\\|\\[[0-9]+\\]" nil t) (match-beginning 0) (point-max))))) - (setq footnote (concat - (org-trim (buffer-substring (point) end)) - ;; FIXME stupid workaround for cases where - ;; `org-bracket-link-analytic-regexp' matches - ;; }. as part of the link. - " ")) + (setq footnote + (concat + (org-trim (buffer-substring (point) end)) + ;; FIXME stupid workaround for cases where + ;; `org-bracket-link-analytic-regexp' matches + ;; }. as part of the link. + " ")) (delete-region (point) end))) (goto-char foot-beg) (delete-region foot-beg foot-end) (setq footnote-rpl (format "\\footnote{%s}" footnote)) - (add-text-properties 0 1 '(org-protected t) footnote-rpl) - (add-text-properties 9 10 '(org-protected t) footnote-rpl) + (add-text-properties 0 10 '(org-protected t) footnote-rpl) (add-text-properties (1- (length footnote-rpl)) (length footnote-rpl) '(org-protected t) footnote-rpl) @@ -1170,41 +1066,7 @@ Regexps are those from `org-latex-special-string-regexps'." (goto-char (point-min)) (while (re-search-forward (concat "^" footnote-section-tag-regexp) nil t) - (replace-match ""))) - - ;; Protect stuff from LaTeX processing. - ;; We will get rid on this once org.el integrate org-export-latex.el - ;; FIXME: #+LaTeX should be aware of the preceeding indentation in lists - (goto-char (point-min)) - (let ((formatters `((,latexp "LaTeX" "BEGIN_LaTeX" "END_LaTeX"))) fmt) - (while (re-search-forward "^[ \t]*:.*\\(\n[ \t]*:.*\\)*" nil t) - (add-text-properties (match-beginning 0) (match-end 0) - '(org-protected t))) - (while formatters - (setq fmt (pop formatters)) - (when (car fmt) - (goto-char (point-min)) - (while (re-search-forward (concat "^#\\+" (cadr fmt) - ":[ \t]*\\(.*\\)") nil t) - (replace-match "\\1" t) - (add-text-properties - (point-at-bol) (min (1+ (point-at-eol)) (point-max)) - '(org-protected t)))) - (goto-char (point-min)) - (while (re-search-forward - (concat "^#\\+" - (caddr fmt) "\\>.*\\(\\(\n.*\\)*?\n\\)#\\+" - (cadddr fmt) "\\>.*\n?") nil t) - (if (car fmt) - (add-text-properties (match-beginning 1) (1+ (match-end 1)) - '(org-protected t)) - (delete-region (match-beginning 0) (match-end 0)))) - (goto-char (point-min)) - (while (re-search-forward re-quote nil t) - (goto-char (match-beginning 0)) - (end-of-line 1) - (add-text-properties (point) (org-end-of-subtree t) - '(org-protected t)))))) + (replace-match "")))) (provide 'org-export-latex) diff --git a/lisp/textmodes/org-publish.el b/lisp/textmodes/org-publish.el index 2404fe54e53..a72b477d0b2 100644 --- a/lisp/textmodes/org-publish.el +++ b/lisp/textmodes/org-publish.el @@ -8,7 +8,7 @@ ;; This file 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 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; This file is distributed in the hope that it will be useful, diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 629a847d8eb..f4746b48f6b 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -2,16 +2,16 @@ ;; Carstens outline-mode for keeping track of everything. ;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ;; -;; Author: Carsten Dominik <dominik at science dot uva dot nl> +;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 5.05 +;; Homepage: http://orgmode.org +;; Version: 5.08 ;; ;; 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 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -49,7 +49,7 @@ ;; --------------------------- ;; See the corresponding sections in the manual at ;; -;; http://staff.science.uva.nl/~dominik/Tools/org/org.html#Installation +;; http://orgmode.org/org.html#Installation ;; ;; Documentation ;; ------------- @@ -60,7 +60,7 @@ ;; in the etc/ directory of Emacs 22. ;; ;; A list of recent changes can be found at -;; http://www.astro.uva.nl/~dominik/Tools/org/Changes +;; http://orgmode.org/Changes.html ;; ;;; Code: @@ -83,7 +83,7 @@ ;;; Version -(defconst org-version "5.05" +(defconst org-version "5.09" "The version number of the file org.el.") (defun org-version () (interactive) @@ -109,6 +109,8 @@ (save-match-data (while (string-match "\\[:alnum:\\]" ss) (setq ss (replace-match "a-zA-Z0-9" t t ss))) + (while (string-match "\\[:alpha:\\]" ss) + (setq ss (replace-match "a-zA-Z" t t ss))) ss)) s)) @@ -236,11 +238,13 @@ Or return the original if not disputed." (defcustom org-ellipsis nil "The ellipsis to use in the Org-mode outline. When nil, just use the standard three dots. When a string, use that instead, -and just in Org-mode (which will then use its own display table). +When a face, use the standart 3 dots, but with the specified face. +The change affects only Org-mode (which will then use its own display table). Changing this requires executing `M-x org-mode' in a buffer to become effective." :group 'org-startup :type '(choice (const :tag "Default" nil) + (face :tag "Face" :value org-warning) (string :tag "String" :value "...#"))) (defvar org-display-table nil @@ -274,11 +278,6 @@ Changes become only effective after restarting Emacs." :group 'org-keywords :type 'string) -(defcustom org-archived-string "ARCHIVED:" - "String used as the prefix for timestamps logging archiving a TODO entry." - :group 'org-keywords - :type 'string) - (defcustom org-clock-string "CLOCK:" "String used as prefix for timestamps clocking work hours on an item." :group 'org-keywords @@ -428,7 +427,7 @@ the property API." :group 'org-structure :type '(repeat (string :tag "Drawer Name"))) -(defcustom org-cycle-global-at-bob t +(defcustom org-cycle-global-at-bob nil "Cycle globally if cursor is at beginning of buffer and not at a headline. This makes it possible to do global cycling without having to use S-TAB or C-u TAB. For this special case to work, the first line of the buffer @@ -489,19 +488,24 @@ the values `folded', `children', or `subtree'." :tag "Org Edit Structure" :group 'org-structure) - (defcustom org-special-ctrl-a/e nil "Non-nil means `C-a' and `C-e' behave specially in headlines and items. -When set, `C-a' will bring back the cursor to the beginning of the +When t, `C-a' will bring back the cursor to the beginning of the headline text, i.e. after the stars and after a possible TODO keyword. In an item, this will be the position after the bullet. When the cursor is already at that position, another `C-a' will bring it to the beginning of the line. `C-e' will jump to the end of the headline, ignoring the presence of tags in the headline. A second `C-e' will then jump to the true end of the -line, after any tags." +line, after any tags. +When set to the symbol `reversed', the first `C-a' or `C-e' works normally, +and only a directly following, identical keypress will bring the cursor +to the special positions." :group 'org-edit-structure - :type 'boolean) + :type '(choice + (const :tag "off" nil) + (const :tag "after bullet first" t) + (const :tag "border first" reversed))) (if (fboundp 'defvaralias) (defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)) @@ -714,6 +718,32 @@ use the first keyword in its list that means done." :group 'org-archive :type 'boolean) +(defcustom org-archive-save-context-info '(time file category todo itags) + "Parts of context info that should be stored as properties when archiving. +When a subtree is moved to an archive file, it looses information given by +context, like inherited tags, the category, and possibly also the TODO +state (depending on the variable `org-archive-mark-done'). +This variable can be a list of any of the following symbols: + +time The time of archiving. +file The file where the entry originates. +itags The local tags, in the headline of the subtree. +ltags The tags the subtree inherits from further up the hierarchy. +todo The pre-archive TODO state. +category The category, taken from file name or #+CATEGORY lines. + +For each symbol present in the list, a property will be created in +the archived entry, with a prefix \"PRE_ARCHIVE_\", to remember this +information." + :group 'org-archive + :type '(set + (const :tag "File" file) + (const :tag "Category" category) + (const :tag "TODO state" todo) + (const :tag "TODO state" priority) + (const :tag "Inherited tags" itags) + (const :tag "Local tags" ltags))) + (defgroup org-table nil "Options concerning tables in Org-mode." :tag "Org Table" @@ -1342,7 +1372,7 @@ You can set this on a per-template basis with the variable (const :tag "Default from remember-data-file" nil) file)) -(defcustom org-remember-store-without-prompt nil +(defcustom org-remember-store-without-prompt t "Non-nil means, `C-c C-c' stores remember note without further promts. In this case, you need `C-u C-c C-c' to get the prompts for note file and headline. @@ -1490,8 +1520,14 @@ taken from the (otherwise obsolete) variable `org-todo-interpretation'." (make-variable-buffer-local 'org-todo-heads) (defvar org-todo-sets nil) (make-variable-buffer-local 'org-todo-sets) +(defvar org-todo-log-states nil) +(make-variable-buffer-local 'org-todo-log-states) (defvar org-todo-kwd-alist nil) (make-variable-buffer-local 'org-todo-kwd-alist) +(defvar org-todo-key-alist nil) +(make-variable-buffer-local 'org-todo-key-alist) +(defvar org-todo-key-trigger nil) +(make-variable-buffer-local 'org-todo-key-trigger) (defcustom org-todo-interpretation 'sequence "Controls how TODO keywords are interpreted. @@ -1504,6 +1540,30 @@ more information." :type '(choice (const sequence) (const type))) +(defcustom org-use-fast-todo-selection 'prefix + "Non-nil means, use the fast todo selection scheme with C-c C-t. +This variable describes if and under what circumstances the cycling +mechanism for TODO keywords will be replaced by a single-key, direct +selection scheme. + +When nil, fast selection is never used. + +When the symbol `prefix', it will be used when `org-todo' is called with +a prefix argument, i.e. `C-u C-c C-t' in an Org-mode buffer, and `C-u t' +in an agenda buffer. + +When t, fast selection is used by default. In this case, the prefix +argument forces cycling instead. + +In all cases, the special interface is only used if access keys have actually +been assigned by the user, i.e. if keywords in the configuration are followed +by a letter in parenthesis, like TODO(t)." + :group 'org-todo + :type '(choice + (const :tag "Never" nil) + (const :tag "By default" t) + (const :tag "Only with C-u C-c C-t" prefix))) + (defcustom org-after-todo-state-change-hook nil "Hook which is run after the state of a TODO item was changed. The new state (a string with a TODO keyword, or nil) is available in the @@ -1513,8 +1573,8 @@ Lisp variable `state'." (defcustom org-log-done nil "When set, insert a (non-active) time stamp when TODO entry is marked DONE. -When the state of an entry is changed from nothing to TODO, remove a previous -closing date. +When the state of an entry is changed from nothing or a DONE state to +a not-done TODO state, remove a previous closing date. This can also be a list of symbols indicating under which conditions the time stamp recording the action should be annotated with a short note. @@ -1683,9 +1743,11 @@ end of the second format." (concat "[" (substring f 1 -1) "]") f))) -(defcustom org-deadline-warning-days 30 +(defcustom org-deadline-warning-days 14 "No. of days before expiration during which a deadline becomes active. -This variable governs the display in sparse trees and in the agenda." +This variable governs the display in sparse trees and in the agenda. +When negative, it means use this number (the absolute value of it) +even if a deadline has a different individual lead time specified." :group 'org-time :type 'number) @@ -1697,6 +1759,12 @@ When nil, only the minibuffer will be available." :group 'org-time :type 'boolean) +(defcustom org-edit-timestamp-down-means-later nil + "Non-nil means, S-down will increase the time in a time stamp. +When nil, S-up will increase." + :group 'org-time + :type 'boolean) + (defcustom org-calendar-follow-timestamp-change t "Non-nil means, make the calendar window follow timestamp changes. When a timestamp is modified and the calendar window is visible, it will be @@ -1713,9 +1781,10 @@ moved to the new date." "List of tags allowed in Org-mode files. When this list is nil, Org-mode will base TAG input on what is already in the buffer. -The value of this variable is an alist, the car may be (and should) be a -character that is used to select that tag through the fast-tag-selection -interface. See the manual for details." +The value of this variable is an alist, the car of each entry must be a +keyword as a string, the cdr may be a character that is used to select +that tag through the fast-tag-selection interface. +See the manual for details." :group 'org-tags :type '(repeat (choice @@ -1751,6 +1820,10 @@ displaying the tags menu is not even shown, until you press C-c again." (const :tag "Yes" t) (const :tag "Expert" expert))) +(defvar org-fast-tag-selection-include-todo nil + "Non-nil means, fast tags selection interface will also offer TODO states. +This is an undocumented feature, you should not rely on it.") + (defcustom org-tags-column 48 "The column to which tags should be indented in a headline. If this number is positive, it specifies the column. If it is negative, @@ -1794,6 +1867,8 @@ make sure all corresponding TODO items find their way into the list." "History of minibuffer reads for tags.") (defvar org-last-tags-completion-table nil "The last used completion table for tags.") +(defvar org-after-tags-change-hook nil + "Hook that is run after the tags in a line have changed.") (defgroup org-properties nil "Options concerning properties in Org-mode." @@ -1863,6 +1938,11 @@ agenda file per line." (repeat :tag "List of files" file) (file :tag "Store list in a file\n" :value "~/.agenda_files"))) +(defcustom org-agenda-skip-unavailable-files nil + "t means to just skip non-reachable files in `org-agenda-files'. +Nil means to remove them, after a query, from the list." + :group 'org-agenda + :type 'boolean) (defcustom org-agenda-confirm-kill 1 "When set, remote killing from the agenda buffer needs confirmation. @@ -2111,15 +2191,19 @@ The idea behind this is that such items will appear in the agenda anyway." (defcustom org-agenda-skip-scheduled-if-done nil "Non-nil means don't show scheduled items in agenda when they are done. -This is relevant for the daily/weekly agenda, not for the TODO list." +This is relevant for the daily/weekly agenda, not for the TODO list. And +it applied only to the actualy date of the scheduling. Warnings about +an item with a past scheduling dates are always turned off when the item +is DONE." :group 'org-agenda-skip :type 'boolean) (defcustom org-agenda-skip-deadline-if-done nil "Non-nil means don't show deadines when the corresponding item is done. When nil, the deadline is still shown and should give you a happy feeling. - -This is relevant for the daily/weekly agenda." +This is relevant for the daily/weekly agenda. And it applied only to the +actualy date of the deadline. Warnings about approching and past-due +deadlines are always turned off when the item is DONE." :group 'org-agenda-skip :type 'boolean) @@ -2232,13 +2316,25 @@ When nil, only the days which actually have entries are shown." :group 'org-agenda-daily/weekly :type 'boolean) -(defcustom org-agenda-date-format "%A %d %B %Y" +(defcustom org-agenda-format-date 'org-agenda-format-date-aligned "Format string for displaying dates in the agenda. Used by the daily/weekly agenda and by the timeline. This should be -a format string understood by `format-time-string'. -FIXME: Not used currently, because of timezone problem." +a format string understood by `format-time-string', or a function returning +the formatted date as a string. The function must take a single argument, +a calendar-style date list like (month day year)." :group 'org-agenda-daily/weekly - :type 'string) + :type '(choice + (string :tag "Format string") + (function :tag "Function"))) + +(defun org-agenda-format-date-aligned (date) + "Format a date string for display in the daily/weekly agenda, or timeline. +This function makes sure that dates are aligned for easy reading." + (format "%-9s %2d %s %4d" + (calendar-day-name date) + (extract-calendar-day date) + (calendar-month-name (extract-calendar-month date)) + (extract-calendar-year date))) (defcustom org-agenda-include-diary nil "If non-nil, include in the agenda entries from the Emacs Calendar's diary." @@ -2544,16 +2640,17 @@ This is a property list with the following properties: This path may be relative to the directory where the Org-mode file lives. The default is to put them into the same directory as the Org-mode file. The variable may also be an alist with export types `:html', `:ascii', -`:ical', or `:xoxo' and the corresponding directories. If a directory path -is relative, it is interpreted relative to the directory where the exported -Org-mode files lives." +`:ical', `:LaTeX', or `:xoxo' and the corresponding directories. +If a directory path is relative, it is interpreted relative to the +directory where the exported Org-mode files lives." :group 'org-export-general :type '(choice (directory) (repeat (cons (choice :tag "Type" - (const :html) (const :ascii) (const :ical) (const :xoxo)) + (const :html) (const :LaTeX) + (const :ascii) (const :ical) (const :xoxo)) (directory))))) (defcustom org-export-language-setup @@ -2561,8 +2658,8 @@ Org-mode files lives." ("cs" "Autor" "Datum" "Obsah") ("da" "Ophavsmand" "Dato" "Indhold") ("de" "Autor" "Datum" "Inhaltsverzeichnis") - ("es" "Autor" "Fecha" "\xccndice") - ("fr" "Auteur" "Date" "Table des Mati\xe8res") + ("es" "Autor" "Fecha" "\xcdndice") + ("fr" "Auteur" "Date" "Table des mati\xe8res") ("it" "Autore" "Data" "Indice") ("nl" "Auteur" "Datum" "Inhoudsopgave") ("nn" "Forfattar" "Dato" "Innhold") ;; nn = Norsk (nynorsk) @@ -3157,7 +3254,7 @@ Use customize to modify this, or restart Emacs after changing it." '(("*" bold "<b>" "</b>") ("/" italic "<i>" "</i>") ("_" underline "<u>" "</u>") - ("=" shadow "<code>" "</code>") + ("=" org-code "<code>" "</code>") ("+" (:strike-through t) "<del>" "</del>") ) "Special syntax for emphasized text. @@ -3186,26 +3283,36 @@ Use customize to modify this, or restart Emacs after changing it." ;; FIXME: convert that into a macro? Not critical, because this ;; is only executed a few times at load time. -(defun org-compatible-face (specs) +(defun org-compatible-face (inherits specs) "Make a compatible face specification. +If INHERITS is an existing face and if the Emacs version supports it, +just inherit the face. If not, use SPECS to define the face. XEmacs and Emacs 21 do not know about the `min-colors' attribute. For them we convert a (min-colors 8) entry to a `tty' entry and move it to the top of the list. The `min-colors' attribute will be removed from any other entries, and any resulting duplicates will be removed entirely." - (if (or (featurep 'xemacs) (< emacs-major-version 22)) - (let (r e a) - (while (setq e (pop specs)) - (cond - ((memq (car e) '(t default)) (push e r)) - ((setq a (member '(min-colors 8) (car e))) - (nconc r (list (cons (cons '(type tty) (delq (car a) (car e))) - (cdr e))))) - ((setq a (assq 'min-colors (car e))) - (setq e (cons (delq a (car e)) (cdr e))) - (or (assoc (car e) r) (push e r))) - (t (or (assoc (car e) r) (push e r))))) - (nreverse r)) - specs)) + (cond + ((and inherits (facep inherits) + (not (featurep 'xemacs)) (> emacs-major-version 22)) + ;; In Emacs 23, we use inheritance where possible. + ;; We only do this in Emacs 23, because only there the outline + ;; faces have been changed to the original org-mode-level-faces. + (list (list t :inherit inherits))) + ((or (featurep 'xemacs) (< emacs-major-version 22)) + ;; These do not understand the `min-colors' attribute. + (let (r e a) + (while (setq e (pop specs)) + (cond + ((memq (car e) '(t default)) (push e r)) + ((setq a (member '(min-colors 8) (car e))) + (nconc r (list (cons (cons '(type tty) (delq (car a) (car e))) + (cdr e))))) + ((setq a (assq 'min-colors (car e))) + (setq e (cons (delq a (car e)) (cdr e))) + (or (assoc (car e) r) (push e r))) + (t (or (assoc (car e) r) (push e r))))) + (nreverse r))) + (t specs))) (defface org-hide '((((background light)) (:foreground "white")) @@ -3217,6 +3324,7 @@ color of the frame." (defface org-level-1 ;; font-lock-function-name-face (org-compatible-face + 'outline-1 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) @@ -3228,6 +3336,7 @@ color of the frame." (defface org-level-2 ;; font-lock-variable-name-face (org-compatible-face + 'outline-2 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8) (background light)) (:foreground "yellow")) @@ -3238,6 +3347,7 @@ color of the frame." (defface org-level-3 ;; font-lock-keyword-face (org-compatible-face + 'outline-3 '((((class color) (min-colors 88) (background light)) (:foreground "Purple")) (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1")) (((class color) (min-colors 16) (background light)) (:foreground "Purple")) @@ -3250,6 +3360,7 @@ color of the frame." (defface org-level-4 ;; font-lock-comment-face (org-compatible-face + 'outline-4 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 16) (background light)) (:foreground "red")) @@ -3262,6 +3373,7 @@ color of the frame." (defface org-level-5 ;; font-lock-type-face (org-compatible-face + 'outline-5 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")))) @@ -3270,6 +3382,7 @@ color of the frame." (defface org-level-6 ;; font-lock-constant-face (org-compatible-face + 'outline-6 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 8)) (:foreground "magenta")))) @@ -3278,6 +3391,7 @@ color of the frame." (defface org-level-7 ;; font-lock-builtin-face (org-compatible-face + 'outline-7 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:foreground "blue")))) @@ -3286,6 +3400,7 @@ color of the frame." (defface org-level-8 ;; font-lock-string-face (org-compatible-face + 'outline-8 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 8)) (:foreground "green")))) @@ -3294,6 +3409,7 @@ color of the frame." (defface org-special-keyword ;; font-lock-string-face (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) (t (:italic t)))) @@ -3302,6 +3418,7 @@ color of the frame." (defface org-drawer ;; font-lock-function-name-face (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) @@ -3317,6 +3434,7 @@ color of the frame." (defface org-column (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:background "grey90")) (((class color) (min-colors 16) (background dark)) @@ -3333,8 +3451,9 @@ color of the frame." :height (face-attribute 'default :height) :family (face-attribute 'default :family))) -(defface org-warning ;; font-lock-warning-face +(defface org-warning (org-compatible-face + 'font-lock-warning-face '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t)) (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t)) (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t)) @@ -3345,6 +3464,7 @@ color of the frame." (defface org-archived ; similar to shadow (org-compatible-face + 'shadow '((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) @@ -3389,8 +3509,9 @@ color of the frame." "Face for tags." :group 'org-faces) -(defface org-todo ;; font-lock-warning-face +(defface org-todo ; font-lock-warning-face (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t)) (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t)) (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t)) @@ -3401,6 +3522,7 @@ color of the frame." (defface org-done ;; font-lock-type-face (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t)) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t)) (((class color) (min-colors 8)) (:foreground "green")) @@ -3410,6 +3532,7 @@ color of the frame." (defface org-headline-done ;; font-lock-string-face (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 8) (background light)) (:bold nil)))) @@ -3418,8 +3541,21 @@ This face is only used if `org-fontify-done-headline' is set. If applies to the part of the headline after the DONE keyword." :group 'org-faces) +(defcustom org-todo-keyword-faces nil + "Faces for specific TODO keywords. +This is a list of cons cells, with TODO keywords in the car +and faces in the cdr. The face can be a symbol, or a property +list of attributes, like (:foreground \"blue\" :weight bold :underline t)." + :group 'org-faces + :group 'org-todo + :type '(repeat + (cons + (string :tag "keyword") + (sexp :tag "face")))) + (defface org-table ;; font-lock-function-name-face (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) @@ -3431,6 +3567,7 @@ to the part of the headline after the DONE keyword." (defface org-formula (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) @@ -3439,8 +3576,24 @@ to the part of the headline after the DONE keyword." "Face for formulas." :group 'org-faces) +(defface org-code + (org-compatible-face + nil + '((((class color grayscale) (min-colors 88) (background light)) + (:foreground "grey50")) + (((class color grayscale) (min-colors 88) (background dark)) + (:foreground "grey70")) + (((class color) (min-colors 8) (background light)) + (:foreground "green")) + (((class color) (min-colors 8) (background dark)) + (:foreground "yellow")))) + "Face for fixed-with text like code snippets." + :group 'org-faces + :version "22.1") + (defface org-agenda-structure ;; font-lock-function-name-face (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) @@ -3452,6 +3605,7 @@ to the part of the headline after the DONE keyword." (defface org-scheduled-today (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")) (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")) @@ -3461,6 +3615,7 @@ to the part of the headline after the DONE keyword." (defface org-scheduled-previously (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) @@ -3471,6 +3626,7 @@ to the part of the headline after the DONE keyword." (defface org-upcoming-deadline (org-compatible-face + nil '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) @@ -3506,6 +3662,7 @@ month and 365.24 days for a year)." (defface org-time-grid ;; font-lock-variable-name-face (org-compatible-face + nil '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))) @@ -3664,17 +3821,21 @@ means to push this value onto the list in the variable.") "Precompute regular expressions for current buffer." (when (org-mode-p) (org-set-local 'org-todo-kwd-alist nil) + (org-set-local 'org-todo-key-alist nil) + (org-set-local 'org-todo-key-trigger nil) (org-set-local 'org-todo-keywords-1 nil) (org-set-local 'org-done-keywords nil) (org-set-local 'org-todo-heads nil) (org-set-local 'org-todo-sets nil) + (org-set-local 'org-todo-log-states nil) (let ((re (org-make-options-regexp - '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "COLUMNS" + '("CATEGORY" "SEQ_TODO" "TYP_TODO" "TODO" "COLUMNS" "STARTUP" "ARCHIVE" "TAGS" "LINK" "PRIORITIES" "CONSTANTS" "PROPERTY"))) (splitre "[ \t]+") - kwds key value cat arch tags const links hw dws tail sep kws1 prio - props) + kwds kws0 kwsa key value cat arch tags const links hw dws + tail sep kws1 prio props + ex log note) (save-excursion (save-restriction (widen) @@ -3686,7 +3847,7 @@ means to push this value onto the list in the variable.") (if (string-match "[ \t]+$" value) (setq value (replace-match "" t t value))) (setq cat (intern value))) - ((equal key "SEQ_TODO") + ((member key '("SEQ_TODO" "TODO")) (push (cons 'sequence (org-split-string value splitre)) kwds)) ((equal key "TYP_TODO") (push (cons 'type (org-split-string value splitre)) kwds)) @@ -3744,20 +3905,41 @@ means to push this value onto the list in the variable.") (default-value 'org-todo-keywords))))) (setq kwds (reverse kwds))) (setq kwds (nreverse kwds)) - (let (inter kws) + (let (inter kws kw) (while (setq kws (pop kwds)) (setq inter (pop kws) sep (member "|" kws) - kws1 (delete "|" (copy-sequence kws)) + kws0 (delete "|" (copy-sequence kws)) + kwsa nil + kws1 (mapcar + (lambda (x) + (if (string-match "^\\(.*?\\)\\(?:(\\(..?\\))\\)?$" x) + (progn + (setq kw (match-string 1 x) + ex (and (match-end 2) (match-string 2 x)) + log (and ex (string-match "@" ex)) + key (and ex (substring ex 0 1))) + (if (equal key "@") (setq key nil)) + (push (cons kw (and key (string-to-char key))) kwsa) + (and log (push kw org-todo-log-states)) + kw) + (error "Invalid TODO keyword %s" x))) + kws0) + kwsa (if kwsa (append '((:startgroup)) + (nreverse kwsa) + '((:endgroup)))) hw (car kws1) - dws (if sep (cdr sep) (last kws1)) + dws (if sep (org-remove-keyword-keys (cdr sep)) (last kws1)) tail (list inter hw (car dws) (org-last dws))) (add-to-list 'org-todo-heads hw 'append) (push kws1 org-todo-sets) (setq org-done-keywords (append org-done-keywords dws nil)) + (setq org-todo-key-alist (append org-todo-key-alist kwsa)) (mapc (lambda (x) (push (cons x tail) org-todo-kwd-alist)) kws1) (setq org-todo-keywords-1 (append org-todo-keywords-1 kws1 nil))) (setq org-todo-sets (nreverse org-todo-sets) - org-todo-kwd-alist (nreverse org-todo-kwd-alist))) + org-todo-kwd-alist (nreverse org-todo-kwd-alist) + org-todo-key-trigger (delq nil (mapcar 'cdr org-todo-key-alist)) + org-todo-key-alist (org-assign-fast-keys org-todo-key-alist))) ;; Process the constants (when const (let (e cst) @@ -3834,32 +4016,35 @@ means to push this value onto the list in the variable.") (concat "\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string - "\\|" org-archived-string "\\|" org-clock-string "\\)" " *[[<]\\([^]>]+\\)[]>]") org-keyword-time-not-clock-regexp (concat "\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string - "\\|" org-archived-string "\\)" " *[[<]\\([^]>]+\\)[]>]") org-maybe-keyword-time-regexp (concat "\\(\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string - "\\|" org-archived-string "\\|" org-clock-string "\\)\\)?" " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)") org-planning-or-clock-line-re (concat "\\(?:^[ \t]*\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string "\\|" org-clock-string - "\\|" org-archived-string "\\)\\>\\)") + "\\)\\>\\)") ) (org-set-font-lock-defaults))) +(defun org-remove-keyword-keys (list) + (mapcar (lambda (x) + (if (string-match "(..?)$" x) + (substring x 0 (match-beginning 0)) + x)) + list)) ;;; Some variables ujsed in various places @@ -3922,6 +4107,7 @@ This is for getting out of special buffers like remember.") ;; Defined somewhere in this file, but used before definition. (defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized +(defvar org-agenda-buffer-name) (defvar org-agenda-undo-list) (defvar org-agenda-pending-undo-list) (defvar org-agenda-overriding-header) @@ -4064,7 +4250,7 @@ This variable is set by `org-before-change-function'. (defvar org-inhibit-startup nil) ; Dynamically-scoped param. (defvar org-agenda-keep-modes nil) ; Dynamically-scoped param. (defvar org-table-buffer-is-an nil) - +(defconst org-outline-regexp "\\*+ ") ;;;###autoload (define-derived-mode org-mode outline-mode "Org" @@ -4107,14 +4293,19 @@ The following commands are available: (org-add-to-invisibility-spec '(org-cwidth)) (when (featurep 'xemacs) (org-set-local 'line-move-ignore-invisible t)) - (org-set-local 'outline-regexp "\\*+ ") - (setq outline-level 'org-outline-level) - (when (and org-ellipsis (stringp org-ellipsis) - (fboundp 'set-display-table-slot) (boundp 'buffer-display-table)) + (org-set-local 'outline-regexp org-outline-regexp) + (org-set-local 'outline-level 'org-outline-level) + (when (and org-ellipsis + (fboundp 'set-display-table-slot) (boundp 'buffer-display-table) + (fboundp 'make-glyph-code)) (unless org-display-table (setq org-display-table (make-display-table))) - (set-display-table-slot org-display-table - 4 (string-to-vector org-ellipsis)) + (set-display-table-slot + org-display-table 4 + (vconcat (mapcar + (lambda (c) (make-glyph-code c (and (not (stringp org-ellipsis)) + org-ellipsis))) + (if (stringp org-ellipsis) org-ellipsis "...")))) (setq buffer-display-table org-display-table)) (org-set-regexps-and-options) ;; Calc embedded @@ -4159,6 +4350,7 @@ The following commands are available: (let ((bmp (buffer-modified-p))) (org-table-map-tables 'org-table-align) (set-buffer-modified-p bmp))) + (org-cycle-hide-drawers 'all) (cond ((eq org-startup-folded t) (org-cycle '(4))) @@ -4553,17 +4745,18 @@ between words." (defvar org-font-lock-keywords nil) -(defconst org-property-re "^[ \t]*\\(:\\([a-zA-Z_0-9]+\\):\\)[ \t]*\\(\\S-.*\\)" +(defconst org-property-re (org-re "^[ \t]*\\(:\\([[:alnum:]_]+\\):\\)[ \t]*\\(\\S-.*\\)") "Regular expression matching a property line.") (defun org-set-font-lock-defaults () (let* ((em org-fontify-emphasized-text) (lk org-activate-links) (org-font-lock-extra-keywords - ;; Headlines (list + ;; Headlines '("^\\(\\**\\)\\(\\* \\)\\(.*\\)" (1 (org-get-level-face 1)) (2 (org-get-level-face 2)) (3 (org-get-level-face 3))) + ;; Table lines '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" (1 'org-table)) ;; Links @@ -4576,15 +4769,21 @@ between words." '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t)) '(org-hide-wide-columns (0 nil append)) ;; TODO lines - (list (concat "^\\*+[ \t]+" org-not-done-regexp) - '(1 'org-todo t)) + (list (concat "^\\*+[ \t]+" org-todo-regexp) + '(1 (org-get-todo-face 1) t)) + ;; DONE + (if org-fontify-done-headline + (list (concat "^[*]+ +\\<\\(" + (mapconcat 'regexp-quote org-done-keywords "\\|") + "\\)\\(.*\\)") + '(2 'org-headline-done t)) + nil) ;; Priorities (list (concat "\\[#[A-Z0-9]\\]") '(0 'org-special-keyword t)) ;; Special keywords (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) - (list (concat "\\<" org-archived-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-clock-string) '(0 'org-special-keyword t)) ;; Emphasis (if em @@ -4602,25 +4801,13 @@ between words." "\\|" org-quote-string "\\)\\>") '(1 'org-special-keyword t)) '("^#.*" (0 'font-lock-comment-face t)) - ;; DONE - (if org-fontify-done-headline - (list (concat "^[*]+ +\\<\\(" - (mapconcat 'regexp-quote org-done-keywords "\\|") - "\\)\\(.*\\)") - '(1 'org-done t) '(2 'org-headline-done t)) - (list (concat "^[*]+ +\\<\\(" - (mapconcat 'regexp-quote org-done-keywords "\\|") - "\\)\\>") - '(1 'org-done t))) - ;; Table stuff - '("^[ \t]*\\(:.*\\)" (1 'org-table t)) + ;; Code + '("^[ \t]*\\(:.*\\)" (1 'org-code t)) + ;; Table internals '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) -; '("^[ \t]*| *\\([#!$*_^/]\\) *|" (1 'org-formula t)) '("^[ \t]*| *\\([#*]\\) *|" (1 'org-formula t)) '("^[ \t]*|\\( *\\([$!_^/]\\) *|.*\\)|" (1 'org-formula t)) ;; Drawers -; (list org-drawer-regexp '(0 'org-drawer t)) -; (list "^[ \t]*:END:" '(0 'org-drawer t)) (list org-drawer-regexp '(0 'org-special-keyword t)) (list "^[ \t]*:END:" '(0 'org-special-keyword t)) ;; Properties @@ -4651,6 +4838,14 @@ between words." ((eq n 2) org-f) (t (if org-level-color-stars-only nil org-f)))) +(defun org-get-todo-face (kwd) + "Get the right face for a TODO keyword KWD. +If KWD is a number, get the corresponding match group." + (if (numberp kwd) (setq kwd (match-string kwd))) + (or (cdr (assoc kwd org-todo-keyword-faces)) + (and (member kwd org-done-keywords) 'org-done) + 'org-todo)) + (defun org-unfontify-region (beg end &optional maybe_loudly) "Remove fontification and activation overlays from links." (font-lock-default-unfontify-region beg end) @@ -4699,7 +4894,8 @@ between words." `org-cycle-emulate-tab' for details. - Special case: if point is at the beginning of the buffer and there is - no headline in line 1, this function will act as if called with prefix arg." + no headline in line 1, this function will act as if called with prefix arg. + But only if also the variable `org-cycle-global-at-bob' is t." (interactive "P") (let* ((outline-regexp (if (and (org-mode-p) org-cycle-include-plain-lists) @@ -4756,7 +4952,7 @@ between words." (setq org-cycle-global-status 'overview) (run-hook-with-args 'org-cycle-hook 'overview)))) - ((and org-drawers + ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) @@ -4977,7 +5173,7 @@ Optional argument N means, put the headline into the Nth line of the window." (defvar org-goto-marker nil) (defvar org-goto-map (let ((map (make-sparse-keymap))) - (let ((cmds '(isearch-forward isearch-backward)) cmd) + (let ((cmds '(isearch-forward isearch-backward kill-ring-save set-mark-command mouse-drag-region universal-argument org-occur)) cmd) (while (setq cmd (pop cmds)) (substitute-key-definition cmd cmd map global-map))) (org-defkey map "\C-m" 'org-goto-ret) @@ -4994,6 +5190,7 @@ Optional argument N means, put the headline into the Nth line of the window." (org-defkey map "f" 'outline-forward-same-level) (org-defkey map "b" 'outline-backward-same-level) (org-defkey map "u" 'outline-up-heading) + (org-defkey map "/" 'org-occur) (org-defkey map "\C-c\C-n" 'outline-next-visible-heading) (org-defkey map "\C-c\C-p" 'outline-previous-visible-heading) (org-defkey map "\C-c\C-f" 'outline-forward-same-level) @@ -5005,55 +5202,63 @@ Optional argument N means, put the headline into the Nth line of the window." map)) (defconst org-goto-help -"Select a location to jump to, press RET -\[Up]/[Down]=next/prev headline TAB=cycle visibility RET=select [Q]uit") +"Browse copy of buffer to find location or copy text. +RET=jump to location [Q]uit and return to previous location +\[Up]/[Down]=next/prev headline TAB=cycle visibility [/] org-occur" +) (defun org-goto () - "Go to a different location of the document, keeping current visibility. + "Look up a different location in the current file, keeping current visibility. -When you want to go to a different location in a document, the fastest way -is often to fold the entire buffer and then dive into the tree. This -method has the disadvantage, that the previous location will be folded, +When you want look-up or go to a different location in a document, the +fastest way is often to fold the entire buffer and then dive into the tree. +This method has the disadvantage, that the previous location will be folded, which may not be what you want. -This command works around this by showing a copy of the current buffer in -overview mode. You can dive into the tree in that copy, to find the -location you want to reach. When pressing RET, the command returns to the -original buffer in which the visibility is still unchanged. It then jumps -to the new location, making it and the headline hierarchy above it visible." +This command works around this by showing a copy of the current buffer +in an indirect buffer, in overview mode. You can dive into the tree in +that copy, use org-occur and incremental search to find a location. +When pressing RET or `Q', the command returns to the original buffer in +which the visibility is still unchanged. After RET is will also jump to +the location selected in the indirect buffer and expose the +the headline hierarchy above." (interactive) (let* ((org-goto-start-pos (point)) (selected-point - (org-get-location (current-buffer) org-goto-help))) + (car (org-get-location (current-buffer) org-goto-help)))) (if selected-point (progn (org-mark-ring-push org-goto-start-pos) (goto-char selected-point) (if (or (org-invisible-p) (org-invisible-p2)) (org-show-context 'org-goto))) - (error "Quit")))) + (message "Quit")))) -(defvar org-selected-point nil) ; dynamically scoped parameter +(defvar org-goto-selected-point nil) ; dynamically scoped parameter +(defvar org-goto-exit-command nil) ; dynamically scoped parameter (defun org-get-location (buf help) "Let the user select a location in the Org-mode buffer BUF. This function uses a recursive edit. It returns the selected position or nil." - (let (org-selected-point) + (let (org-goto-selected-point org-goto-exit-command) (save-excursion (save-window-excursion (delete-other-windows) - (switch-to-buffer (get-buffer-create "*org-goto*")) + (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) + (switch-to-buffer + (condition-case nil + (make-indirect-buffer (current-buffer) "*org-goto*") + (error (make-indirect-buffer (current-buffer) "*org-goto*")))) (with-output-to-temp-buffer "*Help*" (princ help)) (shrink-window-if-larger-than-buffer (get-buffer-window "*Help*")) (setq buffer-read-only nil) - (erase-buffer) - (insert-buffer-substring buf) (let ((org-startup-truncated t) - (org-startup-folded t) + (org-startup-folded nil) (org-startup-align-all-tables nil)) - (org-mode)) + (org-mode) + (org-overview)) (setq buffer-read-only t) (if (and (boundp 'org-goto-start-pos) (integer-or-marker-p org-goto-start-pos)) @@ -5067,21 +5272,24 @@ or nil." (message "Select location and press RET") ;; now we make sure that during selection, ony very few keys work ;; and that it is impossible to switch to another window. - (let ((gm (current-global-map)) - (overriding-local-map org-goto-map)) - (unwind-protect - (progn - (use-global-map org-goto-map) - (recursive-edit)) - (use-global-map gm))))) +; (let ((gm (current-global-map)) +; (overriding-local-map org-goto-map)) +; (unwind-protect +; (progn +; (use-global-map org-goto-map) +; (recursive-edit)) +; (use-global-map gm))) + (use-local-map org-goto-map) + (recursive-edit) + )) (kill-buffer "*org-goto*") - org-selected-point)) + (cons org-goto-selected-point org-goto-exit-command))) (defun org-goto-ret (&optional arg) "Finish `org-goto' by going to the new location." (interactive "P") - (setq org-selected-point (point) - current-prefix-arg arg) + (setq org-goto-selected-point (point) + org-goto-exit-command 'return) (throw 'exit nil)) (defun org-goto-left () @@ -5090,8 +5298,8 @@ or nil." (if (org-on-heading-p) (progn (beginning-of-line 1) - (setq org-selected-point (point) - current-prefix-arg (- (match-end 0) (match-beginning 0))) + (setq org-goto-selected-point (point) + org-goto-exit-command 'left) (throw 'exit nil)) (error "Not on a heading"))) @@ -5100,17 +5308,16 @@ or nil." (interactive) (if (org-on-heading-p) (progn - (outline-end-of-subtree) - (or (eobp) (forward-char 1)) - (setq org-selected-point (point) - current-prefix-arg (- (match-end 0) (match-beginning 0))) + (setq org-goto-selected-point (point) + org-goto-exit-command 'right) (throw 'exit nil)) (error "Not on a heading"))) (defun org-goto-quit () "Finish `org-goto' without cursor motion." (interactive) - (setq org-selected-point nil) + (setq org-goto-selected-point nil) + (setq org-goto-exit-command 'quit) (throw 'exit nil)) ;;; Indirect buffer display of subtrees @@ -5599,33 +5806,26 @@ If optional TREE is given, use this text instead of the kill ring." (func (if (> shift 0) 'org-demote 'org-promote)) (org-odd-levels-only nil) beg end) - ;; Remove the forces level indicator + ;; Remove the forced level indicator (if force-level (delete-region (point-at-bol) (point))) - ;; Make sure we start at the beginning of an empty line - (if (not (bolp)) (insert "\n")) - (if (not (looking-at "[ \t]*$")) - (progn (insert "\n") (backward-char 1))) ;; Paste + (beginning-of-line 1) (setq beg (point)) - (if (string-match "[ \t\r\n]+\\'" txt) - (setq txt (replace-match "\n" t t txt))) (insert txt) + (unless (string-match "\n[ \t]*\\'" txt) (insert "\n")) (setq end (point)) - (if (looking-at "[ \t\r\n]+") - (replace-match "\n")) (goto-char beg) ;; Shift if necessary - (if (= shift 0) - (message "Pasted at level %d, without shift" new-level) + (unless (= shift 0) (save-restriction (narrow-to-region beg end) (while (not (= shift 0)) (org-map-region func (point-min) (point-max)) (setq shift (+ delta shift))) - (goto-char (point-min)) - (message "Pasted at level %d, with shift by %d levels" - new-level shift1))) + (goto-char (point-min)))) + (when (interactive-p) + (message "Clipboard pasted as level %d subtree" new-level)) (if (and kill-ring (eq org-subtree-clip (current-kill 0)) org-subtree-clip-folded) @@ -5641,16 +5841,17 @@ which is OK for `org-paste-subtree'. If optional TXT is given, check this string instead of the current kill." (let* ((kill (or txt (and kill-ring (current-kill 0)) "")) (start-level (and kill - (string-match (concat "\\`" outline-regexp) kill) - (- (match-end 0) (match-beginning 0)))) - (re (concat "^" outline-regexp)) + (string-match (concat "\\`" org-outline-regexp) kill) + (- (match-end 0) (match-beginning 0) 1))) + (re (concat "^" org-outline-regexp)) (start 1)) (if (not start-level) - nil ;; does not even start with a heading + (progn + nil) ;; does not even start with a heading (catch 'exit (while (setq start (string-match re kill (1+ start))) - (if (< (- (match-end 0) (match-beginning 0)) start-level) - (throw 'exit nil))) + (when (< (- (match-end 0) (match-beginning 0) 1) start-level) + (throw 'exit nil))) t)))) (defun org-narrow-to-subtree () @@ -5752,6 +5953,8 @@ WITH-CASE, the sorting considers case as well. With two prefix arguments nentries (if unique (format ", %d duplicates removed" nremoved) "")))) +(defvar org-priority-regexp) ; defined later in the file + (defun org-do-sort (table what &optional with-case sorting-type) "Sort TABLE of WHAT according to SORTING-TYPE. The user will be prompted for the SORTING-TYPE if the call to this @@ -5761,7 +5964,7 @@ the car of the elements of the table. If WITH-CASE is non-nil, the sorting will be case-sensitive." (unless sorting-type (message - "Sort %s: [a]lphabetically [n]umerically [t]ime. A/N/T means reversed:" + "Sort %s: [a]lphabetic. [n]umeric. [t]ime [p]riority. A/N/T/P means reversed:" what) (setq sorting-type (read-char-exclusive))) (let ((dcst (downcase sorting-type)) @@ -5785,6 +5988,13 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive." (org-time-string-to-time (match-string 0 x))) 0)) comparefun (if (= dcst sorting-type) '< '>))) + ((= dcst ?p) + (setq extractfun + (lambda (x) + (if (string-match org-priority-regexp x) + (string-to-char (match-string 2 x)) + org-default-priority)) + comparefun (if (= dcst sorting-type) '< '>))) (t (error "Invalid sorting type `%c'" sorting-type))) (sort (mapcar (lambda (x) (cons (funcall extractfun (car x)) (cdr x))) @@ -6590,7 +6800,12 @@ this heading." (this-buffer (current-buffer)) (org-archive-location org-archive-location) (re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$") - file heading buffer level newfile-p) + (file (abbreviate-file-name (buffer-file-name))) + (time (format-time-string + (substring (cdr org-time-stamp-formats) 1 -1) + (current-time))) + afile heading buffer level newfile-p + category todo priority ltags itags) ;; Try to find a local archive location (save-excursion @@ -6601,21 +6816,32 @@ this heading." (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) (progn - (setq file (format (match-string 1 org-archive-location) + (setq afile (format (match-string 1 org-archive-location) (file-name-nondirectory buffer-file-name)) heading (match-string 2 org-archive-location))) (error "Invalid `org-archive-location'")) - (if (> (length file) 0) - (setq newfile-p (not (file-exists-p file)) - buffer (find-file-noselect file)) + (if (> (length afile) 0) + (setq newfile-p (not (file-exists-p afile)) + buffer (find-file-noselect afile)) (setq buffer (current-buffer))) (unless buffer - (error "Cannot access file \"%s\"" file)) + (error "Cannot access file \"%s\"" afile)) (if (and (> (length heading) 0) (string-match "^\\*+" heading)) (setq level (match-end 0)) (setq heading nil level 0)) (save-excursion + (org-back-to-heading t) + ;; Get context information that will be lost by moving the tree + (setq org-category-table (org-get-category-table) + category (org-get-category) + todo (and (looking-at org-todo-line-regexp) + (match-string 2)) + priority (org-get-priority (if (match-end 3) (match-string 3) "")) + ltags (org-get-tags) + itags (org-delete-all ltags (org-get-tags-at))) + (setq ltags (mapconcat 'identity ltags " ") + itags (mapconcat 'identity itags " ")) ;; We first only copy, in case something goes wrong ;; we need to protect this-command, to avoid kill-region sets it, ;; which would lead to duplication of subtrees @@ -6676,9 +6902,15 @@ this heading." (car (or (member org-archive-mark-done org-done-keywords) org-done-keywords))))) - ;; Move cursor to right after the TODO keyword - (when org-archive-stamp-time - (org-add-planning-info 'archived (org-current-time))) + ;; Add the context info + (when org-archive-save-context-info + (let ((l org-archive-save-context-info) e n v) + (while (setq e (pop l)) + (when (and (setq v (symbol-value e)) + (stringp v) (string-match "\\S-" v)) + (setq n (concat "ARCHIVE_" (upcase (symbol-name e)))) + (org-entry-put (point) n v))))) + ;; Save the buffer, if it is not the same buffer. (if (not (eq this-buffer buffer)) (save-buffer)))) ;; Here we are back in the original buffer. Everything seems to have @@ -6688,7 +6920,7 @@ this heading." (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name file))))))) + (concat "in file: " (abbreviate-file-name afile))))))) (defun org-archive-all-done (&optional tag) "Archive sublevels of the current tree without open TODO items. @@ -6735,7 +6967,8 @@ When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." (defun org-cycle-hide-drawers (state) "Re-hide all drawers after a visibility state change." - (when (not (memq state '(overview folded))) + (when (and (org-mode-p) + (not (memq state '(overview folded)))) (save-excursion (let* ((globalp (memq state '(contents all))) (beg (if globalp (point-min) (point))) @@ -6812,8 +7045,9 @@ If ONOFF is `on' or `off', don't toggle but set to this state." (end-of-line 1) (when current (insert " :" (mapconcat 'identity (nreverse current) ":") ":")) - (org-set-tags nil t)) - res)) + (org-set-tags nil t) + res) + (run-hooks 'org-after-tags-change-hook))) (defun org-toggle-archive-tag (&optional arg) "Toggle the archive tag for the current headline. @@ -8127,7 +8361,7 @@ it can be edited in place." (field (org-table-get-field)) (cw (current-window-configuration)) p) - (switch-to-buffer-other-window "*Org tmp*") + (org-switch-to-buffer-other-window "*Org tmp*") (erase-buffer) (insert "#\n# Edit field and finish with C-c C-c\n#\n") (let ((org-inhibit-startup t)) (org-mode)) @@ -9223,7 +9457,7 @@ Parameters get priority." (field . "# Field Formulas\n") (named . "# Named Field Formulas\n"))) entry s type title) - (switch-to-buffer-other-window "*Edit Formulas*") + (org-switch-to-buffer-other-window "*Edit Formulas*") (erase-buffer) ;; Keep global-font-lock-mode from turning on font-lock-mode (let ((font-lock-global-modes '(not fundamental-mode))) @@ -9578,7 +9812,7 @@ With prefix ARG, apply the new formulas to the table." (if (and (markerp pos) (marker-buffer pos)) (if (get-buffer-window (marker-buffer pos)) (select-window (get-buffer-window (marker-buffer pos))) - (switch-to-buffer-other-window (get-buffer-window + (org-switch-to-buffer-other-window (get-buffer-window (marker-buffer pos))))) (goto-char pos) (org-table-force-dataline) @@ -10768,10 +11002,11 @@ For file links, arg negates `org-context-in-file-links'." (setq cpltxt (substring cpltxt 0 -2))) (setq link (org-make-link cpltxt))) - (buffer-file-name + ((buffer-file-name (buffer-base-buffer)) ;; Just link to this file here. (setq cpltxt (concat "file:" - (abbreviate-file-name buffer-file-name))) + (abbreviate-file-name + (buffer-file-name (buffer-base-buffer))))) ;; Add a context string (when (org-xor org-context-in-file-links arg) (setq txt (if (org-region-active-p) @@ -10797,9 +11032,9 @@ For file links, arg negates `org-context-in-file-links'." (if (and (interactive-p) link) (progn (setq org-stored-links - (cons (list cpltxt link desc) org-stored-links)) - (message "Stored: %s" (or cpltxt link))) - (org-make-link-string link desc)))) + (cons (list link desc) org-stored-links)) + (message "Stored: %s" (or desc link))) + (and link (org-make-link-string link desc))))) (defun org-store-link-props (&rest plist) "Store link properties, extract names and addresses." @@ -10873,6 +11108,8 @@ according to FMT (default from `org-email-link-description-format')." (defun org-make-link-string (link &optional description) "Make a link with brackets, consisting of LINK and DESCRIPTION." + (unless (string-match "\\S-" link) + (error "Empty link")) (when (stringp description) ;; Remove brackets from the description, they are fatal. (while (string-match "\\[\\|\\]" description) @@ -10888,14 +11125,24 @@ according to FMT (default from `org-email-link-description-format')." "]")) (defconst org-link-escape-chars - '((" " . "%20") ("\340" . "%E0") - ("\342" . "%E2") ("\347" . "%E7") - ("\350" . "%E8") ("\351" . "%E9") - ("\352" . "%EA") ("\356" . "%EE") - ("\364" . "%F4") ("\371" . "%F9") - ("\373" . "%FB") (";" . "%3B") - ("?" . "%3F") ("=" . "%3D") - ("+" . "%2B")) + '((" " . "%20") + ("[" . "%5B") + ("]" . "%5d") + ("\340" . "%E0") ; `a + ("\342" . "%E2") ; ^a + ("\347" . "%E7") ; ,c + ("\350" . "%E8") ; `e + ("\351" . "%E9") ; 'e + ("\352" . "%EA") ; ^e + ("\356" . "%EE") ; ^i + ("\364" . "%F4") ; ^o + ("\371" . "%F9") ; `u + ("\373" . "%FB") ; ^u + (";" . "%3B") + ("?" . "%3F") + ("=" . "%3D") + ("+" . "%2B") + ) "Association list of escapes for some characters problematic in links.") (defun org-link-escape (text) @@ -10963,8 +11210,7 @@ according to FMT (default from `org-email-link-description-format')." ;;;###autoload (defun org-insert-link-global () "Insert a link like Org-mode does. -This command can be called in any mode to follow a link that has -Org-mode syntax." +This command can be called in any mode to insert a link in Org-mode syntax." (interactive) (org-run-like-in-org-mode 'org-insert-link)) @@ -11038,7 +11284,10 @@ With three \\[universal-argument] prefixes, negate the meaning of (princ "Insert a link. Use TAB to complete valid link prefixes.\n") (when org-stored-links (princ "\nStored links are available with <up>/<down> (most recent with RET):\n\n") - (princ (mapconcat 'car (reverse org-stored-links) "\n")))) + (princ (mapconcat + (lambda (x) + (if (nth 1 x) (concat (car x) " (" (nth 1 x) ")") (car x))) + (reverse org-stored-links) "\n")))) (let ((cw (selected-window))) (select-window (get-buffer-window "*Org Links*")) (shrink-window-if-larger-than-buffer) @@ -11066,9 +11315,8 @@ With three \\[universal-argument] prefixes, negate the meaning of (not org-keep-stored-link-after-insertion)) (setq org-stored-links (delq (assoc link org-stored-links) org-stored-links))) - (setq link (if entry (nth 1 entry) link) - desc (or region desc (nth 2 entry))))) - + (setq desc (or region desc (nth 1 entry))))) + (if (string-match org-plain-link-re link) ;; URL-like link, normalize the use of angular brackets. (setq link (org-make-link (org-remove-angle-brackets link)))) @@ -11088,6 +11336,7 @@ With three \\[universal-argument] prefixes, negate the meaning of ;; Check if we can/should use a relative path. If yes, simplify the link (when (string-match "\\<file:\\(.*\\)" link) (let* ((path (match-string 1 link)) + (desc-is-link (equal link desc)) (case-fold-search nil)) (cond ((eq org-link-file-path-type 'absolute) @@ -11105,7 +11354,8 @@ With three \\[universal-argument] prefixes, negate the meaning of ;; We are linking a file with relative path name. (setq path (substring (expand-file-name path) (match-end 0))))))) - (setq link (concat "file:" path)))) + (setq link (concat "file:" path)) + (if desc (setq desc link)))) (setq desc (read-string "Description: " desc)) (unless (string-match "\\S-" desc) (setq desc nil)) @@ -11774,12 +12024,13 @@ sequences, it will now work." (string= mh-index-folder (substring folder 0 end-index))) (if (equal major-mode 'mh-show-mode) (save-window-excursion - (when (buffer-live-p (get-buffer folder)) - (progn - (pop-to-buffer folder) - (org-mhe-get-message-folder-from-index) - ) - )) + (let (pop-up-frames) + (when (buffer-live-p (get-buffer folder)) + (progn + (pop-to-buffer folder) + (org-mhe-get-message-folder-from-index) + ) + ))) (org-mhe-get-message-folder-from-index) ) folder @@ -12022,10 +12273,12 @@ conventions in Org-mode. This function returns such a link." (defconst org-remember-help "Select a destination location for the note. UP/DOWN=headline TAB=cycle visibility [Q]uit RET/<left>/<right>=Store -RET at beg-of-buf -> Append to file as level 2 headline RET on headline -> Store as sublevel entry to current headline +RET at beg-of-buf -> Append to file as level 2 headline <left>/<right> -> before/after current headline, same headings level") +(defvar org-remember-previous-location nil) + ;;;###autoload (defun org-remember-apply-template (&optional use-char skip-interactive) "Initialize *remember* buffer with template, invoke `org-mode'. @@ -12055,6 +12308,10 @@ to be run from that hook to fucntion properly." (v-U (concat "[" (substring v-T 1 -1) "]")) (v-i initial) ; defined in `remember-mode' (v-a (if (equal annotation "[[]]") "" annotation)) ; likewise + (v-A (if (and v-a + (string-match "\\[\\(\\[.*?\\]\\)\\(\\[.*?\\]\\)?\\]" v-a)) + (replace-match "[\\1[%^{Link description}]]" nil nil v-a) + v-a)) (v-n user-full-name) (org-startup-folded nil) org-time-was-given org-end-time-was-given x prompt char time) @@ -12065,14 +12322,20 @@ to be run from that hook to fucntion properly." (erase-buffer) (insert (substitute-command-keys (format - "## `C-c C-c' to file interactively, `C-u C-c C-c' to file directly. -## Target file \"%s\", headline \"%s\" +"## Filing location: Select interactively, default, or last used: +## %s to select file and header location interactively. +## %s \"%s\" -> \"* %s\" +## C-u C-u C-c C-c \"%s\" -> \"* %s\" ## To switch templates, use `\\[org-remember]'.\n\n" + (if org-remember-store-without-prompt " C-u C-c C-c" " C-c C-c") + (if org-remember-store-without-prompt " C-c C-c" " C-u C-c C-c") (abbreviate-file-name (or file org-default-notes-file)) - (or headline "")))) + (or headline "") + (or (car org-remember-previous-location) "???") + (or (cdr org-remember-previous-location) "???")))) (insert tpl) (goto-char (point-min)) ;; Simple %-escapes - (while (re-search-forward "%\\([tTuUai]\\)" nil t) + (while (re-search-forward "%\\([tTuUaiA]\\)" nil t) (when (and initial (equal (match-string 0) "%i")) (save-match-data (let* ((lead (buffer-substring @@ -12170,7 +12433,7 @@ find a better place. Then press RET or <left> or <right> in insert the note. Key Cursor position Note gets inserted ----------------------------------------------------------------------------- -RET buffer-start as level 2 heading at end of file +RET buffer-start as level 1 heading at end of file RET on headline as sublevel of the heading at cursor RET no heading at cursor position, level taken from context. Or use prefix arg to specify level manually. @@ -12206,7 +12469,10 @@ See also the variable `org-reverse-note-order'." (org-startup-folded nil) (org-startup-align-all-tables nil) (org-goto-start-pos 1) - spos level indent reversed) + spos exitcmd level indent reversed) + (if (and (equal current-prefix-arg '(16)) org-remember-previous-location) + (setq file (car org-remember-previous-location) + heading (cdr org-remember-previous-location))) (setq current-prefix-arg nil) ;; Modify text so that it becomes a nice subtree which can be inserted ;; into an org tree. @@ -12228,6 +12494,8 @@ See also the variable `org-reverse-note-order'." ;; Find the file (if (not visiting) (find-file-noselect file)) (with-current-buffer (or visiting (get-file-buffer file)) + (unless (org-mode-p) + (error "Target files for remember notes must be in Org-mode")) (save-excursion (save-restriction (widen) @@ -12246,19 +12514,50 @@ See also the variable `org-reverse-note-order'." (setq org-goto-start-pos (match-beginning 0)))) ;; Ask the User for a location - (setq spos (if fastp - org-goto-start-pos - (org-get-location (current-buffer) org-remember-help))) + (if fastp + (setq spos org-goto-start-pos + exitcmd 'return) + (setq spos (org-get-location (current-buffer) org-remember-help) + exitcmd (cdr spos) + spos (car spos))) (if (not spos) (throw 'quit nil)) ; return nil to show we did ; not handle this note (goto-char spos) - (cond ((and (bobp) (not reversed)) + (cond ((org-on-heading-p t) + (org-back-to-heading t) + (setq level (funcall outline-level)) + (cond + ((eq exitcmd 'return) + ;; sublevel of current + (setq org-remember-previous-location + (cons (abbreviate-file-name file) + (org-get-heading 'notags))) + (if reversed + (outline-next-heading) + (org-end-of-subtree) + (if (not (bolp)) + (if (looking-at "[ \t]*\n") + (beginning-of-line 2) + (end-of-line 1) + (insert "\n")))) + (org-paste-subtree (org-get-legal-level level 1) txt)) + ((eq exitcmd 'left) + ;; before current + (org-paste-subtree level txt)) + ((eq exitcmd 'right) + ;; after current + (org-end-of-subtree t) + (org-paste-subtree level txt)) + (t (error "This should not happen")))) + + ((and (bobp) (not reversed)) ;; Put it at the end, one level below level 1 (save-restriction (widen) (goto-char (point-max)) (if (not (bolp)) (newline)) (org-paste-subtree (org-get-legal-level 1 1) txt))) + ((and (bobp) reversed) ;; Put it at the start, as level 1 (save-restriction @@ -12267,16 +12566,6 @@ See also the variable `org-reverse-note-order'." (re-search-forward "^\\*+ " nil t) (beginning-of-line 1) (org-paste-subtree 1 txt))) - ((and (org-on-heading-p t) (not current-prefix-arg)) - ;; Put it below this entry, at the beg/end of the subtree - (org-back-to-heading t) - (setq level (funcall outline-level)) - (if reversed - (outline-next-heading) - (org-end-of-subtree t)) - (if (not (bolp)) (newline)) - (beginning-of-line 1) - (org-paste-subtree (org-get-legal-level level 1) txt)) (t ;; Put it right there, with automatic level determined by ;; org-paste-subtree or from prefix arg @@ -12544,6 +12833,8 @@ At all other locations, this simply calls `ispell-complete-word'." If the last change removed the TODO tag or switched to DONE, then this is nil.") +(defvar org-setting-tags nil) ; dynamically skiped + (defun org-todo (&optional arg) "Change the TODO state of an item. The state of an item is given by a keyword at the start of the heading, @@ -12585,7 +12876,13 @@ For calling through lisp, arg is also interpreted in the following way: (member (member this org-todo-keywords-1)) (tail (cdr member)) (state (cond - ((equal arg '(4)) + ((and org-todo-key-trigger + (or (and (equal arg '(4)) (eq org-use-fast-todo-selection 'prefix)) + (and (not arg) org-use-fast-todo-selection + (not (eq org-use-fast-todo-selection 'prefix))))) + ;; Use fast selection + (org-fast-todo-selection)) + ((and (equal arg '(4)) (eq org-use-fast-todo-selection nil)) ;; Read a state with completion (completing-read "State: " (mapcar (lambda(x) (list x)) org-todo-keywords-1) @@ -12601,6 +12898,8 @@ For calling through lisp, arg is also interpreted in the following way: (nth (- (length org-todo-keywords-1) (length tail) 2) org-todo-keywords-1) (org-last org-todo-keywords-1)))) + ((and (eq org-use-fast-todo-selection t) (equal arg '(4)) + (setq arg nil))) ; hack to fall back to cycling (arg ;; user or caller requests a specific state (cond @@ -12647,22 +12946,30 @@ For calling through lisp, arg is also interpreted in the following way: (setq org-last-todo-state-is-todo (not (member state org-done-keywords))) (when (and org-log-done (not (memq arg '(nextset previousset)))) - (setq dostates (and (eq interpret 'sequence) - (listp org-log-done) (memq 'state org-log-done))) + (setq dostates (and (listp org-log-done) (memq 'state org-log-done) + (or (not org-todo-log-states) + (member state org-todo-log-states)))) + (cond - ((and state (not this)) - ;; FIXME: should we remove CLOSED already then state is nil? + ((and state (member state org-not-done-keywords) + (not (member this org-not-done-keywords))) + ;; This is now a todo state and was not one before + ;; Remove any CLOSED timestamp, and possibly log the state change (org-add-planning-info nil nil 'closed) (and dostates (org-add-log-maybe 'state state 'findpos))) ((and state dostates) + ;; This is a non-nil state, and we need to log it (org-add-log-maybe 'state state 'findpos)) - ((member state org-done-keywords) - ;; Planning info calls the note-setting command. - (org-add-planning-info 'closed (org-current-time) - (if (org-get-repeat) nil 'scheduled)) + ((and (member state org-done-keywords) + (not (member this org-done-keywords))) + ;; It is now done, and it was not done before + ;; FIXME: We used to remove scheduling info.... +; (org-add-planning-info 'closed (org-current-time) +; (if (org-get-repeat) nil 'scheduled)) + (org-add-planning-info 'closed (org-current-time)) (org-add-log-maybe 'done state 'findpos)))) ;; Fixup tag positioning - (and org-auto-align-tags (org-set-tags nil t)) + (and org-auto-align-tags (not org-setting-tags) (org-set-tags nil t)) (run-hooks 'org-after-todo-state-change-hook) (and (member state org-done-keywords) (org-auto-repeat-maybe)) (if (and arg (not (member state org-done-keywords))) @@ -12694,6 +13001,68 @@ right sequence." (car org-todo-keywords-1)) (t (nth 2 (assoc kwd org-todo-kwd-alist)))))) +(defun org-fast-todo-selection () + "Fast TODO keyword selection with single keys. +Returns the new TODO keyword, or nil if no state change should occur." + (let* ((fulltable org-todo-key-alist) + (done-keywords org-done-keywords) ;; needed for the faces. + (maxlen (apply 'max (mapcar + (lambda (x) + (if (stringp (car x)) (string-width (car x)) 0)) + fulltable))) + (buf (current-buffer)) + (expert nil) + (fwidth (+ maxlen 3 1 3)) + (ncol (/ (- (window-width) 4) fwidth)) + tg cnt e c char c1 c2 ntable tbl rtn + groups ingroup) + (save-window-excursion + (if expert + (set-buffer (get-buffer-create " *Org todo*")) +; (delete-other-windows) +; (split-window-vertically) + (org-switch-to-buffer-other-window (get-buffer-create " *Org tags*"))) + (erase-buffer) + (org-set-local 'org-done-keywords done-keywords) + (setq tbl fulltable char ?a cnt 0) + (while (setq e (pop tbl)) + (cond + ((equal e '(:startgroup)) + (push '() groups) (setq ingroup t) + (when (not (= cnt 0)) + (setq cnt 0) + (insert "\n")) + (insert "{ ")) + ((equal e '(:endgroup)) + (setq ingroup nil cnt 0) + (insert "}\n")) + (t + (setq tg (car e) c (cdr e)) + (if ingroup (push tg (car groups))) + (setq tg (org-add-props tg nil 'face + (org-get-todo-face tg))) + (if (and (= cnt 0) (not ingroup)) (insert " ")) + (insert "[" c "] " tg (make-string + (- fwidth 4 (length tg)) ?\ )) + (when (= (setq cnt (1+ cnt)) ncol) + (insert "\n") + (if ingroup (insert " ")) + (setq cnt 0))))) + (insert "\n") + (goto-char (point-min)) + (if (and (not expert) (fboundp 'fit-window-to-buffer)) + (fit-window-to-buffer)) + (message "[a-z..]:Set [SPC]:clear") + (setq c (let ((inhibit-quit t)) (read-char-exclusive))) + (cond + ((or (= c ?\C-g) + (and (= c ?q) (not (rassoc c fulltable)))) + (setq quit-flag t)) + ((= c ?\ ) 'none) + ((setq e (rassoc c fulltable) tg (car e)) + tg) + (t (setq quit-flag t)))))) + (defun org-get-repeat () "Check if tere is a deadline/schedule with repeater in this entry." (save-match-data @@ -12844,8 +13213,7 @@ be removed." (if (not (equal (char-before) ?\ )) " " "") (cond ((eq what 'scheduled) org-scheduled-string) ((eq what 'deadline) org-deadline-string) - ((eq what 'closed) org-closed-string) - ((eq what 'archived) org-archived-string)) + ((eq what 'closed) org-closed-string)) " ") (org-insert-time-stamp time @@ -12881,17 +13249,22 @@ The auto-repeater uses this.") "[^\r\n]*\\)?")) (goto-char (match-end 0)) (unless org-log-states-order-reversed - (if (looking-at "\n[ \t]*- State") (forward-char 1)) - (while (looking-at "[ \t]*- State") - (condition-case nil - (org-next-item) - (error (org-end-of-item)))) + (and (= (char-after) ?\n) (forward-char 1)) + (org-skip-over-state-notes) (skip-chars-backward " \t\n\r"))) (move-marker org-log-note-marker (point)) (setq org-log-note-purpose purpose) (setq org-log-note-state state) (add-hook 'post-command-hook 'org-add-log-note 'append)))) +(defun org-skip-over-state-notes () + "Skip past the list of State notes in an entry." + (if (looking-at "\n[ \t]*- State") (forward-char 1)) + (while (looking-at "[ \t]*- State") + (condition-case nil + (org-next-item) + (error (org-end-of-item))))) + (defun org-add-log-note (&optional purpose) "Pop up a window for taking a note, and add this note later at point." (remove-hook 'post-command-hook 'org-add-log-note) @@ -12900,10 +13273,10 @@ The auto-repeater uses this.") (move-marker org-log-note-return-to (point)) (switch-to-buffer (marker-buffer org-log-note-marker)) (goto-char org-log-note-marker) - (switch-to-buffer-other-window "*Org Note*") + (org-switch-to-buffer-other-window "*Org Note*") (erase-buffer) (let ((org-inhibit-startup t)) (org-mode)) - (insert (format "# Insert note for %s, finish with C-c C-c.\n\n" + (insert (format "# Insert note for %s, finish with C-c C-c, or cancel with C-u C-c C-c.\n\n" (cond ((eq org-log-note-purpose 'clock-out) "stopped clock") ((eq org-log-note-purpose 'done) "closed todo item") @@ -12936,6 +13309,7 @@ The auto-repeater uses this.") ""))))) (if lines (setq note (concat note " \\\\"))) (push note lines)) + (when current-prefix-arg (setq lines nil)) (when lines (save-excursion (set-buffer (marker-buffer org-log-note-marker)) @@ -13095,6 +13469,9 @@ ACTION can be `set', `up', `down', or a character." (setq new action) (message "Priority %c-%c, SPC to remove: " org-highest-priority org-lowest-priority) (setq new (read-char-exclusive))) + (if (and (= (upcase org-highest-priority) org-highest-priority) + (= (upcase org-lowest-priority) org-lowest-priority)) + (setq new (upcase new))) (cond ((equal new ?\ ) (setq remove t)) ((or (< (upcase new) org-highest-priority) (> (upcase new) org-lowest-priority)) (error "Priority must be between `%c' and `%c'" @@ -13104,7 +13481,9 @@ ACTION can be `set', `up', `down', or a character." ((eq action 'down) (setq new (1+ current))) (t (error "Invalid action"))) - (setq new (min (max org-highest-priority (upcase new)) org-lowest-priority)) + (if (or (< (upcase new) org-highest-priority) + (> (upcase new) org-lowest-priority)) + (setq remove t)) (setq news (format "%c" new)) (if have (if remove @@ -13381,7 +13760,9 @@ also TODO lines." With prefix ARG, realign all tags in headings in the current buffer." (interactive "P") (let* ((re (concat "^" outline-regexp)) - (current (org-get-tags)) + (current (org-get-tags-string)) + (col (current-column)) + (org-setting-tags t) table current-tags inherited-tags ; computed below when needed tags p0 c0 c1 rpl) (if arg @@ -13406,7 +13787,9 @@ With prefix ARG, realign all tags in headings in the current buffer." (if (or (eq t org-use-fast-tag-selection) (and org-use-fast-tag-selection (delq nil (mapcar 'cdr table)))) - (org-fast-tag-selection current-tags inherited-tags table) + (org-fast-tag-selection + current-tags inherited-tags table + (if org-fast-tag-selection-include-todo org-todo-key-alist)) (let ((org-add-colon-after-tag-completion t)) (org-trim (completing-read "Tags: " 'org-tags-completion-function @@ -13438,7 +13821,49 @@ With prefix ARG, realign all tags in headings in the current buffer." (replace-match rpl t t) (and (not (featurep 'xemacs)) c0 (tabify p0 (point))) tags) - (t (error "Tags alignment failed")))))) + (t (error "Tags alignment failed"))) + (move-to-column col) + (unless just-align + (run-hooks 'org-after-tags-change-hook))))) + +(defun org-change-tag-in-region (beg end tag off) + "Add or remove TAG for each entry in the region. +This works in the agenda, and also in an org-mode buffer." + (interactive + (list (region-beginning) (region-end) + (let ((org-last-tags-completion-table + (if (org-mode-p) + (org-get-buffer-tags) + (org-global-tags-completion-table)))) + (completing-read + "Tag: " 'org-tags-completion-function nil nil nil + 'org-tags-history)) + (progn + (message "[s]et or [r]emove? ") + (equal (read-char-exclusive) ?r)))) + (if (fboundp 'deactivate-mark) (deactivate-mark)) + (let ((agendap (equal major-mode 'org-agenda-mode)) + l1 l2 m buf pos newhead (cnt 0)) + (goto-char end) + (setq l2 (1- (org-current-line))) + (goto-char beg) + (setq l1 (org-current-line)) + (loop for l from l1 to l2 do + (goto-line l) + (setq m (get-text-property (point) 'org-hd-marker)) + (when (or (and (org-mode-p) (org-on-heading-p)) + (and agendap m)) + (setq buf (if agendap (marker-buffer m) (current-buffer)) + pos (if agendap m (point))) + (with-current-buffer buf + (save-excursion + (save-restriction + (goto-char pos) + (setq cnt (1+ cnt)) + (org-toggle-tag tag (if off 'off 'on)) + (setq newhead (org-get-heading))))) + (and agendap (org-agenda-change-all-lines newhead m)))) + (message "Tag :%s: %s in %d headings" tag (if off "removed" "set") cnt))) (defun org-tags-completion-function (string predicate &optional flag) (let (s1 s2 rtn (ctable org-last-tags-completion-table) @@ -13491,17 +13916,19 @@ With prefix ARG, realign all tags in headings in the current buffer." (put-text-property 0 (length s) 'face '(secondary-selection org-tag) s) (org-overlay-display org-tags-overlay (concat prefix s))))) -(defun org-fast-tag-selection (current inherited table) +(defun org-fast-tag-selection (current inherited table &optional todo-table) "Fast tag selection with single keys. CURRENT is the current list of tags in the headline, INHERITED is the list of inherited tags, and TABLE is an alist of tags and corresponding keys, -possibly with grouping information. +possibly with grouping information. TODO-TABLE is a similar table with +TODO keywords, should these have keys assigned to them. If the keys are nil, a-z are automatically assigned. Returns the new tags string, or nil to not change the current settings." - (let* ((maxlen (apply 'max (mapcar + (let* ((fulltable (append table todo-table)) + (maxlen (apply 'max (mapcar (lambda (x) (if (stringp (car x)) (string-width (car x)) 0)) - table))) + fulltable))) (buf (current-buffer)) (expert (eq org-fast-tag-selection-single-key 'expert)) (buffer-tags nil) @@ -13512,6 +13939,7 @@ Returns the new tags string, or nil to not change the current settings." tg cnt e c char c1 c2 ntable tbl rtn ov-start ov-end ov-prefix (exit-after-next org-fast-tag-selection-single-key) + (done-keywords org-done-keywords) groups ingroup) (save-excursion (beginning-of-line 1) @@ -13535,13 +13963,14 @@ Returns the new tags string, or nil to not change the current settings." (set-buffer (get-buffer-create " *Org tags*")) (delete-other-windows) (split-window-vertically) - (switch-to-buffer-other-window (get-buffer-create " *Org tags*"))) + (org-switch-to-buffer-other-window (get-buffer-create " *Org tags*"))) (erase-buffer) + (org-set-local 'org-done-keywords done-keywords) (org-fast-tag-insert "Inherited" inherited i-face "\n") (org-fast-tag-insert "Current" current c-face "\n\n") (org-fast-tag-show-exit exit-after-next) (org-set-current-tags-overlay current ov-prefix) - (setq tbl table char ?a cnt 0) + (setq tbl fulltable char ?a cnt 0) (while (setq e (pop tbl)) (cond ((equal e '(:startgroup)) @@ -13569,6 +13998,8 @@ Returns the new tags string, or nil to not change the current settings." (if ingroup (push tg (car groups))) (setq tg (org-add-props tg nil 'face (cond + ((not (assoc tg table)) + (org-get-todo-face tg)) ((member tg current) c-face) ((member tg inherited) i-face) (t nil)))) @@ -13605,7 +14036,7 @@ Returns the new tags string, or nil to not change the current settings." (setq expert nil) (delete-other-windows) (split-window-vertically) - (switch-to-buffer-other-window " *Org tags*") + (org-switch-to-buffer-other-window " *Org tags*") (and (fboundp 'fit-window-to-buffer) (fit-window-to-buffer)))) ((or (= c ?\C-g) @@ -13629,6 +14060,10 @@ Returns the new tags string, or nil to not change the current settings." (setq current (delete tg current)) (push tg current))) (if exit-after-next (setq exit-after-next 'now))) + ((setq e (rassoc c todo-table) tg (car e)) + (with-current-buffer buf + (save-excursion (org-todo tg))) + (if exit-after-next (setq exit-after-next 'now))) ((setq e (rassoc c ntable) tg (car e)) (if (member tg current) (setq current (delete tg current)) @@ -13654,19 +14089,20 @@ Returns the new tags string, or nil to not change the current settings." (while (re-search-forward (org-re "\\[.\\] \\([[:alnum:]_@]+\\)") nil t) (setq tg (match-string 1)) - (add-text-properties (match-beginning 1) (match-end 1) - (list 'face - (cond - ((member tg current) c-face) - ((member tg inherited) i-face) - (t nil))))) + (add-text-properties + (match-beginning 1) (match-end 1) + (list 'face + (cond + ((member tg current) c-face) + ((member tg inherited) i-face) + (t (get-text-property (match-beginning 1) 'face)))))) (goto-char (point-min))))) (org-detach-overlay org-tags-overlay) (if rtn (mapconcat 'identity current ":") nil)))) -(defun org-get-tags () +(defun org-get-tags-string () "Get the TAGS string in the current headline." (unless (org-on-heading-p t) (error "Not on a heading")) @@ -13676,6 +14112,10 @@ Returns the new tags string, or nil to not change the current settings." (org-match-string-no-properties 1) ""))) +(defun org-get-tags () + "Get the list of tags specified in the current headline." + (org-split-string (org-get-tags-string) ":")) + (defun org-get-buffer-tags () "Get a table of all tags used in the buffer, for completion." (let (tags) @@ -13733,7 +14173,7 @@ but in some other way.") ;; This is used by C-c C-c for property action. (save-excursion (beginning-of-line 1) - (looking-at "^[ \t]*\\(:\\([a-zA-Z_0-9]+\\):\\)[ \t]*\\(.*\\)"))) + (looking-at (org-re "^[ \t]*\\(:\\([[:alpha:]][[:alnum:]_-]*\\):\\)[ \t]*\\(.*\\)")))) (defmacro org-with-point-at (pom &rest body) "Move to buffer and point of point-or-marker POM for the duration of BODY." @@ -13800,7 +14240,8 @@ If WHICH is nil or `all', get all properties. If WHICH is (push (cons "TODO" (org-match-string-no-properties 2)) props)) (when (looking-at org-priority-regexp) (push (cons "PRIORITY" (org-match-string-no-properties 2)) props)) - (when (and (setq value (org-get-tags)) (string-match "\\S-" value)) + (when (and (setq value (org-get-tags-string)) + (string-match "\\S-" value)) (push (cons "TAGS" value) props)) (when (setq value (org-get-tags-at)) (push (cons "ALLTAGS" (concat ":" (mapconcat 'identity value ":") ":")) @@ -13822,7 +14263,7 @@ If WHICH is nil or `all', get all properties. If WHICH is (when range (goto-char (car range)) (while (re-search-forward - "^[ \t]*:\\([a-zA-Z][a-zA-Z_0-9]*\\):[ \t]*\\(\\S-.*\\)?" + (org-re "^[ \t]*:\\([[:alpha:]][[:alnum:]_-]*\\):[ \t]*\\(\\S-.*\\)?") (cdr range) t) (setq key (org-match-string-no-properties 1) value (org-trim (or (org-match-string-no-properties 2) ""))) @@ -13881,9 +14322,7 @@ If the property is not present at all, nil is returned." (org-back-to-heading t) (move-marker org-entry-property-inherited-from (point)) (throw 'ex tmp)) - (condition-case nil - (org-up-heading-all 1) - (error (throw 'ex nil)))))) + (or (org-up-heading-safe) (throw 'ex nil))))) (or tmp (cdr (assoc property org-local-properties)) (cdr (assoc property org-global-properties))))) @@ -13950,7 +14389,9 @@ If the property is not present at all, nil is returned." (while (re-search-forward org-property-start-re nil t) (setq range (org-get-property-block)) (goto-char (car range)) - (while (re-search-forward "^[ \t]*:\\([a-zA-Z0-9]+\\):" (cdr range) t) + (while (re-search-forward + (org-re "^[ \t]*:\\([[:alnum:]_-]+\\):") + (cdr range) t) (add-to-list 'rtn (org-match-string-no-properties 1))) (outline-next-heading)))) (when include-specials @@ -13970,6 +14411,9 @@ If the property is not present at all, nil is returned." (while (re-search-forward re end t)) (setq hiddenp (org-invisible-p)) (end-of-line 1) + (and (= (char-after) ?\n) (forward-char 1)) + (org-skip-over-state-notes) + (end-of-line 0) (insert "\n:PROPERTIES:\n:END:") (beginning-of-line 0) (org-indent-line-function) @@ -14188,8 +14632,8 @@ This is the compiled version of the format.") (beg (point-at-bol)) (level-face (save-excursion (beginning-of-line 1) - (looking-at "\\(\\**\\)\\(\\* \\)") - (org-get-level-face 2))) + (and (looking-at "\\(\\**\\)\\(\\* \\)") + (org-get-level-face 2)))) (color (list :foreground (face-attribute (or level-face 'default) :foreground))) props pom property ass width f string ov column) @@ -14654,7 +15098,7 @@ display, or in the #+COLUMNS line of the current buffer." (defun org-columns-get-autowidth-alist (s cache) "Derive the maximum column widths from the format and the cache." (let ((start 0) rtn) - (while (string-match "%\\([a-zA-Z]\\S-*\\)" s start) + (while (string-match (org-re "%\\([[:alpha:]]\\S-*\\)") s start) (push (cons (match-string 1 s) 1) rtn) (setq start (match-end 0))) (mapc (lambda (x) @@ -14813,8 +15257,9 @@ display, or in the #+COLUMNS line of the current buffer." "FIXME" (let ((start 0) width prop title op f) (setq org-columns-current-fmt-compiled nil) - (while (string-match "%\\([0-9]+\\)?\\([a-zA-Z_0-9]+\\)\\(?:(\\([^)]+\\))\\)?\\(?:{\\([^}]+\\)}\\)?\\s-*" - fmt start) + (while (string-match + (org-re "%\\([0-9]+\\)?\\([[:alnum:]_-]+\\)\\(?:(\\([^)]+\\))\\)?\\(?:{\\([^}]+\\)}\\)?\\s-*") + fmt start) (setq start (match-end 0) width (match-string 1 fmt) prop (match-string 2 fmt) @@ -15215,10 +15660,25 @@ Don't touch the rest." (defun org-deadline-close (timestamp-string &optional ndays) "Is the time in TIMESTAMP-STRING close to the current date?" - (and (< (org-days-to-time timestamp-string) - (or ndays org-deadline-warning-days)) + (setq ndays (or ndays (org-get-wdays timestamp-string))) + (and (< (org-days-to-time timestamp-string) ndays) (not (org-entry-is-done-p)))) +(defun org-get-wdays (ts) + "Get the deadline lead time appropriate for timestring TS." + (cond + ((<= org-deadline-warning-days 0) + ;; 0 or negative, enforce this value no matter what + (- org-deadline-warning-days)) + ((string-match "-\\([0-9]+\\)\\([dwmy]\\)\\(\\'\\|>\\)" ts) + ;; lead time is specified. + (floor (* (string-to-number (match-string 1 ts)) + (cdr (assoc (match-string 2 ts) + '(("d" . 1) ("w" . 7) + ("m" . 30.4) ("y" . 365.25))))))) + ;; go for the default. + (t org-deadline-warning-days))) + (defun org-calendar-select-mouse (ev) "Return to `org-read-date' with the date currently selected. This is used by `org-read-date' in a temporary keymap for the calendar buffer." @@ -15241,7 +15701,7 @@ days. If the prefix is a raw \\[universal-argument] prefix, all deadlines are s (cond ((equal ndays '(4)) 100000) (ndays (prefix-numeric-value ndays)) - (t org-deadline-warning-days))) + (t (abs org-deadline-warning-days)))) (case-fold-search nil) (regexp (concat "\\<" org-deadline-string " *<\\([^>]+\\)>")) (callback @@ -15343,6 +15803,12 @@ DAYNR." (time-to-days (current-time))) (match-string 0 s))) (t (time-to-days (apply 'encode-time (org-parse-time-string s)))))) +(defun org-time-from-absolute (d) + "Return the time corresponding to date D. +D may be an absolute day number, or a calendar-type list (month day year)." + (if (numberp d) (setq d (calendar-gregorian-from-absolute d))) + (encode-time 0 0 0 (nth 1 d) (car d) (nth 2 d))) + (defun org-calendar-holiday () "List of holidays, for Diary display in Org-mode." (let ((hl (check-calendar-holidays date))) @@ -16290,7 +16756,8 @@ The following commands are available: "--" ("Tags and Properties" ["Show all Tags" org-agenda-show-tags t] - ["Set Tags" org-agenda-set-tags t] + ["Set Tags current line" org-agenda-set-tags (not (org-region-active-p))] + ["Change tag in region" org-agenda-set-tags (org-region-active-p)] "--" ["Column View" org-columns t]) ("Date/Schedule" @@ -16470,7 +16937,7 @@ next use of \\[org-agenda]) restricted to the current file." (setq org-agenda-last-dispatch-buffer (current-buffer)) (save-window-excursion (delete-other-windows) - (switch-to-buffer-other-window " *Agenda Commands*") + (org-switch-to-buffer-other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when-compile (let ((header @@ -16649,7 +17116,7 @@ before running the agenda command." (list 'org-tags-view nil cmd-key))) (flet ((read-char-exclusive () (string-to-char cmd-key))) (eval (list 'let (nreverse pars) '(org-agenda nil))))) - (set-buffer "*Org Agenda*") + (set-buffer org-agenda-buffer-name) (princ (org-encode-for-stdout (buffer-string))))) (defun org-encode-for-stdout (string) @@ -16704,7 +17171,7 @@ agenda-day The day in the agenda where this is listed" (list 'org-tags-view nil cmd-key))) (flet ((read-char-exclusive () (string-to-char cmd-key))) (eval (list 'let (nreverse pars) '(org-agenda nil))))) - (set-buffer "*Org Agenda*") + (set-buffer org-agenda-buffer-name) (let* ((lines (org-split-string (buffer-string) "\n")) line) (while (setq line (pop lines)) @@ -16767,13 +17234,12 @@ agenda-day The day in the agenda where this is listed" (interactive) (eval (list 'org-batch-store-agenda-views))) -(defvar org-agenda-buffer-name) - ;; FIXME, why is this a macro????? ;;;###autoload (defmacro org-batch-store-agenda-views (&rest parameters) "Run all custom agenda commands that have a file argument." (let ((cmds org-agenda-custom-commands) + (pop-up-frames nil) (dir default-directory) pars cmd thiscmdkey files opts) (while parameters @@ -16784,18 +17250,19 @@ agenda-day The day in the agenda where this is listed" (setq cmd (pop cmds) thiscmdkey (car cmd) opts (nth 3 cmd) - files (org-last cmd)) + files (nth 4 cmd)) (if (stringp files) (setq files (list files))) (when files (flet ((read-char-exclusive () (string-to-char thiscmdkey))) (eval (list 'let (append org-agenda-exporter-settings opts pars) '(org-agenda nil)))) - (set-buffer "*Org Agenda*") + (set-buffer org-agenda-buffer-name) (while files (eval (list 'let (append org-agenda-exporter-settings opts pars) (list 'org-write-agenda - (expand-file-name (pop files) dir) t))))) - (kill-buffer org-agenda-buffer-name))))) + (expand-file-name (pop files) dir) t)))) + (and (get-buffer org-agenda-buffer-name) + (kill-buffer org-agenda-buffer-name))))))) (defun org-write-agenda (file &optional nosettings) "Write the current buffer (an agenda view) as a file. @@ -16863,11 +17330,19 @@ higher priority settings." "Get the list of agenda files. Optional UNRESTRICTED means return the full list even if a restriction is currently in place." - (cond - ((and (not unrestricted) (get 'org-agenda-files 'org-restrict))) - ((stringp org-agenda-files) (org-read-agenda-file-list)) - ((listp org-agenda-files) org-agenda-files) - (t (error "Invalid value of `org-agenda-files'")))) + (let ((files + (cond + ((and (not unrestricted) (get 'org-agenda-files 'org-restrict))) + ((stringp org-agenda-files) (org-read-agenda-file-list)) + ((listp org-agenda-files) org-agenda-files) + (t (error "Invalid value of `org-agenda-files'"))))) + (if org-agenda-skip-unavailable-files + (delq nil + (mapcar (function + (lambda (file) + (and (file-readable-p file) file))) + files)) + files))) ; `org-check-agenda-file' will remove them from the list (defun org-edit-agenda-file-list () "Edit the list of agenda files. @@ -16937,7 +17412,8 @@ If the file is not present in the list, it is added to the front. If it is present, it is moved there. With optional argument TO-END, add/move to the end of the list." (interactive "P") - (let ((file-alist (mapcar (lambda (x) + (let ((org-agenda-skip-unavailable-files nil) + (file-alist (mapcar (lambda (x) (cons (file-truename x) x)) (org-agenda-files t))) (ctf (file-truename buffer-file-name)) @@ -16958,7 +17434,8 @@ end of the list." These are the files which are being checked for agenda entries. Optional argument FILE means, use this file instead of the current." (interactive) - (let* ((file (or file buffer-file-name)) + (let* ((org-agenda-skip-unavailable-files nil) + (file (or file buffer-file-name)) (true-file (file-truename file)) (afile (abbreviate-file-name file)) (files (delq nil (mapcar @@ -17020,12 +17497,12 @@ Optional argument FILE means, use this file instead of the current." ((equal org-agenda-window-setup 'current-window) (switch-to-buffer abuf)) ((equal org-agenda-window-setup 'other-window) - (switch-to-buffer-other-window abuf)) + (org-switch-to-buffer-other-window abuf)) ((equal org-agenda-window-setup 'other-frame) (switch-to-buffer-other-frame abuf)) ((equal org-agenda-window-setup 'reorganize-frame) (delete-other-windows) - (switch-to-buffer-other-window abuf)))) + (org-switch-to-buffer-other-window abuf)))) (setq buffer-read-only nil) (erase-buffer) (org-agenda-mode) @@ -17233,7 +17710,7 @@ dates." s e rtn d emptyp) (setq org-agenda-redo-command (list 'progn - (list 'switch-to-buffer-other-window (current-buffer)) + (list 'org-switch-to-buffer-other-window (current-buffer)) (list 'org-timeline (list 'quote include-all)))) (if (not dopast) ;; Remove past dates from the list of dates. @@ -17266,14 +17743,12 @@ dates." entry date args))) (if (or rtn (equal d today) org-timeline-show-empty-dates) (progn - (insert (calendar-day-name date) " " - (number-to-string (extract-calendar-day date)) " " - (calendar-month-name (extract-calendar-month date)) " " - (number-to-string (extract-calendar-year date)) "\n") -; FIXME: this gives a timezone problem -; (insert (format-time-string org-agenda-date-format -; (calendar-time-from-absolute d 0)) -; "\n") + (insert + (if (stringp org-agenda-format-date) + (format-time-string org-agenda-format-date + (org-time-from-absolute date)) + (funcall org-agenda-format-date date)) + "\n") (put-text-property s (1- (point)) 'face 'org-agenda-structure) (put-text-property s (1- (point)) 'org-date-line t) (if (equal d today) @@ -17336,7 +17811,7 @@ When EMPTY is non-nil, also include days without any entries." (defvar org-starting-day nil) ; local variable in the agenda buffer (defvar org-agenda-span nil) ; local variable in the agenda buffer (defvar org-include-all-loc nil) ; local variable - +(defvar org-agenda-remove-date nil) ; dynamically scoped ;;;###autoload (defun org-agenda-list (&optional include-all start-day ndays) @@ -17446,14 +17921,12 @@ NDAYS defaults to `org-agenda-ndays'." (setq rtnall (append rtnall rtn)))) (if (or rtnall org-agenda-show-all-dates) (progn - (insert (format "%-9s %2d %s %4d\n" - (calendar-day-name date) - (extract-calendar-day date) - (calendar-month-name (extract-calendar-month date)) - (extract-calendar-year date))) -; FIXME: this gives a timezone problem -; (insert (format-time-string org-agenda-date-format -; (calendar-time-from-absolute d 0)) "\n") + (insert + (if (stringp org-agenda-format-date) + (format-time-string org-agenda-format-date + (org-time-from-absolute date)) + (funcall org-agenda-format-date date)) + "\n") (put-text-property s (1- (point)) 'face 'org-agenda-structure) (put-text-property s (1- (point)) 'org-date-line t) (if todayp (put-text-property s (1- (point)) 'org-today t)) @@ -17688,10 +18161,10 @@ that can be put into `org-agenda-skip-function' for the duration of a command." (not (re-search-forward org-deadline-time-regexp end t))) (and (setq m (memq 'regexp conditions)) (stringp (setq r (nth 1 m))) - (re-search-forward m end t)) + (re-search-forward (nth 1 m) end t)) (and (setq m (memq 'notregexp conditions)) (stringp (setq r (nth 1 m))) - (not (re-search-forward m end t)))) + (not (re-search-forward (nth 1 m) end t)))) end))) (defun org-agenda-list-stuck-projects (&rest ignore) @@ -17748,6 +18221,7 @@ MATCH is being ignored." "Get the (Emacs Calendar) diary entries for DATE." (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*") (diary-display-hook '(fancy-diary-display)) + (pop-up-frames nil) (list-diary-entries-hook (cons 'org-diary-default-entry list-diary-entries-hook)) (diary-file-name-prefix-function nil) ; turn this feature off @@ -18018,7 +18492,7 @@ the documentation of `org-diary'." (and org-agenda-todo-ignore-deadlines (goto-char beg) (re-search-forward org-deadline-time-regexp end t) (org-deadline-close (match-string 1)))) - (goto-char beg) + (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible)) (throw :skip nil))) (goto-char beg) @@ -18053,6 +18527,13 @@ the documentation of `org-diary'." (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name buffer-file-name)))) (d1 (calendar-absolute-from-gregorian date)) + (remove-re + (concat + (regexp-quote + (format-time-string + "<%Y-%m-%d" + (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date)))) + ".*?>")) (regexp (concat (regexp-quote @@ -18100,7 +18581,8 @@ the documentation of `org-diary'." tags (org-get-tags-at)) (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") (setq txt (org-format-agenda-item - nil (match-string 1) category tags timestr))) + nil (match-string 1) category tags timestr nil + remove-re))) (setq txt org-agenda-no-heading-message)) (setq priority (org-get-priority txt)) (org-add-props txt props @@ -18220,7 +18702,7 @@ the documentation of `org-diary'." (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar d2 diff dfrac wdays pos pos1 category tags - ee txt head face s upcomingp) + ee txt head face s upcomingp donep timestr) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip @@ -18228,17 +18710,10 @@ the documentation of `org-diary'." (setq s (match-string 1) pos (1- (match-beginning 1)) d2 (org-time-string-to-absolute (match-string 1) d1) - diff (- d2 d1)) - (if (string-match "-\\([0-9]+\\)\\([dwmy]\\)\\'" s) - (setq wdays - (floor - (* (string-to-number (match-string 1 s)) - (cdr (assoc (match-string 2 s) - '(("d" . 1) ("w" . 7) - ("m" . 30.4) ("y" . 365.25))))))) - (setq wdays org-deadline-warning-days)) - (setq dfrac (/ (* 1.0 (- wdays diff)) wdays)) - (setq upcomingp (and todayp (> diff 0))) + diff (- d2 d1) + wdays (org-get-wdays s) + dfrac (/ (* 1.0 (- wdays diff)) wdays) + upcomingp (and todayp (> diff 0))) ;; When to show a deadline in the calendar: ;; If the expiration is within wdays warning time. ;; Past-due deadlines are only shown on the current date @@ -18255,14 +18730,20 @@ the documentation of `org-diary'." (point) (progn (skip-chars-forward "^\r\n") (point)))) - (if (and org-agenda-skip-deadline-if-done - (string-match org-looking-at-done-regexp head)) + (setq donep (string-match org-looking-at-done-regexp head)) + (if (string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s) + (setq timestr + (concat (substring s (match-beginning 1)) " ")) + (setq timestr 'time)) + (if (and donep + (or org-agenda-skip-deadline-if-done + (not (= diff 0)))) (setq txt nil) (setq txt (org-format-agenda-item (if (= diff 0) "Deadline: " (format "In %3d d.: " diff)) - head category tags)))) + head category tags timestr)))) (setq txt org-agenda-no-heading-message)) (when txt (setq face (org-agenda-deadline-face dfrac)) @@ -18274,9 +18755,10 @@ the documentation of `org-diary'." 'org-category category 'type (if upcomingp "upcoming-deadline" "deadline") 'date (if upcomingp date d2) - 'face face 'undone-face face 'done-face 'org-done) + 'face (if donep 'org-done face) + 'undone-face face 'done-face 'org-done) (push txt ee)))))) - ee)) + (nreverse ee))) (defun org-agenda-deadline-face (fraction) "Return the face to displaying a deadline item. @@ -18300,15 +18782,16 @@ FRACTION is what fraction of the head-warning time has passed." (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar d2 diff pos pos1 category tags - ee txt head pastduep donep face) + ee txt head pastschedp donep face timestr s) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip (org-agenda-skip) - (setq pos (1- (match-beginning 1)) + (setq s (match-string 1) + pos (1- (match-beginning 1)) d2 (org-time-string-to-absolute (match-string 1) d1) diff (- d2 d1)) - (setq pastduep (and todayp (< diff 0))) + (setq pastschedp (and todayp (< diff 0))) ;; When to show a scheduled item in the calendar: ;; If it is on or past the date. (if (or (and (< diff 0) todayp) @@ -18324,16 +18807,22 @@ FRACTION is what fraction of the head-warning time has passed." (point) (progn (skip-chars-forward "^\r\n") (point)))) (setq donep (string-match org-looking-at-done-regexp head)) - (if (and org-agenda-skip-scheduled-if-done donep) + (if (string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s) + (setq timestr + (concat (substring s (match-beginning 1)) " ")) + (setq timestr 'time)) + (if (and donep + (or org-agenda-skip-scheduled-if-done + (not (= diff 0)))) (setq txt nil) (setq txt (org-format-agenda-item (if (= diff 0) "Scheduled: " (format "Sched.%2dx: " (- 1 diff))) - head category tags)))) + head category tags timestr)))) (setq txt org-agenda-no-heading-message)) (when txt - (setq face (if pastduep + (setq face (if pastschedp 'org-scheduled-previously 'org-scheduled-today)) (org-add-props txt props @@ -18341,12 +18830,12 @@ FRACTION is what fraction of the head-warning time has passed." 'face (if donep 'org-done face) 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) - 'type (if pastduep "past-scheduled" "scheduled") - 'date (if pastduep d2 date) + 'type (if pastschedp "past-scheduled" "scheduled") + 'date (if pastschedp d2 date) 'priority (+ (- 5 diff) (org-get-priority txt)) 'org-category category) (push txt ee)))))) - ee)) + (nreverse ee))) (defun org-agenda-get-blocks () "Return the date-range information for agenda display." @@ -18436,7 +18925,7 @@ The flag is set if the currently compiled format contains a `%t'.") The flag is set if the currently compiled format contains a `%T'.") (defun org-format-agenda-item (extra txt &optional category tags dotime - noprefix) + noprefix remove-re) "Format TXT to be inserted into the agenda buffer. In particular, it adds the prefix and corresponding text properties. EXTRA must be a string and replaces the `%s' specifier in the prefix format. @@ -18447,7 +18936,8 @@ time-of-day should be extracted from TXT for sorting of this entry, and for the `%t' specifier in the format. When DOTIME is a string, this string is searched for a time before TXT is. NOPREFIX is a flag and indicates that only the correctly processes TXT should be returned - this is used by -`org-agenda-change-all-lines'. TAGS can be the tags of the headline." +`org-agenda-change-all-lines'. TAGS can be the tags of the headline. +Any match of REMOVE-RE will be removed from TXT." (save-match-data ;; Diary entries sometimes have extra whitespace at the beginning (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt))) @@ -18505,6 +18995,10 @@ only the correctly processes TXT should be returned - this is used by (match-string 2 txt)) t t txt)))) + (when remove-re + (while (string-match remove-re txt) + (setq txt (replace-match "" t t txt)))) + ;; Create the final string (if noprefix (setq rtn txt) @@ -18646,16 +19140,18 @@ HH:MM." (if (eq x 'line) (save-excursion (beginning-of-line 1) - (setq re (get-text-property (point) 'org-not-done-regexp)) + (setq re (get-text-property (point) 'org-todo-regexp)) (goto-char (+ (point) (or (get-text-property (point) 'prefix-length) 0))) (and (looking-at (concat "[ \t]*\\.*" re)) (add-text-properties (match-beginning 0) (match-end 0) - '(face org-todo)))) - (setq re (concat (get-text-property 0 'org-not-done-regexp x)) + (list 'face (org-get-todo-face 0))))) + (setq re (concat (get-text-property 0 'org-todo-regexp x)) pl (get-text-property 0 'prefix-length x)) (and re (equal (string-match (concat "\\(\\.*\\)" re) x (or pl 0)) pl) - (add-text-properties (or (match-end 1) (match-end 0)) (match-end 0) - '(face org-todo) x)) + (add-text-properties + (or (match-end 1) (match-end 0)) (match-end 0) + (list 'face (org-get-todo-face (match-string 2 x))) + x)) x))) (defsubst org-cmp-priority (a b) @@ -19032,8 +19528,13 @@ and by additional input from the age of a schedules or deadline entry." (save-excursion (and (outline-next-heading) (org-flag-heading nil)))) ; show the next heading + (run-hooks 'org-agenda-after-show-hook) (and highlight (org-highlight (point-at-bol) (point-at-eol))))) +(defvar org-agenda-after-show-hook nil + "Normal hook run after an item has been shown from the agenda. +Point is in the buffer where the item originated.") + (defun org-agenda-kill () "Kill the entry or subtree belonging to the current agenda entry." (interactive) @@ -19050,7 +19551,7 @@ and by additional input from the age of a schedules or deadline entry." (goto-char pos) (if (and (org-mode-p) (not (member type '("sexp")))) (setq dbeg (progn (org-back-to-heading t) (point)) - dend (org-end-of-subtree t)) + dend (org-end-of-subtree t t)) (setq dbeg (point-at-bol) dend (min (point-max) (1+ (point-at-eol))))) (goto-char dbeg) @@ -19342,7 +19843,7 @@ POS defaults to point. If tags are inherited, the list contains the targets in the same sequence as the headlines appear, i.e. the tags of the current headline come last." (interactive) - (let (tags) + (let (tags lastpos) (save-excursion (save-restriction (widen) @@ -19350,7 +19851,8 @@ the tags of the current headline come last." (save-match-data (org-back-to-heading t) (condition-case nil - (while t + (while (not (equal lastpos (point))) + (setq lastpos (point)) (if (looking-at (org-re "[^\r\n]+?:\\([[:alnum:]_@:]+\\):[ \t]*$")) (setq tags (append (org-split-string (org-match-string-no-properties 1) ":") @@ -19365,28 +19867,30 @@ the tags of the current headline come last." "Set tags for the current headline." (interactive) (org-agenda-check-no-diary) - (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed - (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker) - (org-agenda-error))) - (buffer (marker-buffer hdmarker)) - (pos (marker-position hdmarker)) - (inhibit-read-only t) - newhead) - (org-with-remote-undo buffer - (with-current-buffer buffer - (widen) - (goto-char pos) - (save-excursion - (org-show-context 'agenda)) - (save-excursion - (and (outline-next-heading) - (org-flag-heading nil))) ; show the next heading - (goto-char pos) - (call-interactively 'org-set-tags) - (end-of-line 1) - (setq newhead (org-get-heading))) - (org-agenda-change-all-lines newhead hdmarker) - (beginning-of-line 1)))) + (if (and (org-region-active-p) (interactive-p)) + (call-interactively 'org-change-tag-in-region) + (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed + (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker) + (org-agenda-error))) + (buffer (marker-buffer hdmarker)) + (pos (marker-position hdmarker)) + (inhibit-read-only t) + newhead) + (org-with-remote-undo buffer + (with-current-buffer buffer + (widen) + (goto-char pos) + (save-excursion + (org-show-context 'agenda)) + (save-excursion + (and (outline-next-heading) + (org-flag-heading nil))) ; show the next heading + (goto-char pos) + (call-interactively 'org-set-tags) + (end-of-line 1) + (setq newhead (org-get-heading))) + (org-agenda-change-all-lines newhead hdmarker) + (beginning-of-line 1))))) (defun org-agenda-toggle-archive-tag () "Toggle the archive tag for the current entry." @@ -19518,11 +20022,15 @@ be used to request time specification in the time stamp." (setq ts (org-deadline)) (message "Deadline for this item set to %s" ts))))) -(defun org-get-heading () +(defun org-get-heading (&optional no-tags) "Return the heading of the current entry, without the stars." (save-excursion (org-back-to-heading t) - (if (looking-at "\\*+[ \t]+\\([^\r\n]*\\)") (match-string 1) ""))) + (if (looking-at + (if no-tags + (org-re "\\*+[ \t]+\\([^\n\r]*?\\)\\([ \t]+:[[:alnum:]:_@]+:[ \t]*\\)?$") + "\\*+[ \t]+\\([^\r\n]*\\)")) + (match-string 1) ""))) (defun org-agenda-clock-in (&optional arg) "Start the clock on the currently selected item." @@ -19681,6 +20189,7 @@ This is a command that has to be installed in `calendar-mode-map'." "Hebrew: " (calendar-hebrew-date-string date) " (until sunset)\n" "Islamic: " (calendar-islamic-date-string date) " (until sunset)\n" "French: " (calendar-french-date-string date) "\n" + "Baha'i: " (calendar-bahai-date-string date) " (until sunset)\n" "Mayan: " (calendar-mayan-date-string date) "\n" "Coptic: " (calendar-coptic-date-string date) "\n" "Ethiopic: " (calendar-ethiopic-date-string date) "\n" @@ -20055,7 +20564,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (save-excursion (goto-char 0) (let ((re (org-make-options-regexp - '("TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE"))) + '("TITLE" "AUTHOR" "DATE" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE"))) p key val text options) (while (re-search-forward re nil t) (setq key (org-match-string-no-properties 1) @@ -20064,6 +20573,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." ((string-equal key "TITLE") (setq p (plist-put p :title val))) ((string-equal key "AUTHOR")(setq p (plist-put p :author val))) ((string-equal key "EMAIL") (setq p (plist-put p :email val))) + ((string-equal key "DATE") (setq p (plist-put p :date val))) ((string-equal key "LANGUAGE") (setq p (plist-put p :language val))) ((string-equal key "TEXT") (setq text (if text (concat text "\n" val) val))) @@ -20501,6 +21011,7 @@ translations. There is currently no way for users to extend this.") (asciip (plist-get parameters :for-ascii)) (latexp (plist-get parameters :for-LaTeX)) (commentsp (plist-get parameters :comments)) + (archived-trees (plist-get parameters :archived-trees)) (inhibit-read-only t) (outline-regexp "\\*+ ") a b xx @@ -20528,13 +21039,13 @@ translations. There is currently no way for users to extend this.") (insert (plist-get parameters :add-text) "\n")) ;; Get rid of archived trees - (when (not (eq org-export-with-archived-trees t)) + (when (not (eq archived-trees t)) (goto-char (point-min)) (while (re-search-forward re-archive nil t) (if (not (org-on-heading-p t)) (org-end-of-subtree t) (beginning-of-line 1) - (setq a (if org-export-with-archived-trees + (setq a (if archived-trees (1+ (point-at-eol)) (point)) b (org-end-of-subtree t)) (if (> b a) (delete-region a b))))) @@ -20581,7 +21092,7 @@ translations. There is currently no way for users to extend this.") '(org-protected t)) (delete-region (match-beginning 0) (match-end 0)))))) - ;; Protect quoted subtreedes + ;; Protect quoted subtrees (goto-char (point-min)) (while (re-search-forward re-quote nil t) (goto-char (match-beginning 0)) @@ -20607,14 +21118,23 @@ translations. There is currently no way for users to extend this.") (point-at-eol)) (end-of-line 1)))) - ;; Specific LaTeX cleaning + ;; Specific LaTeX stuff (when latexp - (require 'org-export-latex nil t) + (require 'org-export-latex nil) (org-export-latex-cleaned-string)) + ;; Specific HTML stuff + (when htmlp + ;; Convert LaTeX fragments to images + (when (plist-get parameters :LaTeX-fragments) + (org-format-latex + (concat "ltxpng/" (file-name-sans-extension + (file-name-nondirectory + org-current-export-file))) + org-current-export-dir nil "Creating LaTeX image %s")) + (message "Exporting...")) + ;; Remove or replace comments - ;; If :comments is set, use this char for commenting out comments and - ;; protect them. otherwise delete them (goto-char (point-min)) (while (re-search-forward "^#\\(.*\n?\\)" nil t) (if commentsp @@ -20637,14 +21157,6 @@ translations. There is currently no way for users to extend this.") (replace-match "\\1 \\3") (goto-char (match-beginning 0)))) - ;; Convert LaTeX fragments to images - (when (plist-get parameters :LaTeX-fragments) - (org-format-latex - (concat "ltxpng/" (file-name-sans-extension - (file-name-nondirectory - org-current-export-file))) - org-current-export-dir nil "Creating LaTeX image %s")) - (message "Exporting...") ;; Normalize links: Convert angle and plain links into bracket links ;; Expand link abbreviations @@ -20708,6 +21220,22 @@ translations. There is currently no way for users to extend this.") ;; Return the title string (org-trim (match-string 0))))))) +(defun org-export-get-title-from-subtree () + "Return subtree title and exclude it from export." + (let (title (m (mark))) + (save-excursion + (goto-char (region-beginning)) + (when (and (org-at-heading-p) + (>= (org-end-of-subtree t t) (region-end))) + ;; This is a subtree, we take the title from the first heading + (goto-char (region-beginning)) + (looking-at org-todo-line-regexp) + (setq title (match-string 3)) + (org-unmodified + (add-text-properties (point) (1+ (point-at-eol)) + (list :org-license-to-kill t))))) + title)) + (defun org-solidify-link-text (s &optional alist) "Take link text and make a safe target out of it." (save-match-data @@ -20718,6 +21246,15 @@ translations. There is currently no way for users to extend this.") (a (assoc rtn alist))) (or (cdr a) rtn)))) +(defun org-get-min-level (lines) + "Get the minimum level in LINES." + (let ((re "^\\(\\*+\\) ") l min) + (catch 'exit + (while (setq l (pop lines)) + (if (string-match re l) + (throw 'exit (org-tr-level (length (match-string 1 l)))))) + 1))) + ;; Variable holding the vector with section numbers (defvar org-section-numbers (make-vector org-level-max 0)) @@ -20767,6 +21304,7 @@ When LEVEL is non-nil, increase section numbers on that level." ;;; ASCII export (defvar org-last-level nil) ; dynamically scoped variable +(defvar org-min-level nil) ; dynamically scoped variable (defvar org-levels-open nil) ; dynamically scoped parameter (defvar org-ascii-current-indentation nil) ; For communication @@ -20779,6 +21317,13 @@ underlined headlines. The default is 3." (setq-default org-todo-line-regexp org-todo-line-regexp) (let* ((opt-plist (org-combine-plists (org-default-export-plist) (org-infile-export-plist))) + (region-p (org-region-active-p)) + (subtree-p + (when region-p + (save-excursion + (goto-char (region-beginning)) + (and (org-at-heading-p) + (>= (org-end-of-subtree t t) (region-end)))))) (custom-times org-display-custom-times) (org-ascii-current-indentation '(0 . 0)) (level 0) line txt @@ -20788,7 +21333,10 @@ underlined headlines. The default is 3." (filename (concat (file-name-as-directory (org-export-directory :ascii opt-plist)) (file-name-sans-extension - (file-name-nondirectory buffer-file-name)) + (or (and subtree-p + (org-entry-get (region-beginning) + "EXPORT_FILE_NAME" t)) + (file-name-nondirectory buffer-file-name))) ".txt")) (filename (if (equal (file-truename filename) (file-truename buffer-file-name)) @@ -20797,10 +21345,10 @@ underlined headlines. The default is 3." (buffer (find-file-noselect filename)) (org-levels-open (make-vector org-level-max nil)) (odd org-odd-levels-only) - (date (format-time-string "%Y/%m/%d" (current-time))) - (time (format-time-string "%X" (org-current-time))) + (date (plist-get opt-plist :date)) (author (plist-get opt-plist :author)) - (title (or (plist-get opt-plist :title) + (title (or (and subtree-p (org-export-get-title-from-subtree)) + (plist-get opt-plist :title) (and (not (plist-get opt-plist :skip-before-1st-heading)) (org-export-grab-title-from-buffer)) @@ -20822,6 +21370,8 @@ underlined headlines. The default is 3." :for-ascii t :skip-before-1st-heading (plist-get opt-plist :skip-before-1st-heading) + :archived-trees + (plist-get opt-plist :archived-trees) :add-text (plist-get opt-plist :text)) "[\r\n]")) ;; FIXME: why \r here???/ thetoc have-headings first-heading-pos @@ -20832,7 +21382,8 @@ underlined headlines. The default is 3." (remove-text-properties (point-min) (point-max) '(:org-license-to-kill t)))) - (setq org-last-level 1) + (setq org-min-level (org-get-min-level lines)) + (setq org-last-level org-min-level) (org-init-section-numbers) (find-file-noselect filename) @@ -20863,8 +21414,15 @@ underlined headlines. The default is 3." (insert (concat (nth 1 lang-words) ": " (or author "") (if email (concat " <" email ">") "") "\n"))) - (if (and date time org-export-time-stamp-file) - (insert (concat (nth 2 lang-words) ": " date " " time "\n"))) + + (cond + ((and date (string-match "%" date)) + (setq date (format-time-string date (current-time)))) + (date) + (t (setq date (format-time-string "%Y/%m/%d %X" (current-time))))) + + (if (and date org-export-time-stamp-file) + (insert (concat (nth 2 lang-words) ": " date"\n"))) (insert "\n\n") @@ -20908,7 +21466,8 @@ underlined headlines. The default is 3." (progn (push (concat - (make-string (* (1- level) 4) ?\ ) + (make-string + (* (max 0 (- level org-min-level)) 4) ?\ ) (format (if todo "%s (*)\n" "%s\n") txt)) thetoc) (setq org-last-level level)) @@ -21084,6 +21643,12 @@ command." (file buffer-file-name) (buffer (get-buffer-create "*Org Export Visible*")) s e) + ;; Need to hack the drawers here. + (save-excursion + (goto-char (point-min)) + (while (re-search-forward org-drawer-regexp nil t) + (goto-char (match-beginning 1)) + (or (org-invisible-p) (org-flag-drawer nil)))) (with-current-buffer buffer (erase-buffer)) (save-excursion (setq s (goto-char (point-min))) @@ -21091,6 +21656,7 @@ command." (goto-char (org-find-invisible)) (append-to-buffer buffer s (point)) (setq s (goto-char (org-find-visible)))) + (org-cycle-hide-drawers 'all) (goto-char (point-min)) (unless keepp ;; Copy all comment lines to the end, to make sure #+ settings are @@ -21267,7 +21833,7 @@ This can be used in any buffer. For example, you could write an itemized list in org-mode syntax in an HTML buffer and then use this command to convert it." (interactive "r") - (let (reg html buf) + (let (reg html buf pop-up-frames) (save-window-excursion (if (org-mode-p) (setq html (org-export-region-as-html @@ -21354,6 +21920,12 @@ the body tags themselves." valid thetoc have-headings first-heading-pos (odd org-odd-levels-only) (region-p (org-region-active-p)) + (subtree-p + (when region-p + (save-excursion + (goto-char (region-beginning)) + (and (org-at-heading-p) + (>= (org-end-of-subtree t t) (region-end)))))) ;; The following two are dynamically scoped into other ;; routines below. (org-current-export-dir (org-export-directory :html opt-plist)) @@ -21365,7 +21937,10 @@ the body tags themselves." (concat (file-name-as-directory (org-export-directory :html opt-plist)) (file-name-sans-extension - (file-name-nondirectory buffer-file-name)) + (or (and subtree-p + (org-entry-get (region-beginning) + "EXPORT_FILE_NAME" t)) + (file-name-nondirectory buffer-file-name))) ".html"))) (current-dir (if buffer-file-name (file-name-directory buffer-file-name) @@ -21376,10 +21951,10 @@ the body tags themselves." (t (get-buffer-create to-buffer))) (find-file-noselect filename))) (org-levels-open (make-vector org-level-max nil)) - (date (format-time-string "%Y/%m/%d" (current-time))) - (time (format-time-string "%X" (org-current-time))) + (date (plist-get opt-plist :date)) (author (plist-get opt-plist :author)) - (title (or (plist-get opt-plist :title) + (title (or (and subtree-p (org-export-get-title-from-subtree)) + (plist-get opt-plist :title) (and (not (plist-get opt-plist :skip-before-1st-heading)) (org-export-grab-title-from-buffer)) @@ -21423,6 +21998,8 @@ the body tags themselves." :for-html t :skip-before-1st-heading (plist-get opt-plist :skip-before-1st-heading) + :archived-trees + (plist-get opt-plist :archived-trees) :add-text (plist-get opt-plist :text) :LaTeX-fragments @@ -21441,9 +22018,16 @@ the body tags themselves." (message "Exporting...") - (setq org-last-level 1) + (setq org-min-level (org-get-min-level lines)) + (setq org-last-level org-min-level) (org-init-section-numbers) + (cond + ((and date (string-match "%" date)) + (setq date (format-time-string date (current-time)))) + (date) + (t (setq date (format-time-string "%Y/%m/%d %X" (current-time))))) + ;; Get the language-dependent settings (setq lang-words (or (assoc language org-export-language-setup) (assoc "en" org-export-language-setup))) @@ -21480,13 +22064,13 @@ lang=\"%s\" xml:lang=\"%s\"> <title>%s</title> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"/> <meta name=\"generator\" content=\"Org-mode\"/> -<meta name=\"generated\" content=\"%s %s\"/> +<meta name=\"generated\" content=\"%s\"/> <meta name=\"author\" content=\"%s\"/> %s </head><body> " language language (org-html-expand title) - (or charset "iso-8859-1") date time author style)) + (or charset "iso-8859-1") date author style)) (insert (or (plist-get opt-plist :preamble) "")) @@ -21572,7 +22156,7 @@ lang=\"%s\" xml:lang=\"%s\"> ))) line) lines)) - (while (> org-last-level 0) + (while (> org-last-level (1- org-min-level)) (setq org-last-level (1- org-last-level)) (push "</li>\n</ul>\n" thetoc)) (setq thetoc (if have-headings (nreverse thetoc) nil)))) @@ -21901,10 +22485,10 @@ lang=\"%s\" xml:lang=\"%s\"> (insert "<a href=\"mailto:" email "\"><" email "></a>\n")) (insert "</p>\n")) - (when (and date time org-export-time-stamp-file) + (when (and date org-export-time-stamp-file) (insert "<p class=\"date\"> " (nth 2 lang-words) ": " - date " " time "</p>\n"))) + date "</p>\n"))) (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) @@ -23132,7 +23716,9 @@ Calls `org-timestamp-up' or `org-priority-up', or `org-previous-item', depending on context. See the individual commands for more information." (interactive "P") (cond - ((org-at-timestamp-p t) (call-interactively 'org-timestamp-up)) + ((org-at-timestamp-p t) + (call-interactively (if org-edit-timestamp-down-means-later + 'org-timestamp-down 'org-timestamp-up))) ((org-on-heading-p) (call-interactively 'org-priority-up)) ((org-at-item-p) (call-interactively 'org-previous-item)) (t (call-interactively 'org-beginning-of-item) (beginning-of-line 1)))) @@ -23143,7 +23729,9 @@ Calls `org-timestamp-down' or `org-priority-down', or `org-next-item' depending on context. See the individual commands for more information." (interactive "P") (cond - ((org-at-timestamp-p t) (call-interactively 'org-timestamp-down)) + ((org-at-timestamp-p t) + (call-interactively (if org-edit-timestamp-down-means-later + 'org-timestamp-up 'org-timestamp-down))) ((org-on-heading-p) (call-interactively 'org-priority-down)) (t (call-interactively 'org-next-item)))) @@ -23410,11 +23998,7 @@ See the individual commands for more information." ["Next Same Level" outline-forward-same-level t] ["Previous Same Level" outline-backward-same-level t] "--" - ["Jump" org-goto t] - "--" - ["C-a/e find headline/item start/end" - (setq org-special-ctrl-a/e (not org-special-ctrl-a/e)) - :style toggle :selected org-special-ctrl-a/e]) + ["Jump" org-goto t]) ("Edit Structure" ["Move Subtree Up" org-shiftmetaup (not (org-at-table-p))] ["Move Subtree Down" org-shiftmetadown (not (org-at-table-p))] @@ -23470,6 +24054,7 @@ See the individual commands for more information." ["Priority Down" org-shiftdown t]) ("TAGS and Properties" ["Set Tags" 'org-ctrl-c-ctrl-c (org-at-heading-p)] + ["Change tag in region" 'org-change-tag-in-region (org-region-active-p)] ;FIXME ["Column view of properties" org-columns t]) ("Dates and Scheduling" ["Timestamp" org-time-stamp t] @@ -23757,6 +24342,13 @@ return nil." (list context (match-beginning group) (match-end group)) t))) +(defun org-switch-to-buffer-other-window (&rest args) + "Switch to buffer in a second window on the current frame. +In particular, do not allow pop-up frames." + (let (pop-up-frames special-display-buffer-names special-display-regexps + special-display-function) + (apply 'switch-to-buffer-other-window args))) + (defun org-combine-plists (&rest plists) "Create a single property list from all plists in PLISTS. The process starts by copying the first list, and then setting properties @@ -23983,14 +24575,22 @@ beyond the end of the headline." ((and (looking-at org-todo-line-regexp) (= (char-after (match-end 1)) ?\ )) (goto-char - (cond ((> pos (match-beginning 3)) (match-beginning 3)) - ((= pos (point)) (match-beginning 3)) - (t (point))))) + (if (eq org-special-ctrl-a/e t) + (cond ((> pos (match-beginning 3)) (match-beginning 3)) + ((= pos (point)) (match-beginning 3)) + (t (point))) + (cond ((> pos (point)) (point)) + ((not (eq last-command this-command)) (point)) + (t (match-beginning 3)))))) ((org-at-item-p) (goto-char - (cond ((> pos (match-end 4)) (match-end 4)) - ((= pos (point)) (match-end 4)) - (t (point))))))))) + (if (eq org-special-ctrl-a/e t) + (cond ((> pos (match-end 4)) (match-end 4)) + ((= pos (point)) (match-end 4)) + (t (point))) + (cond ((> pos (point)) (point)) + ((not (eq last-command this-command)) (point)) + (t (match-end 4)))))))))) (defun org-end-of-line (&optional arg) "Go to the end of the line. @@ -24004,10 +24604,14 @@ beyond the end of the headline." (let ((pos (point))) (beginning-of-line 1) (if (looking-at (org-re ".*?\\([ \t]*\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$")) - (if (or (< pos (match-beginning 1)) - (= pos (match-end 0))) - (goto-char (match-beginning 1)) - (goto-char (match-end 0))) + (if (eq org-special-ctrl-a/e t) + (if (or (< pos (match-beginning 1)) + (= pos (match-end 0))) + (goto-char (match-beginning 1)) + (goto-char (match-end 0))) + (if (or (< pos (match-end 0)) (not (eq this-command last-command))) + (goto-char (match-end 0)) + (goto-char (match-beginning 1)))) (end-of-line arg))))) (define-key org-mode-map "\C-a" 'org-beginning-of-line) @@ -24047,6 +24651,21 @@ With argument, move up ARG levels." (outline-up-heading-all arg) ; emacs 21 version of outline.el (outline-up-heading arg t))) ; emacs 22 version of outline.el +(defun org-up-heading-safe () + "Move to the heading line of which the present line is a subheading. +This version will not throw an error. It will return the level of the +headline found, or nil if no higher level is found." + (let ((pos (point)) start-level level + (re (concat "^" outline-regexp))) + (catch 'exit + (outline-back-to-heading t) + (setq start-level (funcall outline-level)) + (if (equal start-level 1) (throw 'exit nil)) + (while (re-search-backward re nil t) + (setq level (funcall outline-level)) + (if (< level start-level) (throw 'exit level))) + nil))) + (defun org-goto-sibling (&optional previous) "Goto the next sibling, even if it is invisible. When PREVIOUS is set, go to the previous sibling instead. Returns t @@ -24264,7 +24883,30 @@ Still experimental, may disappear in the furture." t))) (t nil)))) ; call paragraph-fill - +;; FIXME: this needs a much better algorithm +(defun org-assign-fast-keys (alist) + "Assign fast keys to a keyword-key alist. +Respect keys that are already there." + (let (new e k c c1 c2 (char ?a)) + (while (setq e (pop alist)) + (cond + ((equal e '(:startgroup)) (push e new)) + ((equal e '(:endgroup)) (push e new)) + (t + (setq k (car e) c2 nil) + (if (cdr e) + (setq c (cdr e)) + ;; automatically assign a character. + (setq c1 (string-to-char + (downcase (substring + k (if (= (string-to-char k) ?@) 1 0))))) + (if (or (rassoc c1 new) (rassoc c1 alist)) + (while (or (rassoc char new) (rassoc char alist)) + (setq char (1+ char))) + (setq c2 c1)) + (setq c (or c2 char))) + (push (cons k c) new)))) + (nreverse new))) ;;;; Finish up diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index eadb9e606c3..5e8b8c7cbc2 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -1376,7 +1376,7 @@ the last cache point coordinate." ;; ;; Point Motion Only Group -(mapcar +(mapc (lambda (command) (let ((func-symbol (intern (format "*table--cell-%s" command))) (doc-string (format "Table remapped function for `%s'." command))) @@ -1409,7 +1409,7 @@ the last cache point coordinate." backward-paragraph)) ;; Extraction Group -(mapcar +(mapc (lambda (command) (let ((func-symbol (intern (format "*table--cell-%s" command))) (doc-string (format "Table remapped function for `%s'." command))) @@ -1443,7 +1443,7 @@ the last cache point coordinate." backward-kill-sexp)) ;; Pasting Group -(mapcar +(mapc (lambda (command) (let ((func-symbol (intern (format "*table--cell-%s" command))) (doc-string (format "Table remapped function for `%s'." command))) @@ -1469,7 +1469,7 @@ the last cache point coordinate." insert)) ;; Formatting Group -(mapcar +(mapc (lambda (command) (let ((func-symbol (intern (format "*table--cell-%s" command))) (doc-string (format "Table remapped function for `%s'." command))) @@ -1641,20 +1641,20 @@ Inside a table cell has a special keymap. (if (numberp cell-width) (setq cell-width (cons cell-width nil))) (if (numberp cell-height) (setq cell-height (cons cell-height nil))) ;; test validity of the arguments. - (mapcar (lambda (arg) - (let* ((value (symbol-value arg)) - (error-handler - (function (lambda () - (error "%s must be a positive integer%s" arg - (if (listp value) " or a list of positive integers" "")))))) - (if (null value) (funcall error-handler)) - (mapcar (function (lambda (arg1) - (if (or (not (integerp arg1)) - (< arg1 1)) - (funcall error-handler)))) - (if (listp value) value - (cons value nil))))) - '(columns rows cell-width cell-height)) + (mapc (lambda (arg) + (let* ((value (symbol-value arg)) + (error-handler + (function (lambda () + (error "%s must be a positive integer%s" arg + (if (listp value) " or a list of positive integers" "")))))) + (if (null value) (funcall error-handler)) + (mapcar (function (lambda (arg1) + (if (or (not (integerp arg1)) + (< arg1 1)) + (funcall error-handler)))) + (if (listp value) value + (cons value nil))))) + '(columns rows cell-width cell-height)) (let ((orig-coord (table--get-coordinate)) (coord (table--get-coordinate)) r i cw ch cell-str border-str) @@ -3141,7 +3141,7 @@ CALS (DocBook DTD): (set-marker-insertion-type (table-get-source-info 'colspec-marker) t) ;; insert before (save-excursion (goto-char (table-get-source-info 'colspec-marker)) - (mapcar + (mapc (lambda (col) (insert (format " <colspec colnum=\"%d\" colname=\"c%d\"/>\n" col col))) (sort (table-get-source-info 'colnum-list) '<))) @@ -3223,11 +3223,11 @@ CALS (DocBook DTD): (if (> colspan 1) (let ((scol (table-get-source-info 'current-column)) (ecol (+ (table-get-source-info 'current-column) colspan -1))) - (mapcar (lambda (col) - (unless (memq col (table-get-source-info 'colnum-list)) - (table-put-source-info 'colnum-list - (cons col (table-get-source-info 'colnum-list))))) - (list scol ecol)) + (mapc (lambda (col) + (unless (memq col (table-get-source-info 'colnum-list)) + (table-put-source-info 'colnum-list + (cons col (table-get-source-info 'colnum-list))))) + (list scol ecol)) (insert (format " namest=\"c%d\" nameend=\"c%d\"" scol ecol)))) (if (> rowspan 1) (insert (format " morerows=\"%d\"" (1- rowspan)))) (if (and alignment @@ -3910,19 +3910,19 @@ converts a table into plain text without frames. It is a companion to (remap-alist table-command-remap-alist)) ;; table-command-prefix mode specific bindings (if (vectorp table-command-prefix) - (mapcar (lambda (binding) - (let ((seq (copy-sequence (car binding)))) - (and (vectorp seq) - (listp (aref seq 0)) - (eq (car (aref seq 0)) 'control) - (progn - (aset seq 0 (cadr (aref seq 0))) - (define-key map (vconcat table-command-prefix seq) (cdr binding)))))) - table-cell-bindings)) + (mapc (lambda (binding) + (let ((seq (copy-sequence (car binding)))) + (and (vectorp seq) + (listp (aref seq 0)) + (eq (car (aref seq 0)) 'control) + (progn + (aset seq 0 (cadr (aref seq 0))) + (define-key map (vconcat table-command-prefix seq) (cdr binding)))))) + table-cell-bindings)) ;; shorthand control bindings - (mapcar (lambda (binding) - (define-key map (car binding) (cdr binding))) - table-cell-bindings) + (mapc (lambda (binding) + (define-key map (car binding) (cdr binding))) + table-cell-bindings) ;; remap normal commands to table specific version (while remap-alist (define-key map (vector 'remap (caar remap-alist)) (cdar remap-alist)) @@ -4092,11 +4092,11 @@ key binding --- ------- ") - (mapcar (lambda (binding) - (princ (format "%-16s%s\n" - (key-description (car binding)) - (cdr binding)))) - table-cell-bindings) + (mapc (lambda (binding) + (princ (format "%-16s%s\n" + (key-description (car binding)) + (cdr binding)))) + table-cell-bindings) (print-help-return-message)))) (defun *table--cell-dabbrev-expand (arg) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 44bc31d36d6..06e26d21aaf 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1,7 +1,8 @@ ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- -;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998 +;; 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: tex @@ -246,15 +247,20 @@ Normally set to either `plain-tex-mode' or `latex-mode'." (defcustom tex-fontify-script t "If non-nil, fontify subscript and superscript strings." :type 'boolean - :group 'tex) + :group 'tex + :version "23.1") (put 'tex-fontify-script 'safe-local-variable 'booleanp) (defcustom tex-font-script-display '(-0.2 0.2) - "Display specification for subscript and superscript content. -The first is used for subscript, the second is used for superscripts." + "How much to lower and raise subscript and superscript content. +This is a list of two floats. The first is negative and +specifies how much subscript is lowered, the second is positive +and specifies how much superscript is raised. Heights are +measured relative to that of the normal text." :group 'tex :type '(list (float :tag "Subscript") - (float :tag "Superscript"))) + (float :tag "Superscript")) + :version "23.1") (defvar tex-last-temp-file nil "Latest temporary file generated by \\[tex-region] and \\[tex-buffer]. @@ -636,7 +642,7 @@ An alternative value is \" . \", if you use a font with a narrow period." (defvar tex-verbatim-environments '("verbatim" "verbatim*")) (put 'tex-verbatim-environments 'safe-local-variable - (lambda (x) (require 'cl) (every 'stringp x))) + (lambda (x) (null (delq t (mapcar 'stringp x))))) (defvar tex-font-lock-syntactic-keywords '((eval . `(,(concat "^\\\\begin *{" @@ -672,12 +678,42 @@ An alternative value is \" . \", if you use a font with a narrow period." (put-text-property beg next 'display nil)) (setq beg next)))) +(defcustom tex-suscript-height-ratio 0.8 + "Ratio of subscript/superscript height to that of the preceding text. +In nested subscript/superscript, this factor is applied repeatedly, +subject to the limit set by `tex-suscript-height-minimum'." + :type 'float + :group 'tex + :version "23.1") + +(defcustom tex-suscript-height-minimum 0.0 + "Integer or float limiting the minimum size of subscript/superscript text. +An integer is an absolute height in units of 1/10 point, a float +is a height relative to that of the default font. Zero means no minimum." + :type '(choice (integer :tag "Integer height in 1/10 point units") + (float :tag "Fraction of default font height")) + :group 'tex + :version "23.1") + +(defun tex-suscript-height (height) + "Return the integer height of subscript/superscript font in 1/10 points. +Not smaller than the value set by `tex-suscript-height-minimum'." + (ceiling (max (if (integerp tex-suscript-height-minimum) + tex-suscript-height-minimum + ;; For bootstrapping. + (condition-case nil + (* tex-suscript-height-minimum + (face-attribute 'default :height)) + (error 0))) + ;; NB assumes height is integer. + (* height tex-suscript-height-ratio)))) + (defface superscript - '((t :height 0.8)) ;; :raise 0.2 + '((t :height tex-suscript-height)) ;; :raise 0.2 "Face used for superscripts." :group 'tex) (defface subscript - '((t :height 0.8)) ;; :raise -0.2 + '((t :height tex-suscript-height)) ;; :raise -0.2 "Face used for subscripts." :group 'tex) @@ -1184,24 +1220,27 @@ on the line for the invalidity you want to see." (setq occur-revert-arguments (list nil 0 (list buffer)))) (save-excursion (goto-char (point-max)) - (while (and (not (bobp))) - (let ((end (point)) - prev-end) + ;; Do a little shimmy to place point at the end of the last + ;; "real" paragraph. Need to avoid validating across an \end, + ;; because that blows up latex-forward-sexp. + (backward-paragraph) + (forward-paragraph) + (while (not (bobp)) ;; Scan the previous paragraph for invalidities. - (if (search-backward "\n\n" nil t) - (progn - (setq prev-end (point)) - (forward-char 2)) - (goto-char (setq prev-end (point-min)))) - (or (tex-validate-region (point) end) - (let* ((end (line-beginning-position 2)) + (backward-paragraph) + (save-excursion + (or (tex-validate-region (point) (save-excursion + (forward-paragraph) + (point))) + (let ((end (line-beginning-position 2)) start tem) (beginning-of-line) (setq start (point)) ;; Keep track of line number as we scan, ;; in a cumulative fashion. (if linenum - (setq linenum (- linenum (count-lines prevpos (point)))) + (setq linenum (- linenum + (count-lines prevpos (point)))) (setq linenum (1+ (count-lines 1 start)))) (setq prevpos (point)) ;; Mention this mismatch in *Occur*. @@ -1222,10 +1261,10 @@ on the line for the invalidity you want to see." (add-text-properties text-beg (- text-end 1) '(mouse-face highlight - help-echo "mouse-2: go to this invalidity")) + help-echo + "mouse-2: go to this invalidity")) (put-text-property text-beg (- text-end 1) - 'occur-target tem))))) - (goto-char prev-end)))) + 'occur-target tem)))))))) (with-current-buffer standard-output (let ((no-matches (zerop num-matches))) (if no-matches @@ -1248,7 +1287,9 @@ area if a mismatch is found." (narrow-to-region start end) ;; First check that the open and close parens balance in numbers. (goto-char start) - (while (<= 0 (setq max-possible-sexps (1- max-possible-sexps))) + (while (and (not (eobp)) + (<= 0 (setq max-possible-sexps + (1- max-possible-sexps)))) (forward-sexp 1)) ;; Now check that like matches like. (goto-char start) @@ -1256,6 +1297,7 @@ area if a mismatch is found." (save-excursion (let ((pos (match-beginning 0))) (goto-char pos) + (skip-chars-backward "\\\\") ; escaped parens (forward-sexp 1) (or (eq (preceding-char) (cdr (syntax-after pos))) (eq (char-after pos) (cdr (syntax-after (1- (point))))) @@ -1273,9 +1315,13 @@ A prefix arg inhibits the checking." (interactive "*P") (or inhibit-validation (save-excursion + ;; For the purposes of this, a "paragraph" is a block of text + ;; wherein all the brackets etc are expected to be balanced. It + ;; may start after a blank line (ie a "proper" paragraph), or + ;; a begin{} or end{} block, etc. (tex-validate-region (save-excursion - (search-backward "\n\n" nil 'move) + (backward-paragraph) (point)) (point))) (message "Paragraph being closed appears to contain a mismatch")) @@ -1383,13 +1429,41 @@ Return the value returned by the last execution of BODY." (search-failed (error "Couldn't find unended \\begin")))) (defun tex-next-unmatched-end () - "Leave point at the end of the next `\\end' that is unended." + "Leave point at the end of the next `\\end' that is unmatched." (while (and (tex-search-noncomment (re-search-forward "\\\\\\(begin\\|end\\)\\s *{[^}]+}")) (save-excursion (goto-char (match-beginning 0)) (looking-at "\\\\begin"))) (tex-next-unmatched-end))) +(defun tex-next-unmatched-eparen (otype) + "Leave point after the next unmatched escaped closing parenthesis. +The string OTYPE is an opening parenthesis type: `(', `{', or `['." + (condition-case nil + (let ((ctype (char-to-string (cdr (aref (syntax-table) + (string-to-char otype)))))) + (while (and (tex-search-noncomment + (re-search-forward (format "\\\\[%s%s]" ctype otype))) + (save-excursion + (goto-char (match-beginning 0)) + (looking-at (format "\\\\%s" (regexp-quote otype))))) + (tex-next-unmatched-eparen otype))) + (wrong-type-argument (error "Unknown opening parenthesis type: %s" otype)) + (search-failed (error "Couldn't find closing escaped paren")))) + +(defun tex-last-unended-eparen (ctype) + "Leave point at the start of the last unended escaped opening parenthesis. +The string CTYPE is a closing parenthesis type: `)', `}', or `]'." + (condition-case nil + (let ((otype (char-to-string (cdr (aref (syntax-table) + (string-to-char ctype)))))) + (while (and (tex-search-noncomment + (re-search-backward (format "\\\\[%s%s]" ctype otype))) + (looking-at (format "\\\\%s" (regexp-quote ctype)))) + (tex-last-unended-eparen ctype))) + (wrong-type-argument (error "Unknown opening parenthesis type: %s" ctype)) + (search-failed (error "Couldn't find unended escaped paren")))) + (defun tex-goto-last-unclosed-latex-block () "Move point to the last unclosed \\begin{...}. Mark is left at original location." @@ -1401,26 +1475,34 @@ Mark is left at original location." (push-mark) (goto-char spot))) +;; Don't think this one actually _needs_ (for the purposes of +;; tex-mode) to handle escaped parens. (defun latex-backward-sexp-1 () - "Like (backward-sexp 1) but aware of multi-char elements." + "Like (backward-sexp 1) but aware of multi-char elements and escaped parens." (let ((pos (point)) (forward-sexp-function)) (backward-sexp 1) - (if (looking-at "\\\\begin\\>") - (signal 'scan-error - (list "Containing expression ends prematurely" - (point) (prog1 (point) (goto-char pos)))) - (when (eq (char-after) ?{) - (let ((newpos (point))) - (when (ignore-errors (backward-sexp 1) t) - (if (or (looking-at "\\\\end\\>") - ;; In case the \\ ends a verbatim section. - (and (looking-at "end\\>") (eq (char-before) ?\\))) - (tex-last-unended-begin) - (goto-char newpos)))))))) - + (cond ((looking-at "\\\\\\(begin\\>\\|[[({]\\)") + (signal 'scan-error + (list "Containing expression ends prematurely" + (point) (prog1 (point) (goto-char pos))))) + ((looking-at "\\\\\\([])}]\\)") + (tex-last-unended-eparen (match-string 1))) + ((eq (char-after) ?{) + (let ((newpos (point))) + (when (ignore-errors (backward-sexp 1) t) + (if (or (looking-at "\\\\end\\>") + ;; In case the \\ ends a verbatim section. + (and (looking-at "end\\>") (eq (char-before) ?\\))) + (tex-last-unended-begin) + (goto-char newpos)))))))) + +;; Note this does not handle things like mismatched brackets inside +;; begin/end blocks. +;; Needs to handle escaped parens for tex-validate-*. +;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00038.html (defun latex-forward-sexp-1 () - "Like (forward-sexp 1) but aware of multi-char elements." + "Like (forward-sexp 1) but aware of multi-char elements and escaped parens." (let ((pos (point)) (forward-sexp-function)) (forward-sexp 1) @@ -1437,10 +1519,19 @@ Mark is left at original location." ((looking-at "\\\\begin\\>") (goto-char (match-end 0)) (tex-next-unmatched-end)) + ;; A better way to handle this, \( .. \) etc, is probably to + ;; temporarily change the syntax of the \ in \( to punctuation. + ((looking-back "\\\\[])}]") + (signal 'scan-error + (list "Containing expression ends prematurely" + (- (point) 2) (prog1 (point) + (goto-char pos))))) + ((looking-back "\\\\\\([({[]\\)") + (tex-next-unmatched-eparen (match-string 1))) (t (goto-char newpos)))))) (defun latex-forward-sexp (&optional arg) - "Like `forward-sexp' but aware of multi-char elements." + "Like `forward-sexp' but aware of multi-char elements and escaped parens." (interactive "P") (unless arg (setq arg 1)) (let ((pos (point))) @@ -2032,29 +2123,37 @@ for the error messages." (file-name-directory (buffer-file-name tex-last-buffer-texed))) found-desired (num-errors-found 0) last-filename last-linenum last-position - begin-of-error end-of-error) + begin-of-error end-of-error errfilename) ;; Don't reparse messages already seen at last parse. (goto-char compilation-parsing-end) ;; Parse messages. (while (and (not (or found-desired (eobp))) - (prog1 (re-search-forward "^! " nil 'move) + ;; First alternative handles the newer --file-line-error style: + ;; ./test2.tex:14: Too many }'s. + ;; Second handles the old-style: + ;; ! Too many }'s. + (prog1 (re-search-forward + "^\\(?:\\([^:\n]+\\):[[:digit:]]+:\\|!\\) " nil 'move) (setq begin-of-error (match-beginning 0) - end-of-error (match-end 0))) + end-of-error (match-end 0) + errfilename (match-string 1))) (re-search-forward "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move)) (let* ((this-error (copy-marker begin-of-error)) (linenum (string-to-number (match-string 1))) (error-text (regexp-quote (match-string 3))) (filename - (save-excursion - (with-syntax-table tex-error-parse-syntax-table - (backward-up-list 1) - (skip-syntax-forward "(_") - (while (not (file-readable-p (thing-at-point 'filename))) - (skip-syntax-backward "(_") - (backward-up-list 1) - (skip-syntax-forward "(_")) - (thing-at-point 'filename)))) + ;; Prefer --file-liner-error filename if we have it. + (or errfilename + (save-excursion + (with-syntax-table tex-error-parse-syntax-table + (backward-up-list 1) + (skip-syntax-forward "(_") + (while (not (file-readable-p (thing-at-point 'filename))) + (skip-syntax-backward "(_") + (backward-up-list 1) + (skip-syntax-forward "(_")) + (thing-at-point 'filename))))) (new-file (or (null last-filename) (not (string-equal last-filename filename)))) @@ -2124,57 +2223,31 @@ The value of `tex-command' specifies the command to use to run TeX." (let* ((zap-directory (file-name-as-directory (expand-file-name tex-directory))) (tex-out-file (expand-file-name (concat tex-zap-file ".tex") - zap-directory))) + zap-directory)) + (main-file (expand-file-name (tex-main-file))) + (ismain (string-equal main-file (buffer-file-name))) + already-output) ;; Don't delete temp files if we do the same buffer twice in a row. (or (eq (current-buffer) tex-last-buffer-texed) (tex-delete-last-temp-files t)) - ;; Write the new temp file. - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (forward-line 100) - (let ((search-end (point)) - (default-directory zap-directory) - (already-output 0)) - (goto-char (point-min)) - - ;; Maybe copy first line, such as `\input texinfo', to temp file. - (and tex-first-line-header-regexp - (looking-at tex-first-line-header-regexp) - (write-region (point) - (progn (forward-line 1) - (setq already-output (point))) - tex-out-file nil nil)) - - ;; Write out the header, if there is one, - ;; and any of the specified region which extends before it. - ;; But don't repeat anything already written. - (if (re-search-forward tex-start-of-header search-end t) - (let (hbeg) - (beginning-of-line) - (setq hbeg (point)) ;mark beginning of header - (if (re-search-forward tex-end-of-header nil t) - (let (hend) - (forward-line 1) - (setq hend (point)) ;mark end of header - (write-region (max (min hbeg beg) already-output) - hend - tex-out-file - (not (zerop already-output)) nil) - (setq already-output hend))))) - - ;; Write out the specified region - ;; (but don't repeat anything already written). - (write-region (max beg already-output) end - tex-out-file - (not (zerop already-output)) nil)) - ;; Write the trailer, if any. - ;; Precede it with a newline to make sure it - ;; is not hidden in a comment. - (if tex-trailer - (write-region (concat "\n" tex-trailer) nil - tex-out-file t nil)))) + (let ((default-directory zap-directory)) ; why? + ;; We assume the header is fully contained in tex-main-file. + ;; We use f-f-ns so we get prompted about any changes on disk. + (with-current-buffer (find-file-noselect main-file) + (setq already-output (tex-region-header tex-out-file + (and ismain beg)))) + ;; Write out the specified region (but don't repeat anything + ;; already written in the header). + (write-region (if ismain + (max beg already-output) + beg) + end tex-out-file (not (zerop already-output))) + ;; Write the trailer, if any. + ;; Precede it with a newline to make sure it + ;; is not hidden in a comment. + (if tex-trailer + (write-region (concat "\n" tex-trailer) nil + tex-out-file t))) ;; Record the file name to be deleted afterward. (setq tex-last-temp-file tex-out-file) ;; Use a relative file name here because (1) the proper dir @@ -2183,6 +2256,52 @@ The value of `tex-command' specifies the command to use to run TeX." (tex-start-tex tex-command (concat tex-zap-file ".tex") zap-directory) (setq tex-print-file tex-out-file))) +(defun tex-region-header (file &optional beg) + "If there is a TeX header in the current buffer, write it to FILE. +Return point at the end of the region so written, or zero. If +the optional buffer position BEG is specified, then the region +written out starts at BEG, if this lies before the start of the header. + +If the first line matches `tex-first-line-header-regexp', it is +also written out. The variables `tex-start-of-header' and +`tex-end-of-header' are used to locate the header. Note that the +start of the header is required to be within the first 100 lines." + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let ((search-end (save-excursion + (forward-line 100) + (point))) + (already-output 0) + hbeg hend) + ;; Maybe copy first line, such as `\input texinfo', to temp file. + (and tex-first-line-header-regexp + (looking-at tex-first-line-header-regexp) + (write-region (point) + (progn (forward-line 1) + (setq already-output (point))) + file)) + ;; Write out the header, if there is one, and any of the + ;; specified region which extends before it. But don't repeat + ;; anything already written. + (and tex-start-of-header + (re-search-forward tex-start-of-header search-end t) + (progn + (beginning-of-line) + (setq hbeg (point)) ; mark beginning of header + (when (re-search-forward tex-end-of-header nil t) + (forward-line 1) + (setq hend (point)) ; mark end of header + (write-region + (max (if beg + (min hbeg beg) + hbeg) + already-output) + hend file (not (zerop already-output))) + (setq already-output hend)))) + already-output)))) + (defun tex-buffer () "Run TeX on current buffer. See \\[tex-region] for more information. Does not save the buffer, so it's useful for trying experimental versions. diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 038345e17bd..004e57bc21a 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -51,13 +51,13 @@ ;;;###autoload (defcustom texinfo-open-quote "``" - "*String inserted by typing \\[texinfo-insert-quote] to open a quotation." + "String inserted by typing \\[texinfo-insert-quote] to open a quotation." :type 'string :group 'texinfo) ;;;###autoload (defcustom texinfo-close-quote "''" - "*String inserted by typing \\[texinfo-insert-quote] to close a quotation." + "String inserted by typing \\[texinfo-insert-quote] to close a quotation." :type 'string :group 'texinfo) @@ -296,21 +296,19 @@ chapter." ;;; Syntax table -(defvar texinfo-mode-syntax-table nil) - -(if texinfo-mode-syntax-table - nil - (setq texinfo-mode-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\" "." texinfo-mode-syntax-table) - (modify-syntax-entry ?\\ "." texinfo-mode-syntax-table) - (modify-syntax-entry ?@ "\\" texinfo-mode-syntax-table) - (modify-syntax-entry ?\^q "\\" texinfo-mode-syntax-table) - (modify-syntax-entry ?\[ "(]" texinfo-mode-syntax-table) - (modify-syntax-entry ?\] ")[" texinfo-mode-syntax-table) - (modify-syntax-entry ?{ "(}" texinfo-mode-syntax-table) - (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) - (modify-syntax-entry ?\n ">" texinfo-mode-syntax-table) - (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) +(defvar texinfo-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\" "." st) + (modify-syntax-entry ?\\ "." st) + (modify-syntax-entry ?@ "\\" st) + (modify-syntax-entry ?\^q "\\" st) + (modify-syntax-entry ?\[ "(]" st) + (modify-syntax-entry ?\] ")[" st) + (modify-syntax-entry ?{ "(}" st) + (modify-syntax-entry ?} "){" st) + (modify-syntax-entry ?\n ">" st) + (modify-syntax-entry ?\' "w" st) + st)) ;; Written by Wolfgang Bangerth <zcg51122@rpool1.rus.uni-stuttgart.de> ;; To override this example, set either `imenu-generic-expression' @@ -399,7 +397,6 @@ Subexpression 1 is what goes into the corresponding `@end' statement.") ;;; Keybindings -(defvar texinfo-mode-map nil) ;;; Keys common both to Texinfo mode and to TeX shell. @@ -420,65 +417,65 @@ Subexpression 1 is what goes into the corresponding `@end' statement.") ;; Mode documentation displays commands in reverse order ;; from how they are listed in the texinfo-mode-map. -(if texinfo-mode-map - nil - (setq texinfo-mode-map (make-sparse-keymap)) - - ;; bindings for `texnfo-tex.el' - (texinfo-define-common-keys texinfo-mode-map) - - (define-key texinfo-mode-map "\"" 'texinfo-insert-quote) - - ;; bindings for `makeinfo.el' - (define-key texinfo-mode-map "\C-c\C-m\C-k" 'kill-compilation) - (define-key texinfo-mode-map "\C-c\C-m\C-l" - 'makeinfo-recenter-compilation-buffer) - (define-key texinfo-mode-map "\C-c\C-m\C-r" 'makeinfo-region) - (define-key texinfo-mode-map "\C-c\C-m\C-b" 'makeinfo-buffer) - - ;; bindings for `texinfmt.el' - (define-key texinfo-mode-map "\C-c\C-e\C-r" 'texinfo-format-region) - (define-key texinfo-mode-map "\C-c\C-e\C-b" 'texinfo-format-buffer) - - ;; AUCTeX-like bindings - (define-key texinfo-mode-map "\e\r" 'texinfo-insert-@item) - - ;; bindings for updating nodes and menus - - (define-key texinfo-mode-map "\C-c\C-um" 'texinfo-master-menu) - - (define-key texinfo-mode-map "\C-c\C-u\C-m" 'texinfo-make-menu) - (define-key texinfo-mode-map "\C-c\C-u\C-n" 'texinfo-update-node) - (define-key texinfo-mode-map "\C-c\C-u\C-e" 'texinfo-every-node-update) - (define-key texinfo-mode-map "\C-c\C-u\C-a" 'texinfo-all-menus-update) - - (define-key texinfo-mode-map "\C-c\C-s" 'texinfo-show-structure) - - (define-key texinfo-mode-map "\C-c}" 'up-list) - (define-key texinfo-mode-map "\C-c]" 'up-list) - (define-key texinfo-mode-map "\C-c{" 'texinfo-insert-braces) - - ;; bindings for inserting strings - (define-key texinfo-mode-map "\C-c\C-o" 'texinfo-insert-block) - (define-key texinfo-mode-map "\C-c\C-c\C-d" 'texinfo-start-menu-description) - (define-key texinfo-mode-map "\C-c\C-c\C-s" 'texinfo-insert-@strong) - (define-key texinfo-mode-map "\C-c\C-c\C-e" 'texinfo-insert-@emph) - - (define-key texinfo-mode-map "\C-c\C-cv" 'texinfo-insert-@var) - (define-key texinfo-mode-map "\C-c\C-cu" 'texinfo-insert-@uref) - (define-key texinfo-mode-map "\C-c\C-ct" 'texinfo-insert-@table) - (define-key texinfo-mode-map "\C-c\C-cs" 'texinfo-insert-@samp) - (define-key texinfo-mode-map "\C-c\C-cq" 'texinfo-insert-@quotation) - (define-key texinfo-mode-map "\C-c\C-co" 'texinfo-insert-@noindent) - (define-key texinfo-mode-map "\C-c\C-cn" 'texinfo-insert-@node) - (define-key texinfo-mode-map "\C-c\C-cm" 'texinfo-insert-@email) - (define-key texinfo-mode-map "\C-c\C-ck" 'texinfo-insert-@kbd) - (define-key texinfo-mode-map "\C-c\C-ci" 'texinfo-insert-@item) - (define-key texinfo-mode-map "\C-c\C-cf" 'texinfo-insert-@file) - (define-key texinfo-mode-map "\C-c\C-cx" 'texinfo-insert-@example) - (define-key texinfo-mode-map "\C-c\C-ce" 'texinfo-insert-@end) - (define-key texinfo-mode-map "\C-c\C-cd" 'texinfo-insert-@dfn) - (define-key texinfo-mode-map "\C-c\C-cc" 'texinfo-insert-@code)) +(defvar texinfo-mode-map + (let ((map (make-sparse-keymap))) + + ;; bindings for `texnfo-tex.el' + (texinfo-define-common-keys map) + + (define-key map "\"" 'texinfo-insert-quote) + + ;; bindings for `makeinfo.el' + (define-key map "\C-c\C-m\C-k" 'kill-compilation) + (define-key map "\C-c\C-m\C-l" + 'makeinfo-recenter-compilation-buffer) + (define-key map "\C-c\C-m\C-r" 'makeinfo-region) + (define-key map "\C-c\C-m\C-b" 'makeinfo-buffer) + + ;; bindings for `texinfmt.el' + (define-key map "\C-c\C-e\C-r" 'texinfo-format-region) + (define-key map "\C-c\C-e\C-b" 'texinfo-format-buffer) + + ;; AUCTeX-like bindings + (define-key map "\e\r" 'texinfo-insert-@item) + + ;; bindings for updating nodes and menus + + (define-key map "\C-c\C-um" 'texinfo-master-menu) + + (define-key map "\C-c\C-u\C-m" 'texinfo-make-menu) + (define-key map "\C-c\C-u\C-n" 'texinfo-update-node) + (define-key map "\C-c\C-u\C-e" 'texinfo-every-node-update) + (define-key map "\C-c\C-u\C-a" 'texinfo-all-menus-update) + + (define-key map "\C-c\C-s" 'texinfo-show-structure) + + (define-key map "\C-c}" 'up-list) + (define-key map "\C-c]" 'up-list) + (define-key map "\C-c{" 'texinfo-insert-braces) + + ;; bindings for inserting strings + (define-key map "\C-c\C-o" 'texinfo-insert-block) + (define-key map "\C-c\C-c\C-d" 'texinfo-start-menu-description) + (define-key map "\C-c\C-c\C-s" 'texinfo-insert-@strong) + (define-key map "\C-c\C-c\C-e" 'texinfo-insert-@emph) + + (define-key map "\C-c\C-cv" 'texinfo-insert-@var) + (define-key map "\C-c\C-cu" 'texinfo-insert-@uref) + (define-key map "\C-c\C-ct" 'texinfo-insert-@table) + (define-key map "\C-c\C-cs" 'texinfo-insert-@samp) + (define-key map "\C-c\C-cq" 'texinfo-insert-@quotation) + (define-key map "\C-c\C-co" 'texinfo-insert-@noindent) + (define-key map "\C-c\C-cn" 'texinfo-insert-@node) + (define-key map "\C-c\C-cm" 'texinfo-insert-@email) + (define-key map "\C-c\C-ck" 'texinfo-insert-@kbd) + (define-key map "\C-c\C-ci" 'texinfo-insert-@item) + (define-key map "\C-c\C-cf" 'texinfo-insert-@file) + (define-key map "\C-c\C-cx" 'texinfo-insert-@example) + (define-key map "\C-c\C-ce" 'texinfo-insert-@end) + (define-key map "\C-c\C-cd" 'texinfo-insert-@dfn) + (define-key map "\C-c\C-cc" 'texinfo-insert-@code) + map)) (easy-menu-define texinfo-mode-menu texinfo-mode-map @@ -947,22 +944,22 @@ to jump to the corresponding spot in the Texinfo source file." ;;; The tex and print function definitions: (defcustom texinfo-texi2dvi-command "texi2dvi" - "*Command used by `texinfo-tex-buffer' to run TeX and texindex on a buffer." + "Command used by `texinfo-tex-buffer' to run TeX and texindex on a buffer." :type 'string :group 'texinfo) (defcustom texinfo-tex-command "tex" - "*Command used by `texinfo-tex-region' to run TeX on a region." + "Command used by `texinfo-tex-region' to run TeX on a region." :type 'string :group 'texinfo) (defcustom texinfo-texindex-command "texindex" - "*Command used by `texinfo-texindex' to sort unsorted index files." + "Command used by `texinfo-texindex' to sort unsorted index files." :type 'string :group 'texinfo) (defcustom texinfo-delete-from-print-queue-command "lprm" - "*Command string used to delete a job from the line printer queue. + "Command string used to delete a job from the line printer queue. Command is used by \\[texinfo-delete-from-print-queue] based on number provided by a previous \\[tex-show-print-queue] command." diff --git a/lisp/tmm.el b/lisp/tmm.el index b6b5e46aa27..6deed45bf5c 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -47,7 +47,6 @@ (defvar tmm-table-undef) ;;;###autoload (define-key global-map "\M-`" 'tmm-menubar) -;;;###autoload (define-key global-map [f10] 'tmm-menubar) ;;;###autoload (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) ;;;###autoload @@ -101,7 +100,7 @@ See the documentation for `tmm-prompt'." (tmm-menubar (car (posn-x-y (event-start event))))) (defcustom tmm-mid-prompt "==>" - "*String to insert between shortcut and menu item. + "String to insert between shortcut and menu item. If nil, there will be no shortcuts. It should not consist only of spaces, or else the correct item might not be found in the `*Completions*' buffer." :type 'string @@ -116,14 +115,14 @@ Alternatively, you can use Up/Down keys (or your History keys) to change the item in the minibuffer, and press RET when you are done, or press the marked letters to pick up your choice. Type C-g or ESC ESC ESC to cancel. " - "*Help text to insert on the top of the completion buffer. + "Help text to insert on the top of the completion buffer. To save space, you can set this to nil, in which case the standard introduction text is deleted too." :type '(choice string (const nil)) :group 'tmm) (defcustom tmm-shortcut-style '(downcase upcase) - "*What letters to use as menu shortcuts. + "What letters to use as menu shortcuts. Must be either one of the symbols `downcase' or `upcase', or else a list of the two in the order you prefer." :type '(choice (const downcase) @@ -132,7 +131,7 @@ or else a list of the two in the order you prefer." :group 'tmm) (defcustom tmm-shortcut-words 2 - "*How many successive words to try for shortcuts, nil means all. + "How many successive words to try for shortcuts, nil means all. If you use only one of `downcase' or `upcase' for `tmm-shortcut-style', specify nil for this variable." :type '(choice integer (const nil)) @@ -232,13 +231,11 @@ Its value should be an event that has a binding in MENU." tmm-km-list nil t nil (cons 'history (- (* 2 history-len) index-of-default)))) - (save-excursion - (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) - (if (get-buffer "*Completions*") - (progn - (set-buffer "*Completions*") - (use-local-map tmm-old-comp-map) - (bury-buffer (current-buffer)))))))))) + (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) + (if (get-buffer "*Completions*") + (with-current-buffer "*Completions*" + (use-local-map tmm-old-comp-map) + (bury-buffer (current-buffer))))))))) (setq choice (cdr (assoc out tmm-km-list))) (and (null choice) (> (length out) (length tmm-c-prompt)) @@ -566,9 +563,10 @@ of `menu-bar-final-items'." ;; Return that keymap. bind)))) +;; Huh? What's that about? --Stef (add-hook 'calendar-load-hook (lambda () (require 'cal-menu))) (provide 'tmm) -;;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4 +;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4 ;;; tmm.el ends here diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 768fee70411..e3635f47fe7 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -55,23 +55,23 @@ conveniently adding tool bar items." :group 'mouse :group 'frames (and (display-images-p) - (let ((lines (if tool-bar-mode 1 0))) - ;; Alter existing frames... - (mapc (lambda (frame) - (modify-frame-parameters frame - (list (cons 'tool-bar-lines lines)))) - (frame-list)) - ;; ...and future ones. - (let ((elt (assq 'tool-bar-lines default-frame-alist))) - (if elt - (setcdr elt lines) - (add-to-list 'default-frame-alist (cons 'tool-bar-lines lines))))) + (modify-all-frames-parameters (list (cons 'tool-bar-lines + (if tool-bar-mode 1 0)))) (if (and tool-bar-mode - (display-graphic-p) - (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup + (display-graphic-p)) (tool-bar-setup)))) ;;;###autoload +;; Used in the Show/Hide menu, to have the toggle reflect the current frame. +(defun toggle-tool-bar-mode-from-frame (&optional arg) + "Toggle tool bar on or off, based on the status of the current frame. +See `tool-bar-mode' for more information." + (interactive (list (or current-prefix-arg 'toggle))) + (if (eq arg 'toggle) + (tool-bar-mode (if (> (frame-parameter nil 'tool-bar-lines) 0) 0 1)) + (tool-bar-mode arg))) + +;;;###autoload ;; We want to pretend the toolbar by standard is on, as this will make ;; customize consider disabling the toolbar a customization, and save ;; that. We could do this for real by setting :init-value above, but @@ -228,42 +228,47 @@ holds a keymap." ;;; Set up some global items. Additions/deletions up for grabs. -(defun tool-bar-setup () - ;; People say it's bad to have EXIT on the tool bar, since users - ;; might inadvertently click that button. - ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit") - (tool-bar-add-item-from-menu 'find-file "new") - (tool-bar-add-item-from-menu 'menu-find-file-existing "open") - (tool-bar-add-item-from-menu 'dired "diropen") - (tool-bar-add-item-from-menu 'kill-this-buffer "close") - (tool-bar-add-item-from-menu 'save-buffer "save" nil - :visible '(or buffer-file-name - (not (eq 'special - (get major-mode - 'mode-class))))) - (tool-bar-add-item-from-menu 'write-file "saveas" nil - :visible '(or buffer-file-name - (not (eq 'special - (get major-mode - 'mode-class))))) - (tool-bar-add-item-from-menu 'undo "undo" nil - :visible '(not (eq 'special (get major-mode - 'mode-class)))) - (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) - "cut" nil - :visible '(not (eq 'special (get major-mode - 'mode-class)))) - (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) - "copy") - (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) - "paste" nil - :visible '(not (eq 'special (get major-mode - 'mode-class)))) - (tool-bar-add-item-from-menu 'nonincremental-search-forward "search") - ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell") - - ;; There's no icon appropriate for News and we need a command rather - ;; than a lambda for Read Mail. +(defvar tool-bar-setup nil + "t if the tool-bar has been set up by `tool-bar-setup'.") + +(defun tool-bar-setup (&optional frame) + (unless tool-bar-setup + (with-selected-frame (or frame (selected-frame)) + ;; People say it's bad to have EXIT on the tool bar, since users + ;; might inadvertently click that button. + ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit") + (tool-bar-add-item-from-menu 'find-file "new") + (tool-bar-add-item-from-menu 'menu-find-file-existing "open") + (tool-bar-add-item-from-menu 'dired "diropen") + (tool-bar-add-item-from-menu 'kill-this-buffer "close") + (tool-bar-add-item-from-menu 'save-buffer "save" nil + :visible '(or buffer-file-name + (not (eq 'special + (get major-mode + 'mode-class))))) + (tool-bar-add-item-from-menu 'write-file "saveas" nil + :visible '(or buffer-file-name + (not (eq 'special + (get major-mode + 'mode-class))))) + (tool-bar-add-item-from-menu 'undo "undo" nil + :visible '(not (eq 'special (get major-mode + 'mode-class)))) + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) + "cut" nil + :visible '(not (eq 'special (get major-mode + 'mode-class)))) + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) + "copy") + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) + "paste" nil + :visible '(not (eq 'special (get major-mode + 'mode-class)))) + (tool-bar-add-item-from-menu 'nonincremental-search-forward "search") + ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell") + + ;; There's no icon appropriate for News and we need a command rather + ;; than a lambda for Read Mail. ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") (tool-bar-add-item-from-menu 'print-buffer "print") @@ -281,9 +286,9 @@ holds a keymap." (popup-menu menu-bar-help-menu)) 'help :help "Pop up the Help menu")) - ) + (setq tool-bar-setup t)))) -(provide 'tool-bar) +(provide 'tool-bar) ;;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f ;;; tool-bar.el ends here diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 841facff69c..26fb0e503f7 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -210,14 +210,12 @@ LEFT and RIGHT are the elements to compare." (defconst tutorial--default-keys ;; On window system, `suspend-emacs' is replaced in the default ;; keymap - (let* ((suspend-emacs (if window-system - 'iconify-or-deiconify-frame - 'suspend-emacs)) + (let* ((suspend-emacs 'suspend-frame) (default-keys `((ESC-prefix [27]) (Control-X-prefix [?\C-x]) (mode-specific-command-prefix [?\C-c]) - (save-buffers-kill-emacs [?\C-x ?\C-c]) + (save-buffers-kill-terminal [?\C-x ?\C-c]) ;; * SUMMARY (scroll-up [?\C-v]) @@ -293,7 +291,7 @@ LEFT and RIGHT are the elements to compare." ;; * MODE LINE (describe-mode [?\C-h ?m]) (set-fill-column [?\C-x ?f]) - (fill-paragraph [?\M-q]) + (fill-paragraph-or-region [?\M-q]) ;; * SEARCHING (isearch-forward [?\C-s]) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 46a2bb62a75..5da6a1fbae3 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,45 @@ +2007-09-26 Juanma Barranquero <lekktu@gmail.com> + + * url-dav.el (top): + * url-vars.el (top): Use `mapc' rather than `mapcar'. + +2007-09-22 Diane Murray <disumu@x3y2z1.net> + + * url-misc.el (url-generic-emulator-loader): Send the port as a + string to `url-do-terminal-emulator'. + +2007-09-21 Diane Murray <disumu@x3y2z1.net> + + * url-news.el (url-news-fetch-newsgroup): Fix formatting of Gnus + method. + + * url-util.el (url-get-normalized-date): Pass full timezone + information to timezone-make-date-arpa-standard, since zone name + may be unknown. + +2007-09-03 Diane Murray <disumu@x3y2z1.net> + + * url-http.el (url-http-parse-headers): Bind the current buffer + rather than calling `url-mark-buffer-as-dead' with + `current-buffer', so that the correct buffer is killed if + `url-retrieve-synchronously' gets redirected to a new URL. + +2007-08-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * url-parse.el (url): Use defstruct rather than macros. + (url-generic-parse-url): + * url-util.el (url-normalize-url, url-truncate-url-for-viewing): + * url-methods.el (url-scheme-register-proxy): + * url-mailto.el (url-mailto): + * url-file.el (url-file-build-filename): + * url-expand.el (url-identity-expander, url-default-expander): + Update all callers. + +2007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change) + + * url-auth.el (url-basic-auth): When prompting for username + and password, default to the username and password in the URL. + 2007-08-08 Glenn Morris <rgm@gnu.org> * url-auth.el, url-cache.el, url-dav.el, url-file.el, vc-dav.el: diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 3c33fd914e5..e48a4e293bd 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -317,5 +317,5 @@ RATING a rating between 1 and 10 of the strength of the authentication. (provide 'url-auth) -;;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 +;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 ;;; url-auth.el ends here diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index b58c1672865..3c2ea872134 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -194,7 +194,7 @@ (while children (setq node (car children) node-type (intern - (or + (or (cdr-safe (assq url-dav-datatype-attribute (xml-node-attributes node))) "unknown")) @@ -864,7 +864,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. (exists-p (url-http-file-exists-p newname))) (if (and exists-p - (or + (or (null overwrite) (and (numberp overwrite) (not (yes-or-no-p @@ -933,19 +933,19 @@ Returns nil if DIR contains no name starting with FILE." (defun url-dav-register-handler (op) (put op 'url-file-handlers (intern-soft (format "url-dav-%s" op)))) -(mapcar 'url-dav-register-handler - ;; These handlers are disabled because they incorrectly presume that - ;; the URL specifies an HTTP location and thus break FTP URLs. - '(;; file-name-all-completions - ;; file-name-completion - ;; rename-file - ;; make-directory - ;; file-directory-p - ;; directory-files - ;; delete-file - ;; delete-directory - ;; file-attributes - )) +(mapc 'url-dav-register-handler + ;; These handlers are disabled because they incorrectly presume that + ;; the URL specifies an HTTP location and thus break FTP URLs. + '(;; file-name-all-completions + ;; file-name-completion + ;; rename-file + ;; make-directory + ;; file-directory-p + ;; directory-files + ;; delete-file + ;; delete-directory + ;; file-attributes + )) ;;; Version Control backend cruft diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el index 7b3b105d951..df4de29a619 100644 --- a/lisp/url/url-expand.el +++ b/lisp/url/url-expand.el @@ -106,24 +106,24 @@ path components followed by `..' are removed, along with the `..' itself." (url-recreate-url urlobj))))) (defun url-identity-expander (urlobj defobj) - (url-set-type urlobj (or (url-type urlobj) (url-type defobj)))) + (setf (url-type urlobj) (or (url-type urlobj) (url-type defobj)))) (defun url-default-expander (urlobj defobj) ;; The default expansion routine - urlobj is modified by side effect! (if (url-type urlobj) ;; Well, they told us the scheme, let's just go with it. nil - (url-set-type urlobj (or (url-type urlobj) (url-type defobj))) - (url-set-port urlobj (or (url-port urlobj) - (and (string= (url-type urlobj) - (url-type defobj)) - (url-port defobj)))) + (setf (url-type urlobj) (or (url-type urlobj) (url-type defobj))) + (setf (url-port urlobj) (or (url-port urlobj) + (and (string= (url-type urlobj) + (url-type defobj)) + (url-port defobj)))) (if (not (string= "file" (url-type urlobj))) - (url-set-host urlobj (or (url-host urlobj) (url-host defobj)))) + (setf (url-host urlobj) (or (url-host urlobj) (url-host defobj)))) (if (string= "ftp" (url-type urlobj)) - (url-set-user urlobj (or (url-user urlobj) (url-user defobj)))) + (setf (url-user urlobj) (or (url-user urlobj) (url-user defobj)))) (if (string= (url-filename urlobj) "") - (url-set-filename urlobj "/")) + (setf (url-filename urlobj) "/")) (if (string-match "^/" (url-filename urlobj)) nil (let ((query nil) @@ -136,9 +136,10 @@ path components followed by `..' are removed, along with the `..' itself." (setq file (url-filename urlobj))) (setq file (url-expander-remove-relative-links (concat (url-basepath (url-filename defobj)) file))) - (url-set-filename urlobj (if query (concat file sepchar query) file)))))) + (setf (url-filename urlobj) + (if query (concat file sepchar query) file)))))) (provide 'url-expand) -;;; arch-tag: 7b5f744b-b721-49da-be47-484631680a5a +;; arch-tag: 7b5f744b-b721-49da-be47-484631680a5a ;;; url-expand.el ends here diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 6e771c9cd69..c361016856b 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -127,10 +127,11 @@ to them." ;; straighten it out for us? ;; (if (and (file-directory-p filename) ;; (not (string-match (format "%c$" directory-sep-char) filename))) - ;; (url-set-filename url (format "%s%c" filename directory-sep-char))) + ;; (setf (url-filename url) + ;; (format "%s%c" filename directory-sep-char))) (if (and (file-directory-p filename) (not (string-match "/\\'" filename))) - (url-set-filename url (format "%s/" filename))) + (setf (url-filename url) (format "%s/" filename))) ;; If it is a directory, look for an index file first. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 148449d41cf..c5931c7d877 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -429,7 +429,8 @@ should be shown to the user." (when (and connection (string= (downcase connection) "close")) (delete-process url-http-process))))) - (let ((class nil) + (let ((buffer (current-buffer)) + (class nil) (success nil)) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) @@ -447,7 +448,7 @@ should be shown to the user." ;; 100 = Continue with request ;; 101 = Switching protocols ;; 102 = Processing (Added by DAV) - (url-mark-buffer-as-dead (current-buffer)) + (url-mark-buffer-as-dead buffer) (error "HTTP responses in class 1xx not supported (%d)" url-http-response-status)) (2 ; Success ;; 200 Ok @@ -461,14 +462,14 @@ should be shown to the user." (case url-http-response-status ((204 205) ;; No new data, just stay at the same document - (url-mark-buffer-as-dead (current-buffer)) + (url-mark-buffer-as-dead buffer) (setq success t)) (otherwise ;; Generic success for all others. Store in the cache, and ;; mark it as successful. (widen) (if (and url-automatic-caching (equal url-http-method "GET")) - (url-store-in-cache (current-buffer))) + (url-store-in-cache buffer)) (setq success t)))) (3 ; Redirection ;; 300 Multiple choices @@ -584,7 +585,7 @@ should be shown to the user." (url-retrieve-internal redirect-uri url-callback-function url-callback-arguments)) - (url-mark-buffer-as-dead (current-buffer))) + (url-mark-buffer-as-dead buffer)) ;; We hit url-max-redirections, so issue an error and ;; stop redirecting. (url-http-debug "Maximum redirections reached") @@ -625,7 +626,7 @@ should be shown to the user." (url-http-handle-authentication nil)) (402 ;; This code is reserved for future use - (url-mark-buffer-as-dead (current-buffer)) + (url-mark-buffer-as-dead buffer) (error "Somebody wants you to give them money")) (403 ;; The server understood the request, but is refusing to @@ -780,7 +781,7 @@ should be shown to the user." (error "Unknown class of HTTP response code: %d (%d)" class url-http-response-status))) (if (not success) - (url-mark-buffer-as-dead (current-buffer))) + (url-mark-buffer-as-dead buffer)) (url-http-debug "Finished parsing HTTP headers: %S" success) (widen) success)) diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index 10d08b9633f..4b15d07245b 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -66,7 +66,7 @@ (if (url-user url) ;; malformed mailto URL (mailto://wmperry@gnu.org) instead of ;; mailto:wmperry@gnu.org - (url-set-filename url (concat (url-user url) "@" (url-filename url)))) + (setf (url-filename url) (concat (url-user url) "@" (url-filename url)))) (setq url (url-filename url)) (let (to args source-url subject func headers-start) (if (string-match (regexp-quote "?") url) diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 89c36bec737..94dcd49f00d 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -89,19 +89,19 @@ ;; First check if its something like hostname:port ((string-match "^\\([^:]+\\):\\([0-9]+\\)$" env-proxy) (setq urlobj (url-generic-parse-url nil)) ; Get a blank object - (url-set-type urlobj "http") - (url-set-host urlobj (match-string 1 env-proxy)) - (url-set-port urlobj (string-to-number (match-string 2 env-proxy)))) + (setf (url-type urlobj) "http") + (setf (url-host urlobj) (match-string 1 env-proxy)) + (setf (url-port urlobj) (string-to-number (match-string 2 env-proxy)))) ;; Then check if its a fully specified URL ((string-match url-nonrelative-link env-proxy) (setq urlobj (url-generic-parse-url env-proxy)) - (url-set-type urlobj "http") - (url-set-target urlobj nil)) + (setf (url-type urlobj) "http") + (setf (url-target urlobj) nil)) ;; Finally, fall back on the assumption that its just a hostname (t (setq urlobj (url-generic-parse-url nil)) ; Get a blank object - (url-set-type urlobj "http") - (url-set-host urlobj env-proxy))) + (setf (url-type urlobj) "http") + (setf (url-host urlobj) env-proxy))) (if (and (not cur-proxy) urlobj) (progn diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el index a793cacc5bc..f70726407d3 100644 --- a/lisp/url/url-misc.el +++ b/lisp/url/url-misc.el @@ -75,7 +75,7 @@ (let* ((type (intern (downcase (url-type url)))) (server (url-host url)) (name (url-user url)) - (port (url-port url))) + (port (number-to-string (url-port url)))) (url-do-terminal-emulator type server port name)) nil) diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el index 48f332fe7a0..d774270aced 100644 --- a/lisp/url/url-news.el +++ b/lisp/url/url-news.el @@ -102,8 +102,8 @@ (goto-char (point-min)) (gnus-group-read-ephemeral-group newsgroup (list 'nntp host - 'nntp-open-connection-function - nntp-open-connection-function) + (list 'nntp-open-connection-function + nntp-open-connection-function)) nil (cons (current-buffer) 'browse))) diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 3dfc7ac86a2..9f3437f401c 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el @@ -27,64 +27,24 @@ ;;; Code: (require 'url-vars) +(eval-when-compile (require 'cl)) (autoload 'url-scheme-get-property "url-methods") -(defmacro url-type (urlobj) - `(aref ,urlobj 0)) +(defstruct (url + (:constructor nil) + (:constructor url-parse-make-urlobj + (&optional type user password host portspec filename + target attributes fullness)) + (:copier nil)) + type user password host portspec filename target attributes fullness) -(defmacro url-user (urlobj) - `(aref ,urlobj 1)) +(defsubst url-port (urlobj) + (or (url-portspec urlobj) + (if (url-fullness urlobj) + (url-scheme-get-property (url-type urlobj) 'default-port)))) -(defmacro url-password (urlobj) - `(aref ,urlobj 2)) - -(defmacro url-host (urlobj) - `(aref ,urlobj 3)) - -(defmacro url-port (urlobj) - `(or (aref ,urlobj 4) - (if (url-fullness ,urlobj) - (url-scheme-get-property (url-type ,urlobj) 'default-port)))) - -(defmacro url-filename (urlobj) - `(aref ,urlobj 5)) - -(defmacro url-target (urlobj) - `(aref ,urlobj 6)) - -(defmacro url-attributes (urlobj) - `(aref ,urlobj 7)) - -(defmacro url-fullness (urlobj) - `(aref ,urlobj 8)) - -(defmacro url-set-type (urlobj type) - `(aset ,urlobj 0 ,type)) - -(defmacro url-set-user (urlobj user) - `(aset ,urlobj 1 ,user)) - -(defmacro url-set-password (urlobj pass) - `(aset ,urlobj 2 ,pass)) - -(defmacro url-set-host (urlobj host) - `(aset ,urlobj 3 ,host)) - -(defmacro url-set-port (urlobj port) - `(aset ,urlobj 4 ,port)) - -(defmacro url-set-filename (urlobj file) - `(aset ,urlobj 5 ,file)) - -(defmacro url-set-target (urlobj targ) - `(aset ,urlobj 6 ,targ)) - -(defmacro url-set-attributes (urlobj targ) - `(aset ,urlobj 7 ,targ)) - -(defmacro url-set-full (urlobj val) - `(aset ,urlobj 8 ,val)) +(defsetf url-port (urlobj) (port) `(setf (url-portspec ,urlobj) ,port)) ;;;###autoload (defun url-recreate-url (urlobj) @@ -123,17 +83,14 @@ Format is: ;; See RFC 3986. (cond ((null url) - (make-vector 9 nil)) + (url-parse-make-urlobj)) ((or (not (string-match url-nonrelative-link url)) (= ?/ (string-to-char url))) ;; This isn't correct, as a relative URL can be a fragment link ;; (e.g. "#foo") and many other things (see section 4.2). ;; However, let's not fix something that isn't broken, especially ;; when close to a release. - (let ((retval (make-vector 9 nil))) - (url-set-filename retval url) - (url-set-full retval nil) - retval)) + (url-parse-make-urlobj nil nil nil nil nil url)) (t (with-temp-buffer (set-syntax-table url-parse-syntax-table) @@ -214,7 +171,8 @@ Format is: (setq file (buffer-substring save-pos (point))) (if (and host (string-match "%[0-9][0-9]" host)) (setq host (url-unhex-string host))) - (vector prot user pass host port file refs attr full)))))) + (url-parse-make-urlobj + prot user pass host port file refs attr full)))))) (provide 'url-parse) diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index fa971da5d17..9f73fa435be 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -168,7 +168,7 @@ Strips out default port numbers, etc." type (url-type data)) (if (member type '("www" "about" "mailto" "info")) (setq retval url) - (url-set-target data nil) + (setf (url-target data) nil) (setq retval (url-recreate-url data))) retval)) @@ -190,7 +190,7 @@ Will not do anything if `url-show-status' is nil." (let* ((raw (if specified-time (current-time-string specified-time) (current-time-string))) (gmt (timezone-make-date-arpa-standard raw - (nth 1 (current-time-zone)) + (current-time-zone) "GMT")) (parsed (timezone-parse-date gmt)) (day (cdr-safe (assoc (substring raw 0 3) url-weekday-alist))) @@ -421,13 +421,13 @@ WIDTH defaults to the current frame width." (string-match "/" fname)) (setq fname (substring fname (match-end 0) nil) modified (1+ modified)) - (url-set-filename urlobj fname) + (setf (url-filename urlobj) fname) (setq url (url-recreate-url urlobj) str-width (length url))) (if (> modified 1) (setq fname (concat "/.../" fname)) (setq fname (concat "/" fname))) - (url-set-filename urlobj fname) + (setf (url-filename urlobj) fname) (setq url (url-recreate-url urlobj))) url)) diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 35e69e7990b..7ddab8aab64 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -62,12 +62,12 @@ (defvar url-current-mime-headers nil "A parsed representation of the MIME headers for the current url.") -(mapcar 'make-variable-buffer-local - '( - url-current-object - url-current-referer - url-current-mime-headers - )) +(mapc 'make-variable-buffer-local + '( + url-current-object + url-current-referer + url-current-mime-headers + )) (defcustom url-honor-refresh-requests t "*Whether to do automatic page reloads. diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index 19c5c0ac9a0..840a19a0f66 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -370,7 +370,7 @@ Return non-nil if FILE is unchanged." (defun vc-arch-checkin (files rev comment) (if rev (error "Committing to a specific revision is unsupported")) ;; FIXME: This implementation probably only works for singleton filesets - (let ((summary (file-relative-name (car file) (vc-arch-root (car files))))) + (let ((summary (file-relative-name (car files) (vc-arch-root (car files))))) ;; Extract a summary from the comment. (when (or (string-match "\\`Summary:[ \t]*\\(.*[^ \t\n]\\)\\([ \t]*\n\\)*" comment) (string-match "\\`[ \t]*\\(.*[^ \t\n]\\)[ \t]*\\(\n?\\'\\|\n\\([ \t]*\n\\)+\\)" comment)) diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index c42a64969f2..18abed00939 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -5,7 +5,7 @@ ;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com> ;; Keywords: tools ;; Created: Sept 2006 -;; Version: 2007-08-03 +;; Version: 2007-09-05 ;; URL: http://launchpad.net/vc-bzr ;; This file is free software; you can redistribute it and/or modify @@ -105,6 +105,8 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' to the environment." (concat vc-bzr-admin-dirname "/branch/format")) (defconst vc-bzr-admin-revhistory (concat vc-bzr-admin-dirname "/branch/revision-history")) +(defconst vc-bzr-admin-lastrev + (concat vc-bzr-admin-dirname "/branch/last-revision")) ;;;###autoload (defun vc-bzr-registered (file) ;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file) @@ -162,7 +164,7 @@ running `vc-bzr-state'." (lexical-let* ((filename* (expand-file-name filename)) (rootdir (vc-bzr-root (file-name-directory filename*)))) - (and rootdir + (when rootdir (file-relative-name filename* rootdir)))) ;; FIXME: Also get this in a non-registered sub-directory. @@ -198,13 +200,13 @@ If any error occurred in running `bzr status', then return nil." (if (file-directory-p file) "/?" "") "[ \t\n]*$") nil t) - (let ((status (match-string 1))) + (lexical-let ((statusword (match-string 1))) ;; Erase the status text that matched. (delete-region (match-beginning 0) (match-end 0)) (setq status (and (equal ret 0) ; Seems redundant. --Stef (intern (replace-regexp-in-string " " "" - status)))))) + statusword)))))) (when status (goto-char (point-min)) (skip-chars-forward " \n\t") ;Throw away spaces. @@ -239,12 +241,12 @@ If any error occurred in running `bzr status', then return nil." (defun vc-bzr-workfile-version (file) (lexical-let* ((rootdir (vc-bzr-root file)) - (branch-format-file (concat rootdir "/" vc-bzr-admin-branch-format-file)) - (revhistory-file (concat rootdir "/" vc-bzr-admin-revhistory)) - (lastrev-file (concat rootdir "/" "branch/last-revision"))) - ;; Count lines in .bzr/branch/revision-history to avoid forking a - ;; bzr process. This looks at internal files. May break if they - ;; change their format. + (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file + rootdir)) + (revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir)) + (lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir))) + ;; This looks at internal files to avoid forking a bzr process. + ;; May break if they change their format. (if (file-exists-p branch-format-file) (with-temp-buffer (insert-file-contents branch-format-file) @@ -259,7 +261,6 @@ If any error occurred in running `bzr status', then return nil." ((looking-at "Bazaar Branch Format 6 (bzr 0.15)") ;; revno is the first number in .bzr/branch/last-revision (insert-file-contents lastrev-file) - (goto-char (line-end-position)) (if (re-search-forward "[0-9]+" nil t) (buffer-substring (match-beginning 0) (match-end 0)))))) ;; fallback to calling "bzr revno" @@ -415,14 +416,14 @@ EDITABLE is ignored." "Prepare BUFFER for `vc-annotate' on FILE. Each line is tagged with the revision number, which has a `help-echo' property containing author and date information." - (apply #'vc-bzr-command "annotate" buffer 0 file "-l" "--all" + (apply #'vc-bzr-command "annotate" buffer 0 file "--long" "--all" (if version (list "-r" version))) (with-current-buffer buffer ;; Store the tags for the annotated source lines in a hash table ;; to allow saving space by sharing the text properties. (setq vc-bzr-annotation-table (make-hash-table :test 'equal)) (goto-char (point-min)) - (while (re-search-forward "^\\( *[0-9]+\\) \\(.+\\) +\\([0-9]\\{8\\}\\) |" + (while (re-search-forward "^\\( *[0-9]+\\) +\\(.+\\) +\\([0-9]\\{8\\}\\) |" nil t) (let* ((rev (match-string 1)) (author (match-string 2)) @@ -430,9 +431,6 @@ property containing author and date information." (key (match-string 0)) (tag (gethash key vc-bzr-annotation-table))) (unless tag - (save-match-data - (string-match " +\\'" author) - (setq author (substring author 0 (match-beginning 0)))) (setq tag (propertize rev 'help-echo (concat "Author: " author ", date: " date) 'mouse-face 'highlight)) @@ -573,7 +571,6 @@ Optional argument LOCALP is always ignored." (eval-after-load "vc" '(add-to-list 'vc-directory-exclusion-list vc-bzr-admin-dirname t)) - (provide 'vc-bzr) ;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06 ;;; vc-bzr.el ends here diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index f90f698275e..0a17388ae34 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -590,7 +590,8 @@ encoded as fractional days." systime, or nil if there is none." (let* ((bol (point)) (cache (get-text-property bol 'vc-cvs-annotate-time)) - buffer-read-only) + (inhibit-read-only t) + (inhibit-modification-hooks t)) (cond (cache) ((looking-at diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 32d8d48299c..d68b33be76a 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -143,6 +143,7 @@ (defun vc-git-state (file) "Git-specific version of `vc-state'." + (call-process "git" nil nil nil "add" "--refresh" "--" (file-relative-name file)) (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--"))) (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} [ADMU]\0[^\0]+\0" diff)) 'edited @@ -189,24 +190,7 @@ 'implicit) (defun vc-git-workfile-unchanged-p (file) - ;; The reason this does not use the result of vc-git-state is that - ;; git-diff-index (used by vc-git-state) doesn't refresh the cached - ;; stat info, so if the file has been modified it will always show - ;; up as modified in vc-git-state, even if the change has been - ;; undone, until git-update-index --refresh is run. - - ;; OTOH the vc-git-workfile-unchanged-p implementation checks the - ;; actual content, so it will detect the case of a file reverted - ;; back to its original state. - - ;; The ideal implementation would be to refresh the stat cache and - ;; then call vc-git-state, but at the moment there's no git command - ;; to refresh a single file, so this will have to be added first. - (let ((sha1 (vc-git--run-command-string file "hash-object" "--")) - (head (vc-git--run-command-string file "ls-tree" "-z" "HEAD" "--"))) - (and head - (string-match "[0-7]\\{6\\} blob \\([0-9a-f]\\{40\\}\\)\t[^\0]+\0" head) - (string= (car (split-string sha1 "\n")) (match-string 1 head))))) + (eq 'up-to-date (vc-git-state file))) (defun vc-git-mode-line-string (file) "Return string for placement into the modeline for FILE." @@ -232,7 +216,7 @@ (defun vc-git-create-repo () "Create a new Git repository." - (vc-git-command "init" nil 0 nil)) + (vc-git-command nil 0 nil "init")) (defun vc-git-register (files &optional rev comment) "Register FILE into the git version-control system." @@ -318,6 +302,14 @@ ("^Author:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" (1 'change-log-name) (2 'change-log-email)) + ("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)" + (1 'change-log-name)) + ("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" + (1 'change-log-name) + (2 'change-log-email)) + ("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)" + (1 'change-log-acknowledgement) + (2 'change-log-acknowledgement)) ("^Date: \\(.+\\)" (1 'change-log-date)) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 1415f8d9499..6b9565b8bd8 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -257,8 +257,7 @@ (defvar log-view-font-lock-keywords) (define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View" - (require 'add-log) ;; we need the faces add-log - ;; Don't have file markers, so use impossible regexp. + (require 'add-log) ;; we need the add-log faces (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") (set (make-local-variable 'log-view-message-re) "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)") @@ -443,6 +442,71 @@ REV is the revision to check out into WORKFILE." (unless contents-done (with-temp-buffer (vc-hg-command t 0 file "revert")))) +;;; Hg specific functionality. + +;;; XXX This functionality is experimental/work in progress. It might +;;; change without notice. +(defvar vc-hg-extra-menu-map + (let ((map (make-sparse-keymap))) + (define-key map [incoming] '(menu-item "Show incoming" vc-hg-incoming)) + (define-key map [outgoing] '(menu-item "Show outgoing" vc-hg-outgoing)) + map)) + +(defun vc-hg-extra-menu () vc-hg-extra-menu-map) + +(define-derived-mode vc-hg-outgoing-mode vc-hg-log-view-mode "Hg-Outgoing") + +(define-derived-mode vc-hg-incoming-mode vc-hg-log-view-mode "Hg-Incoming") + +;; XXX this adds another top level menu, instead figure out how to +;; replace the Log-View menu. +(easy-menu-define log-view-mode-menu vc-hg-outgoing-mode-map + "Hg-outgoing Display Menu" + `("Hg-outgoing" + ["Push selected" vc-hg-push])) + +(easy-menu-define log-view-mode-menu vc-hg-incoming-mode-map + "Hg-incoming Display Menu" + `("Hg-incoming" + ["Pull selected" vc-hg-pull])) + +(defun vc-hg-outgoing () + (interactive) + (let ((bname "*Hg outgoing*")) + (vc-hg-command bname 0 nil "outgoing" "-n") + (pop-to-buffer bname) + (vc-hg-outgoing-mode))) + +(defun vc-hg-incoming () + (interactive) + (let ((bname "*Hg incoming*")) + (vc-hg-command bname 0 nil "incoming" "-n") + (pop-to-buffer bname) + (vc-hg-incoming-mode))) + +;; XXX maybe also add key bindings for these functions. +(defun vc-hg-push () + (interactive) + (let ((marked-list (log-view-get-marked))) + (if marked-list + (vc-hg-command + nil 0 nil + (cons "push" + (apply 'nconc + (mapcar (lambda (arg) (list "-r" arg)) marked-list)))) + (error "No log entries selected for push")))) + +(defun vc-hg-pull () + (interactive) + (let ((marked-list (log-view-get-marked))) + (if marked-list + (vc-hg-command + nil 0 nil + (cons "pull" + (apply 'nconc + (mapcar (lambda (arg) (list "-r" arg)) marked-list)))) + (error "No log entries selected for pull")))) + ;;; Internal functions (defun vc-hg-command (buffer okstatus file-or-list &rest flags) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 5b134831d08..822a7eae682 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -62,9 +62,10 @@ interpreted as hostnames." :type 'regexp :group 'vc) -(defcustom vc-handled-backends '(RCS CVS SVN SCCS Bzr Git Hg Arch MCVS) - ;; Bzr, Git, Hg, Arch and MCVS come last because they are per-tree - ;; rather than per-dir. +(defcustom vc-handled-backends '(RCS CVS SVN SCCS Bzr Git Hg Mtn Arch MCVS) + ;; RCS, CVS, SVN and SCCS come first because they are per-dir + ;; rather than per-tree. RCS comes first because of the multibackend + ;; support intended to use RCS for local commits (with a remote CVS server). "List of version control backends for which VC will be used. Entries in this list will be tried in order to determine whether a file is under that sort of version control. diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el new file mode 100644 index 00000000000..e24bf399ba1 --- /dev/null +++ b/lisp/vc-mtn.el @@ -0,0 +1,285 @@ +;;; vc-mtn.el --- VC backend for Monotone + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Stefan Monnier <monnier@iro.umontreal.ca> +;; Keywords: + +;; This file 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, or (at your option) +;; any later version. + +;; This file 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; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; + +;;; Code: + +(eval-when-compile (require 'cl) (require 'vc)) + +;; Clear up the cache to force vc-call to check again and discover +;; new functions when we reload this file. +(put 'Mtn 'vc-functions nil) + +(defvar vc-mtn-command "mtn") +(unless (executable-find vc-mtn-command) + ;; vc-mtn.el is 100% non-functional without the `mtn' executable. + (setq vc-handled-backends (delq 'Mtn vc-handled-backends))) + +;;;###autoload +(defconst vc-mtn-admin-dir "_MTN") +;;;###autoload +(defconst vc-mtn-admin-format (concat vc-mtn-admin-dir "/format")) + +;;;###autoload (defun vc-mtn-registered (file) +;;;###autoload (if (vc-find-root file vc-mtn-admin-format) +;;;###autoload (progn +;;;###autoload (load "vc-mtn") +;;;###autoload (vc-mtn-registered file)))) + +(defun vc-mtn-revision-granularity () 'repository) +(defun vc-mtn-checkout-model (file) 'implicit) + +(defun vc-mtn-root (file) + (setq file (if (file-directory-p file) + (file-name-as-directory file) + (file-name-directory file))) + (or (vc-file-getprop file 'vc-mtn-root) + (vc-file-setprop file 'vc-mtn-root + (vc-find-root file vc-mtn-admin-format)))) + + +(defun vc-mtn-registered (file) + (let ((root (vc-mtn-root file))) + (when root + (vc-mtn-state file)))) + +(defun vc-mtn-command (buffer okstatus files &rest flags) + "A wrapper around `vc-do-command' for use in vc-mtn.el." + (apply 'vc-do-command buffer okstatus vc-mtn-command files flags)) + +(defun vc-mtn-state (file) + ;; If `mtn' fails or returns status>0, or if the search files, just + ;; return nil. + (ignore-errors + (with-temp-buffer + (vc-mtn-command t 0 file "status") + (goto-char (point-min)) + (re-search-forward "^ \\(?:patched \\(.*\\)\\|no changes$\\)") + (if (match-end 1) + 'edited + 'up-to-date)))) + +(defun vc-mtn-workfile-version (file) + ;; If `mtn' fails or returns status>0, or if the search fails, just + ;; return nil. + (ignore-errors + (with-temp-buffer + (vc-mtn-command t 0 file "status") + (goto-char (point-min)) + (re-search-forward "Current branch: \\(.*\\)\nChanges against parent \\(.*\\)") + (match-string 2)))) + +(defun vc-mtn-workfile-branch (file) + ;; If `mtn' fails or returns status>0, or if the search files, just + ;; return nil. + (ignore-errors + (with-temp-buffer + (vc-mtn-command t 0 file "status") + (goto-char (point-min)) + (re-search-forward "Current branch: \\(.*\\)\nChanges against parent \\(.*\\)") + (match-string 1)))) + +(defun vc-mtn-workfile-unchanged-p (file) + (not (eq (vc-mtn-state file) 'edited))) + +;; Mode-line rewrite code copied from vc-arch.el. + +(defcustom vc-mtn-mode-line-rewrite + '(("\\`[^:/#]*[:/#]" . "")) ;Drop the host part. + "Rewrite rules to shorten Mtn's revision names on the mode-line." + :type '(repeat (cons regexp string)) + :group 'vc) + +(defun vc-mtn-mode-line-string (file) + "Return string for placement in modeline by `vc-mode-line' for FILE." + (let ((branch (vc-mtn-workfile-branch file))) + (dolist (rule vc-mtn-mode-line-rewrite) + (if (string-match (car rule) branch) + (setq branch (replace-match (cdr rule) t nil branch)))) + (format "Mtn%c%s" + (case (vc-state file) + ((up-to-date needs-patch) ?-) + (added ?@) + (t ?:)) + branch))) + +(defun vc-mtn-register (files &optional rest) + (vc-mtn-command nil 0 files "add")) + +(defun vc-mtn-responsible-p (file) (vc-mtn-root file)) +(defun vc-mtn-could-register (file) (vc-mtn-root file)) + +(defun vc-mtn-checkin (files rev comment) + (vc-mtn-command nil 0 files "commit" "-m" comment)) + +(defun vc-mtn-find-version (file rev buffer) + (vc-mtn-command buffer 0 file "cat" "-r" rev)) + +;; (defun vc-mtn-checkout (file &optional editable rev) +;; ) + +(defun vc-mtn-revert (file &optional contents-done) + (unless contents-done + (vc-mtn-command nil 0 file "revert"))) + +;; (defun vc-mtn-roolback (files) +;; ) + +(defun vc-mtn-print-log (files &optional buffer) + (vc-mtn-command buffer 0 files "log")) + +(define-derived-mode vc-mtn-log-view-mode log-view-mode "Mtn-Log-View" + ;; TODO: Not sure what to do about file markers for now. + (set (make-local-variable 'log-view-file-re) "\\'\\`") + ;; TODO: Use a more precise regexp than "[ |/]+" to avoid false positives + ;; in the ChangeLog text. + (set (make-local-variable 'log-view-message-re) + "^[ |/]+Revision: \\([0-9a-f]+\\)") + (require 'add-log) ;For change-log faces. + (set (make-local-variable 'log-view-font-lock-keywords) + (append log-view-font-lock-keywords + '(("^[ |]+Author: \\(.*\\)" (1 'change-log-email)) + ("^[ |]+Date: \\(.*\\)" (1 'change-log-date-face)))))) + +;; (defun vc-mtn-show-log-entry (version) +;; ) + +(defun vc-mtn-wash-log (file)) + +(defalias 'vc-mtn-diff-tree 'vc-mtn-diff) +(defun vc-mtn-diff (files &optional rev1 rev2 buffer) + (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff" + (append (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) + +(defun vc-mtn-annotate-command (file buf &optional rev) + (apply 'vc-mtn-command buf 0 file "annotate" + (if rev (list "-r" rev)))) + +(defconst vc-mtn-annotate-full-re + "^ *\\([0-9a-f]+\\)\\.* by [^ ]+ \\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\): ") +(defconst vc-mtn-annotate-any-re + (concat "^\\(?: +: \\|" vc-mtn-annotate-full-re "\\)")) + +(defun vc-mtn-annotate-time () + (when (looking-at vc-mtn-annotate-any-re) + (goto-char (match-end 0)) + (let ((year (match-string 2))) + (if (not year) + ;; Look for the date on a previous line. + (save-excursion + (get-text-property (1- (previous-single-property-change + (point) 'vc-mtn-time nil (point-min))) + 'vc-mtn-time)) + (let ((time (vc-annotate-convert-time + (encode-time 0 0 0 + (string-to-number (match-string 4)) + (string-to-number (match-string 3)) + (string-to-number year) + t)))) + (let ((inhibit-read-only t) + (inhibit-modification-hooks t)) + (put-text-property (match-beginning 0) (match-end 0) + 'vc-mtn-time time)) + time))))) + +(defun vc-mtn-annotate-extract-revision-at-line () + (save-excursion + (when (or (looking-at vc-mtn-annotate-full-re) + (re-search-backward vc-mtn-annotate-full-re nil t)) + (match-string 1)))) + +;;; Revision completion. + +(defun vc-mtn-list-tags () + (with-temp-buffer + (vc-mtn-command t 0 nil "list" "tags") + (goto-char (point-min)) + (let ((tags ())) + (while (re-search-forward "^[^ ]+" nil t) + (push (match-string 0) tags)) + tags))) + +(defun vc-mtn-list-branches () + (with-temp-buffer + (vc-mtn-command t 0 nil "list" "branches") + (goto-char (point-min)) + (let ((branches ())) + (while (re-search-forward "^.+" nil t) + (push (match-string 0) branches)) + branches))) + +(defun vc-mtn-list-revision-ids (prefix) + (with-temp-buffer + (vc-mtn-command t 0 nil "complete" "revision" prefix) + (goto-char (point-min)) + (let ((ids ())) + (while (re-search-forward "^.+" nil t) + (push (match-string 0) ids)) + ids))) + +(defun vc-mtn-revision-completion-table (file) + ;; TODO: Implement completion for for selectors + ;; TODO: Implement completion for composite selectors. + (lexical-let ((file file)) + (lambda (string pred action) + (cond + ;; "Tag" selectors. + ((string-match "\\`t:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "t:" tag)) + (vc-mtn-list-tags)) + string pred)) + ;; "Branch" selectors. + ((string-match "\\`b:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "b:" tag)) + (vc-mtn-list-branches)) + string pred)) + ;; "Head" selectors. Not sure how they differ from "branch" selectors. + ((string-match "\\`h:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "h:" tag)) + (vc-mtn-list-branches)) + string pred)) + ;; "ID" selectors. + ((string-match "\\`i:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "i:" tag)) + (vc-mtn-list-revision-ids + (substring string (match-end 0)))) + string pred)) + (t + (complete-with-action action + '("t:" "b:" "h:" "i:" + ;; Completion not implemented for these. + "a:" "c:" "d:" "e:" "l:") + string pred)))))) + + + +(provide 'vc-mtn) + +;; arch-tag: 2b89ffbc-cbb8-405a-9080-2eafd4becb70 +;;; vc-mtn.el ends here diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 0b34c30f630..bf003f2ac97 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -24,11 +24,8 @@ ;;; Commentary: -;; This is preliminary support for Subversion (http://subversion.tigris.org/). -;; It started as `sed s/cvs/svn/ vc.cvs.el' (from version 1.56) -;; and hasn't been completely fixed since. - -;; Sync'd with Subversion's vc-svn.el as of revision 5801. +;; Sync'd with Subversion's vc-svn.el as of revision 5801. but this version +;; has been extensively modified since to handle filesets. ;;; Bugs: @@ -382,7 +379,16 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (let ((inhibit-read-only t)) (goto-char (point-min)) ;; Add a line to tell log-view-mode what file this is. - (insert "Working file(s): " (vc-delistify (mapcar 'file-relative-name files)) "\n")) + ;; FIXME if there are multiple files, log-view-current-file + ;; breaks. It's trivial to adapt log-view-file-re for the + ;; changed prefix, but less trivial to make + ;; log-view-current-file actually do the right thing in the + ;; multiple file case. + (insert (format "Working file%s: " + (if (= (length files) 1) + "" + "s")) + (vc-delistify (mapcar 'file-relative-name files)) "\n")) (vc-svn-command buffer (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0) @@ -433,7 +439,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (defun vc-svn-diff-tree (dir &optional rev1 rev2) "Diff all files at and below DIR." - (vc-svn-diff (file-name-as-directory dir) rev1 rev2)) + (vc-svn-diff (list (file-name-as-directory dir)) rev1 rev2)) ;;; ;;; Snapshot system @@ -512,6 +518,33 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." ;; behavior for different modules on the same server. (match-string 1)))) +(defun vc-svn-resolve-when-done () + "Call \"svn resolved\" if the conflict markers have been removed." + (save-excursion + (goto-char (point-min)) + (if (not (re-search-forward "^<<<<<<< " nil t)) + (vc-svn-command nil 0 buffer-file-name "resolved")))) + +;; Inspired by vc-arch-find-file-hook. +(defun vc-svn-find-file-hook () + (when (eq ?C (vc-file-getprop buffer-file-name 'vc-svn-status)) + ;; If the file is marked as "conflicted", then we should try and call + ;; "svn resolved" when applicable. + (if (save-excursion + (goto-char (point-min)) + (re-search-forward "^<<<<<<< " nil t)) + ;; There are conflict markers. + (progn + (smerge-mode 1) + (add-hook 'after-save-hook 'vc-svn-resolve-when-done nil t)) + ;; There are no conflict markers. This is problematic: maybe it means + ;; the conflict has been resolved and we should immediately call "svn + ;; resolved", or it means that the file's type does not allow Svn to + ;; use conflict markers in which case we don't really know what to do. + ;; So let's just punt for now. + nil) + (message "There are unresolved conflicts in this file"))) + (defun vc-svn-parse-status (&optional filename) "Parse output of \"svn status\" command in the current buffer. Set file properties accordingly. Unless FILENAME is non-nil, parse only @@ -534,6 +567,8 @@ information about FILENAME and return its status." ;; Use the last-modified revision, so that searching in vc-print-log ;; output works. (vc-file-setprop file 'vc-workfile-version (match-string 3)) + ;; Remember Svn's own status. + (vc-file-setprop file 'vc-svn-status status) (vc-file-setprop file 'vc-state (cond diff --git a/lisp/vc.el b/lisp/vc.el index 7d8c78c24a8..bfcea833c9d 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -7,8 +7,6 @@ ;; Maintainer: Andre Spiegel <spiegel@gnu.org> ;; Keywords: tools -;; $Id$ - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -29,8 +27,9 @@ ;;; Credits: ;; VC was initially designed and implemented by Eric S. Raymond -;; <esr@snark.thyrsus.com>. Over the years, many people have +;; <esr@thyrsus.com> in 1992. Over the years, many other people have ;; contributed substantial amounts of work to VC. These include: +;; ;; Per Cederqvist <ceder@lysator.liu.se> ;; Paul Eggert <eggert@twinsun.com> ;; Sebastian Kremer <sk@thp.uni-koeln.de> @@ -41,14 +40,32 @@ ;; Andre Spiegel <spiegel@gnu.org> ;; Richard Stallman <rms@gnu.org> ;; Thien-Thi Nguyen <ttn@gnu.org> +;; +;; In July 2007 ESR returned and redesigned the mode to cope better +;; with modern version-control systems that do commits by fileset +;; rather than per individual file. +;; +;; Features in the new version: +;; * Key commands (vc-next-action = C-x v v, vc-print-log = C-x v l, vc-revert +;; = C-x v u, vc-rollback = C-x v c, vc-diff = C-x v =, vc-update = C-x v +) +;; now operate on filesets rather than individual files. +;; * The fileset for a command is either (a) all marked files in VC-dired +;; mode, (b) the currently visited file if it's under version control, +;; or (c) the current directory if the visited buffer is not under +;; version control and a wildcarding-enable flag has been set. +;; +;; If you maintain a client of the mode or customize it in your .emacs, +;; note that some backend functions which formerly took single file arguments +;; now take a list of files. These include: register, checkin, print-log, +;; rollback, and diff. ;;; Commentary: ;; This mode is fully documented in the Emacs user's manual. ;; ;; Supported version-control systems presently include CVS, RCS, GNU -;; Arch, Subversion, Bzr, Mercurial, Meta-CVS, and SCCS (or its free -;; replacement, CSSC). +;; Arch, Subversion, Bzr, Git, Mercurial, Meta-CVS, Monotone and SCCS +;; (or its free replacement, CSSC). ;; ;; Some features will not work with old RCS versions. Where ;; appropriate, VC finds out which version you have, and allows or @@ -91,7 +108,7 @@ ;; VC keeps some per-file information in the form of properties (see ;; vc-file-set/getprop in vc-hooks.el). The backend-specific functions ;; do not generally need to be aware of these properties. For example, -;; `vc-sys-workfile-version' should compute the workfile version and +;; `vc-sys-workfile-version' should compute the focus version and ;; return it; it should not look it up in the property, and it needn't ;; store it there either. However, if a backend-specific function does ;; store a value in a property, that value takes precedence over any @@ -106,9 +123,11 @@ ;; ;; * revision-granularity ;; -;; Takes no arguments. Returns either 'file or 'repository. -;; FIXME: What does this mean? Why "repository"? -;; +;; Takes no arguments. Returns either 'file or 'repository. Backends +;; that return 'file have per-file revision numbering; backends +;; that return 'repository have per-repository revision numbering, +;; so a revision level implicitly identifies a changeset +;; ;; STATE-QUERYING FUNCTIONS ;; ;; * registered (file) @@ -145,14 +164,17 @@ ;; ;; * workfile-version (file) ;; -;; Return the current workfile version of FILE. +;; Return the current focus version of FILE. This is the version fetched +;; by the last checkout or upate, not necessarily the same thing as the +;; head or tip version. Should return "0" for a file added but not yet +;; committed. ;; ;; - latest-on-branch-p (file) ;; -;; Return non-nil if the current workfile version of FILE is the latest -;; on its branch. The default implementation always returns t, which -;; means that working with non-current versions is not supported by -;; default. +;; Return non-nil if the focus version of FILE is the latest version +;; on its branch (many VCSes call this the 'tip' or 'head' version). +;; The default implementation always returns t, which means that +;; working with non-current versions is not supported by default. ;; ;; * checkout-model (file) ;; @@ -161,13 +183,14 @@ ;; ;; - workfile-unchanged-p (file) ;; -;; Return non-nil if FILE is unchanged from its current workfile -;; version. This function should do a brief comparison of FILE's -;; contents with those of the master version. If the backend does not -;; have such a brief-comparison feature, the default implementation of +;; Return non-nil if FILE is unchanged from the focus version. This +;; function should do a brief comparison of FILE's contents with +;; those of the repository version. If the backend does not have +;; such a brief-comparison feature, the default implementation of ;; this function can be used, which delegates to a full ;; vc-BACKEND-diff. (Note that vc-BACKEND-diff must not run -;; asynchronously in this case, see variable `vc-disable-async-diff'.) +;; asynchronously in this case, see variable +;; `vc-disable-async-diff'.) ;; ;; - mode-line-string (file) ;; @@ -186,7 +209,7 @@ ;; ;; STATE-CHANGING FUNCTIONS ;; -;; * create-repo () +;; * create-repo (backend) ;; ;; Create an empty repository in the current directory and initialize ;; it so VC mode can add files to it. For file-oriented systems, this @@ -254,7 +277,7 @@ ;; Check out revision REV of FILE into the working area. If EDITABLE ;; is non-nil, FILE should be writable by the user and if locking is ;; used for FILE, a lock should also be set. If REV is non-nil, that -;; is the revision to check out (default is current workfile version). +;; is the revision to check out (default is the focus version). ;; If REV is t, that means to check out the head of the current branch; ;; if it is the empty string, check out the head of the trunk. ;; The implementation should pass the value of vc-checkout-switches @@ -262,7 +285,7 @@ ;; ;; * revert (file &optional contents-done) ;; -;; Revert FILE back to the current workfile version. If optional +;; Revert FILE back to the current focus version. If optional ;; arg CONTENTS-DONE is non-nil, then the contents of FILE have ;; already been reverted from a version backup, and this function ;; only needs to update the status of FILE within the backend. @@ -286,10 +309,10 @@ ;; ;; - steal-lock (file &optional version) ;; -;; Steal any lock on the current workfile version of FILE, or on -;; VERSION if that is provided. This function is only needed if -;; locking is used for files under this backend, and if files can -;; indeed be locked by other users. +;; Steal any lock on the focus version of FILE, or on VERSION if +;; that is provided. This function is only needed if locking is +;; used for files under this backend, and if files can indeed be +;; locked by other users. ;; ;; HISTORY FUNCTIONS ;; @@ -313,8 +336,7 @@ ;; ;; - wash-log (file) ;; -;; Remove all non-comment information from the output of print-log. The -;; default implementation of this function works for RCS-style logs. +;; Remove all non-comment information from the output of print-log. ;; ;; - logentry-check () ;; @@ -342,13 +364,13 @@ ;; ;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if ;; BUFFER is nil. If REV1 and REV2 are non-nil, report differences -;; from REV1 to REV2. If REV1 is nil, use the current workfile -;; version (as found in the repository) as the older version; if -;; REV2 is nil, use the current workfile contents as the newer -;; version. This function should pass the value of (vc-switches -;; BACKEND 'diff) to the backend command. It should return a status -;; of either 0 (no differences found), or 1 (either non-empty diff -;; or the diff is run asynchronously). +;; from REV1 to REV2. If REV1 is nil, use the focus version (as +;; found in the repository) as the older version; if REV2 is nil, +;; use the current working-copy contents as the newer version. This +;; function should pass the value of (vc-switches BACKEND 'diff) to +;; the backend command. It should return a status of either 0 (no +;; differences found), or 1 (either non-empty diff or the diff is +;; run asynchronously). ;; ;; - revision-completion-table (file) ;; @@ -591,7 +613,7 @@ These are passed to the checkin program by \\[vc-register]." :version "20.3") (defcustom vc-dired-terse-display t - "If non-nil, show only locked files in VC Dired." + "If non-nil, show only locked or locally modified files in VC Dired." :type 'boolean :group 'vc :version "20.3") @@ -652,7 +674,7 @@ See `run-hooks'." ;;;###autoload (defcustom vc-checkin-hook nil - "Normal hook (list of functions) run after a checkin is done. + "Normal hook (list of functions) run after commit or file checkin. See also `log-edit-done-hook'." :type 'hook :options '(log-edit-comment-to-change-log) @@ -660,7 +682,7 @@ See also `log-edit-done-hook'." ;;;###autoload (defcustom vc-before-checkin-hook nil - "Normal hook (list of functions) run before a file is checked in. + "Normal hook (list of functions) run before a commit or a file checkin. See `run-hooks'." :type 'hook :group 'vc) @@ -756,7 +778,7 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." (define-key m "L" 'vc-annotate-show-log-revision-at-line) (define-key m "N" 'vc-annotate-next-version) (define-key m "P" 'vc-annotate-prev-version) - (define-key m "W" 'vc-annotate-workfile-version) + (define-key m "W" 'vc-annotate-focus-version) m) "Local keymap used for VC-Annotate mode.") @@ -819,59 +841,6 @@ in their implementation of vc-BACKEND-diff.") (defvar vc-dired-mode nil) (make-variable-buffer-local 'vc-dired-mode) -;; functions that operate on RCS revision numbers. This code should -;; also be moved into the backends. It stays for now, however, since -;; it is used in code below. -;;;###autoload -(defun vc-trunk-p (rev) - "Return t if REV is a revision on the trunk." - (not (eq nil (string-match "\\`[0-9]+\\.[0-9]+\\'" rev)))) - -(defun vc-branch-p (rev) - "Return t if REV is a branch revision." - (not (eq nil (string-match "\\`[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*\\'" rev)))) - -;;;###autoload -(defun vc-branch-part (rev) - "Return the branch part of a revision number REV." - (let ((index (string-match "\\.[0-9]+\\'" rev))) - (if index - (substring rev 0 index)))) - -(defun vc-minor-part (rev) - "Return the minor version number of a revision number REV." - (string-match "[0-9]+\\'" rev) - (substring rev (match-beginning 0) (match-end 0))) - -(defun vc-default-previous-version (backend file rev) - "Return the version number immediately preceding REV for FILE, -or nil if there is no previous version. This default -implementation works for MAJOR.MINOR-style version numbers as -used by RCS and CVS." - (let ((branch (vc-branch-part rev)) - (minor-num (string-to-number (vc-minor-part rev)))) - (when branch - (if (> minor-num 1) - ;; version does probably not start a branch or release - (concat branch "." (number-to-string (1- minor-num))) - (if (vc-trunk-p rev) - ;; we are at the beginning of the trunk -- - ;; don't know anything to return here - nil - ;; we are at the beginning of a branch -- - ;; return version of starting point - (vc-branch-part branch)))))) - -(defun vc-default-next-version (backend file rev) - "Return the version number immediately following REV for FILE, -or nil if there is no next version. This default implementation -works for MAJOR.MINOR-style version numbers as used by RCS -and CVS." - (when (not (string= rev (vc-workfile-version file))) - (let ((branch (vc-branch-part rev)) - (minor-num (string-to-number (vc-minor-part rev)))) - (concat branch "." (number-to-string (1+ minor-num)))))) - ;; File property caching (defun vc-clear-context () @@ -894,20 +863,15 @@ been updated to their corresponding values." property (cdr setting))))) ,settings))) -;; Random helper functions - -(defsubst vc-editable-p (file) - "Return non-nil if FILE can be edited." - (or (eq (vc-checkout-model file) 'implicit) - (memq (vc-state file) '(edited needs-merge)))) - ;; Two macros for elisp programming + ;;;###autoload (defmacro with-vc-file (file comment &rest body) "Check out a writable copy of FILE if necessary, then execute BODY. Check in FILE with COMMENT (a string) after BODY has been executed. FILE is passed through `expand-file-name'; BODY executed within -`save-excursion'. If FILE is not under version control, or locked by +`save-excursion'. If FILE is not under version control, or you are +using a locking version-control system and the file is locked by somebody else, signal error." (declare (debug t) (indent 2)) (let ((filevar (make-symbol "file"))) @@ -938,16 +902,7 @@ However, before executing BODY, find FILE, and after BODY, save buffer." ,@body (save-buffer))))) -(defun vc-ensure-vc-buffer () - "Make sure that the current buffer visits a version-controlled file." - (if vc-dired-mode - (set-buffer (find-file-noselect (dired-get-filename))) - (while vc-parent-buffer - (set-buffer vc-parent-buffer)) - (if (not buffer-file-name) - (error "Buffer %s is not associated with a file" (buffer-name)) - (if (not (vc-backend buffer-file-name)) - (error "File %s is not under version control" buffer-file-name))))) +;; Common command execution logic to be used by backends (defun vc-process-filter (p s) "An alternative output filter for async process P. @@ -977,6 +932,33 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary." (inhibit-read-only t)) (erase-buffer)))) +(defvar vc-sentinel-movepoint) ;Dynamically scoped. + +(defun vc-process-sentinel (p s) + (let ((previous (process-get p 'vc-previous-sentinel))) + (if previous (funcall previous p s)) + (with-current-buffer (process-buffer p) + (let (vc-sentinel-movepoint) + ;; Normally, we want async code such as sentinels to not move point. + (save-excursion + (goto-char (process-mark p)) + (let ((cmds (process-get p 'vc-sentinel-commands))) + (process-put p 'vc-postprocess nil) + (dolist (cmd cmds) + ;; Each sentinel may move point and the next one should be run + ;; at that new point. We could get the same result by having + ;; each sentinel read&set process-mark, but since `cmd' needs + ;; to work both for async and sync processes, this would be + ;; difficult to achieve. + (vc-exec-after cmd)))) + ;; But sometimes the sentinels really want to move point. + (if vc-sentinel-movepoint + (let ((win (get-buffer-window (current-buffer) 0))) + (if (not win) + (goto-char vc-sentinel-movepoint) + (with-selected-window win + (goto-char vc-sentinel-movepoint))))))))) + (defun vc-exec-after (code) "Eval CODE when the current buffer's process is done. If the current buffer has no process, just evaluate CODE. @@ -994,17 +976,12 @@ Else, add CODE to the process' sentinel." (eval code)) ;; If a process is running, add CODE to the sentinel ((eq (process-status proc) 'run) - (let ((sentinel (process-sentinel proc))) - (set-process-sentinel proc - `(lambda (p s) - (with-current-buffer ',(current-buffer) - (save-excursion - (goto-char (process-mark p)) - ,@(append (cdr (cdr (car ;Strip off (save-exc (goto-char...) - (cdr (cdr ;Strip off (with-current-buffer buf - (car (cdr (cdr ;Strip off (lambda (p s) - sentinel)))))))) - (list `(vc-exec-after ',code))))))))) + (let ((previous (process-sentinel proc))) + (unless (eq previous 'vc-process-sentinel) + (process-put proc 'vc-previous-sentinel previous)) + (set-process-sentinel proc 'vc-process-sentinel)) + (process-put proc 'vc-sentinel-commands + (cons code (process-get proc 'vc-sentinel-commands)))) (t (error "Unexpected process state")))) nil) @@ -1013,11 +990,13 @@ Else, add CODE to the process' sentinel." Each function is called inside the buffer in which the command was run and is passed 3 arguments: the COMMAND, the FILE and the FLAGS.") +(defvar w32-quote-process-args) + (defun vc-delistify (filelist) "Smash a FILELIST into a file list string suitable for info messages." + ;; FIXME what about file names with spaces? (if (not filelist) "." (mapconcat 'identity filelist " "))) -(defvar w32-quote-process-args) ;;;###autoload (defun vc-do-command (buffer okstatus command file-or-list &rest flags) "Execute a VC command, notifying user and checking for errors. @@ -1064,6 +1043,7 @@ that is inserted into the command line before the filename." ;; start-process does not support remote execution (setq okstatus nil)) (if (eq okstatus 'async) + ;; Run asynchronously (let ((proc (let ((process-connection-type nil)) (apply 'start-process command (current-buffer) command @@ -1088,7 +1068,8 @@ that is inserted into the command line before the filename." (if vc-command-messages (message "Running %s...OK" full-command))) (vc-exec-after - `(run-hook-with-args 'vc-post-command-functions ',command ',file-or-list ',flags)) + `(run-hook-with-args 'vc-post-command-functions + ',command ',file-or-list ',flags)) status)))) (defun vc-position-context (posn) @@ -1205,7 +1186,74 @@ CONTEXT is that which `vc-buffer-context' returns." (let ((new-mark (vc-find-position-by-context mark-context))) (if new-mark (set-mark new-mark)))))) -(defun vc-revert-buffer1 (&optional arg no-confirm) +(defun vc-responsible-backend (file &optional register) + "Return the name of a backend system that is responsible for FILE. +The optional argument REGISTER means that a backend suitable for +registration should be found. + +If REGISTER is nil, then if FILE is already registered, return the +backend of FILE. If FILE is not registered, or a directory, then the +first backend in `vc-handled-backends' that declares itself +responsible for FILE is returned. If no backend declares itself +responsible, return the first backend. + +If REGISTER is non-nil, return the first responsible backend under +which FILE is not yet registered. If there is no such backend, return +the first backend under which FILE is not yet registered, but could +be registered." + (if (not vc-handled-backends) + (error "No handled backends")) + (or (and (not (file-directory-p file)) (not register) (vc-backend file)) + (catch 'found + ;; First try: find a responsible backend. If this is for registration, + ;; it must be a backend under which FILE is not yet registered. + (dolist (backend vc-handled-backends) + (and (or (not register) + (not (vc-call-backend backend 'registered file))) + (vc-call-backend backend 'responsible-p file) + (throw 'found backend))) + ;; no responsible backend + (if (not register) + ;; if this is not for registration, the first backend must do + (car vc-handled-backends) + ;; for registration, we need to find a new backend that + ;; could register FILE + (dolist (backend vc-handled-backends) + (and (not (vc-call-backend backend 'registered file)) + (vc-call-backend backend 'could-register file) + (throw 'found backend))) + (error "No backend that could register"))))) + +(defun vc-expand-dirs (file-or-dir-list) + "Expands directories in a file list specification. +Only files already under version control are noticed." + ;; FIXME: Kill this function. + (let ((flattened '())) + (dolist (node file-or-dir-list) + (vc-file-tree-walk + node (lambda (f) (if (vc-backend f) (push f flattened))))) + (nreverse flattened))) + +(defun vc-ensure-vc-buffer () + "Make sure that the current buffer visits a version-controlled file." + (if vc-dired-mode + (set-buffer (find-file-noselect (dired-get-filename))) + (while vc-parent-buffer + (set-buffer vc-parent-buffer)) + (if (not buffer-file-name) + (error "Buffer %s is not associated with a file" (buffer-name)) + (if (not (vc-backend buffer-file-name)) + (error "File %s is not under version control" buffer-file-name))))) + +;;; Support for the C-x v v command. This is where all the single-file-oriented +;;; code from before the fileset rewrite lives. + +(defsubst vc-editable-p (file) + "Return non-nil if FILE can be edited." + (or (eq (vc-checkout-model file) 'implicit) + (memq (vc-state file) '(edited needs-merge)))) + +(defun vc-revert-buffer-internal (&optional arg no-confirm) "Revert buffer, keeping point and mark where user expects them. Try to be clever in the face of changes due to expanded version control key words. This is important for typeahead to work as expected. @@ -1223,7 +1271,6 @@ ARG and NO-CONFIRM are passed on to `revert-buffer'." (revert-buffer arg no-confirm t)) (vc-restore-buffer-context context))) - (defun vc-buffer-sync (&optional not-urgent) "Make sure the current buffer and its working file are in sync. NOT-URGENT means it is ok to continue if the user says not to save." @@ -1234,11 +1281,74 @@ NOT-URGENT means it is ok to continue if the user says not to save." (unless not-urgent (error "Aborted"))))) -(defun vc-default-latest-on-branch-p (backend file) - "Return non-nil if FILE is the latest on its branch. -This default implementation always returns non-nil, which means that -editing non-current versions is not supported by default." - t) +(defvar vc-dired-window-configuration) + +;; Here's the major entry point. + +;;;###autoload +(defun vc-next-action (verbose) + "Do the next logical version control operation on the current file. + +If you call this from within a VC dired buffer with no files marked, +it will operate on the file in the current line. + +If you call this from within a VC dired buffer, and one or more +files are marked, it will accept a log message and then operate on +each one. The log message will be used as a comment for any register +or checkin operations, but ignored when doing checkouts. Attempted +lock steals will raise an error. + +A prefix argument lets you specify the version number to use. + +For RCS and SCCS files: + If the file is not already registered, this registers it for version +control. + If the file is registered and not locked by anyone, this checks out +a writable and locked file ready for editing. + If the file is checked out and locked by the calling user, this +first checks to see if the file has changed since checkout. If not, +it performs a revert. + If the file has been changed, this pops up a buffer for entry +of a log message; when the message has been entered, it checks in the +resulting changes along with the log message as change commentary. If +the variable `vc-keep-workfiles' is non-nil (which is its default), a +read-only copy of the changed file is left in place afterwards. + If the file is registered and locked by someone else, you are given +the option to steal the lock. + +For CVS files: + If the file is not already registered, this registers it for version +control. This does a \"cvs add\", but no \"cvs commit\". + If the file is added but not committed, it is committed. + If your working file is changed, but the repository file is +unchanged, this pops up a buffer for entry of a log message; when the +message has been entered, it checks in the resulting changes along +with the logmessage as change commentary. A writable file is retained. + If the repository file is changed, you are asked if you want to +merge in the changes into your working copy." + (interactive "P") + (catch 'nogo + (if vc-dired-mode + (let ((files (dired-get-marked-files))) + (set (make-local-variable 'vc-dired-window-configuration) + (current-window-configuration)) + (if (string= "" + (mapconcat + (lambda (f) + (if (not (vc-up-to-date-p f)) "@" "")) + files "")) + (vc-next-action-dired nil nil "dummy") + (vc-start-entry nil nil nil nil + "Enter a change comment for the marked files." + 'vc-next-action-dired)) + (throw 'nogo nil))) + (while vc-parent-buffer + (pop-to-buffer vc-parent-buffer)) + (if buffer-file-name + (vc-next-action-on-file buffer-file-name verbose) + (error "Buffer %s is not associated with a file" (buffer-name))))) + +;; These functions help the vc-next-action entry point (defun vc-next-action-on-file (file verbose &optional comment) "Do The Right Thing for a given FILE under version control. @@ -1371,7 +1481,7 @@ If VERBOSE is non-nil, query the user rather than using default parameters." (yes-or-no-p (concat "File has unlocked changes. " "Claim lock retaining changes? "))) (progn (vc-call steal-lock file) - (clear-visited-file-modtime) + (clear-visited-file-modtime) ;; Must clear any headers here because they wouldn't ;; show that the file is locked now. (vc-clear-headers file) @@ -1380,11 +1490,9 @@ If VERBOSE is non-nil, query the user rather than using default parameters." (if (not (yes-or-no-p "Revert to checked-in version, instead? ")) (error "Checkout aborted") - (vc-revert-buffer1 t t) + (vc-revert-buffer-internal t t) (vc-checkout file t)))))))) -(defvar vc-dired-window-configuration) - (defun vc-next-action-dired (file rev comment) "Call `vc-next-action-on-file' on all the marked files. Ignores FILE and REV, but passes on COMMENT." @@ -1399,75 +1507,17 @@ Ignores FILE and REV, but passes on COMMENT." nil t)) (dired-move-to-filename)) -;; Here's the major entry point. - -;;;###autoload -(defun vc-next-action (verbose) - "Do the next logical version control operation on the current file. - -If you call this from within a VC dired buffer with no files marked, -it will operate on the file in the current line. - -If you call this from within a VC dired buffer, and one or more -files are marked, it will accept a log message and then operate on -each one. The log message will be used as a comment for any register -or checkin operations, but ignored when doing checkouts. Attempted -lock steals will raise an error. - -A prefix argument lets you specify the version number to use. - -For RCS and SCCS files: - If the file is not already registered, this registers it for version -control. - If the file is registered and not locked by anyone, this checks out -a writable and locked file ready for editing. - If the file is checked out and locked by the calling user, this -first checks to see if the file has changed since checkout. If not, -it performs a revert. - If the file has been changed, this pops up a buffer for entry -of a log message; when the message has been entered, it checks in the -resulting changes along with the log message as change commentary. If -the variable `vc-keep-workfiles' is non-nil (which is its default), a -read-only copy of the changed file is left in place afterwards. - If the file is registered and locked by someone else, you are given -the option to steal the lock. - -For CVS files: - If the file is not already registered, this registers it for version -control. This does a \"cvs add\", but no \"cvs commit\". - If the file is added but not committed, it is committed. - If your working file is changed, but the repository file is -unchanged, this pops up a buffer for entry of a log message; when the -message has been entered, it checks in the resulting changes along -with the logmessage as change commentary. A writable file is retained. - If the repository file is changed, you are asked if you want to -merge in the changes into your working copy." - - (interactive "P") - (catch 'nogo - (if vc-dired-mode - (let ((files (dired-get-marked-files))) - (set (make-local-variable 'vc-dired-window-configuration) - (current-window-configuration)) - (if (string= "" - (mapconcat - (lambda (f) - (if (not (vc-up-to-date-p f)) "@" "")) - files "")) - (vc-next-action-dired nil nil "dummy") - (vc-start-entry nil nil nil nil - "Enter a change comment for the marked files." - 'vc-next-action-dired)) - (throw 'nogo nil))) - (while vc-parent-buffer - (pop-to-buffer vc-parent-buffer)) - (if buffer-file-name - (vc-next-action-on-file buffer-file-name verbose) - (error "Buffer %s is not associated with a file" (buffer-name))))) - -;; These functions help the vc-next-action entry point - -(defun vc-default-init-version (backend) vc-default-init-version) +(defun vc-create-repo (backend) + "Create an empty repository in the current directory." + (interactive + (list + (intern + (upcase + (completing-read + "Create repository for: " + (mapcar (lambda (b) (list (downcase (symbol-name b)))) vc-handled-backends) + nil t))))) + (vc-call-backend backend 'create-repo)) ;;;###autoload (defun vc-register (&optional set-version comment) @@ -1517,64 +1567,6 @@ first backend that could register the file is used." (message "Registering %s... done" file)))) -(defun vc-responsible-backend (file &optional register) - "Return the name of a backend system that is responsible for FILE. -The optional argument REGISTER means that a backend suitable for -registration should be found. - -If REGISTER is nil, then if FILE is already registered, return the -backend of FILE. If FILE is not registered, or a directory, then the -first backend in `vc-handled-backends' that declares itself -responsible for FILE is returned. If no backend declares itself -responsible, return the first backend. - -If REGISTER is non-nil, return the first responsible backend under -which FILE is not yet registered. If there is no such backend, return -the first backend under which FILE is not yet registered, but could -be registered." - (if (not vc-handled-backends) - (error "No handled backends")) - (or (and (not (file-directory-p file)) (not register) (vc-backend file)) - (catch 'found - ;; First try: find a responsible backend. If this is for registration, - ;; it must be a backend under which FILE is not yet registered. - (dolist (backend vc-handled-backends) - (and (or (not register) - (not (vc-call-backend backend 'registered file))) - (vc-call-backend backend 'responsible-p file) - (throw 'found backend))) - ;; no responsible backend - (if (not register) - ;; if this is not for registration, the first backend must do - (car vc-handled-backends) - ;; for registration, we need to find a new backend that - ;; could register FILE - (dolist (backend vc-handled-backends) - (and (not (vc-call-backend backend 'registered file)) - (vc-call-backend backend 'could-register file) - (throw 'found backend))) - (error "No backend that could register"))))) - -(defun vc-default-responsible-p (backend file) - "Indicate whether BACKEND is reponsible for FILE. -The default is to return nil always." - nil) - -(defun vc-default-could-register (backend file) - "Return non-nil if BACKEND could be used to register FILE. -The default implementation returns t for all files." - t) - -(defun vc-expand-dirs (file-or-dir-list) - "Expands directories in a file list specification. -Only files already under version control are noticed." - ;; FIXME: Kill this function. - (let ((flattened '())) - (dolist (node file-or-dir-list) - (vc-file-tree-walk - node (lambda (f) (if (vc-backend f) (push f flattened))))) - (nreverse flattened))) - (defun vc-resynch-window (file &optional keep noquery) "If FILE is in the current buffer, either revert or unvisit it. The choice between revert (to see expanded keywords) and unvisit depends on @@ -1585,7 +1577,7 @@ rather than user editing!" (and (string= buffer-file-name file) (if keep (progn - (vc-revert-buffer1 t noquery) + (vc-revert-buffer-internal t noquery) ;; TODO: Adjusting view mode might no longer be necessary ;; after RMS change to files.el of 1999-08-08. Investigate ;; this when we install the new VC. @@ -1739,6 +1731,8 @@ Runs the normal hook `vc-checkin-hook'." (message "Checking in %s...done" file)) 'vc-checkin-hook)) +;; Code for access to the comment ring + (defun vc-finish-logentry (&optional nocomment) "Complete the operation implied by the current log entry. Use the contents of the current buffer as a check-in or registration @@ -1756,7 +1750,8 @@ the buffer contents as a comment." ;; But not if it is a vc-dired buffer. (with-current-buffer vc-parent-buffer (or vc-dired-mode (vc-buffer-sync))) - (if (not vc-log-operation) (error "No log operation is pending")) + (if (not vc-log-operation) + (error "No log operation is pending")) ;; save the parameters held in buffer-local variables (let ((log-operation vc-log-operation) (log-file vc-log-file) @@ -1788,9 +1783,108 @@ the buffer contents as a comment." (dired-move-to-filename)) (run-hooks after-hook 'vc-finish-logentry-hook))) -;; Code for access to the comment ring +;;; Additional entry points for examining version histories + +(defun vc-default-diff-tree (backend dir rev1 rev2) + "List differences for all registered files at and below DIR. +The meaning of REV1 and REV2 is the same as for `vc-version-diff'." + ;; This implementation does an explicit tree walk, and calls + ;; vc-BACKEND-diff directly for each file. An optimization + ;; would be to use `vc-diff-internal', so that diffs can be local, + ;; and to call it only for files that are actually changed. + ;; However, this is expensive for some backends, and so it is left + ;; to backend-specific implementations. + (setq default-directory dir) + (vc-file-tree-walk + default-directory + (lambda (f) + (vc-exec-after + `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) + (message "Looking at %s" ',f) + (vc-call-backend ',(vc-backend f) + 'diff (list ',f) ',rev1 ',rev2)))))) -;; Additional entry points for examining version histories +(defun vc-coding-system-for-diff (file) + "Return the coding system for reading diff output for FILE." + (or coding-system-for-read + ;; if we already have this file open, + ;; use the buffer's coding system + (let ((buf (find-buffer-visiting file))) + (if buf (with-current-buffer buf + buffer-file-coding-system))) + ;; otherwise, try to find one based on the file name + (car (find-operation-coding-system 'insert-file-contents file)) + ;; and a final fallback + 'undecided)) + +(defun vc-switches (backend op) + (let ((switches + (or (if backend + (let ((sym (vc-make-backend-sym + backend (intern (concat (symbol-name op) + "-switches"))))) + (if (boundp sym) (symbol-value sym)))) + (let ((sym (intern (format "vc-%s-switches" (symbol-name op))))) + (if (boundp sym) (symbol-value sym))) + (cond + ((eq op 'diff) diff-switches))))) + (if (stringp switches) (list switches) + ;; If not a list, return nil. + ;; This is so we can set vc-diff-switches to t to override + ;; any switches in diff-switches. + (if (listp switches) switches)))) + +;; Old def for compatibility with Emacs-21.[123]. +(defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) +(make-obsolete 'vc-diff-switches-list 'vc-switches "22.1") + +(defun vc-diff-internal (file rev1 rev2) + "Run diff to compare FILE's revisions REV1 and REV2. +Diff output goes to the *vc-diff* buffer. The exit status of the diff +command is returned. + +This function takes care to set up a proper coding system for diff output. +If both revisions are available as local files, then it also does not +actually call the backend, but performs a local diff." + (if (or (not rev1) (string-equal rev1 "")) + (setq rev1 (vc-workfile-version file))) + (if (string-equal rev2 "") + (setq rev2 nil)) + (let ((file-rev1 (vc-version-backup-file file rev1)) + (file-rev2 (if (not rev2) + file + (vc-version-backup-file file rev2))) + (coding-system-for-read (vc-coding-system-for-diff file))) + (if (and file-rev1 file-rev2) + (let ((status + (if (eq vc-diff-knows-L 'no) + (apply 'vc-do-command "*vc-diff*" 1 "diff" nil + (append (vc-switches nil 'diff) + (list (file-relative-name file-rev1) + (file-relative-name file-rev2)))) + (apply 'vc-do-command "*vc-diff*" 2 "diff" nil + (append (vc-switches nil 'diff) + ;; Provide explicit labels like RCS or + ;; CVS would do so diff-mode refers to + ;; `file' rather than to `file-rev1' + ;; when trying to find/apply/undo + ;; hunks. + (list "-L" (vc-diff-label file file-rev1 rev1) + "-L" (vc-diff-label file file-rev2 rev2) + (file-relative-name file-rev1) + (file-relative-name file-rev2))))))) + (if (eq status 2) + (if (not vc-diff-knows-L) + (setq vc-diff-knows-L 'no + status (apply 'vc-do-command "*vc-diff*" 1 "diff" nil + (append + (vc-switches nil 'diff) + (list (file-relative-name file-rev1) + (file-relative-name file-rev2))))) + (error "diff failed")) + (if (not vc-diff-knows-L) (setq vc-diff-knows-L 'yes))) + status) + (vc-call diff (list file) rev1 rev2 "*vc-diff*")))) ;;;###autoload (defun vc-diff (historic &optional not-urgent) @@ -1811,12 +1905,10 @@ saving the buffer." (message "No changes to %s since latest version" file) (vc-version-diff file nil nil))))) -(defun vc-default-revision-completion-table (backend file) nil) - (defun vc-version-diff (file rev1 rev2) "List the differences between FILE's versions REV1 and REV2. -If REV1 is empty or nil it means to use the current workfile version; -REV2 empty or nil means the current file contents. FILE may also be +If REV1 is empty or nil it means to use the focus version; +REV2 empty or nil means the working-copy contents. FILE may also be a directory, in that case, generate diffs between the correponding versions of all registered files in or below it." (interactive @@ -1867,7 +1959,7 @@ versions of all registered files in or below it." (insert "Diffs between " (or rev1 "last version checked in") " and " - (or rev2 "current workfile(s)") + (or rev2 "working copy") ":\n\n")) (let ((dir (file-name-as-directory file))) (vc-call-backend (vc-responsible-backend dir) @@ -1905,107 +1997,6 @@ versions of all registered files in or below it." (nth 5 (file-attributes file-rev))) rev)) -(defun vc-diff-internal (file rev1 rev2) - "Run diff to compare FILE's revisions REV1 and REV2. -Diff output goes to the *vc-diff* buffer. The exit status of the diff -command is returned. - -This function takes care to set up a proper coding system for diff output. -If both revisions are available as local files, then it also does not -actually call the backend, but performs a local diff." - (if (or (not rev1) (string-equal rev1 "")) - (setq rev1 (vc-workfile-version file))) - (if (string-equal rev2 "") - (setq rev2 nil)) - (let ((file-rev1 (vc-version-backup-file file rev1)) - (file-rev2 (if (not rev2) - file - (vc-version-backup-file file rev2))) - (coding-system-for-read (vc-coding-system-for-diff file))) - (if (and file-rev1 file-rev2) - (let ((status - (if (eq vc-diff-knows-L 'no) - (apply 'vc-do-command "*vc-diff*" 1 "diff" nil - (append (vc-switches nil 'diff) - (list (file-relative-name file-rev1) - (file-relative-name file-rev2)))) - (apply 'vc-do-command "*vc-diff*" 2 "diff" nil - (append (vc-switches nil 'diff) - ;; Provide explicit labels like RCS or - ;; CVS would do so diff-mode refers to - ;; `file' rather than to `file-rev1' - ;; when trying to find/apply/undo - ;; hunks. - (list "-L" (vc-diff-label file file-rev1 rev1) - "-L" (vc-diff-label file file-rev2 rev2) - (file-relative-name file-rev1) - (file-relative-name file-rev2))))))) - (if (eq status 2) - (if (not vc-diff-knows-L) - (setq vc-diff-knows-L 'no - status (apply 'vc-do-command "*vc-diff*" 1 "diff" nil - (append - (vc-switches nil 'diff) - (list (file-relative-name file-rev1) - (file-relative-name file-rev2))))) - (error "diff failed")) - (if (not vc-diff-knows-L) (setq vc-diff-knows-L 'yes))) - status) - (vc-call diff (list file) rev1 rev2 "*vc-diff*")))) - -(defun vc-switches (backend op) - (let ((switches - (or (if backend - (let ((sym (vc-make-backend-sym - backend (intern (concat (symbol-name op) - "-switches"))))) - (if (boundp sym) (symbol-value sym)))) - (let ((sym (intern (format "vc-%s-switches" (symbol-name op))))) - (if (boundp sym) (symbol-value sym))) - (cond - ((eq op 'diff) diff-switches))))) - (if (stringp switches) (list switches) - ;; If not a list, return nil. - ;; This is so we can set vc-diff-switches to t to override - ;; any switches in diff-switches. - (if (listp switches) switches)))) - -;; Old def for compatibility with Emacs-21.[123]. -(defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) -(make-obsolete 'vc-diff-switches-list 'vc-switches "22.1") - -(defun vc-default-diff-tree (backend dir rev1 rev2) - "List differences for all registered files at and below DIR. -The meaning of REV1 and REV2 is the same as for `vc-version-diff'." - ;; This implementation does an explicit tree walk, and calls - ;; vc-BACKEND-diff directly for each file. An optimization - ;; would be to use `vc-diff-internal', so that diffs can be local, - ;; and to call it only for files that are actually changed. - ;; However, this is expensive for some backends, and so it is left - ;; to backend-specific implementations. - (setq default-directory dir) - (vc-file-tree-walk - default-directory - (lambda (f) - (vc-exec-after - `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) - (message "Looking at %s" ',f) - (vc-call-backend ',(vc-backend f) - 'diff ',f ',rev1 ',rev2)))))) - -(defun vc-coding-system-for-diff (file) - "Return the coding system for reading diff output for FILE." - (or coding-system-for-read - ;; if we already have this file open, - ;; use the buffer's coding system - (let ((buf (find-buffer-visiting file))) - (if buf (with-current-buffer buf - buffer-file-coding-system))) - ;; otherwise, try to find one based on the file name - (car (find-operation-coding-system 'insert-file-contents file)) - ;; and a final fallback - 'undecided)) - ;;;###autoload (defun vc-version-other-window (rev) "Visit version REV of the current file in another window. @@ -2016,7 +2007,7 @@ If `F.~REV~' already exists, use it instead of checking it out again." (vc-ensure-vc-buffer) (let ((completion-table (vc-call revision-completion-table buffer-file-name)) - (prompt "Version to visit (default is workfile version): ")) + (prompt "Version to visit (default is focus version): ")) (list (if completion-table (completing-read prompt completion-table) @@ -2055,18 +2046,6 @@ If `F.~REV~' already exists, use it instead of checking it out again." (message "Checking out %s...done" filename))) (find-file-noselect filename))) -(defun vc-default-find-version (backend file rev buffer) - "Provide the new `find-version' op based on the old `checkout' op. -This is only for compatibility with old backends. They should be updated -to provide the `find-version' operation instead." - (let ((tmpfile (make-temp-file (expand-file-name file)))) - (unwind-protect - (progn - (vc-call-backend backend 'checkout file nil rev tmpfile) - (with-current-buffer buffer - (insert-file-contents-literally tmpfile))) - (delete-file tmpfile)))) - ;; Header-insertion code ;;;###autoload @@ -2131,7 +2110,7 @@ See Info node `Merging'." (state (vc-state file)) first-version second-version status) (cond - ((stringp state) + ((stringp state) ;; Locking VCses only (error "File is locked by %s" state)) ((not (vc-editable-p file)) (if (y-or-n-p @@ -2273,15 +2252,6 @@ There is a special command, `*l', to mark all files currently locked." (define-key vc-dired-mode-map "*l" 'vc-dired-mark-locked) -(defun vc-default-dired-state-info (backend file) - (let ((state (vc-state file))) - (cond - ((stringp state) (concat "(" state ")")) - ((eq state 'edited) (concat "(" (vc-user-login-name file) ")")) - ((eq state 'needs-merge) "(merge)") - ((eq state 'needs-patch) "(patch)") - ((eq state 'unlocked-changes) "(stale)")))) - (defun vc-dired-reformat-line (vc-info) "Reformat a directory-listing line. Replace various columns with version control information, VC-INFO. @@ -2461,17 +2431,6 @@ are checked out in that new branch." 'create-snapshot dir name branchp) (message "Making %s... done" (if branchp "branch" "snapshot"))) -(defun vc-default-create-snapshot (backend dir name branchp) - (when branchp - (error "VC backend %s does not support module branches" backend)) - (let ((result (vc-snapshot-precondition dir))) - (if (stringp result) - (error "File %s is not up-to-date" result) - (vc-file-tree-walk - dir - (lambda (f) - (vc-call assign-name f name)))))) - ;;;###autoload (defun vc-retrieve-snapshot (dir name) "Descending recursively from DIR, retrieve the snapshot called NAME. @@ -2492,26 +2451,6 @@ allowed and simply skipped)." 'retrieve-snapshot dir name update) (message "%s" (concat msg "done")))) -(defun vc-default-retrieve-snapshot (backend dir name update) - (if (string= name "") - (progn - (vc-file-tree-walk - dir - (lambda (f) (and - (vc-up-to-date-p f) - (vc-error-occurred - (vc-call checkout f nil "") - (if update (vc-resynch-buffer f t t))))))) - (let ((result (vc-snapshot-precondition dir))) - (if (stringp result) - (error "File %s is locked" result) - (setq update (and (eq result 'visited) update)) - (vc-file-tree-walk - dir - (lambda (f) (vc-error-occurred - (vc-call checkout f nil name) - (if update (vc-resynch-buffer f t t))))))))) - ;; Miscellaneous other entry points ;;;###autoload @@ -2558,41 +2497,9 @@ If FOCUS-REV is non-nil, leave the point at that revision." (vc-call-backend ',(vc-backend file) 'show-log-entry ',focus-rev) + (setq vc-sentinel-movepoint (point)) (set-buffer-modified-p nil))))) -(defun vc-default-log-view-mode (backend) (log-view-mode)) -(defun vc-default-show-log-entry (backend rev) - (with-no-warnings - (log-view-goto-rev rev))) - -(defun vc-default-comment-history (backend file) - "Return a string with all log entries stored in BACKEND for FILE." - (if (vc-find-backend-function backend 'print-log) - (with-current-buffer "*vc*" - (vc-call print-log (list file)) - (vc-call wash-log file) - (buffer-string)))) - -(defun vc-default-wash-log (backend file) - "Remove all non-comment information from log output. -This default implementation works for RCS logs; backends should override -it if their logs are not in RCS format." - (let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n" - "\\(branches: .*;\n\\)?" - "\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?"))) - (goto-char (point-max)) (forward-line -1) - (while (looking-at "=*\n") - (delete-char (- (match-end 0) (match-beginning 0))) - (forward-line -1)) - (goto-char (point-min)) - (if (looking-at "[\b\t\n\v\f\r ]+") - (delete-char (- (match-end 0) (match-beginning 0)))) - (goto-char (point-min)) - (re-search-forward separator nil t) - (delete-region (point-min) (point)) - (while (re-search-forward separator nil t) - (delete-region (match-beginning 0) (match-end 0))))) - ;;;###autoload (defun vc-revert () "Revert the current buffer's file to the version it was based on. @@ -2637,6 +2544,53 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action] (message "Reverting %s...done" file))) ;;;###autoload +(defun vc-rollback (&optional norevert) + "Get rid of most recently checked in version of this file. +A prefix argument NOREVERT means do not revert the buffer afterwards." + (interactive "P") + (vc-ensure-vc-buffer) + (let* ((file buffer-file-name) + (backend (vc-backend file)) + (target (vc-workfile-version file))) + (cond + ((not (vc-find-backend-function backend 'rollback)) + (error "Sorry, canceling versions is not supported under %s" backend)) + ((not (vc-call latest-on-branch-p file)) + (error "This is not the latest version; VC cannot cancel it")) + ((not (vc-up-to-date-p file)) + (error "%s" (substitute-command-keys "File is not up to date; use \\[vc-revert] to discard changes")))) + (if (null (yes-or-no-p (format "Remove version %s from master? " target))) + (error "Aborted") + (setq norevert (or norevert (not + (yes-or-no-p "Revert buffer to most recent remaining version? ")))) + + (message "Removing last change from %s..." file) + (with-vc-properties + file + (vc-call rollback (list file)) + `((vc-state . ,(if norevert 'edited 'up-to-date)) + (vc-checkout-time . ,(if norevert + 0 + (nth 5 (file-attributes file)))) + (vc-workfile-version . nil))) + (message "Removing last change from %s...done" file) + + (cond + (norevert ;; clear version headers and mark the buffer modified + (set-visited-file-name file) + (when (not vc-make-backup-files) + ;; inhibit backup for this buffer + (make-local-variable 'backup-inhibited) + (setq backup-inhibited t)) + (setq buffer-read-only nil) + (vc-clear-headers) + (vc-mode-line file) + (vc-dired-resynch-file file)) + (t ;; revert buffer to file on disk + (vc-resynch-buffer file t t))) + (message "Version %s has been removed from the master" target)))) + +;;;###autoload (define-obsolete-function-alias 'vc-revert-buffer 'vc-revert "23.1") ;;;###autoload @@ -2670,8 +2624,8 @@ the current branch are merged into the working file." (defun vc-version-backup-file (file &optional rev) "Return name of backup file for revision REV of FILE. If version backups should be used for FILE, and there exists -such a backup for REV or the current workfile version of file, -return its name; otherwise return nil." +such a backup for REV or the focus version of file, return +its name; otherwise return nil." (when (vc-call make-version-backups-p file) (let ((backup-file (vc-version-backup-file-name file rev))) (if (file-exists-p backup-file) @@ -2681,35 +2635,8 @@ return its name; otherwise return nil." (if (file-exists-p backup-file) backup-file))))) -(defun vc-default-revert (backend file contents-done) - (unless contents-done - (let ((rev (vc-workfile-version file)) - (file-buffer (or (get-file-buffer file) (current-buffer)))) - (message "Checking out %s..." file) - (let ((failed t) - (backup-name (car (find-backup-file-name file)))) - (when backup-name - (copy-file file backup-name 'ok-if-already-exists 'keep-date) - (unless (file-writable-p file) - (set-file-modes file (logior (file-modes file) 128)))) - (unwind-protect - (let ((coding-system-for-read 'no-conversion) - (coding-system-for-write 'no-conversion)) - (with-temp-file file - (let ((outbuf (current-buffer))) - ;; Change buffer to get local value of vc-checkout-switches. - (with-current-buffer file-buffer - (let ((default-directory (file-name-directory file))) - (vc-call find-version file rev outbuf))))) - (setq failed nil)) - (when backup-name - (if failed - (rename-file backup-name file 'ok-if-already-exists) - (and (not vc-make-backup-files) (delete-file backup-name)))))) - (message "Checking out %s...done" file)))) - (defun vc-revert-file (file) - "Revert FILE back to the version it was based on." + "Revert FILE back to the repository version it was based on." (with-vc-properties file (let ((backup-file (vc-version-backup-file file))) @@ -2722,53 +2649,6 @@ return its name; otherwise return nil." (vc-resynch-buffer file t t)) ;;;###autoload -(defun vc-rollback (&optional norevert) - "Get rid of most recently checked in version of this file. -A prefix argument NOREVERT means do not revert the buffer afterwards." - (interactive "P") - (vc-ensure-vc-buffer) - (let* ((file buffer-file-name) - (backend (vc-backend file)) - (target (vc-workfile-version file))) - (cond - ((not (vc-find-backend-function backend 'rollback)) - (error "Sorry, canceling versions is not supported under %s" backend)) - ((not (vc-call latest-on-branch-p file)) - (error "This is not the latest version; VC cannot cancel it")) - ((not (vc-up-to-date-p file)) - (error "%s" (substitute-command-keys "File is not up to date; use \\[vc-revert] to discard changes")))) - (if (null (yes-or-no-p (format "Remove version %s from master? " target))) - (error "Aborted") - (setq norevert (or norevert (not - (yes-or-no-p "Revert buffer to most recent remaining version? ")))) - - (message "Removing last change from %s..." file) - (with-vc-properties - file - (vc-call rollback (list file)) - `((vc-state . ,(if norevert 'edited 'up-to-date)) - (vc-checkout-time . ,(if norevert - 0 - (nth 5 (file-attributes file)))) - (vc-workfile-version . nil))) - (message "Removing last change from %s...done" file) - - (cond - (norevert ;; clear version headers and mark the buffer modified - (set-visited-file-name file) - (when (not vc-make-backup-files) - ;; inhibit backup for this buffer - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t)) - (setq buffer-read-only nil) - (vc-clear-headers) - (vc-mode-line file) - (vc-dired-resynch-file file)) - (t ;; revert buffer to file on disk - (vc-resynch-buffer file t t))) - (message "Version %s has been removed from the master" target)))) - -;;;###autoload (defun vc-switch-backend (file backend) "Make BACKEND the current version control system for FILE. FILE must already be registered in BACKEND. The change is not @@ -2875,14 +2755,6 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. (vc-mode-line file) (vc-checkin file nil comment (stringp comment))))) -(defun vc-default-unregister (backend file) - "Default implementation of `vc-unregister', signals an error." - (error "Unregistering files is not supported for %s" backend)) - -(defun vc-default-receive-file (backend file rev) - "Let BACKEND receive FILE from another version control system." - (vc-call-backend backend 'register file rev "")) - (defun vc-rename-master (oldmaster newfile templates) "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES." (let* ((dir (file-name-directory (expand-file-name oldmaster))) @@ -2933,14 +2805,6 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. ;; If the backend hasn't deleted the file itself, let's do it for him. (if (file-exists-p file) (delete-file file)))) -(defun vc-default-rename-file (backend old new) - (condition-case nil - (add-name-to-file old new) - (error (rename-file old new))) - (vc-delete-file old) - (with-current-buffer (find-file-noselect new) - (vc-register))) - ;;;###autoload (defun vc-rename-file (old new) "Rename file OLD to NEW, and rename its master file likewise." @@ -3009,6 +2873,82 @@ log entries should be gathered." (vc-call-backend (vc-responsible-backend default-directory) 'update-changelog args)) +;;; The default back end. Assumes RCS-like version numbering. + +(defun vc-default-revision-granularity () + (error "Your backend will not work with this version of VC mode.")) + +;; functions that operate on RCS revision numbers. This code should +;; also be moved into the backends. It stays for now, however, since +;; it is used in code below. +;;;###autoload +(defun vc-trunk-p (rev) + "Return t if REV is a revision on the trunk." + (not (eq nil (string-match "\\`[0-9]+\\.[0-9]+\\'" rev)))) + +(defun vc-branch-p (rev) + "Return t if REV is a branch revision." + (not (eq nil (string-match "\\`[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*\\'" rev)))) + +;;;###autoload +(defun vc-branch-part (rev) + "Return the branch part of a revision number REV." + (let ((index (string-match "\\.[0-9]+\\'" rev))) + (if index + (substring rev 0 index)))) + +(defun vc-minor-part (rev) + "Return the minor version number of a revision number REV." + (string-match "[0-9]+\\'" rev) + (substring rev (match-beginning 0) (match-end 0))) + +(defun vc-default-previous-version (backend file rev) + "Return the version number immediately preceding REV for FILE, +or nil if there is no previous version. This default +implementation works for MAJOR.MINOR-style version numbers as +used by RCS and CVS." + (let ((branch (vc-branch-part rev)) + (minor-num (string-to-number (vc-minor-part rev)))) + (when branch + (if (> minor-num 1) + ;; version does probably not start a branch or release + (concat branch "." (number-to-string (1- minor-num))) + (if (vc-trunk-p rev) + ;; we are at the beginning of the trunk -- + ;; don't know anything to return here + nil + ;; we are at the beginning of a branch -- + ;; return version of starting point + (vc-branch-part branch)))))) + +(defun vc-default-next-version (backend file rev) + "Return the version number immediately following REV for FILE, +or nil if there is no next version. This default implementation +works for MAJOR.MINOR-style version numbers as used by RCS +and CVS." + (when (not (string= rev (vc-workfile-version file))) + (let ((branch (vc-branch-part rev)) + (minor-num (string-to-number (vc-minor-part rev)))) + (concat branch "." (number-to-string (1+ minor-num)))))) + +(defun vc-default-responsible-p (backend file) + "Indicate whether BACKEND is reponsible for FILE. +The default is to return nil always." + nil) + +(defun vc-default-could-register (backend file) + "Return non-nil if BACKEND could be used to register FILE. +The default implementation returns t for all files." + t) + +(defun vc-default-latest-on-branch-p (backend file) + "Return non-nil if FILE is the latest on its branch. +This default implementation always returns non-nil, which means that +editing non-current versions is not supported by default." + t) + +(defun vc-default-init-version (backend) vc-default-init-version) + (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) ;; FIXME: This should probably be moved to vc-rcs.el and replaced in @@ -3064,7 +3004,129 @@ Uses `rcs2log' which only works for RCS and CVS." (setq default-directory (file-name-directory changelog)) (delete-file tempfile))))) -;; Annotate functionality +(defun vc-default-find-version (backend file rev buffer) + "Provide the new `find-version' op based on the old `checkout' op. +This is only for compatibility with old backends. They should be updated +to provide the `find-version' operation instead." + (let ((tmpfile (make-temp-file (expand-file-name file)))) + (unwind-protect + (progn + (vc-call-backend backend 'checkout file nil rev tmpfile) + (with-current-buffer buffer + (insert-file-contents-literally tmpfile))) + (delete-file tmpfile)))) + +(defun vc-default-dired-state-info (backend file) + (let ((state (vc-state file))) + (cond + ((stringp state) (concat "(" state ")")) + ((eq state 'edited) (concat "(" (vc-user-login-name file) ")")) + ((eq state 'needs-merge) "(merge)") + ((eq state 'needs-patch) "(patch)") + ((eq state 'unlocked-changes) "(stale)")))) + +(defun vc-default-rename-file (backend old new) + (condition-case nil + (add-name-to-file old new) + (error (rename-file old new))) + (vc-delete-file old) + (with-current-buffer (find-file-noselect new) + (vc-register))) + +(defalias 'vc-default-logentry-check 'ignore) + +(defun vc-default-check-headers (backend) + "Default implementation of check-headers; always returns nil." + nil) + +(defun vc-default-log-view-mode (backend) (log-view-mode)) + +(defun vc-default-show-log-entry (backend rev) + (with-no-warnings + (log-view-goto-rev rev))) + +(defun vc-default-comment-history (backend file) + "Return a string with all log entries stored in BACKEND for FILE." + (if (vc-find-backend-function backend 'print-log) + (with-current-buffer "*vc*" + (vc-call print-log (list file)) + (vc-call-backend backend 'wash-log) + (buffer-string)))) + +(defun vc-default-unregister (backend file) + "Default implementation of `vc-unregister', signals an error." + (error "Unregistering files is not supported for %s" backend)) + +(defun vc-default-receive-file (backend file rev) + "Let BACKEND receive FILE from another version control system." + (vc-call-backend backend 'register file rev "")) + +(defun vc-default-create-snapshot (backend dir name branchp) + (when branchp + (error "VC backend %s does not support module branches" backend)) + (let ((result (vc-snapshot-precondition dir))) + (if (stringp result) + (error "File %s is not up-to-date" result) + (vc-file-tree-walk + dir + (lambda (f) + (vc-call assign-name f name)))))) + +(defun vc-default-retrieve-snapshot (backend dir name update) + (if (string= name "") + (progn + (vc-file-tree-walk + dir + (lambda (f) (and + (vc-up-to-date-p f) + (vc-error-occurred + (vc-call checkout f nil "") + (if update (vc-resynch-buffer f t t))))))) + (let ((result (vc-snapshot-precondition dir))) + (if (stringp result) + (error "File %s is locked" result) + (setq update (and (eq result 'visited) update)) + (vc-file-tree-walk + dir + (lambda (f) (vc-error-occurred + (vc-call checkout f nil name) + (if update (vc-resynch-buffer f t t))))))))) + +(defun vc-default-revert (backend file contents-done) + (unless contents-done + (let ((rev (vc-workfile-version file)) + (file-buffer (or (get-file-buffer file) (current-buffer)))) + (message "Checking out %s..." file) + (let ((failed t) + (backup-name (car (find-backup-file-name file)))) + (when backup-name + (copy-file file backup-name 'ok-if-already-exists 'keep-date) + (unless (file-writable-p file) + (set-file-modes file (logior (file-modes file) 128)))) + (unwind-protect + (let ((coding-system-for-read 'no-conversion) + (coding-system-for-write 'no-conversion)) + (with-temp-file file + (let ((outbuf (current-buffer))) + ;; Change buffer to get local value of vc-checkout-switches. + (with-current-buffer file-buffer + (let ((default-directory (file-name-directory file))) + (vc-call find-version file rev outbuf))))) + (setq failed nil)) + (when backup-name + (if failed + (rename-file backup-name file 'ok-if-already-exists) + (and (not vc-make-backup-files) (delete-file backup-name)))))) + (message "Checking out %s...done" file)))) + +(defun vc-default-revision-completion-table (backend file) nil) + +(defun vc-check-headers () + "Check if the current file has any headers in it." + (interactive) + (vc-call-backend (vc-backend buffer-file-name) 'check-headers)) + +;;; Annotate functionality ;; Declare globally instead of additional parameter to ;; temp-buffer-show-function (not possible to pass more than one @@ -3175,7 +3237,7 @@ cover the range from the oldest annotation to the newest." ["Annotate next revision" vc-annotate-next-version] ["Annotate revision at line" vc-annotate-revision-at-line] ["Annotate revision previous to line" vc-annotate-revision-previous-to-line] - ["Annotate latest revision" vc-annotate-workfile-version] + ["Annotate latest revision" vc-annotate-focus-version] ["Show log of revision at line" vc-annotate-show-log-revision-at-line] ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line])) @@ -3280,10 +3342,8 @@ colors. `vc-annotate-background' specifies the background color." ;; moved it elsewhere, but really point here is not the position ;; of the user's cursor :-( (when ,current-line ;(and (bobp)) - (let ((win (get-buffer-window (current-buffer) 0))) - (when win - (with-selected-window win - (goto-line ,current-line))))) + (goto-line ,current-line) + (setq vc-sentinel-movepoint)) (unless (active-minibuffer-window) (message "Annotating... done"))))))) @@ -3303,8 +3363,8 @@ versions after." (interactive "p") (vc-annotate-warp-version prefix)) -(defun vc-annotate-workfile-version () - "Visit the annotation of the workfile version of this file." +(defun vc-annotate-focus-version () + "Visit the annotation of the focus version of this file." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") @@ -3485,20 +3545,6 @@ The annotations are relative to the current time, unless overridden by OFFSET." ;; Pretend to font-lock there were no matches. nil) -;; Collect back-end-dependent stuff here - -(defalias 'vc-default-logentry-check 'ignore) - -(defun vc-check-headers () - "Check if the current file has any headers in it." - (interactive) - (vc-call-backend (vc-backend buffer-file-name) 'check-headers)) - -(defun vc-default-check-headers (backend) - "Default implementation of check-headers; always returns nil." - nil) - -;; Back-end-dependent stuff ends here. ;; Set up key bindings for use while editing log messages @@ -3523,7 +3569,6 @@ The annotations are relative to the current time, unless overridden by OFFSET." (defun vc-file-tree-walk (dirname func &rest args) "Walk recursively through DIRNAME. Invoke FUNC f ARGS on each VC-managed file f underneath it." - ;; FIXME: Kill this function. (vc-file-tree-walk-internal (expand-file-name dirname) func args) (message "Traversing directory %s...done" dirname)) diff --git a/lisp/vcursor.el b/lisp/vcursor.el index b8c93f64ff5..a05bb3c60c5 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -268,7 +268,7 @@ ;; and also as usual \C-h in this map will list the key definitions, which ;; are designed to be easy to remember. ;; -;; A special feature is provided by (vcursor-toggle-vcursor-map), bound +;; A special feature is provided by (vcursor-use-vcursor-map), bound ;; to t in that keymap. With this in effect, the main keymap ;; is overridden by the vcursor map, so keys like \C-p and so on ;; move the vcursor instead. Remember how to turn it off (type t), @@ -336,7 +336,7 @@ :group 'vcursor) (defcustom vcursor-auto-disable nil - "*If non-nil, disable the virtual cursor after use. + "If non-nil, disable the virtual cursor after use. Any non-vcursor command will force `vcursor-disable' to be called. If non-nil but not t, just make sure copying is toggled off, but don't disable the vcursor." @@ -344,7 +344,7 @@ disable the vcursor." :group 'vcursor) (defcustom vcursor-modifiers (list 'control 'shift) - "*A list of modifiers that are used to define vcursor key bindings." + "A list of modifiers that are used to define vcursor key bindings." :type '(repeat symbol) :group 'vcursor) @@ -464,7 +464,7 @@ on loading vcursor and from the customize package." ))) (defcustom vcursor-key-bindings nil - "*How to bind keys when vcursor is loaded. + "How to bind keys when vcursor is loaded. If t, guess; if `xterm', use bindings suitable for an X terminal; if `oemacs', use bindings which work on a PC with Oemacs. If nil, don't define any key bindings. @@ -476,7 +476,7 @@ Default is nil." :version "20.3") (defcustom vcursor-interpret-input nil - "*If non-nil, input from the vcursor is treated as interactive input. + "If non-nil, input from the vcursor is treated as interactive input. This will cause text insertion to be much slower. Note that no special interpretation of strings is done: \"\C-x\" is a string of four characters. The default is simply to copy strings." @@ -506,49 +506,48 @@ scrolling set this. It is used by the `vcursor-auto-disable' code.") ;; automatically handle any new commands using the primitives. (defcustom vcursor-copy-flag nil - "*Non-nil means moving vcursor should copy characters moved over to point." + "Non-nil means moving vcursor should copy characters moved over to point." :type 'boolean :group 'vcursor) (defvar vcursor-temp-goal-column nil "Keeps track of temporary goal columns for the virtual cursor.") -(defvar vcursor-use-vcursor-map nil - "Non-nil if the vcursor map is mapped directly onto the main keymap. -See `vcursor-toggle-vcursor-map'.") -(make-variable-buffer-local 'vcursor-use-vcursor-map) - -(defvar vcursor-map nil "Keymap for vcursor command.") -(define-prefix-command 'vcursor-map) - -(define-key vcursor-map "t" 'vcursor-toggle-vcursor-map) - -(define-key vcursor-map "\C-p" 'vcursor-previous-line) -(define-key vcursor-map "\C-n" 'vcursor-next-line) -(define-key vcursor-map "\C-b" 'vcursor-backward-char) -(define-key vcursor-map "\C-f" 'vcursor-forward-char) - -(define-key vcursor-map "\r" 'vcursor-disable) -(define-key vcursor-map " " 'vcursor-copy) -(define-key vcursor-map "\C-y" 'vcursor-copy-word) -(define-key vcursor-map "\C-i" 'vcursor-toggle-copy) -(define-key vcursor-map "<" 'vcursor-beginning-of-buffer) -(define-key vcursor-map ">" 'vcursor-end-of-buffer) -(define-key vcursor-map "\M-v" 'vcursor-scroll-down) -(define-key vcursor-map "\C-v" 'vcursor-scroll-up) -(define-key vcursor-map "o" 'vcursor-other-window) -(define-key vcursor-map "g" 'vcursor-goto) -(define-key vcursor-map "x" 'vcursor-swap-point) -(define-key vcursor-map "\C-s" 'vcursor-isearch-forward) -(define-key vcursor-map "\C-r" 'vcursor-isearch-backward) -(define-key vcursor-map "\C-a" 'vcursor-beginning-of-line) -(define-key vcursor-map "\C-e" 'vcursor-end-of-line) -(define-key vcursor-map "\M-w" 'vcursor-forward-word) -(define-key vcursor-map "\M-b" 'vcursor-backward-word) -(define-key vcursor-map "\M-l" 'vcursor-copy-line) -(define-key vcursor-map "c" 'vcursor-compare-windows) -(define-key vcursor-map "k" 'vcursor-execute-key) -(define-key vcursor-map "\M-x" 'vcursor-execute-command) +(defvar vcursor-map + (let ((map (make-sparse-keymap))) + (define-key map "t" 'vcursor-use-vcursor-map) + + (define-key map "\C-p" 'vcursor-previous-line) + (define-key map "\C-n" 'vcursor-next-line) + (define-key map "\C-b" 'vcursor-backward-char) + (define-key map "\C-f" 'vcursor-forward-char) + + (define-key map "\r" 'vcursor-disable) + (define-key map " " 'vcursor-copy) + (define-key map "\C-y" 'vcursor-copy-word) + (define-key map "\C-i" 'vcursor-toggle-copy) + (define-key map "<" 'vcursor-beginning-of-buffer) + (define-key map ">" 'vcursor-end-of-buffer) + (define-key map "\M-v" 'vcursor-scroll-down) + (define-key map "\C-v" 'vcursor-scroll-up) + (define-key map "o" 'vcursor-other-window) + (define-key map "g" 'vcursor-goto) + (define-key map "x" 'vcursor-swap-point) + (define-key map "\C-s" 'vcursor-isearch-forward) + (define-key map "\C-r" 'vcursor-isearch-backward) + (define-key map "\C-a" 'vcursor-beginning-of-line) + (define-key map "\C-e" 'vcursor-end-of-line) + (define-key map "\M-w" 'vcursor-forward-word) + (define-key map "\M-b" 'vcursor-backward-word) + (define-key map "\M-l" 'vcursor-copy-line) + (define-key map "c" 'vcursor-compare-windows) + (define-key map "k" 'vcursor-execute-key) + (define-key map "\M-x" 'vcursor-execute-command) + map) + "Keymap for vcursor command.") +;; This seems unused, but it was done as part of define-prefix-command, +;; so let's keep it for now. +(fset 'vcursor-map vcursor-map) ;; If vcursor-key-bindings is already set on loading, bind the keys now. ;; This hybrid way of doing it retains compatibility while allowing @@ -716,8 +715,7 @@ not be visible otherwise, display it in another window." (interactive) (let ((buf (current-buffer)) (here (point)) (win (selected-window))) (vcursor-goto) ; will disable the vcursor - (save-excursion - (set-buffer buf) + (with-current-buffer buf (setq vcursor-window win) (vcursor-move here))) ) @@ -801,8 +799,7 @@ This is called by most of the virtual-cursor copying commands to find out how much to copy." (vcursor-check) - (save-excursion - (set-buffer (overlay-buffer vcursor-overlay)) + (with-current-buffer (overlay-buffer vcursor-overlay) (let ((start (goto-char (overlay-start vcursor-overlay)))) (- (progn (apply func args) (point)) start))) ) @@ -817,6 +814,16 @@ out how much to copy." (t (error "The virtual cursor is not active now"))) ) +(define-minor-mode vcursor-use-vcursor-map + "Toggle the state of the vcursor key map. +When on, the keys defined in it are mapped directly on top of the main +keymap, allowing you to move the vcursor with ordinary motion keys. +An indication \"!VC\" appears in the mode list. The effect is +local to the current buffer. +Disabling the vcursor automatically turns this off." + :keymap vcursor-map + :lighter " !VC") + (defun vcursor-disable (&optional arg) "Disable the virtual cursor. Next time you use it, it will start from point. @@ -844,7 +851,7 @@ not copy text until you turn it on again." ((and arg (< (prefix-numeric-value arg) 0)) (vcursor-move (point)) (setq vcursor-window (selected-window))) - (vcursor-use-vcursor-map (vcursor-toggle-vcursor-map 0))) + (vcursor-use-vcursor-map (vcursor-use-vcursor-map 0))) (setq vcursor-copy-flag nil) ) @@ -867,8 +874,7 @@ ALL-FRAMES is also used to decide whether to split the window." ;; We don't use fancy vcursor-find-window trickery, since we're ;; quite happy to have the vcursor cycle back into the current ;; window. - (let ((sw (selected-window)) - (win (vcursor-find-window nil nil (not all-frames)))) + (let ((win (vcursor-find-window nil nil (not all-frames)))) (if win (select-window win)) ;; else start from here (other-window n all-frames) @@ -891,7 +897,7 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." ;; (vcursor-window-funcall 'compare-windows arg) (require 'compare-w) (let* (p1 p2 maxp1 maxp2 b1 b2 w2 - success size + success (opoint1 (point)) opoint2 (skip-whitespace (if ignore-whitespace @@ -905,8 +911,7 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (setq p2 (point) b2 (current-buffer))) (setq opoint2 p2) (setq maxp1 (point-max)) - (save-excursion - (set-buffer b2) + (with-current-buffer b2 (setq maxp2 (point-max))) (setq success t) @@ -921,7 +926,7 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (and skip-whitespace (save-excursion - (let (p1a p2a w1 w2 result1 result2) + (let (p1a p2a result1 result2) (setq result1 (if (stringp skip-whitespace) (compare-windows-skip-whitespace opoint1) @@ -1096,8 +1101,7 @@ is called interactively, so prefix argument etc. are usable." (interactive "p") (vcursor-check) (vcursor-insert - (save-excursion - (set-buffer (overlay-buffer vcursor-overlay)) + (with-current-buffer (overlay-buffer vcursor-overlay) (let* ((ostart (overlay-start vcursor-overlay)) (end (+ ostart arg))) (prog1 @@ -1126,32 +1130,8 @@ line is treated like ordinary characters." (vcursor-copy (if (or (= count 0) arg) (1+ count) count))) ) -(defun vcursor-toggle-vcursor-map (&optional force noredisp) - "Toggle the state of the vcursor key map. -When on, the keys defined in it are mapped directly on top of the main -keymap, allowing you to move the vcursor with ordinary motion keys. -An indication \"!VC\" appears in the mode list. The effect is -local to the current buffer. -With prefix FORCE, turn on, or off if it is 0. -With NOREDISP, don't force redisplay. -Disabling the vcursor automatically turns this off." - (interactive "P") - (let ((new (cond ((not force) (not vcursor-use-vcursor-map)) - ((eq force 0) nil) - (t)))) - (or (eq new vcursor-use-vcursor-map) - (progn - (setq vcursor-use-vcursor-map new) - (or (assq 'vcursor-use-vcursor-map minor-mode-map-alist) - (setq minor-mode-map-alist - (cons (cons 'vcursor-use-vcursor-map vcursor-map) - minor-mode-map-alist))) - (or (assq 'vcursor-use-vcursor-map minor-mode-alist) - (setq minor-mode-alist - (cons (list 'vcursor-use-vcursor-map " !VC") - minor-mode-alist))) - (or noredisp (redraw-display))))) - ) +(define-obsolete-function-alias + 'vcursor-toggle-vcursor-map 'vcursor-use-vcursor-map "23.1") (defun vcursor-post-command () (and vcursor-auto-disable (not vcursor-last-command) @@ -1166,5 +1146,5 @@ Disabling the vcursor automatically turns this off." (provide 'vcursor) -;;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca +;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca ;;; vcursor.el ends here diff --git a/lisp/version.el b/lisp/version.el index 3722a14065d..6d82b194ff8 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -30,7 +30,7 @@ (defconst emacs-copyright "Copyright (C) 2007 Free Software Foundation, Inc." "Short copyright string for this version of Emacs.") -(defconst emacs-version "23.0.0" "\ +(defconst emacs-version "23.0.50" "\ Version numbers of this version of Emacs.") (defconst emacs-major-version diff --git a/lisp/view.el b/lisp/view.el index f6722f53756..c152383a48b 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -990,27 +990,27 @@ for highlighting the match that is found." times (if no "no " "") regexp) (sit-for 4)))) +;; This is the dumb approach, looking at each line. The original +;; version of this function looked like it might have been trying to +;; do something clever, but not succeeding: +;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00073.html (defun view-search-no-match-lines (times regexp) - ;; Search for the TIMESt occurrence of line with no match for REGEXP. - (let ((back (and (< times 0) (setq times (- times)) -1)) - n) - (while (> times 0) - (save-excursion (beginning-of-line (if back (- times) (1+ times))) - (setq n (point))) - (setq times - (cond - ((< (count-lines (point) n) times) -1) ; Not enough lines. - ((or (null (re-search-forward regexp nil t back)) - (if back (and (< (match-end 0) n) - (> (count-lines (match-end 0) n) 1)) - (and (< n (match-beginning 0)) - (> (count-lines n (match-beginning 0)) 1)))) - 0) ; No match within lines. - (back (count-lines (max n (match-beginning 0)) (match-end 0))) - (t (count-lines (match-beginning 0) (min n (match-end 0)))))) - (goto-char n)) - (and (zerop times) (looking-at "^.*$")))) - + "Search for the TIMESth occurrence of a line with no match for REGEXP. +If such a line is found, return non-nil and set the match-data to that line. +If TIMES is negative, search backwards." + (let ((step (if (>= times 0) 1 + (setq times (- times)) + -1))) + ;; Note that we do not check the current line. + (while (and (> times 0) + (zerop (forward-line step))) + ;; (forward-line 1) returns 0 on moving within the last line. + (if (eobp) + (setq times -1) + (or (re-search-forward regexp (line-end-position) t) + (setq times (1- times)))))) + (and (zerop times) + (looking-at ".*"))) (provide 'view) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 3ea8394b0b7..6e6aeb5fbb7 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -709,7 +709,9 @@ periodically for whitespace." If timer is not set, then set it to scan the files in `whitespace-all-buffer-files' periodically (defined by `whitespace-rescan-timer-time') for whitespace creep." - (if (and whitespace-rescan-timer-time (not whitespace-rescan-timer)) + (if (and whitespace-rescan-timer-time + (/= whitespace-rescan-timer-time 0) + (not whitespace-rescan-timer)) (setq whitespace-rescan-timer (add-timeout whitespace-rescan-timer-time 'whitespace-rescan-files-in-buffers nil diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el index ec702f7b45c..f0dab6626ac 100644 --- a/lisp/wid-browse.el +++ b/lisp/wid-browse.el @@ -40,14 +40,13 @@ ;;; The Mode. -(defvar widget-browse-mode-map nil +(defvar widget-browse-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map widget-keymap) + (define-key map "q" 'bury-buffer) + map) "Keymap for `widget-browse-mode'.") -(unless widget-browse-mode-map - (setq widget-browse-mode-map (make-sparse-keymap)) - (set-keymap-parent widget-browse-mode-map widget-keymap) - (define-key widget-browse-mode-map "q" 'bury-buffer)) - (easy-menu-define widget-browse-mode-customize-menu widget-browse-mode-map "Menu used in widget browser buffers." @@ -265,38 +264,21 @@ VALUE is assumed to be a list of widgets." ;;; Widget Minor Mode. -(defvar widget-minor-mode nil - "If non-nil, we are in Widget Minor Mode.") -(make-variable-buffer-local 'widget-minor-mode) - -(defvar widget-minor-mode-map nil +(defvar widget-minor-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map widget-keymap) + map) "Keymap used in Widget Minor Mode.") -(unless widget-minor-mode-map - (setq widget-minor-mode-map (make-sparse-keymap)) - (set-keymap-parent widget-minor-mode-map widget-keymap)) - ;;;###autoload -(defun widget-minor-mode (&optional arg) +(define-minor-mode widget-minor-mode "Togle minor mode for traversing widgets. With arg, turn widget mode on if and only if arg is positive." - (interactive "P") - (cond ((null arg) - (setq widget-minor-mode (not widget-minor-mode))) - ((<= arg 0) - (setq widget-minor-mode nil)) - (t - (setq widget-minor-mode t))) - (force-mode-line-update)) - -(add-to-list 'minor-mode-alist '(widget-minor-mode " Widget")) - -(add-to-list 'minor-mode-map-alist - (cons 'widget-minor-mode widget-minor-mode-map)) + :lighter " Widget") ;;; The End: (provide 'wid-browse) -;;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21 +;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21 ;;; wid-browse.el ends here diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 72cff55805b..c86f8351c7a 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -405,7 +405,17 @@ new value.") (unless (widget-get widget :suppress-face) (overlay-put overlay 'face (widget-apply widget :button-face-get)) (overlay-put overlay 'mouse-face - (widget-apply widget :mouse-face-get))) + ;; Make new list structure for the mouse-face value + ;; so that different widgets will have + ;; different `mouse-face' property values + ;; and will highlight separately. + (let ((mouse-face-value + (widget-apply widget :mouse-face-get))) + ;; If it's a list, copy it. + (if (listp mouse-face-value) + (copy-sequence mouse-face-value) + ;; If it's a symbol, put it in a list. + (list mouse-face-value))))) (overlay-put overlay 'pointer 'hand) (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) @@ -656,7 +666,9 @@ button is pressed or inactive, respectively. These are currently ignored." (progn (widget-put widget :suppress-face t) (insert-image image (propertize - tag 'mouse-face widget-button-pressed-face))) + ;; Use a `list' so it's unique and won't get + ;; accidentally merged with neighbouring images. + tag 'mouse-face (list widget-button-pressed-face)))) (insert tag))) (defun widget-move-and-invoke (event) diff --git a/lisp/window.el b/lisp/window.el index 26d1bdc9d3f..41aa5aea06b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -899,10 +899,13 @@ scrollbar interaction\) and `select' \(the next invocation of "Cancel delayed window autoselection. Optional argument FORCE means cancel unconditionally." (unless (and (not force) - ;; Don't cancel while the user drags a scroll bar. - (eq this-command 'scroll-bar-toolkit-scroll) - (memq (nth 4 (event-end last-input-event)) - '(handle end-scroll))) + ;; Don't cancel for select-window or select-frame events + ;; or when the user drags a scroll bar. + (or (memq this-command + '(handle-select-window handle-switch-frame)) + (and (eq this-command 'scroll-bar-toolkit-scroll) + (memq (nth 4 (event-end last-input-event)) + '(handle end-scroll))))) (setq mouse-autoselect-window-state nil) (when (timerp mouse-autoselect-window-timer) (cancel-timer mouse-autoselect-window-timer)) @@ -990,33 +993,39 @@ active. This function is run by `mouse-autoselect-window-timer'." "Handle select-window events." (interactive "e") (let ((window (posn-window (event-start event)))) - (when (and (window-live-p window) - ;; Don't switch if we're currently in the minibuffer. - ;; This tries to work around problems where the minibuffer gets - ;; unselected unexpectedly, and where you then have to move - ;; your mouse all the way down to the minibuffer to select it. - (not (window-minibuffer-p (selected-window))) - ;; Don't switch to a minibuffer window unless it's active. - (or (not (window-minibuffer-p window)) - (minibuffer-window-active-p window))) - (unless (and (numberp mouse-autoselect-window) - (not (zerop mouse-autoselect-window)) - (not (eq mouse-autoselect-window-state 'select)) - (progn - ;; Cancel any delayed autoselection. - (mouse-autoselect-window-cancel t) - ;; Start delayed autoselection from current mouse position - ;; and window. - (mouse-autoselect-window-start (mouse-position) window) - ;; Executing a command cancels delayed autoselection. - (add-hook - 'pre-command-hook 'mouse-autoselect-window-cancel))) + (unless (or (not (window-live-p window)) + ;; Don't switch if we're currently in the minibuffer. + ;; This tries to work around problems where the + ;; minibuffer gets unselected unexpectedly, and where + ;; you then have to move your mouse all the way down to + ;; the minibuffer to select it. + (window-minibuffer-p (selected-window)) + ;; Don't switch to minibuffer window unless it's active. + (and (window-minibuffer-p window) + (not (minibuffer-window-active-p window))) + ;; Don't switch when autoselection shall be delayed. + (and (numberp mouse-autoselect-window) + (not (zerop mouse-autoselect-window)) + (not (eq mouse-autoselect-window-state 'select)) + (progn + ;; Cancel any delayed autoselection. + (mouse-autoselect-window-cancel t) + ;; Start delayed autoselection from current mouse position + ;; and window. + (mouse-autoselect-window-start (mouse-position) window) + ;; Executing a command cancels delayed autoselection. + (add-hook + 'pre-command-hook 'mouse-autoselect-window-cancel)))) + (when mouse-autoselect-window ;; Reset state of delayed autoselection. (setq mouse-autoselect-window-state nil) - (when mouse-autoselect-window - ;; Run `mouse-leave-buffer-hook' when autoselecting window. - (run-hooks 'mouse-leave-buffer-hook)) - (select-window window))))) + ;; Set input focus to handle cross-frame movement. Bind + ;; `focus-follows-mouse' to avoid moving the mouse cursor. + (let (focus-follows-mouse) + (select-frame-set-input-focus (window-frame window))) + ;; Run `mouse-leave-buffer-hook' when autoselecting window. + (run-hooks 'mouse-leave-buffer-hook)) + (select-window window)))) (define-key ctl-x-map "2" 'split-window-vertically) (define-key ctl-x-map "3" 'split-window-horizontally) diff --git a/lisp/woman.el b/lisp/woman.el index 4d50b5d3f2e..c4f922f38e7 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -502,7 +502,7 @@ As a special case, if PATHS is nil then replace it by calling ;; Assume no `cygpath' program available. ;; Hack /cygdrive/x/ or /x/ or (obsolete) //x/ to x:/ (when (string-match "\\`\\(/cygdrive\\|/\\)?/./" file) - (if (match-string 1) ; /cygdrive/x/ or //x/ -> /x/ + (if (match-beginning 1) ; /cygdrive/x/ or //x/ -> /x/ (setq file (substring file (match-end 1)))) (aset file 0 (aref file 1)) ; /x/ -> xx/ (aset file 1 ?:)) ; xx/ -> x:/ @@ -520,19 +520,19 @@ As a special case, if PATHS is nil then replace it by calling :group 'help) (defcustom woman-show-log nil - "*If non-nil then show the *WoMan-Log* buffer if appropriate. + "If non-nil then show the *WoMan-Log* buffer if appropriate. I.e. if any warning messages are written to it. Default is nil." :type 'boolean :group 'woman) (defcustom woman-pre-format-hook nil - "*Hook run by WoMan immediately before formatting a buffer. + "Hook run by WoMan immediately before formatting a buffer. Change only via `Customization' or the function `add-hook'." :type 'hook :group 'woman) (defcustom woman-post-format-hook nil - "*Hook run by WoMan immediately after formatting a buffer. + "Hook run by WoMan immediately after formatting a buffer. Change only via `Customization' or the function `add-hook'." :type 'hook :group 'woman) @@ -550,7 +550,7 @@ Change only via `Customization' or the function `add-hook'." (if (eq system-type 'windows-nt) (mapcar 'woman-Cyg-to-Win path) path)) - "*List of dirs to search and/or files to try for man config file. + "List of dirs to search and/or files to try for man config file. A trailing separator (`/' for UNIX etc.) on directories is optional, and the filename is used if a directory specified is the first to start with \"man\" and has an extension starting @@ -595,7 +595,7 @@ or MANPATH_MAP[ \t]+\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\)" nil t) (add-to-list 'manpath (if (match-beginning 1) - (match-string 1) + (match-string 1) (cons (match-string 2) (match-string 3))))) manpath)) @@ -606,7 +606,7 @@ MANPATH_MAP[ \t]+\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\)" nil t) (defcustom woman-manpath (or (woman-parse-colon-path (getenv "MANPATH")) '("/usr/man" "/usr/share/man" "/usr/local/man")) - "*List of DIRECTORY TREES to search for UN*X manual files. + "List of DIRECTORY TREES to search for UN*X manual files. Each element should be the name of a directory that contains subdirectories of the form `man?', or more precisely subdirectories selected by the value of `woman-manpath-man-regexp'. Non-directory @@ -649,7 +649,7 @@ Microsoft platforms. Its purpose is to avoid `cat?', `.', `..', etc." (defcustom woman-path (if (eq system-type 'ms-dos) '("$DJDIR/info" "$DJDIR/man/cat[1-9onlp]")) - "*List of SPECIFIC DIRECTORIES to search for UN*X manual files. + "List of SPECIFIC DIRECTORIES to search for UN*X manual files. For example (\"/emacs/etc\"). @@ -676,7 +676,7 @@ drive letters explicitly." :group 'woman-interface) (defcustom woman-cache-level 2 - "*The level of topic caching. + "The level of topic caching. 1 - cache only the topic and directory lists (the only level before version 0.34 - only for compatibility); 2 - cache also the directories for each topic @@ -695,7 +695,7 @@ file `woman-cache-filename' for a change to take effect. :group 'woman-interface) (defcustom woman-cache-filename nil - "*The full pathname of the WoMan directory and topic cache file. + "The full pathname of the WoMan directory and topic cache file. It is used to save and restore the cache between sessions. This is especially useful with remote-mounted man page files! The default value of nil suppresses this action. The `standard' non-nil @@ -707,7 +707,7 @@ the `woman' command to update and re-write the cache." :group 'woman-interface) (defcustom woman-dired-keys t - "*List of `dired' mode keys to define to run WoMan on current file. + "List of `dired' mode keys to define to run WoMan on current file. E.g. '(\"w\" \"W\"), or any non-null atom to automatically define \"w\" and \"W\" if they are unbound, or nil to do nothing. Default is t." @@ -719,20 +719,20 @@ Default is t." (defcustom woman-imenu-generic-expression '((nil "\n\\([A-Z].*\\)" 1) ; SECTION, but not TITLE ("*Subsections*" "^ \\([A-Z].*\\)" 1)) - "*Imenu support for Sections and Subsections. + "Imenu support for Sections and Subsections. An alist with elements of the form (MENU-TITLE REGEXP INDEX) -- see the documentation for `imenu-generic-expression'." :type 'sexp :group 'woman-interface) (defcustom woman-imenu nil - "*If non-nil then WoMan adds a Contents menu to the menubar. + "If non-nil then WoMan adds a Contents menu to the menubar. It does this by calling `imenu-add-to-menubar'. Default is nil." :type 'boolean :group 'woman-interface) (defcustom woman-imenu-title "CONTENTS" - "*The title to use if WoMan adds a Contents menu to the menubar. + "The title to use if WoMan adds a Contents menu to the menubar. Default is \"CONTENTS\"." :type 'string :group 'woman-interface) @@ -741,13 +741,13 @@ Default is \"CONTENTS\"." ;; `woman-use-topic-at-point' may be let-bound when woman is loaded, ;; in which case its global value does not get defined. ;; `woman-file-name' sets it to this value if it is unbound. - "*Default value for `woman-use-topic-at-point'." + "Default value for `woman-use-topic-at-point'." :type '(choice (const :tag "Yes" t) (const :tag "No" nil)) :group 'woman-interface) (defcustom woman-use-topic-at-point woman-use-topic-at-point-default - "*Control use of the word at point as the default topic. + "Control use of the word at point as the default topic. If non-nil the `woman' command uses the word at point automatically, without interactive confirmation, if it exists as a topic." :type '(choice (const :tag "Yes" t) @@ -778,7 +778,7 @@ Used as :set cookie by Customize when customizing the user options (defcustom woman-uncompressed-file-regexp "\\.\\([0-9lmnt]\\w*\\)" ; disallow no extension - "*Do not change this unless you are sure you know what you are doing! + "Do not change this unless you are sure you know what you are doing! Regexp used to select man source files (ignoring any compression extension). The SysV standard man pages use two character suffixes, and this is @@ -793,7 +793,7 @@ MUST NOT end with any kind of string terminator such as $ or \\'." (defcustom woman-file-compression-regexp "\\.\\(g?z\\|bz2\\)\\'" - "*Do not change this unless you are sure you know what you are doing! + "Do not change this unless you are sure you know what you are doing! Regexp used to match compressed man file extensions for which decompressors are available and handled by auto-compression mode, e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\)\\\\'\" for `gzip' or `bzip2'. @@ -809,7 +809,7 @@ Should begin with \\. and end with \\' and MUST NOT be optional." (defcustom woman-use-own-frame ; window-system (or (and (fboundp 'display-graphic-p) (display-graphic-p)) ; Emacs 21 (memq window-system '(x w32))) ; Emacs 20 - "*If non-nil then use a dedicated frame for displaying WoMan windows. + "If non-nil then use a dedicated frame for displaying WoMan windows. Only useful when run on a graphic display such as X or MS-Windows." :type 'boolean :group 'woman-interface) @@ -823,37 +823,37 @@ Only useful when run on a graphic display such as X or MS-Windows." :group 'woman) (defcustom woman-fill-column 65 - "*Right margin for formatted text -- default is 65." + "Right margin for formatted text -- default is 65." :type 'integer :group 'woman-formatting) (defcustom woman-fill-frame nil ;; Based loosely on a suggestion by Theodore Jump: - "*If non-nil then most of the window width is used." + "If non-nil then most of the window width is used." :type 'boolean :group 'woman-formatting) (defcustom woman-default-indent 5 - "*Default prevailing indent set by -man macros -- default is 5. + "Default prevailing indent set by -man macros -- default is 5. Set this variable to 7 to emulate GNU man formatting." :type 'integer :group 'woman-formatting) (defcustom woman-bold-headings t - "*If non-nil then embolden section and subsection headings. Default is t. + "If non-nil then embolden section and subsection headings. Default is t. Heading emboldening is NOT standard `man' behavior." :type 'boolean :group 'woman-formatting) (defcustom woman-ignore t - "*If non-nil then unrecognized requests etc. are ignored. Default is t. + "If non-nil then unrecognized requests etc.. are ignored. Default is t. This gives the standard ?roff behavior. If nil then they are left in the buffer, which may aid debugging." :type 'boolean :group 'woman-formatting) (defcustom woman-preserve-ascii t - "*If non-nil, preserve ASCII characters in the WoMan buffer. + "If non-nil, preserve ASCII characters in the WoMan buffer. Otherwise, to save time, some backslashes and spaces may be represented differently (as the values of the variables `woman-escaped-escape-char' and `woman-unpadded-space-char' @@ -865,7 +865,7 @@ buffer text is searched, copied or saved to a file." :group 'woman-formatting) (defcustom woman-emulation 'nroff - "*WoMan emulation, currently either nroff or troff. Default is nroff. + "WoMan emulation, currently either nroff or troff. Default is nroff. Troff emulation is experimental and largely untested. \(Add groff later?)" :type '(choice (const nroff) (const troff)) @@ -884,7 +884,7 @@ Troff emulation is experimental and largely untested. (or (and (fboundp 'display-color-p) (display-color-p)) (and (fboundp 'display-graphic-p) (display-graphic-p)) (x-display-color-p)) - "*If non-nil then WoMan assumes that face support is available. + "If non-nil then WoMan assumes that face support is available. It defaults to a non-nil value if the display supports either colors or different fonts." :type 'boolean @@ -955,11 +955,10 @@ This is usually either black or white." (let (symbol-fonts) ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does ;; not seem to work and fonts may be repeated, so ... - (while fonts - (and (string-match "-Symbol-" (car fonts)) - (not (member (car fonts) symbol-fonts)) - (setq symbol-fonts (cons (car fonts) symbol-fonts))) - (setq fonts (cdr fonts))) + (dolist (font fonts) + (and (string-match "-Symbol-" font) + (not (member font symbol-fonts)) + (setq symbol-fonts (cons font symbol-fonts)))) symbol-fonts)) (when woman-font-support @@ -969,12 +968,12 @@ This is usually either black or white." ;; avoid unnecessarily upsetting the line spacing in NTEmacs 20.5! (defcustom woman-use-extended-font t - "*If non-nil then may use non-ASCII characters from the default font." + "If non-nil then may use non-ASCII characters from the default font." :type 'boolean :group 'woman-faces) (defcustom woman-use-symbol-font nil - "*If non-nil then may use the symbol font. + "If non-nil then may use the symbol font. It is off by default, mainly because it may change the line spacing \(in NTEmacs 20.5)." :type 'boolean @@ -986,7 +985,7 @@ It is off by default, mainly because it may change the line spacing "Symbol font(s), preferably same size as default when WoMan was loaded.") (defcustom woman-symbol-font (car woman-symbol-font-list) - "*A string describing the symbol font to use for special characters. + "A string describing the symbol font to use for special characters. It should be compatible with, and the same size as, the default text font. Under MS-Windows, the default is \"-*-Symbol-normal-r-*-*-*-*-96-96-p-*-ms-symbol\"." @@ -1199,10 +1198,9 @@ Return t if the file exists, nil otherwise." "Save the directory and topic cache. It is saved to the file named by the variable `woman-cache-filename'." (if woman-cache-filename - (save-excursion ; to restore current buffer + (with-current-buffer (generate-new-buffer "WoMan tmp buffer") ;; Make a temporary buffer; name starting with space "hides" it. - (let ((standard-output - (set-buffer (generate-new-buffer "WoMan tmp buffer"))) + (let ((standard-output (current-buffer)) (backup-inhibited t)) ;; (switch-to-buffer standard-output t) ; only for debugging (buffer-disable-undo standard-output) @@ -1344,10 +1342,8 @@ Ignore any paths that are unreadable or not directories." ;; Allow each path to be a single string or a list of strings: (if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath))) (if (not (listp woman-path)) (setq woman-path (list woman-path))) - (let (dir head dirs path) - (while woman-manpath - (setq dir (car woman-manpath) - woman-manpath (cdr woman-manpath)) + (let (head dirs path) + (dolist (dir woman-manpath) (when (consp dir) (unless path (setq path (split-string (getenv "PATH") path-separator t))) @@ -1361,9 +1357,7 @@ Ignore any paths that are unreadable or not directories." (setq dir (woman-canonicalize-dir dir) dirs (nconc dirs (directory-files dir t woman-manpath-man-regexp))))) - (while woman-path - (setq dir (car woman-path) - woman-path (cdr woman-path)) + (dolist (dir woman-path) (if (or (null dir) (null (setq dir (woman-canonicalize-dir dir) head (file-name-directory dir))) @@ -1455,22 +1449,20 @@ Also make each path-info component into a list. \(Note that this function changes the value of ALIST.)" ;; Replaces unreadably "optimized" O(n^2) implementation. ;; Instead we use sorting to merge stuff efficiently. -- dak - (let (elt newalist) + (let (newalist) ;; Sort list into reverse order (setq alist (sort alist (lambda(x y) (string< (car y) (car x))))) ;; merge duplicate keys. (if (> woman-cache-level 1) - (while alist - (setq elt (pop alist)) + (dolist (elt alist) (if (equal (car elt) (caar newalist)) (unless (member (cdr elt) (cdar newalist)) (setcdr (car newalist) (cons (cdr elt) (cdar newalist)))) (setcdr elt (list (cdr elt))) (push elt newalist))) - ;; woman-cache-level = 1 => elements are single-element lists ... - (while alist - (setq elt (pop alist)) + ;; woman-cache-level = 1 => elements are single-element lists ... + (dolist (elt alist) (unless (equal (car elt) (caar newalist)) (push elt newalist)))) newalist)) @@ -1496,10 +1488,9 @@ Also make each path-info component into a list. ;; Use cached path-info to locate files for each topic: (let ((path-info (cdr (assoc topic topics))) filename) - (while path-info - (setq dir (nth (car (car path-info)) path) - filename (car (cdr (car path-info))) - path-info (cdr path-info) + (dolist (elt path-info) + (setq dir (nth (car elt) path) + filename (car (cdr elt)) files (nconc files ;; Find the actual file name: (if filename @@ -1534,7 +1525,7 @@ Also make each path-info component into a list. "Define dired keys to run WoMan according to `woman-dired-keys'." (if woman-dired-keys (if (listp woman-dired-keys) - (mapcar 'woman-dired-define-key woman-dired-keys) + (mapc 'woman-dired-define-key woman-dired-keys) (woman-dired-define-key-maybe "w") (woman-dired-define-key-maybe "W"))) (define-key-after (lookup-key dired-mode-map [menu-bar immediate]) @@ -1648,7 +1639,10 @@ Do not call directly!" (select-frame (or (and (frame-live-p woman-frame) woman-frame) (setq woman-frame (make-frame))))) - (switch-to-buffer (get-buffer-create bufname)) + (set-buffer (get-buffer-create bufname)) + (condition-case nil + (switch-to-buffer (current-buffer)) + (error (pop-to-buffer (current-buffer)))) (buffer-disable-undo) (setq buffer-read-only nil) (erase-buffer) ; NEEDED for reformat @@ -1767,21 +1761,21 @@ Leave point at end of new text. Return length of inserted text." ;;; Major mode (Man) interface: -(defvar woman-mode-map nil "Keymap for woman mode.") +(defvar woman-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map Man-mode-map) -(unless woman-mode-map - (setq woman-mode-map (make-sparse-keymap)) - (set-keymap-parent woman-mode-map Man-mode-map) + (define-key map "R" 'woman-reformat-last-file) + (define-key map "w" 'woman) + (define-key map "\en" 'WoMan-next-manpage) + (define-key map "\ep" 'WoMan-previous-manpage) + (define-key map [M-mouse-2] 'woman-follow-word) - (define-key woman-mode-map "R" 'woman-reformat-last-file) - (define-key woman-mode-map "w" 'woman) - (define-key woman-mode-map "\en" 'WoMan-next-manpage) - (define-key woman-mode-map "\ep" 'WoMan-previous-manpage) - (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) - - ;; We don't need to call `man' when we are in `woman-mode'. - (define-key woman-mode-map [remap man] 'woman) - (define-key woman-mode-map [remap man-follow] 'woman-follow)) + ;; We don't need to call `man' when we are in `woman-mode'. + (define-key map [remap man] 'woman) + (define-key map [remap man-follow] 'woman-follow) + map) + "Keymap for woman mode.") (defun woman-follow (topic) "Get a Un*x manual page of the item under point and put it in a buffer." @@ -1916,7 +1910,7 @@ See `Man-mode' for additional details." ;; necessary to avoid re-installing the same imenu: (setq woman-imenu-done nil) (if woman-imenu (woman-imenu)) - (let (buffer-read-only) + (let ((inhibit-read-only t)) (Man-highlight-references 'WoMan-xref-man-page)) (set-buffer-modified-p nil) (run-mode-hooks 'woman-mode-hook)) @@ -1953,14 +1947,10 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." (setq apropos-accumulator (apropos-internal "woman" (lambda (symbol) - (or (commandp symbol) - (user-variable-p symbol))))) - ;; Filter out any inhibited symbols: - (let ((tem apropos-accumulator)) - (while tem - (if (get (car tem) 'apropos-inhibit) - (setq apropos-accumulator (delq (car tem) apropos-accumulator))) - (setq tem (cdr tem)))) + (and + (or (commandp symbol) + (user-variable-p symbol)) + (not (get symbol 'apropos-inhibit)))))) ;; Find documentation strings: (let ((p apropos-accumulator) doc symbol) @@ -2091,17 +2081,14 @@ alist in `woman-buffer-alist' and return nil." (char-to-string woman-unpadded-space-char) "Internal string representation of unpadded space characters.") -(defvar woman-syntax-table nil +(defvar woman-syntax-table + (let ((st (make-syntax-table))) + ;; The following internal chars must NOT have whitespace syntax: + (modify-syntax-entry woman-unpadded-space-char "." st) + (modify-syntax-entry woman-escaped-escape-char "." st) + st) "Syntax table to support special characters used internally by WoMan.") -(if woman-syntax-table - () - (setq woman-syntax-table (make-syntax-table)) - ;; The following internal chars must NOT have whitespace syntax: - (modify-syntax-entry woman-unpadded-space-char "." woman-syntax-table) - (modify-syntax-entry woman-escaped-escape-char "." woman-syntax-table) - ) - (defun woman-set-buffer-display-table () "Set up a display table for a WoMan buffer. This display table is used for displaying internal special characters, but @@ -2169,14 +2156,14 @@ To be called on original buffer and any .so insertions." (goto-char from) ;; .eo turns off escape character processing (while (re-search-forward "\\(\\\\[\\e]\\)\\|^\\.eo" to t) ; \\ - (if (match-string 1) + (if (match-beginning 1) (replace-match woman-escaped-escape-string t t) (woman-delete-whole-line) ;; .ec turns on escape character processing (and sets the ;; escape character to its argument, if any, which I'm ignoring ;; for now!) (while (and (re-search-forward "\\(\\\\\\)\\|^\\.ec" to t) ; \ - (match-string 1)) + (match-beginning 1)) (replace-match woman-escaped-escape-string t t)) ;; ***** Need test for .ec arg and warning here! ***** (woman-delete-whole-line))) @@ -2190,15 +2177,13 @@ To be called on original buffer and any .so insertions." (defun woman-non-underline-faces () "Prepare non-underlined versions of underlined faces." (let ((face-list (face-list))) - (while face-list - (let* ((face (car face-list)) - (face-name (symbol-name face))) + (dolist (face face-list) + (let ((face-name (symbol-name face))) (if (and (string-match "\\`woman-" face-name) (face-underline-p face)) (let ((face-no-ul (intern (concat face-name "-no-ul")))) (copy-face face face-no-ul) - (set-face-underline-p face-no-ul nil)))) - (setq face-list (cdr face-list))))) + (set-face-underline-p face-no-ul nil))))))) ;; Preprocessors ;; ============= @@ -2449,7 +2434,7 @@ Preserves location of `point'." to t) (let ((from (match-beginning 0)) (delim (regexp-quote (match-string 1))) - (absolute (match-string 2)) ; absolute position? + (absolute (match-beginning 2)) ; absolute position? (N (woman-parse-numeric-arg)) ; distance to msg) ; for warning @@ -2628,7 +2613,7 @@ If DELETE is non-nil then delete from point." ;; Interpret bogus `el \}' as `el \{', ;; especially for Tcl/Tk man pages: "\\(\\\\{\\|el[ \t]*\\\\}\\)\\|\\(\n[.']\\)?[ \t]*\\\\}[ \t]*") - (match-string 1)) + (match-beginning 1)) (re-search-forward "\\\\}")) (delete-region (if delete from (match-beginning 0)) (point)) (if (looking-at "^$") (delete-char 1)) @@ -2731,11 +2716,9 @@ If DELETE is non-nil then delete from point." (defun woman0-rename () "Effect renaming required by .rn requests." ;; For now, do this backwards AFTER all macro expansion. - (while woman0-rename-alist - (let* ((new (car woman0-rename-alist)) - (old (cdr new)) - (new (car new))) - (setq woman0-rename-alist (cdr woman0-rename-alist)) + (dolist ((new woman0-rename-alist)) + (let ((old (cdr new)) + (new (car new))) (goto-char (point-min)) (setq new (concat "^[.'][ \t]*" (regexp-quote new))) (setq old (concat "." old)) @@ -2752,7 +2735,7 @@ Replaces || by |, but | by \, where | denotes the internal escape." (let (start) (while (setq start (string-match woman-unescape-regex macro start)) (setq macro - (if (match-string 1 macro) + (if (match-beginning 1) (replace-match "" t t macro 1) (replace-match "\\" t t macro)) start (1+ start))) @@ -2875,7 +2858,7 @@ interpolated by `\*x' and `\*(xx' escapes." (while ;; Find .ds requests and \* escapes: (re-search-forward "\\(^[.'][ \t]*ds\\)\\|\\\\\\*" to t) - (cond ((match-string 1) ; .ds + (cond ((match-beginning 1) ; .ds (skip-chars-forward " \t") (if (eolp) ; ignore if no argument () @@ -3004,7 +2987,7 @@ Set NEWTEXT in face FACE if specified." ((cadr replacement) ; Use ASCII simulation (woman-replace-match (cadr replacement))))) (WoMan-warn (concat "Special character " - (if (match-string 1) "\\(%s" "\\[%s]") + (if (match-beginning 1) "\\(%s" "\\[%s]") " not interpolated!") name) (if woman-ignore (woman-delete-match 0)))) )) @@ -3016,8 +2999,7 @@ together with the corresponding glyphs from the default and symbol fonts. Useful for constructing the alist variable `woman-special-characters'." (interactive) (with-output-to-temp-buffer "*WoMan Extended Font Map*" - (save-excursion - (set-buffer standard-output) + (with-current-buffer standard-output (let ((i 32)) (while (< i 256) (insert (format "\\%03o " i) (string i) " " (string i)) @@ -3238,7 +3220,7 @@ If optional arg CONCAT is non-nil then join arguments." (setq c (concat "\\(" c "\\)\\|^[.'][ \t]*hc")) (save-excursion (while (and (re-search-forward c nil t) - (match-string 1)) + (match-beginning 1)) (delete-char -1))) )) @@ -3315,7 +3297,7 @@ If optional arg CONCAT is non-nil then join arguments." "^[.'][ \t]*\\(\\(\\ft\\)\\|\\(.P\\)\\)\\|\\(\\\\f\\)" nil 1) (let (font beg notfont fescape) ;; Match font indicator and leave point at end of sequence: - (cond ((match-string 2) + (cond ((match-beginning 2) ;; .ft request found (setq beg (match-beginning 0)) (skip-chars-forward " \t") @@ -3323,10 +3305,10 @@ If optional arg CONCAT is non-nil then join arguments." (setq font previous-font) (looking-at "[^ \t\n]+")) (forward-line)) ; end of control line and \n - ((match-string 3) + ((match-beginning 3) ;; Macro that resets font found (setq font 'default)) - ((match-string 4) + ((match-beginning 4) ;; \f escape found (setq beg (match-beginning 0) fescape t) @@ -3758,7 +3740,7 @@ expression in parentheses. Leaves point after the value." (while (and (setq to (re-search-forward "\\(\\\\c\\)?\n[.']" nil t)) - (match-string 1) + (match-beginning 1) (looking-at "br")) (goto-char (match-beginning 0)) (woman-delete-line 2))) @@ -3920,12 +3902,10 @@ Leave 1 blank line. Format paragraphs upto TO." ((eq c ?\t) ; skip (if (eq (following-char) ?\t) (forward-char) ; both tabs, just skip - (let ((i woman-tab-width)) - (while (> i 0) - (if (eolp) - (insert ?\ ) ; extend line - (forward-char)) ; skip - (setq i (1- i))) + (dotimes (i woman-tab-width) + (if (eolp) + (insert ?\ ) ; extend line + (forward-char)) ; skip ))) (t (if (or (eq (following-char) ?\ ) ; overwrite OK @@ -4312,7 +4292,7 @@ Format paragraphs upto TO. Set prevailing indent to I." ;; Necessary to avoid spaces inheriting underlines. ;; Cannot simply delete (current-column) whitespace ;; characters because some may be tabs! - (while (> i 0) (insert ? ) (setq i (1- i))))) + (insert-char ?\s i))) (goto-char to) ; necessary ??? )) )) @@ -4468,9 +4448,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." n (- (if n (1- n) eol) (point)) tab (- tab (if (eq type ?C) (/ n 2) n))) ) (setq n (- tab (current-column))) - (while (> n 0) - (insert ?\ ) - (setq n (1- n)))) + (insert-char ?\s n)) (insert ?\ )))) (defun woman2-DT (to) @@ -4571,8 +4549,7 @@ Format paragraphs upto TO." (defun WoMan-log-begin () "Log the beginning of formatting in *WoMan-Log*." (let ((WoMan-current-buffer (buffer-name))) - (save-excursion - (set-buffer (get-buffer-create "*WoMan-Log*")) + (with-current-buffer (get-buffer-create "*WoMan-Log*") (or (eq major-mode 'view-mode) (view-mode 1)) (setq buffer-read-only nil) (goto-char (point-max)) @@ -4615,8 +4592,7 @@ with the message." "Log a message STRING in *WoMan-Log*. If optional argument END is non-nil then make buffer read-only after logging the message." - (save-excursion - (set-buffer (get-buffer-create "*WoMan-Log*")) + (with-current-buffer (get-buffer-create "*WoMan-Log*") (setq buffer-read-only nil) (goto-char (point-max)) (or end (insert " ")) (insert string "\n") @@ -4635,5 +4611,5 @@ logging the message." (provide 'woman) -;;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 +;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 ;;; woman.el ends here diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 1c29669b73b..f6f3b75dc07 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -121,14 +121,15 @@ any protocol specific data.") (defun x-dnd-init-frame (&optional frame) "Setup drag and drop for FRAME (i.e. create appropriate properties)." - (x-register-dnd-atom "DndProtocol" frame) - (x-register-dnd-atom "_MOTIF_DRAG_AND_DROP_MESSAGE" frame) - (x-register-dnd-atom "XdndEnter" frame) - (x-register-dnd-atom "XdndPosition" frame) - (x-register-dnd-atom "XdndLeave" frame) - (x-register-dnd-atom "XdndDrop" frame) - (x-dnd-init-xdnd-for-frame frame) - (x-dnd-init-motif-for-frame frame)) + (when (eq 'x (window-system frame)) + (x-register-dnd-atom "DndProtocol" frame) + (x-register-dnd-atom "_MOTIF_DRAG_AND_DROP_MESSAGE" frame) + (x-register-dnd-atom "XdndEnter" frame) + (x-register-dnd-atom "XdndPosition" frame) + (x-register-dnd-atom "XdndLeave" frame) + (x-register-dnd-atom "XdndDrop" frame) + (x-dnd-init-xdnd-for-frame frame) + (x-dnd-init-motif-for-frame frame))) (defun x-dnd-get-state-cons-for-frame (frame-or-window) "Return the entry in x-dnd-current-state for a frame or window." diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 8ce93e2293e..15aebb08ab2 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -45,6 +45,7 @@ (defvar xterm-mouse-debug-buffer nil) +;; XXX Perhaps this should be terminal-local instead. --lorentey (define-key function-key-map "\e[M" 'xterm-mouse-translate) (defvar xterm-mouse-last) @@ -104,11 +105,13 @@ (vector (list down-where down-data) down) (vector down)))))))) -(defvar xterm-mouse-x 0 - "Position of last xterm mouse event relative to the frame.") - -(defvar xterm-mouse-y 0 - "Position of last xterm mouse event relative to the frame.") +;; These two variables have been converted to terminal parameters. +;; +;;(defvar xterm-mouse-x 0 +;; "Position of last xterm mouse event relative to the frame.") +;; +;;(defvar xterm-mouse-y 0 +;; "Position of last xterm mouse event relative to the frame.") (defvar xt-mouse-epoch nil) @@ -116,7 +119,9 @@ (defun xterm-mouse-position-function (pos) "Bound to `mouse-position-function' in XTerm mouse mode." - (setcdr pos (cons xterm-mouse-x xterm-mouse-y)) + (when (terminal-parameter nil 'xterm-mouse-x) + (setcdr pos (cons (terminal-parameter nil 'xterm-mouse-x) + (terminal-parameter nil 'xterm-mouse-y)))) pos) ;; read xterm sequences above ascii 127 (#x7f) @@ -175,8 +180,8 @@ (left (nth 0 ltrb)) (top (nth 1 ltrb))) - (setq xterm-mouse-x x - xterm-mouse-y y) + (set-terminal-parameter nil 'xterm-mouse-x x) + (set-terminal-parameter nil 'xterm-mouse-y y) (setq last-input-event (list mouse @@ -202,27 +207,67 @@ down the SHIFT key while pressing the mouse button." :global t :group 'mouse (if xterm-mouse-mode ;; Turn it on - (unless window-system + (progn + ;; Frame creation and deletion. + (add-hook 'after-make-frame-functions + 'turn-on-xterm-mouse-tracking-on-terminal) + (add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame) + + ;; Restore normal mouse behaviour outside Emacs. + (add-hook 'suspend-tty-functions + 'turn-off-xterm-mouse-tracking-on-terminal) + (add-hook 'resume-tty-functions + 'turn-on-xterm-mouse-tracking-on-terminal) + (add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) + (add-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking) + (add-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking) (setq mouse-position-function #'xterm-mouse-position-function) (turn-on-xterm-mouse-tracking)) ;; Turn it off + (remove-hook 'after-make-frame-functions + 'turn-on-xterm-mouse-tracking-on-terminal) + (remove-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame) + (remove-hook 'suspend-tty-functions + 'turn-off-xterm-mouse-tracking-on-terminal) + (remove-hook 'resume-tty-functions + 'turn-on-xterm-mouse-tracking-on-terminal) + (remove-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) + (remove-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking) + (remove-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking) (turn-off-xterm-mouse-tracking 'force) (setq mouse-position-function nil))) (defun turn-on-xterm-mouse-tracking () "Enable Emacs mouse tracking in xterm." - (if xterm-mouse-mode - (send-string-to-terminal "\e[?1000h"))) + (dolist (f (frame-list)) + (when (eq t (frame-live-p f)) + (with-selected-frame f + (when xterm-mouse-mode + (send-string-to-terminal "\e[?1000h")))))) (defun turn-off-xterm-mouse-tracking (&optional force) "Disable Emacs mouse tracking in xterm." - (if (or force xterm-mouse-mode) - (send-string-to-terminal "\e[?1000l"))) - -;; Restore normal mouse behaviour outside Emacs. -(add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) -(add-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking) -(add-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking) + (dolist (f (frame-list)) + (when (eq t (frame-live-p f)) + (with-selected-frame f + (when (or force xterm-mouse-mode) + (send-string-to-terminal "\e[?1000l")))))) + +(defun turn-on-xterm-mouse-tracking-on-terminal (terminal) + "Enable xterm mouse tracking on TERMINAL." + (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))) + (send-string-to-terminal "\e[?1000h" terminal))) + +(defun turn-off-xterm-mouse-tracking-on-terminal (terminal) + "Disable xterm mouse tracking on TERMINAL." + (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))) + (send-string-to-terminal "\e[?1000l" terminal))) + +(defun xterm-mouse-handle-delete-frame (frame) + "Turn off xterm mouse tracking if FRAME is the last frame on its device." + (when (and (eq t (frame-live-p frame)) + (<= 1 (length (frames-on-display-list (frame-terminal frame))))) + (turn-off-xterm-mouse-tracking-on-terminal frame))) (provide 'xt-mouse) |