diff options
| author | Karoly Lorentey | 2006-05-03 11:56:53 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-05-03 11:56:53 +0000 |
| commit | c044516d384ff70e820686d4e995dcc23ee22e6f (patch) | |
| tree | 4a9b52cf3e7da73040903b719dfca8113a765884 /lisp | |
| parent | b33c71f58623306001d4d4fe4f7354d8c360edaa (diff) | |
| parent | 9d6bb9e0af2671a4deca1509f4a2d5655400f67a (diff) | |
| download | emacs-c044516d384ff70e820686d4e995dcc23ee22e6f.tar.gz emacs-c044516d384ff70e820686d4e995dcc23ee22e6f.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-252
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-253
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-254
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-255
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-256
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-257
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-258
Clean up lisp/gnus/ChangeLog a bit
* emacs@sv.gnu.org/emacs--devo--0--patch-259
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-260
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-261
lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t
* emacs@sv.gnu.org/emacs--devo--0--patch-262
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-96
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-97
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-98
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-554
Diffstat (limited to 'lisp')
40 files changed, 820 insertions, 510 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b384c6d8c3..2a402f88c01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,170 @@ | |||
| 1 | 2006-05-03 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * progmodes/gdb-ui.el (gud-watch): Let user select an expression. | ||
| 4 | (menu): Fix typo. | ||
| 5 | |||
| 6 | 2006-05-02 Miles Bader <miles@gnu.org> | ||
| 7 | |||
| 8 | * replace.el (occur-engine): Bind `inhibit-field-text-motion' to t. | ||
| 9 | |||
| 10 | 2006-05-02 Jay Belanger <belanger@truman.edu> | ||
| 11 | |||
| 12 | * calc/calc-embed.el: (calc-override-minor-modes-map) | ||
| 13 | (calc-override-minor-modes): New variables. | ||
| 14 | (calc-do-embedded): Make sure that Calc keystrokes aren't | ||
| 15 | overwritten by minor modes. | ||
| 16 | |||
| 17 | 2006-05-02 Chong Yidong <cyd@mit.edu> | ||
| 18 | |||
| 19 | * msb.el (msb): If EVENT is a down event, read and discard the up | ||
| 20 | event. | ||
| 21 | |||
| 22 | 2006-05-02 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 23 | |||
| 24 | * startup.el (command-line-1): Refer to Lisp manual when | ||
| 25 | pure-space-overflow occurs. | ||
| 26 | |||
| 27 | * files.el (byte-compile-dynamic) | ||
| 28 | (byte-compile-dynamic-docstrings, byte-compile-warnings) | ||
| 29 | (find-file-visit-truename, indent-tabs-mode, left-margin) | ||
| 30 | (no-byte-compile no-update-autoloads, truncate-lines) | ||
| 31 | (version-control): Don't use `t' for safe-local-variable | ||
| 32 | declarations. | ||
| 33 | |||
| 34 | 2006-05-01 Richard Stallman <rms@gnu.org> | ||
| 35 | |||
| 36 | * diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C, | ||
| 37 | M-r, M-R, M-A, M-SPC or M-DEL. | ||
| 38 | (diff-mode-map): diff-refine-hunk now on C-c C-w | ||
| 39 | (diff-mode-map): Bind C-c C-e, C-c C-n, C-c C-r, C-c C-u. | ||
| 40 | |||
| 41 | * help-mode.el (help-mode): view-exit-action calls delete-window | ||
| 42 | only when it is safe and possible. | ||
| 43 | |||
| 44 | * simple.el (undo-outer-limit-truncate): Put quotes around buffer name | ||
| 45 | in messages. | ||
| 46 | |||
| 47 | * emacs-lisp/warnings.el (display-warning, lwarn): Doc fixes. | ||
| 48 | |||
| 49 | * tool-bar.el (tool-bar-setup): Put Help and Preferences items | ||
| 50 | in the default tool-bar-map. | ||
| 51 | |||
| 52 | 2006-05-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 53 | |||
| 54 | * net/tramp.el (tramp-completion-file-name-handler-alist) | ||
| 55 | (tramp-run-real-handler, tramp-completion-run-real-handler) | ||
| 56 | (tramp-completion-handle-file-name-all-completions) | ||
| 57 | (tramp-completion-handle-file-name-completion): Autoload them. | ||
| 58 | (tramp-completion-handle-file-exists-p) | ||
| 59 | (tramp-completion-handle-file-name-directory) | ||
| 60 | (tramp-completion-handle-file-name-nondirectory) | ||
| 61 | (tramp-completion-handle-expand-file-name): Remove them. | ||
| 62 | (tramp-handle-file-name-directory): Return the real directory name. | ||
| 63 | Returning "/" only doesn't need to be necessary any longer. | ||
| 64 | (tramp-file-name-handler): Make special attention when in hostname | ||
| 65 | completion mode. | ||
| 66 | (tramp-completion-file-name-handler): Revert patch from 2006-04-28. | ||
| 67 | (tramp-register-file-name-handlers): Register | ||
| 68 | `tramp-completion-file-name-handler' only when | ||
| 69 | `partial-completion-mode is enabled. | ||
| 70 | (tramp-completion-handle-file-name-all-completions): | ||
| 71 | Delete directory part from results. | ||
| 72 | (tramp-get-completion-methods, tramp-get-completion-user-host): | ||
| 73 | Discard deleting "/", it doesn't work after the change of | ||
| 74 | `tramp-handle-file-name-directory' above. | ||
| 75 | |||
| 76 | 2006-05-01 Kim F. Storm <storm@cua.dk> | ||
| 77 | |||
| 78 | * progmodes/grep.el (grep-expand-template): Use save-match-data | ||
| 79 | and symbol-value. | ||
| 80 | |||
| 81 | 2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 82 | |||
| 83 | * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): Use | ||
| 84 | select-frame-set-input-focus instead of raise-frame. | ||
| 85 | (global-map): Bind M-drag-n-drop to mac-drag-n-drop. | ||
| 86 | |||
| 87 | 2006-05-01 Nick Roberts <nickrob@snap.net.nz> | ||
| 88 | |||
| 89 | * progmodes/gud.el (gud-def): Add %c case. | ||
| 90 | (gud-speedbar-buttons): Don't bind case-fold-search unnecessarily. | ||
| 91 | (gud-format-command): Make match case sensitive. Match on %F. | ||
| 92 | |||
| 93 | 2006-04-30 Glenn Morris <rgm@gnu.org> | ||
| 94 | |||
| 95 | * calendar/cal-tex.el (cal-tex-preamble-extra): New variable. | ||
| 96 | (cal-tex-preamble): Use cal-tex-preamble-extra. | ||
| 97 | (cal-tex-list-diary-entries): Refer to `diary-list-entries' rather | ||
| 98 | than alias `list-diary-entries'. | ||
| 99 | |||
| 100 | 2006-04-29 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 101 | |||
| 102 | * help-fns.el (describe-variable): Add info about safe local variables. | ||
| 103 | |||
| 104 | 2006-04-29 Richard Stallman <rms@gnu.org> | ||
| 105 | |||
| 106 | * bindings.el (mode-line-format): help-echo doc fixes. | ||
| 107 | |||
| 108 | * net/tramp.el (tramp-file-name-handler-alist): Delete | ||
| 109 | expand-file-name and other operations that can cause spurious loading. | ||
| 110 | |||
| 111 | 2006-04-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 112 | |||
| 113 | * files.el (safe-local-variable-p): Remove support for the special | ||
| 114 | value t. | ||
| 115 | |||
| 116 | * textmodes/paragraphs.el (sentence-end-without-space): | ||
| 117 | Fix safety predicate. | ||
| 118 | (sentence-end-double-space, sentence-end-without-period) | ||
| 119 | (paragraph-ignore-fill-prefix): | ||
| 120 | * textmodes/fill.el (colon-double-space): | ||
| 121 | * abbrev.el (abbrev-mode): Tighten the safety predicate. | ||
| 122 | |||
| 123 | * subr.el (booleanp): New fun. | ||
| 124 | |||
| 125 | * textmodes/reftex-vars.el (reftex-guess-label-type): | ||
| 126 | Tighten the safety predicate. | ||
| 127 | |||
| 128 | 2006-04-28 Kim F. Storm <storm@cua.dk> | ||
| 129 | |||
| 130 | * progmodes/grep.el (defgroup grep): Doc fix. | ||
| 131 | (grep-auto-highlight): Remove. | ||
| 132 | (grep-template): New defcustom. | ||
| 133 | (grep-find-template): Rename from grep-tree-template. | ||
| 134 | (grep-files-aliases): Rename from grep-tree-files-aliases. | ||
| 135 | Remove "all" alias, add "l" alias. | ||
| 136 | (grep-tree-ignore-case, grep-tree-ignore-CVS-directories): Remove. | ||
| 137 | (grep-find-ignored-directories): New defcustom to replace | ||
| 138 | grep-tree-ignore-CVS-directories, to facilitate ignoring | ||
| 139 | subdirectories for multiple version control systems. | ||
| 140 | (grep-mode-map): Add Recursive grep item to GREP menu. | ||
| 141 | (grep-regexp-history, grep-files-history): New defvars. | ||
| 142 | (grep-probe): New helper function. | ||
| 143 | (grep-compute-defaults): Use it to simplify code. | ||
| 144 | Adapt to name changes. | ||
| 145 | Use `.' as base in grep-find-template rather than <D>. | ||
| 146 | (grep): Remove superfluous highlight-regexp arg. Fix doc. | ||
| 147 | Call grep-compute-defaults unconditionally. | ||
| 148 | (grep-expand-keywords): New defconst. | ||
| 149 | (grep-expand-template): Rename from grep-expand-command-macros. | ||
| 150 | Simplify via grep-expand-keywords. Look at case-fold-search instead | ||
| 151 | of grep-tree-ignore-case to add -i option. | ||
| 152 | Bind case-fold-search to nil while matching keywords. | ||
| 153 | (grep-tree-last-regexp, grep-tree-last-files): Remove. | ||
| 154 | (grep-read-regexp, grep-read-files): New helper functions. | ||
| 155 | (rgrep): Rename from grep-tree. Rework to use proper histories. | ||
| 156 | Adapt to changes in defcustoms and functions above. | ||
| 157 | (lgrep): New command, as grep, but using same interactive UI as rgrep. | ||
| 158 | |||
| 159 | 2006-04-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 160 | |||
| 161 | * net/tramp.el (tramp-completion-file-name-handler): | ||
| 162 | Disable Tramp's functionality while loading Tramp itself. | ||
| 163 | (tramp-register-file-name-handlers): That's a defsubst now. | ||
| 164 | Code from `tramp-repair-jka-compr' moved here. Apply it via | ||
| 165 | `after-init-hook'. | ||
| 166 | (tramp-repair-jka-compr): Remove. | ||
| 167 | |||
| 1 | 2006-04-27 Jay Belanger <belanger@truman.edu> | 168 | 2006-04-27 Jay Belanger <belanger@truman.edu> |
| 2 | 169 | ||
| 3 | * calc-embed.el (calc-embedded-make-info): Use `math-read-expr' to | 170 | * calc-embed.el (calc-embedded-make-info): Use `math-read-expr' to |
| @@ -2598,7 +2765,7 @@ | |||
| 2598 | (describe-key-briefly-internal, describe-key-internal): | 2765 | (describe-key-briefly-internal, describe-key-internal): |
| 2599 | Functions merged back into their callers. | 2766 | Functions merged back into their callers. |
| 2600 | 2767 | ||
| 2601 | 2006-02-13 Martin Rudalics <rudalics@gmx.at> (tiny change) | 2768 | 2006-02-13 Martin Rudalics <rudalics@gmx.at> |
| 2602 | 2769 | ||
| 2603 | * info.el (info-xref-visited): Inherit from info-xref too. | 2770 | * info.el (info-xref-visited): Inherit from info-xref too. |
| 2604 | (Info-set-mode-line): Replace occurrences of `%' by `%%' | 2771 | (Info-set-mode-line): Replace occurrences of `%' by `%%' |
| @@ -3746,7 +3913,7 @@ | |||
| 3746 | * add-log.el (add-change-log-entry, change-log-merge): | 3913 | * add-log.el (add-change-log-entry, change-log-merge): |
| 3747 | Conditionally use `hard-newline'. | 3914 | Conditionally use `hard-newline'. |
| 3748 | 3915 | ||
| 3749 | 2006-01-13 Martin Rudalics <rudalics@gmx.at> (tiny change) | 3916 | 2006-01-13 Martin Rudalics <rudalics@gmx.at> |
| 3750 | 3917 | ||
| 3751 | * wid-edit.el (widget-field-end): If the overlay is no longer | 3918 | * wid-edit.el (widget-field-end): If the overlay is no longer |
| 3752 | associated with a buffer, behave as if the overlay didn't exist. | 3919 | associated with a buffer, behave as if the overlay didn't exist. |
| @@ -4836,7 +5003,7 @@ | |||
| 4836 | * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): | 5003 | * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): |
| 4837 | Capture error from printing circular structures. | 5004 | Capture error from printing circular structures. |
| 4838 | 5005 | ||
| 4839 | 2005-12-17 Martin Rudalics <rudalics@gmx.at> (tiny change) | 5006 | 2005-12-17 Martin Rudalics <rudalics@gmx.at> |
| 4840 | 5007 | ||
| 4841 | * wid-edit.el (widget-checkbox-action): Clear undo info. | 5008 | * wid-edit.el (widget-checkbox-action): Clear undo info. |
| 4842 | 5009 | ||
| @@ -6819,7 +6986,7 @@ | |||
| 6819 | scrolling the help window. Doc fix. | 6986 | scrolling the help window. Doc fix. |
| 6820 | (help-return-method): Doc fix. | 6987 | (help-return-method): Doc fix. |
| 6821 | 6988 | ||
| 6822 | 2005-12-03 Martin Rudalics <rudalics@gmx.at> (tiny change) | 6989 | 2005-12-03 Martin Rudalics <rudalics@gmx.at> |
| 6823 | 6990 | ||
| 6824 | * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Fix bug | 6991 | * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Fix bug |
| 6825 | whereby names of length one or names starting with a | 6992 | whereby names of length one or names starting with a |
| @@ -7373,7 +7540,7 @@ | |||
| 7373 | 7540 | ||
| 7374 | * custom.el (defcustom): Update link types in docstring. | 7541 | * custom.el (defcustom): Update link types in docstring. |
| 7375 | 7542 | ||
| 7376 | 2005-11-20 Martin Rudalics <rudalics@gmx.at> (tiny change) | 7543 | 2005-11-20 Martin Rudalics <rudalics@gmx.at> |
| 7377 | 7544 | ||
| 7378 | * custom.el (defgroup): Add doc-string-elt info. | 7545 | * custom.el (defgroup): Add doc-string-elt info. |
| 7379 | 7546 | ||
| @@ -7646,7 +7813,7 @@ | |||
| 7646 | 7813 | ||
| 7647 | * apropos.el (apropos-calc-scores): Use apropos-pattern. | 7814 | * apropos.el (apropos-calc-scores): Use apropos-pattern. |
| 7648 | 7815 | ||
| 7649 | 2005-11-16 Martin Rudalics <rudalics@gmx.at> (tiny change) | 7816 | 2005-11-16 Martin Rudalics <rudalics@gmx.at> |
| 7650 | 7817 | ||
| 7651 | * wid-edit.el (color): Enclose %t in %{...%}. | 7818 | * wid-edit.el (color): Enclose %t in %{...%}. |
| 7652 | 7819 | ||
| @@ -14577,7 +14744,7 @@ | |||
| 14577 | * emulation/edt-mapper.el (edt-save-function-key-map) | 14744 | * emulation/edt-mapper.el (edt-save-function-key-map) |
| 14578 | (EDT-key-name): `defvar' to silence the byte-compiler. | 14745 | (EDT-key-name): `defvar' to silence the byte-compiler. |
| 14579 | 14746 | ||
| 14580 | 2005-07-02 Martin Rudalics <rudalics@gmx.at> (tiny change) | 14747 | 2005-07-02 Martin Rudalics <rudalics@gmx.at> |
| 14581 | 14748 | ||
| 14582 | * font-lock.el (font-lock-regexp-grouping-backslash): Rename from | 14749 | * font-lock.el (font-lock-regexp-grouping-backslash): Rename from |
| 14583 | font-lock-regexp-backslash. Doc fix. | 14750 | font-lock-regexp-backslash. Doc fix. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index c0380058b53..234b8230587 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -58,7 +58,7 @@ Interactively, use the command `abbrev-mode' | |||
| 58 | to enable or disable Abbrev mode in the current buffer." | 58 | to enable or disable Abbrev mode in the current buffer." |
| 59 | :type 'boolean | 59 | :type 'boolean |
| 60 | :group 'abbrev-mode) | 60 | :group 'abbrev-mode) |
| 61 | ;;;###autoload(put 'abbrev-mode 'safe-local-variable 'symbolp) | 61 | ;;;###autoload(put 'abbrev-mode 'safe-local-variable 'booleanp) |
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | (defvar edit-abbrevs-map | 64 | (defvar edit-abbrevs-map |
diff --git a/lisp/allout.el b/lisp/allout.el index b6542c1a5dc..dc19c1fa15a 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -301,7 +301,7 @@ alist, then use comment-start string, if any, then use default \(`.'). | |||
| 301 | Set to the symbol for either of `allout-mode-leaders' or | 301 | Set to the symbol for either of `allout-mode-leaders' or |
| 302 | `comment-start' to use only one of them, respectively. | 302 | `comment-start' to use only one of them, respectively. |
| 303 | 303 | ||
| 304 | Value nil means to always use the default \(`.').t | 304 | Value nil means to always use the default \(`.'). |
| 305 | 305 | ||
| 306 | comment-start strings that do not end in spaces are tripled, and an | 306 | comment-start strings that do not end in spaces are tripled, and an |
| 307 | `_' underscore is tacked on the end, to distinguish them from regular | 307 | `_' underscore is tacked on the end, to distinguish them from regular |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 6cbec4a1a86..d965abada6f 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -319,13 +319,13 @@ Keymap to display on minor modes.") | |||
| 319 | (list | 319 | (list |
| 320 | (propertize "%[(" 'help-echo help-echo) | 320 | (propertize "%[(" 'help-echo help-echo) |
| 321 | `(:propertize ("" mode-name) | 321 | `(:propertize ("" mode-name) |
| 322 | help-echo "mouse-1: major-mode-menu mouse-2: help for current major mode" | 322 | help-echo "mouse-1: major mode, mouse-2: major mode help, mouse-3: toggle minor modes" |
| 323 | mouse-face mode-line-highlight | 323 | mouse-face mode-line-highlight |
| 324 | local-map ,mode-line-major-mode-keymap) | 324 | local-map ,mode-line-major-mode-keymap) |
| 325 | '("" mode-line-process) | 325 | '("" mode-line-process) |
| 326 | `(:propertize ("" minor-mode-alist) | 326 | `(:propertize ("" minor-mode-alist) |
| 327 | mouse-face mode-line-highlight | 327 | mouse-face mode-line-highlight |
| 328 | help-echo "mouse-2: help for minor modes, mouse-3: minor mode menu" | 328 | help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes" |
| 329 | local-map ,mode-line-minor-mode-keymap) | 329 | local-map ,mode-line-minor-mode-keymap) |
| 330 | (propertize "%n" 'help-echo "mouse-2: widen" | 330 | (propertize "%n" 'help-echo "mouse-2: widen" |
| 331 | 'mouse-face 'mode-line-highlight | 331 | 'mouse-face 'mode-line-highlight |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index adb94ef7381..e54a94e4d39 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -206,6 +206,18 @@ | |||
| 206 | (defvar calc-embedded-firsttime-buf) | 206 | (defvar calc-embedded-firsttime-buf) |
| 207 | (defvar calc-embedded-firsttime-formula) | 207 | (defvar calc-embedded-firsttime-formula) |
| 208 | 208 | ||
| 209 | ;; The following is to take care of any minor modes which override | ||
| 210 | ;; a Calc command. | ||
| 211 | (defvar calc-override-minor-modes-map | ||
| 212 | (make-sparse-keymap) | ||
| 213 | "A list of keybindings that might be overwritten by minor modes.") | ||
| 214 | |||
| 215 | ;; Add any keys that might be overwritten here. | ||
| 216 | (define-key calc-override-minor-modes-map "`" 'calc-edit) | ||
| 217 | |||
| 218 | (defvar calc-override-minor-modes | ||
| 219 | (cons t calc-override-minor-modes-map)) | ||
| 220 | |||
| 209 | (defun calc-do-embedded (calc-embed-arg end obeg oend) | 221 | (defun calc-do-embedded (calc-embed-arg end obeg oend) |
| 210 | (if calc-embedded-info | 222 | (if calc-embedded-info |
| 211 | 223 | ||
| @@ -237,6 +249,8 @@ | |||
| 237 | truncate-lines (nth 2 mode) | 249 | truncate-lines (nth 2 mode) |
| 238 | buffer-read-only nil) | 250 | buffer-read-only nil) |
| 239 | (use-local-map (nth 1 mode)) | 251 | (use-local-map (nth 1 mode)) |
| 252 | (setq minor-mode-overriding-map-alist | ||
| 253 | (remq calc-override-minor-modes minor-mode-overriding-map-alist)) | ||
| 240 | (set-buffer-modified-p (buffer-modified-p)) | 254 | (set-buffer-modified-p (buffer-modified-p)) |
| 241 | (calc-embedded-restore-original-modes) | 255 | (calc-embedded-restore-original-modes) |
| 242 | (or calc-embedded-quiet | 256 | (or calc-embedded-quiet |
| @@ -297,6 +311,9 @@ | |||
| 297 | buffer-read-only t) | 311 | buffer-read-only t) |
| 298 | (set-buffer-modified-p (buffer-modified-p)) | 312 | (set-buffer-modified-p (buffer-modified-p)) |
| 299 | (use-local-map calc-mode-map) | 313 | (use-local-map calc-mode-map) |
| 314 | (setq minor-mode-overriding-map-alist | ||
| 315 | (cons calc-override-minor-modes | ||
| 316 | minor-mode-overriding-map-alist)) | ||
| 300 | (setq calc-no-refresh-evaltos nil) | 317 | (setq calc-no-refresh-evaltos nil) |
| 301 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) | 318 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) |
| 302 | (let (str) | 319 | (let (str) |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index a67d90c832e..1fd85513230 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | 45 | ||
| 46 | (require 'calendar) | 46 | (require 'calendar) |
| 47 | 47 | ||
| 48 | (autoload 'list-diary-entries "diary-lib" nil t) | 48 | (autoload 'diary-list-entries "diary-lib" nil t) |
| 49 | (autoload 'calendar-holiday-list "holidays" nil t) | 49 | (autoload 'calendar-holiday-list "holidays" nil t) |
| 50 | (autoload 'calendar-iso-from-absolute "cal-iso" nil t) | 50 | (autoload 'calendar-iso-from-absolute "cal-iso" nil t) |
| 51 | 51 | ||
| @@ -121,6 +121,14 @@ will put the Hebrew date at the bottom of each day." | |||
| 121 | :type 'integer | 121 | :type 'integer |
| 122 | :group 'calendar-tex) | 122 | :group 'calendar-tex) |
| 123 | 123 | ||
| 124 | (defcustom cal-tex-preamble-extra nil | ||
| 125 | "A string giving extra LaTeX commands to insert in the calendar preamble. | ||
| 126 | For example, to include extra packages: | ||
| 127 | \"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"." | ||
| 128 | :type 'string | ||
| 129 | :group 'calendar-tex | ||
| 130 | :version "22.1") | ||
| 131 | |||
| 124 | (defcustom cal-tex-hook nil | 132 | (defcustom cal-tex-hook nil |
| 125 | "*List of functions called after any LaTeX calendar buffer is generated. | 133 | "*List of functions called after any LaTeX calendar buffer is generated. |
| 126 | You can use this to do postprocessing on the buffer. For example, to change | 134 | You can use this to do postprocessing on the buffer. For example, to change |
| @@ -240,7 +248,7 @@ This definition is the heart of the calendar!") | |||
| 240 | "Generate a list of all diary-entries from absolute date D1 to D2." | 248 | "Generate a list of all diary-entries from absolute date D1 to D2." |
| 241 | (let ((diary-list-include-blanks nil) | 249 | (let ((diary-list-include-blanks nil) |
| 242 | (diary-display-hook 'ignore)) | 250 | (diary-display-hook 'ignore)) |
| 243 | (list-diary-entries | 251 | (diary-list-entries |
| 244 | (calendar-gregorian-from-absolute d1) | 252 | (calendar-gregorian-from-absolute d1) |
| 245 | (1+ (- d2 d1))))) | 253 | (1+ (- d2 d1))))) |
| 246 | 254 | ||
| @@ -253,8 +261,10 @@ Optional ARGS are included." | |||
| 253 | (insert "\\documentclass") | 261 | (insert "\\documentclass") |
| 254 | (if args | 262 | (if args |
| 255 | (insert "[" args "]")) | 263 | (insert "[" args "]")) |
| 256 | (insert "{article}\n" | 264 | (insert "{article}\n") |
| 257 | "\\hbadness 20000 | 265 | (if (stringp cal-tex-preamble-extra) |
| 266 | (insert cal-tex-preamble-extra "\n")) | ||
| 267 | (insert "\\hbadness 20000 | ||
| 258 | \\hfuzz=1000pt | 268 | \\hfuzz=1000pt |
| 259 | \\vbadness 20000 | 269 | \\vbadness 20000 |
| 260 | \\lineskip 0pt | 270 | \\lineskip 0pt |
| @@ -357,6 +367,8 @@ Optional parameter specifies number of years." | |||
| 357 | (cal-tex-noindent) | 367 | (cal-tex-noindent) |
| 358 | (cal-tex-nl) | 368 | (cal-tex-nl) |
| 359 | (let ((month-names; don't use default in case user changed it | 369 | (let ((month-names; don't use default in case user changed it |
| 370 | ;; These are only used to define the command names, not | ||
| 371 | ;; the names of the months they insert. | ||
| 360 | ["January" "February" "March" "April" "May" "June" | 372 | ["January" "February" "March" "April" "May" "June" |
| 361 | "July" "August" "September" "October" "November" "December"])) | 373 | "July" "August" "September" "October" "November" "December"])) |
| 362 | (calendar-for-loop i from 1 to 12 do | 374 | (calendar-for-loop i from 1 to 12 do |
diff --git a/lisp/cvs-status.el b/lisp/cvs-status.el index cf0ee85db23..477914293a7 100644 --- a/lisp/cvs-status.el +++ b/lisp/cvs-status.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs cvs status tree tools | 7 | ;; Keywords: pcl-cvs cvs status tree tools |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 7c7f7902d82..cc89aad6ca3 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: convenience patch diff | 7 | ;; Keywords: convenience patch diff |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -118,7 +118,8 @@ when editing big diffs)." | |||
| 118 | ("\C-m" . diff-goto-source) | 118 | ("\C-m" . diff-goto-source) |
| 119 | ([mouse-2] . diff-goto-source) | 119 | ([mouse-2] . diff-goto-source) |
| 120 | ;; From XEmacs' diff-mode. | 120 | ;; From XEmacs' diff-mode. |
| 121 | ("W" . widen) | 121 | ;; Standard M-w is useful, so don't change M-W. |
| 122 | ;; ("W" . widen) | ||
| 122 | ;;("." . diff-goto-source) ;display-buffer | 123 | ;;("." . diff-goto-source) ;display-buffer |
| 123 | ;;("f" . diff-goto-source) ;find-file | 124 | ;;("f" . diff-goto-source) ;find-file |
| 124 | ("o" . diff-goto-source) ;other-window | 125 | ("o" . diff-goto-source) ;other-window |
| @@ -127,14 +128,14 @@ when editing big diffs)." | |||
| 127 | ;;("h" . diff-show-header) | 128 | ;;("h" . diff-show-header) |
| 128 | ;;("j" . diff-show-difference) ;jump to Nth diff | 129 | ;;("j" . diff-show-difference) ;jump to Nth diff |
| 129 | ;;("q" . diff-quit) | 130 | ;;("q" . diff-quit) |
| 130 | (" " . scroll-up) | 131 | ;; Not useful if you have to metafy them. |
| 131 | ("\177" . scroll-down) | 132 | ;; (" " . scroll-up) |
| 132 | ;; Our very own bindings. | 133 | ;; ("\177" . scroll-down) |
| 133 | ("A" . diff-ediff-patch) | 134 | ;; Standard M-a is useful, so don't change M-A. |
| 134 | ("r" . diff-restrict-view) | 135 | ;; ("A" . diff-ediff-patch) |
| 135 | ("R" . diff-reverse-direction) | 136 | ;; Standard M-r is useful, so don't change M-r or M-R. |
| 136 | ("U" . diff-context->unified) | 137 | ;; ("r" . diff-restrict-view) |
| 137 | ("C" . diff-unified->context) | 138 | ;; ("R" . diff-reverse-direction) |
| 138 | ("q" . quit-window)) | 139 | ("q" . quit-window)) |
| 139 | "Basic keymap for `diff-mode', bound to various prefix keys.") | 140 | "Basic keymap for `diff-mode', bound to various prefix keys.") |
| 140 | 141 | ||
| @@ -143,10 +144,14 @@ when editing big diffs)." | |||
| 143 | ;; From compilation-minor-mode. | 144 | ;; From compilation-minor-mode. |
| 144 | ("\C-c\C-c" . diff-goto-source) | 145 | ("\C-c\C-c" . diff-goto-source) |
| 145 | ;; Misc operations. | 146 | ;; Misc operations. |
| 146 | ("\C-c\C-r" . diff-refine-hunk) | ||
| 147 | ("\C-c\C-s" . diff-split-hunk) | ||
| 148 | ("\C-c\C-a" . diff-apply-hunk) | 147 | ("\C-c\C-a" . diff-apply-hunk) |
| 148 | ("\C-c\C-e" . diff-ediff-patch) | ||
| 149 | ("\C-c\C-n" . diff-restrict-view) | ||
| 150 | ("\C-c\C-r" . diff-reverse-direction) | ||
| 151 | ("\C-c\C-s" . diff-split-hunk) | ||
| 149 | ("\C-c\C-t" . diff-test-hunk) | 152 | ("\C-c\C-t" . diff-test-hunk) |
| 153 | ("\C-c\C-u" . diff-context->unified) | ||
| 154 | ("\C-c\C-w" . diff-refine-hunk) | ||
| 150 | ("\C-c\C-f" . next-error-follow-minor-mode)) | 155 | ("\C-c\C-f" . next-error-follow-minor-mode)) |
| 151 | "Keymap for `diff-mode'. See also `diff-mode-shared-map'.") | 156 | "Keymap for `diff-mode'. See also `diff-mode-shared-map'.") |
| 152 | 157 | ||
| @@ -711,77 +716,80 @@ else cover the whole bufer." | |||
| 711 | (delete-region last-pt (point)) | 716 | (delete-region last-pt (point)) |
| 712 | (setq delete nil))))))))))))))) | 717 | (setq delete nil))))))))))))))) |
| 713 | 718 | ||
| 714 | (defun diff-context->unified (start end) | 719 | (defun diff-context->unified (start end &optional to-context) |
| 715 | "Convert context diffs to unified diffs. | 720 | "Convert context diffs to unified diffs. |
| 716 | START and END are either taken from the region (if a prefix arg is given) or | 721 | START and END are either taken from the region |
| 717 | else cover the whole bufer." | 722 | \(when it is highlighted) or else cover the whole buffer. |
| 718 | (interactive (if current-prefix-arg | 723 | With a prefix argument, convert unified format to context format." |
| 719 | (list (mark) (point)) | 724 | (interactive (if (and transient-mark-mode mark-active) |
| 720 | (list (point-min) (point-max)))) | 725 | (list (mark) (point) current-prefix-arg) |
| 721 | (unless (markerp end) (setq end (copy-marker end))) | 726 | (list (point-min) (point-max) current-prefix-arg))) |
| 722 | (let (;;(diff-inhibit-after-change t) | 727 | (if to-context |
| 723 | (inhibit-read-only t)) | 728 | (diff-unified->context start end) |
| 724 | (save-excursion | 729 | (unless (markerp end) (setq end (copy-marker end))) |
| 725 | (goto-char start) | 730 | (let ( ;;(diff-inhibit-after-change t) |
| 726 | (while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t) | 731 | (inhibit-read-only t)) |
| 727 | (< (point) end)) | 732 | (save-excursion |
| 728 | (combine-after-change-calls | 733 | (goto-char start) |
| 729 | (if (match-beginning 2) | 734 | (while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t) |
| 730 | ;; we matched a file header | 735 | (< (point) end)) |
| 731 | (progn | 736 | (combine-after-change-calls |
| 732 | ;; use reverse order to make sure the indices are kept valid | 737 | (if (match-beginning 2) |
| 733 | (replace-match "+++" t t nil 3) | 738 | ;; we matched a file header |
| 734 | (replace-match "---" t t nil 2)) | 739 | (progn |
| 735 | ;; we matched a hunk header | 740 | ;; use reverse order to make sure the indices are kept valid |
| 736 | (let ((line1s (match-string 4)) | 741 | (replace-match "+++" t t nil 3) |
| 737 | (line1e (match-string 5)) | 742 | (replace-match "---" t t nil 2)) |
| 738 | (pt1 (match-beginning 0))) | 743 | ;; we matched a hunk header |
| 739 | (replace-match "") | 744 | (let ((line1s (match-string 4)) |
| 740 | (unless (re-search-forward | 745 | (line1e (match-string 5)) |
| 741 | "^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t) | 746 | (pt1 (match-beginning 0))) |
| 742 | (error "Can't find matching `--- n1,n2 ----' line")) | 747 | (replace-match "") |
| 743 | (let ((line2s (match-string 1)) | 748 | (unless (re-search-forward |
| 744 | (line2e (match-string 2)) | 749 | "^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t) |
| 745 | (pt2 (progn | 750 | (error "Can't find matching `--- n1,n2 ----' line")) |
| 746 | (delete-region (progn (beginning-of-line) (point)) | 751 | (let ((line2s (match-string 1)) |
| 747 | (progn (forward-line 1) (point))) | 752 | (line2e (match-string 2)) |
| 748 | (point-marker)))) | 753 | (pt2 (progn |
| 749 | (goto-char pt1) | 754 | (delete-region (progn (beginning-of-line) (point)) |
| 750 | (forward-line 1) | 755 | (progn (forward-line 1) (point))) |
| 751 | (while (< (point) pt2) | 756 | (point-marker)))) |
| 752 | (case (char-after) | ||
| 753 | ((?! ?-) (delete-char 2) (insert "-") (forward-line 1)) | ||
| 754 | (?\s ;merge with the other half of the chunk | ||
| 755 | (let* ((endline2 | ||
| 756 | (save-excursion | ||
| 757 | (goto-char pt2) (forward-line 1) (point))) | ||
| 758 | (c (char-after pt2))) | ||
| 759 | (case c | ||
| 760 | ((?! ?+) | ||
| 761 | (insert "+" | ||
| 762 | (prog1 (buffer-substring (+ pt2 2) endline2) | ||
| 763 | (delete-region pt2 endline2)))) | ||
| 764 | (?\s ;FIXME: check consistency | ||
| 765 | (delete-region pt2 endline2) | ||
| 766 | (delete-char 1) | ||
| 767 | (forward-line 1)) | ||
| 768 | (?\\ (forward-line 1)) | ||
| 769 | (t (delete-char 1) (forward-line 1))))) | ||
| 770 | (t (forward-line 1)))) | ||
| 771 | (while (looking-at "[+! ] ") | ||
| 772 | (if (/= (char-after) ?!) (forward-char 1) | ||
| 773 | (delete-char 1) (insert "+")) | ||
| 774 | (delete-char 1) (forward-line 1)) | ||
| 775 | (save-excursion | ||
| 776 | (goto-char pt1) | 757 | (goto-char pt1) |
| 777 | (insert "@@ -" line1s "," | 758 | (forward-line 1) |
| 778 | (number-to-string (- (string-to-number line1e) | 759 | (while (< (point) pt2) |
| 779 | (string-to-number line1s) | 760 | (case (char-after) |
| 780 | -1)) | 761 | ((?! ?-) (delete-char 2) (insert "-") (forward-line 1)) |
| 781 | " +" line2s "," | 762 | (?\s ;merge with the other half of the chunk |
| 782 | (number-to-string (- (string-to-number line2e) | 763 | (let* ((endline2 |
| 783 | (string-to-number line2s) | 764 | (save-excursion |
| 784 | -1)) " @@")))))))))) | 765 | (goto-char pt2) (forward-line 1) (point))) |
| 766 | (c (char-after pt2))) | ||
| 767 | (case c | ||
| 768 | ((?! ?+) | ||
| 769 | (insert "+" | ||
| 770 | (prog1 (buffer-substring (+ pt2 2) endline2) | ||
| 771 | (delete-region pt2 endline2)))) | ||
| 772 | (?\s ;FIXME: check consistency | ||
| 773 | (delete-region pt2 endline2) | ||
| 774 | (delete-char 1) | ||
| 775 | (forward-line 1)) | ||
| 776 | (?\\ (forward-line 1)) | ||
| 777 | (t (delete-char 1) (forward-line 1))))) | ||
| 778 | (t (forward-line 1)))) | ||
| 779 | (while (looking-at "[+! ] ") | ||
| 780 | (if (/= (char-after) ?!) (forward-char 1) | ||
| 781 | (delete-char 1) (insert "+")) | ||
| 782 | (delete-char 1) (forward-line 1)) | ||
| 783 | (save-excursion | ||
| 784 | (goto-char pt1) | ||
| 785 | (insert "@@ -" line1s "," | ||
| 786 | (number-to-string (- (string-to-number line1e) | ||
| 787 | (string-to-number line1s) | ||
| 788 | -1)) | ||
| 789 | " +" line2s "," | ||
| 790 | (number-to-string (- (string-to-number line2e) | ||
| 791 | (string-to-number line2s) | ||
| 792 | -1)) " @@"))))))))))) | ||
| 785 | 793 | ||
| 786 | (defun diff-reverse-direction (start end) | 794 | (defun diff-reverse-direction (start end) |
| 787 | "Reverse the direction of the diffs. | 795 | "Reverse the direction of the diffs. |
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 133c4c42f2a..a02a8c14eba 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el | |||
| @@ -209,6 +209,7 @@ only, and you can use whatever symbols you like.) | |||
| 209 | 209 | ||
| 210 | LEVEL should be either :debug, :warning, :error, or :emergency | 210 | LEVEL should be either :debug, :warning, :error, or :emergency |
| 211 | \(but see `warning-minimum-level' and `warning-minimum-log-level'). | 211 | \(but see `warning-minimum-level' and `warning-minimum-log-level'). |
| 212 | Default is :warning. | ||
| 212 | 213 | ||
| 213 | :emergency -- a problem that will seriously impair Emacs operation soon | 214 | :emergency -- a problem that will seriously impair Emacs operation soon |
| 214 | if you do not attend to it promptly. | 215 | if you do not attend to it promptly. |
| @@ -292,7 +293,7 @@ See also `warning-series', `warning-prefix-function' and | |||
| 292 | Aside from generating the message with `format', | 293 | Aside from generating the message with `format', |
| 293 | this is equivalent to `display-warning'. | 294 | this is equivalent to `display-warning'. |
| 294 | 295 | ||
| 295 | TYPE is the warning type: either a custom group name (a symbol). | 296 | TYPE is the warning type: either a custom group name (a symbol), |
| 296 | or a list of symbols whose first element is a custom group name. | 297 | or a list of symbols whose first element is a custom group name. |
| 297 | \(The rest of the symbols represent subcategories and | 298 | \(The rest of the symbols represent subcategories and |
| 298 | can be whatever you like.) | 299 | can be whatever you like.) |
diff --git a/lisp/files.el b/lisp/files.el index 10cdb473045..16c0f1288a1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2354,27 +2354,27 @@ asking you for confirmation." | |||
| 2354 | (eval | 2354 | (eval |
| 2355 | `(mapc (lambda (pair) | 2355 | `(mapc (lambda (pair) |
| 2356 | (put (car pair) 'safe-local-variable (cdr pair))) | 2356 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2357 | '((byte-compile-dynamic . t) | 2357 | '((byte-compile-dynamic . booleanp) |
| 2358 | (byte-compile-dynamic-docstrings . t) | 2358 | (byte-compile-dynamic-docstrings . booleanp) |
| 2359 | (byte-compile-warnings . t) | 2359 | (byte-compile-warnings . booleanp) |
| 2360 | (c-basic-offset . integerp) | 2360 | (c-basic-offset . integerp) |
| 2361 | (c-file-style . stringp) | 2361 | (c-file-style . stringp) |
| 2362 | (c-indent-level . integerp) | 2362 | (c-indent-level . integerp) |
| 2363 | (comment-column . integerp) | 2363 | (comment-column . integerp) |
| 2364 | (compile-command . string-or-null-p) | 2364 | (compile-command . string-or-null-p) |
| 2365 | (find-file-visit-truename . t) | 2365 | (find-file-visit-truename . booleanp) |
| 2366 | (fill-column . integerp) | 2366 | (fill-column . integerp) |
| 2367 | (fill-prefix . string-or-null-p) | 2367 | (fill-prefix . string-or-null-p) |
| 2368 | (indent-tabs-mode . t) | 2368 | (indent-tabs-mode . booleanp) ;; C source code |
| 2369 | (kept-old-versions . integerp) | 2369 | (kept-old-versions . integerp) |
| 2370 | (kept-new-versions . integerp) | 2370 | (kept-new-versions . integerp) |
| 2371 | (left-margin . t) | 2371 | (left-margin . integerp) |
| 2372 | (no-byte-compile . t) | 2372 | (no-byte-compile . booleanp) |
| 2373 | (no-update-autoloads . t) | 2373 | (no-update-autoloads . booleanp) |
| 2374 | (outline-regexp . string-or-null-p) | 2374 | (outline-regexp . string-or-null-p) |
| 2375 | (tab-width . integerp) ;; C source code | 2375 | (tab-width . integerp) ;; C source code |
| 2376 | (truncate-lines . t) ;; C source code | 2376 | (truncate-lines . booleanp) ;; C source code |
| 2377 | (version-control . t))))) | 2377 | (version-control . symbolp))))) |
| 2378 | 2378 | ||
| 2379 | (put 'c-set-style 'safe-local-eval-function t) | 2379 | (put 'c-set-style 'safe-local-eval-function t) |
| 2380 | 2380 | ||
| @@ -2653,15 +2653,11 @@ It is safe if any of these conditions are met: | |||
| 2653 | * There is a matching entry (SYM . VAL) in the | 2653 | * There is a matching entry (SYM . VAL) in the |
| 2654 | `safe-local-variable-values' user option. | 2654 | `safe-local-variable-values' user option. |
| 2655 | 2655 | ||
| 2656 | * The `safe-local-variable' property of SYM is t. | ||
| 2657 | |||
| 2658 | * The `safe-local-variable' property of SYM is a function that | 2656 | * The `safe-local-variable' property of SYM is a function that |
| 2659 | evaluates to a non-nil value with VAL as an argument." | 2657 | evaluates to a non-nil value with VAL as an argument." |
| 2660 | (or (member (cons sym val) safe-local-variable-values) | 2658 | (or (member (cons sym val) safe-local-variable-values) |
| 2661 | (let ((safep (get sym 'safe-local-variable))) | 2659 | (let ((safep (get sym 'safe-local-variable))) |
| 2662 | (or (eq safep t) | 2660 | (and (functionp safep) (funcall safep val))))) |
| 2663 | (and (functionp safep) | ||
| 2664 | (funcall safep val)))))) | ||
| 2665 | 2661 | ||
| 2666 | (defun risky-local-variable-p (sym &optional ignored) | 2662 | (defun risky-local-variable-p (sym &optional ignored) |
| 2667 | "Non-nil if SYM could be dangerous as a file-local variable. | 2663 | "Non-nil if SYM could be dangerous as a file-local variable. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2976d0db3e4..cecc180f522 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made | ||
| 4 | unibyte after clear-decrypt function runs. | ||
| 5 | |||
| 6 | * mml2015.el (mml2015-pgg-clear-decrypt): Treat data which pgg | ||
| 7 | returns as a unibyte string. | ||
| 8 | |||
| 9 | 2006-04-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 10 | |||
| 11 | * mml1991.el (mml1991-pgg-sign): No need to load pgg.el, which is | ||
| 12 | always loaded by way of gnus-art.el -> mm-uu.el -> mml2015.el. | ||
| 13 | (mml1991-pgg-encrypt): Ditto. | ||
| 14 | |||
| 1 | 2006-04-26 Reiner Steib <Reiner.Steib@gmx.de> | 15 | 2006-04-26 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 16 | ||
| 3 | * deuglify.el (gnus-outlook-deuglify-unwrap-min) | 17 | * deuglify.el (gnus-outlook-deuglify-unwrap-min) |
| @@ -21,6 +35,18 @@ | |||
| 21 | (mml-attach-file, mml-attach-buffer, mml-attach-external): Sync | 35 | (mml-attach-file, mml-attach-buffer, mml-attach-external): Sync |
| 22 | DND support and use of message-in-body-p from the trunk. | 36 | DND support and use of message-in-body-p from the trunk. |
| 23 | 37 | ||
| 38 | 2006-04-26 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 39 | |||
| 40 | * mml1991.el (mml1991-pgg-sign): Make sure to load pgg.el before | ||
| 41 | binding pgg-* variables; reimplement the section which prevents | ||
| 42 | MIME header from being signed. | ||
| 43 | (mml1991-pgg-encrypt): Make sure to load pgg.el before binding | ||
| 44 | pgg-text-mode; remove a blank line at the top of body. | ||
| 45 | |||
| 46 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Don't remove blank | ||
| 47 | lines at the top of body; use gnus-newsgroup-charset if there's no | ||
| 48 | Charset header. | ||
| 49 | |||
| 24 | 2006-04-25 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> | 50 | 2006-04-25 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> |
| 25 | 51 | ||
| 26 | * nnweb.el (nnweb-google-wash-article): Sync up to new Google | 52 | * nnweb.el (nnweb-google-wash-article): Sync up to new Google |
| @@ -458,13 +484,6 @@ | |||
| 458 | 484 | ||
| 459 | 2006-02-09 Daiki Ueno <ueno@unixuser.org> | 485 | 2006-02-09 Daiki Ueno <ueno@unixuser.org> |
| 460 | 486 | ||
| 461 | * pgg-gpg.el (pgg-gpg-encrypt-region): Don't convert line-endings | ||
| 462 | in elisp. | ||
| 463 | (pgg-gpg-encrypt-symmetric-region): Ditto. | ||
| 464 | (pgg-gpg-sign-region): Ditto. | ||
| 465 | |||
| 466 | * pgg-def.el (pgg-text-mode): New variable. | ||
| 467 | |||
| 468 | * mml2015.el (mml2015-pgg-sign): Enable pgg-text-mode. | 487 | * mml2015.el (mml2015-pgg-sign): Enable pgg-text-mode. |
| 469 | (mml2015-pgg-encrypt): Ditto. | 488 | (mml2015-pgg-encrypt): Ditto. |
| 470 | 489 | ||
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 944e40bc964..9d9d87a3670 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el | |||
| @@ -436,11 +436,18 @@ Return that buffer." | |||
| 436 | "OK"))) | 436 | "OK"))) |
| 437 | (progn | 437 | (progn |
| 438 | ;; Decode charset. | 438 | ;; Decode charset. |
| 439 | (when (and (or charset | 439 | (if (and (or charset |
| 440 | (setq charset gnus-newsgroup-charset)) | 440 | (setq charset gnus-newsgroup-charset)) |
| 441 | (setq charset (mm-charset-to-coding-system charset)) | 441 | (setq charset (mm-charset-to-coding-system charset)) |
| 442 | (not (eq charset 'ascii))) | 442 | (not (eq charset 'ascii))) |
| 443 | (mm-decode-coding-region (point-min) (point-max) charset)) | 443 | ;; Assume that buffer's multibyteness is turned off. |
| 444 | ;; See `mml2015-pgg-clear-decrypt'. | ||
| 445 | (insert (mm-decode-coding-string (prog1 | ||
| 446 | (buffer-string) | ||
| 447 | (erase-buffer) | ||
| 448 | (mm-enable-multibyte)) | ||
| 449 | charset)) | ||
| 450 | (mm-enable-multibyte)) | ||
| 444 | (list (mm-make-handle buf mm-uu-text-plain-type))) | 451 | (list (mm-make-handle buf mm-uu-text-plain-type))) |
| 445 | (list (mm-make-handle buf '("application/pgp-encrypted"))))))) | 452 | (list (mm-make-handle buf '("application/pgp-encrypted"))))))) |
| 446 | 453 | ||
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index 23953cd6208..4db3540aec1 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el | |||
| @@ -229,8 +229,6 @@ | |||
| 229 | (defvar pgg-output-buffer)) | 229 | (defvar pgg-output-buffer)) |
| 230 | 230 | ||
| 231 | (defun mml1991-pgg-sign (cont) | 231 | (defun mml1991-pgg-sign (cont) |
| 232 | ;; Make sure to load pgg.el before binding pgg-* variables. | ||
| 233 | (require 'pgg) | ||
| 234 | (let ((pgg-text-mode t) | 232 | (let ((pgg-text-mode t) |
| 235 | (pgg-default-user-id (or (message-options-get 'mml-sender) | 233 | (pgg-default-user-id (or (message-options-get 'mml-sender) |
| 236 | pgg-default-user-id)) | 234 | pgg-default-user-id)) |
| @@ -275,19 +273,16 @@ | |||
| 275 | (delete-region (point-min) (point)) | 273 | (delete-region (point-min) (point)) |
| 276 | (when cte | 274 | (when cte |
| 277 | (mm-decode-content-transfer-encoding (intern (downcase cte)))))) | 275 | (mm-decode-content-transfer-encoding (intern (downcase cte)))))) |
| 278 | (unless (progn | 276 | (unless (let ((pgg-text-mode t)) |
| 279 | ;; Make sure to load pgg.el before binding `pgg-text-mode'. | 277 | (pgg-encrypt-region |
| 280 | (require 'pgg) | 278 | (point-min) (point-max) |
| 281 | (let ((pgg-text-mode t)) | 279 | (split-string |
| 282 | (pgg-encrypt-region | 280 | (or |
| 283 | (point-min) (point-max) | 281 | (message-options-get 'message-recipients) |
| 284 | (split-string | 282 | (message-options-set 'message-recipients |
| 285 | (or | 283 | (read-string "Recipients: "))) |
| 286 | (message-options-get 'message-recipients) | 284 | "[ \f\t\n\r\v,]+") |
| 287 | (message-options-set 'message-recipients | 285 | sign)) |
| 288 | (read-string "Recipients: "))) | ||
| 289 | "[ \f\t\n\r\v,]+") | ||
| 290 | sign))) | ||
| 291 | (pop-to-buffer pgg-errors-buffer) | 286 | (pop-to-buffer pgg-errors-buffer) |
| 292 | (error "Encrypt error")) | 287 | (error "Encrypt error")) |
| 293 | (delete-region (point-min) (point-max)) | 288 | (delete-region (point-min) (point-max)) |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 80dd5b26597..591ef647678 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -707,6 +707,8 @@ | |||
| 707 | (buffer-string)))) | 707 | (buffer-string)))) |
| 708 | (progn | 708 | (progn |
| 709 | (erase-buffer) | 709 | (erase-buffer) |
| 710 | ;; Treat data which pgg returns as a unibyte string. | ||
| 711 | (mm-disable-multibyte) | ||
| 710 | (insert-buffer-substring pgg-output-buffer) | 712 | (insert-buffer-substring pgg-output-buffer) |
| 711 | (goto-char (point-min)) | 713 | (goto-char (point-min)) |
| 712 | (while (search-forward "\r\n" nil t) | 714 | (while (search-forward "\r\n" nil t) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 0a78ed8d68b..12a4b4bdbf2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -638,6 +638,7 @@ it is displayed along with the global value." | |||
| 638 | (indirect-variable variable) | 638 | (indirect-variable variable) |
| 639 | (error variable))) | 639 | (error variable))) |
| 640 | (obsolete (get variable 'byte-obsolete-variable)) | 640 | (obsolete (get variable 'byte-obsolete-variable)) |
| 641 | (safe-var (get variable 'safe-local-variable)) | ||
| 641 | (doc (or (documentation-property variable 'variable-documentation) | 642 | (doc (or (documentation-property variable 'variable-documentation) |
| 642 | (documentation-property alias 'variable-documentation)))) | 643 | (documentation-property alias 'variable-documentation)))) |
| 643 | (unless (eq alias variable) | 644 | (unless (eq alias variable) |
| @@ -649,6 +650,11 @@ it is displayed along with the global value." | |||
| 649 | (princ (if (stringp (car obsolete)) (car obsolete) | 650 | (princ (if (stringp (car obsolete)) (car obsolete) |
| 650 | (format "use `%s' instead." (car obsolete)))) | 651 | (format "use `%s' instead." (car obsolete)))) |
| 651 | (terpri)) | 652 | (terpri)) |
| 653 | (when safe-var | ||
| 654 | (princ "This variable is safe to use as a file local variable") | ||
| 655 | (princ (format " only if its value\nsatisfies the predicate `%s'.\n" | ||
| 656 | safe-var)) | ||
| 657 | (terpri)) | ||
| 652 | (princ "Documentation:\n") | 658 | (princ "Documentation:\n") |
| 653 | (princ (or doc "Not documented as a variable."))) | 659 | (princ (or doc "Not documented as a variable."))) |
| 654 | ;; Make a link to customize if this variable can be customized. | 660 | ;; Make a link to customize if this variable can be customized. |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index a5cdf1f4d72..0c6e0f47453 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -197,7 +197,10 @@ Commands: | |||
| 197 | (view-mode) | 197 | (view-mode) |
| 198 | (make-local-variable 'view-no-disable-on-exit) | 198 | (make-local-variable 'view-no-disable-on-exit) |
| 199 | (setq view-no-disable-on-exit t) | 199 | (setq view-no-disable-on-exit t) |
| 200 | (setq view-exit-action (lambda (buffer) (delete-window))) | 200 | (setq view-exit-action (lambda (buffer) |
| 201 | (or (window-minibuffer-p (selected-window)) | ||
| 202 | (one-window-p t) | ||
| 203 | (delete-window)))) | ||
| 201 | (run-mode-hooks 'help-mode-hook)) | 204 | (run-mode-hooks 'help-mode-hook)) |
| 202 | 205 | ||
| 203 | ;;;###autoload | 206 | ;;;###autoload |
diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 0c7a655a237..611bab0a247 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1999, 2000, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs cvs commit log | 7 | ;; Keywords: pcl-cvs cvs commit log |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/log-view.el b/lisp/log-view.el index 8a6f88650d2..dbee454b7d6 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
| 4 | ;; 2006 Free Software Foundation, Inc. | 4 | ;; 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: rcs sccs cvs log version-control | 7 | ;; Keywords: rcs sccs cvs log version-control |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 2f84e2e8222..f7846394638 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-04-28 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 7.95. | ||
| 4 | |||
| 5 | * mh-e.el (Version, mh-version): Update for release 7.95. | ||
| 6 | |||
| 1 | 2006-04-26 Eric Ding <ericding@alum.mit.edu> | 7 | 2006-04-26 Eric Ding <ericding@alum.mit.edu> |
| 2 | 8 | ||
| 3 | * mh-e.el (mh-invisible-header-fields-internal): Add entry | 9 | * mh-e.el (mh-invisible-header-fields-internal): Add entry |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 4b7627562f0..88b8c5bac09 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | ;; Author: Bill Wohler <wohler@newt.com> | 7 | ;; Author: Bill Wohler <wohler@newt.com> |
| 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| 9 | ;; Version: 7.94+cvs | 9 | ;; Version: 7.95 |
| 10 | ;; Keywords: mail | 10 | ;; Keywords: mail |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -136,7 +136,7 @@ | |||
| 136 | ;; Try to keep variables local to a single file. Provide accessors if | 136 | ;; Try to keep variables local to a single file. Provide accessors if |
| 137 | ;; variables are shared. Use this section as a last resort. | 137 | ;; variables are shared. Use this section as a last resort. |
| 138 | 138 | ||
| 139 | (defconst mh-version "7.94+cvs" "Version number of MH-E.") | 139 | (defconst mh-version "7.95" "Version number of MH-E.") |
| 140 | 140 | ||
| 141 | ;; Variants | 141 | ;; Variants |
| 142 | 142 | ||
diff --git a/lisp/msb.el b/lisp/msb.el index 95cbfc85df4..61ddce5dae0 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -473,6 +473,11 @@ selects that window. | |||
| 473 | See the function `mouse-select-buffer' and the variable | 473 | See the function `mouse-select-buffer' and the variable |
| 474 | `msb-menu-cond' for more information about how the menus are split." | 474 | `msb-menu-cond' for more information about how the menus are split." |
| 475 | (interactive "e") | 475 | (interactive "e") |
| 476 | ;; If EVENT is a down-event, read and discard the | ||
| 477 | ;; corresponding up-event. | ||
| 478 | (and (eventp event) | ||
| 479 | (memq 'down (event-modifiers event)) | ||
| 480 | (read-event)) | ||
| 476 | (let ((old-window (selected-window)) | 481 | (let ((old-window (selected-window)) |
| 477 | (window (posn-window (event-start event)))) | 482 | (window (posn-window (event-start event)))) |
| 478 | (unless (framep window) (select-window window)) | 483 | (unless (framep window) (select-window window)) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5f3ab41e5cb..6e166aa2393 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1821,8 +1821,6 @@ while (my $data = <STDIN>) { | |||
| 1821 | Escape sequence %s is replaced with name of Perl binary. | 1821 | Escape sequence %s is replaced with name of Perl binary. |
| 1822 | This string is passed to `format', so percent characters need to be doubled.") | 1822 | This string is passed to `format', so percent characters need to be doubled.") |
| 1823 | 1823 | ||
| 1824 | ; These values conform to `file-attributes' from XEmacs 21.2. | ||
| 1825 | ; GNU Emacs and other tools not checked. | ||
| 1826 | (defconst tramp-file-mode-type-map '((0 . "-") ; Normal file (SVID-v2 and XPG2) | 1824 | (defconst tramp-file-mode-type-map '((0 . "-") ; Normal file (SVID-v2 and XPG2) |
| 1827 | (1 . "p") ; fifo | 1825 | (1 . "p") ; fifo |
| 1828 | (2 . "c") ; character device | 1826 | (2 . "c") ; character device |
| @@ -1927,17 +1925,12 @@ on the FILENAME argument, even if VISIT was a string.") | |||
| 1927 | "Alist of handler functions. | 1925 | "Alist of handler functions. |
| 1928 | Operations not mentioned here will be handled by the normal Emacs functions.") | 1926 | Operations not mentioned here will be handled by the normal Emacs functions.") |
| 1929 | 1927 | ||
| 1930 | ;; Handlers for partial tramp file names. For GNU Emacs just | 1928 | ;; Handlers for partial tramp file names. For Emacs just |
| 1931 | ;; `file-name-all-completions' is needed. The other ones are necessary | 1929 | ;; `file-name-all-completions' is needed. |
| 1932 | ;; for XEmacs. | 1930 | ;;;###autoload |
| 1933 | (defconst tramp-completion-file-name-handler-alist | 1931 | (defconst tramp-completion-file-name-handler-alist |
| 1934 | '( | 1932 | '((file-name-all-completions . tramp-completion-handle-file-name-all-completions) |
| 1935 | (file-name-directory . tramp-completion-handle-file-name-directory) | 1933 | (file-name-completion . tramp-completion-handle-file-name-completion)) |
| 1936 | (file-name-nondirectory . tramp-completion-handle-file-name-nondirectory) | ||
| 1937 | (file-exists-p . tramp-completion-handle-file-exists-p) | ||
| 1938 | (file-name-all-completions . tramp-completion-handle-file-name-all-completions) | ||
| 1939 | (file-name-completion . tramp-completion-handle-file-name-completion) | ||
| 1940 | (expand-file-name . tramp-completion-handle-expand-file-name)) | ||
| 1941 | "Alist of completion handler functions. | 1934 | "Alist of completion handler functions. |
| 1942 | Used for file names matching `tramp-file-name-regexp'. Operations not | 1935 | Used for file names matching `tramp-file-name-regexp'. Operations not |
| 1943 | mentioned here will be handled by `tramp-file-name-handler-alist' or the | 1936 | mentioned here will be handled by `tramp-file-name-handler-alist' or the |
| @@ -2172,28 +2165,11 @@ target of the symlink differ." | |||
| 2172 | ;; Localname manipulation functions that grok TRAMP localnames... | 2165 | ;; Localname manipulation functions that grok TRAMP localnames... |
| 2173 | (defun tramp-handle-file-name-directory (file) | 2166 | (defun tramp-handle-file-name-directory (file) |
| 2174 | "Like `file-name-directory' but aware of TRAMP files." | 2167 | "Like `file-name-directory' but aware of TRAMP files." |
| 2175 | ;; everything except the last filename thing is the directory | 2168 | ;; Everything except the last filename thing is the directory. |
| 2176 | (with-parsed-tramp-file-name file nil | 2169 | (with-parsed-tramp-file-name file nil |
| 2177 | ;; For the following condition, two possibilities should be tried: | 2170 | ;; Run the command on the localname portion only. |
| 2178 | ;; (1) (string= localname "") | 2171 | (tramp-make-tramp-file-name |
| 2179 | ;; (2) (or (string= localname "") (string= localname "/")) | 2172 | multi-method method user host (file-name-directory (or localname ""))))) |
| 2180 | ;; The second variant fails when completing a "/" directory on | ||
| 2181 | ;; the remote host, that is a filename which looks like | ||
| 2182 | ;; "/user@host:/". But maybe wildcards fail with the first variant. | ||
| 2183 | ;; We should do some investigation. | ||
| 2184 | (if (string= localname "") | ||
| 2185 | ;; For a filename like "/[foo]", we return "/". The `else' | ||
| 2186 | ;; case would return "/[foo]" unchanged. But if we do that, | ||
| 2187 | ;; then `file-expand-wildcards' ceases to work. It's not | ||
| 2188 | ;; quite clear to me what's the intuition that tells that this | ||
| 2189 | ;; behavior is the right behavior, but oh, well. | ||
| 2190 | "/" | ||
| 2191 | ;; run the command on the localname portion only | ||
| 2192 | ;; CCC: This should take into account the remote machine type, no? | ||
| 2193 | ;; --daniel <daniel@danann.net> | ||
| 2194 | (tramp-make-tramp-file-name multi-method method user host | ||
| 2195 | ;; This will not recurse... | ||
| 2196 | (or (file-name-directory localname) ""))))) | ||
| 2197 | 2173 | ||
| 2198 | (defun tramp-handle-file-name-nondirectory (file) | 2174 | (defun tramp-handle-file-name-nondirectory (file) |
| 2199 | "Like `file-name-nondirectory' but aware of TRAMP files." | 2175 | "Like `file-name-nondirectory' but aware of TRAMP files." |
| @@ -4144,7 +4120,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." | |||
| 4144 | ;; (inhibit-file-name-operation operation)) | 4120 | ;; (inhibit-file-name-operation operation)) |
| 4145 | ;; (apply operation args))) | 4121 | ;; (apply operation args))) |
| 4146 | 4122 | ||
| 4147 | (defun tramp-run-real-handler (operation args) | 4123 | ;;;###autoload |
| 4124 | (progn (defun tramp-run-real-handler (operation args) | ||
| 4148 | "Invoke normal file name handler for OPERATION. | 4125 | "Invoke normal file name handler for OPERATION. |
| 4149 | First arg specifies the OPERATION, second arg is a list of arguments to | 4126 | First arg specifies the OPERATION, second arg is a list of arguments to |
| 4150 | pass to the OPERATION." | 4127 | pass to the OPERATION." |
| @@ -4157,13 +4134,14 @@ pass to the OPERATION." | |||
| 4157 | ,(and (eq inhibit-file-name-operation operation) | 4134 | ,(and (eq inhibit-file-name-operation operation) |
| 4158 | inhibit-file-name-handlers))) | 4135 | inhibit-file-name-handlers))) |
| 4159 | (inhibit-file-name-operation operation)) | 4136 | (inhibit-file-name-operation operation)) |
| 4160 | (apply operation args))) | 4137 | (apply operation args)))) |
| 4161 | 4138 | ||
| 4162 | ;; This function is used from `tramp-completion-file-name-handler' functions | 4139 | ;; This function is used from `tramp-completion-file-name-handler' functions |
| 4163 | ;; only, if `tramp-completion-mode' is true. But this cannot be checked here | 4140 | ;; only, if `tramp-completion-mode' is true. But this cannot be checked here |
| 4164 | ;; because the check is based on a full filename, not available for all | 4141 | ;; because the check is based on a full filename, not available for all |
| 4165 | ;; basic I/O operations. | 4142 | ;; basic I/O operations. |
| 4166 | (defun tramp-completion-run-real-handler (operation args) | 4143 | ;;;###autoload |
| 4144 | (progn (defun tramp-completion-run-real-handler (operation args) | ||
| 4167 | "Invoke `tramp-file-name-handler' for OPERATION. | 4145 | "Invoke `tramp-file-name-handler' for OPERATION. |
| 4168 | First arg specifies the OPERATION, second arg is a list of arguments to | 4146 | First arg specifies the OPERATION, second arg is a list of arguments to |
| 4169 | pass to the OPERATION." | 4147 | pass to the OPERATION." |
| @@ -4175,7 +4153,7 @@ pass to the OPERATION." | |||
| 4175 | ,(and (eq inhibit-file-name-operation operation) | 4153 | ,(and (eq inhibit-file-name-operation operation) |
| 4176 | inhibit-file-name-handlers))) | 4154 | inhibit-file-name-handlers))) |
| 4177 | (inhibit-file-name-operation operation)) | 4155 | (inhibit-file-name-operation operation)) |
| 4178 | (apply operation args))) | 4156 | (apply operation args)))) |
| 4179 | 4157 | ||
| 4180 | ;; We handle here all file primitives. Most of them have the file | 4158 | ;; We handle here all file primitives. Most of them have the file |
| 4181 | ;; name as first parameter; nevertheless we check for them explicitly | 4159 | ;; name as first parameter; nevertheless we check for them explicitly |
| @@ -4272,12 +4250,25 @@ ARGS are the arguments OPERATION has been called with." | |||
| 4272 | (defun tramp-file-name-handler (operation &rest args) | 4250 | (defun tramp-file-name-handler (operation &rest args) |
| 4273 | "Invoke Tramp file name handler. | 4251 | "Invoke Tramp file name handler. |
| 4274 | Falls back to normal file name handler if no tramp file name handler exists." | 4252 | Falls back to normal file name handler if no tramp file name handler exists." |
| 4253 | ;; (setq edebug-trace t) | ||
| 4254 | ;; (edebug-trace "%s" (with-output-to-string (backtrace))) | ||
| 4275 | (save-match-data | 4255 | (save-match-data |
| 4276 | (let* ((filename (apply 'tramp-file-name-for-operation operation args)) | 4256 | (let* ((filename (apply 'tramp-file-name-for-operation operation args)) |
| 4257 | (completion (tramp-completion-mode filename)) | ||
| 4277 | (foreign (tramp-find-foreign-file-name-handler filename))) | 4258 | (foreign (tramp-find-foreign-file-name-handler filename))) |
| 4278 | (cond | 4259 | (with-parsed-tramp-file-name filename nil |
| 4279 | (foreign (apply foreign operation args)) | 4260 | (cond |
| 4280 | (t (tramp-run-real-handler operation args)))))) | 4261 | ;; When we are in completion mode, some operations shouldn' be |
| 4262 | ;; handled by backend. | ||
| 4263 | ((and completion (memq operation '(expand-file-name))) | ||
| 4264 | (tramp-run-real-handler operation args)) | ||
| 4265 | ((and completion (zerop (length localname)) | ||
| 4266 | (memq operation '(file-exists-p file-directory-p))) | ||
| 4267 | t) | ||
| 4268 | ;; Call the backend function. | ||
| 4269 | (foreign (apply foreign operation args)) | ||
| 4270 | ;; Nothing to do for us. | ||
| 4271 | (t (tramp-run-real-handler operation args))))))) | ||
| 4281 | 4272 | ||
| 4282 | 4273 | ||
| 4283 | ;; In Emacs, there is some concurrency due to timers. If a timer | 4274 | ;; In Emacs, there is some concurrency due to timers. If a timer |
| @@ -4325,42 +4316,39 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 4325 | (setq tramp-locked tl)))) | 4316 | (setq tramp-locked tl)))) |
| 4326 | 4317 | ||
| 4327 | ;;;###autoload | 4318 | ;;;###autoload |
| 4328 | (defun tramp-completion-file-name-handler (operation &rest args) | 4319 | (progn (defun tramp-completion-file-name-handler (operation &rest args) |
| 4329 | "Invoke tramp file name completion handler. | 4320 | "Invoke tramp file name completion handler. |
| 4330 | Falls back to normal file name handler if no tramp file name handler exists." | 4321 | Falls back to normal file name handler if no tramp file name handler exists." |
| 4331 | ;; (setq tramp-debug-buffer t) | 4322 | ;; (setq edebug-trace t) |
| 4332 | ;; (tramp-message 1 "%s %s" operation args) | 4323 | ;; (edebug-trace "%s" (with-output-to-string (backtrace))) |
| 4333 | ;; (tramp-message 1 "%s %s\n%s" | ||
| 4334 | ;; operation args (with-output-to-string (backtrace))) | ||
| 4335 | (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) | 4324 | (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) |
| 4336 | (if fn | 4325 | (if fn |
| 4337 | (save-match-data (apply (cdr fn) args)) | 4326 | (save-match-data (apply (cdr fn) args)) |
| 4338 | (tramp-completion-run-real-handler operation args)))) | 4327 | (tramp-completion-run-real-handler operation args))))) |
| 4339 | 4328 | ||
| 4340 | ;; Register in `file-name-handler-alist'. | ||
| 4341 | ;; `tramp-completion-file-name-handler' must not be active when temacs | ||
| 4342 | ;; dumps. And it makes no sense in batch mode anyway. | ||
| 4343 | ;;;###autoload | 4329 | ;;;###autoload |
| 4344 | (defun tramp-register-file-name-handlers () | 4330 | (defsubst tramp-register-file-name-handlers () |
| 4345 | "Add tramp file name handlers to `file-name-handler-alist'." | 4331 | "Add tramp file name handlers to `file-name-handler-alist'." |
| 4346 | (unless noninteractive | 4332 | (add-to-list 'file-name-handler-alist |
| 4347 | (add-to-list 'file-name-handler-alist | 4333 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) |
| 4348 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) | 4334 | (when partial-completion-mode |
| 4349 | (add-to-list 'file-name-handler-alist | 4335 | (add-to-list 'file-name-handler-alist |
| 4350 | (cons tramp-completion-file-name-regexp | 4336 | (cons tramp-completion-file-name-regexp |
| 4351 | 'tramp-completion-file-name-handler)) | 4337 | 'tramp-completion-file-name-handler)) |
| 4352 | (put 'tramp-completion-file-name-handler 'safe-magic t))) | 4338 | (put 'tramp-completion-file-name-handler 'safe-magic t)) |
| 4339 | ;; If jka-compr is already loaded, move it to the front of | ||
| 4340 | ;; `file-name-handler-alist'. | ||
| 4341 | (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist))) | ||
| 4342 | (when jka | ||
| 4343 | (setq file-name-handler-alist | ||
| 4344 | (cons jka (delete jka file-name-handler-alist)))))) | ||
| 4353 | 4345 | ||
| 4354 | ;; LAMBDA function used temporarily, because older/other versions of | 4346 | ;; During autoload, it shall be checked whether |
| 4355 | ;; Tramp don't know of `tramp-register-file-name-handlers'. Can be | 4347 | ;; `partial-completion-mode' is active. Therefore registering will be |
| 4356 | ;; replaced once that DEFUN is established. Relevant for Emacs 22 only. | 4348 | ;; delayed. |
| 4357 | ;;;###;autoload(add-hook 'emacs-startup-hook 'tramp-register-file-name-handlers) | ||
| 4358 | ;;;###autoload(add-hook | 4349 | ;;;###autoload(add-hook |
| 4359 | ;;;###autoload 'emacs-startup-hook | 4350 | ;;;###autoload 'after-init-hook |
| 4360 | ;;;###autoload '(lambda () | 4351 | ;;;###autoload '(lambda () (tramp-register-file-name-handlers))) |
| 4361 | ;;;###autoload (condition-case nil | ||
| 4362 | ;;;###autoload (funcall 'tramp-register-file-name-handlers) | ||
| 4363 | ;;;###autoload (error nil)))) | ||
| 4364 | (tramp-register-file-name-handlers) | 4352 | (tramp-register-file-name-handlers) |
| 4365 | 4353 | ||
| 4366 | ;;;###autoload | 4354 | ;;;###autoload |
| @@ -4374,16 +4362,6 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4374 | 4362 | ||
| 4375 | (add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers) | 4363 | (add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers) |
| 4376 | 4364 | ||
| 4377 | (defun tramp-repair-jka-compr () | ||
| 4378 | "If jka-compr is already loaded, move it to the front of | ||
| 4379 | `file-name-handler-alist'. On Emacs 22 or so this will not be | ||
| 4380 | necessary anymore." | ||
| 4381 | (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist))) | ||
| 4382 | (when jka | ||
| 4383 | (setq file-name-handler-alist | ||
| 4384 | (cons jka (delete jka file-name-handler-alist)))))) | ||
| 4385 | (tramp-repair-jka-compr) | ||
| 4386 | |||
| 4387 | 4365 | ||
| 4388 | ;;; Interactions with other packages: | 4366 | ;;; Interactions with other packages: |
| 4389 | 4367 | ||
| @@ -4497,31 +4475,10 @@ necessary anymore." | |||
| 4497 | last-input-event) ?\ )))))) | 4475 | last-input-event) ?\ )))))) |
| 4498 | t))) | 4476 | t))) |
| 4499 | 4477 | ||
| 4500 | (defun tramp-completion-handle-file-exists-p (filename) | ||
| 4501 | "Like `file-exists-p' for tramp files." | ||
| 4502 | (if (tramp-completion-mode filename) | ||
| 4503 | (tramp-run-real-handler | ||
| 4504 | 'file-exists-p (list filename)) | ||
| 4505 | (tramp-completion-run-real-handler | ||
| 4506 | 'file-exists-p (list filename)))) | ||
| 4507 | |||
| 4508 | ;; Localname manipulation in case of partial TRAMP file names. | ||
| 4509 | (defun tramp-completion-handle-file-name-directory (file) | ||
| 4510 | "Like `file-name-directory' but aware of TRAMP files." | ||
| 4511 | (if (tramp-completion-mode file) | ||
| 4512 | "/" | ||
| 4513 | (tramp-completion-run-real-handler | ||
| 4514 | 'file-name-directory (list file)))) | ||
| 4515 | |||
| 4516 | ;; Localname manipulation in case of partial TRAMP file names. | ||
| 4517 | (defun tramp-completion-handle-file-name-nondirectory (file) | ||
| 4518 | "Like `file-name-nondirectory' but aware of TRAMP files." | ||
| 4519 | (substring | ||
| 4520 | file (length (tramp-completion-handle-file-name-directory file)))) | ||
| 4521 | |||
| 4522 | ;; Method, host name and user name completion. | 4478 | ;; Method, host name and user name completion. |
| 4523 | ;; `tramp-completion-dissect-file-name' returns a list of | 4479 | ;; `tramp-completion-dissect-file-name' returns a list of |
| 4524 | ;; tramp-file-name structures. For all of them we return possible completions. | 4480 | ;; tramp-file-name structures. For all of them we return possible completions. |
| 4481 | ;;;###autoload | ||
| 4525 | (defun tramp-completion-handle-file-name-all-completions (filename directory) | 4482 | (defun tramp-completion-handle-file-name-all-completions (filename directory) |
| 4526 | "Like `file-name-all-completions' for partial tramp files." | 4483 | "Like `file-name-all-completions' for partial tramp files." |
| 4527 | 4484 | ||
| @@ -4576,7 +4533,8 @@ necessary anymore." | |||
| 4576 | ;; unify list, remove nil elements | 4533 | ;; unify list, remove nil elements |
| 4577 | (while result | 4534 | (while result |
| 4578 | (let ((car (car result))) | 4535 | (let ((car (car result))) |
| 4579 | (when car (add-to-list 'result1 car)) | 4536 | (when car (add-to-list |
| 4537 | 'result1 (substring car (length directory)))) | ||
| 4580 | (setq result (cdr result)))) | 4538 | (setq result (cdr result)))) |
| 4581 | 4539 | ||
| 4582 | ;; Complete local parts | 4540 | ;; Complete local parts |
| @@ -4595,6 +4553,7 @@ necessary anymore." | |||
| 4595 | (setq tramp-completion-mode nil))) | 4553 | (setq tramp-completion-mode nil))) |
| 4596 | 4554 | ||
| 4597 | ;; Method, host name and user name completion for a file. | 4555 | ;; Method, host name and user name completion for a file. |
| 4556 | ;;;###autoload | ||
| 4598 | (defun tramp-completion-handle-file-name-completion (filename directory) | 4557 | (defun tramp-completion-handle-file-name-completion (filename directory) |
| 4599 | "Like `file-name-completion' for tramp files." | 4558 | "Like `file-name-completion' for tramp files." |
| 4600 | (try-completion filename | 4559 | (try-completion filename |
| @@ -4721,8 +4680,7 @@ remote host and localname (filename on remote host)." | |||
| 4721 | (lambda (method) | 4680 | (lambda (method) |
| 4722 | (and method | 4681 | (and method |
| 4723 | (string-match (concat "^" (regexp-quote partial-method)) method) | 4682 | (string-match (concat "^" (regexp-quote partial-method)) method) |
| 4724 | ;; we must remove leading "/". | 4683 | (tramp-make-tramp-file-name nil method nil nil nil))) |
| 4725 | (substring (tramp-make-tramp-file-name nil method nil nil nil) 1))) | ||
| 4726 | (delete "multi" (mapcar 'car tramp-methods)))) | 4684 | (delete "multi" (mapcar 'car tramp-methods)))) |
| 4727 | 4685 | ||
| 4728 | ;; Compares partial user and host names with possible completions. | 4686 | ;; Compares partial user and host names with possible completions. |
| @@ -4755,8 +4713,7 @@ PARTIAL-USER must match USER, PARTIAL-HOST must match HOST." | |||
| 4755 | host nil))) | 4713 | host nil))) |
| 4756 | 4714 | ||
| 4757 | (unless (zerop (+ (length user) (length host))) | 4715 | (unless (zerop (+ (length user) (length host))) |
| 4758 | ;; we must remove leading "/". | 4716 | (tramp-make-tramp-file-name nil method user host nil))) |
| 4759 | (substring (tramp-make-tramp-file-name nil method user host nil) 1))) | ||
| 4760 | 4717 | ||
| 4761 | (defun tramp-parse-rhosts (filename) | 4718 | (defun tramp-parse-rhosts (filename) |
| 4762 | "Return a list of (user host) tuples allowed to access. | 4719 | "Return a list of (user host) tuples allowed to access. |
| @@ -4975,15 +4932,6 @@ User may be nil." | |||
| 4975 | (forward-line 1) | 4932 | (forward-line 1) |
| 4976 | result)) | 4933 | result)) |
| 4977 | 4934 | ||
| 4978 | (defun tramp-completion-handle-expand-file-name (name &optional dir) | ||
| 4979 | "Like `expand-file-name' for tramp files." | ||
| 4980 | (let ((fullname (concat (or dir default-directory) name))) | ||
| 4981 | (if (tramp-completion-mode fullname) | ||
| 4982 | (tramp-run-real-handler | ||
| 4983 | 'expand-file-name (list name dir)) | ||
| 4984 | (tramp-completion-run-real-handler | ||
| 4985 | 'expand-file-name (list name dir))))) | ||
| 4986 | |||
| 4987 | ;;; Internal Functions: | 4935 | ;;; Internal Functions: |
| 4988 | 4936 | ||
| 4989 | (defun tramp-maybe-send-perl-script (multi-method method user host script name) | 4937 | (defun tramp-maybe-send-perl-script (multi-method method user host script name) |
diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 8f7de913261..127a550b28c 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/pcvs-info.el b/lisp/pcvs-info.el index 7d1a11ccb68..4aaa5add58d 100644 --- a/lisp/pcvs-info.el +++ b/lisp/pcvs-info.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el index 892dc962767..0193939606c 100644 --- a/lisp/pcvs-parse.el +++ b/lisp/pcvs-parse.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index b04f3c121a1..cb18fc83d59 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index a5163319fbf..4b3202c6e41 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -690,10 +690,13 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 690 | (if event (posn-set-point (event-end event))) | 690 | (if event (posn-set-point (event-end event))) |
| 691 | (require 'tooltip) | 691 | (require 'tooltip) |
| 692 | (save-selected-window | 692 | (save-selected-window |
| 693 | (let ((expr (if arg | 693 | (let ((expr |
| 694 | (completing-read "Name of variable: " | 694 | (if arg |
| 695 | 'gud-gdb-complete-command) | 695 | (completing-read "Name of variable: " |
| 696 | (tooltip-identifier-from-point (point))))) | 696 | 'gud-gdb-complete-command) |
| 697 | (if (and transient-mark-mode mark-active) | ||
| 698 | (buffer-substring (region-beginning) (region-end)) | ||
| 699 | (tooltip-identifier-from-point (point)))))) | ||
| 697 | (catch 'already-watched | 700 | (catch 'already-watched |
| 698 | (dolist (var gdb-var-list) | 701 | (dolist (var gdb-var-list) |
| 699 | (unless (string-match "\\." (car var)) | 702 | (unless (string-match "\\." (car var)) |
| @@ -2691,7 +2694,7 @@ corresponding to the mode line clicked." | |||
| 2691 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer | 2694 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer |
| 2692 | :enable gdb-use-separate-io-buffer)) | 2695 | :enable gdb-use-separate-io-buffer)) |
| 2693 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 2696 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 2694 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) | 2697 | (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer)) |
| 2695 | (define-key menu [breakpoints] | 2698 | (define-key menu [breakpoints] |
| 2696 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) | 2699 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) |
| 2697 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) | 2700 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 6afa3f29348..c695272e92b 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | (defgroup grep nil | 37 | (defgroup grep nil |
| 38 | "Run compiler as inferior of Emacs, parse error messages." | 38 | "Run grep as inferior of Emacs, parse error messages." |
| 39 | :group 'tools | 39 | :group 'tools |
| 40 | :group 'processes) | 40 | :group 'processes) |
| 41 | 41 | ||
| @@ -48,23 +48,6 @@ | |||
| 48 | :version "22.1" | 48 | :version "22.1" |
| 49 | :group 'grep) | 49 | :group 'grep) |
| 50 | 50 | ||
| 51 | (defcustom grep-auto-highlight t | ||
| 52 | "*Specify how many grep matches to highlight (and parse) initially. | ||
| 53 | \(Highlighting applies to an grep match when the mouse is over it.) | ||
| 54 | If this is a number N, all grep matches in the first N lines | ||
| 55 | are highlighted and parsed as soon as they arrive in Emacs. | ||
| 56 | If t, highlight and parse the whole grep output as soon as it arrives. | ||
| 57 | If nil, don't highlight or parse any of the grep buffer until you try to | ||
| 58 | move to the error messages. | ||
| 59 | |||
| 60 | Those grep matches which are not parsed and highlighted initially | ||
| 61 | will be parsed and highlighted as soon as you try to move to them." | ||
| 62 | :type '(choice (const :tag "All" t) | ||
| 63 | (const :tag "None" nil) | ||
| 64 | (integer :tag "First N lines")) | ||
| 65 | :version "22.1" | ||
| 66 | :group 'grep) | ||
| 67 | |||
| 68 | (defcustom grep-highlight-matches 'auto-detect | 51 | (defcustom grep-highlight-matches 'auto-detect |
| 69 | "If t, use special markers to highlight grep matches. | 52 | "If t, use special markers to highlight grep matches. |
| 70 | 53 | ||
| @@ -108,6 +91,20 @@ call that function before using this variable in your program." | |||
| 108 | (const :tag "Not Set" nil)) | 91 | (const :tag "Not Set" nil)) |
| 109 | :group 'grep) | 92 | :group 'grep) |
| 110 | 93 | ||
| 94 | (defcustom grep-template nil | ||
| 95 | "The default command to run for \\[lgrep]. | ||
| 96 | The default value of this variable is set up by `grep-compute-defaults'; | ||
| 97 | call that function before using this variable in your program. | ||
| 98 | The following place holders should be present in the string: | ||
| 99 | <C> - place to put -i if case insensitive grep. | ||
| 100 | <F> - file names and wildcards to search. | ||
| 101 | <R> - the regular expression searched for. | ||
| 102 | <N> - place to insert null-device." | ||
| 103 | :type '(choice string | ||
| 104 | (const :tag "Not Set" nil)) | ||
| 105 | :version "22.1" | ||
| 106 | :group 'grep) | ||
| 107 | |||
| 111 | (defcustom grep-use-null-device 'auto-detect | 108 | (defcustom grep-use-null-device 'auto-detect |
| 112 | "If t, append the value of `null-device' to `grep' commands. | 109 | "If t, append the value of `null-device' to `grep' commands. |
| 113 | This is done to ensure that the output of grep includes the filename of | 110 | This is done to ensure that the output of grep includes the filename of |
| @@ -130,8 +127,8 @@ call that function before using this variable in your program." | |||
| 130 | (const :tag "Not Set" nil)) | 127 | (const :tag "Not Set" nil)) |
| 131 | :group 'grep) | 128 | :group 'grep) |
| 132 | 129 | ||
| 133 | (defcustom grep-tree-command nil | 130 | (defcustom grep-find-template nil |
| 134 | "The default find command for \\[grep-tree]. | 131 | "The default command to run for \\[rgrep]. |
| 135 | The default value of this variable is set up by `grep-compute-defaults'; | 132 | The default value of this variable is set up by `grep-compute-defaults'; |
| 136 | call that function before using this variable in your program. | 133 | call that function before using this variable in your program. |
| 137 | The following place holders should be present in the string: | 134 | The following place holders should be present in the string: |
| @@ -145,27 +142,22 @@ The following place holders should be present in the string: | |||
| 145 | :version "22.1" | 142 | :version "22.1" |
| 146 | :group 'grep) | 143 | :group 'grep) |
| 147 | 144 | ||
| 148 | (defcustom grep-tree-files-aliases '( | 145 | (defcustom grep-files-aliases '( |
| 146 | ("el" . "*.el") | ||
| 149 | ("ch" . "*.[ch]") | 147 | ("ch" . "*.[ch]") |
| 150 | ("c" . "*.c") | 148 | ("c" . "*.c") |
| 151 | ("h" . "*.h") | 149 | ("h" . "*.h") |
| 152 | ("m" . "[Mm]akefile*") | ||
| 153 | ("asm" . "*.[sS]") | 150 | ("asm" . "*.[sS]") |
| 154 | ("all" . "*") | 151 | ("m" . "[Mm]akefile*") |
| 155 | ("el" . "*.el") | 152 | ("l" . "[Cc]hange[Ll]og*") |
| 156 | ) | 153 | ) |
| 157 | "*Alist of aliases for the FILES argument to `grep-tree'." | 154 | "*Alist of aliases for the FILES argument to `lgrep' and `rgrep'." |
| 158 | :type 'alist | 155 | :type 'alist |
| 159 | :group 'grep) | 156 | :group 'grep) |
| 160 | 157 | ||
| 161 | (defcustom grep-tree-ignore-case t | 158 | (defcustom grep-find-ignored-directories '("CVS" ".hg" "{arch}") |
| 162 | "*If non-nil, `grep-tree' ignores case in matches." | 159 | "*List of names of sub-directories which `rgrep' shall not recurse into." |
| 163 | :type 'boolean | 160 | :type '(repeat string) |
| 164 | :group 'grep) | ||
| 165 | |||
| 166 | (defcustom grep-tree-ignore-CVS-directories t | ||
| 167 | "*If non-nil, `grep-tree' does no recurse into CVS directories." | ||
| 168 | :type 'boolean | ||
| 169 | :group 'grep) | 161 | :group 'grep) |
| 170 | 162 | ||
| 171 | (defcustom grep-error-screen-columns nil | 163 | (defcustom grep-error-screen-columns nil |
| @@ -208,6 +200,8 @@ See `compilation-error-screen-columns'" | |||
| 208 | '("Compile..." . compile)) | 200 | '("Compile..." . compile)) |
| 209 | (define-key map [menu-bar grep compilation-grep] | 201 | (define-key map [menu-bar grep compilation-grep] |
| 210 | '("Another grep..." . grep)) | 202 | '("Another grep..." . grep)) |
| 203 | (define-key map [menu-bar grep compilation-grep-find] | ||
| 204 | '("Recursive grep..." . grep-find)) | ||
| 211 | (define-key map [menu-bar grep compilation-recompile] | 205 | (define-key map [menu-bar grep compilation-recompile] |
| 212 | '("Repeat grep" . recompile)) | 206 | '("Repeat grep" . recompile)) |
| 213 | (define-key map [menu-bar grep compilation-separator2] | 207 | (define-key map [menu-bar grep compilation-separator2] |
| @@ -353,6 +347,11 @@ This variable's value takes effect when `grep-compute-defaults' is called.") | |||
| 353 | ;;;###autoload | 347 | ;;;###autoload |
| 354 | (defvar grep-find-history nil) | 348 | (defvar grep-find-history nil) |
| 355 | 349 | ||
| 350 | ;; History of lgrep and rgrep regexp and files args. | ||
| 351 | (defvar grep-regexp-history nil) | ||
| 352 | (defvar grep-files-history '("ch" "el")) | ||
| 353 | |||
| 354 | |||
| 356 | ;;;###autoload | 355 | ;;;###autoload |
| 357 | (defun grep-process-setup () | 356 | (defun grep-process-setup () |
| 358 | "Setup compilation variables and buffer for `grep'. | 357 | "Setup compilation variables and buffer for `grep'. |
| @@ -378,6 +377,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 378 | (cons msg code)))) | 377 | (cons msg code)))) |
| 379 | (run-hooks 'grep-setup-hook)) | 378 | (run-hooks 'grep-setup-hook)) |
| 380 | 379 | ||
| 380 | (defun grep-probe (command args &optional func result) | ||
| 381 | (equal (condition-case nil | ||
| 382 | (apply (or func 'call-process) command args) | ||
| 383 | (error nil)) | ||
| 384 | (or result 0))) | ||
| 385 | |||
| 381 | ;;;###autoload | 386 | ;;;###autoload |
| 382 | (defun grep-compute-defaults () | 387 | (defun grep-compute-defaults () |
| 383 | (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) | 388 | (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) |
| @@ -385,73 +390,67 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 385 | (with-temp-buffer | 390 | (with-temp-buffer |
| 386 | (let ((hello-file (expand-file-name "HELLO" data-directory))) | 391 | (let ((hello-file (expand-file-name "HELLO" data-directory))) |
| 387 | (not | 392 | (not |
| 388 | (and (equal (condition-case nil | 393 | (and (if grep-command |
| 389 | (if grep-command | 394 | ;; `grep-command' is already set, so |
| 390 | ;; `grep-command' is already set, so | 395 | ;; use that for testing. |
| 391 | ;; use that for testing. | 396 | (grep-probe grep-command |
| 392 | (call-process-shell-command | 397 | `(nil t nil "^English" ,hello-file) |
| 393 | grep-command nil t nil | 398 | #'call-process-shell-command) |
| 394 | "^English" hello-file) | 399 | ;; otherwise use `grep-program' |
| 395 | ;; otherwise use `grep-program' | 400 | (grep-probe grep-program |
| 396 | (call-process grep-program nil t nil | 401 | `(nil t nil "-nH" "^English" ,hello-file))) |
| 397 | "-nH" "^English" hello-file)) | ||
| 398 | (error nil)) | ||
| 399 | 0) | ||
| 400 | (progn | 402 | (progn |
| 401 | (goto-char (point-min)) | 403 | (goto-char (point-min)) |
| 402 | (looking-at | 404 | (looking-at |
| 403 | (concat (regexp-quote hello-file) | 405 | (concat (regexp-quote hello-file) |
| 404 | ":[0-9]+:English"))))))))) | 406 | ":[0-9]+:English"))))))))) |
| 405 | (unless grep-command | 407 | (unless (and grep-command grep-find-command |
| 406 | (setq grep-command | 408 | grep-template grep-find-template) |
| 407 | (let ((required-options (if grep-use-null-device "-n" "-nH"))) | 409 | (let ((grep-options |
| 408 | (if (equal (condition-case nil ; in case "grep" isn't in exec-path | 410 | (concat (if grep-use-null-device "-n" "-nH") |
| 409 | (call-process grep-program nil nil nil | 411 | (if (grep-probe grep-program |
| 410 | "-e" "foo" null-device) | 412 | `(nil nil nil "-e" "foo" ,null-device) |
| 411 | (error nil)) | 413 | nil 1) |
| 412 | 1) | 414 | " -e")))) |
| 413 | (format "%s %s -e " grep-program required-options) | 415 | (unless grep-command |
| 414 | (format "%s %s " grep-program required-options))))) | 416 | (setq grep-command |
| 415 | (unless grep-find-use-xargs | 417 | (format "%s %s " grep-program grep-options))) |
| 416 | (setq grep-find-use-xargs | 418 | (unless grep-template |
| 417 | (if (and | 419 | (setq grep-template |
| 418 | (equal (call-process "find" nil nil nil | 420 | (format "%s <C> %s <R> <F>" grep-program grep-options))) |
| 419 | null-device "-print0") | 421 | (unless grep-find-use-xargs |
| 420 | 0) | 422 | (setq grep-find-use-xargs |
| 421 | (equal (call-process "xargs" nil nil nil | 423 | (if (and |
| 422 | "-0" "-e" "echo") | 424 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) |
| 423 | 0)) | 425 | (grep-probe "xargs" `(nil nil nil "-0" "-e" "echo"))) |
| 424 | 'gnu))) | 426 | 'gnu))) |
| 425 | (unless grep-find-command | 427 | (unless grep-find-command |
| 426 | (setq grep-find-command | 428 | (setq grep-find-command |
| 427 | (cond ((eq grep-find-use-xargs 'gnu) | 429 | (cond ((eq grep-find-use-xargs 'gnu) |
| 428 | (format "%s . -type f -print0 | xargs -0 -e %s" | 430 | (format "%s . -type f -print0 | xargs -0 -e %s" |
| 429 | find-program grep-command)) | 431 | find-program grep-command)) |
| 430 | (grep-find-use-xargs | 432 | (grep-find-use-xargs |
| 431 | (format "%s . -type f -print | xargs %s" | 433 | (format "%s . -type f -print | xargs %s" |
| 432 | find-program grep-command)) | 434 | find-program grep-command)) |
| 433 | (t (cons (format "%s . -type f -exec %s {} %s \\;" | 435 | (t (cons (format "%s . -type f -exec %s {} %s \\;" |
| 434 | find-program grep-command null-device) | 436 | find-program grep-command null-device) |
| 435 | (+ 22 (length grep-command))))))) | 437 | (+ 22 (length grep-command))))))) |
| 436 | (unless grep-tree-command | 438 | (unless grep-find-template |
| 437 | (setq grep-tree-command | 439 | (setq grep-find-template |
| 438 | (let* ((glen (length grep-program)) | 440 | (let ((gcmd (format "%s <C> %s <R>" |
| 439 | (gcmd (concat grep-program " <C>" (substring grep-command glen)))) | 441 | grep-program grep-options))) |
| 440 | (cond ((eq grep-find-use-xargs 'gnu) | 442 | (cond ((eq grep-find-use-xargs 'gnu) |
| 441 | (format "%s <D> <X> -type f <F> -print0 | xargs -0 -e %s <R>" | 443 | (format "%s . <X> -type f <F> -print0 | xargs -0 -e %s" |
| 442 | find-program gcmd)) | 444 | find-program gcmd)) |
| 443 | (grep-find-use-xargs | 445 | (grep-find-use-xargs |
| 444 | (format "%s <D> <X> -type f <F> -print | xargs %s <R>" | 446 | (format "%s . <X> -type f <F> -print | xargs %s" |
| 445 | find-program gcmd)) | 447 | find-program gcmd)) |
| 446 | (t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;" | 448 | (t (format "%s . <X> -type f <F> -exec %s {} %s \\;" |
| 447 | find-program gcmd null-device)))))) | 449 | find-program gcmd null-device)))))))) |
| 448 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) | 450 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) |
| 449 | (setq grep-highlight-matches | 451 | (setq grep-highlight-matches |
| 450 | (with-temp-buffer | 452 | (with-temp-buffer |
| 451 | (and (equal (condition-case nil | 453 | (and (grep-probe grep-program '(nil t nil "--help")) |
| 452 | (call-process grep-program nil t nil "--help") | ||
| 453 | (error nil)) | ||
| 454 | 0) | ||
| 455 | (progn | 454 | (progn |
| 456 | (goto-char (point-min)) | 455 | (goto-char (point-min)) |
| 457 | (search-forward "--color" nil t)) | 456 | (search-forward "--color" nil t)) |
| @@ -487,8 +486,22 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 487 | (file-name-extension buffer-file-name)))) | 486 | (file-name-extension buffer-file-name)))) |
| 488 | (replace-match tag-default t t grep-default 1)))) | 487 | (replace-match tag-default t t grep-default 1)))) |
| 489 | 488 | ||
| 489 | |||
| 490 | ;;;###autoload | 490 | ;;;###autoload |
| 491 | (defun grep (command-args &optional highlight-regexp) | 491 | (define-compilation-mode grep-mode "Grep" |
| 492 | "Sets `grep-last-buffer' and `compilation-window-height'." | ||
| 493 | (setq grep-last-buffer (current-buffer)) | ||
| 494 | (set (make-local-variable 'compilation-error-face) | ||
| 495 | grep-hit-face) | ||
| 496 | (set (make-local-variable 'compilation-error-regexp-alist) | ||
| 497 | grep-regexp-alist) | ||
| 498 | (set (make-local-variable 'compilation-process-setup-function) | ||
| 499 | 'grep-process-setup) | ||
| 500 | (set (make-local-variable 'compilation-disable-input) t)) | ||
| 501 | |||
| 502 | |||
| 503 | ;;;###autoload | ||
| 504 | (defun grep (command-args) | ||
| 492 | "Run grep, with user-specified args, and collect output in a buffer. | 505 | "Run grep, with user-specified args, and collect output in a buffer. |
| 493 | While grep runs asynchronously, you can use \\[next-error] (M-x next-error), | 506 | While grep runs asynchronously, you can use \\[next-error] (M-x next-error), |
| 494 | or \\<grep-mode-map>\\[compile-goto-error] in the grep \ | 507 | or \\<grep-mode-map>\\[compile-goto-error] in the grep \ |
| @@ -501,15 +514,10 @@ easily repeat a grep command. | |||
| 501 | A prefix argument says to default the argument based upon the current | 514 | A prefix argument says to default the argument based upon the current |
| 502 | tag the cursor is over, substituting it into the last grep command | 515 | tag the cursor is over, substituting it into the last grep command |
| 503 | in the grep command history (or into `grep-command' | 516 | in the grep command history (or into `grep-command' |
| 504 | if that history list is empty). | 517 | if that history list is empty)." |
| 505 | |||
| 506 | If specified, optional second arg HIGHLIGHT-REGEXP is the regexp to | ||
| 507 | temporarily highlight in visited source lines." | ||
| 508 | (interactive | 518 | (interactive |
| 509 | (progn | 519 | (progn |
| 510 | (unless (and grep-command | 520 | (grep-compute-defaults) |
| 511 | (or (not grep-use-null-device) (eq grep-use-null-device t))) | ||
| 512 | (grep-compute-defaults)) | ||
| 513 | (let ((default (grep-default-command))) | 521 | (let ((default (grep-default-command))) |
| 514 | (list (read-from-minibuffer "Run grep (like this): " | 522 | (list (read-from-minibuffer "Run grep (like this): " |
| 515 | (if current-prefix-arg | 523 | (if current-prefix-arg |
| @@ -522,19 +530,8 @@ temporarily highlight in visited source lines." | |||
| 522 | (compilation-start (if (and grep-use-null-device null-device) | 530 | (compilation-start (if (and grep-use-null-device null-device) |
| 523 | (concat command-args " " null-device) | 531 | (concat command-args " " null-device) |
| 524 | command-args) | 532 | command-args) |
| 525 | 'grep-mode nil highlight-regexp)) | 533 | 'grep-mode)) |
| 526 | 534 | ||
| 527 | ;;;###autoload | ||
| 528 | (define-compilation-mode grep-mode "Grep" | ||
| 529 | "Sets `grep-last-buffer' and `compilation-window-height'." | ||
| 530 | (setq grep-last-buffer (current-buffer)) | ||
| 531 | (set (make-local-variable 'compilation-error-face) | ||
| 532 | grep-hit-face) | ||
| 533 | (set (make-local-variable 'compilation-error-regexp-alist) | ||
| 534 | grep-regexp-alist) | ||
| 535 | (set (make-local-variable 'compilation-process-setup-function) | ||
| 536 | 'grep-process-setup) | ||
| 537 | (set (make-local-variable 'compilation-disable-input) t)) | ||
| 538 | 535 | ||
| 539 | ;;;###autoload | 536 | ;;;###autoload |
| 540 | (defun grep-find (command-args) | 537 | (defun grep-find (command-args) |
| @@ -547,9 +544,7 @@ This command uses a special history list for its arguments, so you can | |||
| 547 | easily repeat a find command." | 544 | easily repeat a find command." |
| 548 | (interactive | 545 | (interactive |
| 549 | (progn | 546 | (progn |
| 550 | (unless (and grep-command | 547 | (grep-compute-defaults) |
| 551 | (or (not grep-use-null-device) (eq grep-use-null-device t))) | ||
| 552 | (grep-compute-defaults)) | ||
| 553 | (if grep-find-command | 548 | (if grep-find-command |
| 554 | (list (read-from-minibuffer "Run find (like this): " | 549 | (list (read-from-minibuffer "Run find (like this): " |
| 555 | grep-find-command nil nil | 550 | grep-find-command nil nil |
| @@ -565,84 +560,190 @@ easily repeat a find command." | |||
| 565 | ;;;###autoload | 560 | ;;;###autoload |
| 566 | (defalias 'find-grep 'grep-find) | 561 | (defalias 'find-grep 'grep-find) |
| 567 | 562 | ||
| 568 | (defun grep-expand-command-macros (command &optional regexp files dir excl case-fold) | 563 | |
| 569 | "Patch grep COMMAND replacing <D>, etc." | 564 | ;; User-friendly interactive API. |
| 570 | (setq command | 565 | |
| 571 | (replace-regexp-in-string "<D>" | 566 | (defconst grep-expand-keywords |
| 572 | (or dir ".") command t t)) | 567 | '(("<C>" . (and cf (isearch-no-upper-case-p regexp t) "-i")) |
| 573 | (setq command | 568 | ("<D>" . dir) |
| 574 | (replace-regexp-in-string "<X>" | 569 | ("<F>" . files) |
| 575 | (or excl "") command t t)) | 570 | ("<N>" . null-device) |
| 576 | (setq command | 571 | ("<X>" . excl) |
| 577 | (replace-regexp-in-string "<F>" | 572 | ("<R>" . (shell-quote-argument (or regexp "")))) |
| 578 | (or files "") command t t)) | 573 | "List of substitutions performed by `grep-expand-template'. |
| 579 | (setq command | 574 | If car of an element matches, the cdr is evalled in to get the |
| 580 | (replace-regexp-in-string "<C>" | 575 | substitution string. Note dynamic scoping of variables.") |
| 581 | (if case-fold "-i" "") command t t)) | 576 | |
| 582 | (setq command | 577 | (defun grep-expand-template (template &optional regexp files dir excl) |
| 583 | (replace-regexp-in-string "<R>" | 578 | "Patch grep COMMAND string replacing <C>, <D>, <F>, <R>, and <X>." |
| 584 | (or regexp "") command t t)) | 579 | (let ((command template) |
| 585 | command) | 580 | (cf case-fold-search) |
| 586 | 581 | (case-fold-search nil)) | |
| 587 | (defvar grep-tree-last-regexp "") | 582 | (dolist (kw grep-expand-keywords command) |
| 588 | (defvar grep-tree-last-files (car (car grep-tree-files-aliases))) | 583 | (if (string-match (car kw) command) |
| 584 | (setq command | ||
| 585 | (replace-match | ||
| 586 | (or (if (symbolp (cdr kw)) | ||
| 587 | (symbol-value (cdr kw)) | ||
| 588 | (save-match-data (eval (cdr kw)))) | ||
| 589 | "") | ||
| 590 | t t command)))))) | ||
| 591 | |||
| 592 | (defun grep-read-regexp () | ||
| 593 | "Read regexp arg for interactive grep." | ||
| 594 | (let ((default | ||
| 595 | (or (funcall (or find-tag-default-function | ||
| 596 | (get major-mode 'find-tag-default-function) | ||
| 597 | 'find-tag-default)) | ||
| 598 | ""))) | ||
| 599 | (read-string | ||
| 600 | (concat "Search for" | ||
| 601 | (if (and default (> (length default) 0)) | ||
| 602 | (format " (default %s): " default) ": ")) | ||
| 603 | nil 'grep-regexp-history default))) | ||
| 604 | |||
| 605 | (defun grep-read-files (regexp) | ||
| 606 | "Read files arg for interactive grep." | ||
| 607 | (let* ((bn (or (buffer-file-name) (buffer-name))) | ||
| 608 | (fn (and bn | ||
| 609 | (stringp bn) | ||
| 610 | (file-name-nondirectory bn))) | ||
| 611 | (default | ||
| 612 | (or (and fn | ||
| 613 | (let ((aliases grep-files-aliases) | ||
| 614 | alias) | ||
| 615 | (while aliases | ||
| 616 | (setq alias (car aliases) | ||
| 617 | aliases (cdr aliases)) | ||
| 618 | (if (string-match (wildcard-to-regexp (cdr alias)) fn) | ||
| 619 | (setq aliases nil) | ||
| 620 | (setq alias nil))) | ||
| 621 | (cdr alias))) | ||
| 622 | (and fn | ||
| 623 | (let ((ext (file-name-extension fn))) | ||
| 624 | (and ext (concat "*." ext)))))) | ||
| 625 | (files (read-string | ||
| 626 | (concat "Search for \"" regexp | ||
| 627 | "\" in files" | ||
| 628 | (if default (concat " (default " default ")")) | ||
| 629 | ": ") | ||
| 630 | nil 'grep-files-history default))) | ||
| 631 | (and files | ||
| 632 | (or (cdr (assoc files grep-files-aliases)) | ||
| 633 | files)))) | ||
| 589 | 634 | ||
| 590 | ;;;###autoload | 635 | ;;;###autoload |
| 591 | (defun grep-tree (regexp files dir &optional subdirs) | 636 | (defun lgrep (regexp &optional files) |
| 592 | "Grep for REGEXP in FILES in directory tree rooted at DIR. | 637 | "Run grep, searching for REGEXP in FILES in current directory. |
| 593 | Collect output in a buffer. | ||
| 594 | Interactively, prompt separately for each search parameter. | ||
| 595 | With prefix arg, reuse previous REGEXP. | ||
| 596 | The search is limited to file names matching shell pattern FILES. | 638 | The search is limited to file names matching shell pattern FILES. |
| 597 | FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. | 639 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 598 | entering `ch' is equivalent to `*.[ch]'. | 640 | entering `ch' is equivalent to `*.[ch]'. |
| 599 | 641 | ||
| 600 | While find runs asynchronously, you can use the \\[next-error] command | 642 | With \\[universal-argument] prefix, allow user to edit the constructed |
| 601 | to find the text that grep hits refer to. | 643 | shell command line before it is executed. |
| 644 | With two \\[universal-argument] prefixes, edit and run grep shell command. | ||
| 602 | 645 | ||
| 603 | This command uses a special history list for its arguments, so you can | 646 | Collect output in a buffer. While grep runs asynchronously, you |
| 604 | easily repeat a find command. | 647 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] |
| 648 | in the grep output buffer, to go to the lines where grep found matches. | ||
| 605 | 649 | ||
| 606 | When used non-interactively, optional arg SUBDIRS limits the search to | 650 | This command shares argument histories with \\[rgrep] and \\[grep]." |
| 607 | those sub directories of DIR." | ||
| 608 | (interactive | 651 | (interactive |
| 609 | (let* ((regexp | 652 | (progn |
| 610 | (if current-prefix-arg | 653 | (grep-compute-defaults) |
| 611 | grep-tree-last-regexp | 654 | (cond |
| 612 | (let* ((default (current-word)) | 655 | ((and grep-command (equal current-prefix-arg '(16))) |
| 613 | (spec (read-string | 656 | (list (read-from-minibuffer "Run: " grep-command |
| 614 | (concat "Search for" | 657 | nil nil 'grep-history) |
| 615 | (if (and default (> (length default) 0)) | 658 | nil)) |
| 616 | (format " (default %s): " default) ": "))))) | 659 | ((not grep-template) |
| 617 | (if (equal spec "") default spec)))) | 660 | (list nil |
| 618 | (files | 661 | (read-string "grep.el: No `grep-template' available. Press RET."))) |
| 619 | (read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): "))) | 662 | (t (let* ((regexp (grep-read-regexp)) |
| 620 | (dir | 663 | (files (grep-read-files regexp))) |
| 621 | (read-directory-name "Base directory: " nil default-directory t))) | 664 | (list regexp files)))))) |
| 622 | (list regexp files dir))) | 665 | (when (and (stringp regexp) (> (length regexp) 0)) |
| 623 | (unless grep-tree-command | 666 | (let ((command regexp)) |
| 624 | (grep-compute-defaults)) | 667 | (if (null files) |
| 625 | (unless (and (stringp files) (> (length files) 0)) | 668 | (if (string= command grep-command) |
| 626 | (setq files grep-tree-last-files)) | 669 | (setq command nil)) |
| 627 | (when files | 670 | (setq command (grep-expand-template |
| 628 | (setq grep-tree-last-files files) | 671 | grep-template |
| 629 | (let ((mf (assoc files grep-tree-files-aliases))) | 672 | regexp |
| 630 | (if mf | 673 | files)) |
| 631 | (setq files (cdr mf))))) | 674 | (when command |
| 632 | (let ((command-args (grep-expand-command-macros | 675 | (if (equal current-prefix-arg '(4)) |
| 633 | grep-tree-command | 676 | (setq command |
| 634 | (setq grep-tree-last-regexp regexp) | 677 | (read-from-minibuffer "Confirm: " |
| 635 | (and files (concat "-name '" files "'")) | 678 | command nil nil 'grep-history)) |
| 636 | (if subdirs | 679 | (push command grep-history)))) |
| 637 | (if (stringp subdirs) | 680 | (when command |
| 638 | subdirs | 681 | ;; Setting process-setup-function makes exit-message-function work |
| 639 | (mapconcat 'identity subdirs " ")) | 682 | ;; even when async processes aren't supported. |
| 640 | nil) ;; we change default-directory to dir | 683 | (compilation-start (if (and grep-use-null-device null-device) |
| 641 | (and grep-tree-ignore-CVS-directories "-path '*/CVS' -prune -o ") | 684 | (concat command " " null-device) |
| 642 | grep-tree-ignore-case)) | 685 | command) 'grep-mode))))) |
| 643 | (default-directory (file-name-as-directory (expand-file-name dir))) | 686 | |
| 644 | (null-device nil)) ; see grep | 687 | |
| 645 | (grep command-args regexp))) | 688 | ;;;###autoload |
| 689 | (defun rgrep (regexp &optional files dir) | ||
| 690 | "Recusively grep for REGEXP in FILES in directory tree rooted at DIR. | ||
| 691 | The search is limited to file names matching shell pattern FILES. | ||
| 692 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | ||
| 693 | entering `ch' is equivalent to `*.[ch]'. | ||
| 694 | |||
| 695 | With \\[universal-argument] prefix, allow user to edit the constructed | ||
| 696 | shell command line before it is executed. | ||
| 697 | With two \\[universal-argument] prefixes, edit and run grep-find shell command. | ||
| 698 | |||
| 699 | Collect output in a buffer. While find runs asynchronously, you | ||
| 700 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] | ||
| 701 | in the grep output buffer, to go to the lines where grep found matches. | ||
| 702 | |||
| 703 | This command shares argument histories with \\[lgrep] and \\[grep-find]." | ||
| 704 | (interactive | ||
| 705 | (progn | ||
| 706 | (grep-compute-defaults) | ||
| 707 | (cond | ||
| 708 | ((and grep-find-command (equal current-prefix-arg '(16))) | ||
| 709 | (list (read-from-minibuffer "Run: " grep-find-command | ||
| 710 | nil nil 'grep-find-history) | ||
| 711 | nil)) | ||
| 712 | ((not grep-find-template) | ||
| 713 | (list nil nil | ||
| 714 | (read-string "grep.el: No `grep-find-template' available. Press RET."))) | ||
| 715 | (t (let* ((regexp (grep-read-regexp)) | ||
| 716 | (files (grep-read-files regexp)) | ||
| 717 | (dir (read-directory-name "Base directory: " | ||
| 718 | nil default-directory t))) | ||
| 719 | (list regexp files dir)))))) | ||
| 720 | (when (and (stringp regexp) (> (length regexp) 0)) | ||
| 721 | (if (null files) | ||
| 722 | (if (not (string= regexp grep-find-command)) | ||
| 723 | (compilation-start regexp 'grep-mode)) | ||
| 724 | (let* ((default-directory (file-name-as-directory (expand-file-name dir))) | ||
| 725 | (command (grep-expand-template | ||
| 726 | grep-find-template | ||
| 727 | regexp | ||
| 728 | (concat "\\( -name " | ||
| 729 | (mapconcat #'shell-quote-argument | ||
| 730 | (split-string files) | ||
| 731 | " -o -name ") | ||
| 732 | " \\)") | ||
| 733 | default-directory | ||
| 734 | (and grep-find-ignored-directories | ||
| 735 | (concat "\\( -path '*/" | ||
| 736 | (mapconcat #'identity | ||
| 737 | grep-find-ignored-directories | ||
| 738 | "' -o -path '*/") | ||
| 739 | "' \\) -prune -o "))))) | ||
| 740 | (when command | ||
| 741 | (if current-prefix-arg | ||
| 742 | (setq command | ||
| 743 | (read-from-minibuffer "Confirm: " | ||
| 744 | command nil nil 'grep-find-history)) | ||
| 745 | (push command grep-find-history)) | ||
| 746 | (compilation-start command 'grep-mode)))))) | ||
| 646 | 747 | ||
| 647 | 748 | ||
| 648 | (provide 'grep) | 749 | (provide 'grep) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 1549150dfa8..11259aa3965 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -303,13 +303,15 @@ Uses `gud-<MINOR-MODE>-directories' to find the source files." | |||
| 303 | optional doc string DOC. Certain %-escapes in the string arguments | 303 | optional doc string DOC. Certain %-escapes in the string arguments |
| 304 | are interpreted specially if present. These are: | 304 | are interpreted specially if present. These are: |
| 305 | 305 | ||
| 306 | %f name (without directory) of current source file. | 306 | %f -- Name (without directory) of current source file. |
| 307 | %F name (without directory or extension) of current source file. | 307 | %F -- Name (without directory or extension) of current source file. |
| 308 | %d directory of current source file. | 308 | %d -- Directory of current source file. |
| 309 | %l number of current source line | 309 | %l -- Number of current source line. |
| 310 | %e text of the C lvalue or function-call expression surrounding point. | 310 | %e -- Text of the C lvalue or function-call expression surrounding point. |
| 311 | %a text of the hexadecimal address surrounding point | 311 | %a -- Text of the hexadecimal address surrounding point. |
| 312 | %p prefix argument to the command (if any) as a number | 312 | %p -- Prefix argument to the command (if any) as a number. |
| 313 | %c -- Fully qualified class name derived from the expression | ||
| 314 | surrounding point (jdb only). | ||
| 313 | 315 | ||
| 314 | The `current' source file is the file of the current buffer (if | 316 | The `current' source file is the file of the current buffer (if |
| 315 | we're in a C file) or the source file current at the last break or | 317 | we're in a C file) or the source file current at the last break or |
| @@ -446,8 +448,7 @@ required by the caller." | |||
| 446 | (when (or gdb-force-update | 448 | (when (or gdb-force-update |
| 447 | (not (save-excursion | 449 | (not (save-excursion |
| 448 | (goto-char (point-min)) | 450 | (goto-char (point-min)) |
| 449 | (let ((case-fold-search t)) | 451 | (looking-at "Watch Expressions:")))) |
| 450 | (looking-at "Watch Expressions:"))))) | ||
| 451 | (erase-buffer) | 452 | (erase-buffer) |
| 452 | (insert "Watch Expressions:\n") | 453 | (insert "Watch Expressions:\n") |
| 453 | (if gdb-speedbar-auto-raise | 454 | (if gdb-speedbar-auto-raise |
| @@ -2804,7 +2805,9 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2804 | (let ((insource (not (eq (current-buffer) gud-comint-buffer))) | 2805 | (let ((insource (not (eq (current-buffer) gud-comint-buffer))) |
| 2805 | (frame (or gud-last-frame gud-last-last-frame)) | 2806 | (frame (or gud-last-frame gud-last-last-frame)) |
| 2806 | result) | 2807 | result) |
| 2807 | (while (and str (string-match "\\([^%]*\\)%\\([adeflpc]\\)" str)) | 2808 | (while (and str |
| 2809 | (let ((case-fold-search nil)) | ||
| 2810 | (string-match "\\([^%]*\\)%\\([adefFlpc]\\)" str))) | ||
| 2808 | (let ((key (string-to-char (match-string 2 str))) | 2811 | (let ((key (string-to-char (match-string 2 str))) |
| 2809 | subst) | 2812 | subst) |
| 2810 | (cond | 2813 | (cond |
diff --git a/lisp/replace.el b/lisp/replace.el index 3187bbbbd36..f1792b499fc 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1098,6 +1098,7 @@ See also `multi-occur'." | |||
| 1098 | (endpt nil) | 1098 | (endpt nil) |
| 1099 | (marker nil) | 1099 | (marker nil) |
| 1100 | (curstring "") | 1100 | (curstring "") |
| 1101 | (inhibit-field-text-motion t) | ||
| 1101 | (headerpt (with-current-buffer out-buf (point)))) | 1102 | (headerpt (with-current-buffer out-buf (point)))) |
| 1102 | (with-current-buffer buf | 1103 | (with-current-buffer buf |
| 1103 | (or coding | 1104 | (or coding |
diff --git a/lisp/reveal.el b/lisp/reveal.el index 4120f9331b3..84411f98658 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: outlines | 7 | ;; Keywords: outlines |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/simple.el b/lisp/simple.el index 99192d79ec0..bf620c2533d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1697,7 +1697,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.") | |||
| 1697 | ;; but we don't want to ask the question again. | 1697 | ;; but we don't want to ask the question again. |
| 1698 | (setq undo-extra-outer-limit (+ size 50000)) | 1698 | (setq undo-extra-outer-limit (+ size 50000)) |
| 1699 | (if (let (use-dialog-box track-mouse executing-kbd-macro ) | 1699 | (if (let (use-dialog-box track-mouse executing-kbd-macro ) |
| 1700 | (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " | 1700 | (yes-or-no-p (format "Buffer `%s' undo info is %d bytes long; discard it? " |
| 1701 | (buffer-name) size))) | 1701 | (buffer-name) size))) |
| 1702 | (progn (setq buffer-undo-list nil) | 1702 | (progn (setq buffer-undo-list nil) |
| 1703 | (setq undo-extra-outer-limit nil) | 1703 | (setq undo-extra-outer-limit nil) |
| @@ -1705,7 +1705,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.") | |||
| 1705 | nil)) | 1705 | nil)) |
| 1706 | (display-warning '(undo discard-info) | 1706 | (display-warning '(undo discard-info) |
| 1707 | (concat | 1707 | (concat |
| 1708 | (format "Buffer %s undo info was %d bytes long.\n" | 1708 | (format "Buffer `%s' undo info was %d bytes long.\n" |
| 1709 | (buffer-name) size) | 1709 | (buffer-name) size) |
| 1710 | "The undo info was discarded because it exceeded \ | 1710 | "The undo info was discarded because it exceeded \ |
| 1711 | `undo-outer-limit'. | 1711 | `undo-outer-limit'. |
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 9fddc4b1a05..8d9df188875 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, | 3 | ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, |
| 4 | ;; 2004, 2005, 2006 Free Software Foundation, Inc. | 4 | ;; 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | ;; Keywords: tools revision-control merge diff3 cvs conflict | 7 | ;; Keywords: tools revision-control merge diff3 cvs conflict |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/startup.el b/lisp/startup.el index 695cdf4410f..07039fa8c18 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1623,7 +1623,7 @@ normal otherwise." | |||
| 1623 | (not noninteractive)) | 1623 | (not noninteractive)) |
| 1624 | (display-warning | 1624 | (display-warning |
| 1625 | 'initialization | 1625 | 'initialization |
| 1626 | "Building Emacs overflowed pure space." | 1626 | "Building Emacs overflowed pure space. See \"(elisp)Building Emacs\" for more information." |
| 1627 | ;; FIXME: Tell the user what kind of problems are possible and how to fix | 1627 | ;; FIXME: Tell the user what kind of problems are possible and how to fix |
| 1628 | ;; the overflow. | 1628 | ;; the overflow. |
| 1629 | :warning)) | 1629 | :warning)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 6bd25f12dde..43f1d5e57b1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1262,25 +1262,25 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label." | |||
| 1262 | 1262 | ||
| 1263 | ;;; Load history | 1263 | ;;; Load history |
| 1264 | 1264 | ||
| 1265 | ;;; (defvar symbol-file-load-history-loaded nil | 1265 | ;; (defvar symbol-file-load-history-loaded nil |
| 1266 | ;;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. | 1266 | ;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. |
| 1267 | ;;; That file records the part of `load-history' for preloaded files, | 1267 | ;; That file records the part of `load-history' for preloaded files, |
| 1268 | ;;; which is cleared out before dumping to make Emacs smaller.") | 1268 | ;; which is cleared out before dumping to make Emacs smaller.") |
| 1269 | 1269 | ||
| 1270 | ;;; (defun load-symbol-file-load-history () | 1270 | ;; (defun load-symbol-file-load-history () |
| 1271 | ;;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done. | 1271 | ;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done. |
| 1272 | ;;; That file records the part of `load-history' for preloaded files, | 1272 | ;; That file records the part of `load-history' for preloaded files, |
| 1273 | ;;; which is cleared out before dumping to make Emacs smaller." | 1273 | ;; which is cleared out before dumping to make Emacs smaller." |
| 1274 | ;;; (unless symbol-file-load-history-loaded | 1274 | ;; (unless symbol-file-load-history-loaded |
| 1275 | ;;; (load (expand-file-name | 1275 | ;; (load (expand-file-name |
| 1276 | ;;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. | 1276 | ;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. |
| 1277 | ;;; (if (eq system-type 'ms-dos) | 1277 | ;; (if (eq system-type 'ms-dos) |
| 1278 | ;;; "fns.el" | 1278 | ;; "fns.el" |
| 1279 | ;;; (format "fns-%s.el" emacs-version)) | 1279 | ;; (format "fns-%s.el" emacs-version)) |
| 1280 | ;;; exec-directory) | 1280 | ;; exec-directory) |
| 1281 | ;;; ;; The file name fns-%s.el already has a .el extension. | 1281 | ;; ;; The file name fns-%s.el already has a .el extension. |
| 1282 | ;;; nil nil t) | 1282 | ;; nil nil t) |
| 1283 | ;;; (setq symbol-file-load-history-loaded t))) | 1283 | ;; (setq symbol-file-load-history-loaded t))) |
| 1284 | 1284 | ||
| 1285 | (defun symbol-file (symbol &optional type) | 1285 | (defun symbol-file (symbol &optional type) |
| 1286 | "Return the input source in which SYMBOL was defined. | 1286 | "Return the input source in which SYMBOL was defined. |
| @@ -1927,6 +1927,10 @@ a system-dependent default device name is used." | |||
| 1927 | Otherwise, return nil." | 1927 | Otherwise, return nil." |
| 1928 | (or (stringp object) (null object))) | 1928 | (or (stringp object) (null object))) |
| 1929 | 1929 | ||
| 1930 | (defun booleanp (object) | ||
| 1931 | "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil." | ||
| 1932 | (memq object '(nil t))) | ||
| 1933 | |||
| 1930 | 1934 | ||
| 1931 | ;;;; Support for yanking and text properties. | 1935 | ;;;; Support for yanking and text properties. |
| 1932 | 1936 | ||
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index ef5e8648b5c..4ab0606c18a 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1480,7 +1480,7 @@ in `selection-converter-alist', which see." | |||
| 1480 | (re-search-forward | 1480 | (re-search-forward |
| 1481 | (mapconcat 'regexp-quote (split-string search-text) "\\|") | 1481 | (mapconcat 'regexp-quote (split-string search-text) "\\|") |
| 1482 | nil t))))) | 1482 | nil t))))) |
| 1483 | (raise-frame)) | 1483 | (select-frame-set-input-focus (selected-frame))) |
| 1484 | 1484 | ||
| 1485 | (defun mac-ae-text (ae) | 1485 | (defun mac-ae-text (ae) |
| 1486 | (or (cdr (mac-ae-parameter ae nil "TEXT")) | 1486 | (or (cdr (mac-ae-parameter ae nil "TEXT")) |
| @@ -2039,9 +2039,10 @@ Switch to a buffer editing the last file dropped." | |||
| 2039 | (dolist (file-name (nth 2 event)) | 2039 | (dolist (file-name (nth 2 event)) |
| 2040 | (dnd-handle-one-url window 'private | 2040 | (dnd-handle-one-url window 'private |
| 2041 | (concat "file:" file-name)))) | 2041 | (concat "file:" file-name)))) |
| 2042 | (raise-frame)) | 2042 | (select-frame-set-input-focus (selected-frame))) |
| 2043 | 2043 | ||
| 2044 | (global-set-key [drag-n-drop] 'mac-drag-n-drop) | 2044 | (global-set-key [drag-n-drop] 'mac-drag-n-drop) |
| 2045 | (global-set-key [M-drag-n-drop] 'mac-drag-n-drop) | ||
| 2045 | 2046 | ||
| 2046 | ;;;; Non-toolkit Scroll bars | 2047 | ;;;; Non-toolkit Scroll bars |
| 2047 | 2048 | ||
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 545e9fe14b5..9218c565c97 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -48,7 +48,7 @@ A value of nil means that any change in indentation starts a new paragraph." | |||
| 48 | "*Non-nil means put two spaces after a colon when filling." | 48 | "*Non-nil means put two spaces after a colon when filling." |
| 49 | :type 'boolean | 49 | :type 'boolean |
| 50 | :group 'fill) | 50 | :group 'fill) |
| 51 | ;;;###autoload(put 'colon-double-space 'safe-local-variable 'symbolp) | 51 | ;;;###autoload(put 'colon-double-space 'safe-local-variable 'booleanp) |
| 52 | 52 | ||
| 53 | (defvar fill-paragraph-function nil | 53 | (defvar fill-paragraph-function nil |
| 54 | "Mode-specific function to fill a paragraph, or nil if there is none. | 54 | "Mode-specific function to fill a paragraph, or nil if there is none. |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 9e7d02182ef..aac4cee4dd7 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -81,7 +81,7 @@ to paragraphs. The fill functions insert and delete only soft newlines." | |||
| 81 | (set-hard-newline-properties (point) (1+ (point))))))))))) | 81 | (set-hard-newline-properties (point) (1+ (point))))))))))) |
| 82 | 82 | ||
| 83 | (defcustom paragraph-start "\f\\|[ \t]*$" "\ | 83 | (defcustom paragraph-start "\f\\|[ \t]*$" "\ |
| 84 | *Regexp for beginning of a line that starts OR separates paragraphs. | 84 | Regexp for beginning of a line that starts OR separates paragraphs. |
| 85 | This regexp should match lines that separate paragraphs | 85 | This regexp should match lines that separate paragraphs |
| 86 | and should also match lines that start a paragraph | 86 | and should also match lines that start a paragraph |
| 87 | \(and are part of that paragraph). | 87 | \(and are part of that paragraph). |
| @@ -107,7 +107,7 @@ hard newline are considered to match." | |||
| 107 | ;; start a new paragraph). | 107 | ;; start a new paragraph). |
| 108 | 108 | ||
| 109 | (defcustom paragraph-separate "[ \t\f]*$" | 109 | (defcustom paragraph-separate "[ \t\f]*$" |
| 110 | "*Regexp for beginning of a line that separates paragraphs. | 110 | "Regexp for beginning of a line that separates paragraphs. |
| 111 | If you change this, you may have to change `paragraph-start' also. | 111 | If you change this, you may have to change `paragraph-start' also. |
| 112 | 112 | ||
| 113 | This is matched against the text at the left margin, which is not necessarily | 113 | This is matched against the text at the left margin, which is not necessarily |
| @@ -119,7 +119,7 @@ text indented by a margin setting." | |||
| 119 | ;;;###autoload(put 'paragraph-separate 'safe-local-variable 'stringp) | 119 | ;;;###autoload(put 'paragraph-separate 'safe-local-variable 'stringp) |
| 120 | 120 | ||
| 121 | (defcustom sentence-end-double-space t | 121 | (defcustom sentence-end-double-space t |
| 122 | "*Non-nil means a single space does not end a sentence. | 122 | "Non-nil means a single space does not end a sentence. |
| 123 | This is relevant for filling. See also `sentence-end-without-period' | 123 | This is relevant for filling. See also `sentence-end-without-period' |
| 124 | and `colon-double-space'. | 124 | and `colon-double-space'. |
| 125 | 125 | ||
| @@ -128,10 +128,10 @@ regexp describing the end of a sentence, when the value of the variable | |||
| 128 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." | 128 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 129 | :type 'boolean | 129 | :type 'boolean |
| 130 | :group 'fill) | 130 | :group 'fill) |
| 131 | ;;;###autoload(put 'sentence-end-double-space 'safe-local-variable 'symbolp) | 131 | ;;;###autoload(put 'sentence-end-double-space 'safe-local-variable 'booleanp) |
| 132 | 132 | ||
| 133 | (defcustom sentence-end-without-period nil | 133 | (defcustom sentence-end-without-period nil |
| 134 | "*Non-nil means a sentence will end without a period. | 134 | "Non-nil means a sentence will end without a period. |
| 135 | For example, a sentence in Thai text ends with double space but | 135 | For example, a sentence in Thai text ends with double space but |
| 136 | without a period. | 136 | without a period. |
| 137 | 137 | ||
| @@ -140,21 +140,21 @@ regexp describing the end of a sentence, when the value of the variable | |||
| 140 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." | 140 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 141 | :type 'boolean | 141 | :type 'boolean |
| 142 | :group 'fill) | 142 | :group 'fill) |
| 143 | ;;;###autoload(put 'sentence-end-without-period 'safe-local-variable 'symbolp) | 143 | ;;;###autoload(put 'sentence-end-without-period 'safe-local-variable 'booleanp) |
| 144 | 144 | ||
| 145 | (defcustom sentence-end-without-space | 145 | (defcustom sentence-end-without-space |
| 146 | "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" | 146 | "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" |
| 147 | "*String of characters that end sentence without following spaces. | 147 | "String of characters that end sentence without following spaces. |
| 148 | 148 | ||
| 149 | This value is used by the function `sentence-end' to construct the | 149 | This value is used by the function `sentence-end' to construct the |
| 150 | regexp describing the end of a sentence, when the value of the variable | 150 | regexp describing the end of a sentence, when the value of the variable |
| 151 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." | 151 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 152 | :group 'paragraphs | 152 | :group 'paragraphs |
| 153 | :type 'string) | 153 | :type 'string) |
| 154 | ;;;###autoload(put 'sentence-end-without-space 'safe-local-variable 'symbolp) | 154 | ;;;###autoload(put 'sentence-end-without-space 'safe-local-variable 'stringp) |
| 155 | 155 | ||
| 156 | (defcustom sentence-end nil | 156 | (defcustom sentence-end nil |
| 157 | "*Regexp describing the end of a sentence. | 157 | "Regexp describing the end of a sentence. |
| 158 | The value includes the whitespace following the sentence. | 158 | The value includes the whitespace following the sentence. |
| 159 | All paragraph boundaries also end sentences, regardless. | 159 | All paragraph boundaries also end sentences, regardless. |
| 160 | 160 | ||
| @@ -166,7 +166,7 @@ to obtain the value of this variable." | |||
| 166 | ;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p) | 166 | ;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p) |
| 167 | 167 | ||
| 168 | (defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*" | 168 | (defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*" |
| 169 | "*Regexp matching the basic end of a sentence, not including following space." | 169 | "Regexp matching the basic end of a sentence, not including following space." |
| 170 | :group 'paragraphs | 170 | :group 'paragraphs |
| 171 | :type 'string | 171 | :type 'string |
| 172 | :version "22.1") | 172 | :version "22.1") |
| @@ -195,17 +195,17 @@ in between. See Info node `(elisp)Standard Regexps'." | |||
| 195 | "[ \t\n]*"))) | 195 | "[ \t\n]*"))) |
| 196 | 196 | ||
| 197 | (defcustom page-delimiter "^\014" | 197 | (defcustom page-delimiter "^\014" |
| 198 | "*Regexp describing line-beginnings that separate pages." | 198 | "Regexp describing line-beginnings that separate pages." |
| 199 | :group 'paragraphs | 199 | :group 'paragraphs |
| 200 | :type 'regexp) | 200 | :type 'regexp) |
| 201 | ;;;###autoload(put 'page-delimiter 'safe-local-variable 'stringp) | 201 | ;;;###autoload(put 'page-delimiter 'safe-local-variable 'stringp) |
| 202 | 202 | ||
| 203 | (defcustom paragraph-ignore-fill-prefix nil | 203 | (defcustom paragraph-ignore-fill-prefix nil |
| 204 | "*Non-nil means the paragraph commands are not affected by `fill-prefix'. | 204 | "Non-nil means the paragraph commands are not affected by `fill-prefix'. |
| 205 | This is desirable in modes where blank lines are the paragraph delimiters." | 205 | This is desirable in modes where blank lines are the paragraph delimiters." |
| 206 | :group 'paragraphs | 206 | :group 'paragraphs |
| 207 | :type 'boolean) | 207 | :type 'boolean) |
| 208 | ;;;###autoload(put 'paragraph-ignore-fill-prefix 'safe-local-variable 'symbolp) | 208 | ;;;###autoload(put 'paragraph-ignore-fill-prefix 'safe-local-variable 'booleanp) |
| 209 | 209 | ||
| 210 | (defun forward-paragraph (&optional arg) | 210 | (defun forward-paragraph (&optional arg) |
| 211 | "Move forward to end of paragraph. | 211 | "Move forward to end of paragraph. |
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 026336c301e..f4334fbbd70 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -975,7 +975,7 @@ immediately offer the correct label menu - otherwise it will prompt you for | |||
| 975 | a label type. If you set this variable to nil, RefTeX will always prompt." | 975 | a label type. If you set this variable to nil, RefTeX will always prompt." |
| 976 | :group 'reftex-referencing-labels | 976 | :group 'reftex-referencing-labels |
| 977 | :type 'boolean) | 977 | :type 'boolean) |
| 978 | ;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable 'symbolp) | 978 | ;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable (lambda (x) (memq x '(nil t)))) |
| 979 | 979 | ||
| 980 | (defcustom reftex-format-ref-function nil | 980 | (defcustom reftex-format-ref-function nil |
| 981 | "Function which produces the string to insert as a reference. | 981 | "Function which produces the string to insert as a reference. |
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 023b90af5d9..e58114e5b26 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el | |||
| @@ -269,21 +269,26 @@ holds a keymap." | |||
| 269 | 269 | ||
| 270 | ;; There's no icon appropriate for News and we need a command rather | 270 | ;; There's no icon appropriate for News and we need a command rather |
| 271 | ;; than a lambda for Read Mail. | 271 | ;; than a lambda for Read Mail. |
| 272 | ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") | 272 | ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") |
| 273 | 273 | ||
| 274 | (tool-bar-add-item-from-menu 'print-buffer "print") | 274 | (tool-bar-add-item-from-menu 'print-buffer "print") |
| 275 | (tool-bar-add-item "preferences" 'customize 'customize | ||
| 276 | :help "Edit preferences (customize)") | ||
| 277 | 275 | ||
| 278 | (tool-bar-add-item "help" (lambda () | 276 | ;; tool-bar-add-item-from-menu itself operates on |
| 279 | (interactive) | 277 | ;; (default-value 'tool-bar-map), but when we don't use that function, |
| 280 | (popup-menu menu-bar-help-menu)) | 278 | ;; we must explicitly operate on the default value. |
| 281 | 'help | ||
| 282 | :help "Pop up the Help menu") | ||
| 283 | 279 | ||
| 284 | (setq tool-bar-setup t)))) | 280 | (let ((tool-bar-map (default-value 'tool-bar-map))) |
| 281 | (tool-bar-add-item "preferences" 'customize 'customize | ||
| 282 | :help "Edit preferences (customize)") | ||
| 283 | |||
| 284 | (tool-bar-add-item "help" (lambda () | ||
| 285 | (interactive) | ||
| 286 | (popup-menu menu-bar-help-menu)) | ||
| 287 | 'help | ||
| 288 | :help "Pop up the Help menu")) | ||
| 289 | (setq tool-bar-setup t)))) | ||
| 285 | 290 | ||
| 286 | (provide 'tool-bar) | ||
| 287 | 291 | ||
| 292 | (provide 'tool-bar) | ||
| 288 | ;;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f | 293 | ;;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f |
| 289 | ;;; tool-bar.el ends here | 294 | ;;; tool-bar.el ends here |