diff options
98 files changed, 1867 insertions, 1239 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * configure.in (s390x-*-linux-gnu*): New configuration. | ||
| 4 | |||
| 1 | 2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 5 | 2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * configure.in: Require GTK 2.4 or newer. | 7 | * configure.in: Require GTK 2.4 or newer. |
diff --git a/configure.in b/configure.in index d86b55afa4b..9f286f290e5 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -654,6 +654,9 @@ dnl see the `changequote' comment above. | |||
| 654 | s390-*-linux-gnu* ) | 654 | s390-*-linux-gnu* ) |
| 655 | machine=ibms390 opsys=gnu-linux | 655 | machine=ibms390 opsys=gnu-linux |
| 656 | ;; | 656 | ;; |
| 657 | s390x-*-linux-gnu* ) | ||
| 658 | machine=ibms390x opsys=gnu-linux | ||
| 659 | ;; | ||
| 657 | rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) | 660 | rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) |
| 658 | machine=ibmrs6000 opsys=aix3-1 | 661 | machine=ibmrs6000 opsys=aix3-1 |
| 659 | ;; | 662 | ;; |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 382a97ab50a..565b2d3e220 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2006-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * NEWS: Changes in handling of file local variables. | ||
| 4 | |||
| 5 | 2006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 6 | |||
| 7 | * NEWS: Gtk+ 2.4 is required. | ||
| 8 | |||
| 1 | 2006-02-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 9 | 2006-02-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 10 | ||
| 3 | * PROBLEMS (Mac OS X): Add QuickTime 7.0.4 / Mac OS X 10.3.9 breakage. | 11 | * PROBLEMS (Mac OS X): Add QuickTime 7.0.4 / Mac OS X 10.3.9 breakage. |
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index eee5589ad8d..ada1d02785d 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS | |||
| @@ -1,5 +1,41 @@ | |||
| 1 | ERC NEWS -*- outline -*- | 1 | ERC NEWS -*- outline -*- |
| 2 | 2 | ||
| 3 | * Changes in ERC 5.1.2 (unreleased) | ||
| 4 | |||
| 5 | ** Fix compiler errors in erc-autojoin.el and erc-dcc.el. | ||
| 6 | |||
| 7 | ** Move to end of prompt when ERC reconnects to a server. | ||
| 8 | |||
| 9 | ** Changes and additions to modules | ||
| 10 | |||
| 11 | *** Spell-checking (erc-spelling.el) | ||
| 12 | |||
| 13 | **** Don't spell-check nicks or words that are prefixed with '/'. | ||
| 14 | |||
| 15 | **** Remove flyspell properties from words we shouldn't spell-check. | ||
| 16 | |||
| 17 | **** Fix an issue that caused the ispell process to reload every time | ||
| 18 | we switch to an ERC buffer. | ||
| 19 | |||
| 20 | *** Timestamps (erc-stamp.el) | ||
| 21 | |||
| 22 | **** Fix an inconsistency in calculating width of right timestamps. | ||
| 23 | |||
| 24 | **** Rename option `erc-timestamp-right-align-by-pixel' to | ||
| 25 | `erc-timestamp-use-align-to'. This controls whether to use the more | ||
| 26 | fail-proof method of aligning right timestamps, as mentioned below. | ||
| 27 | |||
| 28 | **** Fix a right timestamp spacing problem that used to occur when | ||
| 29 | erc-stamp.el was byte-compiled. Now that this is fixed, it is safe to | ||
| 30 | use the method that aligns right timestamps perfectly in Emacs22 with | ||
| 31 | X. If the current version of Emacs doesn't support this method, use | ||
| 32 | the simpler method, which is prone to alignment issues for math | ||
| 33 | symbols and other variable-width text. | ||
| 34 | |||
| 35 | A side effect of using this new method is that there will only be one | ||
| 36 | space before a right timestamp in any saved logs. If this is | ||
| 37 | unacceptable, set `erc-timestamp-use-align-to' to nil. | ||
| 38 | |||
| 3 | * Changes in ERC 5.1.1 | 39 | * Changes in ERC 5.1.1 |
| 4 | 40 | ||
| 5 | ** Fix a requirement on cl.el. | 41 | ** Fix a requirement on cl.el. |
| @@ -27,7 +27,7 @@ installed programs. | |||
| 27 | 27 | ||
| 28 | --- | 28 | --- |
| 29 | ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' | 29 | ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' |
| 30 | when you run configure. This requires Gtk+ 2.0 or newer. This port | 30 | when you run configure. This requires Gtk+ 2.4 or newer. This port |
| 31 | provides a way to display multilingual text in menus (with some caveats). | 31 | provides a way to display multilingual text in menus (with some caveats). |
| 32 | 32 | ||
| 33 | --- | 33 | --- |
| @@ -575,6 +575,21 @@ is only rarely needed. | |||
| 575 | suffix from every line before processing all the lines. | 575 | suffix from every line before processing all the lines. |
| 576 | 576 | ||
| 577 | +++ | 577 | +++ |
| 578 | *** If the local variables list contains any variable-value pairs that | ||
| 579 | are not known to be safe, Emacs shows a prompt asking whether to apply | ||
| 580 | the local variables list as a whole. In earlier versions, a prompt | ||
| 581 | was only issued for variables explicitly marked as risky (for the | ||
| 582 | definition of risky variables, see `risky-local-variable-p'). | ||
| 583 | |||
| 584 | At the prompt, the user can choose to save the contents of this local | ||
| 585 | variables list to `safe-local-variable-values'. This new customizable | ||
| 586 | option is a list of variable-value pairs that are known to be safe. | ||
| 587 | Variables can also be marked as safe with the existing | ||
| 588 | `safe-local-variable' property (see `safe-local-variable-p'). | ||
| 589 | However, risky variables will not be added to | ||
| 590 | `safe-local-variable-values' in this way. | ||
| 591 | |||
| 592 | +++ | ||
| 578 | *** find-file-read-only visits multiple files in read-only mode, | 593 | *** find-file-read-only visits multiple files in read-only mode, |
| 579 | when the file name contains wildcard characters. | 594 | when the file name contains wildcard characters. |
| 580 | 595 | ||
| @@ -942,7 +957,7 @@ to explicitly specify a fontSet resource for this to work, for example | |||
| 942 | ESC, like they do for Gtk+, Mac and W32. | 957 | ESC, like they do for Gtk+, Mac and W32. |
| 943 | 958 | ||
| 944 | +++ | 959 | +++ |
| 945 | *** For Gtk+ version 2.4, you can make Emacs use the old file dialog | 960 | *** For the Gtk+ version, you can make Emacs use the old file dialog |
| 946 | by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use | 961 | by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use |
| 947 | the new dialog. | 962 | the new dialog. |
| 948 | 963 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ddd50210928..670f6db6282 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,229 @@ | |||
| 1 | 2006-02-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * calendar/icalendar.el (icalendar--get-event-property) | ||
| 4 | (icalendar--get-event-property-attributes): Fix typos in | ||
| 5 | docstrings. | ||
| 6 | |||
| 7 | * progmodes/flymake.el (flymake-fix-file-name): Fix typo in | ||
| 8 | docstring. | ||
| 9 | |||
| 10 | 2006-02-15 Juanma Barranquero <lekktu@gmail.com> | ||
| 11 | |||
| 12 | * bs.el (bs-mode): Use `buffer-disable-undo'. | ||
| 13 | (bs--get-file-name): Simplify. | ||
| 14 | (bs-show-in-buffer): Mark the buffer as not modified. | ||
| 15 | |||
| 16 | 2006-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 17 | |||
| 18 | * wid-edit.el (widget-keymap): Bind down-mouse-1 to | ||
| 19 | widget-button-click. | ||
| 20 | |||
| 21 | * cus-edit.el (custom-mode-map): Remove mouse-1 binding. | ||
| 22 | (custom-mode): Update docstring. | ||
| 23 | |||
| 24 | * cus-theme.el (custom-new-theme-mode-map): Remove mouse-1 | ||
| 25 | binding. | ||
| 26 | |||
| 27 | * files.el (hack-local-variables-confirm): Allow scrolling if the | ||
| 28 | file variable list is too long. Kill temp buffer after use. | ||
| 29 | |||
| 30 | 2006-02-15 Nick Roberts <nickrob@snap.net.nz> | ||
| 31 | |||
| 32 | * progmodes/gud.el (gdb): Improve doc string. | ||
| 33 | (gdb-script-font-lock-keywords): Expand allowed character set. | ||
| 34 | |||
| 35 | * progmodes/gdb-ui.el (gdb-use-separate-io-buffer) | ||
| 36 | (gdb-display-separate-io-buffer, gdb-frame-separate-io-buffer) | ||
| 37 | (gdb-separate-io-interrupt, gdb-separate-io-quit) | ||
| 38 | (gdb-separate-io-stop, gdb-separate-io-eof): | ||
| 39 | Rename from gdb-inferior-* to gdb-separate-*. | ||
| 40 | (gdb-set-gud-minor-mode-existing-buffers-1): Improve doc string. | ||
| 41 | |||
| 42 | 2006-02-14 Jay Belanger <belanger@truman.edu> | ||
| 43 | |||
| 44 | * calc/calc-arith.el (math-check-known-scalarp): Make sure | ||
| 45 | expression is a symbol before checking that it is bound. | ||
| 46 | |||
| 47 | * calc/calcalg2.el (math-integrate-by-parts): Do a more careful | ||
| 48 | test to see if equation can be solved. | ||
| 49 | |||
| 50 | 2006-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 51 | |||
| 52 | * wid-edit.el (widget-button-click): Use :pressed-face property | ||
| 53 | for overlay face, if it exists. | ||
| 54 | |||
| 55 | * cus-edit.el (custom-manual, custom-add-see-also) | ||
| 56 | (custom-add-parent-links, custom-group-link): Add :pressed-face | ||
| 57 | property to links. | ||
| 58 | |||
| 59 | * files.el (hack-local-variables): Remove ignored variables before | ||
| 60 | checking if any variables need setting. | ||
| 61 | |||
| 62 | 2006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 63 | |||
| 64 | * cus-start.el (all): Add x-gtk-whole-detached-tool-bar. | ||
| 65 | |||
| 66 | 2006-02-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 67 | |||
| 68 | * help.el (where-is): Fix message for remapped commands. | ||
| 69 | |||
| 70 | * mwheel.el (mouse-wheel-click-event, mouse-wheel-mode): | ||
| 71 | Fix typos in docstrings. | ||
| 72 | |||
| 73 | 2006-02-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 74 | |||
| 75 | * files.el (safe-local-variable-values): New option. | ||
| 76 | (hack-local-variables-prop-line): Return a list of variable-value | ||
| 77 | pairs if MODE-ONLY is non-nil. | ||
| 78 | (hack-local-variables): Construct list of variable-value pairs, | ||
| 79 | and apply or reject them in one go. Ask for confirmation if | ||
| 80 | variables are not known safe. | ||
| 81 | (hack-local-variables-confirm): Complete rewrite. Support | ||
| 82 | `safe-local-variable-values'. | ||
| 83 | (enable-local-variables): Update docstring to reflect new | ||
| 84 | behavior. | ||
| 85 | (ignored-local-variables): Ignore ignored-local-variables and | ||
| 86 | safe-local-variable-values. | ||
| 87 | (safe-local-variable-p): New function. | ||
| 88 | (risky-local-variable-p): `safe-local-variable' property check | ||
| 89 | moved to safe-local-variable-p. | ||
| 90 | (hack-one-local-variable): Checks moved to hack-local-variables. | ||
| 91 | |||
| 92 | (byte-compile-dynamic, c-basic-offset, c-file-style) | ||
| 93 | (c-indent-level, comment-column, fill-column, fill-prefix) | ||
| 94 | (indent-tabs-mode, kept-new-versions, no-byte-compile) | ||
| 95 | (no-update-autoloads, outline-regexp, page-delimiter) | ||
| 96 | (paragraph-start, paragraph-separate, sentence-end) | ||
| 97 | (sentence-end-double-space tab-width, version-control): | ||
| 98 | Add `safe-local-variable' property. | ||
| 99 | |||
| 100 | * find-lisp.el: Delete nonexistent `autocompile' file variable. | ||
| 101 | |||
| 102 | * icomplete.el, play/landmark.el: Change nonexistent | ||
| 103 | `outline-layout' file variable to `allout-layout'. | ||
| 104 | |||
| 105 | 2006-02-14 Nick Roberts <nickrob@snap.net.nz> | ||
| 106 | |||
| 107 | * progmodes/gdb-ui.el (gud-watch, gdb-invalidate-registers-1) | ||
| 108 | (gdb-get-changed-registers): Test value of gud-minor-mode relative | ||
| 109 | to gud-comint-buffer. | ||
| 110 | (gdb-speedbar-expand-node, gdb-locals-mode): Use functions in | ||
| 111 | gdb-ui.el for gdb-mi.el. | ||
| 112 | (gdb-post-prompt, gdb-get-changed-registers): Move test for | ||
| 113 | registers buffer to gdb-get-changed-registers. | ||
| 114 | (gdb-breakpoint-regexp): New regexp. Allow toggling and | ||
| 115 | deletion of catchpoints (throw and catch). | ||
| 116 | (gdb-toggle-breakpoint, gdb-delete-breakpoint) | ||
| 117 | (gdb-goto-breakpoint): Use it for both gdb-ui and gdb-mi. | ||
| 118 | (gdb-find-file-hook, gdb-set-gud-minor-mode-existing-buffers-1) | ||
| 119 | (gdb-var-list-children-1, gdb-info-breakpoints-custom) | ||
| 120 | (gdb-var-update-1, gdb-invalidate-locals-1): Use also for gdb-mi. | ||
| 121 | |||
| 122 | 2006-02-13 Jay Belanger <belanger@truman.edu> | ||
| 123 | |||
| 124 | * calc/calc-arith.el (math-check-known-matrixp): Make sure | ||
| 125 | expression is a symbol before checking that it is bound. | ||
| 126 | |||
| 127 | 2006-02-13 Richard M. Stallman <rms@gnu.org> | ||
| 128 | |||
| 129 | * mouse.el (mouse-drag-mode-line-1): Use mouse-drag-move-window-bottom | ||
| 130 | for the minibuffer too, but not if resize-mini-windows will interfere. | ||
| 131 | |||
| 132 | * help.el (describe-key-briefly, describe-key): Do all arg-reading | ||
| 133 | inside `interactive' spec. | ||
| 134 | (describe-key-briefly-internal, describe-key-internal): | ||
| 135 | Functions merged back into their callers. | ||
| 136 | |||
| 137 | 2006-02-13 Martin Rudalics <rudalics@gmx.at> (tiny change) | ||
| 138 | |||
| 139 | * info.el (info-xref-visited): Inherit from info-xref too. | ||
| 140 | (Info-set-mode-line): Replace occurrences of `%' by `%%' | ||
| 141 | when propertizing Info-current-file and Info-current-node. | ||
| 142 | |||
| 143 | 2006-02-13 Juri Linkov <juri@jurta.org> | ||
| 144 | |||
| 145 | * tumme.el (tumme-thumbnail-storage): Fix docstring. | ||
| 146 | (tumme-thumb-name): Fix per-directory format. | ||
| 147 | |||
| 148 | 2006-02-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 149 | |||
| 150 | * subr.el (substitute-key-definition): Doc fix (hide internal arg). | ||
| 151 | |||
| 152 | 2006-02-12 Miles Bader <miles@gnu.org> | ||
| 153 | |||
| 154 | * net/rcirc.el (rcirc-format-response-string): Fix small bugs. | ||
| 155 | |||
| 156 | 2006-02-13 Mathias Dahl <mathias.dahl@gmail.com> | ||
| 157 | |||
| 158 | * tumme.el: Remove history section. If someone needs the it, it | ||
| 159 | can always be found in CVS. | ||
| 160 | |||
| 161 | 2006-02-12 Mathias Dahl <mathias.dahl@gmail.com> | ||
| 162 | |||
| 163 | * tumme.el (tumme-thumbnail-storage): Update docstring. Add info | ||
| 164 | about the Thumbnail Managing Standard option. | ||
| 165 | |||
| 166 | 2006-02-12 Richard M. Stallman <rms@gnu.org> | ||
| 167 | |||
| 168 | * subr.el (substitute-key-definition): Doc fix. | ||
| 169 | |||
| 170 | * simple.el (blink-matching-paren-dont-ignore-comments): Doc fix. | ||
| 171 | |||
| 172 | * files.el (magic-mode-alist): Don't use `\\s ' in regexps. | ||
| 173 | |||
| 174 | * info.el (Info-mode): Doc fix. | ||
| 175 | |||
| 176 | * progmodes/ebrowse.el (ebrowse-global-prefix-key): Change to C-c C-m. | ||
| 177 | |||
| 178 | 2006-02-12 Michael Albinus <michael.albinus@gmx.de> | ||
| 179 | |||
| 180 | * net/tramp.el (tramp-remote-path): Add "/usr/xpg4/bin" on top, | ||
| 181 | because on Solaris a POSIX compatible "id" is needed. Reported by | ||
| 182 | Magnus Henoch <mange@freemail.hu>. | ||
| 183 | |||
| 184 | 2006-02-12 Juri Linkov <juri@jurta.org> | ||
| 185 | |||
| 186 | * tumme.el: Remove todo item about Thumbnail Managing Standard. | ||
| 187 | (tumme) <defgroup>: Change :group to `multimedia'. | ||
| 188 | (tumme-thumbnail-storage): Add choice `standard' for Thumbnail | ||
| 189 | Managing Standard. | ||
| 190 | (tumme-cmd-create-thumbnail-options): Use %w and %h instead of %s. | ||
| 191 | Fix dostring. | ||
| 192 | (tumme-cmd-create-temp-image-options): Use %w and %h instead of %x | ||
| 193 | and %y. Fix docstring. | ||
| 194 | (tumme-cmd-pngnq-program, tumme-cmd-pngcrush-program) | ||
| 195 | (tumme-cmd-create-standard-thumbnail-command): New user options. | ||
| 196 | (tumme-thumb-size): Set default to 128 if tumme-thumbnail-storage | ||
| 197 | is `standard'. Fix docstring. | ||
| 198 | (tumme-thumb-width, tumme-thumb-height): New user options. | ||
| 199 | (tumme-external-viewer): Try to find various viewers. | ||
| 200 | (tumme-get-thumbnail-image): Use `create-image' instead of | ||
| 201 | constructing the `image' structure. | ||
| 202 | (tumme-insert-thumbnail): Use `png' if tumme-thumbnail-storage is | ||
| 203 | `standard'. | ||
| 204 | (tumme-thumb-name): Add file name generation for standard storage. | ||
| 205 | Simplify code for other storages. | ||
| 206 | (tumme-thumb-name): Use width %w and height %h instead of size %s. | ||
| 207 | Add modification time %m and thumbnail-nq8 %q. | ||
| 208 | Use `tumme-cmd-create-standard-thumbnail-command' if | ||
| 209 | tumme-thumbnail-storage is `standard'. | ||
| 210 | (tumme-dired-insert-marked-thumbs): New autoload command. | ||
| 211 | (tumme-dired-after-readin-hook): New function. | ||
| 212 | (tumme-line-up-dynamic): Use `tumme-thumb-width' instead of | ||
| 213 | `tumme-thumb-size'. | ||
| 214 | (tumme-display-image): Replace size-x %x and size-y %y with | ||
| 215 | width %w and height %h. | ||
| 216 | |||
| 217 | * dired.el (dired-mode-map): Bind `\C-t\C-t' to | ||
| 218 | `tumme-dired-insert-marked-thumbs'. | ||
| 219 | |||
| 220 | 2006-02-12 Mathias Dahl <mathias.dahl@gmail.com> | ||
| 221 | |||
| 222 | * tumme.el (tumme-write-tag): Fix small bug (file name did not | ||
| 223 | include path). | ||
| 224 | (tumme-mark-tagged-files): Fix bug in regexp used to find rows | ||
| 225 | matching tag. | ||
| 226 | |||
| 1 | 2006-02-12 Miles Bader <miles@gnu.org> | 227 | 2006-02-12 Miles Bader <miles@gnu.org> |
| 2 | 228 | ||
| 3 | * net/rcirc.el (rcirc-nick-abbrevs, rcirc-response-formats): | 229 | * net/rcirc.el (rcirc-nick-abbrevs, rcirc-response-formats): |
| @@ -13,19 +239,19 @@ | |||
| 13 | 239 | ||
| 14 | 2006-02-11 Mathias Dahl <brakjoller@hotmail.com> | 240 | 2006-02-11 Mathias Dahl <brakjoller@hotmail.com> |
| 15 | 241 | ||
| 16 | * tumme.el: Enhanced some docstrings. Added todo item about | 242 | * tumme.el: Enhance some docstrings. Add todo item about Thumbnail |
| 17 | Thumbnail Managing Standard. | 243 | Managing Standard. |
| 18 | 244 | ||
| 19 | 2006-02-11 Kim F. Storm <storm@cua.dk> | 245 | 2006-02-11 Kim F. Storm <storm@cua.dk> |
| 20 | 246 | ||
| 21 | * ido.el (ido-buffer-internal): Set mark for ido-insert-buffer. | 247 | * ido.el (ido-buffer-internal): Set mark for ido-insert-buffer. |
| 22 | Don't use insert-buffer; do insert-buffer-substring directly. | 248 | Don't use insert-buffer; do insert-buffer-substring directly. |
| 23 | (ido-file-internal): Set mark for ido-insert-file. Use insert-file-1. | 249 | (ido-file-internal): Set mark for ido-insert-file. Use insert-file-1. |
| 24 | 250 | ||
| 25 | 2006-02-11 Martin Rudalics <rudalics@gmx.at> | 251 | 2006-02-11 Martin Rudalics <rudalics@gmx.at> |
| 26 | 252 | ||
| 27 | * files.el (revert-buffer, recover-file): Replace buffer-read-only | 253 | * files.el (revert-buffer, recover-file): Replace buffer-read-only |
| 28 | with inhibit-read-only. Suggested by Stefan Monnier. | 254 | with inhibit-read-only. Suggested by Stefan Monnier. |
| 29 | (revert-buffer): Let insert-file-contents discard | 255 | (revert-buffer): Let insert-file-contents discard |
| 30 | buffer-undo-list. Simplify code. | 256 | buffer-undo-list. Simplify code. |
| 31 | (find-file, find-file-existing, revert-buffer): Doc-string fixes. | 257 | (find-file, find-file-existing, revert-buffer): Doc-string fixes. |
| @@ -54,9 +280,8 @@ | |||
| 54 | 280 | ||
| 55 | 2006-02-11 Mathias Dahl <brakjoller@hotmail.com> | 281 | 2006-02-11 Mathias Dahl <brakjoller@hotmail.com> |
| 56 | 282 | ||
| 57 | * tumme.el (tumme-dir): Changed default value to | 283 | * tumme.el (tumme-dir): Change default value to "~/.emacs.d/tumme/". |
| 58 | "~/.emacs-d/tumme" | 284 | (tumme-dir): New function. Copied from thumbs.el. |
| 59 | (tumme-dir): New function. Copied from thumbs.el. | ||
| 60 | 285 | ||
| 61 | 2006-02-10 Juanma Barranquero <lekktu@gmail.com> | 286 | 2006-02-10 Juanma Barranquero <lekktu@gmail.com> |
| 62 | 287 | ||
| @@ -79,12 +304,12 @@ | |||
| 79 | 304 | ||
| 80 | 2006-02-10 Mathias Dahl <mathias.dahl@gmail.com> | 305 | 2006-02-10 Mathias Dahl <mathias.dahl@gmail.com> |
| 81 | 306 | ||
| 82 | * tumme.el (tumme-copy-with-exif-file-name): Tried to make | 307 | * tumme.el (tumme-copy-with-exif-file-name): Try to make docstring |
| 83 | docstring less `colloquial'... | 308 | less `colloquial'... |
| 84 | 309 | ||
| 85 | 2006-02-09 Mathias Dahl <mathias.dahl@gmail.com> | 310 | 2006-02-09 Mathias Dahl <mathias.dahl@gmail.com> |
| 86 | 311 | ||
| 87 | * tumme.el: Added a couple of todo items. | 312 | * tumme.el: Add a couple of todo items. |
| 88 | 313 | ||
| 89 | 2006-02-09 Lars Hansen <larsh@soem.dk> | 314 | 2006-02-09 Lars Hansen <larsh@soem.dk> |
| 90 | 315 | ||
diff --git a/lisp/bs.el b/lisp/bs.el index a1dfad6ac7a..f095a98dc00 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -652,6 +652,7 @@ to show always. | |||
| 652 | (use-local-map bs-mode-map) | 652 | (use-local-map bs-mode-map) |
| 653 | (make-local-variable 'font-lock-defaults) | 653 | (make-local-variable 'font-lock-defaults) |
| 654 | (make-local-variable 'font-lock-verbose) | 654 | (make-local-variable 'font-lock-verbose) |
| 655 | (buffer-disable-undo) | ||
| 655 | (setq major-mode 'bs-mode | 656 | (setq major-mode 'bs-mode |
| 656 | mode-name "Buffer-Selection-Menu" | 657 | mode-name "Buffer-Selection-Menu" |
| 657 | buffer-read-only t | 658 | buffer-read-only t |
| @@ -1164,7 +1165,8 @@ and move point to current buffer." | |||
| 1164 | (bs--set-window-height) | 1165 | (bs--set-window-height) |
| 1165 | (bs--goto-current-buffer) | 1166 | (bs--goto-current-buffer) |
| 1166 | (font-lock-fontify-buffer) | 1167 | (font-lock-fontify-buffer) |
| 1167 | (bs-apply-sort-faces))) | 1168 | (bs-apply-sort-faces) |
| 1169 | (set-buffer-modified-p nil))) | ||
| 1168 | 1170 | ||
| 1169 | (defun bs-next-buffer (&optional buffer-list sorting-p) | 1171 | (defun bs-next-buffer (&optional buffer-list sorting-p) |
| 1170 | "Return next buffer and buffer list for buffer cycling in BUFFER-LIST. | 1172 | "Return next buffer and buffer list for buffer cycling in BUFFER-LIST. |
| @@ -1338,16 +1340,11 @@ If current mode is `dired-mode' or `shell-mode' it returns the | |||
| 1338 | default directory. | 1340 | default directory. |
| 1339 | START-BUFFER is the buffer where we started buffer selection. | 1341 | START-BUFFER is the buffer where we started buffer selection. |
| 1340 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." | 1342 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." |
| 1341 | (let ((string (copy-sequence (if (member major-mode | 1343 | (propertize (if (member major-mode '(shell-mode dired-mode)) |
| 1342 | '(shell-mode dired-mode)) | 1344 | default-directory |
| 1343 | default-directory | 1345 | (or buffer-file-name "")) |
| 1344 | (or buffer-file-name ""))))) | 1346 | 'mouse-face 'highlight |
| 1345 | (add-text-properties | 1347 | 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame")) |
| 1346 | 0 (length string) | ||
| 1347 | '(mouse-face highlight | ||
| 1348 | help-echo "mouse-2: select this buffer, mouse-3: select in other frame") | ||
| 1349 | string) | ||
| 1350 | string)) | ||
| 1351 | 1348 | ||
| 1352 | (defun bs--insert-one-entry (buffer) | 1349 | (defun bs--insert-one-entry (buffer) |
| 1353 | "Generate one entry for buffer BUFFER in Buffer Selection Menu. | 1350 | "Generate one entry for buffer BUFFER in Buffer Selection Menu. |
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 2372b0ebbfb..ec09ae29318 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el | |||
| @@ -334,6 +334,7 @@ | |||
| 334 | ((memq 'scalar (nth 1 decl)) | 334 | ((memq 'scalar (nth 1 decl)) |
| 335 | t) | 335 | t) |
| 336 | ((and (eq (car a) 'var) | 336 | ((and (eq (car a) 'var) |
| 337 | (symbolp (nth 2 a)) | ||
| 337 | (boundp (nth 2 a)) | 338 | (boundp (nth 2 a)) |
| 338 | (setq val (symbol-value (nth 2 a)))) | 339 | (setq val (symbol-value (nth 2 a)))) |
| 339 | (math-check-known-scalarp val)) | 340 | (math-check-known-scalarp val)) |
| @@ -362,6 +363,7 @@ | |||
| 362 | ((memq 'matrix (nth 1 decl)) | 363 | ((memq 'matrix (nth 1 decl)) |
| 363 | t) | 364 | t) |
| 364 | ((and (eq (car a) 'var) | 365 | ((and (eq (car a) 'var) |
| 366 | (symbolp (nth 2 a)) | ||
| 365 | (boundp (nth 2 a)) | 367 | (boundp (nth 2 a)) |
| 366 | (setq val (symbol-value (nth 2 a)))) | 368 | (setq val (symbol-value (nth 2 a)))) |
| 367 | (math-check-known-matrixp val)) | 369 | (math-check-known-matrixp val)) |
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index facb691c08b..f71e58e223a 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el | |||
| @@ -1253,9 +1253,11 @@ | |||
| 1253 | (calcFunc-expand temp) | 1253 | (calcFunc-expand temp) |
| 1254 | (setq v (list 'var 'PARTS math-cur-record) | 1254 | (setq v (list 'var 'PARTS math-cur-record) |
| 1255 | temp (let (calc-next-why) | 1255 | temp (let (calc-next-why) |
| 1256 | (math-solve-for (math-sub v temp) 0 v nil))) | 1256 | (math-simplify-extended |
| 1257 | (and temp (not (integerp temp)) | 1257 | (math-solve-for (math-sub v temp) 0 v nil))) |
| 1258 | (math-simplify-extended temp))))) | 1258 | temp (if (and (eq (car-safe temp) '/) |
| 1259 | (math-zerop (nth 2 temp))) | ||
| 1260 | nil temp))))) | ||
| 1259 | (setcar (cdr math-cur-record) 'busy))))) | 1261 | (setcar (cdr math-cur-record) 'busy))))) |
| 1260 | 1262 | ||
| 1261 | ;;; This tries two different formulations, hoping the algebraic simplifier | 1263 | ;;; This tries two different formulations, hoping the algebraic simplifier |
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index e1d513ce680..b900d4c57f3 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el | |||
| @@ -293,7 +293,7 @@ it finds" | |||
| 293 | ;; (car (cddr event))) | 293 | ;; (car (cddr event))) |
| 294 | 294 | ||
| 295 | (defun icalendar--get-event-property (event prop) | 295 | (defun icalendar--get-event-property (event prop) |
| 296 | "For the given EVENT return the value of the first occurence of PROP." | 296 | "For the given EVENT return the value of the first occurrence of PROP." |
| 297 | (catch 'found | 297 | (catch 'found |
| 298 | (let ((props (car (cddr event))) pp) | 298 | (let ((props (car (cddr event))) pp) |
| 299 | (while props | 299 | (while props |
| @@ -304,7 +304,7 @@ it finds" | |||
| 304 | nil)) | 304 | nil)) |
| 305 | 305 | ||
| 306 | (defun icalendar--get-event-property-attributes (event prop) | 306 | (defun icalendar--get-event-property-attributes (event prop) |
| 307 | "For the given EVENT return attributes of the first occurence of PROP." | 307 | "For the given EVENT return attributes of the first occurrence of PROP." |
| 308 | (catch 'found | 308 | (catch 'found |
| 309 | (let ((props (car (cddr event))) pp) | 309 | (let ((props (car (cddr event))) pp) |
| 310 | (while props | 310 | (while props |
| @@ -705,7 +705,7 @@ would be \"pm\"." | |||
| 705 | "Export diary file to iCalendar format. | 705 | "Export diary file to iCalendar format. |
| 706 | All diary entries in the file DIARY-FILENAME are converted to iCalendar | 706 | All diary entries in the file DIARY-FILENAME are converted to iCalendar |
| 707 | format. The result is appended to the file ICAL-FILENAME." | 707 | format. The result is appended to the file ICAL-FILENAME." |
| 708 | (interactive "FExport diary data from file: | 708 | (interactive "FExport diary data from file: |
| 709 | Finto iCalendar file: ") | 709 | Finto iCalendar file: ") |
| 710 | (save-current-buffer | 710 | (save-current-buffer |
| 711 | (set-buffer (find-file diary-filename)) | 711 | (set-buffer (find-file diary-filename)) |
| @@ -1449,8 +1449,8 @@ Argument ICAL-FILENAME output iCalendar file. | |||
| 1449 | Argument DIARY-FILENAME input `diary-file'. | 1449 | Argument DIARY-FILENAME input `diary-file'. |
| 1450 | Optional argument NON-MARKING determines whether events are created as | 1450 | Optional argument NON-MARKING determines whether events are created as |
| 1451 | non-marking or not." | 1451 | non-marking or not." |
| 1452 | (interactive "fImport iCalendar data from file: | 1452 | (interactive "fImport iCalendar data from file: |
| 1453 | Finto diary file: | 1453 | Finto diary file: |
| 1454 | p") | 1454 | p") |
| 1455 | ;; clean up the diary file | 1455 | ;; clean up the diary file |
| 1456 | (save-current-buffer | 1456 | (save-current-buffer |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 763b4b8c57f..3d06bd0fcae 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1720,6 +1720,7 @@ item in another window.\n\n")) | |||
| 1720 | :help-echo "Read the manual entry for this option." | 1720 | :help-echo "Read the manual entry for this option." |
| 1721 | :button-face 'custom-link | 1721 | :button-face 'custom-link |
| 1722 | :mouse-face 'highlight | 1722 | :mouse-face 'highlight |
| 1723 | :pressed-face 'highlight | ||
| 1723 | :tag "Manual") | 1724 | :tag "Manual") |
| 1724 | 1725 | ||
| 1725 | ;;; The `custom-magic' Widget. | 1726 | ;;; The `custom-magic' Widget. |
| @@ -2201,7 +2202,8 @@ Insert PREFIX first if non-nil." | |||
| 2201 | (push (widget-create-child-and-convert | 2202 | (push (widget-create-child-and-convert |
| 2202 | widget (car links) | 2203 | widget (car links) |
| 2203 | :button-face 'custom-link | 2204 | :button-face 'custom-link |
| 2204 | :mouse-face 'highlight) | 2205 | :mouse-face 'highlight |
| 2206 | :pressed-face 'highlight) | ||
| 2205 | buttons) | 2207 | buttons) |
| 2206 | (setq links (cdr links)) | 2208 | (setq links (cdr links)) |
| 2207 | (cond ((null links) | 2209 | (cond ((null links) |
| @@ -2247,7 +2249,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | |||
| 2247 | (push (widget-create-child-and-convert | 2249 | (push (widget-create-child-and-convert |
| 2248 | widget (car links) | 2250 | widget (car links) |
| 2249 | :button-face 'custom-link | 2251 | :button-face 'custom-link |
| 2250 | :mouse-face 'highlight) | 2252 | :mouse-face 'highlight |
| 2253 | :pressed-face 'highlight) | ||
| 2251 | buttons) | 2254 | buttons) |
| 2252 | (setq links (cdr links)) | 2255 | (setq links (cdr links)) |
| 2253 | (cond ((null links) | 2256 | (cond ((null links) |
| @@ -3590,6 +3593,7 @@ restoring it to the state of a face that has never been customized." | |||
| 3590 | "Show parent in other window when activated." | 3593 | "Show parent in other window when activated." |
| 3591 | :button-face 'custom-link | 3594 | :button-face 'custom-link |
| 3592 | :mouse-face 'highlight | 3595 | :mouse-face 'highlight |
| 3596 | :pressed-face 'highlight | ||
| 3593 | :help-echo "Create customization buffer for this group." | 3597 | :help-echo "Create customization buffer for this group." |
| 3594 | :action 'custom-group-link-action) | 3598 | :action 'custom-group-link-action) |
| 3595 | 3599 | ||
| @@ -4365,7 +4369,6 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4365 | (define-key map "u" 'Custom-goto-parent) | 4369 | (define-key map "u" 'Custom-goto-parent) |
| 4366 | (define-key map "n" 'widget-forward) | 4370 | (define-key map "n" 'widget-forward) |
| 4367 | (define-key map "p" 'widget-backward) | 4371 | (define-key map "p" 'widget-backward) |
| 4368 | (define-key map [mouse-1] 'widget-move-and-invoke) | ||
| 4369 | map) | 4372 | map) |
| 4370 | "Keymap for `custom-mode'.") | 4373 | "Keymap for `custom-mode'.") |
| 4371 | 4374 | ||
| @@ -4421,7 +4424,7 @@ Move to previous button, link or editable field. \\[advertised-widget-backward] | |||
| 4421 | \\<custom-field-keymap>\ | 4424 | \\<custom-field-keymap>\ |
| 4422 | Complete content of editable text field. \\[widget-complete] | 4425 | Complete content of editable text field. \\[widget-complete] |
| 4423 | \\<custom-mode-map>\ | 4426 | \\<custom-mode-map>\ |
| 4424 | Invoke button under the mouse pointer. \\[widget-move-and-invoke] | 4427 | Invoke button under the mouse pointer. \\[widget-button-click] |
| 4425 | Invoke button under point. \\[widget-button-press] | 4428 | Invoke button under point. \\[widget-button-press] |
| 4426 | Set all options from current text. \\[Custom-set] | 4429 | Set all options from current text. \\[Custom-set] |
| 4427 | Make values in current text permanent. \\[Custom-save] | 4430 | Make values in current text permanent. \\[Custom-save] |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index eaf700774df..5b4686754f0 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -359,6 +359,7 @@ since it could result in memory overflow and make Emacs crash." | |||
| 359 | (repeat (directory :format "%v"))) | 359 | (repeat (directory :format "%v"))) |
| 360 | (x-use-old-gtk-file-dialog menu boolean "22.1") | 360 | (x-use-old-gtk-file-dialog menu boolean "22.1") |
| 361 | (x-gtk-show-hidden-files menu boolean "22.1") | 361 | (x-gtk-show-hidden-files menu boolean "22.1") |
| 362 | (x-gtk-whole-detached-tool-bar x boolean "22.1") | ||
| 362 | ;; xterm.c | 363 | ;; xterm.c |
| 363 | (mouse-autoselect-window display boolean "21.3") | 364 | (mouse-autoselect-window display boolean "21.3") |
| 364 | (x-use-underline-position-properties display boolean "21.3") | 365 | (x-use-underline-position-properties display boolean "21.3") |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 3a89c6a664e..53f530505ae 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -38,7 +38,6 @@ | |||
| 38 | (suppress-keymap map) | 38 | (suppress-keymap map) |
| 39 | (define-key map "n" 'widget-forward) | 39 | (define-key map "n" 'widget-forward) |
| 40 | (define-key map "p" 'widget-backward) | 40 | (define-key map "p" 'widget-backward) |
| 41 | (define-key map [mouse-1] 'widget-move-and-invoke) | ||
| 42 | map) | 41 | map) |
| 43 | "Keymap for `custom-new-theme-mode'.") | 42 | "Keymap for `custom-new-theme-mode'.") |
| 44 | 43 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index 8433432ff09..3bcb45e06c0 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1258,6 +1258,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1258 | (define-key map "\C-t." 'tumme-display-thumb) | 1258 | (define-key map "\C-t." 'tumme-display-thumb) |
| 1259 | (define-key map "\C-tc" 'tumme-dired-comment-files) | 1259 | (define-key map "\C-tc" 'tumme-dired-comment-files) |
| 1260 | (define-key map "\C-tf" 'tumme-mark-tagged-files) | 1260 | (define-key map "\C-tf" 'tumme-mark-tagged-files) |
| 1261 | (define-key map "\C-t\C-t" 'tumme-dired-insert-marked-thumbs) | ||
| 1261 | 1262 | ||
| 1262 | ;; Make menu bar items. | 1263 | ;; Make menu bar items. |
| 1263 | 1264 | ||
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 50b37eb044f..ec2098c7bd3 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,97 @@ | |||
| 1 | 2006-02-15 Michael Olson <mwolson@gnu.org> | ||
| 2 | |||
| 3 | * erc.el (erc): Move to the end of the buffer when a continued | ||
| 4 | session is detected. Thanks to e1f and indio for the report and | ||
| 5 | testing a potential fix. | ||
| 6 | |||
| 7 | 2006-02-14 Michael Olson <mwolson@gnu.org> | ||
| 8 | |||
| 9 | * debian/changelog: Prepare a new Debian package. | ||
| 10 | |||
| 11 | * Makefile (debprepare): New rule that creates an ERC snapshot | ||
| 12 | directory for use in both new Debian releases and revisions for | ||
| 13 | Debian packages. | ||
| 14 | (debrelease, debrevision-mwolson): Use debprepare. | ||
| 15 | |||
| 16 | * NEWS: Bring up-to-date. | ||
| 17 | |||
| 18 | * erc-stamp.el (erc-insert-timestamp-right): For now, put | ||
| 19 | timestamps before rather than after erc-fill-column when | ||
| 20 | erc-timestamp-right-column is nil. This way we won't surprise | ||
| 21 | anyone unpleasantly, or so it is hoped. | ||
| 22 | |||
| 23 | 2006-02-13 Michael Olson <mwolson@gnu.org> | ||
| 24 | |||
| 25 | * erc-dcc.el: Use (eval-when-compile (require 'cl)). | ||
| 26 | |||
| 27 | 2006-02-12 Michael Olson <mwolson@gnu.org> | ||
| 28 | |||
| 29 | * erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el, | ||
| 30 | erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el, | ||
| 31 | erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el, | ||
| 32 | erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el, | ||
| 33 | erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el, | ||
| 34 | erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el, | ||
| 35 | erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el: Add | ||
| 36 | 2006 to copyright years, to comply with the changed guidelines. | ||
| 37 | |||
| 38 | 2006-02-11 Michael Olson <mwolson@gnu.org> | ||
| 39 | |||
| 40 | * erc.el (erc-update-modules): Make some requirements shorter, so | ||
| 41 | that it's easier to see why they are needed. | ||
| 42 | |||
| 43 | * erc-stamp.el (erc-timestamp-use-align-to): Renamed from | ||
| 44 | `erc-timestamp-right-align-by-pixel'. Set the default based on | ||
| 45 | whether we are in Emacs 22, and using X. Improve documentation. | ||
| 46 | (erc-insert-aligned): Remove calculation of offset, since | ||
| 47 | :align-to pos works after all. Unlike the previous solution, this | ||
| 48 | one works when erc-stamp.el is compiled. | ||
| 49 | (erc-insert-timestamp-right): Don't add length of string, and then | ||
| 50 | later remove its displayed width. This puts timestamps after | ||
| 51 | erc-fill-column when erc-timestamp-right-column is nil, rather | ||
| 52 | than before it. It also fixes a subtle bug. Remove use of | ||
| 53 | `current-window', since there is no variable by that name in | ||
| 54 | Emacs21, Emacs22, or XEmacs21 beta. Check to see whether | ||
| 55 | `erc-fill-column' is non-nil before using it. | ||
| 56 | |||
| 57 | 2006-02-11 Diane Murray <disumu@x3y2z1.net> | ||
| 58 | |||
| 59 | * erc-list.el: Define `list' module which sets the alias | ||
| 60 | `erc-cmd-LIST' to `erc-list-channels' when enabled and | ||
| 61 | `erc-list-channels-simple' when disabled. | ||
| 62 | (erc-list-channels): Was `erc-cmd-LIST', renamed. | ||
| 63 | (erc-list-channels-simple): New function. | ||
| 64 | |||
| 65 | * erc.el (erc-modules): Added `list' to enabled modules. Moved | ||
| 66 | customization options left in source code. | ||
| 67 | |||
| 68 | * erc-menu.el (erc-menu-definition): Use `erc-list-channels'. | ||
| 69 | |||
| 70 | * erc-spelling.el (define-erc-module): Make sure there's a buffer | ||
| 71 | before calling `with-current-buffer'. | ||
| 72 | |||
| 73 | 2006-02-10 Michael Olson <mwolson@gnu.org> | ||
| 74 | |||
| 75 | * Makefile (debbuild): Split from debrelease. | ||
| 76 | (debrevision-mwolson): New rule that causes a Debian revision to | ||
| 77 | be built. | ||
| 78 | |||
| 79 | * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to | ||
| 80 | Johan Bockgård. | ||
| 81 | (erc-modules): Change use of 'pcomplete to 'completion. | ||
| 82 | |||
| 83 | 2006-02-09 Diane Murray <disumu@x3y2z1.net> | ||
| 84 | |||
| 85 | * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) | ||
| 86 | (erc-get-parsed-vector-type): Moved here from erc-match.el. | ||
| 87 | |||
| 88 | * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) | ||
| 89 | (erc-get-parsed-vector-type): Moved these functions to erc.el | ||
| 90 | since they can be useful outside of the text matching module. | ||
| 91 | |||
| 92 | * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client" | ||
| 93 | to "ERC". | ||
| 94 | |||
| 1 | 2006-02-07 Michael Olson <mwolson@gnu.org> | 95 | 2006-02-07 Michael Olson <mwolson@gnu.org> |
| 2 | 96 | ||
| 3 | * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04, | 97 | * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04, |
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el index 41c16b82cb1..56713cba8bf 100644 --- a/lisp/erc/erc-autoaway.el +++ b/lisp/erc/erc-autoaway.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-autoaway.el --- Provides autoaway for ERC | 1 | ;;; erc-autoaway.el --- Provides autoaway for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> | 5 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> |
| 6 | ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway | 6 | ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway |
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index d5789a51708..4b9172f06d7 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-dcc.el --- CTCP DCC module for ERC | 1 | ;;; erc-dcc.el --- CTCP DCC module for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004 | 3 | ;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2006 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu> | 6 | ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu> |
| @@ -29,7 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Commentary: | 30 | ;;; Commentary: |
| 31 | 31 | ||
| 32 | ;; This file provides Direct Client-to-Client support for the Emacs IRC Client. | 32 | ;; This file provides Direct Client-to-Client support for ERC. |
| 33 | ;; | 33 | ;; |
| 34 | ;; The original code was taken from zenirc-dcc.el, heavily mangled and | 34 | ;; The original code was taken from zenirc-dcc.el, heavily mangled and |
| 35 | ;; rewritten to support the way how ERC operates. Server socket support | 35 | ;; rewritten to support the way how ERC operates. Server socket support |
| @@ -55,7 +55,8 @@ | |||
| 55 | 55 | ||
| 56 | (require 'erc) | 56 | (require 'erc) |
| 57 | (eval-when-compile | 57 | (eval-when-compile |
| 58 | (require 'pcomplete)) | 58 | (require 'cl) |
| 59 | (require 'pcomplete)) | ||
| 59 | 60 | ||
| 60 | (defgroup erc-dcc nil | 61 | (defgroup erc-dcc nil |
| 61 | "DCC stands for Direct Client Communication, where you and your | 62 | "DCC stands for Direct Client Communication, where you and your |
diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el index 59e80b60b8d..48395bf1dab 100644 --- a/lisp/erc/erc-ezbounce.el +++ b/lisp/erc/erc-ezbounce.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-ezbounce.el --- Handle EZBounce bouncer commands | 1 | ;;; erc-ezbounce.el --- Handle EZBounce bouncer commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andreas Fuchs <asf@void.at> | 5 | ;; Author: Andreas Fuchs <asf@void.at> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index f945d838c2a..6a5f80f7fd8 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-fill.el --- Filling IRC messages in various ways | 1 | ;;; erc-fill.el --- Filling IRC messages in various ways |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andreas Fuchs <asf@void.at> | 5 | ;; Author: Andreas Fuchs <asf@void.at> |
| 6 | ;; Mario Lang <mlang@delysid.org> | 6 | ;; Mario Lang <mlang@delysid.org> |
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index c844af55594..f6d32ee7c06 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;; erc-goodies.el --- Collection of ERC modules | 1 | ;; erc-goodies.el --- Collection of ERC modules |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> | 6 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> |
| 6 | 7 | ||
diff --git a/lisp/erc/erc-hecomplete.el b/lisp/erc/erc-hecomplete.el index 763d75c8fc7..85a81569782 100644 --- a/lisp/erc/erc-hecomplete.el +++ b/lisp/erc/erc-hecomplete.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-hecomplete.el --- Provides Nick name completion for ERC | 1 | ;;; erc-hecomplete.el --- Provides Nick name completion for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion | 6 | ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion |
diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el index a122908ed2c..7ca843d115c 100644 --- a/lisp/erc/erc-ibuffer.el +++ b/lisp/erc/erc-ibuffer.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-ibuffer.el --- ibuffer integration with ERC | 1 | ;;; erc-ibuffer.el --- ibuffer integration with ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el index 5cb179c7e22..e0ccfb40497 100644 --- a/lisp/erc/erc-identd.el +++ b/lisp/erc/erc-identd.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-identd.el --- RFC1413 (identd authentication protocol) server | 1 | ;;; erc-identd.el --- RFC1413 (identd authentication protocol) server |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 6 | ;; Keywords: comm, processes | 6 | ;; Keywords: comm, processes |
diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el index c64c9c04723..88de1cedf6e 100644 --- a/lisp/erc/erc-imenu.el +++ b/lisp/erc/erc-imenu.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-imenu.el -- Imenu support for ERC | 1 | ;;; erc-imenu.el -- Imenu support for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index da41ea77374..0d2c1f98706 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-join.el --- autojoin channels on connect and reconnects | 1 | ;;; erc-join.el --- autojoin channels on connect and reconnects |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Keywords: irc | 6 | ;; Keywords: irc |
diff --git a/lisp/erc/erc-lang.el b/lisp/erc/erc-lang.el index 20c89a8b0b6..04cfbe9e220 100644 --- a/lisp/erc/erc-lang.el +++ b/lisp/erc/erc-lang.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-lang.el --- provide the LANG command to ERC | 1 | ;;; erc-lang.el --- provide the LANG command to ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Maintainer: Alex Schroeder <alex@gnu.org> | 6 | ;; Maintainer: Alex Schroeder <alex@gnu.org> |
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el index 9bc561523d9..c041842429e 100644 --- a/lisp/erc/erc-list.el +++ b/lisp/erc/erc-list.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-list.el --- Provide a faster channel listing mechanism | 1 | ;;; erc-list.el --- Provide a faster channel listing mechanism |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | ;; Copyright (C) 2004 Brian Palmer | 4 | ;; Copyright (C) 2004 Brian Palmer |
| 5 | 5 | ||
| 6 | ;; Author: Mario Lang <mlang@lexx.delysid.org> | 6 | ;; Author: Mario Lang <mlang@lexx.delysid.org> |
| @@ -140,12 +140,19 @@ display the channel list." | |||
| 140 | (setq truncate-lines t) | 140 | (setq truncate-lines t) |
| 141 | (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local)) | 141 | (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local)) |
| 142 | 142 | ||
| 143 | ;; Define module: | ||
| 144 | ;;;###autoload (autoload 'erc-list-mode "erc-list") | ||
| 145 | (define-erc-module list nil | ||
| 146 | "List channels nicely in a separate buffer." | ||
| 147 | ((defalias 'erc-cmd-LIST 'erc-list-channels)) | ||
| 148 | ((defalias 'erc-cmd-LIST 'erc-list-channels-simple))) | ||
| 149 | |||
| 143 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 150 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 144 | ;; Functions. | 151 | ;; Functions. |
| 145 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 152 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 146 | 153 | ||
| 147 | ;;;###autoload | 154 | ;;;###autoload |
| 148 | (defun erc-cmd-LIST (&rest channel) | 155 | (defun erc-list-channels (&rest channel) |
| 149 | "Display a buffer containing a list of channels on the current server. | 156 | "Display a buffer containing a list of channels on the current server. |
| 150 | Optional argument CHANNEL specifies a single channel to list (instead of every | 157 | Optional argument CHANNEL specifies a single channel to list (instead of every |
| 151 | available channel)." | 158 | available channel)." |
| @@ -163,6 +170,18 @@ available channel)." | |||
| 163 | (erc-chanlist channel)) | 170 | (erc-chanlist channel)) |
| 164 | t) | 171 | t) |
| 165 | 172 | ||
| 173 | (defun erc-list-channels-simple (&optional line) | ||
| 174 | "Send the LIST command to the current server with optional channels LINE." | ||
| 175 | (when (string-match "^\\s-*\\(.*\\)$" line) | ||
| 176 | (let ((channels (match-string 1 line))) | ||
| 177 | (erc-log (format "cmd: LIST: %s" channels)) | ||
| 178 | (erc-server-send | ||
| 179 | (if (string= channels "") | ||
| 180 | "LIST" | ||
| 181 | (concat "LIST :" channels)))) | ||
| 182 | t)) | ||
| 183 | (put 'erc-list-channels-simple 'do-not-parse-args t) | ||
| 184 | |||
| 166 | ;;;###autoload | 185 | ;;;###autoload |
| 167 | (defun erc-chanlist (&optional channels) | 186 | (defun erc-chanlist (&optional channels) |
| 168 | "Show a channel listing of the current server in a special mode. | 187 | "Show a channel listing of the current server in a special mode. |
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index d4e6e5ad3fa..db60e5629bf 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-log.el --- Logging facilities for ERC. | 1 | ;;; erc-log.el --- Logging facilities for ERC. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Lawrence Mitchell <wence@gmx.li> | 5 | ;; Author: Lawrence Mitchell <wence@gmx.li> |
| 6 | ;; Keywords: IRC, chat, client, Internet, logging | 6 | ;; Keywords: IRC, chat, client, Internet, logging |
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index a5e3bf88ccf..88c6d4c425d 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-match.el --- Highlight messages matching certain regexps | 1 | ;;; erc-match.el --- Highlight messages matching certain regexps |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andreas Fuchs <asf@void.at> | 5 | ;; Author: Andreas Fuchs <asf@void.at> |
| 6 | ;; Keywords: comm, faces | 6 | ;; Keywords: comm, faces |
| @@ -428,24 +428,6 @@ In any of the following situations, MSG is directed at an entry FOOL: | |||
| 428 | (or (erc-list-match fools-beg msg) | 428 | (or (erc-list-match fools-beg msg) |
| 429 | (erc-list-match fools-end msg)))) | 429 | (erc-list-match fools-end msg)))) |
| 430 | 430 | ||
| 431 | (defun erc-get-parsed-vector (point) | ||
| 432 | "Return the whole parsed vector on POINT." | ||
| 433 | (get-text-property point 'erc-parsed)) | ||
| 434 | |||
| 435 | (defun erc-get-parsed-vector-nick (vect) | ||
| 436 | "Return nickname in the parsed vector VECT." | ||
| 437 | (let* ((untreated-nick (and vect (erc-response.sender vect))) | ||
| 438 | (maybe-nick (when untreated-nick | ||
| 439 | (car (split-string untreated-nick "!"))))) | ||
| 440 | (when (and (not (null maybe-nick)) | ||
| 441 | (erc-is-valid-nick-p maybe-nick)) | ||
| 442 | untreated-nick))) | ||
| 443 | |||
| 444 | (defun erc-get-parsed-vector-type (vect) | ||
| 445 | "Return message type in the parsed vector VECT." | ||
| 446 | (and vect | ||
| 447 | (erc-response.command vect))) | ||
| 448 | |||
| 449 | (defun erc-match-message () | 431 | (defun erc-match-message () |
| 450 | "Mark certain keywords in a region. | 432 | "Mark certain keywords in a region. |
| 451 | Use this defun with `erc-insert-modify-hook'." | 433 | Use this defun with `erc-insert-modify-hook'." |
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el index 8e1f81adf75..7040a7baeee 100644 --- a/lisp/erc/erc-menu.el +++ b/lisp/erc/erc-menu.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; erc-menu.el -- Menu-bar definitions for ERC | 1 | ;; erc-menu.el -- Menu-bar definitions for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm, processes, menu | 6 | ;; Keywords: comm, processes, menu |
| @@ -36,8 +36,8 @@ | |||
| 36 | ["Connect to server..." erc-select t] | 36 | ["Connect to server..." erc-select t] |
| 37 | ["Disconnect from server..." erc-quit-server erc-server-connected] | 37 | ["Disconnect from server..." erc-quit-server erc-server-connected] |
| 38 | "-" | 38 | "-" |
| 39 | ["List channels..." erc-cmd-LIST | 39 | ["List channels..." erc-list-channels |
| 40 | (and erc-server-connected (fboundp 'erc-cmd-LIST))] | 40 | (and erc-server-connected (fboundp 'erc-list-channels))] |
| 41 | ["Join channel..." erc-join-channel erc-server-connected] | 41 | ["Join channel..." erc-join-channel erc-server-connected] |
| 42 | ["Start a query..." erc-cmd-QUERY erc-server-connected] | 42 | ["Start a query..." erc-cmd-QUERY erc-server-connected] |
| 43 | "-" | 43 | "-" |
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 70ec2f2fc0d..a982b5e7c7e 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits | 1 | ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index b79a56a359c..c15f72e248f 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-networks.el --- IRC networks | 1 | ;;; erc-networks.el --- IRC networks |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@lexx.delysid.org> | 5 | ;; Author: Mario Lang <mlang@lexx.delysid.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 1d2bdbd5f45..bb1c9cdceb3 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-notify.el --- Online status change notification | 1 | ;;; erc-notify.el --- Online status change notification |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@lexx.delysid.org> | 5 | ;; Author: Mario Lang <mlang@lexx.delysid.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index d8e677031e3..4c6b86bd564 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; erc-page.el - CTCP PAGE support for ERC | 1 | ;; erc-page.el - CTCP PAGE support for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2004 Free Software Foundation | 3 | ;; Copyright (C) 2002, 2004, 2006 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index 110704304e2..d6d4dfdd3b3 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-pcomplete.el --- Provides programmable completion for ERC | 1 | ;;; erc-pcomplete.el --- Provides programmable completion for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Sacha Chua <sacha@free.net.ph> | 5 | ;; Author: Sacha Chua <sacha@free.net.ph> |
| 6 | ;; Keywords: comm, convenience | 6 | ;; Keywords: comm, convenience |
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index 07e8cd16138..06d3ca77f06 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; erc-replace.el -- wash and massage messages inserted into the buffer | 1 | ;; erc-replace.el -- wash and massage messages inserted into the buffer |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andreas Fuchs <asf@void.at> | 5 | ;; Author: Andreas Fuchs <asf@void.at> |
| 6 | ;; Maintainer: Mario Lang (mlang@delysid.org) | 6 | ;; Maintainer: Mario Lang (mlang@delysid.org) |
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index cabb8e2905f..87707e65faa 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; erc-ring.el -- Command history handling for erc using ring.el | 1 | ;; erc-ring.el -- Command history handling for erc using ring.el |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Keywords: comm | 6 | ;; Keywords: comm |
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 676948752fd..c8bac7fe45c 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-services.el --- Identify to NickServ | 1 | ;;; erc-services.el --- Identify to NickServ |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el index c5b0f8177f2..bbcddafc231 100644 --- a/lisp/erc/erc-sound.el +++ b/lisp/erc/erc-sound.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-sound.el --- CTCP SOUND support for ERC | 1 | ;;; erc-sound.el --- CTCP SOUND support for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index 254d7fc5781..55e24782f77 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-speedbar.el --- Speedbar support for ERC | 1 | ;;; erc-speedbar.el --- Speedbar support for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Contributor: Eric M. Ludlam <eric@siege-engine.com> | 6 | ;; Contributor: Eric M. Ludlam <eric@siege-engine.com> |
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el index 41e342c0e50..3cbc786274d 100644 --- a/lisp/erc/erc-spelling.el +++ b/lisp/erc/erc-spelling.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-spelling.el --- use flyspell in ERC | 1 | ;;; erc-spelling.el --- use flyspell in ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> | 5 | ;; Author: Jorgen Schaefer <forcer@forcix.cx> |
| 6 | ;; Keywords: irc | 6 | ;; Keywords: irc |
| @@ -41,11 +41,13 @@ | |||
| 41 | ;; called AFTER the server buffer is initialized. | 41 | ;; called AFTER the server buffer is initialized. |
| 42 | ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) | 42 | ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) |
| 43 | (mapc (lambda (buffer) | 43 | (mapc (lambda (buffer) |
| 44 | (with-current-buffer buffer (erc-spelling-init))) | 44 | (when buffer |
| 45 | (with-current-buffer buffer (erc-spelling-init)))) | ||
| 45 | (erc-buffer-list))) | 46 | (erc-buffer-list))) |
| 46 | ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) | 47 | ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) |
| 47 | (mapc (lambda (buffer) | 48 | (mapc (lambda (buffer) |
| 48 | (with-current-buffer buffer (flyspell-mode 0))) | 49 | (when buffer |
| 50 | (with-current-buffer buffer (flyspell-mode 0)))) | ||
| 49 | (erc-buffer-list)))) | 51 | (erc-buffer-list)))) |
| 50 | 52 | ||
| 51 | (defcustom erc-spelling-dictionaries nil | 53 | (defcustom erc-spelling-dictionaries nil |
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index ead847ff73f..5d43baab6c9 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-stamp.el --- Timestamping for Emacs IRC CLient | 1 | ;;; erc-stamp.el --- Timestamping for ERC messages |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -180,11 +180,17 @@ the correct column." | |||
| 180 | (integer :tag "Column number") | 180 | (integer :tag "Column number") |
| 181 | (const :tag "Unspecified" nil))) | 181 | (const :tag "Unspecified" nil))) |
| 182 | 182 | ||
| 183 | (defcustom erc-timestamp-right-align-by-pixel nil | 183 | (defcustom erc-timestamp-use-align-to (and (not (featurep 'xemacs)) |
| 184 | "*If non-nil, insert the right timestamp based on a pixel value. | 184 | (>= emacs-major-version 22) |
| 185 | This is needed when variable-width text precedes a timestamp. | 185 | (eq window-system 'x)) |
| 186 | "*If non-nil, use the :align-to display property to align the stamp. | ||
| 187 | This gives better results when variable-width characters (like | ||
| 188 | Asian language characters and math symbols) precede a timestamp. | ||
| 186 | Unfortunately, it only works in Emacs 22 and when using the X | 189 | Unfortunately, it only works in Emacs 22 and when using the X |
| 187 | Window System." | 190 | Window System. |
| 191 | |||
| 192 | A side effect of enabling this is that there will only be one | ||
| 193 | space before a right timestamp in any saved logs." | ||
| 188 | :group 'erc-stamp | 194 | :group 'erc-stamp |
| 189 | :type 'boolean) | 195 | :type 'boolean) |
| 190 | 196 | ||
| @@ -200,18 +206,15 @@ Window System." | |||
| 200 | (insert s))) | 206 | (insert s))) |
| 201 | 207 | ||
| 202 | (defun erc-insert-aligned (string pos) | 208 | (defun erc-insert-aligned (string pos) |
| 203 | "Insert STRING based on a fraction of the width of the buffer. | 209 | "Insert STRING at the POSth column. |
| 204 | Fraction is roughly (/ POS (window-width)). | ||
| 205 | 210 | ||
| 206 | If `erc-timestamp-right-align-by-pixel' is nil, insert STRING at the | 211 | If `erc-timestamp-use-align-to' is t, use the :align-to display |
| 207 | POSth column, without using pixel coordinates." | 212 | property to get to the POSth column." |
| 208 | (if (not erc-timestamp-right-align-by-pixel) | 213 | (if (not erc-timestamp-use-align-to) |
| 209 | (indent-to pos) | 214 | (indent-to pos) |
| 210 | (insert " ") | 215 | (insert " ") |
| 211 | (let ((offset (floor (* (/ (1- pos) (window-width) 1.0) | 216 | (put-text-property (1- (point)) (point) 'display |
| 212 | (nth 2 (window-inside-pixel-edges)))))) | 217 | (list 'space ':align-to pos))) |
| 213 | (put-text-property (1- (point)) (point) 'display | ||
| 214 | `(space :align-to (,offset))))) | ||
| 215 | (insert string)) | 218 | (insert string)) |
| 216 | 219 | ||
| 217 | (defun erc-insert-timestamp-right (string) | 220 | (defun erc-insert-timestamp-right (string) |
| @@ -237,31 +240,26 @@ be printed just before the window-width." | |||
| 237 | (goto-char (point-max)) | 240 | (goto-char (point-max)) |
| 238 | (forward-char -1);; before the last newline | 241 | (forward-char -1);; before the last newline |
| 239 | (let* ((current-window (get-buffer-window (current-buffer))) | 242 | (let* ((current-window (get-buffer-window (current-buffer))) |
| 243 | (str-width (string-width string)) | ||
| 240 | (pos (cond | 244 | (pos (cond |
| 241 | (erc-timestamp-right-column | 245 | (erc-timestamp-right-column erc-timestamp-right-column) |
| 242 | (+ erc-timestamp-right-column (length string))) | ||
| 243 | ((and (boundp 'erc-fill-mode) | 246 | ((and (boundp 'erc-fill-mode) |
| 244 | erc-fill-mode | 247 | erc-fill-mode |
| 245 | (boundp 'erc-fill-column)) | 248 | (boundp 'erc-fill-column) |
| 246 | (1+ erc-fill-column)) | 249 | erc-fill-column) |
| 247 | (current-window | 250 | (1+ (- erc-fill-column str-width))) |
| 248 | (- (window-width current-window) | ||
| 249 | 1)) | ||
| 250 | (fill-column | 251 | (fill-column |
| 251 | (1+ fill-column)) | 252 | (1+ (- fill-column str-width))) |
| 252 | (t | 253 | (t |
| 253 | (- (window-width) | 254 | (- (window-width) str-width 1)))) |
| 254 | 1)))) | ||
| 255 | (from (point)) | 255 | (from (point)) |
| 256 | (col (current-column)) | 256 | (col (current-column)) |
| 257 | indent) | 257 | indent) |
| 258 | ;; deal with variable-width characters | 258 | ;; The following is a kludge used to calculate whether to move |
| 259 | (setq pos (- pos (string-width string)) | 259 | ;; to the next line before inserting a stamp. It allows for |
| 260 | ;; The following is a kludge that works with most | 260 | ;; some margin of error if what is displayed on the line differs |
| 261 | ;; international input. It is now only used to calculate | 261 | ;; from the number of characters on the line. |
| 262 | ;; whether to move to the next line before inserting a | 262 | (setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6)))) |
| 263 | ;; stamp. | ||
| 264 | col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6)))) | ||
| 265 | (if (< col pos) | 263 | (if (< col pos) |
| 266 | (erc-insert-aligned string pos) | 264 | (erc-insert-aligned string pos) |
| 267 | (newline) | 265 | (newline) |
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 6d760d75ba2..63005678613 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-track.el --- Track modified channel buffers | 1 | ;;; erc-track.el --- Track modified channel buffers |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm, faces | 6 | ;; Keywords: comm, faces |
diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el index 49cd20d759c..7a1feaaedd2 100644 --- a/lisp/erc/erc-truncate.el +++ b/lisp/erc/erc-truncate.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-truncate.el --- Functions for truncating ERC buffers | 1 | ;;; erc-truncate.el --- Functions for truncating ERC buffers |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andreas Fuchs <asf@void.at> | 5 | ;; Author: Andreas Fuchs <asf@void.at> |
| 6 | ;; Keywords: IRC, chat, client, Internet, logging | 6 | ;; Keywords: IRC, chat, client, Internet, logging |
diff --git a/lisp/erc/erc-xdcc.el b/lisp/erc/erc-xdcc.el index 7c8ee6fff62..d00dfc5e1a0 100644 --- a/lisp/erc/erc-xdcc.el +++ b/lisp/erc/erc-xdcc.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; erc-xdcc.el --- XDCC file-server support for ERC | 1 | ;;; erc-xdcc.el --- XDCC file-server support for ERC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Mario Lang <mlang@delysid.org> | 5 | ;; Author: Mario Lang <mlang@delysid.org> |
| 6 | ;; Keywords: comm, processes | 6 | ;; Keywords: comm, processes |
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; This file provides a very simple XDCC file server for the Emacs IRC Client. | 27 | ;; This file provides a very simple XDCC file server for ERC. |
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 936fffa252f..e1dc240901b 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -1719,22 +1719,15 @@ all channel buffers on all servers." | |||
| 1719 | (defun erc-migrate-modules (mods) | 1719 | (defun erc-migrate-modules (mods) |
| 1720 | "Migrate old names of ERC modules to new ones." | 1720 | "Migrate old names of ERC modules to new ones." |
| 1721 | ;; modify `transforms' to specify what needs to be changed | 1721 | ;; modify `transforms' to specify what needs to be changed |
| 1722 | ;; each item is in the format '(new .old) | 1722 | ;; each item is in the format '(old . new) |
| 1723 | (let ((transforms '((pcomplete . completion))) | 1723 | (let ((transforms '((pcomplete . completion)))) |
| 1724 | (modules (copy-alist mods))) | 1724 | (erc-delete-dups |
| 1725 | (dolist (transform transforms) | 1725 | (mapcar (lambda (m) (or (cdr (assoc m transforms)) m)) |
| 1726 | (let ((addp nil)) | 1726 | mods)))) |
| 1727 | (setq modules (erc-delete-if `(lambda (val) | 1727 | |
| 1728 | (and (eq val ',(car transform)) | 1728 | (defcustom erc-modules '(netsplit fill button match track completion readonly |
| 1729 | (setq addition t))) | ||
| 1730 | modules)) | ||
| 1731 | (when addp | ||
| 1732 | (add-to-list 'modules (cdr transform))))) | ||
| 1733 | (erc-delete-dups modules))) | ||
| 1734 | |||
| 1735 | (defcustom erc-modules '(netsplit fill button match track pcomplete readonly | ||
| 1736 | ring autojoin noncommands irccontrols | 1729 | ring autojoin noncommands irccontrols |
| 1737 | stamp) | 1730 | stamp list) |
| 1738 | "A list of modules which erc should enable. | 1731 | "A list of modules which erc should enable. |
| 1739 | If you set the value of this without using `customize' remember to call | 1732 | If you set the value of this without using `customize' remember to call |
| 1740 | \(erc-update-modules) after you change it. When using `customize', modules | 1733 | \(erc-update-modules) after you change it. When using `customize', modules |
| @@ -1755,40 +1748,42 @@ removed from the list will be disabled." | |||
| 1755 | ;; this test is for the case where erc hasn't been loaded yet | 1748 | ;; this test is for the case where erc hasn't been loaded yet |
| 1756 | (when (fboundp 'erc-update-modules) | 1749 | (when (fboundp 'erc-update-modules) |
| 1757 | (erc-update-modules))) | 1750 | (erc-update-modules))) |
| 1758 | :type '(set :greedy t | 1751 | :type |
| 1759 | (const :tag "Set away status automatically" autoaway) | 1752 | '(set |
| 1760 | (const :tag "Join channels automatically" autojoin) | 1753 | :greedy t |
| 1761 | (const :tag "Integrate with Big Brother Database" bbdb) | 1754 | (const :tag "Set away status automatically" autoaway) |
| 1762 | (const :tag "Buttonize URLs, nicknames, and other text" button) | 1755 | (const :tag "Join channels automatically" autojoin) |
| 1763 | (const :tag "Wrap long lines" fill) | 1756 | (const :tag "Integrate with Big Brother Database" bbdb) |
| 1764 | (const :tag "Highlight or remove IRC control characters" | 1757 | (const :tag "Buttonize URLs, nicknames, and other text" button) |
| 1765 | irccontrols) | 1758 | (const :tag "Wrap long lines" fill) |
| 1766 | (const :tag "Save buffers in logs" log) | 1759 | (const :tag "Highlight or remove IRC control characters" |
| 1767 | (const :tag "Highlight pals, fools, and other keywords" match) | 1760 | irccontrols) |
| 1768 | (const :tag "Detect netsplits" netsplit) | 1761 | (const :tag "Save buffers in logs" log) |
| 1769 | (const :tag "Don't display non-IRC commands after evaluation" | 1762 | (const :tag "Highlight pals, fools, and other keywords" match) |
| 1770 | noncommands) | 1763 | (const :tag "Detect netsplits" netsplit) |
| 1771 | (const :tag | 1764 | (const :tag "Don't display non-IRC commands after evaluation" |
| 1772 | "Notify when the online status of certain users changes" | 1765 | noncommands) |
| 1773 | notify) | 1766 | (const :tag |
| 1774 | (const :tag "Complete nicknames and commands (programmable)" | 1767 | "Notify when the online status of certain users changes" |
| 1775 | completion) | 1768 | notify) |
| 1776 | (const :tag "Complete nicknames and commands (old)" hecomplete) | 1769 | (const :tag "Complete nicknames and commands (programmable)" |
| 1777 | (const :tag "Make displayed lines read-only" readonly) | 1770 | completion) |
| 1778 | (const :tag "Replace text in messages" replace) | 1771 | (const :tag "Complete nicknames and commands (old)" hecomplete) |
| 1779 | (const :tag "Enable an input history" ring) | 1772 | (const :tag "Make displayed lines read-only" readonly) |
| 1780 | (const :tag "Scroll to the bottom of the buffer" scrolltobottom) | 1773 | (const :tag "Replace text in messages" replace) |
| 1781 | (const :tag "Identify to Nickserv (IRC Services) automatically" | 1774 | (const :tag "Enable an input history" ring) |
| 1782 | services) | 1775 | (const :tag "Scroll to the bottom of the buffer" scrolltobottom) |
| 1783 | (const :tag "Convert smileys to pretty icons" smiley) | 1776 | (const :tag "Identify to Nickserv (IRC Services) automatically" |
| 1784 | (const :tag "Play sounds when you receive CTCP SOUND requests" | 1777 | services) |
| 1785 | sound) | 1778 | (const :tag "Convert smileys to pretty icons" smiley) |
| 1786 | (const :tag "Add timestamps to messages" stamp) | 1779 | (const :tag "Play sounds when you receive CTCP SOUND requests" |
| 1787 | (const :tag "Check spelling" spelling) | 1780 | sound) |
| 1788 | (const :tag "Track channel activity in the mode-line" track) | 1781 | (const :tag "Add timestamps to messages" stamp) |
| 1789 | (const :tag "Truncate buffers to a certain size" truncate) | 1782 | (const :tag "Check spelling" spelling) |
| 1790 | (const :tag "Translate morse code in messages" unmorse) | 1783 | (const :tag "Track channel activity in the mode-line" track) |
| 1791 | (repeat :tag "Others" :inline t symbol)) | 1784 | (const :tag "Truncate buffers to a certain size" truncate) |
| 1785 | (const :tag "Translate morse code in messages" unmorse) | ||
| 1786 | (repeat :tag "Others" :inline t symbol)) | ||
| 1792 | :group 'erc) | 1787 | :group 'erc) |
| 1793 | 1788 | ||
| 1794 | (defun erc-update-modules () | 1789 | (defun erc-update-modules () |
| @@ -1799,14 +1794,11 @@ removed from the list will be disabled." | |||
| 1799 | (cond | 1794 | (cond |
| 1800 | ;; yuck. perhaps we should bring the filenames into sync? | 1795 | ;; yuck. perhaps we should bring the filenames into sync? |
| 1801 | ((string= req "erc-completion") | 1796 | ((string= req "erc-completion") |
| 1802 | (setq req "erc-pcomplete") | 1797 | (setq req "erc-pcomplete")) |
| 1803 | (setq mod 'completion)) | ||
| 1804 | ((string= req "erc-pcomplete") | 1798 | ((string= req "erc-pcomplete") |
| 1805 | (setq req "erc-pcomplete") | ||
| 1806 | (setq mod 'completion)) | 1799 | (setq mod 'completion)) |
| 1807 | ((string= req "erc-autojoin") | 1800 | ((string= req "erc-autojoin") |
| 1808 | (setq req "erc-join") | 1801 | (setq req "erc-join"))) |
| 1809 | (setq mod 'autojoin))) | ||
| 1810 | (condition-case nil | 1802 | (condition-case nil |
| 1811 | (require (intern req)) | 1803 | (require (intern req)) |
| 1812 | (error nil)) | 1804 | (error nil)) |
| @@ -1935,7 +1927,8 @@ Returns the buffer for the given server or channel." | |||
| 1935 | (goto-char (point-max)) | 1927 | (goto-char (point-max)) |
| 1936 | (insert "\n")) | 1928 | (insert "\n")) |
| 1937 | (set-marker (process-mark erc-server-process) (point)) | 1929 | (set-marker (process-mark erc-server-process) (point)) |
| 1938 | (unless continued-session | 1930 | (if continued-session |
| 1931 | (goto-char (point-max)) | ||
| 1939 | (set-marker erc-insert-marker (point)) | 1932 | (set-marker erc-insert-marker (point)) |
| 1940 | (erc-display-prompt) | 1933 | (erc-display-prompt) |
| 1941 | (goto-char (point-max))) | 1934 | (goto-char (point-max))) |
| @@ -6143,6 +6136,26 @@ This function should be on `erc-kill-channel-hook'." | |||
| 6143 | (funcall erc-part-reason nil)) | 6136 | (funcall erc-part-reason nil)) |
| 6144 | nil tgt)))) | 6137 | nil tgt)))) |
| 6145 | 6138 | ||
| 6139 | ;;; Dealing with `erc-parsed' | ||
| 6140 | |||
| 6141 | (defun erc-get-parsed-vector (point) | ||
| 6142 | "Return the whole parsed vector on POINT." | ||
| 6143 | (get-text-property point 'erc-parsed)) | ||
| 6144 | |||
| 6145 | (defun erc-get-parsed-vector-nick (vect) | ||
| 6146 | "Return nickname in the parsed vector VECT." | ||
| 6147 | (let* ((untreated-nick (and vect (erc-response.sender vect))) | ||
| 6148 | (maybe-nick (when untreated-nick | ||
| 6149 | (car (split-string untreated-nick "!"))))) | ||
| 6150 | (when (and (not (null maybe-nick)) | ||
| 6151 | (erc-is-valid-nick-p maybe-nick)) | ||
| 6152 | untreated-nick))) | ||
| 6153 | |||
| 6154 | (defun erc-get-parsed-vector-type (vect) | ||
| 6155 | "Return message type in the parsed vector VECT." | ||
| 6156 | (and vect | ||
| 6157 | (erc-response.command vect))) | ||
| 6158 | |||
| 6146 | (provide 'erc) | 6159 | (provide 'erc) |
| 6147 | 6160 | ||
| 6148 | ;;; Deprecated. We might eventually stop requiring the goodies automatically. | 6161 | ;;; Deprecated. We might eventually stop requiring the goodies automatically. |
diff --git a/lisp/ffap.el b/lisp/ffap.el index d487c4f67a0..1b6665d16d5 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -287,9 +287,9 @@ For a fancy alternative, get `ffap-url.el'." | |||
| 287 | 287 | ||
| 288 | ;;; Compatibility: | 288 | ;;; Compatibility: |
| 289 | ;; | 289 | ;; |
| 290 | ;; This version of ffap supports Emacs 20 only, see the ftp site | 290 | ;; This version of ffap supports only the Emacs it is distributed in. |
| 291 | ;; for a more general version. The following functions are necessary | 291 | ;; See the ftp site for a more general version. The following |
| 292 | ;; "leftovers" from the more general version. | 292 | ;; functions are necessary "leftovers" from the more general version. |
| 293 | 293 | ||
| 294 | (defun ffap-mouse-event nil ; current mouse event, or nil | 294 | (defun ffap-mouse-event nil ; current mouse event, or nil |
| 295 | (and (listp last-nonmenu-event) last-nonmenu-event)) | 295 | (and (listp last-nonmenu-event) last-nonmenu-event)) |
| @@ -730,7 +730,7 @@ kpathsea, a library used by some versions of TeX." | |||
| 730 | path))) | 730 | path))) |
| 731 | 731 | ||
| 732 | (defun ffap-locate-file (file &optional nosuffix path dir-ok) | 732 | (defun ffap-locate-file (file &optional nosuffix path dir-ok) |
| 733 | ;; The Emacs 20 version of locate-library could almost replace this, | 733 | ;; The current version of locate-library could almost replace this, |
| 734 | ;; except it does not let us override the suffix list. The | 734 | ;; except it does not let us override the suffix list. The |
| 735 | ;; compression-suffixes search moved to ffap-file-exists-string. | 735 | ;; compression-suffixes search moved to ffap-file-exists-string. |
| 736 | "A generic path-searching function, mimics `load' by default. | 736 | "A generic path-searching function, mimics `load' by default. |
diff --git a/lisp/files.el b/lisp/files.el index 0a33a658d9d..a2e18522051 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -445,8 +445,13 @@ use `before-save-hook'.") | |||
| 445 | (defcustom enable-local-variables t | 445 | (defcustom enable-local-variables t |
| 446 | "*Control use of local variables in files you visit. | 446 | "*Control use of local variables in files you visit. |
| 447 | The value can be t, nil or something else. | 447 | The value can be t, nil or something else. |
| 448 | A value of t means file local variables specifications are obeyed; | 448 | |
| 449 | nil means they are ignored; anything else means query. | 449 | A value of t means file local variables specifications are obeyed |
| 450 | if all the specified variables are safe. If any variables are | ||
| 451 | not safe, you will be queries before setting them. | ||
| 452 | A value of nil means file local variables are ignored. | ||
| 453 | Any other value means to always query. | ||
| 454 | |||
| 450 | This variable also controls use of major modes specified in | 455 | This variable also controls use of major modes specified in |
| 451 | a -*- line. | 456 | a -*- line. |
| 452 | 457 | ||
| @@ -2024,18 +2029,19 @@ associated with that interpreter in `interpreter-mode-alist'.") | |||
| 2024 | (defvar magic-mode-alist | 2029 | (defvar magic-mode-alist |
| 2025 | `(;; The < comes before the groups (but the first) to reduce backtracking. | 2030 | `(;; The < comes before the groups (but the first) to reduce backtracking. |
| 2026 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. | 2031 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. |
| 2032 | ;; We use [ \t\n] instead of `\\s ' to make regex overflow less likely. | ||
| 2027 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") | 2033 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") |
| 2028 | (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) | 2034 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) |
| 2029 | (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" | 2035 | (concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<" |
| 2030 | comment-re "*" | 2036 | comment-re "*" |
| 2031 | "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" | 2037 | "\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?" |
| 2032 | "[Hh][Tt][Mm][Ll]")) | 2038 | "[Hh][Tt][Mm][Ll]")) |
| 2033 | . html-mode) | 2039 | . html-mode) |
| 2034 | ;; These two must come after html, because they are more general: | 2040 | ;; These two must come after html, because they are more general: |
| 2035 | ("<\\?xml " . xml-mode) | 2041 | ("<\\?xml " . xml-mode) |
| 2036 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") | 2042 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") |
| 2037 | (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) | 2043 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) |
| 2038 | (concat "\\s *<" comment-re "*!DOCTYPE ")) | 2044 | (concat "[ \t\n]*<" comment-re "*!DOCTYPE ")) |
| 2039 | . sgml-mode) | 2045 | . sgml-mode) |
| 2040 | ("%![^V]" . ps-mode) | 2046 | ("%![^V]" . ps-mode) |
| 2041 | ("# xmcd " . conf-unix-mode)) | 2047 | ("# xmcd " . conf-unix-mode)) |
| @@ -2213,42 +2219,89 @@ Otherwise, return nil; point may be changed." | |||
| 2213 | (goto-char beg) | 2219 | (goto-char beg) |
| 2214 | end)))) | 2220 | end)))) |
| 2215 | 2221 | ||
| 2216 | (defun hack-local-variables-confirm (string flag-to-check) | 2222 | (defun hack-local-variables-confirm (vars unsafe-vars risky-vars) |
| 2217 | (or (eq flag-to-check t) | 2223 | (if noninteractive |
| 2218 | (and flag-to-check | 2224 | nil |
| 2219 | (save-window-excursion | 2225 | (let ((name (if buffer-file-name |
| 2220 | (condition-case nil | 2226 | (file-name-nondirectory buffer-file-name) |
| 2221 | (switch-to-buffer (current-buffer)) | 2227 | (concat "buffer " (buffer-name)))) |
| 2222 | (error | 2228 | prompt char) |
| 2223 | ;; If we fail to switch in the selected window, | 2229 | (save-window-excursion |
| 2224 | ;; it is probably a minibuffer or dedicated window. | 2230 | (let ((buf (get-buffer-create "*Local Variables*"))) |
| 2225 | ;; So try another window. | 2231 | (pop-to-buffer buf) |
| 2226 | (let ((pop-up-frames nil)) | 2232 | (set (make-local-variable 'cursor-type) nil) |
| 2227 | ;; Refrain from popping up frames since it can't | 2233 | (erase-buffer) |
| 2228 | ;; be undone by save-window-excursion. | 2234 | (if unsafe-vars |
| 2229 | (pop-to-buffer (current-buffer))))) | 2235 | (insert "The local variables list in " name |
| 2230 | (save-excursion | 2236 | "\ncontains values that may not be safe (*)" |
| 2231 | (beginning-of-line) | 2237 | (if risky-vars |
| 2232 | (set-window-start (selected-window) (point))) | 2238 | ", and variables that are risky (**)." |
| 2233 | (y-or-n-p (format string | 2239 | ".")) |
| 2234 | (if buffer-file-name | 2240 | (if risky-vars |
| 2235 | (file-name-nondirectory buffer-file-name) | 2241 | (insert "The local variables list in " name |
| 2236 | (concat "buffer " (buffer-name))))))))) | 2242 | "\ncontains variables that are risky (**).") |
| 2243 | (insert "A local variables list is specified in " name "."))) | ||
| 2244 | (insert "\n\nDo you want to apply it? You can type | ||
| 2245 | y -- to apply the local variables list. | ||
| 2246 | n -- to ignore the local variables list. | ||
| 2247 | ! -- to apply the local variables list, and mark these values (*) as | ||
| 2248 | safe (in the future, they can be set automatically.)\n\n") | ||
| 2249 | (dolist (elt vars) | ||
| 2250 | (cond ((member elt unsafe-vars) | ||
| 2251 | (insert " * ")) | ||
| 2252 | ((member elt risky-vars) | ||
| 2253 | (insert " ** ")) | ||
| 2254 | (t | ||
| 2255 | (insert " "))) | ||
| 2256 | (princ (car elt) buf) | ||
| 2257 | (insert " : ") | ||
| 2258 | (princ (cdr elt) buf) | ||
| 2259 | (insert "\n")) | ||
| 2260 | (if (< (line-number-at-pos) (window-body-height)) | ||
| 2261 | (setq prompt "Please type y, n, or !: ") | ||
| 2262 | (goto-char (point-min)) | ||
| 2263 | (setq prompt "Please type y, n, or !, or C-v to scroll: ")) | ||
| 2264 | (let ((inhibit-quit t) | ||
| 2265 | (cursor-in-echo-area t) | ||
| 2266 | done) | ||
| 2267 | (while (not done) | ||
| 2268 | (message prompt) | ||
| 2269 | (setq char (read-event)) | ||
| 2270 | (if (numberp char) | ||
| 2271 | (if (eq char ?\C-v) | ||
| 2272 | (condition-case nil | ||
| 2273 | (scroll-up) | ||
| 2274 | (error (goto-char (point-min)))) | ||
| 2275 | (setq done (memq (downcase char) | ||
| 2276 | '(?! ?y ?n ?\s ?\C-g)))))) | ||
| 2277 | (if (= char ?\C-g) | ||
| 2278 | (setq quit-flag nil))) | ||
| 2279 | (setq char (downcase char)) | ||
| 2280 | (when (and (= char ?!) unsafe-vars) | ||
| 2281 | (dolist (elt unsafe-vars) | ||
| 2282 | (add-to-list 'safe-local-variable-values elt)) | ||
| 2283 | (customize-save-variable | ||
| 2284 | 'safe-local-variable-values | ||
| 2285 | safe-local-variable-values)) | ||
| 2286 | (kill-buffer buf) | ||
| 2287 | (or (= char ?!) | ||
| 2288 | (= char ?\s) | ||
| 2289 | (= char ?y))))))) | ||
| 2237 | 2290 | ||
| 2238 | (defun hack-local-variables-prop-line (&optional mode-only) | 2291 | (defun hack-local-variables-prop-line (&optional mode-only) |
| 2239 | "Set local variables specified in the -*- line. | 2292 | "Return local variables specified in the -*- line. |
| 2240 | Ignore any specification for `mode:' and `coding:'; | 2293 | Ignore any specification for `mode:' and `coding:'; |
| 2241 | `set-auto-mode' should already have handled `mode:', | 2294 | `set-auto-mode' should already have handled `mode:', |
| 2242 | `set-auto-coding' should already have handled `coding:'. | 2295 | `set-auto-coding' should already have handled `coding:'. |
| 2243 | If MODE-ONLY is non-nil, all we do is check whether the major mode | 2296 | |
| 2244 | is specified, returning t if it is specified." | 2297 | If MODE-ONLY is non-nil, all we do is check whether the major |
| 2298 | mode is specified, returning t if it is specified. Otherwise, | ||
| 2299 | return an alist of elements (VAR . VAL), where VAR is a variable | ||
| 2300 | and VAL is the specified value." | ||
| 2245 | (save-excursion | 2301 | (save-excursion |
| 2246 | (goto-char (point-min)) | 2302 | (goto-char (point-min)) |
| 2247 | (let ((result nil) | 2303 | (let ((end (set-auto-mode-1)) |
| 2248 | (end (set-auto-mode-1)) | 2304 | result mode-specified) |
| 2249 | mode-specified | ||
| 2250 | (enable-local-variables | ||
| 2251 | (and local-enable-local-variables enable-local-variables))) | ||
| 2252 | ;; Parse the -*- line into the RESULT alist. | 2305 | ;; Parse the -*- line into the RESULT alist. |
| 2253 | ;; Also set MODE-SPECIFIED if we see a spec or `mode'. | 2306 | ;; Also set MODE-SPECIFIED if we see a spec or `mode'. |
| 2254 | (cond ((not end) | 2307 | (cond ((not end) |
| @@ -2278,128 +2331,163 @@ is specified, returning t if it is specified." | |||
| 2278 | ;; so we must do that here as well. | 2331 | ;; so we must do that here as well. |
| 2279 | ;; That is inconsistent, but we're stuck with it. | 2332 | ;; That is inconsistent, but we're stuck with it. |
| 2280 | ;; The same can be said for `coding' in set-auto-coding. | 2333 | ;; The same can be said for `coding' in set-auto-coding. |
| 2281 | (or (equal (downcase (symbol-name key)) "mode") | 2334 | (or (and (equal (downcase (symbol-name key)) "mode") |
| 2335 | (setq mode-specified t)) | ||
| 2282 | (equal (downcase (symbol-name key)) "coding") | 2336 | (equal (downcase (symbol-name key)) "coding") |
| 2283 | (setq result (cons (cons key val) result))) | 2337 | (condition-case nil |
| 2284 | (if (equal (downcase (symbol-name key)) "mode") | 2338 | (push (cons (if (eq key 'eval) |
| 2285 | (setq mode-specified t)) | 2339 | 'eval |
| 2286 | (skip-chars-forward " \t;"))) | 2340 | (indirect-variable key)) |
| 2287 | (setq result (nreverse result)))) | 2341 | val) result) |
| 2288 | 2342 | (error nil))) | |
| 2289 | (if mode-only mode-specified | 2343 | (skip-chars-forward " \t;"))))) |
| 2290 | (if (and result | 2344 | |
| 2291 | (or mode-only | 2345 | (if mode-only |
| 2292 | (hack-local-variables-confirm | 2346 | mode-specified |
| 2293 | "Set local variables as specified in -*- line of %s? " | 2347 | result)))) |
| 2294 | enable-local-variables))) | ||
| 2295 | (let ((enable-local-eval enable-local-eval)) | ||
| 2296 | (while result | ||
| 2297 | (hack-one-local-variable (car (car result)) (cdr (car result))) | ||
| 2298 | (setq result (cdr result))))) | ||
| 2299 | nil)))) | ||
| 2300 | 2348 | ||
| 2301 | (defvar hack-local-variables-hook nil | 2349 | (defvar hack-local-variables-hook nil |
| 2302 | "Normal hook run after processing a file's local variables specs. | 2350 | "Normal hook run after processing a file's local variables specs. |
| 2303 | Major modes can use this to examine user-specified local variables | 2351 | Major modes can use this to examine user-specified local variables |
| 2304 | in order to initialize other data structure based on them.") | 2352 | in order to initialize other data structure based on them.") |
| 2305 | 2353 | ||
| 2354 | (defcustom safe-local-variable-values nil | ||
| 2355 | "List variable-value pairs that are considered safe. | ||
| 2356 | Each element is a cons cell (VAR . VAL), where VAR is a variable | ||
| 2357 | symbol and VAL is a value that is considered safe." | ||
| 2358 | :group 'find-file | ||
| 2359 | :type 'alist) | ||
| 2360 | |||
| 2306 | (defun hack-local-variables (&optional mode-only) | 2361 | (defun hack-local-variables (&optional mode-only) |
| 2307 | "Parse and put into effect this buffer's local variables spec. | 2362 | "Parse and put into effect this buffer's local variables spec. |
| 2308 | If MODE-ONLY is non-nil, all we do is check whether the major mode | 2363 | If MODE-ONLY is non-nil, all we do is check whether the major mode |
| 2309 | is specified, returning t if it is specified." | 2364 | is specified, returning t if it is specified." |
| 2310 | (let ((mode-specified | 2365 | (let ((enable-local-variables |
| 2311 | ;; If MODE-ONLY is t, we check here for specifying the mode | 2366 | (and local-enable-local-variables enable-local-variables)) |
| 2312 | ;; in the -*- line. If MODE-ONLY is nil, we process | 2367 | result) |
| 2313 | ;; the -*- line here. | 2368 | (when (or mode-only enable-local-variables) |
| 2314 | (hack-local-variables-prop-line mode-only)) | 2369 | (setq result (hack-local-variables-prop-line mode-only)) |
| 2315 | (enable-local-variables | 2370 | ;; Look for "Local variables:" line in last page. |
| 2316 | (and local-enable-local-variables enable-local-variables))) | 2371 | (save-excursion |
| 2317 | ;; Look for "Local variables:" line in last page. | 2372 | (goto-char (point-max)) |
| 2318 | (save-excursion | 2373 | (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) |
| 2319 | (goto-char (point-max)) | 2374 | 'move) |
| 2320 | (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) | 2375 | (when (let ((case-fold-search t)) |
| 2321 | (when (let ((case-fold-search t)) | 2376 | (search-forward "Local Variables:" nil t)) |
| 2322 | (and (search-forward "Local Variables:" nil t) | 2377 | (skip-chars-forward " \t") |
| 2323 | (or mode-only | 2378 | ;; suffix is what comes after "local variables:" in its line. |
| 2324 | (hack-local-variables-confirm | 2379 | ;; prefix is what comes before "local variables:" in its line. |
| 2325 | "Set local variables as specified at end of %s? " | 2380 | (let ((suffix |
| 2326 | enable-local-variables)))) | 2381 | (concat |
| 2327 | (skip-chars-forward " \t") | 2382 | (regexp-quote (buffer-substring (point) |
| 2328 | (let ((enable-local-eval enable-local-eval) | 2383 | (line-end-position))) |
| 2329 | ;; suffix is what comes after "local variables:" in its line. | 2384 | "$")) |
| 2330 | (suffix | 2385 | (prefix |
| 2331 | (concat | 2386 | (concat "^" (regexp-quote |
| 2332 | (regexp-quote (buffer-substring (point) (line-end-position))) | 2387 | (buffer-substring (line-beginning-position) |
| 2333 | "$")) | 2388 | (match-beginning 0))))) |
| 2334 | ;; prefix is what comes before "local variables:" in its line. | 2389 | beg) |
| 2335 | (prefix | 2390 | |
| 2336 | (concat "^" (regexp-quote | 2391 | (forward-line 1) |
| 2337 | (buffer-substring (line-beginning-position) | 2392 | (let ((startpos (point)) |
| 2338 | (match-beginning 0))))) | 2393 | endpos |
| 2339 | beg) | 2394 | (thisbuf (current-buffer))) |
| 2340 | 2395 | (save-excursion | |
| 2341 | (forward-line 1) | 2396 | (unless (let ((case-fold-search t)) |
| 2342 | (let ((startpos (point)) | 2397 | (re-search-forward |
| 2343 | endpos | 2398 | (concat prefix "[ \t]*End:[ \t]*" suffix) |
| 2344 | (thisbuf (current-buffer))) | 2399 | nil t)) |
| 2345 | (save-excursion | 2400 | (error "Local variables list is not properly terminated")) |
| 2346 | (unless (let ((case-fold-search t)) | 2401 | (beginning-of-line) |
| 2347 | (re-search-forward | 2402 | (setq endpos (point))) |
| 2348 | (concat prefix "[ \t]*End:[ \t]*" suffix) | 2403 | |
| 2349 | nil t)) | 2404 | (with-temp-buffer |
| 2350 | (error "Local variables list is not properly terminated")) | 2405 | (insert-buffer-substring thisbuf startpos endpos) |
| 2351 | (beginning-of-line) | 2406 | (goto-char (point-min)) |
| 2352 | (setq endpos (point))) | 2407 | (subst-char-in-region (point) (point-max) ?\^m ?\n) |
| 2353 | 2408 | (while (not (eobp)) | |
| 2354 | (with-temp-buffer | 2409 | ;; Discard the prefix. |
| 2355 | (insert-buffer-substring thisbuf startpos endpos) | 2410 | (if (looking-at prefix) |
| 2356 | (goto-char (point-min)) | 2411 | (delete-region (point) (match-end 0)) |
| 2357 | (subst-char-in-region (point) (point-max) ?\^m ?\n) | 2412 | (error "Local variables entry is missing the prefix")) |
| 2358 | (while (not (eobp)) | 2413 | (end-of-line) |
| 2359 | ;; Discard the prefix. | 2414 | ;; Discard the suffix. |
| 2360 | (if (looking-at prefix) | 2415 | (if (looking-back suffix) |
| 2361 | (delete-region (point) (match-end 0)) | 2416 | (delete-region (match-beginning 0) (point)) |
| 2362 | (error "Local variables entry is missing the prefix")) | 2417 | (error "Local variables entry is missing the suffix")) |
| 2363 | (end-of-line) | 2418 | (forward-line 1)) |
| 2364 | ;; Discard the suffix. | 2419 | (goto-char (point-min)) |
| 2365 | (if (looking-back suffix) | 2420 | |
| 2366 | (delete-region (match-beginning 0) (point)) | 2421 | (while (not (eobp)) |
| 2367 | (error "Local variables entry is missing the suffix")) | 2422 | ;; Find the variable name; strip whitespace. |
| 2368 | (forward-line 1)) | 2423 | (skip-chars-forward " \t") |
| 2369 | (goto-char (point-min)) | 2424 | (setq beg (point)) |
| 2370 | 2425 | (skip-chars-forward "^:\n") | |
| 2371 | (while (not (eobp)) | 2426 | (if (eolp) (error "Missing colon in local variables entry")) |
| 2372 | ;; Find the variable name; strip whitespace. | 2427 | (skip-chars-backward " \t") |
| 2373 | (skip-chars-forward " \t") | 2428 | (let* ((str (buffer-substring beg (point))) |
| 2374 | (setq beg (point)) | 2429 | (var (read str)) |
| 2375 | (skip-chars-forward "^:\n") | 2430 | val) |
| 2376 | (if (eolp) (error "Missing colon in local variables entry")) | 2431 | ;; Read the variable value. |
| 2377 | (skip-chars-backward " \t") | 2432 | (skip-chars-forward "^:") |
| 2378 | (let* ((str (buffer-substring beg (point))) | 2433 | (forward-char 1) |
| 2379 | (var (read str)) | 2434 | (setq val (read (current-buffer))) |
| 2380 | val) | 2435 | (if mode-only |
| 2381 | ;; Read the variable value. | 2436 | (if (eq var 'mode) |
| 2382 | (skip-chars-forward "^:") | 2437 | (setq result t)) |
| 2383 | (forward-char 1) | 2438 | (unless (eq var 'coding) |
| 2384 | (setq val (read (current-buffer))) | 2439 | (condition-case nil |
| 2385 | (if mode-only | 2440 | (push (cons (if (eq var 'eval) |
| 2386 | (if (eq var 'mode) | 2441 | 'eval |
| 2387 | (setq mode-specified t)) | 2442 | (indirect-variable var)) |
| 2388 | ;; Set the variable. "Variables" mode and eval are funny. | 2443 | val) result) |
| 2389 | (with-current-buffer thisbuf | 2444 | (error nil))))) |
| 2390 | (hack-one-local-variable var val)))) | 2445 | (forward-line 1))))))) |
| 2391 | (forward-line 1))))))) | 2446 | |
| 2392 | (unless mode-only | 2447 | ;; We've read all the local variables. Now, return whether the |
| 2393 | (run-hooks 'hack-local-variables-hook)) | 2448 | ;; mode is specified (if MODE-ONLY is non-nil), or set the |
| 2394 | mode-specified)) | 2449 | ;; variables (if MODE-ONLY is nil.) |
| 2395 | 2450 | (if mode-only | |
| 2396 | (defvar ignored-local-variables () | 2451 | result |
| 2452 | (dolist (ignored ignored-local-variables) | ||
| 2453 | (setq result (assq-delete-all ignored result))) | ||
| 2454 | (if (null enable-local-eval) | ||
| 2455 | (setq result (assq-delete-all 'eval result))) | ||
| 2456 | (when result | ||
| 2457 | (setq result (nreverse result)) | ||
| 2458 | ;; Find those variables that we may want to save to | ||
| 2459 | ;; `safe-local-variable-values'. | ||
| 2460 | (let (risky-vars unsafe-vars) | ||
| 2461 | (dolist (elt result) | ||
| 2462 | (let ((var (car elt)) | ||
| 2463 | (val (cdr elt))) | ||
| 2464 | (or (eq var 'mode) | ||
| 2465 | (and (eq var 'eval) | ||
| 2466 | (or (eq enable-local-eval t) | ||
| 2467 | (hack-one-local-variable-eval-safep | ||
| 2468 | (eval (quote val))))) | ||
| 2469 | (safe-local-variable-p var val) | ||
| 2470 | (and (risky-local-variable-p var val) | ||
| 2471 | (push elt risky-vars)) | ||
| 2472 | (push elt unsafe-vars)))) | ||
| 2473 | (if (or (and (eq enable-local-variables t) | ||
| 2474 | (null unsafe-vars) | ||
| 2475 | (null risky-vars)) | ||
| 2476 | (hack-local-variables-confirm | ||
| 2477 | result unsafe-vars risky-vars)) | ||
| 2478 | (dolist (elt result) | ||
| 2479 | (hack-one-local-variable (car elt) (cdr elt))))) | ||
| 2480 | (run-hooks 'hack-local-variables-hook)))))) | ||
| 2481 | |||
| 2482 | (defvar ignored-local-variables | ||
| 2483 | '(ignored-local-variables safe-local-variable-values) | ||
| 2397 | "Variables to be ignored in a file's local variable spec.") | 2484 | "Variables to be ignored in a file's local variable spec.") |
| 2398 | 2485 | ||
| 2399 | ;; Get confirmation before setting these variables as locals in a file. | 2486 | ;; Get confirmation before setting these variables as locals in a file. |
| 2400 | (put 'debugger 'risky-local-variable t) | 2487 | (put 'debugger 'risky-local-variable t) |
| 2401 | (put 'enable-local-eval 'risky-local-variable t) | 2488 | (put 'enable-local-eval 'risky-local-variable t) |
| 2402 | (put 'ignored-local-variables 'risky-local-variable t) | 2489 | (put 'ignored-local-variables 'risky-local-variable t) |
| 2490 | (put 'ignored-local-variables 'safe-local-variable-values t) | ||
| 2403 | (put 'eval 'risky-local-variable t) | 2491 | (put 'eval 'risky-local-variable t) |
| 2404 | (put 'file-name-handler-alist 'risky-local-variable t) | 2492 | (put 'file-name-handler-alist 'risky-local-variable t) |
| 2405 | (put 'inhibit-quit 'risky-local-variable t) | 2493 | (put 'inhibit-quit 'risky-local-variable t) |
| @@ -2452,27 +2540,68 @@ is specified, returning t if it is specified." | |||
| 2452 | (put 'display-time-string 'risky-local-variable t) | 2540 | (put 'display-time-string 'risky-local-variable t) |
| 2453 | (put 'parse-time-rules 'risky-local-variable t) | 2541 | (put 'parse-time-rules 'risky-local-variable t) |
| 2454 | 2542 | ||
| 2455 | ;; This case is safe because the user gets to check it before it is used. | 2543 | ;; Commonly-encountered local variables that are safe: |
| 2456 | (put 'compile-command 'safe-local-variable 'stringp) | 2544 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) |
| 2457 | 2545 | (eval | |
| 2458 | (defun risky-local-variable-p (sym &optional val) | 2546 | `(mapc (lambda (pair) |
| 2459 | "Non-nil if SYM could be dangerous as a file-local variable with value VAL. | 2547 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2460 | If VAL is nil or omitted, the question is whether any value might be | 2548 | '((byte-compile-dynamic . t) |
| 2461 | dangerous." | 2549 | (c-basic-offset . integerp) |
| 2550 | (c-file-style . stringp) | ||
| 2551 | (c-indent-level . integerp) | ||
| 2552 | (comment-column . integerp) | ||
| 2553 | (compile-command . ,string-or-null) | ||
| 2554 | (fill-column . integerp) | ||
| 2555 | (fill-prefix . ,string-or-null) | ||
| 2556 | (indent-tabs-mode . t) | ||
| 2557 | (kept-new-versions . integerp) | ||
| 2558 | (no-byte-compile . t) | ||
| 2559 | (no-update-autoloads . t) | ||
| 2560 | (outline-regexp . ,string-or-null) | ||
| 2561 | (page-delimiter . ,string-or-null) | ||
| 2562 | (paragraph-start . ,string-or-null) | ||
| 2563 | (paragraph-separate . ,string-or-null) | ||
| 2564 | (sentence-end . ,string-or-null) | ||
| 2565 | (sentence-end-double-space . t) | ||
| 2566 | (tab-width . integerp) | ||
| 2567 | (version-control . t))))) | ||
| 2568 | |||
| 2569 | (defun safe-local-variable-p (sym val) | ||
| 2570 | "Non-nil if SYM is safe as a file-local variable with value VAL. | ||
| 2571 | It is safe if any of these conditions are met: | ||
| 2572 | |||
| 2573 | * There is a matching entry (SYM . VAL) in the | ||
| 2574 | `safe-local-variable-values' user option. | ||
| 2575 | |||
| 2576 | * The `safe-local-variable' property of SYM is t. | ||
| 2577 | |||
| 2578 | * The `safe-local-variable' property of SYM is a function that | ||
| 2579 | evaluates to a non-nil value with VAL as an argument." | ||
| 2580 | (or (member (cons sym val) safe-local-variable-values) | ||
| 2581 | (let ((safep (get sym 'safe-local-variable))) | ||
| 2582 | (or (eq safep t) | ||
| 2583 | (and (functionp safep) | ||
| 2584 | (funcall safep val)))))) | ||
| 2585 | |||
| 2586 | (defun risky-local-variable-p (sym &optional ignored) | ||
| 2587 | "Non-nil if SYM could be dangerous as a file-local variable. | ||
| 2588 | It is dangerous if either of these conditions are met: | ||
| 2589 | |||
| 2590 | * Its `risky-local-variable' property is non-nil. | ||
| 2591 | |||
| 2592 | * Its name ends with \"hook(s)\", \"function(s)\", \"form(s)\", \"map\", | ||
| 2593 | \"program\", \"command(s)\", \"predicate(s)\", \"frame-alist\", | ||
| 2594 | \"mode-alist\", \"font-lock-(syntactic-)keyword*\", or | ||
| 2595 | \"map-alist\"." | ||
| 2462 | ;; If this is an alias, check the base name. | 2596 | ;; If this is an alias, check the base name. |
| 2463 | (condition-case nil | 2597 | (condition-case nil |
| 2464 | (setq sym (indirect-variable sym)) | 2598 | (setq sym (indirect-variable sym)) |
| 2465 | (error nil)) | 2599 | (error nil)) |
| 2466 | (let ((safep (get sym 'safe-local-variable))) | 2600 | (or (get sym 'risky-local-variable) |
| 2467 | (or (get sym 'risky-local-variable) | 2601 | (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|\ |
| 2468 | (and (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords-[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|-map$\\|-map-alist$" | 2602 | -commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords\ |
| 2469 | (symbol-name sym)) | 2603 | -[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|\ |
| 2470 | (not safep)) | 2604 | -map$\\|-map-alist$" (symbol-name sym)))) |
| 2471 | ;; If the safe-local-variable property isn't t or nil, | ||
| 2472 | ;; then it must return non-nil on the proposed value to be safe. | ||
| 2473 | (and (not (memq safep '(t nil))) | ||
| 2474 | (or (null val) | ||
| 2475 | (not (funcall safep val))))))) | ||
| 2476 | 2605 | ||
| 2477 | (defcustom safe-local-eval-forms nil | 2606 | (defcustom safe-local-eval-forms nil |
| 2478 | "*Expressions that are considered \"safe\" in an `eval:' local variable. | 2607 | "*Expressions that are considered \"safe\" in an `eval:' local variable. |
| @@ -2529,35 +2658,12 @@ asking you for confirmation." | |||
| 2529 | ok))))))) | 2658 | ok))))))) |
| 2530 | 2659 | ||
| 2531 | (defun hack-one-local-variable (var val) | 2660 | (defun hack-one-local-variable (var val) |
| 2532 | "\"Set\" one variable in a local variables spec. | 2661 | "Set local variable VAR with value VAL." |
| 2533 | A few patterns are specified so that any name which matches one | ||
| 2534 | is considered risky." | ||
| 2535 | (cond ((eq var 'mode) | 2662 | (cond ((eq var 'mode) |
| 2536 | (funcall (intern (concat (downcase (symbol-name val)) | 2663 | (funcall (intern (concat (downcase (symbol-name val)) |
| 2537 | "-mode")))) | 2664 | "-mode")))) |
| 2538 | ((eq var 'coding) | 2665 | ((eq var 'eval) |
| 2539 | ;; We have already handled coding: tag in set-auto-coding. | 2666 | (save-excursion (eval val))) |
| 2540 | nil) | ||
| 2541 | ((memq var ignored-local-variables) | ||
| 2542 | nil) | ||
| 2543 | ;; "Setting" eval means either eval it or do nothing. | ||
| 2544 | ;; Likewise for setting hook variables. | ||
| 2545 | ((risky-local-variable-p var val) | ||
| 2546 | ;; Permit evalling a put of a harmless property. | ||
| 2547 | ;; if the args do nothing tricky. | ||
| 2548 | (if (or (and (eq var 'eval) | ||
| 2549 | (hack-one-local-variable-eval-safep val)) | ||
| 2550 | ;; Permit eval if not root and user says ok. | ||
| 2551 | (and (not (zerop (user-uid))) | ||
| 2552 | (hack-local-variables-confirm | ||
| 2553 | "Process `eval' or hook local variables in %s? " | ||
| 2554 | enable-local-eval))) | ||
| 2555 | (if (eq var 'eval) | ||
| 2556 | (save-excursion (eval val)) | ||
| 2557 | (make-local-variable var) | ||
| 2558 | (set var val)) | ||
| 2559 | (message "Ignoring risky spec in the local variables list"))) | ||
| 2560 | ;; Ordinary variable, really set it. | ||
| 2561 | (t (make-local-variable var) | 2667 | (t (make-local-variable var) |
| 2562 | ;; Make sure the string has no text properties. | 2668 | ;; Make sure the string has no text properties. |
| 2563 | ;; Some text properties can get evaluated in various ways, | 2669 | ;; Some text properties can get evaluated in various ways, |
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index c7527fe21f5..5cedaa60e35 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el | |||
| @@ -359,9 +359,5 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 359 | 359 | ||
| 360 | (provide 'find-lisp) | 360 | (provide 'find-lisp) |
| 361 | 361 | ||
| 362 | ;; Local Variables: | ||
| 363 | ;; autocompile: t | ||
| 364 | ;; End: | ||
| 365 | |||
| 366 | ;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a | 362 | ;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a |
| 367 | ;;; find-lisp.el ends here | 363 | ;;; find-lisp.el ends here |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index be9436d350c..adca02f5b95 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2006-02-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * html2text.el (html2text-remove-tag-list): | ||
| 4 | * spam-stat.el (spam-stat-buffer-words): Fix typo in docstring. | ||
| 5 | |||
| 6 | 2006-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * gnus-cus.el: Revert 2005-10-17 change. | ||
| 9 | |||
| 1 | 2006-02-10 Reiner Steib <Reiner.Steib@gmx.de> | 10 | 2006-02-10 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 11 | ||
| 3 | * gnus.el: Remove bogus comment. | 12 | * gnus.el: Remove bogus comment. |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index fdce8d1b665..5acad8f721b 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -36,14 +36,6 @@ | |||
| 36 | 36 | ||
| 37 | ;;; Widgets: | 37 | ;;; Widgets: |
| 38 | 38 | ||
| 39 | (defvar gnus-custom-map | ||
| 40 | (let ((map (make-keymap))) | ||
| 41 | (set-keymap-parent map widget-keymap) | ||
| 42 | (suppress-keymap map) | ||
| 43 | (define-key map [mouse-1] 'widget-move-and-invoke) | ||
| 44 | map) | ||
| 45 | "Keymap for editing Gnus customization buffers.") | ||
| 46 | |||
| 47 | (defun gnus-custom-mode () | 39 | (defun gnus-custom-mode () |
| 48 | "Major mode for editing Gnus customization buffers. | 40 | "Major mode for editing Gnus customization buffers. |
| 49 | 41 | ||
| @@ -59,7 +51,7 @@ if that value is non-nil." | |||
| 59 | (kill-all-local-variables) | 51 | (kill-all-local-variables) |
| 60 | (setq major-mode 'gnus-custom-mode | 52 | (setq major-mode 'gnus-custom-mode |
| 61 | mode-name "Gnus Customize") | 53 | mode-name "Gnus Customize") |
| 62 | (use-local-map gnus-custom-map) | 54 | (use-local-map widget-keymap) |
| 63 | ;; Emacs 21 stuff: | 55 | ;; Emacs 21 stuff: |
| 64 | (when (and (facep 'custom-button-face) | 56 | (when (and (facep 'custom-button-face) |
| 65 | (facep 'custom-button-pressed-face)) | 57 | (facep 'custom-button-pressed-face)) |
| @@ -490,7 +482,7 @@ form, but who cares?" | |||
| 490 | (widget-create 'sexp | 482 | (widget-create 'sexp |
| 491 | :tag "Method" | 483 | :tag "Method" |
| 492 | :value (gnus-info-method info)))) | 484 | :value (gnus-info-method info)))) |
| 493 | (use-local-map gnus-custom-map) | 485 | (use-local-map widget-keymap) |
| 494 | (widget-setup) | 486 | (widget-setup) |
| 495 | (buffer-enable-undo) | 487 | (buffer-enable-undo) |
| 496 | (goto-char (point-min)))) | 488 | (goto-char (point-min)))) |
| @@ -884,7 +876,7 @@ articles in the thread. | |||
| 884 | '(repeat :inline t | 876 | '(repeat :inline t |
| 885 | :tag "Unknown entries" | 877 | :tag "Unknown entries" |
| 886 | sexp))) | 878 | sexp))) |
| 887 | (use-local-map gnus-custom-map) | 879 | (use-local-map widget-keymap) |
| 888 | (widget-setup))) | 880 | (widget-setup))) |
| 889 | 881 | ||
| 890 | (defun gnus-score-customize-done (&rest ignore) | 882 | (defun gnus-score-customize-done (&rest ignore) |
| @@ -1061,7 +1053,7 @@ articles in the thread. | |||
| 1061 | 1053 | ||
| 1062 | (gnus-agent-cat-prepare-category-field agent-enable-undownloaded-faces) | 1054 | (gnus-agent-cat-prepare-category-field agent-enable-undownloaded-faces) |
| 1063 | 1055 | ||
| 1064 | (use-local-map gnus-custom-map) | 1056 | (use-local-map widget-keymap) |
| 1065 | (widget-setup) | 1057 | (widget-setup) |
| 1066 | (buffer-enable-undo)))) | 1058 | (buffer-enable-undo)))) |
| 1067 | 1059 | ||
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index ceba84decf1..68934c909e9 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el | |||
| @@ -59,7 +59,7 @@ completely verbatim - without any use of REGEXP.") | |||
| 59 | 59 | ||
| 60 | This is a list of tags which should be removed, without any | 60 | This is a list of tags which should be removed, without any |
| 61 | formatting. Note that tags in the list are presented *without* | 61 | formatting. Note that tags in the list are presented *without* |
| 62 | any \"<\" or \">\". All occurences of a tag appearing in this | 62 | any \"<\" or \">\". All occurrences of a tag appearing in this |
| 63 | list are removed, irrespective of whether it is a closing or | 63 | list are removed, irrespective of whether it is a closing or |
| 64 | opening tag, or if the tag has additional attributes. The | 64 | opening tag, or if the tag has additional attributes. The |
| 65 | deletion is done by the function `html2text-remove-tags'. | 65 | deletion is done by the function `html2text-remove-tags'. |
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index 66f302d32e5..e21372bd649 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el | |||
| @@ -323,7 +323,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', | |||
| 323 | ,@body)) | 323 | ,@body)) |
| 324 | 324 | ||
| 325 | (defun spam-stat-buffer-words () | 325 | (defun spam-stat-buffer-words () |
| 326 | "Return a hash table of words and number of occurences in the buffer." | 326 | "Return a hash table of words and number of occurrences in the buffer." |
| 327 | (with-spam-stat-max-buffer-size | 327 | (with-spam-stat-max-buffer-size |
| 328 | (with-syntax-table spam-stat-syntax-table | 328 | (with-syntax-table spam-stat-syntax-table |
| 329 | (goto-char (point-min)) | 329 | (goto-char (point-min)) |
diff --git a/lisp/help.el b/lisp/help.el index bea404f5112..02045948ecb 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -510,7 +510,7 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." | |||
| 510 | (if (> (length keys) 0) | 510 | (if (> (length keys) 0) |
| 511 | (if remapped | 511 | (if remapped |
| 512 | (format "%s is remapped to %s which is on %s" | 512 | (format "%s is remapped to %s which is on %s" |
| 513 | definition symbol keys) | 513 | symbol remapped keys) |
| 514 | (format "%s is on %s" symbol keys)) | 514 | (format "%s is on %s" symbol keys)) |
| 515 | ;; If this is the command the user asked about, | 515 | ;; If this is the command the user asked about, |
| 516 | ;; and it is not on any key, say so. | 516 | ;; and it is not on any key, say so. |
| @@ -565,31 +565,30 @@ the last key hit are used. | |||
| 565 | 565 | ||
| 566 | If KEY is a menu item or a tool-bar button that is disabled, this command | 566 | If KEY is a menu item or a tool-bar button that is disabled, this command |
| 567 | temporarily enables it to allow getting help on disabled items and buttons." | 567 | temporarily enables it to allow getting help on disabled items and buttons." |
| 568 | (interactive) | 568 | (interactive |
| 569 | (let ((enable-disabled-menus-and-buttons t) | 569 | (let ((enable-disabled-menus-and-buttons t) |
| 570 | (save-yank-menu)) | 570 | (cursor-in-echo-area t) |
| 571 | (if key | 571 | saved-yank-menu) |
| 572 | ;; Non-interactive invocation | 572 | (unwind-protect |
| 573 | (describe-key-briefly-internal key insert untranslated) | 573 | (let (key) |
| 574 | ;; If yank-menu is empty, populate it temporarily, so that | 574 | ;; If yank-menu is empty, populate it temporarily, so that |
| 575 | ;; "Select and Paste" menu can generate a complete event | 575 | ;; "Select and Paste" menu can generate a complete event. |
| 576 | (if (null (cdr yank-menu)) | 576 | (when (null (cdr yank-menu)) |
| 577 | (unwind-protect | 577 | (setq saved-yank-menu (copy-sequence yank-menu)) |
| 578 | (progn | 578 | (menu-bar-update-yank-menu "(any string)" nil)) |
| 579 | (setq save-yank-menu (copy-sequence yank-menu)) | 579 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) |
| 580 | (menu-bar-update-yank-menu "(any string)" nil) | 580 | (list |
| 581 | (call-interactively 'describe-key-briefly-internal)) | 581 | key |
| 582 | (progn (setq yank-menu (copy-sequence save-yank-menu)) | 582 | (prefix-numeric-value current-prefix-arg) |
| 583 | (fset 'yank-menu (cons 'keymap yank-menu)))) | 583 | ;; If KEY is a down-event, read the corresponding up-event |
| 584 | (call-interactively 'describe-key-briefly-internal))))) | 584 | ;; and use it as the third argument. |
| 585 | 585 | (if (and (consp key) (symbolp (car key)) | |
| 586 | (defun describe-key-briefly-internal (key &optional insert untranslated) | 586 | (memq 'down (cdr (get (car key) 'event-symbol-elements)))) |
| 587 | "Print the name of the function KEY invokes. KEY is a string. | 587 | (read-event)))) |
| 588 | If INSERT (the prefix arg) is non-nil, insert the message in the buffer. | 588 | ;; Put yank-menu back as it was, if we changed it. |
| 589 | If non-nil UNTRANSLATED is a vector of the untranslated events. | 589 | (when saved-yank-menu |
| 590 | It can also be a number in which case the untranslated events from | 590 | (setq yank-menu (copy-sequence saved-yank-menu)) |
| 591 | the last key hit are used." | 591 | (fset 'yank-menu (cons 'keymap yank-menu)))))) |
| 592 | (interactive "kDescribe key briefly: \nP\np") | ||
| 593 | (if (numberp untranslated) | 592 | (if (numberp untranslated) |
| 594 | (setq untranslated (this-single-command-raw-keys))) | 593 | (setq untranslated (this-single-command-raw-keys))) |
| 595 | (save-excursion | 594 | (save-excursion |
| @@ -611,6 +610,11 @@ the last key hit are used." | |||
| 611 | (let ((defn (or (string-key-binding key) | 610 | (let ((defn (or (string-key-binding key) |
| 612 | (key-binding key t))) | 611 | (key-binding key t))) |
| 613 | key-desc) | 612 | key-desc) |
| 613 | ;; Handle the case where we faked an entry in "Select and Paste" menu. | ||
| 614 | (if (and (eq defn nil) | ||
| 615 | (stringp (aref key (1- (length key)))) | ||
| 616 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) | ||
| 617 | (setq defn 'menu-bar-select-yank)) | ||
| 614 | ;; Don't bother user with strings from (e.g.) the select-paste menu. | 618 | ;; Don't bother user with strings from (e.g.) the select-paste menu. |
| 615 | (if (stringp (aref key (1- (length key)))) | 619 | (if (stringp (aref key (1- (length key)))) |
| 616 | (aset key (1- (length key)) "(any string)")) | 620 | (aset key (1- (length key)) "(any string)")) |
| @@ -641,35 +645,30 @@ UP-EVENT is the up-event that was discarded by reading KEY, or nil. | |||
| 641 | 645 | ||
| 642 | If KEY is a menu item or a tool-bar button that is disabled, this command | 646 | If KEY is a menu item or a tool-bar button that is disabled, this command |
| 643 | temporarily enables it to allow getting help on disabled items and buttons." | 647 | temporarily enables it to allow getting help on disabled items and buttons." |
| 644 | (interactive) | 648 | (interactive |
| 645 | (let ((enable-disabled-menus-and-buttons t) | 649 | (let ((enable-disabled-menus-and-buttons t) |
| 646 | (save-yank-menu)) | 650 | (cursor-in-echo-area t) |
| 647 | (if key | 651 | saved-yank-menu) |
| 648 | ;; Non-interactive invocation | 652 | (unwind-protect |
| 649 | (describe-key-internal key untranslated up-event) | 653 | (let (key) |
| 650 | ;; If yank-menu is empty, populate it temporarily, so that | 654 | ;; If yank-menu is empty, populate it temporarily, so that |
| 651 | ;; "Select and Paste" menu can generate a complete event | 655 | ;; "Select and Paste" menu can generate a complete event. |
| 652 | (if (null (cdr yank-menu)) | 656 | (when (null (cdr yank-menu)) |
| 653 | (unwind-protect | 657 | (setq saved-yank-menu (copy-sequence yank-menu)) |
| 654 | (progn | 658 | (menu-bar-update-yank-menu "(any string)" nil)) |
| 655 | (setq save-yank-menu (copy-sequence yank-menu)) | 659 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) |
| 656 | (menu-bar-update-yank-menu "(any string)" nil) | 660 | (list |
| 657 | (call-interactively 'describe-key-internal)) | 661 | key |
| 658 | (progn (setq yank-menu (copy-sequence save-yank-menu)) | 662 | (prefix-numeric-value current-prefix-arg) |
| 659 | (fset 'yank-menu (cons 'keymap yank-menu)))) | 663 | ;; If KEY is a down-event, read the corresponding up-event |
| 660 | (call-interactively 'describe-key-internal))))) | 664 | ;; and use it as the third argument. |
| 661 | 665 | (if (and (consp key) (symbolp (car key)) | |
| 662 | (defun describe-key-internal (key &optional untranslated up-event) | 666 | (memq 'down (cdr (get (car key) 'event-symbol-elements)))) |
| 663 | "Display documentation of the function invoked by KEY. | 667 | (read-event)))) |
| 664 | KEY can be any kind of a key sequence; it can include keyboard events, | 668 | ;; Put yank-menu back as it was, if we changed it. |
| 665 | mouse events, and/or menu events. When calling from a program, | 669 | (when saved-yank-menu |
| 666 | pass KEY as a string or a vector. | 670 | (setq yank-menu (copy-sequence saved-yank-menu)) |
| 667 | 671 | (fset 'yank-menu (cons 'keymap yank-menu)))))) | |
| 668 | If non-nil, UNTRANSLATED is a vector of the corresponding untranslated events. | ||
| 669 | It can also be a number, in which case the untranslated events from | ||
| 670 | the last key sequence entered are used. | ||
| 671 | UP-EVENT is the up-event that was discarded by reading KEY, or nil." | ||
| 672 | (interactive "kDescribe key (or click or menu item): \np\nU") | ||
| 673 | (if (numberp untranslated) | 672 | (if (numberp untranslated) |
| 674 | (setq untranslated (this-single-command-raw-keys))) | 673 | (setq untranslated (this-single-command-raw-keys))) |
| 675 | (save-excursion | 674 | (save-excursion |
| @@ -686,6 +685,11 @@ UP-EVENT is the up-event that was discarded by reading KEY, or nil." | |||
| 686 | (set-buffer (window-buffer window)) | 685 | (set-buffer (window-buffer window)) |
| 687 | (goto-char position)) | 686 | (goto-char position)) |
| 688 | (let ((defn (or (string-key-binding key) (key-binding key t)))) | 687 | (let ((defn (or (string-key-binding key) (key-binding key t)))) |
| 688 | ;; Handle the case where we faked an entry in "Select and Paste" menu. | ||
| 689 | (if (and (eq defn nil) | ||
| 690 | (stringp (aref key (1- (length key)))) | ||
| 691 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) | ||
| 692 | (setq defn 'menu-bar-select-yank)) | ||
| 689 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) | 693 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) |
| 690 | (message "%s is undefined" (help-key-description key untranslated)) | 694 | (message "%s is undefined" (help-key-description key untranslated)) |
| 691 | (help-setup-xref (list #'describe-function defn) (interactive-p)) | 695 | (help-setup-xref (list #'describe-function defn) (interactive-p)) |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index f835d91ff9a..191f1d324e6 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -325,7 +325,7 @@ are exhibited within the square braces.)" | |||
| 325 | 325 | ||
| 326 | ;;;_* Local emacs vars. | 326 | ;;;_* Local emacs vars. |
| 327 | ;;;Local variables: | 327 | ;;;Local variables: |
| 328 | ;;;outline-layout: (-2 :) | 328 | ;;;allout-layout: (-2 :) |
| 329 | ;;;End: | 329 | ;;;End: |
| 330 | 330 | ||
| 331 | ;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f | 331 | ;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f |
diff --git a/lisp/info.el b/lisp/info.el index fa1e3060c10..e3514fb9729 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -134,7 +134,7 @@ The Lisp code is executed when the node is selected.") | |||
| 134 | :group 'info) | 134 | :group 'info) |
| 135 | 135 | ||
| 136 | (defface info-xref-visited | 136 | (defface info-xref-visited |
| 137 | '((t :inherit link-visited)) | 137 | '((t :inherit (link-visited info-xref))) |
| 138 | "Face for visited Info cross-references." | 138 | "Face for visited Info cross-references." |
| 139 | :version "22.1" | 139 | :version "22.1" |
| 140 | :group 'info) | 140 | :group 'info) |
| @@ -1407,11 +1407,13 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." | |||
| 1407 | (concat | 1407 | (concat |
| 1408 | " (" | 1408 | " (" |
| 1409 | (if (stringp Info-current-file) | 1409 | (if (stringp Info-current-file) |
| 1410 | (file-name-nondirectory Info-current-file) | 1410 | (replace-regexp-in-string |
| 1411 | "%" "%%" (file-name-nondirectory Info-current-file)) | ||
| 1411 | "") | 1412 | "") |
| 1412 | ") " | 1413 | ") " |
| 1413 | (if Info-current-node | 1414 | (if Info-current-node |
| 1414 | (propertize Info-current-node | 1415 | (propertize (replace-regexp-in-string |
| 1416 | "%" "%%" Info-current-node) | ||
| 1415 | 'face 'mode-line-buffer-id | 1417 | 'face 'mode-line-buffer-id |
| 1416 | 'help-echo | 1418 | 'help-echo |
| 1417 | "mouse-1: scroll forward, mouse-3: scroll back" | 1419 | "mouse-1: scroll forward, mouse-3: scroll back" |
| @@ -3352,7 +3354,7 @@ Advanced commands: | |||
| 3352 | \\[Info-search-case-sensitively] Search through this Info file for specified regexp case-sensitively. | 3354 | \\[Info-search-case-sensitively] Search through this Info file for specified regexp case-sensitively. |
| 3353 | \\[Info-search-next] Search for another occurrence of regexp | 3355 | \\[Info-search-next] Search for another occurrence of regexp |
| 3354 | from a previous \\<Info-mode-map>\\[Info-search] command. | 3356 | from a previous \\<Info-mode-map>\\[Info-search] command. |
| 3355 | \\[Info-index] Look up a topic in this manual's Index and move to that index entry. | 3357 | \\[Info-index] Search for a topic in this manual's Index and go to index entry. |
| 3356 | \\[Info-index-next] (comma) Move to the next match from a previous \\<Info-mode-map>\\[Info-index] command. | 3358 | \\[Info-index-next] (comma) Move to the next match from a previous \\<Info-mode-map>\\[Info-index] command. |
| 3357 | \\[info-apropos] Look for a string in the indices of all manuals. | 3359 | \\[info-apropos] Look for a string in the indices of all manuals. |
| 3358 | \\[Info-goto-node] Move to node specified by name. | 3360 | \\[Info-goto-node] Move to node specified by name. |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 349bae9f072..3dcf689767a 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2006-02-15 Peter S Galbraith <psg@debian.org> | ||
| 2 | |||
| 3 | * mh-compat.el (mh-image-search-load-path): Compatibility code. | ||
| 4 | Emacs 21 and XEmacs don't have `image-search-load-path'. | ||
| 5 | |||
| 6 | * mh-utils.el (mh-image-load-path): Don't bail out on error if the | ||
| 7 | images are already found. | ||
| 8 | |||
| 1 | 2006-02-10 Bill Wohler <wohler@newt.com> | 9 | 2006-02-10 Bill Wohler <wohler@newt.com> |
| 2 | 10 | ||
| 3 | * mh-search.el (mh-search): Wrap code in (block mh-search ...) | 11 | * mh-search.el (mh-search): Wrap code in (block mh-search ...) |
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 090ee51c5fc..4bc5fdf36f7 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el | |||
| @@ -115,6 +115,12 @@ introduced in Emacs 22." | |||
| 115 | `(face-background ,face ,frame) | 115 | `(face-background ,face ,frame) |
| 116 | `(face-background ,face ,frame ,inherit))) | 116 | `(face-background ,face ,frame ,inherit))) |
| 117 | 117 | ||
| 118 | (mh-defun-compat mh-image-search-load-path | ||
| 119 | image-search-load-path (file &optional path) | ||
| 120 | "Emacs 21 and XEmacs don't have `image-search-load-path'. | ||
| 121 | This function returns nil on those systems." | ||
| 122 | nil) | ||
| 123 | |||
| 118 | ;; For XEmacs. | 124 | ;; For XEmacs. |
| 119 | (defalias 'mh-line-beginning-position | 125 | (defalias 'mh-line-beginning-position |
| 120 | (if (fboundp 'line-beginning-position) | 126 | (if (fboundp 'line-beginning-position) |
| @@ -131,7 +137,7 @@ introduced in Emacs 22." | |||
| 131 | (mh-defun-compat mh-mail-abbrev-make-syntax-table | 137 | (mh-defun-compat mh-mail-abbrev-make-syntax-table |
| 132 | mail-abbrev-make-syntax-table () | 138 | mail-abbrev-make-syntax-table () |
| 133 | "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. | 139 | "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. |
| 134 | This function does nothing on those systems." | 140 | This function returns nil on those systems." |
| 135 | nil) | 141 | nil) |
| 136 | 142 | ||
| 137 | (mh-defun-compat mh-match-string-no-properties | 143 | (mh-defun-compat mh-match-string-no-properties |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index dc86d19ae77..bf0d29fd2a7 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -109,21 +109,41 @@ already there. | |||
| 109 | 109 | ||
| 110 | See also variable `mh-image-load-path-called-flag'." | 110 | See also variable `mh-image-load-path-called-flag'." |
| 111 | (unless mh-image-load-path-called-flag | 111 | (unless mh-image-load-path-called-flag |
| 112 | (if (or (not mh-image-load-path) | 112 | (cond |
| 113 | (not (file-exists-p mh-image-load-path))) | 113 | ((and mh-image-load-path |
| 114 | (let (mh-library-name) | 114 | (file-exists-p (expand-file-name "mh-logo.xpm" |
| 115 | ;; First, find mh-e in the load-path. | 115 | mh-image-load-path)))) |
| 116 | (setq mh-library-name (locate-library "mh-e")) | 116 | ;; User setting exists. We're done. |
| 117 | (if (not mh-library-name) | 117 | ((and mh-image-load-path |
| 118 | (error "Can not find MH-E in load-path")) | 118 | (not (file-exists-p (expand-file-name "mh-logo.xpm" |
| 119 | (setq mh-image-load-path | 119 | mh-image-load-path)))) |
| 120 | (expand-file-name (concat (file-name-directory mh-library-name) | 120 | ;; User setting does not exist. |
| 121 | "../../etc/images"))))) | 121 | (message "Variable mh-image-load-path %s does not contain MH-E images" |
| 122 | (if (not (file-exists-p mh-image-load-path)) | 122 | mh-image-load-path)) |
| 123 | (error "Can not find image directory %s" mh-image-load-path)) | 123 | ((mh-image-search-load-path "mh-logo.xpm") |
| 124 | (if (boundp 'image-load-path) | 124 | ;; Emacs 22 already knows where the images are. |
| 125 | (add-to-list 'image-load-path mh-image-load-path) | 125 | (setq mh-image-load-path |
| 126 | (add-to-list 'load-path mh-image-load-path)) | 126 | (file-name-directory (mh-image-search-load-path "mh-logo.xpm")))) |
| 127 | ((locate-library "mh-logo.xpm") | ||
| 128 | ;; Other Emacs already knows where the images are... | ||
| 129 | (setq mh-image-load-path | ||
| 130 | (file-name-directory (locate-library "mh-logo.xpm")))) | ||
| 131 | (t | ||
| 132 | ;; Guess `mh-image-load-path' if it wasn't provided by the user. | ||
| 133 | (let (mh-library-name) | ||
| 134 | ;; First, find mh-e in the load-path. | ||
| 135 | (setq mh-library-name (locate-library "mh-e")) | ||
| 136 | (if (not mh-library-name) | ||
| 137 | (error "Can not find MH-E in load-path")) | ||
| 138 | (setq mh-image-load-path | ||
| 139 | (expand-file-name (concat | ||
| 140 | (file-name-directory mh-library-name) | ||
| 141 | "../../etc/images")))) | ||
| 142 | (if (not (file-exists-p mh-image-load-path)) | ||
| 143 | (error "Can not find image directory %s" mh-image-load-path)) | ||
| 144 | (if (boundp 'image-load-path) | ||
| 145 | (add-to-list 'image-load-path mh-image-load-path) | ||
| 146 | (add-to-list 'load-path mh-image-load-path)))) | ||
| 127 | (setq mh-image-load-path-called-flag t))) | 147 | (setq mh-image-load-path-called-flag t))) |
| 128 | 148 | ||
| 129 | ;;;###mh-autoload | 149 | ;;;###mh-autoload |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 9922b0f9aed..3a22fb49b04 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -481,21 +481,8 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 481 | 481 | ||
| 482 | ;; grow/shrink minibuffer? | 482 | ;; grow/shrink minibuffer? |
| 483 | (if should-enlarge-minibuffer | 483 | (if should-enlarge-minibuffer |
| 484 | (progn | 484 | (unless resize-mini-windows |
| 485 | ;; yes. briefly select minibuffer so | 485 | (mouse-drag-move-window-bottom start-event-window growth)) |
| 486 | ;; enlarge-window will affect the | ||
| 487 | ;; correct window. | ||
| 488 | (select-window minibuffer) | ||
| 489 | ;; scale back shrinkage if it would | ||
| 490 | ;; make the minibuffer less than 1 | ||
| 491 | ;; line tall. | ||
| 492 | (if (and (> growth 0) | ||
| 493 | (< (- (window-height minibuffer) | ||
| 494 | growth) | ||
| 495 | 1)) | ||
| 496 | (setq growth (1- (window-height minibuffer)))) | ||
| 497 | (enlarge-window (- growth)) | ||
| 498 | (select-window start-event-window)) | ||
| 499 | ;; no. grow/shrink the selected window | 486 | ;; no. grow/shrink the selected window |
| 500 | ;(message "growth = %d" growth) | 487 | ;(message "growth = %d" growth) |
| 501 | (if mode-line-p | 488 | (if mode-line-p |
diff --git a/lisp/mwheel.el b/lisp/mwheel.el index aca959e8577..662b992b343 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | mouse-wheel-click-button)) | 91 | mouse-wheel-click-button)) |
| 92 | "Event that should be temporarily inhibited after mouse scrolling. | 92 | "Event that should be temporarily inhibited after mouse scrolling. |
| 93 | The mouse wheel is typically on the mouse-2 button, so it may easily | 93 | The mouse wheel is typically on the mouse-2 button, so it may easily |
| 94 | happen that text is accidentially yanked into the buffer when | 94 | happen that text is accidentally yanked into the buffer when |
| 95 | scrolling with the mouse wheel. To prevent that, this variable can be | 95 | scrolling with the mouse wheel. To prevent that, this variable can be |
| 96 | set to the event sent when clicking on the mouse wheel button." | 96 | set to the event sent when clicking on the mouse wheel button." |
| 97 | :group 'mouse | 97 | :group 'mouse |
| @@ -220,7 +220,7 @@ This should only be bound to mouse buttons 4 and 5." | |||
| 220 | (define-minor-mode mouse-wheel-mode | 220 | (define-minor-mode mouse-wheel-mode |
| 221 | "Toggle mouse wheel support. | 221 | "Toggle mouse wheel support. |
| 222 | With prefix argument ARG, turn on if positive, otherwise off. | 222 | With prefix argument ARG, turn on if positive, otherwise off. |
| 223 | Returns non-nil if the new state is enabled." | 223 | Return non-nil if the new state is enabled." |
| 224 | :global t | 224 | :global t |
| 225 | :group 'mouse | 225 | :group 'mouse |
| 226 | (let* ((dn mouse-wheel-down-event) | 226 | (let* ((dn mouse-wheel-down-event) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c0bf8be3cf8..971b65bf25c 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -929,7 +929,7 @@ the of the following escape sequences replaced by the described values: | |||
| 929 | %fp Following text uses the face `rcirc-server-prefix' | 929 | %fp Following text uses the face `rcirc-server-prefix' |
| 930 | %fs Following text uses the face `rcirc-server' | 930 | %fs Following text uses the face `rcirc-server' |
| 931 | %f[FACE] Following text uses the face FACE | 931 | %f[FACE] Following text uses the face FACE |
| 932 | %f- Following text uses the default face | 932 | %f- Following text uses the default face |
| 933 | %% A literal `%' character | 933 | %% A literal `%' character |
| 934 | " | 934 | " |
| 935 | :type '(alist :key-type (choice (string :tag "Type") | 935 | :type '(alist :key-type (choice (string :tag "Type") |
| @@ -957,59 +957,56 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 957 | (setq chunk (substring chunk 1))) | 957 | (setq chunk (substring chunk 1))) |
| 958 | (setq repl | 958 | (setq repl |
| 959 | (cond ((eq key ?%) | 959 | (cond ((eq key ?%) |
| 960 | ;; %% -- literal % character ; | 960 | ;; %% -- literal % character |
| 961 | "%") | 961 | "%") |
| 962 | ((eq key ?n) | 962 | ((eq key ?n) |
| 963 | ;; %n -- nick ; | 963 | ;; %n -- nick |
| 964 | (rcirc-facify (concat (rcirc-abbrev-nick sender) | 964 | (rcirc-facify (concat (rcirc-abbrev-nick sender) |
| 965 | (and target (concat "," target))) | 965 | (and target (concat "," target))) |
| 966 | (if (string= sender (rcirc-nick process)) | 966 | (if (string= sender (rcirc-nick process)) |
| 967 | 'rcirc-my-nick | 967 | 'rcirc-my-nick |
| 968 | 'rcirc-other-nick))) | 968 | 'rcirc-other-nick))) |
| 969 | ((eq key ?T) | 969 | ((eq key ?T) |
| 970 | ;; %T -- timestamp ; | 970 | ;; %T -- timestamp |
| 971 | (rcirc-facify | 971 | (rcirc-facify |
| 972 | (format-time-string rcirc-time-format (current-time)) | 972 | (format-time-string rcirc-time-format (current-time)) |
| 973 | 'rcirc-timestamp)) | 973 | 'rcirc-timestamp)) |
| 974 | ((eq key ?m) | 974 | ((eq key ?m) |
| 975 | ;; %m -- message text ; | 975 | ;; %m -- message text |
| 976 | ;; We add the text property `rcirc-text' to identify this ; | 976 | ;; We add the text property `rcirc-text' to identify this |
| 977 | ;; as the body text. ; | 977 | ;; as the body text. |
| 978 | (propertize | 978 | (propertize |
| 979 | (rcirc-mangle-text process (rcirc-facify text face)) | 979 | (rcirc-mangle-text process (rcirc-facify text face)) |
| 980 | 'rcirc-text text)) | 980 | 'rcirc-text text)) |
| 981 | ((eq key ?t) | 981 | ((eq key ?t) |
| 982 | ;; %t -- target ; | 982 | ;; %t -- target |
| 983 | (rcirc-facify (or rcirc-target "") face)) | 983 | (rcirc-facify (or rcirc-target "") face)) |
| 984 | ((eq key ?r) | 984 | ((eq key ?r) |
| 985 | ;; %r -- response ; | 985 | ;; %r -- response |
| 986 | (rcirc-facify response face)) | 986 | (rcirc-facify response face)) |
| 987 | ((eq key ?f) | 987 | ((eq key ?f) |
| 988 | ;; %f -- change face ; | 988 | ;; %f -- change face |
| 989 | (setq face-key (aref chunk 0)) | 989 | (setq face-key (aref chunk 0)) |
| 990 | (setq chunk (substring chunk 1)) | ||
| 990 | (cond ((eq face-key ?w) | 991 | (cond ((eq face-key ?w) |
| 991 | ;; %fw -- warning face ; | 992 | ;; %fw -- warning face |
| 992 | (setq face 'font-lock-warning-face)) | 993 | (setq face 'font-lock-warning-face)) |
| 993 | ((eq face-key ?p) | 994 | ((eq face-key ?p) |
| 994 | ;; %fp -- server-prefix face ; | 995 | ;; %fp -- server-prefix face |
| 995 | (setq face 'rcirc-server-prefix)) | 996 | (setq face 'rcirc-server-prefix)) |
| 996 | ((eq face-key ?s) | 997 | ((eq face-key ?s) |
| 997 | ;; %fs -- warning face ; | 998 | ;; %fs -- warning face |
| 998 | (setq face 'rcirc-server)) | 999 | (setq face 'rcirc-server)) |
| 999 | ((eq face-key ?-) | 1000 | ((eq face-key ?-) |
| 1000 | ;; %fs -- warning face ; | 1001 | ;; %fs -- warning face |
| 1001 | (setq face nil)) | 1002 | (setq face nil)) |
| 1002 | ((and (eq face-key ?\[) | 1003 | ((and (eq face-key ?\[) |
| 1003 | (string-match "^[[]\\([^]]*\\)[]]" chunk) | 1004 | (string-match "^\\([^]]*\\)[]]" chunk) |
| 1004 | (facep (match-string 1 chunk))) | 1005 | (facep (match-string 1 chunk))) |
| 1005 | ;; %f[...] -- named face ; | 1006 | ;; %f[...] -- named face |
| 1006 | (setq face (intern (match-string 1 chunk))) | 1007 | (setq face (intern (match-string 1 chunk))) |
| 1007 | (setq chunk (substring chunk (match-end 1))))) | 1008 | (setq chunk (substring chunk (match-end 0))))) |
| 1008 | (setq chunk (substring chunk 1)) | 1009 | ""))) |
| 1009 | "") | ||
| 1010 | (t | ||
| 1011 | ;; just insert the key literally ; | ||
| 1012 | (rcirc-facify (substring chunk 0 1) face)))) | ||
| 1013 | (setq result (concat result repl (rcirc-facify chunk face)))) | 1010 | (setq result (concat result repl (rcirc-facify chunk face)))) |
| 1014 | result)) | 1011 | result)) |
| 1015 | 1012 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index afe5308a918..58f74133cd5 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -836,8 +836,10 @@ The default value is to use the same value as `tramp-rsh-end-of-line'." | |||
| 836 | :type 'string) | 836 | :type 'string) |
| 837 | 837 | ||
| 838 | (defcustom tramp-remote-path | 838 | (defcustom tramp-remote-path |
| 839 | '("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin" "/usr/ccs/bin" | 839 | ;; "/usr/xpg4/bin" has been placed first, because on Solaris a POSIX |
| 840 | "/local/bin" "/local/freeware/bin" "/local/gnu/bin" | 840 | ;; compatible "id" is needed. |
| 841 | '("/usr/xpg4/bin" "/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin" | ||
| 842 | "/usr/ccs/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" | ||
| 841 | "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin") | 843 | "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin") |
| 842 | "*List of directories to search for executables on remote host. | 844 | "*List of directories to search for executables on remote host. |
| 843 | Please notify me about other semi-standard directories to include here. | 845 | Please notify me about other semi-standard directories to include here. |
| @@ -1735,7 +1737,7 @@ on the remote host.") | |||
| 1735 | (defvar tramp-perl-encode | 1737 | (defvar tramp-perl-encode |
| 1736 | "%s -e ' | 1738 | "%s -e ' |
| 1737 | # This script contributed by Juanma Barranquero <lektu@terra.es>. | 1739 | # This script contributed by Juanma Barranquero <lektu@terra.es>. |
| 1738 | # Copyright (C) 2006 Free Software Foundation, Inc. | 1740 | # Copyright (C) 2002, 2006 Free Software Foundation, Inc. |
| 1739 | use strict; | 1741 | use strict; |
| 1740 | 1742 | ||
| 1741 | my %%trans = do { | 1743 | my %%trans = do { |
| @@ -1777,7 +1779,7 @@ This string is passed to `format', so percent characters need to be doubled.") | |||
| 1777 | (defvar tramp-perl-decode | 1779 | (defvar tramp-perl-decode |
| 1778 | "%s -e ' | 1780 | "%s -e ' |
| 1779 | # This script contributed by Juanma Barranquero <lektu@terra.es>. | 1781 | # This script contributed by Juanma Barranquero <lektu@terra.es>. |
| 1780 | # Copyright (C) 2006 Free Software Foundation, Inc. | 1782 | # Copyright (C) 2002, 2006 Free Software Foundation, Inc. |
| 1781 | use strict; | 1783 | use strict; |
| 1782 | 1784 | ||
| 1783 | my %%trans = do { | 1785 | my %%trans = do { |
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index ed4181e5b8d..63d7a9fe33a 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -1694,13 +1694,13 @@ Use \\[describe-mode] for more info." | |||
| 1694 | 1694 | ||
| 1695 | ;;;_ + Local variables | 1695 | ;;;_ + Local variables |
| 1696 | 1696 | ||
| 1697 | ;;; The following `outline-layout' local variable setting: | 1697 | ;;; The following `allout-layout' local variable setting: |
| 1698 | ;;; - closes all topics from the first topic to just before the third-to-last, | 1698 | ;;; - closes all topics from the first topic to just before the third-to-last, |
| 1699 | ;;; - shows the children of the third to last (config vars) | 1699 | ;;; - shows the children of the third to last (config vars) |
| 1700 | ;;; - and the second to last (code section), | 1700 | ;;; - and the second to last (code section), |
| 1701 | ;;; - and closes the last topic (this local-variables section). | 1701 | ;;; - and closes the last topic (this local-variables section). |
| 1702 | ;;;Local variables: | 1702 | ;;;Local variables: |
| 1703 | ;;;outline-layout: (0 : -1 -1 0) | 1703 | ;;;allout-layout: (0 : -1 -1 0) |
| 1704 | ;;;End: | 1704 | ;;;End: |
| 1705 | 1705 | ||
| 1706 | (provide 'landmark) | 1706 | (provide 'landmark) |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 0d8d7bebbcb..29f1036b1bb 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -4236,7 +4236,7 @@ NUMBER-OF-STATIC-VARIABLES:" | |||
| 4236 | "*Keymap for Ebrowse commands.") | 4236 | "*Keymap for Ebrowse commands.") |
| 4237 | 4237 | ||
| 4238 | 4238 | ||
| 4239 | (defvar ebrowse-global-prefix-key "\C-cb" | 4239 | (defvar ebrowse-global-prefix-key "\C-cC-m" |
| 4240 | "Prefix key for Ebrowse commands.") | 4240 | "Prefix key for Ebrowse commands.") |
| 4241 | 4241 | ||
| 4242 | 4242 | ||
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 9a6024c8e8b..4f197e34bfe 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -339,7 +339,7 @@ Return its file name if found, or nil if not found." | |||
| 339 | nil))))) | 339 | nil))))) |
| 340 | 340 | ||
| 341 | (defun flymake-fix-file-name (name) | 341 | (defun flymake-fix-file-name (name) |
| 342 | "Replace all occurences of '\' with '/'." | 342 | "Replace all occurrences of '\' with '/'." |
| 343 | (when name | 343 | (when name |
| 344 | (setq name (expand-file-name name)) | 344 | (setq name (expand-file-name name)) |
| 345 | (setq name (abbreviate-file-name name)) | 345 | (setq name (abbreviate-file-name name)) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 755e83646fc..49f6c64c1a7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -185,7 +185,6 @@ handlers.") | |||
| 185 | "Font lock keywords used in `gdb-local-mode'.") | 185 | "Font lock keywords used in `gdb-local-mode'.") |
| 186 | 186 | ||
| 187 | ;; Variables for GDB 6.4+ | 187 | ;; Variables for GDB 6.4+ |
| 188 | |||
| 189 | (defvar gdb-register-names nil "List of register names.") | 188 | (defvar gdb-register-names nil "List of register names.") |
| 190 | (defvar gdb-changed-registers nil | 189 | (defvar gdb-changed-registers nil |
| 191 | "List of changed register numbers (strings).") | 190 | "List of changed register numbers (strings).") |
| @@ -203,7 +202,7 @@ other with the source file with the main routine of the inferior. | |||
| 203 | 202 | ||
| 204 | If `gdb-many-windows' is t, regardless of the value of | 203 | If `gdb-many-windows' is t, regardless of the value of |
| 205 | `gdb-show-main', the layout below will appear unless | 204 | `gdb-show-main', the layout below will appear unless |
| 206 | `gdb-use-inferior-io-buffer' is nil when the source buffer | 205 | `gdb-use-separate-io-buffer' is nil when the source buffer |
| 207 | occupies the full width of the frame. Keybindings are given in | 206 | occupies the full width of the frame. Keybindings are given in |
| 208 | relevant buffer. | 207 | relevant buffer. |
| 209 | 208 | ||
| @@ -281,26 +280,26 @@ Also display the main routine in the disassembly buffer if present." | |||
| 281 | :group 'gud | 280 | :group 'gud |
| 282 | :version "22.1") | 281 | :version "22.1") |
| 283 | 282 | ||
| 284 | (defcustom gdb-use-inferior-io-buffer nil | 283 | (defcustom gdb-use-separate-io-buffer nil |
| 285 | "Non-nil means display output from the inferior in a separate buffer." | 284 | "Non-nil means display output from the inferior in a separate buffer." |
| 286 | :type 'boolean | 285 | :type 'boolean |
| 287 | :group 'gud | 286 | :group 'gud |
| 288 | :version "22.1") | 287 | :version "22.1") |
| 289 | 288 | ||
| 290 | (defun gdb-use-inferior-io-buffer (arg) | 289 | (defun gdb-use-separate-io-buffer (arg) |
| 291 | "Toggle separate IO for inferior. | 290 | "Toggle separate IO for inferior. |
| 292 | With arg, use separate IO iff arg is positive." | 291 | With arg, use separate IO iff arg is positive." |
| 293 | (interactive "P") | 292 | (interactive "P") |
| 294 | (setq gdb-use-inferior-io-buffer | 293 | (setq gdb-use-separate-io-buffer |
| 295 | (if (null arg) | 294 | (if (null arg) |
| 296 | (not gdb-use-inferior-io-buffer) | 295 | (not gdb-use-separate-io-buffer) |
| 297 | (> (prefix-numeric-value arg) 0))) | 296 | (> (prefix-numeric-value arg) 0))) |
| 298 | (message (format "Separate inferior IO %sabled" | 297 | (message (format "Separate inferior IO %sabled" |
| 299 | (if gdb-use-inferior-io-buffer "en" "dis"))) | 298 | (if gdb-use-separate-io-buffer "en" "dis"))) |
| 300 | (if (and gud-comint-buffer | 299 | (if (and gud-comint-buffer |
| 301 | (buffer-name gud-comint-buffer)) | 300 | (buffer-name gud-comint-buffer)) |
| 302 | (condition-case nil | 301 | (condition-case nil |
| 303 | (if gdb-use-inferior-io-buffer | 302 | (if gdb-use-separate-io-buffer |
| 304 | (gdb-restore-windows) | 303 | (gdb-restore-windows) |
| 305 | (kill-buffer (gdb-inferior-io-name))) | 304 | (kill-buffer (gdb-inferior-io-name))) |
| 306 | (error nil)))) | 305 | (error nil)))) |
| @@ -462,7 +461,7 @@ With arg, use separate IO iff arg is positive." | |||
| 462 | 461 | ||
| 463 | (setq gdb-buffer-type 'gdba) | 462 | (setq gdb-buffer-type 'gdba) |
| 464 | 463 | ||
| 465 | (if gdb-use-inferior-io-buffer (gdb-clear-inferior-io)) | 464 | (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) |
| 466 | 465 | ||
| 467 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) | 466 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) |
| 468 | (setq gdb-version nil) | 467 | (setq gdb-version nil) |
| @@ -571,7 +570,7 @@ With arg, automatically raise speedbar iff arg is positive." | |||
| 571 | (set-text-properties 0 (length expr) nil expr) | 570 | (set-text-properties 0 (length expr) nil expr) |
| 572 | (gdb-enqueue-input | 571 | (gdb-enqueue-input |
| 573 | (list | 572 | (list |
| 574 | (if (eq gud-minor-mode 'gdba) | 573 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 575 | (concat "server interpreter mi \"-var-create - * " expr "\"\n") | 574 | (concat "server interpreter mi \"-var-create - * " expr "\"\n") |
| 576 | (concat"-var-create - * " expr "\n")) | 575 | (concat"-var-create - * " expr "\n")) |
| 577 | `(lambda () (gdb-var-create-handler ,expr)))))))) | 576 | `(lambda () (gdb-var-create-handler ,expr)))))))) |
| @@ -594,8 +593,7 @@ With arg, automatically raise speedbar iff arg is positive." | |||
| 594 | (speedbar-change-initial-expansion-list "GUD")) | 593 | (speedbar-change-initial-expansion-list "GUD")) |
| 595 | (gdb-enqueue-input | 594 | (gdb-enqueue-input |
| 596 | (list | 595 | (list |
| 597 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | 596 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 598 | 'gdba) | ||
| 599 | (concat "server interpreter mi \"-var-evaluate-expression " | 597 | (concat "server interpreter mi \"-var-evaluate-expression " |
| 600 | (nth 1 var) "\"\n") | 598 | (nth 1 var) "\"\n") |
| 601 | (concat "-var-evaluate-expression " (nth 1 var) "\n")) | 599 | (concat "-var-evaluate-expression " (nth 1 var) "\n")) |
| @@ -743,13 +741,11 @@ TEXT is the text of the button we clicked on, a + or - item. | |||
| 743 | TOKEN is data related to this node. | 741 | TOKEN is data related to this node. |
| 744 | INDENT is the current indentation depth." | 742 | INDENT is the current indentation depth." |
| 745 | (cond ((string-match "+" text) ;expand this node | 743 | (cond ((string-match "+" text) ;expand this node |
| 746 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 744 | (if (and |
| 747 | (if (string-equal gdb-version "pre-6.4") | 745 | (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 748 | (gdb-var-list-children token) | 746 | (string-equal gdb-version "pre-6.4")) |
| 749 | (gdb-var-list-children-1 token)) | 747 | (gdb-var-list-children token) |
| 750 | (progn | 748 | (gdb-var-list-children-1 token))) |
| 751 | (gdbmi-var-update) | ||
| 752 | (gdbmi-var-list-children token)))) | ||
| 753 | ((string-match "-" text) ;contract this node | 749 | ((string-match "-" text) ;contract this node |
| 754 | (dolist (var gdb-var-list) | 750 | (dolist (var gdb-var-list) |
| 755 | (if (string-match (concat token "\\.") (nth 1 var)) | 751 | (if (string-match (concat token "\\.") (nth 1 var)) |
| @@ -856,10 +852,10 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 856 | (gdb-get-target-string) | 852 | (gdb-get-target-string) |
| 857 | "*")) | 853 | "*")) |
| 858 | 854 | ||
| 859 | (defun gdb-display-inferior-io-buffer () | 855 | (defun gdb-display-separate-io-buffer () |
| 860 | "Display IO of inferior in a separate window." | 856 | "Display IO of inferior in a separate window." |
| 861 | (interactive) | 857 | (interactive) |
| 862 | (if gdb-use-inferior-io-buffer | 858 | (if gdb-use-separate-io-buffer |
| 863 | (gdb-display-buffer | 859 | (gdb-display-buffer |
| 864 | (gdb-get-create-buffer 'gdb-inferior-io)))) | 860 | (gdb-get-create-buffer 'gdb-inferior-io)))) |
| 865 | 861 | ||
| @@ -870,21 +866,21 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 870 | (menu-bar-lines . nil) | 866 | (menu-bar-lines . nil) |
| 871 | (minibuffer . nil))) | 867 | (minibuffer . nil))) |
| 872 | 868 | ||
| 873 | (defun gdb-frame-inferior-io-buffer () | 869 | (defun gdb-frame-separate-io-buffer () |
| 874 | "Display IO of inferior in a new frame." | 870 | "Display IO of inferior in a new frame." |
| 875 | (interactive) | 871 | (interactive) |
| 876 | (if gdb-use-inferior-io-buffer | 872 | (if gdb-use-separate-io-buffer |
| 877 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | 873 | (let ((special-display-regexps (append special-display-regexps '(".*"))) |
| 878 | (special-display-frame-alist gdb-frame-parameters)) | 874 | (special-display-frame-alist gdb-frame-parameters)) |
| 879 | (display-buffer (gdb-get-create-buffer 'gdb-inferior-io))))) | 875 | (display-buffer (gdb-get-create-buffer 'gdb-inferior-io))))) |
| 880 | 876 | ||
| 881 | (defvar gdb-inferior-io-mode-map | 877 | (defvar gdb-inferior-io-mode-map |
| 882 | (let ((map (make-sparse-keymap))) | 878 | (let ((map (make-sparse-keymap))) |
| 883 | (define-key map "\C-c\C-c" 'gdb-inferior-io-interrupt) | 879 | (define-key map "\C-c\C-c" 'gdb-separate-io-interrupt) |
| 884 | (define-key map "\C-c\C-z" 'gdb-inferior-io-stop) | 880 | (define-key map "\C-c\C-z" 'gdb-separate-io-stop) |
| 885 | (define-key map "\C-c\C-\\" 'gdb-inferior-io-quit) | 881 | (define-key map "\C-c\C-\\" 'gdb-separate-io-quit) |
| 886 | (define-key map "\C-c\C-d" 'gdb-inferior-io-eof) | 882 | (define-key map "\C-c\C-d" 'gdb-separate-io-eof) |
| 887 | (define-key map "\C-d" 'gdb-inferior-io-eof) | 883 | (define-key map "\C-d" 'gdb-separate-io-eof) |
| 888 | map)) | 884 | map)) |
| 889 | 885 | ||
| 890 | (define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O" | 886 | (define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O" |
| @@ -905,25 +901,25 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 905 | (process-send-string proc string) | 901 | (process-send-string proc string) |
| 906 | (process-send-string proc "\n"))) | 902 | (process-send-string proc "\n"))) |
| 907 | 903 | ||
| 908 | (defun gdb-inferior-io-interrupt () | 904 | (defun gdb-separate-io-interrupt () |
| 909 | "Interrupt the program being debugged." | 905 | "Interrupt the program being debugged." |
| 910 | (interactive) | 906 | (interactive) |
| 911 | (interrupt-process | 907 | (interrupt-process |
| 912 | (get-buffer-process gud-comint-buffer) comint-ptyp)) | 908 | (get-buffer-process gud-comint-buffer) comint-ptyp)) |
| 913 | 909 | ||
| 914 | (defun gdb-inferior-io-quit () | 910 | (defun gdb-separate-io-quit () |
| 915 | "Send quit signal to the program being debugged." | 911 | "Send quit signal to the program being debugged." |
| 916 | (interactive) | 912 | (interactive) |
| 917 | (quit-process | 913 | (quit-process |
| 918 | (get-buffer-process gud-comint-buffer) comint-ptyp)) | 914 | (get-buffer-process gud-comint-buffer) comint-ptyp)) |
| 919 | 915 | ||
| 920 | (defun gdb-inferior-io-stop () | 916 | (defun gdb-separate-io-stop () |
| 921 | "Stop the program being debugged." | 917 | "Stop the program being debugged." |
| 922 | (interactive) | 918 | (interactive) |
| 923 | (stop-process | 919 | (stop-process |
| 924 | (get-buffer-process gud-comint-buffer) comint-ptyp)) | 920 | (get-buffer-process gud-comint-buffer) comint-ptyp)) |
| 925 | 921 | ||
| 926 | (defun gdb-inferior-io-eof () | 922 | (defun gdb-separate-io-eof () |
| 927 | "Send end-of-file to the program being debugged." | 923 | "Send end-of-file to the program being debugged." |
| 928 | (interactive) | 924 | (interactive) |
| 929 | (process-send-eof | 925 | (process-send-eof |
| @@ -1119,7 +1115,7 @@ not GDB." | |||
| 1119 | ((eq sink 'user) | 1115 | ((eq sink 'user) |
| 1120 | (progn | 1116 | (progn |
| 1121 | (setq gud-running t) | 1117 | (setq gud-running t) |
| 1122 | (if gdb-use-inferior-io-buffer | 1118 | (if gdb-use-separate-io-buffer |
| 1123 | (setq gdb-output-sink 'inferior)))) | 1119 | (setq gdb-output-sink 'inferior)))) |
| 1124 | (t | 1120 | (t |
| 1125 | (gdb-resync) | 1121 | (gdb-resync) |
| @@ -1129,7 +1125,7 @@ not GDB." | |||
| 1129 | "An annotation handler for `breakpoint' and other annotations. | 1125 | "An annotation handler for `breakpoint' and other annotations. |
| 1130 | They say that I/O for the subprocess is now GDB, not the program | 1126 | They say that I/O for the subprocess is now GDB, not the program |
| 1131 | being debugged." | 1127 | being debugged." |
| 1132 | (if gdb-use-inferior-io-buffer | 1128 | (if gdb-use-separate-io-buffer |
| 1133 | (let ((sink gdb-output-sink)) | 1129 | (let ((sink gdb-output-sink)) |
| 1134 | (cond | 1130 | (cond |
| 1135 | ((eq sink 'inferior) | 1131 | ((eq sink 'inferior) |
| @@ -1195,7 +1191,7 @@ happens to be appropriate." | |||
| 1195 | 1191 | ||
| 1196 | (if (string-equal gdb-version "pre-6.4") | 1192 | (if (string-equal gdb-version "pre-6.4") |
| 1197 | (gdb-invalidate-registers) | 1193 | (gdb-invalidate-registers) |
| 1198 | (if (gdb-get-buffer 'gdb-registers-buffer) (gdb-get-changed-registers)) | 1194 | (gdb-get-changed-registers) |
| 1199 | (gdb-invalidate-registers-1)) | 1195 | (gdb-invalidate-registers-1)) |
| 1200 | 1196 | ||
| 1201 | (gdb-invalidate-memory) | 1197 | (gdb-invalidate-memory) |
| @@ -1498,7 +1494,7 @@ static char *magick[] = { | |||
| 1498 | ;; Remove all breakpoint-icons in source buffers but not assembler buffer. | 1494 | ;; Remove all breakpoint-icons in source buffers but not assembler buffer. |
| 1499 | (dolist (buffer (buffer-list)) | 1495 | (dolist (buffer (buffer-list)) |
| 1500 | (with-current-buffer buffer | 1496 | (with-current-buffer buffer |
| 1501 | (if (and (eq gud-minor-mode 'gdba) | 1497 | (if (and (memq gud-minor-mode '(gdba gdbmi)) |
| 1502 | (not (string-match "\\`\\*.+\\*\\'" (buffer-name)))) | 1498 | (not (string-match "\\`\\*.+\\*\\'" (buffer-name)))) |
| 1503 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) | 1499 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) |
| 1504 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) | 1500 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) |
| @@ -1633,7 +1629,7 @@ static char *magick[] = { | |||
| 1633 | (defvar gdb-breakpoints-mode-map | 1629 | (defvar gdb-breakpoints-mode-map |
| 1634 | (let ((map (make-sparse-keymap)) | 1630 | (let ((map (make-sparse-keymap)) |
| 1635 | (menu (make-sparse-keymap "Breakpoints"))) | 1631 | (menu (make-sparse-keymap "Breakpoints"))) |
| 1636 | (define-key menu [quit] '("Quit" . kill-this-buffer)) | 1632 | (define-key menu [quit] '("Quit" . gdb-delete-frame-or-window)) |
| 1637 | (define-key menu [goto] '("Goto" . gdb-goto-breakpoint)) | 1633 | (define-key menu [goto] '("Goto" . gdb-goto-breakpoint)) |
| 1638 | (define-key menu [delete] '("Delete" . gdb-delete-breakpoint)) | 1634 | (define-key menu [delete] '("Delete" . gdb-delete-breakpoint)) |
| 1639 | (define-key menu [toggle] '("Toggle" . gdb-toggle-breakpoint)) | 1635 | (define-key menu [toggle] '("Toggle" . gdb-toggle-breakpoint)) |
| @@ -1668,15 +1664,15 @@ static char *magick[] = { | |||
| 1668 | 'gdb-invalidate-breakpoints | 1664 | 'gdb-invalidate-breakpoints |
| 1669 | 'gdbmi-invalidate-breakpoints)) | 1665 | 'gdbmi-invalidate-breakpoints)) |
| 1670 | 1666 | ||
| 1667 | (defconst gdb-breakpoint-regexp | ||
| 1668 | "\\([0-9]+\\).*?\\(?:point\\|catch\\s-+\\S-+\\)\\s-+\\S-+\\s-+\\(.\\)\\s-+") | ||
| 1669 | |||
| 1671 | (defun gdb-toggle-breakpoint () | 1670 | (defun gdb-toggle-breakpoint () |
| 1672 | "Enable/disable breakpoint at current line." | 1671 | "Enable/disable breakpoint at current line." |
| 1673 | (interactive) | 1672 | (interactive) |
| 1674 | (save-excursion | 1673 | (save-excursion |
| 1675 | (beginning-of-line 1) | 1674 | (beginning-of-line 1) |
| 1676 | (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 1675 | (if (looking-at gdb-breakpoint-regexp) |
| 1677 | (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+") | ||
| 1678 | (looking-at | ||
| 1679 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+")) | ||
| 1680 | (gdb-enqueue-input | 1676 | (gdb-enqueue-input |
| 1681 | (list | 1677 | (list |
| 1682 | (concat gdb-server-prefix | 1678 | (concat gdb-server-prefix |
| @@ -1690,10 +1686,7 @@ static char *magick[] = { | |||
| 1690 | "Delete the breakpoint at current line." | 1686 | "Delete the breakpoint at current line." |
| 1691 | (interactive) | 1687 | (interactive) |
| 1692 | (beginning-of-line 1) | 1688 | (beginning-of-line 1) |
| 1693 | (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 1689 | (if (looking-at gdb-breakpoint-regexp) |
| 1694 | (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)") | ||
| 1695 | (looking-at | ||
| 1696 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+")) | ||
| 1697 | (gdb-enqueue-input | 1690 | (gdb-enqueue-input |
| 1698 | (list | 1691 | (list |
| 1699 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) | 1692 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) |
| @@ -1708,11 +1701,7 @@ static char *magick[] = { | |||
| 1708 | (if window (save-selected-window (select-window window)))) | 1701 | (if window (save-selected-window (select-window window)))) |
| 1709 | (save-excursion | 1702 | (save-excursion |
| 1710 | (beginning-of-line 1) | 1703 | (beginning-of-line 1) |
| 1711 | (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 1704 | (if (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") |
| 1712 | (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") | ||
| 1713 | (looking-at | ||
| 1714 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\ | ||
| 1715 | \\(\\S-+\\):\\([0-9]+\\)")) | ||
| 1716 | (let ((bptno (match-string 1)) | 1705 | (let ((bptno (match-string 1)) |
| 1717 | (file (match-string 2)) | 1706 | (file (match-string 2)) |
| 1718 | (line (match-string 3))) | 1707 | (line (match-string 3))) |
| @@ -1724,7 +1713,7 @@ static char *magick[] = { | |||
| 1724 | (with-current-buffer buf | 1713 | (with-current-buffer buf |
| 1725 | (goto-line (string-to-number line)) | 1714 | (goto-line (string-to-number line)) |
| 1726 | (set-window-point window (point)))))) | 1715 | (set-window-point window (point)))))) |
| 1727 | (error "Not recognized as break/watchpoint line")))) | 1716 | (error "No location specified.")))) |
| 1728 | 1717 | ||
| 1729 | 1718 | ||
| 1730 | ;; Frames buffer. This displays a perpetually correct bactracktrace | 1719 | ;; Frames buffer. This displays a perpetually correct bactracktrace |
| @@ -2416,11 +2405,10 @@ corresponding to the mode line clicked." | |||
| 2416 | (set (make-local-variable 'font-lock-defaults) | 2405 | (set (make-local-variable 'font-lock-defaults) |
| 2417 | '(gdb-locals-font-lock-keywords)) | 2406 | '(gdb-locals-font-lock-keywords)) |
| 2418 | (run-mode-hooks 'gdb-locals-mode-hook) | 2407 | (run-mode-hooks 'gdb-locals-mode-hook) |
| 2419 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 2408 | (if (and (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 2420 | (if (string-equal gdb-version "pre-6.4") | 2409 | (string-equal gdb-version "pre-6.4")) |
| 2421 | 'gdb-invalidate-locals | 2410 | 'gdb-invalidate-locals |
| 2422 | 'gdb-invalidate-locals-1) | 2411 | 'gdb-invalidate-locals-1)) |
| 2423 | 'gdbmi-invalidate-locals)) | ||
| 2424 | 2412 | ||
| 2425 | (defun gdb-locals-buffer-name () | 2413 | (defun gdb-locals-buffer-name () |
| 2426 | (with-current-buffer gud-comint-buffer | 2414 | (with-current-buffer gud-comint-buffer |
| @@ -2478,8 +2466,8 @@ corresponding to the mode line clicked." | |||
| 2478 | '("Disassembly" . gdb-display-assembler-buffer)) | 2466 | '("Disassembly" . gdb-display-assembler-buffer)) |
| 2479 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) | 2467 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) |
| 2480 | (define-key menu [inferior] | 2468 | (define-key menu [inferior] |
| 2481 | '(menu-item "Inferior IO" gdb-display-inferior-io-buffer | 2469 | '(menu-item "Inferior IO" gdb-display-separate-io-buffer |
| 2482 | :enable gdb-use-inferior-io-buffer)) | 2470 | :enable gdb-use-separate-io-buffer)) |
| 2483 | (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) | 2471 | (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) |
| 2484 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) | 2472 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) |
| 2485 | (define-key menu [breakpoints] | 2473 | (define-key menu [breakpoints] |
| @@ -2495,8 +2483,8 @@ corresponding to the mode line clicked." | |||
| 2495 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) | 2483 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) |
| 2496 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 2484 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 2497 | (define-key menu [inferior] | 2485 | (define-key menu [inferior] |
| 2498 | '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer | 2486 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer |
| 2499 | :enable gdb-use-inferior-io-buffer)) | 2487 | :enable gdb-use-separate-io-buffer)) |
| 2500 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) | 2488 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) |
| 2501 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) | 2489 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) |
| 2502 | (define-key menu [breakpoints] | 2490 | (define-key menu [breakpoints] |
| @@ -2506,11 +2494,11 @@ corresponding to the mode line clicked." | |||
| 2506 | (define-key gud-menu-map [ui] | 2494 | (define-key gud-menu-map [ui] |
| 2507 | `(menu-item (if (eq gud-minor-mode 'gdba) "GDB-UI" "GDB-MI") | 2495 | `(menu-item (if (eq gud-minor-mode 'gdba) "GDB-UI" "GDB-MI") |
| 2508 | ,menu :visible (memq gud-minor-mode '(gdbmi gdba)))) | 2496 | ,menu :visible (memq gud-minor-mode '(gdbmi gdba)))) |
| 2509 | (define-key menu [gdb-use-inferior-io] | 2497 | (define-key menu [gdb-use-separate-io] |
| 2510 | '(menu-item "Separate inferior IO" gdb-use-inferior-io-buffer | 2498 | '(menu-item "Separate inferior IO" gdb-use-separate-io-buffer |
| 2511 | :visible (eq gud-minor-mode 'gdba) | 2499 | :visible (eq gud-minor-mode 'gdba) |
| 2512 | :help "Toggle separate IO for inferior." | 2500 | :help "Toggle separate IO for inferior." |
| 2513 | :button (:toggle . gdb-use-inferior-io-buffer))) | 2501 | :button (:toggle . gdb-use-separate-io-buffer))) |
| 2514 | (define-key menu [gdb-many-windows] | 2502 | (define-key menu [gdb-many-windows] |
| 2515 | '(menu-item "Display Other Windows" gdb-many-windows | 2503 | '(menu-item "Display Other Windows" gdb-many-windows |
| 2516 | :help "Toggle display of locals, stack and breakpoint information" | 2504 | :help "Toggle display of locals, stack and breakpoint information" |
| @@ -2556,7 +2544,7 @@ corresponding to the mode line clicked." | |||
| 2556 | (if gud-last-last-frame | 2544 | (if gud-last-last-frame |
| 2557 | (gud-find-file (car gud-last-last-frame)) | 2545 | (gud-find-file (car gud-last-last-frame)) |
| 2558 | (gud-find-file gdb-main-file))) | 2546 | (gud-find-file gdb-main-file))) |
| 2559 | (when gdb-use-inferior-io-buffer | 2547 | (when gdb-use-separate-io-buffer |
| 2560 | (split-window-horizontally) | 2548 | (split-window-horizontally) |
| 2561 | (other-window 1) | 2549 | (other-window 1) |
| 2562 | (gdb-set-window-buffer | 2550 | (gdb-set-window-buffer |
| @@ -2684,11 +2672,12 @@ of the current session." | |||
| 2684 | (if (and (buffer-name gud-comint-buffer) | 2672 | (if (and (buffer-name gud-comint-buffer) |
| 2685 | ;; in case gud or gdb-ui is just loaded | 2673 | ;; in case gud or gdb-ui is just loaded |
| 2686 | gud-comint-buffer | 2674 | gud-comint-buffer |
| 2687 | (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | 2675 | (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) |
| 2688 | 'gdba)) | 2676 | '(gdba gdbmi))) |
| 2689 | (if (member buffer-file-name gdb-source-file-list) | 2677 | (if (member buffer-file-name gdb-source-file-list) |
| 2690 | (with-current-buffer (find-buffer-visiting buffer-file-name) | 2678 | (with-current-buffer (find-buffer-visiting buffer-file-name) |
| 2691 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 2679 | (set (make-local-variable 'gud-minor-mode) |
| 2680 | (buffer-local-value 'gud-minor-mode gud-comint-buffer)) | ||
| 2692 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map))))) | 2681 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map))))) |
| 2693 | 2682 | ||
| 2694 | ;;from put-image | 2683 | ;;from put-image |
| @@ -2967,49 +2956,23 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2967 | (if (re-search-forward " source language \\(\\S-*\\)\." nil t) | 2956 | (if (re-search-forward " source language \\(\\S-*\\)\." nil t) |
| 2968 | (setq gdb-current-language (match-string 1))) | 2957 | (setq gdb-current-language (match-string 1))) |
| 2969 | (gdb-invalidate-assembler)) | 2958 | (gdb-invalidate-assembler)) |
| 2970 | |||
| 2971 | |||
| 2972 | ;; For debugging Emacs only (assumes that usual stack buffer already exists). | ||
| 2973 | (defun gdb-xbacktrace () | ||
| 2974 | "Generate a full lisp level backtrace with arguments." | ||
| 2975 | (interactive) | ||
| 2976 | (setq my-frames nil) | ||
| 2977 | (with-current-buffer (get-buffer-create "xbacktrace") | ||
| 2978 | (erase-buffer)) | ||
| 2979 | (let (frame-number gdb-frame-number) | ||
| 2980 | (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) | ||
| 2981 | (save-excursion | ||
| 2982 | (goto-char (point-min)) | ||
| 2983 | (while (search-forward "in Ffuncall " nil t) | ||
| 2984 | (goto-char (line-beginning-position)) | ||
| 2985 | (looking-at "^#\\([0-9]+\\)") | ||
| 2986 | (push (match-string-no-properties 1) my-frames) | ||
| 2987 | (forward-line 1)))) | ||
| 2988 | (dolist (frame my-frames) | ||
| 2989 | (gdb-enqueue-input (list (concat "server frame " frame "\n") | ||
| 2990 | 'ignore)) | ||
| 2991 | ; (gdb-enqueue-input (list "server ppargs\n" 'gdb-get-arguments)) | ||
| 2992 | (gud-basic-call "server ppargs") | ||
| 2993 | ) | ||
| 2994 | (gdb-enqueue-input (list (concat "server frame " frame-number "\n") | ||
| 2995 | 'ignore)))) | ||
| 2996 | |||
| 2997 | (defun gdb-get-arguments () | ||
| 2998 | (with-current-buffer "xbacktrace" | ||
| 2999 | (insert-buffer-substring (gdb-get-buffer 'gdb-partial-output-buffer)))) | ||
| 3000 | 2959 | ||
| 2960 | |||
| 3001 | ;; Code specific to GDB 6.4 | 2961 | ;; Code specific to GDB 6.4 |
| 3002 | (defconst gdb-source-file-regexp-1 "fullname=\"\\(.*?\\)\"") | 2962 | (defconst gdb-source-file-regexp-1 "fullname=\"\\(.*?\\)\"") |
| 3003 | 2963 | ||
| 3004 | (defun gdb-set-gud-minor-mode-existing-buffers-1 () | 2964 | (defun gdb-set-gud-minor-mode-existing-buffers-1 () |
| 3005 | "Create list of source files for current GDB session." | 2965 | "Create list of source files for current GDB session. |
| 2966 | If buffers already exist for any of these files, gud-minor-mode | ||
| 2967 | is set in them." | ||
| 3006 | (goto-char (point-min)) | 2968 | (goto-char (point-min)) |
| 3007 | (while (re-search-forward gdb-source-file-regexp-1 nil t) | 2969 | (while (re-search-forward gdb-source-file-regexp-1 nil t) |
| 3008 | (push (match-string 1) gdb-source-file-list)) | 2970 | (push (match-string 1) gdb-source-file-list)) |
| 3009 | (dolist (buffer (buffer-list)) | 2971 | (dolist (buffer (buffer-list)) |
| 3010 | (with-current-buffer buffer | 2972 | (with-current-buffer buffer |
| 3011 | (when (member buffer-file-name gdb-source-file-list) | 2973 | (when (member buffer-file-name gdb-source-file-list) |
| 3012 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 2974 | (set (make-local-variable 'gud-minor-mode) |
| 2975 | (buffer-local-value 'gud-minor-mode gud-comint-buffer)) | ||
| 3013 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) | 2976 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) |
| 3014 | (when gud-tooltip-mode | 2977 | (when gud-tooltip-mode |
| 3015 | (make-local-variable 'gdb-define-alist) | 2978 | (make-local-variable 'gdb-define-alist) |
| @@ -3019,12 +2982,12 @@ BUFFER nil or omitted means use the current buffer." | |||
| 3019 | ; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards. | 2982 | ; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards. |
| 3020 | (defun gdb-var-list-children-1 (varnum) | 2983 | (defun gdb-var-list-children-1 (varnum) |
| 3021 | (gdb-enqueue-input | 2984 | (gdb-enqueue-input |
| 3022 | (list (concat "server interpreter mi \"-var-update " varnum "\"\n") | 2985 | (list |
| 3023 | 'ignore)) | 2986 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 3024 | (gdb-enqueue-input | 2987 | (concat "server interpreter mi \"-var-list-children --all-values " |
| 3025 | (list (concat "server interpreter mi \"-var-list-children --all-values " | 2988 | varnum "\"\n") |
| 3026 | varnum "\"\n") | 2989 | (concat "-var-list-children --all-values " varnum "\n")) |
| 3027 | `(lambda () (gdb-var-list-children-handler-1 ,varnum))))) | 2990 | `(lambda () (gdb-var-list-children-handler-1 ,varnum))))) |
| 3028 | 2991 | ||
| 3029 | (defconst gdb-var-list-children-regexp-1 | 2992 | (defconst gdb-var-list-children-regexp-1 |
| 3030 | "name=\"\\(.+?\\)\",exp=\"\\(.+?\\)\",numchild=\"\\(.+?\\)\",\ | 2993 | "name=\"\\(.+?\\)\",exp=\"\\(.+?\\)\",numchild=\"\\(.+?\\)\",\ |
| @@ -3059,10 +3022,10 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}") | |||
| 3059 | (progn | 3022 | (progn |
| 3060 | (gdb-enqueue-input | 3023 | (gdb-enqueue-input |
| 3061 | (list | 3024 | (list |
| 3062 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 3025 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 3063 | "server interpreter mi \"-var-update --all-values *\"\n" | 3026 | "server interpreter mi \"-var-update --all-values *\"\n" |
| 3064 | "-var-update --all-values *\n") | 3027 | "-var-update --all-values *\n") |
| 3065 | 'gdb-var-update-handler-1)) | 3028 | 'gdb-var-update-handler-1)) |
| 3066 | (push 'gdb-var-update gdb-pending-triggers)))) | 3029 | (push 'gdb-var-update gdb-pending-triggers)))) |
| 3067 | 3030 | ||
| 3068 | (defconst gdb-var-update-regexp-1 "name=\"\\(.*?\\)\",value=\\(\".*?\"\\),") | 3031 | (defconst gdb-var-update-regexp-1 "name=\"\\(.*?\\)\",value=\\(\".*?\"\\),") |
| @@ -3098,7 +3061,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}") | |||
| 3098 | 3061 | ||
| 3099 | (def-gdb-auto-update-trigger gdb-invalidate-registers-1 | 3062 | (def-gdb-auto-update-trigger gdb-invalidate-registers-1 |
| 3100 | (gdb-get-buffer 'gdb-registers-buffer) | 3063 | (gdb-get-buffer 'gdb-registers-buffer) |
| 3101 | (if (eq gud-minor-mode 'gdba) | 3064 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 3102 | "server interpreter mi \"-data-list-register-values x\"\n" | 3065 | "server interpreter mi \"-data-list-register-values x\"\n" |
| 3103 | "-data-list-register-values x\n") | 3066 | "-data-list-register-values x\n") |
| 3104 | gdb-data-list-register-values-handler) | 3067 | gdb-data-list-register-values-handler) |
| @@ -3157,14 +3120,15 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}") | |||
| 3157 | 3120 | ||
| 3158 | ;; Needs GDB 6.4 onwards (used to fail with no stack). | 3121 | ;; Needs GDB 6.4 onwards (used to fail with no stack). |
| 3159 | (defun gdb-get-changed-registers () | 3122 | (defun gdb-get-changed-registers () |
| 3160 | (if (not (member 'gdb-get-changed-registers gdb-pending-triggers)) | 3123 | (if (and (gdb-get-buffer 'gdb-registers-buffer) |
| 3124 | (not (member 'gdb-get-changed-registers gdb-pending-triggers))) | ||
| 3161 | (progn | 3125 | (progn |
| 3162 | (gdb-enqueue-input | 3126 | (gdb-enqueue-input |
| 3163 | (list | 3127 | (list |
| 3164 | (if (eq gud-minor-mode 'gdba) | 3128 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 3165 | "server interpreter mi -data-list-changed-registers\n" | 3129 | "server interpreter mi -data-list-changed-registers\n" |
| 3166 | "-data-list-changed-registers\n") | 3130 | "-data-list-changed-registers\n") |
| 3167 | 'gdb-get-changed-registers-handler)) | 3131 | 'gdb-get-changed-registers-handler)) |
| 3168 | (push 'gdb-get-changed-registers gdb-pending-triggers)))) | 3132 | (push 'gdb-get-changed-registers gdb-pending-triggers)))) |
| 3169 | 3133 | ||
| 3170 | (defconst gdb-data-list-register-names-regexp "\"\\(.*?\\)\"") | 3134 | (defconst gdb-data-list-register-names-regexp "\"\\(.*?\\)\"") |
| @@ -3187,7 +3151,9 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}") | |||
| 3187 | 3151 | ||
| 3188 | (def-gdb-auto-update-trigger gdb-invalidate-locals-1 | 3152 | (def-gdb-auto-update-trigger gdb-invalidate-locals-1 |
| 3189 | (gdb-get-buffer 'gdb-locals-buffer) | 3153 | (gdb-get-buffer 'gdb-locals-buffer) |
| 3190 | "server interpreter mi -\"stack-list-locals --simple-values\"\n" | 3154 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 3155 | "server interpreter mi -\"stack-list-locals --simple-values\"\n" | ||
| 3156 | "-stack-list-locals --simple-values\n") | ||
| 3191 | gdb-stack-list-locals-handler) | 3157 | gdb-stack-list-locals-handler) |
| 3192 | 3158 | ||
| 3193 | (defconst gdb-stack-list-locals-regexp | 3159 | (defconst gdb-stack-list-locals-regexp |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index b927c765476..1d5172a1a52 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -656,8 +656,13 @@ required by the caller." | |||
| 656 | ;;;###autoload | 656 | ;;;###autoload |
| 657 | (defun gdb (command-line) | 657 | (defun gdb (command-line) |
| 658 | "Run gdb on program FILE in buffer *gud-FILE*. | 658 | "Run gdb on program FILE in buffer *gud-FILE*. |
| 659 | The directory containing FILE becomes the initial working directory | 659 | The directory containing FILE becomes the initial working |
| 660 | and source-file directory for your debugger." | 660 | directory and source-file directory for your debugger. By |
| 661 | default this command starts GDB using a graphical interface. See | ||
| 662 | `gdba' for more information. | ||
| 663 | |||
| 664 | To run GDB in text command mode, set `gud-gdb-command-name' to | ||
| 665 | \"gdb --fullname\" and include the pathname, if necessary." | ||
| 661 | (interactive (list (gud-query-cmdline 'gdb))) | 666 | (interactive (list (gud-query-cmdline 'gdb))) |
| 662 | 667 | ||
| 663 | (if (and gud-comint-buffer | 668 | (if (and gud-comint-buffer |
| @@ -3120,7 +3125,7 @@ class of the file (using s to separate nested class ids)." | |||
| 3120 | (defvar gdb-script-font-lock-keywords | 3125 | (defvar gdb-script-font-lock-keywords |
| 3121 | '(("^define\\s-+\\(\\(\\w\\|\\s_\\)+\\)" (1 font-lock-function-name-face)) | 3126 | '(("^define\\s-+\\(\\(\\w\\|\\s_\\)+\\)" (1 font-lock-function-name-face)) |
| 3122 | ("\\$\\(\\w+\\)" (1 font-lock-variable-name-face)) | 3127 | ("\\$\\(\\w+\\)" (1 font-lock-variable-name-face)) |
| 3123 | ("^\\s-*\\([a-z]+\\)" (1 font-lock-keyword-face)))) | 3128 | ("^\\s-*\\(\\(\\w\\|\\s_\\)+\\)" (1 font-lock-keyword-face)))) |
| 3124 | 3129 | ||
| 3125 | ;; FIXME: The keyword "end" associated with "document" | 3130 | ;; FIXME: The keyword "end" associated with "document" |
| 3126 | ;; should have font-lock-keyword-face (currently font-lock-doc-face). | 3131 | ;; should have font-lock-keyword-face (currently font-lock-doc-face). |
diff --git a/lisp/simple.el b/lisp/simple.el index b8f01680a81..fb933077b06 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4328,7 +4328,9 @@ If nil, search stops at the beginning of the accessible portion of the buffer." | |||
| 4328 | :group 'paren-blinking) | 4328 | :group 'paren-blinking) |
| 4329 | 4329 | ||
| 4330 | (defcustom blink-matching-paren-dont-ignore-comments nil | 4330 | (defcustom blink-matching-paren-dont-ignore-comments nil |
| 4331 | "*Non-nil means `blink-matching-paren' will not ignore comments." | 4331 | "*nil means `blink-matching-paren' ignores comments. |
| 4332 | More precisely, when looking for the matching parenthesis, | ||
| 4333 | it skips the contents of comments that end before point." | ||
| 4332 | :type 'boolean | 4334 | :type 'boolean |
| 4333 | :group 'paren-blinking) | 4335 | :group 'paren-blinking) |
| 4334 | 4336 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 3aad35d05e8..15ac6b0e363 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -561,8 +561,10 @@ In other words, OLDDEF is replaced with NEWDEF where ever it appears. | |||
| 561 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine | 561 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine |
| 562 | in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. | 562 | in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. |
| 563 | 563 | ||
| 564 | For most uses, it is simpler and safer to use command remapping like this: | 564 | If you don't specify OLDMAP, you can usually get the same results |
| 565 | \(define-key KEYMAP [remap OLDDEF] NEWDEF)" | 565 | in a cleaner way with command remapping, like this: |
| 566 | \(define-key KEYMAP [remap OLDDEF] NEWDEF) | ||
| 567 | \n(fn OLDDEF NEWDEF KEYMAP &optional OLDMAP)" | ||
| 566 | ;; Don't document PREFIX in the doc string because we don't want to | 568 | ;; Don't document PREFIX in the doc string because we don't want to |
| 567 | ;; advertise it. It's meant for recursive calls only. Here's its | 569 | ;; advertise it. It's meant for recursive calls only. Here's its |
| 568 | ;; meaning | 570 | ;; meaning |
diff --git a/lisp/tumme.el b/lisp/tumme.el index 8f75da24ca2..6cec3e73a16 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el | |||
| @@ -135,390 +135,9 @@ | |||
| 135 | ;; backup of `tumme-db-file' when testing new versions. | 135 | ;; backup of `tumme-db-file' when testing new versions. |
| 136 | ;; | 136 | ;; |
| 137 | ;; | 137 | ;; |
| 138 | ;;; History: | ||
| 139 | ;; ======== | ||
| 140 | ;; | ||
| 141 | ;; Version 0.1, 2005-04-16 | ||
| 142 | ;; | ||
| 143 | ;; * First release, only browsing support for now. | ||
| 144 | ;; | ||
| 145 | ;; Version 0.2, 2005-04-21 | ||
| 146 | ;; | ||
| 147 | ;; * Changed calls to dired-filename-at-point to dired-get-filename | ||
| 148 | ;; | ||
| 149 | ;; Version 0.3, 2005-04-25 | ||
| 150 | ;; | ||
| 151 | ;; Quite a lot of changes: | ||
| 152 | ;; | ||
| 153 | ;; * Added basic image tagging support. No commands that make use of | ||
| 154 | ;; it yet. | ||
| 155 | ;; | ||
| 156 | ;; * Added text properties for the thumbnail images to be able to | ||
| 157 | ;; track where they came from originally. Used in `tumme-mode'. | ||
| 158 | ;; | ||
| 159 | ;; * Added `tumme-mode' to be used when navigating the thumbnail | ||
| 160 | ;; buffer. Currently, there are commands to mark, unmark, flag and | ||
| 161 | ;; jump to the original file in associated dired buffer. | ||
| 162 | ;; | ||
| 163 | ;; * When moving around in the thumbnail buffer (in `tumme-mode'), the | ||
| 164 | ;; user can turn on tracking of the movements and let them be | ||
| 165 | ;; mirrored in the associated dired buffer. | ||
| 166 | ;; | ||
| 167 | ;; * In this version I have been looking at some ideas in thumbs.el, | ||
| 168 | ;; for example the image margin and relief and the `thumbs-mode' | ||
| 169 | ;; which I copied and made the `tumme-mode' from. | ||
| 170 | ;; | ||
| 171 | ;; Version 0.4, 2005-05-02 | ||
| 172 | ;; | ||
| 173 | ;; * Renamed the functions that are to be used in `tumme-mode' in the | ||
| 174 | ;; thumbnail buffer. | ||
| 175 | ;; | ||
| 176 | ;; * The mark, unmark and flag commands in `tumme-mode' now also moves | ||
| 177 | ;; to next thumbnail, like how dired normally works. | ||
| 178 | ;; | ||
| 179 | ;; * Added `tumme-mode-line-up', `tumme-display-thumbs-append' and | ||
| 180 | ;; `tumme-mode-delete-char'. | ||
| 181 | ;; | ||
| 182 | ;; * Each thumbnail's tags is now displayed when navigating among the | ||
| 183 | ;; thumbnails in the thumbnail buffer. | ||
| 184 | ;; | ||
| 185 | ;; * Added simple slideshow functionality. | ||
| 186 | ;; | ||
| 187 | ;; Version 0.4.1, 2005-05-05 | ||
| 188 | ;; | ||
| 189 | ;; * Fixed bug in `tumme-flag-thumb-original-file' | ||
| 190 | ;; | ||
| 191 | ;; * Added commands to display original image in external viewer | ||
| 192 | ;; (`tumme-display-external') and in a Emacs buffer | ||
| 193 | ;; (`tumme-display-image'). | ||
| 194 | ;; | ||
| 195 | ;; * Minor code clean-up | ||
| 196 | ;; | ||
| 197 | ;; * Renamed some functions back again... | ||
| 198 | ;; | ||
| 199 | ;; * Added rotation of thumbnail images (90 degrees left and right) | ||
| 200 | ;; | ||
| 201 | ;; Version 0.4.2, 2005-05-06 | ||
| 202 | ;; | ||
| 203 | ;; * Removed need for `tumme-display-image-size' in | ||
| 204 | ;; `tumme-display-image'. Now, the maximum image size that fits in | ||
| 205 | ;; `tumme-display-buffer' is calculated automatically. Introduced | ||
| 206 | ;; two correction variables, `tumme-display-window-width-correction' | ||
| 207 | ;; and `tumme-display-window-height-correction' to be used to | ||
| 208 | ;; correct width and height depending on width and height of window | ||
| 209 | ;; decorations, fringes etc. This works really well! | ||
| 210 | ;; | ||
| 211 | ;; Version 0.4.3, 2005-05-07 | ||
| 212 | ;; | ||
| 213 | ;; * Added menus to `dired-mode' and `tumme-mode' | ||
| 214 | ;; | ||
| 215 | ;; * Added `tumme-mark-and-display-next' | ||
| 216 | ;; | ||
| 217 | ;; * Added `tumme-jump-thumbnail-buffer' | ||
| 218 | ;; | ||
| 219 | ;; * Bound TAB in `dired-mode-map' and `tumme-mode-map' to | ||
| 220 | ;; `tumme-jump-thumbnail-buffer' and | ||
| 221 | ;; `tumme-jump-original-dired-buffer', respectively. | ||
| 222 | ;; | ||
| 223 | ;; * Changed `tumme-display-image' to be more general. Now, it can be | ||
| 224 | ;; used from both thumbnail buffer and dired buffer by calling | ||
| 225 | ;; `tumme-display-thumbnail-original-image' and | ||
| 226 | ;; `tumme-display-dired-image', respectively. | ||
| 227 | ;; | ||
| 228 | ;; Version 0.4.4, 2005-05-10 | ||
| 229 | ;; | ||
| 230 | ;; * Added `tumme-get-exif-file-name' and | ||
| 231 | ;; `tumme-copy-with-exif-file-name'. These commands might not be | ||
| 232 | ;; useful for all people because they are very specific. See the | ||
| 233 | ;; documentation for each function for more information. | ||
| 234 | ;; | ||
| 235 | ;; * Added `tumme-display-next-thumbnail-original' and | ||
| 236 | ;; `tumme-display-previous-thumbnail-original' to be used for easy | ||
| 237 | ;; image browsing in thumbnail buffer. | ||
| 238 | ;; | ||
| 239 | ;; * Added support for comments. New function | ||
| 240 | ;; `tumme-comment-thumbnail' added, to be used in thumbnail buffer. | ||
| 241 | ;; | ||
| 242 | ;; * Added `tumme-mark-tagged-files'. Use it in dired buffer to mark | ||
| 243 | ;; tagged files. | ||
| 244 | ;; | ||
| 245 | ;; * Added `mouse-face' property `highlight' for mouse highlighting | ||
| 246 | ;; and had to add a space between each thumbnail to avoid whole rows | ||
| 247 | ;; to be highlighted. Doing this meant that I had to update | ||
| 248 | ;; `tumme-line-up' too... | ||
| 249 | ;; | ||
| 250 | ;; * Added `tumme-mouse-display-image'. Use mouse-2 to display image | ||
| 251 | ;; thumbnail when is highlighted. | ||
| 252 | ;; | ||
| 253 | ;; * As suggested by Ehud Karni on gnu.emacs.help, changed | ||
| 254 | ;; `tumme-window-DIMENSION-pixels' to use `frame-char-DIMENSION' | ||
| 255 | ;; instead of `frame-pixel-DIMENSION'. Feels better | ||
| 256 | ;; | ||
| 257 | ;; * Corrected a bug in `tumme-window-height-pixels'. I did not know | ||
| 258 | ;; that the mode-line consumed one line. Also, after experimenting, it | ||
| 259 | ;; seems that the only correction needed for the image display width | ||
| 260 | ;; is one single pixel. I left the corection variables in there, just | ||
| 261 | ;; in case someone has a system that differs. | ||
| 262 | ;; | ||
| 263 | ;; Version 0.4.5, 2005-05-19 | ||
| 264 | ;; | ||
| 265 | ;; * Added `tumme-line-up-dynamic' that calculates the number of | ||
| 266 | ;; thumbnails that will fit in the thumbnail buffer's window and | ||
| 267 | ;; `tumme-line-up-interactive' that asks the user. | ||
| 268 | ;; | ||
| 269 | ;; * Changed `tumme-display-thumbs' to call one of the `tumme-line-up' | ||
| 270 | ;; functions instead of doing the line-up itself. | ||
| 271 | ;; | ||
| 272 | ;; * Finally! Added experimental gallery creation. See customizable | ||
| 273 | ;; variables `tumme-gallery-dir', `tumme-gallery-image-root-url' and | ||
| 274 | ;; `tumme-gallery-thumb-image-root-url' and new command | ||
| 275 | ;; `tumme-gallery-generate'. Not beatiful, but it works quite | ||
| 276 | ;; well. Probably needs some CSS-stuff in it eventually. Also, I'm not | ||
| 277 | ;; sure this is the way I want to generate my image galleries in the | ||
| 278 | ;; future. After all, static pages cannot do what dynamic pages using | ||
| 279 | ;; PHP et al can do. Serves like a proof-of-concept of the tagging | ||
| 280 | ;; though. | ||
| 281 | ;; | ||
| 282 | ;; * Added option to hide images with certain tags. See | ||
| 283 | ;; `tumme-gallery-hidden-tags'. | ||
| 284 | ;; | ||
| 285 | ;; * Added `tumme-tag-thumbnail' for tagging files from thumbnail | ||
| 286 | ;; buffer. | ||
| 287 | ;; | ||
| 288 | ;; * Added `tumme-tag-remove' and `tumme-tag-thumbnail-remove' so that | ||
| 289 | ;; you can remove tags. Sorry if I have kept you waiting for | ||
| 290 | ;; this... :) | ||
| 291 | ;; | ||
| 292 | ;; * Added option `tumme-append-when-browsing' and new command | ||
| 293 | ;; `tumme-toggle-append-browsing'. | ||
| 294 | ;; | ||
| 295 | ;; Version 0.4.6, 2005-05-21 | ||
| 296 | ;; | ||
| 297 | ;; * Changed `tumme-thumb-name' to always use ".jpg" as file extension | ||
| 298 | ;; for thumbnail files, instead of using the extension from the | ||
| 299 | ;; original file's name. This was a very easy way to open up for | ||
| 300 | ;; allowing browsing of all image file types that Emacs support, | ||
| 301 | ;; assuming ImageMagick supports it too. | ||
| 302 | ;; | ||
| 303 | ;; * Fixed bug in `tumme-create-thumb' `tumme-rotate-thumbnail' and | ||
| 304 | ;; `tumme-display-image' by adding quotes around the file names. The | ||
| 305 | ;; conversion failed if the file name, or path, contained a | ||
| 306 | ;; space. Also expanded the file name, as convert (or is it bash?) | ||
| 307 | ;; does not work as expected for paths like "~/.tumme...". | ||
| 308 | ;; | ||
| 309 | ;; * Fixed another "space bug" :) in `tumme-display-external'. | ||
| 310 | ;; | ||
| 311 | ;; * In call to convert, added "jpeg:" in front of the output file | ||
| 312 | ;; name, so that all generated files becomes JPEG files. For now, only | ||
| 313 | ;; useful if `tumme-temp-image-file' does not end in .jpg. | ||
| 314 | ;; | ||
| 315 | ;; Version 0.4.7, 2005-05-26 | ||
| 316 | ;; | ||
| 317 | ;; * Change header line of tumme.el so that it does not wrap and cause | ||
| 318 | ;; evaluation problems for people getting the source from Usenet. | ||
| 319 | ;; | ||
| 320 | ;; * Changed `tumme-write-tag' slightly to get better performance when | ||
| 321 | ;; tagging many files. | ||
| 322 | ;; | ||
| 323 | ;; * Fixed bug in `tumme-create-gallery-lists' that made it puke if | ||
| 324 | ;; there was empty lines in the database. Changed the code so that it | ||
| 325 | ;; does not car about that. Also, fixed `tumme-remove-tag' so that it | ||
| 326 | ;; tries not to add empty lines at the end of the database. | ||
| 327 | ;; | ||
| 328 | ;; * Changed all commands that execute shell commands to be | ||
| 329 | ;; configurable using the `tumme-cmd-x' custom variables. This makes | ||
| 330 | ;; it easier to switch among different image conversion tools which | ||
| 331 | ;; might use different syntax and options. | ||
| 332 | ;; | ||
| 333 | ;; * Added `tumme-toggle-dired-display-properties'. | ||
| 334 | ;; | ||
| 335 | ;; * Added `tumme-thumb-file-name-format' and changed | ||
| 336 | ;; `tumme-thumb-name' to make it possible to configure the format of | ||
| 337 | ;; thumbnail files. Did not make it customizable yet though. It might | ||
| 338 | ;; be a bad idea to be able to switch between formats... | ||
| 339 | ;; | ||
| 340 | ;; * Changed `tumme-display-window' so that it looks for tumme's | ||
| 341 | ;; display window in all frames. Useful if you want to create an own | ||
| 342 | ;; frame for displaying the temporary image. | ||
| 343 | ;; | ||
| 344 | ;; * After changing the call to `get-window-with-predicate' to scan | ||
| 345 | ;; all frames for tumme's special buffers in visible windows, and also | ||
| 346 | ;; changing the way tumme tracks thumbnail movement in the dired | ||
| 347 | ;; buffer (now using `set-buffer' together with `set-window-point'), | ||
| 348 | ;; tumme now works quite happily with all three buffers in different | ||
| 349 | ;; frames. This empowers the user to setup the special buffers the way | ||
| 350 | ;; that best fits his need at the time. Jumping between dired and | ||
| 351 | ;; `tumme-thumbnail-buffer' work independent on in which frames they | ||
| 352 | ;; are. | ||
| 353 | ;; | ||
| 354 | ;; * Renamed `tumme-track-movement-in-dired' to | ||
| 355 | ;; `tumme-toggle-movement-tracking'. | ||
| 356 | ;; | ||
| 357 | ;; * Added `tumme-track-thumbnail' for movement tracking from dired | ||
| 358 | ;; buffer, analoguous to the tracking done in thumbnail buffer. Both | ||
| 359 | ;; uses the same custom variable `tumme-track-movement' which can be | ||
| 360 | ;; toggled on and off with `tumme-toggle-movement-tracking'. This is | ||
| 361 | ;; neat. :) Changed `tumme-setup-dired-keybindings' to make use of | ||
| 362 | ;; this in the best way. Read more about this there. | ||
| 363 | ;; | ||
| 364 | ;; Version 0.4.8, 2005-06-05 | ||
| 365 | ;; | ||
| 366 | ;; * Changed `tumme-display-dired-image' and | ||
| 367 | ;; `tumme-display-thumbnail-original-image' so that when called with a | ||
| 368 | ;; prefix argument, the image is not resized in the display | ||
| 369 | ;; buffer. This will be useful for later additions of image | ||
| 370 | ;; manipulation commands. | ||
| 371 | ;; | ||
| 372 | ;; * Added `tumme-kill-buffer-and-window' to make it easy to kill the | ||
| 373 | ;; tumme buffers. | ||
| 374 | ;; | ||
| 375 | ;; * Renamed `tumme-mode' to `tumme-thumbnail-mode'. | ||
| 376 | ;; | ||
| 377 | ;; * `tumme-tag-thumbnail' and `tumme-tag-thumbnail-remove' now | ||
| 378 | ;; updates the tags property for the thumbnail. | ||
| 379 | ;; | ||
| 380 | ;; * Added `tumme-dired-display-external' to display images in | ||
| 381 | ;; external viewer from dired buffer. | ||
| 382 | ;; | ||
| 383 | ;; * Added support for multiple files in `tumme-remove-tag' to | ||
| 384 | ;; increase performance. | ||
| 385 | ;; | ||
| 386 | ;; * Added `tumme-display-image-mode' so that we can add image | ||
| 387 | ;; manipulation commands there. | ||
| 388 | ;; | ||
| 389 | ;; * Added call to `tumme-display-thumb-properties' in | ||
| 390 | ;; `tumme-track-thumbnail'. | ||
| 391 | ;; | ||
| 392 | ;; * Added command `tumme-display-current-image-in-full-size' to be | ||
| 393 | ;; used in `tumme-display-image-mode'. | ||
| 394 | ;; | ||
| 395 | ;; * Changed `tumme-display-image' to call | ||
| 396 | ;; `tumme-create-display-image-buffer' so that we are sure that | ||
| 397 | ;; `tumme-display-image-buffer' is always available. | ||
| 398 | ;; | ||
| 399 | ;; * Added optional prefix argument to `tumme-dired-folder' that tells | ||
| 400 | ;; it to skip the window splitting and just creates the needed | ||
| 401 | ;; buffers. | ||
| 402 | ;; | ||
| 403 | ;; * Fixed bug somewhere that relied on `tumme-dired-folder' having | ||
| 404 | ;; created the `tumme-display-image-buffer'. Now `tumme-dired-folder' | ||
| 405 | ;; *should* not be necessary to call at all, just convenient. | ||
| 406 | ;; | ||
| 407 | ;; * Added tracking to `tumme-mouse-display-image'. | ||
| 408 | ;; | ||
| 409 | ;; * Added `tumme-mouse-select-thumbnail' and bound mouse-1 to it, so | ||
| 410 | ;; that selecting a thumbnail will track the original file. | ||
| 411 | ;; | ||
| 412 | ;; * Added three new custom variables, `tumme-cmd-ACTION-program' to | ||
| 413 | ;; make the command options cleaner and easier to read. | ||
| 414 | ;; | ||
| 415 | ;; * Added `tumme-display-properties-format' and | ||
| 416 | ;; `tumme-format-properties-string' to make it possible to configure | ||
| 417 | ;; the display format of the image file's properties. | ||
| 418 | ;; | ||
| 419 | ;; * Added missing (require 'format-spec) | ||
| 420 | ;; | ||
| 421 | ;; Version 0.4.9, 2005-09-25 | ||
| 422 | ;; | ||
| 423 | ;; * Fixed bug in `tumme-display-thumbs'. If a thumbnail file could | ||
| 424 | ;; not be created for some reason (bad file for example), even if | ||
| 425 | ;; several other thumbnails was created sucessfully, the code | ||
| 426 | ;; generated an error and never continued doing the line-up. | ||
| 427 | ;; | ||
| 428 | ;; * Made tumme.el pass the M-x checkdoc test, phew! | ||
| 429 | ;; | ||
| 430 | ;; * Added `tumme-rotate-original', `tumme-rotate-original-left' and | ||
| 431 | ;; `tumme-rotate-original-right' to rotate the original image from | ||
| 432 | ;; thumbnail view. By default it uses JpegTRAN to rotate the images | ||
| 433 | ;; non-lossy. Only works on JPEG images. The two new commands were | ||
| 434 | ;; added to thumbnail mode. Thanks to Colin Marquardt who told me | ||
| 435 | ;; about the "-copy all" option to jpegtran. | ||
| 436 | ;; | ||
| 437 | ;; * Added the functions `tumme-get-exif-data' and | ||
| 438 | ;; `tumme-set-exif-data' for reading and writing EXIF data to image files. | ||
| 439 | ;; | ||
| 440 | ;; * Rewrote `tumme-get-exif-file-name': now uses | ||
| 441 | ;; `tumme-get-exif-data'. Slight change to replace spaces with | ||
| 442 | ;; underscores (tt seems not all cameras use the exact same format for | ||
| 443 | ;; DateTimeOriginal). Added code for handling files that has no | ||
| 444 | ;; EXIF-data (use file's timestamp instead). | ||
| 445 | ;; | ||
| 446 | ;; * Changed from using the exif program to exiftool because exiftool | ||
| 447 | ;; also handles writing of EXIF data, which is very useful. | ||
| 448 | ;; | ||
| 449 | ;; * Added the command `tumme-thumbnail-set-image-description' that | ||
| 450 | ;; can be used to set the EXIF tag ImageDescription. Thanks to Colin | ||
| 451 | ;; Marquardt for the suggestion. | ||
| 452 | ;; | ||
| 453 | ;; * Added `tumme-toggle-mark-thumb-original-file' and | ||
| 454 | ;; `tumme-mouse-toggle-mark' and changed | ||
| 455 | ;; `tumme-modify-mark-on-thumb-original-file' to support toggling of | ||
| 456 | ;; mark of original image file in dired, from | ||
| 457 | ;; `tumme-thumbnail-mode'. Bound C-down-mouse-1 | ||
| 458 | ;; `tumme-mouse-toggle-mark' to in `tumme-thumbnail-mode'. | ||
| 459 | ;; | ||
| 460 | ;; * Changed `tumme-mouse-select-thumbnail' to also display properties | ||
| 461 | ;; after the file is selected. | ||
| 462 | ;; | ||
| 463 | ;; Version 0.4.10, 2005-11-07 | ||
| 464 | ;; | ||
| 465 | ;; * Renamed `tumme-dired-folder' to `tumme-dired'. | ||
| 466 | ;; | ||
| 467 | ;; * Changed format of the database file slightly, now the full path | ||
| 468 | ;; and file name is used. Had to change most of the tag functions | ||
| 469 | ;; (writing, reading, searching) slightly to cope with the change. If | ||
| 470 | ;; you are an old tumme user, you have to update your database | ||
| 471 | ;; manually, probably you only need to prefix all rows with a | ||
| 472 | ;; directory name to get the full path and file name. | ||
| 473 | ;; | ||
| 474 | ;; * Removed `tumme-thumb-file-name-format'. Added | ||
| 475 | ;; `tumme-thumbnail-storage' and changed `tumme-thumb-name' to provide | ||
| 476 | ;; two different thumbnail storage schemes. It is no longer necessary | ||
| 477 | ;; to have unique image file names to use tumme fully. | ||
| 478 | ;; | ||
| 479 | ;; * As a consequence of the above, gallery generation is currently | ||
| 480 | ;; not supported if per-directory thumbnail file storage is used. | ||
| 481 | ;; | ||
| 482 | ;; * Changed parameters to `tumme-create-thumb'. | ||
| 483 | ;; | ||
| 484 | ;; * To be included in Emacs 22. | ||
| 485 | ;; | ||
| 486 | ;; | ||
| 487 | ;; Version 0.4.11, 2006-MM-DD | ||
| 488 | ;; | ||
| 489 | ;; * Changed `tumme-display-thumbs' so that it calls `display-buffer' | ||
| 490 | ;; after generating the thumbnails and changed | ||
| 491 | ;; `tumme-display-thumbnail-original-image' to display the image | ||
| 492 | ;; buffer. These small changes should make it easier for a user to | ||
| 493 | ;; start using tumme. | ||
| 494 | ;; | ||
| 495 | ;; * Added `tumme-show-all-from-dir' to mimic thumbs.el's easy-to-use | ||
| 496 | ;; `thumbs' command. A new customize option, | ||
| 497 | ;; `tumme-show-all-from-dir-max-files' was added too. | ||
| 498 | ;; | ||
| 499 | ;; * Renamed `tumme-dired' to `tumme-dired-with-window-configuration' | ||
| 500 | ;; and added code to save the window configuration before messing it | ||
| 501 | ;; up. The saved window configuration can be restored using the new | ||
| 502 | ;; command `tumme-restore-window-configuration'. | ||
| 503 | ;; | ||
| 504 | ;; * Added `tumme-get-thumbnail-image', created by Chong Yidong. His | ||
| 505 | ;; own comments: ..., that just takes the original filename and | ||
| 506 | ;; returns a thumbnail image descriptor. Then third-party libraries | ||
| 507 | ;; won't have to muck around with tumme.el's internal functions like | ||
| 508 | ;; `thumme-thumb-name', `tumme-create-thumb', etc. His code to get | ||
| 509 | ;; speedbar display tumme thumbnails, might be integrated soon. | ||
| 510 | ;; | ||
| 511 | ;; * Changed the default value of `tumme-dir' to "~/.emacs.d/tumme" | ||
| 512 | ;; and added a new function, `tumme-dir' to handle the creating of | ||
| 513 | ;; it. Code copied from thumbs.el. | ||
| 514 | ;; | ||
| 515 | ;; | ||
| 516 | ;; TODO | 138 | ;; TODO |
| 517 | ;; ==== | 139 | ;; ==== |
| 518 | ;; | 140 | ;; |
| 519 | ;; * Look into supporting the Thumbnail Managing Standard, maybe as a | ||
| 520 | ;; configurable option. | ||
| 521 | ;; | ||
| 522 | ;; * Support gallery creation when using per-directory thumbnail | 141 | ;; * Support gallery creation when using per-directory thumbnail |
| 523 | ;; storage. | 142 | ;; storage. |
| 524 | ;; | 143 | ;; |
| @@ -579,7 +198,7 @@ | |||
| 579 | (defgroup tumme nil | 198 | (defgroup tumme nil |
| 580 | "Use dired to browse your images as thumbnails, and more." | 199 | "Use dired to browse your images as thumbnails, and more." |
| 581 | :prefix "tumme-" | 200 | :prefix "tumme-" |
| 582 | :group 'files) | 201 | :group 'multimedia) |
| 583 | 202 | ||
| 584 | (defcustom tumme-dir "~/.emacs.d/tumme/" | 203 | (defcustom tumme-dir "~/.emacs.d/tumme/" |
| 585 | "*Directory where thumbnail images are stored." | 204 | "*Directory where thumbnail images are stored." |
| @@ -592,8 +211,12 @@ Tumme can store thumbnail files in one of two ways and this is | |||
| 592 | controlled by this variable. \"Use tumme dir\" means that the | 211 | controlled by this variable. \"Use tumme dir\" means that the |
| 593 | thumbnails are stored in a central directory. \"Per directory\" | 212 | thumbnails are stored in a central directory. \"Per directory\" |
| 594 | means that each thumbnail is stored in a subdirectory called | 213 | means that each thumbnail is stored in a subdirectory called |
| 595 | \".tumme\" in the same directory where the image file is." | 214 | \".tumme\" in the same directory where the image file is. |
| 215 | \"Thumbnail Managing Standard\" means that the thumbnails are | ||
| 216 | stored and generated according to the Thumbnail Managing Standard | ||
| 217 | that allows sharing of thumbnails across different programs." | ||
| 596 | :type '(choice :tag "How to store thumbnail files" | 218 | :type '(choice :tag "How to store thumbnail files" |
| 219 | (const :tag "Thumbnail Managing Standard" standard) | ||
| 597 | (const :tag "Use tumme-dir" use-tumme-dir) | 220 | (const :tag "Use tumme-dir" use-tumme-dir) |
| 598 | (const :tag "Per-directory" per-directory)) | 221 | (const :tag "Per-directory" per-directory)) |
| 599 | :group 'tumme) | 222 | :group 'tumme) |
| @@ -639,13 +262,13 @@ Used together with `tumme-cmd-create-thumbnail-options'." | |||
| 639 | :group 'tumme) | 262 | :group 'tumme) |
| 640 | 263 | ||
| 641 | (defcustom tumme-cmd-create-thumbnail-options | 264 | (defcustom tumme-cmd-create-thumbnail-options |
| 642 | "%p -size %sx%s \"%f\" -resize %sx%s +profile \"*\" jpeg:\"%t\"" | 265 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
| 643 | "*Format of command used to create thumbnail image. | 266 | "*Format of command used to create thumbnail image. |
| 644 | Available options are %p which is replaced by | 267 | Available options are %p which is replaced by |
| 645 | `tumme-cmd-create-thumbnail-program', %s which is replaced by | 268 | `tumme-cmd-create-thumbnail-program', %w which is replaced by |
| 646 | `tumme-thumb-size', %f which is replaced by the file name of the | 269 | `tumme-thumb-width', %h which is replaced by `tumme-thumb-height', |
| 647 | original image and %t which is replaced by the file name of the | 270 | %f which is replaced by the file name of the original image and %t |
| 648 | thumbnail file." | 271 | which is replaced by the file name of the thumbnail file." |
| 649 | :type 'string | 272 | :type 'string |
| 650 | :group 'tumme) | 273 | :group 'tumme) |
| 651 | 274 | ||
| @@ -657,16 +280,64 @@ Used together with `tumme-cmd-create-temp-image-options'." | |||
| 657 | :group 'tumme) | 280 | :group 'tumme) |
| 658 | 281 | ||
| 659 | (defcustom tumme-cmd-create-temp-image-options | 282 | (defcustom tumme-cmd-create-temp-image-options |
| 660 | "%p -size %xx%y \"%f\" -resize %xx%y +profile \"*\" jpeg:\"%t\"" | 283 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
| 661 | "*Format of command used to create temporary image for display window. | 284 | "*Format of command used to create temporary image for display window. |
| 662 | Available options are %p which is replaced by | 285 | Available options are %p which is replaced by |
| 663 | `tumme-cmd-create-temp-image-program', %x and %y which is replaced by | 286 | `tumme-cmd-create-temp-image-program', %w and %h which is replaced by |
| 664 | the calculated max size for x and y in the image display window, %f | 287 | the calculated max size for width and height in the image display window, |
| 665 | which is replaced by the file name of the original image and %t which | 288 | %f which is replaced by the file name of the original image and %t which |
| 666 | is replaced by the file name of the temporary file." | 289 | is replaced by the file name of the temporary file." |
| 667 | :type 'string | 290 | :type 'string |
| 668 | :group 'tumme) | 291 | :group 'tumme) |
| 669 | 292 | ||
| 293 | (defcustom tumme-cmd-pngnq-program (executable-find "pngnq") | ||
| 294 | "*The file name of the `pngnq' program. | ||
| 295 | It quantizes colors of PNG images down to 256 colors." | ||
| 296 | :type '(choice (const :tag "Not Set" nil) string) | ||
| 297 | :group 'tumme) | ||
| 298 | |||
| 299 | (defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush") | ||
| 300 | "*The file name of the `pngcrush' program. | ||
| 301 | It optimizes the compression of PNG images. Also it adds PNG textual chunks | ||
| 302 | with the information required by the Thumbnail Managing Standard." | ||
| 303 | :type '(choice (const :tag "Not Set" nil) string) | ||
| 304 | :group 'tumme) | ||
| 305 | |||
| 306 | (defcustom tumme-cmd-create-standard-thumbnail-command | ||
| 307 | (concat | ||
| 308 | tumme-cmd-create-thumbnail-program " " | ||
| 309 | "-size %wx%h \"%f\" " | ||
| 310 | (unless (or tumme-cmd-pngcrush-program tumme-cmd-pngnq-program) | ||
| 311 | (concat | ||
| 312 | "-set \"Thumb::MTime\" \"%m\" " | ||
| 313 | "-set \"Thumb::URI\" \"file://%f\" " | ||
| 314 | "-set \"Description\" \"Thumbnail of file://%f\" " | ||
| 315 | "-set \"Software\" \"" (emacs-version) "\" ")) | ||
| 316 | "-thumbnail %wx%h png:\"%t\"" | ||
| 317 | (if tumme-cmd-pngnq-program | ||
| 318 | (concat | ||
| 319 | " ; " tumme-cmd-pngnq-program " -f \"%t\"" | ||
| 320 | (unless tumme-cmd-pngcrush-program | ||
| 321 | " ; mv %q %t"))) | ||
| 322 | (if tumme-cmd-pngcrush-program | ||
| 323 | (concat | ||
| 324 | (unless tumme-cmd-pngcrush-program | ||
| 325 | " ; cp %t %q") | ||
| 326 | " ; " tumme-cmd-pngcrush-program " -q " | ||
| 327 | "-text b \"Description\" \"Thumbnail of file://%f\" " | ||
| 328 | "-text b \"Software\" \"" (emacs-version) "\" " | ||
| 329 | ;; "-text b \"Thumb::Image::Height\" \"%oh\" " | ||
| 330 | ;; "-text b \"Thumb::Image::Mimetype\" \"%mime\" " | ||
| 331 | ;; "-text b \"Thumb::Image::Width\" \"%ow\" " | ||
| 332 | "-text b \"Thumb::MTime\" \"%m\" " | ||
| 333 | ;; "-text b \"Thumb::Size\" \"%b\" " | ||
| 334 | "-text b \"Thumb::URI\" \"file://%f\" " | ||
| 335 | "%q %t" | ||
| 336 | " ; rm %q"))) | ||
| 337 | "*Command to create thumbnails according to the Thumbnail Managing Standard." | ||
| 338 | :type 'string | ||
| 339 | :group 'tumme) | ||
| 340 | |||
| 670 | (defcustom tumme-cmd-rotate-thumbnail-program | 341 | (defcustom tumme-cmd-rotate-thumbnail-program |
| 671 | "mogrify" | 342 | "mogrify" |
| 672 | "*Executable used to rotate thumbnail. | 343 | "*Executable used to rotate thumbnail. |
| @@ -757,8 +428,19 @@ Used by `tumme-gallery-generate' to leave out \"hidden\" images." | |||
| 757 | :type '(repeat string) | 428 | :type '(repeat string) |
| 758 | :group 'tumme) | 429 | :group 'tumme) |
| 759 | 430 | ||
| 760 | (defcustom tumme-thumb-size 100 | 431 | (defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100) |
| 761 | "Size of thumbnails, in pixels." | 432 | "Size of thumbnails, in pixels. |
| 433 | This is the default size for both `tumme-thumb-width' and `tumme-thumb-height'." | ||
| 434 | :type 'integer | ||
| 435 | :group 'tumme) | ||
| 436 | |||
| 437 | (defcustom tumme-thumb-width tumme-thumb-size | ||
| 438 | "Width of thumbnails, in pixels." | ||
| 439 | :type 'integer | ||
| 440 | :group 'tumme) | ||
| 441 | |||
| 442 | (defcustom tumme-thumb-height tumme-thumb-size | ||
| 443 | "Height of thumbnails, in pixels." | ||
| 762 | :type 'integer | 444 | :type 'integer |
| 763 | :group 'tumme) | 445 | :group 'tumme) |
| 764 | 446 | ||
| @@ -841,7 +523,11 @@ with the comment." | |||
| 841 | :type 'string | 523 | :type 'string |
| 842 | :group 'tumme) | 524 | :group 'tumme) |
| 843 | 525 | ||
| 844 | (defcustom tumme-external-viewer "qiv -t" | 526 | (defcustom tumme-external-viewer |
| 527 | ;; TODO: use mailcap, dired-guess-shell-alist-default, dired-view-command-alist | ||
| 528 | (cond ((executable-find "display")) | ||
| 529 | ((executable-find "xli")) | ||
| 530 | ((executable-find "qiv") "qiv -t")) | ||
| 845 | "*Name of external viewer. | 531 | "*Name of external viewer. |
| 846 | Including parameters. Used when displaying original image from | 532 | Including parameters. Used when displaying original image from |
| 847 | `tumme-thumbnail-mode'." | 533 | `tumme-thumbnail-mode'." |
| @@ -888,8 +574,11 @@ Create the thumbnails directory if it does not exist." | |||
| 888 | (<= (float-time (nth 5 (file-attributes file))) | 574 | (<= (float-time (nth 5 (file-attributes file))) |
| 889 | (float-time (nth 5 (file-attributes thumb-file))))) | 575 | (float-time (nth 5 (file-attributes thumb-file))))) |
| 890 | (tumme-create-thumb file thumb-file)) | 576 | (tumme-create-thumb file thumb-file)) |
| 891 | (list 'image :type 'jpeg :file thumb-file | 577 | (create-image thumb-file) |
| 892 | :relief tumme-thumb-relief :margin tumme-thumb-margin))) | 578 | ;; (list 'image :type 'jpeg |
| 579 | ;; :file thumb-file | ||
| 580 | ;; :relief tumme-thumb-relief :margin tumme-thumb-margin) | ||
| 581 | )) | ||
| 893 | 582 | ||
| 894 | (defun tumme-insert-thumbnail (file original-file-name | 583 | (defun tumme-insert-thumbnail (file original-file-name |
| 895 | associated-dired-buffer) | 584 | associated-dired-buffer) |
| @@ -898,7 +587,9 @@ Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." | |||
| 898 | (let (beg end) | 587 | (let (beg end) |
| 899 | (setq beg (point)) | 588 | (setq beg (point)) |
| 900 | (tumme-insert-image file | 589 | (tumme-insert-image file |
| 901 | 'jpeg | 590 | ;; TODO: this should depend on the real file type |
| 591 | (if (eq 'standard tumme-thumbnail-storage) | ||
| 592 | 'png 'jpeg) | ||
| 902 | tumme-thumb-relief | 593 | tumme-thumb-relief |
| 903 | tumme-thumb-margin) | 594 | tumme-thumb-margin) |
| 904 | (setq end (point)) | 595 | (setq end (point)) |
| @@ -917,38 +608,52 @@ Depending on the value of `tumme-thumbnail-storage', the file | |||
| 917 | name will vary. For central thumbnail file storage, make a | 608 | name will vary. For central thumbnail file storage, make a |
| 918 | MD5-hash of the image file's directory name and add that to make | 609 | MD5-hash of the image file's directory name and add that to make |
| 919 | the thumbnail file name unique. For per-directory storage, just | 610 | the thumbnail file name unique. For per-directory storage, just |
| 920 | add a subdirectory." | 611 | add a subdirectory. For standard storage, produce the file name |
| 921 | (let ((f (expand-file-name file)) | 612 | according to the Thumbnail Managing Standard." |
| 922 | md5-hash) | 613 | (cond ((eq 'standard tumme-thumbnail-storage) |
| 923 | (format "%s%s%s.thumb.%s" | 614 | (expand-file-name |
| 924 | (cond ((eq 'use-tumme-dir tumme-thumbnail-storage) | 615 | (concat "~/.thumbnails/normal/" |
| 925 | ;; Is MD5 hashes fast enough? The checksum of a | 616 | (md5 (concat "file://" (expand-file-name file))) ".png"))) |
| 926 | ;; thumbnail file name need not be that | 617 | ((eq 'use-tumme-dir tumme-thumbnail-storage) |
| 927 | ;; "cryptographically" good so a faster one could | 618 | (let* ((f (expand-file-name file)) |
| 928 | ;; be used here. | 619 | (md5-hash |
| 929 | (setq md5-hash (md5 (file-name-as-directory | 620 | ;; Is MD5 hashes fast enough? The checksum of a |
| 930 | (file-name-directory file)))) | 621 | ;; thumbnail file name need not be that |
| 931 | (file-name-as-directory (expand-file-name (tumme-dir)))) | 622 | ;; "cryptographically" good so a faster one could |
| 932 | ((eq 'per-directory tumme-thumbnail-storage) | 623 | ;; be used here. |
| 933 | (format "%s.tumme/" | 624 | (md5 (file-name-as-directory (file-name-directory f))))) |
| 934 | (file-name-directory f)))) | 625 | (format "%s%s%s.thumb.%s" |
| 935 | (file-name-sans-extension | 626 | (file-name-as-directory (expand-file-name (tumme-dir))) |
| 936 | (file-name-nondirectory f)) | 627 | (file-name-sans-extension (file-name-nondirectory f)) |
| 937 | (if md5-hash | 628 | (if md5-hash (concat "_" md5-hash) "") |
| 938 | (concat "_" md5-hash) | 629 | (file-name-extension f)))) |
| 939 | "") | 630 | ((eq 'per-directory tumme-thumbnail-storage) |
| 940 | (file-name-extension f)))) | 631 | (let ((f (expand-file-name file))) |
| 632 | (format "%s.tumme/%s.thumb.%s" | ||
| 633 | (file-name-directory f) | ||
| 634 | (file-name-sans-extension (file-name-nondirectory f)) | ||
| 635 | (file-name-extension f)))))) | ||
| 941 | 636 | ||
| 942 | (defun tumme-create-thumb (original-file thumbnail-file) | 637 | (defun tumme-create-thumb (original-file thumbnail-file) |
| 943 | "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." | 638 | "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." |
| 944 | (let* ((size (int-to-string tumme-thumb-size)) | 639 | (let* ((width (int-to-string tumme-thumb-width)) |
| 640 | (height (int-to-string tumme-thumb-height)) | ||
| 641 | (modif-time (format "%.0f" (float-time (nth 5 (file-attributes | ||
| 642 | original-file))))) | ||
| 643 | (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png" | ||
| 644 | thumbnail-file)) | ||
| 945 | (command | 645 | (command |
| 946 | (format-spec | 646 | (format-spec |
| 947 | tumme-cmd-create-thumbnail-options | 647 | (if (eq 'standard tumme-thumbnail-storage) |
| 648 | tumme-cmd-create-standard-thumbnail-command | ||
| 649 | tumme-cmd-create-thumbnail-options) | ||
| 948 | (list | 650 | (list |
| 949 | (cons ?p tumme-cmd-create-thumbnail-program) | 651 | (cons ?p tumme-cmd-create-thumbnail-program) |
| 950 | (cons ?s size) | 652 | (cons ?w width) |
| 653 | (cons ?h height) | ||
| 654 | (cons ?m modif-time) | ||
| 951 | (cons ?f original-file) | 655 | (cons ?f original-file) |
| 656 | (cons ?q thumbnail-nq8-file) | ||
| 952 | (cons ?t thumbnail-file)))) | 657 | (cons ?t thumbnail-file)))) |
| 953 | thumbnail-dir) | 658 | thumbnail-dir) |
| 954 | (when (not (file-exists-p | 659 | (when (not (file-exists-p |
| @@ -957,6 +662,40 @@ add a subdirectory." | |||
| 957 | (make-directory thumbnail-dir)) | 662 | (make-directory thumbnail-dir)) |
| 958 | (shell-command command nil))) | 663 | (shell-command command nil))) |
| 959 | 664 | ||
| 665 | ;;;###autoload | ||
| 666 | (defun tumme-dired-insert-marked-thumbs () | ||
| 667 | "Insert thumbnails before file names of marked files in the dired buffer." | ||
| 668 | (interactive) | ||
| 669 | (dired-map-over-marks | ||
| 670 | (let* ((image-pos (dired-move-to-filename)) | ||
| 671 | (image-file (dired-get-filename)) | ||
| 672 | (thumb-file (tumme-get-thumbnail-image image-file)) | ||
| 673 | overlay) | ||
| 674 | ;; If image is not already added, then add it. | ||
| 675 | (unless (delq nil (mapcar (lambda (o) (overlay-get o 'put-image)) | ||
| 676 | ;; Can't use (overlays-at (point)), BUG? | ||
| 677 | (overlays-in (point) (1+ (point))))) | ||
| 678 | (put-image thumb-file image-pos) | ||
| 679 | (setq overlay (car (delq nil (mapcar (lambda (o) (and (overlay-get o 'put-image) o)) | ||
| 680 | (overlays-in (point) (1+ (point))))))) | ||
| 681 | (overlay-put overlay 'image-file image-file) | ||
| 682 | (overlay-put overlay 'thumb-file thumb-file))) | ||
| 683 | nil) | ||
| 684 | (add-hook 'dired-after-readin-hook 'tumme-dired-after-readin-hook nil t)) | ||
| 685 | |||
| 686 | (defun tumme-dired-after-readin-hook () | ||
| 687 | "Relocate existing thumbnail overlays in dired buffer after reverting. | ||
| 688 | Move them to their corresponding files if they are still exist. | ||
| 689 | Otherwise, delete overlays." | ||
| 690 | (mapc (lambda (overlay) | ||
| 691 | (when (overlay-get overlay 'put-image) | ||
| 692 | (let* ((image-file (overlay-get overlay 'image-file)) | ||
| 693 | (image-pos (dired-goto-file image-file))) | ||
| 694 | (if image-pos | ||
| 695 | (move-overlay overlay image-pos image-pos) | ||
| 696 | (delete-overlay overlay))))) | ||
| 697 | (overlays-in (point-min) (point-max)))) | ||
| 698 | |||
| 960 | (defun tumme-next-line-and-display () | 699 | (defun tumme-next-line-and-display () |
| 961 | "Move to next dired line and display thumbnail image." | 700 | "Move to next dired line and display thumbnail image." |
| 962 | (interactive) | 701 | (interactive) |
| @@ -1966,7 +1705,7 @@ Calculate how many thumbnails fit." | |||
| 1966 | (/ width | 1705 | (/ width |
| 1967 | (+ (* 2 tumme-thumb-relief) | 1706 | (+ (* 2 tumme-thumb-relief) |
| 1968 | (* 2 tumme-thumb-margin) | 1707 | (* 2 tumme-thumb-margin) |
| 1969 | tumme-thumb-size char-width)))) | 1708 | tumme-thumb-width char-width)))) |
| 1970 | (tumme-line-up))) | 1709 | (tumme-line-up))) |
| 1971 | 1710 | ||
| 1972 | (defun tumme-line-up-interactive () | 1711 | (defun tumme-line-up-interactive () |
| @@ -2058,19 +1797,19 @@ systems it should feel snappy enough. | |||
| 2058 | If optional argument ORIGINAL-SIZE is non-nil, display image in its | 1797 | If optional argument ORIGINAL-SIZE is non-nil, display image in its |
| 2059 | original size." | 1798 | original size." |
| 2060 | (let ((new-file (expand-file-name tumme-temp-image-file)) | 1799 | (let ((new-file (expand-file-name tumme-temp-image-file)) |
| 2061 | size-x size-y command ret) | 1800 | width height command ret) |
| 2062 | (setq file (expand-file-name file)) | 1801 | (setq file (expand-file-name file)) |
| 2063 | (if (not original-size) | 1802 | (if (not original-size) |
| 2064 | (progn | 1803 | (progn |
| 2065 | (setq size-x (tumme-display-window-width)) | 1804 | (setq width (tumme-display-window-width)) |
| 2066 | (setq size-y (tumme-display-window-height)) | 1805 | (setq height (tumme-display-window-height)) |
| 2067 | (setq command | 1806 | (setq command |
| 2068 | (format-spec | 1807 | (format-spec |
| 2069 | tumme-cmd-create-temp-image-options | 1808 | tumme-cmd-create-temp-image-options |
| 2070 | (list | 1809 | (list |
| 2071 | (cons ?p tumme-cmd-create-temp-image-program) | 1810 | (cons ?p tumme-cmd-create-temp-image-program) |
| 2072 | (cons ?x size-x) | 1811 | (cons ?w width) |
| 2073 | (cons ?y size-y) | 1812 | (cons ?h height) |
| 2074 | (cons ?f file) | 1813 | (cons ?f file) |
| 2075 | (cons ?t new-file)))) | 1814 | (cons ?t new-file)))) |
| 2076 | (setq ret (shell-command command nil)) | 1815 | (setq ret (shell-command command nil)) |
| @@ -2308,12 +2047,11 @@ function. The result is a couple of new files in | |||
| 2308 | (defun tumme-write-comment (file comment) | 2047 | (defun tumme-write-comment (file comment) |
| 2309 | "For FILE, write comment COMMENT in database." | 2048 | "For FILE, write comment COMMENT in database." |
| 2310 | (save-excursion | 2049 | (save-excursion |
| 2311 | (let (end buf comment-beg | 2050 | (let (end buf comment-beg) |
| 2312 | (base-name (file-name-nondirectory file))) | ||
| 2313 | (setq buf (find-file tumme-db-file)) | 2051 | (setq buf (find-file tumme-db-file)) |
| 2314 | (goto-char (point-min)) | 2052 | (goto-char (point-min)) |
| 2315 | (if (search-forward-regexp | 2053 | (if (search-forward-regexp |
| 2316 | (format "^%s" base-name) nil t) | 2054 | (format "^%s" file) nil t) |
| 2317 | (progn | 2055 | (progn |
| 2318 | (end-of-line) | 2056 | (end-of-line) |
| 2319 | (setq end (point)) | 2057 | (setq end (point)) |
| @@ -2336,7 +2074,7 @@ function. The result is a couple of new files in | |||
| 2336 | (insert (format "comment:%s;" comment))) | 2074 | (insert (format "comment:%s;" comment))) |
| 2337 | ;; File does not exist in databse - add it. | 2075 | ;; File does not exist in databse - add it. |
| 2338 | (goto-char (point-max)) | 2076 | (goto-char (point-max)) |
| 2339 | (insert (format "\n%s;comment:%s" base-name comment))) | 2077 | (insert (format "\n%s;comment:%s" file comment))) |
| 2340 | (save-buffer) | 2078 | (save-buffer) |
| 2341 | (kill-buffer buf)))) | 2079 | (kill-buffer buf)))) |
| 2342 | 2080 | ||
| @@ -2417,7 +2155,7 @@ matching tags will be marked in the dired buffer." | |||
| 2417 | (goto-char (point-min)) | 2155 | (goto-char (point-min)) |
| 2418 | ;; Collect matches | 2156 | ;; Collect matches |
| 2419 | (while (search-forward-regexp | 2157 | (while (search-forward-regexp |
| 2420 | (concat "\\(^[^;]+\\);.*" tag ".*$") nil t) | 2158 | (concat "\\(^[^;\n]+\\);.*" tag ".*$") nil t) |
| 2421 | (setq files (append (list (match-string 1)) files))) | 2159 | (setq files (append (list (match-string 1)) files))) |
| 2422 | (kill-buffer buf) | 2160 | (kill-buffer buf) |
| 2423 | ;; Mark files | 2161 | ;; Mark files |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 720fb9929e4..659c562ea65 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -860,6 +860,7 @@ button end points." | |||
| 860 | (define-key map [(shift tab)] 'advertised-widget-backward) | 860 | (define-key map [(shift tab)] 'advertised-widget-backward) |
| 861 | (define-key map [backtab] 'widget-backward) | 861 | (define-key map [backtab] 'widget-backward) |
| 862 | (define-key map [down-mouse-2] 'widget-button-click) | 862 | (define-key map [down-mouse-2] 'widget-button-click) |
| 863 | (define-key map [down-mouse-1] 'widget-button-click) | ||
| 863 | (define-key map "\C-m" 'widget-button-press) | 864 | (define-key map "\C-m" 'widget-button-press) |
| 864 | map) | 865 | map) |
| 865 | "Keymap containing useful binding for buffers containing widgets. | 866 | "Keymap containing useful binding for buffers containing widgets. |
| @@ -929,6 +930,8 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 929 | (save-excursion | 930 | (save-excursion |
| 930 | (goto-char (posn-point (event-start event))) | 931 | (goto-char (posn-point (event-start event))) |
| 931 | (let* ((overlay (widget-get button :button-overlay)) | 932 | (let* ((overlay (widget-get button :button-overlay)) |
| 933 | (pressed-face (or (widget-get button :pressed-face) | ||
| 934 | widget-button-pressed-face)) | ||
| 932 | (face (overlay-get overlay 'face)) | 935 | (face (overlay-get overlay 'face)) |
| 933 | (mouse-face (overlay-get overlay 'mouse-face))) | 936 | (mouse-face (overlay-get overlay 'mouse-face))) |
| 934 | (unwind-protect | 937 | (unwind-protect |
| @@ -938,10 +941,8 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 938 | ;; on when we move over it. | 941 | ;; on when we move over it. |
| 939 | (save-excursion | 942 | (save-excursion |
| 940 | (when face ; avoid changing around image | 943 | (when face ; avoid changing around image |
| 941 | (overlay-put overlay | 944 | (overlay-put overlay 'face pressed-face) |
| 942 | 'face widget-button-pressed-face) | 945 | (overlay-put overlay 'mouse-face pressed-face)) |
| 943 | (overlay-put overlay | ||
| 944 | 'mouse-face widget-button-pressed-face)) | ||
| 945 | (unless (widget-apply button :mouse-down-action event) | 946 | (unless (widget-apply button :mouse-down-action event) |
| 946 | (let ((track-mouse t)) | 947 | (let ((track-mouse t)) |
| 947 | (while (not (widget-button-release-event-p event)) | 948 | (while (not (widget-button-release-event-p event)) |
| @@ -951,12 +952,8 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 951 | (eq (get-char-property pos 'button) | 952 | (eq (get-char-property pos 'button) |
| 952 | button)) | 953 | button)) |
| 953 | (when face | 954 | (when face |
| 954 | (overlay-put overlay | 955 | (overlay-put overlay 'face pressed-face) |
| 955 | 'face | 956 | (overlay-put overlay 'mouse-face pressed-face)) |
| 956 | widget-button-pressed-face) | ||
| 957 | (overlay-put overlay | ||
| 958 | 'mouse-face | ||
| 959 | widget-button-pressed-face)) | ||
| 960 | (overlay-put overlay 'face face) | 957 | (overlay-put overlay 'face face) |
| 961 | (overlay-put overlay 'mouse-face mouse-face))))) | 958 | (overlay-put overlay 'mouse-face mouse-face))))) |
| 962 | 959 | ||
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b396e8b3ee7..8b523f288d6 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2006-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * variables.texi (File Local Variables): Clarifications. | ||
| 4 | |||
| 5 | 2006-02-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 6 | |||
| 7 | * variables.texi (File Local Variables): Use @code for a cons | ||
| 8 | cell, not @var. | ||
| 9 | |||
| 10 | 2006-02-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 11 | |||
| 12 | * variables.texi (File Local Variables): Document new file local | ||
| 13 | variable behavior. | ||
| 14 | |||
| 1 | 2006-02-10 Kim F. Storm <storm@cua.dk> | 15 | 2006-02-10 Kim F. Storm <storm@cua.dk> |
| 2 | 16 | ||
| 3 | * eval.texi (Function Indirection): Add NOERROR to indirect-function. | 17 | * eval.texi (Function Indirection): Add NOERROR to indirect-function. |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 32a6e9b7873..f3e81c3ddd3 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1752,9 +1752,9 @@ information about file local variables. | |||
| 1752 | 1752 | ||
| 1753 | @defopt enable-local-variables | 1753 | @defopt enable-local-variables |
| 1754 | This variable controls whether to process file local variables. A | 1754 | This variable controls whether to process file local variables. A |
| 1755 | value of @code{t} means process them unconditionally; @code{nil} means | 1755 | value of @code{t} means to process them, querying the user if unsafe |
| 1756 | ignore them; anything else means ask the user what to do for each | 1756 | variables are encountered; @code{nil} means ignore them; anything else |
| 1757 | file. The default value is @code{t}. | 1757 | means to query the user for each file. The default value is @code{t}. |
| 1758 | @end defopt | 1758 | @end defopt |
| 1759 | 1759 | ||
| 1760 | @defun hack-local-variables &optional mode-only | 1760 | @defun hack-local-variables &optional mode-only |
| @@ -1773,46 +1773,66 @@ It does not set the mode nor any other file local variable. | |||
| 1773 | 1773 | ||
| 1774 | If a file local variable could specify a function that would | 1774 | If a file local variable could specify a function that would |
| 1775 | be called later, or an expression that would be executed later, simply | 1775 | be called later, or an expression that would be executed later, simply |
| 1776 | visiting a file could take over your Emacs. To prevent this, Emacs | 1776 | visiting a file could take over your Emacs. Emacs takes several |
| 1777 | takes care not to allow to set such file local variables. | 1777 | measures to prevent this. |
| 1778 | |||
| 1779 | @cindex safe local variable | ||
| 1780 | You can specify safe values for a variable with a | ||
| 1781 | @code{safe-local-variable} property. If the property is @code{t}, | ||
| 1782 | setting that variable in a file is always considered safe, regardless | ||
| 1783 | of the value used. If the property is a function of one argument, | ||
| 1784 | then any value is safe if the function returns non-@code{nil} given | ||
| 1785 | that value. Many commonly encountered file variables standardly have | ||
| 1786 | @code{safe-local-variable} properties, including @code{fill-column}, | ||
| 1787 | @code{fill-prefix}, and @code{indent-tabs-mode}. | ||
| 1788 | |||
| 1789 | @defopt safe-local-variable-values | ||
| 1790 | This variable provides another way to mark some variable values as | ||
| 1791 | safe. It is a list of cons cells @code{(@var{var} . @var{val})}, | ||
| 1792 | where @var{var} is a variable name and @var{val} is a value which is | ||
| 1793 | safe for that variable. | ||
| 1794 | |||
| 1795 | When Emacs asks the user whether or not to obey a set of file local | ||
| 1796 | variable specifications, the user can choose to mark them as safe. | ||
| 1797 | Doing so adds those variable/value pairs to | ||
| 1798 | @code{safe-local-variable-values}, and saves it to the user's custom | ||
| 1799 | file. | ||
| 1800 | @end defopt | ||
| 1801 | |||
| 1802 | @defun safe-local-variable-p sym val | ||
| 1803 | This function returns non-@code{nil} if it is safe to give @var{sym} | ||
| 1804 | the value @var{val}, based on the above criteria. | ||
| 1805 | @end defun | ||
| 1778 | 1806 | ||
| 1779 | For one thing, any variable whose name ends in any of | 1807 | @cindex risky local variable |
| 1780 | @samp{-command}, @samp{-frame-alist}, @samp{-function}, | 1808 | Some variables are considered @dfn{risky}. A variable whose name |
| 1809 | ends in any of @samp{-command}, @samp{-frame-alist}, @samp{-function}, | ||
| 1781 | @samp{-functions}, @samp{-hook}, @samp{-hooks}, @samp{-form}, | 1810 | @samp{-functions}, @samp{-hook}, @samp{-hooks}, @samp{-form}, |
| 1782 | @samp{-forms}, @samp{-map}, @samp{-map-alist}, @samp{-mode-alist}, | 1811 | @samp{-forms}, @samp{-map}, @samp{-map-alist}, @samp{-mode-alist}, |
| 1783 | @samp{-program}, or @samp{-predicate} cannot be given a file local | 1812 | @samp{-program}, or @samp{-predicate} is considered risky. The |
| 1784 | value. In general, you should use such a name whenever it is | 1813 | variables @samp{font-lock-keywords}, @samp{font-lock-keywords} |
| 1785 | appropriate for the variable's meaning. The variables | 1814 | followed by a digit, and @samp{font-lock-syntactic-keywords} are also |
| 1786 | @samp{font-lock-keywords}, @samp{font-lock-keywords} followed by a | 1815 | considered risky. Finally, any variable whose name has a |
| 1787 | digit, and @samp{font-lock-syntactic-keywords} cannot be given file | 1816 | non-@code{nil} @code{risky-local-variable} property is considered |
| 1788 | local values either. These rules can be overridden by giving the | 1817 | risky. |
| 1789 | variable's name a non-@code{nil} @code{safe-local-variable} property. | 1818 | |
| 1790 | If one gives it a @code{safe-local-variable} property of @code{t}, | 1819 | @defun risky-local-variable-p sym |
| 1791 | then one can give the variable any file local value. One can also | 1820 | This function returns non-@code{nil} if @var{sym} is a risky variable, |
| 1792 | give any symbol, including the above, a @code{safe-local-variable} | 1821 | based on the above criteria. |
| 1793 | property that is a function taking exactly one argument. In that | 1822 | @end defun |
| 1794 | case, giving a variable with that name a file local value is only | 1823 | |
| 1795 | allowed if the function returns non-@code{nil} when called with that | 1824 | If a variable is risky, it will not be entered automatically into |
| 1796 | value as argument. | 1825 | @code{safe-local-variable-values} as described above. Therefore, |
| 1797 | 1826 | Emacs will always query before setting a risky variable, unless the | |
| 1798 | In addition, any variable whose name has a non-@code{nil} | 1827 | user explicitly allows the setting by customizing |
| 1799 | @code{risky-local-variable} property is also ignored. So are all | 1828 | @code{safe-local-variable-values} directly. |
| 1800 | variables listed in @code{ignored-local-variables}: | ||
| 1801 | 1829 | ||
| 1802 | @defvar ignored-local-variables | 1830 | @defvar ignored-local-variables |
| 1803 | This variable holds a list of variables that should not be given local | 1831 | This variable holds a list of variables that should not be given local |
| 1804 | values by files. Any value specified for one of these variables is | 1832 | values by files. Any value specified for one of these variables is |
| 1805 | ignored. | 1833 | completely ignored. |
| 1806 | @end defvar | 1834 | @end defvar |
| 1807 | 1835 | ||
| 1808 | @defun risky-local-variable-p sym &optional val | ||
| 1809 | If @var{val} is non-@code{nil}, returns non-@code{nil} if giving | ||
| 1810 | @var{sym} a file local value of @var{val} would be risky, for any of | ||
| 1811 | the reasons stated above. If @var{val} is @code{nil} or omitted, only | ||
| 1812 | returns @code{nil} if @var{sym} can be safely assigned any file local | ||
| 1813 | value whatsoever. | ||
| 1814 | @end defun | ||
| 1815 | |||
| 1816 | The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs | 1836 | The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs |
| 1817 | normally asks for confirmation before handling it. | 1837 | normally asks for confirmation before handling it. |
| 1818 | 1838 | ||
diff --git a/man/ChangeLog b/man/ChangeLog index fa6e236959f..0d22e6d17bc 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,63 @@ | |||
| 1 | 2006-02-15 Francesco Potort,Al(B <pot@gnu.org> | ||
| 2 | |||
| 3 | * maintaining.texi (Create Tags Table): Explain why the | ||
| 4 | exception when etags writes to files under the /dev tree. | ||
| 5 | |||
| 6 | 2006-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * custom.texi (Safe File Variables): Lots of clarification. | ||
| 9 | Renamed from Unsafe File Variables. | ||
| 10 | |||
| 11 | 2006-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * custom.texi (Unsafe File Variables): File variable confirmation | ||
| 14 | assumed denied in batch mode. | ||
| 15 | |||
| 16 | 2006-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 17 | |||
| 18 | * building.texi (GDB User Interface Layout): Don't say `inferior' | ||
| 19 | for program being debugged. | ||
| 20 | |||
| 21 | 2006-02-15 Nick Roberts <nickrob@snap.net.nz> | ||
| 22 | |||
| 23 | * building.texi (GDB Graphical Interface): Replace | ||
| 24 | gdb-use-inferior-io-buffer with gdb-use-separate-io-buffer. | ||
| 25 | |||
| 26 | 2006-02-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 27 | |||
| 28 | * custom.texi (Specifying File Variables, Unsafe File Variables): | ||
| 29 | New nodes, split from File Variables. Document new file local | ||
| 30 | variable behavior. | ||
| 31 | |||
| 32 | 2006-02-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 33 | |||
| 34 | * display.texi (Standard Faces): | ||
| 35 | * faq.texi (Colors on a TTY): | ||
| 36 | * files.texi (Visiting): | ||
| 37 | * frames.texi (Clipboard): | ||
| 38 | * glossary.texi (Glossary) <Clipboard>: | ||
| 39 | * xresources.texi (X Resources): Mention Mac OS port. | ||
| 40 | |||
| 41 | 2006-02-12 Karl Berry <karl@gnu.org> | ||
| 42 | |||
| 43 | * faq.texi (Emacs for Atari ST): use Sch@"auble instead of the | ||
| 44 | 8-bit accented a. | ||
| 45 | |||
| 46 | 2006-02-12 Richard M. Stallman <rms@gnu.org> | ||
| 47 | |||
| 48 | * building.texi (Building): Clarify topic in intro. | ||
| 49 | |||
| 50 | * maintaining.texi (Maintaining): Change title; clarify topic. | ||
| 51 | Delete duplicate index entries. | ||
| 52 | |||
| 53 | * building.texi (Other GDB User Interface Buffers): Clarifications. | ||
| 54 | |||
| 55 | * text.texi (Cell Commands): Clarifications. | ||
| 56 | |||
| 57 | * programs.texi (Defuns): Delete duplicate explanation of | ||
| 58 | left-margin paren convention. | ||
| 59 | (Hungry Delete): Minor cleanup. | ||
| 60 | |||
| 1 | 2006-02-11 Mathias Dahl <mathias.dahl@gmail.com> | 61 | 2006-02-11 Mathias Dahl <mathias.dahl@gmail.com> |
| 2 | 62 | ||
| 3 | * dired.texi (Tumme): More tumme documentation. | 63 | * dired.texi (Tumme): More tumme documentation. |
diff --git a/man/building.texi b/man/building.texi index e3e3b5ac5a2..497c2777a5a 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | The previous chapter discusses the Emacs commands that are useful for | 11 | The previous chapter discusses the Emacs commands that are useful for |
| 12 | making changes in programs. This chapter deals with commands that assist | 12 | making changes in programs. This chapter deals with commands that assist |
| 13 | in the larger process of developing and maintaining programs. | 13 | in the larger process of compiling and testing programs. |
| 14 | 14 | ||
| 15 | @menu | 15 | @menu |
| 16 | * Compilation:: Compiling programs in languages other | 16 | * Compilation:: Compiling programs in languages other |
| @@ -828,20 +828,20 @@ displays the following frame layout: | |||
| 828 | @example | 828 | @example |
| 829 | +--------------------------------+--------------------------------+ | 829 | +--------------------------------+--------------------------------+ |
| 830 | | | | | 830 | | | | |
| 831 | | GUD buffer (I/O of GDB) | Locals buffer | | 831 | | GUD buffer (I/O of GDB) | Locals buffer | |
| 832 | | | | | 832 | | | | |
| 833 | |--------------------------------+--------------------------------+ | 833 | |--------------------------------+--------------------------------+ |
| 834 | | | | | 834 | | | | |
| 835 | | Source buffer | I/O buffer (of inferior) | | 835 | | Source buffer | I/O buffer for debugged pgm | |
| 836 | | | | | 836 | | | | |
| 837 | |--------------------------------+--------------------------------+ | 837 | |--------------------------------+--------------------------------+ |
| 838 | | | | | 838 | | | | |
| 839 | | Stack buffer | Breakpoints buffer | | 839 | | Stack buffer | Breakpoints buffer | |
| 840 | | | | | 840 | | | | |
| 841 | +--------------------------------+--------------------------------+ | 841 | +--------------------------------+--------------------------------+ |
| 842 | @end example | 842 | @end example |
| 843 | 843 | ||
| 844 | However, if @code{gdb-use-inferior-io-buffer} is @code{nil}, the I/O | 844 | However, if @code{gdb-use-separate-io-buffer} is @code{nil}, the I/O |
| 845 | buffer does not appear and the source buffer occupies the full width | 845 | buffer does not appear and the source buffer occupies the full width |
| 846 | of the frame. | 846 | of the frame. |
| 847 | 847 | ||
| @@ -972,15 +972,17 @@ for variables defined in compound statements, the default value is | |||
| 972 | 972 | ||
| 973 | @table @asis | 973 | @table @asis |
| 974 | @item Input/Output Buffer | 974 | @item Input/Output Buffer |
| 975 | @vindex gdb-use-inferior-io-buffer | 975 | @vindex gdb-use-separate-io-buffer |
| 976 | If the variable @code{gdb-use-inferior-io-buffer} is non-@code{nil}, | 976 | If the variable @code{gdb-use-separate-io-buffer} is non-@code{nil}, |
| 977 | the executable program that is being debugged takes its input and | 977 | the executable program that is being debugged takes its input and |
| 978 | displays its output here. Otherwise it uses the GUD buffer for that. | 978 | displays its output here. Otherwise it uses the GUD buffer for that. |
| 979 | To toggle the use of this buffer, do @kbd{M-x | 979 | To toggle whether GUD mode uses this buffer, do @kbd{M-x |
| 980 | gdb-use-inferior-io-buffer}. | 980 | gdb-use-separate-io-buffer}. That takes effect when you next |
| 981 | restart the program you are debugging. | ||
| 981 | 982 | ||
| 982 | Some of the commands from shell mode are available here. @xref{Shell | 983 | The history and replay commands from Shell mode are available here, |
| 983 | Mode}. | 984 | as are the commands to send signals to the program you are debugging. |
| 985 | @xref{Shell Mode}. | ||
| 984 | 986 | ||
| 985 | @item Locals Buffer | 987 | @item Locals Buffer |
| 986 | The locals buffer displays the values of local variables of the | 988 | The locals buffer displays the values of local variables of the |
| @@ -990,8 +992,8 @@ Information on a frame, gdb, The GNU debugger}). | |||
| 990 | Arrays and structures display their type only. With GDB 6.4 or later, | 992 | Arrays and structures display their type only. With GDB 6.4 or later, |
| 991 | move point to their name and press @key{RET}, or alternatively click | 993 | move point to their name and press @key{RET}, or alternatively click |
| 992 | @kbd{Mouse-2} there, to examine their values. With earlier versions | 994 | @kbd{Mouse-2} there, to examine their values. With earlier versions |
| 993 | of GDB, move point to their type description ([struct/union] or | 995 | of GDB, use @kbd{Mouse-2} or @key{RET} on the type description |
| 994 | [array]). @xref{Watch Expressions}. | 996 | (@samp{[struct/union]} or @samp{[array]}). @xref{Watch Expressions}. |
| 995 | 997 | ||
| 996 | @item Registers Buffer | 998 | @item Registers Buffer |
| 997 | @findex toggle-gdb-all-registers | 999 | @findex toggle-gdb-all-registers |
diff --git a/man/custom.texi b/man/custom.texi index 2efbdd81398..db88f64f839 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -1043,7 +1043,15 @@ file with Emacs. Visiting the file checks for local variable | |||
| 1043 | specifications; it automatically makes these variables local to the | 1043 | specifications; it automatically makes these variables local to the |
| 1044 | buffer, and sets them to the values specified in the file. | 1044 | buffer, and sets them to the values specified in the file. |
| 1045 | 1045 | ||
| 1046 | There are two ways to specify local variable values: in the first | 1046 | @menu |
| 1047 | * Specifying File Variables:: Specifying file local variables. | ||
| 1048 | * Safe File Variables:: Making sure file local variables are safe. | ||
| 1049 | @end menu | ||
| 1050 | |||
| 1051 | @node Specifying File Variables | ||
| 1052 | @subsubsection Specifying File Variables | ||
| 1053 | |||
| 1054 | There are two ways to specify file local variable values: in the first | ||
| 1047 | line, or with a local variables list. Here's how to specify them in the | 1055 | line, or with a local variables list. Here's how to specify them in the |
| 1048 | first line: | 1056 | first line: |
| 1049 | 1057 | ||
| @@ -1089,7 +1097,7 @@ variables list and a @samp{-*-} line, Emacs processes @emph{everything} | |||
| 1089 | in the @samp{-*-} line first, and @emph{everything} in the local | 1097 | in the @samp{-*-} line first, and @emph{everything} in the local |
| 1090 | variables list afterward. | 1098 | variables list afterward. |
| 1091 | 1099 | ||
| 1092 | Here is an example of a local variables list: | 1100 | Here is an example of a local variables list: |
| 1093 | 1101 | ||
| 1094 | @example | 1102 | @example |
| 1095 | ;;; Local Variables: *** | 1103 | ;;; Local Variables: *** |
| @@ -1170,33 +1178,63 @@ list need not take the time to search the whole file. | |||
| 1170 | major mode of a buffer according to the file name and contents, | 1178 | major mode of a buffer according to the file name and contents, |
| 1171 | including the local variables list if any. @xref{Choosing Modes}. | 1179 | including the local variables list if any. @xref{Choosing Modes}. |
| 1172 | 1180 | ||
| 1173 | @findex enable-local-variables | 1181 | @node Safe File Variables |
| 1174 | The variable @code{enable-local-variables} controls whether to process | 1182 | @subsubsection Safety of File Variables |
| 1175 | local variables in files, and thus gives you a chance to override them. | 1183 | |
| 1176 | Its default value is @code{t}, which means do process local variables in | 1184 | File-local variables can be dangerous; when you visit someone else's |
| 1177 | files. If you set the value to @code{nil}, Emacs simply ignores local | 1185 | file, there's no telling what its local variables list could do to |
| 1178 | variables in files. Any other value says to query you about each file | 1186 | your Emacs. Improper values of the @code{eval} ``variable,'' and |
| 1179 | that has local variables, showing you the local variable specifications | 1187 | other variables such as @code{load-path}, could execute Lisp code you |
| 1180 | so you can judge. | 1188 | didn't intend to run. |
| 1181 | 1189 | ||
| 1182 | @findex enable-local-eval | 1190 | Therefore, whenever Emacs encounters file local variable values that |
| 1183 | The @code{eval} ``variable,'' and certain actual variables, create a | 1191 | are not known to be safe, it displays the file's entire local |
| 1184 | special risk; when you visit someone else's file, local variable | 1192 | variables list, and asks you for confirmation before setting them. |
| 1185 | specifications for these could affect your Emacs in arbitrary ways. | 1193 | You can type @kbd{y} or @key{SPC} to put the local variables list into |
| 1186 | Therefore, the variable @code{enable-local-eval} controls whether Emacs | 1194 | effect, or @kbd{n} to ignore it. When Emacs is run in batch mode |
| 1187 | processes @code{eval} variables, as well variables with names that end | 1195 | (@pxref{Initial Options}), it can't really ask you, so it assumes the |
| 1188 | in @samp{-hook}, @samp{-hooks}, @samp{-function} or @samp{-functions}, | 1196 | answer @samp{n}. |
| 1189 | and certain other variables. The three possibilities for the variable's | 1197 | |
| 1190 | value are @code{t}, @code{nil}, and anything else, just as for | 1198 | Emacs normally recognizes certain variables/value pairs as safe. |
| 1191 | @code{enable-local-variables}. The default is @code{maybe}, which is | 1199 | For instance, it is safe to give @code{comment-column} or |
| 1192 | neither @code{t} nor @code{nil}, so normally Emacs does ask for | 1200 | @code{fill-column} any integer value. If a file specifies only safe |
| 1193 | confirmation about file settings for these variables. | 1201 | variable/value pairs, Emacs does not ask for confirmation before |
| 1194 | 1202 | setting them. Otherwise, you can tell Emacs to record that all the | |
| 1195 | @findex safe-local-eval-forms | 1203 | variable/value pairs in the file are safe, by typing @kbd{!} at the |
| 1204 | confirmation prompt. When Emacs encounters these variable/value pairs | ||
| 1205 | subsequently, in the same file or others, it will assume they are | ||
| 1206 | safe. | ||
| 1207 | |||
| 1208 | @vindex safe-local-variable-values | ||
| 1209 | @cindex risky variable | ||
| 1210 | Some variables, such as @code{load-path}, are considered | ||
| 1211 | particularly @dfn{risky}: there is seldom any reason to specify them | ||
| 1212 | as local variables, and changing them can be dangerous. Even if you | ||
| 1213 | enter @kbd{!} at the confirmation prompt, Emacs will not record any | ||
| 1214 | values as safe for these variables. If you really want to record safe | ||
| 1215 | values for these variables, do it directly by customizing | ||
| 1216 | @samp{safe-local-variable-values} (@pxref{Easy Customization}). | ||
| 1217 | |||
| 1218 | @vindex enable-local-variables | ||
| 1219 | The variable @code{enable-local-variables} allows you to change the | ||
| 1220 | way Emacs processes local variables. Its default value is @code{t}, | ||
| 1221 | which specifies the behavior described above. If it is @code{nil}, | ||
| 1222 | Emacs simply ignores all file local variables. Any other value says | ||
| 1223 | to query you about each file that has local variables, without trying | ||
| 1224 | to determine whether the values are known to be safe. | ||
| 1225 | |||
| 1226 | @vindex enable-local-eval | ||
| 1227 | The variable @code{enable-local-eval} controls whether Emacs | ||
| 1228 | processes @code{eval} variables. The three possibilities for the | ||
| 1229 | variable's value are @code{t}, @code{nil}, and anything else, just as | ||
| 1230 | for @code{enable-local-variables}. The default is @code{maybe}, which | ||
| 1231 | is neither @code{t} nor @code{nil}, so normally Emacs does ask for | ||
| 1232 | confirmation about processes @code{eval} variables. | ||
| 1233 | |||
| 1234 | @vindex safe-local-eval-forms | ||
| 1196 | The @code{safe-local-eval-forms} is a customizable list of eval | 1235 | The @code{safe-local-eval-forms} is a customizable list of eval |
| 1197 | forms which are safe to eval, so Emacs should not ask for | 1236 | forms which are safe to eval, so Emacs should not ask for |
| 1198 | confirmation to evaluate these forms, even if | 1237 | confirmation to evaluate these forms. |
| 1199 | @code{enable-local-variables} says to ask for confirmation in general. | ||
| 1200 | 1238 | ||
| 1201 | @node Key Bindings | 1239 | @node Key Bindings |
| 1202 | @section Customizing Key Bindings | 1240 | @section Customizing Key Bindings |
diff --git a/man/dired.texi b/man/dired.texi index d391e4566f1..195a77e0fd3 100644 --- a/man/dired.texi +++ b/man/dired.texi | |||
| @@ -1146,6 +1146,7 @@ C-c}. | |||
| 1146 | @section Thumbnail and image file viewing and manipulation | 1146 | @section Thumbnail and image file viewing and manipulation |
| 1147 | 1147 | ||
| 1148 | @cindex tumme mode | 1148 | @cindex tumme mode |
| 1149 | |||
| 1149 | Tumme provides for simple viewing of thumbnails of image files. It | 1150 | Tumme provides for simple viewing of thumbnails of image files. It |
| 1150 | provides viewing of the original file, sized or in full size, inside | 1151 | provides viewing of the original file, sized or in full size, inside |
| 1151 | Emacs or in an external viewer. | 1152 | Emacs or in an external viewer. |
| @@ -1159,14 +1160,14 @@ files. All images in that directory will get thumbnail files created | |||
| 1159 | for them, and the thumbnails will be displayed in the ``thumbnail | 1160 | for them, and the thumbnails will be displayed in the ``thumbnail |
| 1160 | buffer''. | 1161 | buffer''. |
| 1161 | 1162 | ||
| 1162 | Because thumbnails are created on the fly and before they can be | 1163 | If the directory contains many image files and becayse thumbnails |
| 1163 | displayed, the above command might take a long time, especially the | 1164 | are created on the fly before they can be displayed, the above command |
| 1164 | first time, if the directory contains many image files. If the number | 1165 | might take a long time, especially the first time (consecutive |
| 1165 | of image files is higher than | 1166 | viewings will use the cached thumbnail files). Also, if the number of |
| 1166 | @code{tumme-show-all-from-dir-max-files}, the command will be aborted. | 1167 | image files is higher than @code{tumme-show-all-from-dir-max-files}, |
| 1167 | To work around this you can instead mark the files you want to look | 1168 | the command will be aborted. To work around this you can instead mark |
| 1168 | at, using @kbd{m} as usual in Dired, and then type @kbd{C-t d} | 1169 | the files you want to look at, using @kbd{m} as usual in Dired, and |
| 1169 | (@code{tumme-display-thumbs}). | 1170 | then type @kbd{C-t d} (@code{tumme-display-thumbs}). |
| 1170 | 1171 | ||
| 1171 | Regardless of which command you chose to display the thumbnails, a | 1172 | Regardless of which command you chose to display the thumbnails, a |
| 1172 | new buffer will open up, displaying thumbnail images of the files that | 1173 | new buffer will open up, displaying thumbnail images of the files that |
| @@ -1193,26 +1194,37 @@ for deletion in the dired buffer. If you just want visually to delete | |||
| 1193 | the thumbnail image from the thumbnail buffer, type @kbd{C-d} | 1194 | the thumbnail image from the thumbnail buffer, type @kbd{C-d} |
| 1194 | (@code{tumme-delete-char}). | 1195 | (@code{tumme-delete-char}). |
| 1195 | 1196 | ||
| 1196 | More advanced features include commands for using ``tags'' (another | 1197 | More advanced features include commands for using ``tags''. ``Tag'' |
| 1197 | name for ``keyword'' or ``label'') to tag image files and to search | 1198 | is just another word for ``keyword'', ``label'' or ``category''. In |
| 1198 | for image files with a certain tag. | 1199 | short, it is meta data used to categorize an image file. Commands |
| 1199 | 1200 | exist to add tags for one or many image files from dired, to mark | |
| 1200 | The tags put on image files are stored in a database file and can be | 1201 | files having a certain tag in Dired and to remove tags from files. |
| 1201 | used for marking image files. For example, you can let Tumme mark all | 1202 | The tags put on image files are stored in a database file (currently a |
| 1202 | files in the current directory tagged with the tag `flowers'. To tag | 1203 | plain text file). |
| 1203 | image files, mark them in the dired buffer and type @kbd{C-t t} | 1204 | |
| 1204 | (@code{tumme-tag-files}). To mark files having a certain tag, type | 1205 | To tag image files, mark them in the dired buffer and type @kbd{C-t |
| 1205 | @kbd{C-t f} (@code{tumme-mark-tagged-files}). | 1206 | t} (@code{tumme-tag-files}). You will be prompted for a tag. To mark |
| 1206 | 1207 | files having a certain tag, type @kbd{C-t f} | |
| 1207 | After marking image files with a certain tag, they can be viewed as | 1208 | (@code{tumme-mark-tagged-files}). After marking image files with a |
| 1208 | explained earlier, by typing @key{C-t d}. | 1209 | certain tag, they can be viewed as explained earlier, by typing |
| 1210 | @key{C-t d}. | ||
| 1211 | |||
| 1212 | You can also tag a file from the thumbnail buffer by typing @kbd{t | ||
| 1213 | t} and remove it by typing @kbd{t r}. There is also a special ``tag'' | ||
| 1214 | called ``comment'' for each file (it is not a tag in the exact same | ||
| 1215 | sense as the other tags, it is handled slightly different). That is | ||
| 1216 | used to enter a comment or description about the image. You comment a | ||
| 1217 | file from the thumbnail buffer by typing @kbd{c}. You will be | ||
| 1218 | prompted for a comment. Comments can also be added from Dired, and | ||
| 1219 | then also to multiple files at once, by typing @kbd{C-t c} | ||
| 1220 | (@code{tumme-dired-comment-files}). | ||
| 1209 | 1221 | ||
| 1210 | Tumme also provide simple image manipulation commands, like rotating | 1222 | Tumme also provide simple image manipulation commands, like rotating |
| 1211 | thumbnails and original image files. In the thumbnail buffer, type | 1223 | thumbnails and original image files. In the thumbnail buffer, type |
| 1212 | @kbd{L} to rotate the original image 90 degrees anti clockwise, and | 1224 | @kbd{L} to rotate the original image 90 degrees anti clockwise, and |
| 1213 | @kbd{R} to rotate it 90 degrees clockwise. | 1225 | @kbd{R} to rotate it 90 degrees clockwise. This rotation will be done |
| 1214 | 1226 | lossless (the image quality will not be reduced) and needs an external | |
| 1215 | 1227 | utility called JpegTRAN to work. | |
| 1216 | 1228 | ||
| 1217 | @node Misc Dired Features | 1229 | @node Misc Dired Features |
| 1218 | @section Other Dired Features | 1230 | @section Other Dired Features |
diff --git a/man/display.texi b/man/display.texi index 9c653e2ca56..83b5ae48554 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -472,7 +472,7 @@ This face determines the colors and font of Emacs's menus. @xref{Menu | |||
| 472 | Bars}. Setting the font of LessTif/Motif menus is currently not | 472 | Bars}. Setting the font of LessTif/Motif menus is currently not |
| 473 | supported; attempts to set the font are ignored in this case. | 473 | supported; attempts to set the font are ignored in this case. |
| 474 | Likewise, attempts to customize this face in Emacs built with GTK and | 474 | Likewise, attempts to customize this face in Emacs built with GTK and |
| 475 | in the MS-Windows port are ignored by the respective GUI toolkits; | 475 | in the MS-Windows/Mac ports are ignored by the respective GUI toolkits; |
| 476 | you need to use system-wide styles and options to change the | 476 | you need to use system-wide styles and options to change the |
| 477 | appearance of the menus. | 477 | appearance of the menus. |
| 478 | @end table | 478 | @end table |
diff --git a/man/faq.texi b/man/faq.texi index 734212758d5..fd69ad663b5 100644 --- a/man/faq.texi +++ b/man/faq.texi | |||
| @@ -1272,7 +1272,7 @@ customize, with completion. | |||
| 1272 | 1272 | ||
| 1273 | In Emacs 21.1 and later, colors and faces are supported in non-windowed mode, | 1273 | In Emacs 21.1 and later, colors and faces are supported in non-windowed mode, |
| 1274 | i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when | 1274 | i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when |
| 1275 | invoked as @samp{emacs -nw} on X and MS-Windows. (Colors and faces were | 1275 | invoked as @samp{emacs -nw} on X, MS-Windows, and Mac. (Colors and faces were |
| 1276 | supported in the MS-DOS port since Emacs 19.29.) Emacs automatically | 1276 | supported in the MS-DOS port since Emacs 19.29.) Emacs automatically |
| 1277 | detects color support at startup and uses it if available. If you think | 1277 | detects color support at startup and uses it if available. If you think |
| 1278 | that your terminal supports colors, but Emacs won't use them, check the | 1278 | that your terminal supports colors, but Emacs won't use them, check the |
| @@ -3670,7 +3670,7 @@ for OS/2 users of Emacs can be found at | |||
| 3670 | @cindex Atari ST, Emacs for | 3670 | @cindex Atari ST, Emacs for |
| 3671 | @cindex TOS, Emacs for | 3671 | @cindex TOS, Emacs for |
| 3672 | 3672 | ||
| 3673 | Roland Schäuble reports that Emacs 18.58 running on plain TOS and MiNT | 3673 | Roland Sch@"auble reports that Emacs 18.58 running on plain TOS and MiNT |
| 3674 | is available at | 3674 | is available at |
| 3675 | @uref{ftp://atari.archive.umich.edu/Editors/Emacs-18-58/1858b-d3.zoo}. | 3675 | @uref{ftp://atari.archive.umich.edu/Editors/Emacs-18-58/1858b-d3.zoo}. |
| 3676 | 3676 | ||
diff --git a/man/files.texi b/man/files.texi index 4bafc9b736c..a0822054210 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -239,7 +239,7 @@ toolkit, commands invoked with the mouse (by clicking on the menu bar | |||
| 239 | or tool bar) use the toolkit's standard File Selection dialog instead | 239 | or tool bar) use the toolkit's standard File Selection dialog instead |
| 240 | of prompting for the file name in the minibuffer. On Unix and | 240 | of prompting for the file name in the minibuffer. On Unix and |
| 241 | GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and | 241 | GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and |
| 242 | Motif toolkits; on MS-Windows, the GUI version does that by default. | 242 | Motif toolkits; on MS-Windows and Mac, the GUI version does that by default. |
| 243 | For information on how to customize this, see @ref{Dialog Boxes}. | 243 | For information on how to customize this, see @ref{Dialog Boxes}. |
| 244 | 244 | ||
| 245 | Secondly, Emacs supports ``drag and drop''; dropping a file into an | 245 | Secondly, Emacs supports ``drag and drop''; dropping a file into an |
diff --git a/man/frames.texi b/man/frames.texi index f25399e071b..b5ec21533b7 100644 --- a/man/frames.texi +++ b/man/frames.texi | |||
| @@ -293,7 +293,7 @@ names, all use the clipboard. | |||
| 293 | the Emacs yank functions consult the clipboard before the primary | 293 | the Emacs yank functions consult the clipboard before the primary |
| 294 | selection, and to make the kill functions to store in the clipboard as | 294 | selection, and to make the kill functions to store in the clipboard as |
| 295 | well as the primary selection. Otherwise they do not access the | 295 | well as the primary selection. Otherwise they do not access the |
| 296 | clipboard at all. Using the clipboard is the default on MS-Windows, | 296 | clipboard at all. Using the clipboard is the default on MS-Windows and Mac, |
| 297 | but not on other systems. | 297 | but not on other systems. |
| 298 | 298 | ||
| 299 | @node Mouse References | 299 | @node Mouse References |
diff --git a/man/glossary.texi b/man/glossary.texi index 9d86a8d12cc..e2d2ad56832 100644 --- a/man/glossary.texi +++ b/man/glossary.texi | |||
| @@ -175,7 +175,7 @@ mouse button and release it without moving the mouse. @xref{Mouse Buttons}. | |||
| 175 | @item Clipboard | 175 | @item Clipboard |
| 176 | A clipboard is a buffer provided by the window system for transferring | 176 | A clipboard is a buffer provided by the window system for transferring |
| 177 | text between applications. On the X Window system, the clipboard is | 177 | text between applications. On the X Window system, the clipboard is |
| 178 | provided in addition to the primary selection (q.v.@:); on MS-Windows, | 178 | provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac, |
| 179 | the clipboard is used @emph{instead} of the primary selection. | 179 | the clipboard is used @emph{instead} of the primary selection. |
| 180 | @xref{Clipboard}. | 180 | @xref{Clipboard}. |
| 181 | 181 | ||
diff --git a/man/maintaining.texi b/man/maintaining.texi index 66a235ae119..9836aae4e83 100644 --- a/man/maintaining.texi +++ b/man/maintaining.texi | |||
| @@ -3,14 +3,11 @@ | |||
| 3 | @c 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Maintaining, Abbrevs, Building, Top | 5 | @node Maintaining, Abbrevs, Building, Top |
| 6 | @chapter Maintaining Programs | 6 | @chapter Maintaining Large Programs |
| 7 | @cindex Lisp editing | ||
| 8 | @cindex C editing | ||
| 9 | @cindex program editing | ||
| 10 | 7 | ||
| 11 | This chapter describes Emacs features for maintaining programs. The | 8 | This chapter describes Emacs features for maintaining large |
| 12 | version control features (@pxref{Version Control}) are also particularly | 9 | programs. The version control features (@pxref{Version Control}) are |
| 13 | useful for this purpose. | 10 | also particularly useful for this purpose. |
| 14 | 11 | ||
| 15 | @menu | 12 | @menu |
| 16 | * Change Log:: Maintaining a change history for your program. | 13 | * Change Log:: Maintaining a change history for your program. |
| @@ -407,7 +404,8 @@ directory where the tags file was initially written. This way, you can | |||
| 407 | move an entire directory tree containing both the tags file and the | 404 | move an entire directory tree containing both the tags file and the |
| 408 | source files, and the tags file will still refer correctly to the source | 405 | source files, and the tags file will still refer correctly to the source |
| 409 | files. If the tags file is in @file{/dev}, however, the file names are | 406 | files. If the tags file is in @file{/dev}, however, the file names are |
| 410 | made relative to the current working directory. | 407 | made relative to the current working directory. This is useful, for |
| 408 | example, when writing the tags to @file{/dev/stdout}. | ||
| 411 | 409 | ||
| 412 | If you specify absolute file names as arguments to @code{etags}, then | 410 | If you specify absolute file names as arguments to @code{etags}, then |
| 413 | the tags file will contain absolute file names. This way, the tags file | 411 | the tags file will contain absolute file names. This way, the tags file |
diff --git a/man/programs.texi b/man/programs.texi index 6404e3466bc..643e6445fb0 100644 --- a/man/programs.texi +++ b/man/programs.texi | |||
| @@ -132,19 +132,6 @@ place to set up customizations for that major mode. @xref{Hooks}. | |||
| 132 | something like a function, is called a @dfn{defun}. The name comes | 132 | something like a function, is called a @dfn{defun}. The name comes |
| 133 | from Lisp, but in Emacs we use it for all languages. | 133 | from Lisp, but in Emacs we use it for all languages. |
| 134 | 134 | ||
| 135 | In many programming language modes, Emacs assumes that a defun is | ||
| 136 | any pair of parentheses (or braces, if the language uses braces this | ||
| 137 | way) that starts at the left margin. For example, in C, the body of a | ||
| 138 | function definition is a defun, usually recognized as an open-brace | ||
| 139 | that begins at the left margin@footnote{Alternatively, you can set up | ||
| 140 | C Mode to recognize a defun at an opening brace at the outermost | ||
| 141 | level. @xref{Movement Commands,,, ccmode, the CC Mode Manual}.}. A | ||
| 142 | variable's initializer can also count as a defun, if the open-brace | ||
| 143 | that begins the initializer is at the left margin. | ||
| 144 | |||
| 145 | However, some language modes provide their own code for recognizing | ||
| 146 | defuns in a way that suits the language syntax and conventions better. | ||
| 147 | |||
| 148 | @menu | 135 | @menu |
| 149 | * Left Margin Paren:: An open-paren or similar opening delimiter | 136 | * Left Margin Paren:: An open-paren or similar opening delimiter |
| 150 | starts a defun if it is at the left margin. | 137 | starts a defun if it is at the left margin. |
| @@ -1573,9 +1560,9 @@ following point. | |||
| 1573 | 1560 | ||
| 1574 | As an alternative to the above commands, you can enable @dfn{hungry | 1561 | As an alternative to the above commands, you can enable @dfn{hungry |
| 1575 | delete mode}. When this feature is enabled (indicated by @samp{/h} in | 1562 | delete mode}. When this feature is enabled (indicated by @samp{/h} in |
| 1576 | the mode line after the mode name), a single @key{DEL} command deletes | 1563 | the mode line after the mode name), a single @key{DEL} deletes all |
| 1577 | all preceding whitespace, not just one space, and a single @kbd{C-c | 1564 | preceding whitespace, not just one space, and a single @kbd{C-c C-d} |
| 1578 | C-d} (but @emph{not} @key{DELETE}) deletes all following whitespace. | 1565 | (but @emph{not} plain @key{DELETE}) deletes all following whitespace. |
| 1579 | 1566 | ||
| 1580 | @table @kbd | 1567 | @table @kbd |
| 1581 | @item M-x c-toggle-hungry-state | 1568 | @item M-x c-toggle-hungry-state |
diff --git a/man/text.texi b/man/text.texi index 4fb5ee9cc1e..2b70c599b89 100644 --- a/man/text.texi +++ b/man/text.texi | |||
| @@ -2575,10 +2575,10 @@ Likewise @kbd{M-x table-backward-cell} from the first cell in a table | |||
| 2575 | moves to the last cell. | 2575 | moves to the last cell. |
| 2576 | 2576 | ||
| 2577 | @findex table-span-cell | 2577 | @findex table-span-cell |
| 2578 | The command @code{table-span-cell} spans the current cell into one | 2578 | The command @code{table-span-cell} merges the current cell with the |
| 2579 | of the four directions---right, left, above or below---and merges the | 2579 | adjacent cell in a specified direction---right, left, above or below. |
| 2580 | current cell with the adjacent cell. It does not allow directions to | 2580 | You specify the direction with the minibuffer. It does not allow |
| 2581 | which spanning does not produce a legitimate cell. | 2581 | merges which don't result in a legitimate cell layout. |
| 2582 | 2582 | ||
| 2583 | @findex table-split-cell | 2583 | @findex table-split-cell |
| 2584 | @cindex text-based tables, split a cell | 2584 | @cindex text-based tables, split a cell |
| @@ -2586,7 +2586,8 @@ which spanning does not produce a legitimate cell. | |||
| 2586 | The command @code{table-split-cell} splits the current cell | 2586 | The command @code{table-split-cell} splits the current cell |
| 2587 | vertically or horizontally. This command is a wrapper to the | 2587 | vertically or horizontally. This command is a wrapper to the |
| 2588 | direction specific commands @code{table-split-cell-vertically} and | 2588 | direction specific commands @code{table-split-cell-vertically} and |
| 2589 | @code{table-split-cell-horizontally}. | 2589 | @code{table-split-cell-horizontally}. You specify the direction with |
| 2590 | a minibuffer argument. | ||
| 2590 | 2591 | ||
| 2591 | @findex table-split-cell-vertically | 2592 | @findex table-split-cell-vertically |
| 2592 | The command @code{table-split-cell-vertically} splits the current | 2593 | The command @code{table-split-cell-vertically} splits the current |
diff --git a/man/xresources.texi b/man/xresources.texi index f7947edda17..87781da582c 100644 --- a/man/xresources.texi +++ b/man/xresources.texi | |||
| @@ -8,7 +8,8 @@ | |||
| 8 | You can customize some X-related aspects of Emacs behavior using X | 8 | You can customize some X-related aspects of Emacs behavior using X |
| 9 | resources, as is usual for programs that use X. On MS-Windows, you | 9 | resources, as is usual for programs that use X. On MS-Windows, you |
| 10 | can customize some of the same aspects using the system registry. | 10 | can customize some of the same aspects using the system registry. |
| 11 | @xref{MS-Windows Registry}. | 11 | @xref{MS-Windows Registry}. Likewise, the Mac Carbon port emulates X |
| 12 | resources using the Preferences system. @xref{Mac Environment Variables}. | ||
| 12 | 13 | ||
| 13 | When Emacs is built using an `X toolkit', such as Lucid or LessTif, | 14 | When Emacs is built using an `X toolkit', such as Lucid or LessTif, |
| 14 | you need to use X resources to customize the appearance of the | 15 | you need to use X resources to customize the appearance of the |
diff --git a/src/.gdbinit b/src/.gdbinit index 2cdb9fc7511..be49cf8f55d 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -548,7 +548,16 @@ end | |||
| 548 | define xwindow | 548 | define xwindow |
| 549 | xgetptr $ | 549 | xgetptr $ |
| 550 | print (struct window *) $ptr | 550 | print (struct window *) $ptr |
| 551 | printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top | 551 | set $window = (struct window *) $ptr |
| 552 | xgetint $window->total_cols | ||
| 553 | set $width=$int | ||
| 554 | xgetint $window->total_lines | ||
| 555 | set $height=$int | ||
| 556 | xgetint $window->left_col | ||
| 557 | set $left=$int | ||
| 558 | xgetint $window->top_line | ||
| 559 | set $top=$int | ||
| 560 | printf "%dx%d+%d+%d\n", $width, $height, $left, $top | ||
| 552 | end | 561 | end |
| 553 | document xwindow | 562 | document xwindow |
| 554 | Print $ as a window pointer, assuming it is an Emacs Lisp window value. | 563 | Print $ as a window pointer, assuming it is an Emacs Lisp window value. |
diff --git a/src/ChangeLog b/src/ChangeLog index 8c1fffe9911..18dcc803efa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2006-02-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * frame.c (x_get_arg): Clear out PARAM in ALIST also on Mac. | ||
| 4 | |||
| 5 | * macfns.c (x_set_menu_bar_lines): Menu bar is always shown on Mac. | ||
| 6 | |||
| 7 | * macmenu.c (set_frame_menubar): Don't call DrawMenuBar. | ||
| 8 | |||
| 9 | 2006-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 10 | |||
| 11 | * frame.c (x_get_arg): Clear out all occurrences of PARAM in ALIST. | ||
| 12 | |||
| 13 | * m/ibms390x.h: New file. | ||
| 14 | |||
| 15 | 2006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 16 | |||
| 17 | * gtkutil.c (xg_tool_bar_detach_callback): Set show-arrow to the | ||
| 18 | value of x-gtk-whole-detached-tool-bar. | ||
| 19 | (xg_tool_bar_attach_callback): Set show-arrow to TRUE. | ||
| 20 | |||
| 21 | * xfns.c (syms_of_xfns): New variable: x-gtk-whole-detached-tool-bar. | ||
| 22 | |||
| 23 | 2006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 24 | |||
| 25 | * xterm.c (x_x_to_emacs_modifiers): Make non-static. | ||
| 26 | |||
| 27 | * xterm.h: Declare x_x_to_emacs_modifiers. | ||
| 28 | |||
| 29 | * gtkutil.c (xg_tool_bar_button_cb): New function. | ||
| 30 | (xg_tool_bar_callback): Call x_x_to_emacs_modifiers to | ||
| 31 | store modifiers in event. | ||
| 32 | (update_frame_tool_bar): Connect button-release-event to | ||
| 33 | xg_tool_bar_button_cb. | ||
| 34 | |||
| 35 | 2006-02-13 Richard M. Stallman <rms@gnu.org> | ||
| 36 | |||
| 37 | * .gdbinit (xwindow): Update the code to show the window box. | ||
| 38 | |||
| 39 | 2006-02-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 40 | |||
| 41 | * xterm.c (note_mouse_movement): Check for NULL FRAME_X_OUTPUT (frame). | ||
| 42 | |||
| 43 | 2006-02-12 Richard M. Stallman <rms@gnu.org> | ||
| 44 | |||
| 45 | * cmds.c (internal_self_insert): Handle weird auto-fill-function. | ||
| 46 | |||
| 1 | 2006-02-11 Eli Zaretskii <eliz@gnu.org> | 47 | 2006-02-11 Eli Zaretskii <eliz@gnu.org> |
| 2 | 48 | ||
| 3 | * keyboard.c (Venable_disabled_menus_and_buttons): New variable. | 49 | * keyboard.c (Venable_disabled_menus_and_buttons): New variable. |
diff --git a/src/cmds.c b/src/cmds.c index f1e92ab2f75..494ef14db99 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -528,7 +528,8 @@ internal_self_insert (c, noautofill) | |||
| 528 | justification, if any, know where the end is going to be. */ | 528 | justification, if any, know where the end is going to be. */ |
| 529 | SET_PT_BOTH (PT - 1, PT_BYTE - 1); | 529 | SET_PT_BOTH (PT - 1, PT_BYTE - 1); |
| 530 | tem = call0 (current_buffer->auto_fill_function); | 530 | tem = call0 (current_buffer->auto_fill_function); |
| 531 | if (c == '\n') | 531 | /* Test PT < ZV in case the auto-fill-function is strange. */ |
| 532 | if (c == '\n' && PT < ZV) | ||
| 532 | SET_PT_BOTH (PT + 1, PT_BYTE + 1); | 533 | SET_PT_BOTH (PT + 1, PT_BYTE + 1); |
| 533 | if (!NILP (tem)) | 534 | if (!NILP (tem)) |
| 534 | hairy = 2; | 535 | hairy = 2; |
diff --git a/src/frame.c b/src/frame.c index 34508a6d2fb..54c12eba6b6 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3824,9 +3824,15 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type) | |||
| 3824 | { | 3824 | { |
| 3825 | /* If we find this parm in ALIST, clear it out | 3825 | /* If we find this parm in ALIST, clear it out |
| 3826 | so that it won't be "left over" at the end. */ | 3826 | so that it won't be "left over" at the end. */ |
| 3827 | #ifdef HAVE_X_WINDOWS /* macfns.c and w32fns.c have not yet | 3827 | #ifndef WINDOWSNT /* w32fns.c has not yet been changed to cope with this. */ |
| 3828 | been changed to cope with this. */ | 3828 | Lisp_Object tail; |
| 3829 | XSETCAR (tem, Qnil); | 3829 | XSETCAR (tem, Qnil); |
| 3830 | /* In case the parameter appears more than once in the alist, | ||
| 3831 | clear it out. */ | ||
| 3832 | for (tail = alist; CONSP (tail); tail = XCDR (tail)) | ||
| 3833 | if (CONSP (XCAR (tail)) | ||
| 3834 | && EQ (XCAR (XCAR (tail)), param)) | ||
| 3835 | XSETCAR (XCAR (tail), Qnil); | ||
| 3830 | #endif | 3836 | #endif |
| 3831 | } | 3837 | } |
| 3832 | else | 3838 | else |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 3efc96cfe5d..5b7a5166888 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -3242,11 +3242,28 @@ xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3242 | the GtkImage with a new image. */ | 3242 | the GtkImage with a new image. */ |
| 3243 | #define XG_TOOL_BAR_IMAGE_DATA "emacs-tool-bar-image" | 3243 | #define XG_TOOL_BAR_IMAGE_DATA "emacs-tool-bar-image" |
| 3244 | 3244 | ||
| 3245 | /* The key for storing the latest modifiers so the activate callback can | ||
| 3246 | get them. */ | ||
| 3247 | #define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier" | ||
| 3248 | |||
| 3249 | |||
| 3245 | /* Callback function invoked when a tool bar item is pressed. | 3250 | /* Callback function invoked when a tool bar item is pressed. |
| 3246 | W is the button widget in the tool bar that got pressed, | 3251 | W is the button widget in the tool bar that got pressed, |
| 3247 | CLIENT_DATA is an integer that is the index of the button in the | 3252 | CLIENT_DATA is an integer that is the index of the button in the |
| 3248 | tool bar. 0 is the first button. */ | 3253 | tool bar. 0 is the first button. */ |
| 3249 | 3254 | ||
| 3255 | static gboolean | ||
| 3256 | xg_tool_bar_button_cb (widget, event, user_data) | ||
| 3257 | GtkWidget *widget; | ||
| 3258 | GdkEventButton *event; | ||
| 3259 | gpointer user_data; | ||
| 3260 | { | ||
| 3261 | g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, | ||
| 3262 | (gpointer) event->state); | ||
| 3263 | return FALSE; | ||
| 3264 | } | ||
| 3265 | |||
| 3266 | |||
| 3250 | static void | 3267 | static void |
| 3251 | xg_tool_bar_callback (w, client_data) | 3268 | xg_tool_bar_callback (w, client_data) |
| 3252 | GtkWidget *w; | 3269 | GtkWidget *w; |
| @@ -3254,6 +3271,8 @@ xg_tool_bar_callback (w, client_data) | |||
| 3254 | { | 3271 | { |
| 3255 | /* The EMACS_INT cast avoids a warning. */ | 3272 | /* The EMACS_INT cast avoids a warning. */ |
| 3256 | int idx = (int) (EMACS_INT) client_data; | 3273 | int idx = (int) (EMACS_INT) client_data; |
| 3274 | int mod = (int) g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); | ||
| 3275 | |||
| 3257 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); | 3276 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); |
| 3258 | Lisp_Object key, frame; | 3277 | Lisp_Object key, frame; |
| 3259 | struct input_event event; | 3278 | struct input_event event; |
| @@ -3274,7 +3293,10 @@ xg_tool_bar_callback (w, client_data) | |||
| 3274 | event.kind = TOOL_BAR_EVENT; | 3293 | event.kind = TOOL_BAR_EVENT; |
| 3275 | event.frame_or_window = frame; | 3294 | event.frame_or_window = frame; |
| 3276 | event.arg = key; | 3295 | event.arg = key; |
| 3277 | event.modifiers = 0; /* These are not available. */ | 3296 | /* Convert between the modifier bits GDK uses and the modifier bits |
| 3297 | Emacs uses. This assumes GDK an X masks are the same, which they are when | ||
| 3298 | this is written. */ | ||
| 3299 | event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod); | ||
| 3278 | kbd_buffer_store_event (&event); | 3300 | kbd_buffer_store_event (&event); |
| 3279 | } | 3301 | } |
| 3280 | 3302 | ||
| @@ -3292,6 +3314,10 @@ xg_tool_bar_detach_callback (wbox, w, client_data) | |||
| 3292 | gpointer client_data; | 3314 | gpointer client_data; |
| 3293 | { | 3315 | { |
| 3294 | FRAME_PTR f = (FRAME_PTR) client_data; | 3316 | FRAME_PTR f = (FRAME_PTR) client_data; |
| 3317 | extern int x_gtk_whole_detached_tool_bar; | ||
| 3318 | |||
| 3319 | g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, | ||
| 3320 | NULL); | ||
| 3295 | 3321 | ||
| 3296 | if (f) | 3322 | if (f) |
| 3297 | { | 3323 | { |
| @@ -3322,6 +3348,7 @@ xg_tool_bar_attach_callback (wbox, w, client_data) | |||
| 3322 | gpointer client_data; | 3348 | gpointer client_data; |
| 3323 | { | 3349 | { |
| 3324 | FRAME_PTR f = (FRAME_PTR) client_data; | 3350 | FRAME_PTR f = (FRAME_PTR) client_data; |
| 3351 | g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); | ||
| 3325 | 3352 | ||
| 3326 | if (f) | 3353 | if (f) |
| 3327 | { | 3354 | { |
| @@ -3629,6 +3656,13 @@ update_frame_tool_bar (f) | |||
| 3629 | while (! GTK_IS_BUTTON (w)) | 3656 | while (! GTK_IS_BUTTON (w)) |
| 3630 | w = gtk_widget_get_parent (w); | 3657 | w = gtk_widget_get_parent (w); |
| 3631 | 3658 | ||
| 3659 | /* Callback to save modifyer mask (Shift/Control, etc). GTK makes | ||
| 3660 | no distinction based on modifiers in the activate callback, | ||
| 3661 | so we have to do it ourselves. */ | ||
| 3662 | g_signal_connect (w, "button-release-event", | ||
| 3663 | GTK_SIGNAL_FUNC (xg_tool_bar_button_cb), | ||
| 3664 | ti); | ||
| 3665 | |||
| 3632 | g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f); | 3666 | g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f); |
| 3633 | 3667 | ||
| 3634 | /* Use enter/leave notify to show help. We use the events | 3668 | /* Use enter/leave notify to show help. We use the events |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h new file mode 100644 index 00000000000..0d3acd34d97 --- /dev/null +++ b/src/m/ibms390x.h | |||
| @@ -0,0 +1,163 @@ | |||
| 1 | /* machine description file for IBM S390 in 64-bit mode | ||
| 2 | Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 19 | Boston, MA 02110-1301, USA. */ | ||
| 20 | |||
| 21 | /* This file was made by copying the significant parts of amdx86-64.h | ||
| 22 | into ibms390.h. */ | ||
| 23 | |||
| 24 | |||
| 25 | /* The following line tells the configuration script what sort of | ||
| 26 | operating system this machine is likely to run. | ||
| 27 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" | ||
| 28 | |||
| 29 | NOTE-START | ||
| 30 | IBM s390 64 bits (-machine=ibms390x64) | ||
| 31 | |||
| 32 | The possibilities for -opsystem are: gnu-linux. | ||
| 33 | |||
| 34 | NOTE-END */ | ||
| 35 | |||
| 36 | #define BITS_PER_LONG 64 | ||
| 37 | #define BITS_PER_EMACS_INT 64 | ||
| 38 | |||
| 39 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | ||
| 40 | is the most significant byte. */ | ||
| 41 | |||
| 42 | #define WORDS_BIG_ENDIAN | ||
| 43 | |||
| 44 | /* Define NO_ARG_ARRAY if you cannot take the address of the first of a | ||
| 45 | * group of arguments and treat it as an array of the arguments. */ | ||
| 46 | |||
| 47 | #define NO_ARG_ARRAY | ||
| 48 | |||
| 49 | /* Define WORD_MACHINE if addresses and such have | ||
| 50 | * to be corrected before they can be used as byte counts. */ | ||
| 51 | |||
| 52 | #define WORD_MACHINE | ||
| 53 | |||
| 54 | /* Now define a symbol for the cpu type, if your compiler | ||
| 55 | does not define it automatically: | ||
| 56 | Ones defined so far include vax, m68000, ns16000, pyramid, | ||
| 57 | orion, tahoe, APOLLO and many others */ | ||
| 58 | |||
| 59 | /* Use type int rather than a union, to represent Lisp_Object */ | ||
| 60 | /* This is desirable for most machines. */ | ||
| 61 | |||
| 62 | #define NO_UNION_TYPE | ||
| 63 | |||
| 64 | /* Define the type to use. */ | ||
| 65 | #define EMACS_INT long | ||
| 66 | #define EMACS_UINT unsigned long | ||
| 67 | #define SPECIAL_EMACS_INT | ||
| 68 | |||
| 69 | /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend | ||
| 70 | the 24-bit bit field into an int. In other words, if bit fields | ||
| 71 | are always unsigned. | ||
| 72 | |||
| 73 | If you use NO_UNION_TYPE, this flag does not matter. */ | ||
| 74 | |||
| 75 | #undef EXPLICIT_SIGN_EXTEND | ||
| 76 | |||
| 77 | /* Data type of load average, as read out of kmem. */ | ||
| 78 | |||
| 79 | #define LOAD_AVE_TYPE long | ||
| 80 | |||
| 81 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | ||
| 82 | |||
| 83 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | ||
| 84 | |||
| 85 | /* Define CANNOT_DUMP on machines where unexec does not work. | ||
| 86 | Then the function dump-emacs will not be defined | ||
| 87 | and temacs will do (load "loadup") automatically unless told otherwise. */ | ||
| 88 | |||
| 89 | #undef CANNOT_DUMP | ||
| 90 | |||
| 91 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 92 | pure and impure space as loaded can vary, and even their | ||
| 93 | relative order cannot be relied on. | ||
| 94 | |||
| 95 | Otherwise Emacs assumes that text space precedes data space, | ||
| 96 | numerically. */ | ||
| 97 | |||
| 98 | #define VIRT_ADDR_VARIES | ||
| 99 | |||
| 100 | /* Define C_ALLOCA if this machine does not support a true alloca | ||
| 101 | and the one written in C should be used instead. | ||
| 102 | Define HAVE_ALLOCA to say that the system provides a properly | ||
| 103 | working alloca function and it should be used. | ||
| 104 | Define neither one if an assembler-language alloca | ||
| 105 | in the file alloca.s should be used. */ | ||
| 106 | |||
| 107 | #undef C_ALLOCA | ||
| 108 | #define HAVE_ALLOCA | ||
| 109 | |||
| 110 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 111 | to change the boundary between the text section and data section | ||
| 112 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 113 | code will not be sharable; but that's better than failing completely. */ | ||
| 114 | |||
| 115 | #undef NO_REMAP | ||
| 116 | |||
| 117 | /* Some really obscure 4.2-based systems (like Sequent DYNIX) | ||
| 118 | * do not support asynchronous I/O (using SIGIO) on sockets, | ||
| 119 | * even though it works fine on tty's. If you have one of | ||
| 120 | * these systems, define the following, and then use it in | ||
| 121 | * config.h (or elsewhere) to decide when (not) to use SIGIO. | ||
| 122 | * | ||
| 123 | * You'd think this would go in an operating-system description file, | ||
| 124 | * but since it only occurs on some, but not all, BSD systems, the | ||
| 125 | * reasonable place to select for it is in the machine description | ||
| 126 | * file. | ||
| 127 | */ | ||
| 128 | |||
| 129 | #undef NO_SOCK_SIGIO | ||
| 130 | |||
| 131 | |||
| 132 | /* After adding support for a new system, modify the large case | ||
| 133 | statement in the `configure' script to recognize reasonable | ||
| 134 | configuration names, and add a description of the system to | ||
| 135 | `etc/MACHINES'. | ||
| 136 | |||
| 137 | If you've just fixed a problem in an existing configuration file, | ||
| 138 | you should also check `etc/MACHINES' to make sure its descriptions | ||
| 139 | of known problems in that configuration should be updated. */ | ||
| 140 | |||
| 141 | #define PNTR_COMPARISON_TYPE unsigned long | ||
| 142 | |||
| 143 | /* On the 64 bit architecture, we can use 60 bits for addresses */ | ||
| 144 | |||
| 145 | #define VALBITS 60 | ||
| 146 | |||
| 147 | /* This definition of MARKBIT is necessary because of the comparison of | ||
| 148 | ARRAY_MARK_FLAG and MARKBIT in an #if in lisp.h, which cpp doesn't like. */ | ||
| 149 | |||
| 150 | #define MARKBIT 0x8000000000000000L | ||
| 151 | |||
| 152 | #define LINKER $(CC) -nostdlib | ||
| 153 | |||
| 154 | /* Define XINT and XUINT so that they can take arguments of type int */ | ||
| 155 | #define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS)) | ||
| 156 | #define XUINT(a) ((long) (a) & VALMASK) | ||
| 157 | |||
| 158 | /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ | ||
| 159 | |||
| 160 | #define XPNTR(a) XUINT (a) | ||
| 161 | |||
| 162 | /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 | ||
| 163 | (do not change this comment) */ | ||
diff --git a/src/macfns.c b/src/macfns.c index b6ef85bcd9f..617167dfc46 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -1647,36 +1647,15 @@ x_set_menu_bar_lines (f, value, oldval) | |||
| 1647 | struct frame *f; | 1647 | struct frame *f; |
| 1648 | Lisp_Object value, oldval; | 1648 | Lisp_Object value, oldval; |
| 1649 | { | 1649 | { |
| 1650 | int nlines; | 1650 | /* Make sure we redisplay all windows in this frame. */ |
| 1651 | int olines = FRAME_MENU_BAR_LINES (f); | 1651 | windows_or_buffers_changed++; |
| 1652 | |||
| 1653 | /* Right now, menu bars don't work properly in minibuf-only frames; | ||
| 1654 | most of the commands try to apply themselves to the minibuffer | ||
| 1655 | frame itself, and get an error because you can't switch buffers | ||
| 1656 | in or split the minibuffer window. */ | ||
| 1657 | if (FRAME_MINIBUF_ONLY_P (f)) | ||
| 1658 | return; | ||
| 1659 | |||
| 1660 | if (INTEGERP (value)) | ||
| 1661 | nlines = XINT (value); | ||
| 1662 | else | ||
| 1663 | nlines = 0; | ||
| 1664 | 1652 | ||
| 1665 | FRAME_MENU_BAR_LINES (f) = 0; | 1653 | FRAME_MENU_BAR_LINES (f) = 0; |
| 1666 | if (nlines) | 1654 | /* The menu bar is always shown. */ |
| 1667 | FRAME_EXTERNAL_MENU_BAR (f) = 1; | 1655 | FRAME_EXTERNAL_MENU_BAR (f) = 1; |
| 1668 | else | 1656 | if (FRAME_MAC_P (f) && f->output_data.mac->menubar_widget == 0) |
| 1669 | { | 1657 | /* Make sure next redisplay shows the menu bar. */ |
| 1670 | if (FRAME_EXTERNAL_MENU_BAR (f) == 1) | 1658 | XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt; |
| 1671 | free_frame_menubar (f); | ||
| 1672 | FRAME_EXTERNAL_MENU_BAR (f) = 0; | ||
| 1673 | |||
| 1674 | /* Adjust the frame size so that the client (text) dimensions | ||
| 1675 | remain the same. This depends on FRAME_EXTERNAL_MENU_BAR being | ||
| 1676 | set correctly. */ | ||
| 1677 | x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); | ||
| 1678 | do_pending_window_change (0); | ||
| 1679 | } | ||
| 1680 | adjust_glyphs (f); | 1659 | adjust_glyphs (f); |
| 1681 | } | 1660 | } |
| 1682 | 1661 | ||
diff --git a/src/macmenu.c b/src/macmenu.c index 91cf28f7456..bd4ad6291cf 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -1701,8 +1701,6 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1701 | 1701 | ||
| 1702 | fill_menubar (first_wv->contents); | 1702 | fill_menubar (first_wv->contents); |
| 1703 | 1703 | ||
| 1704 | DrawMenuBar (); | ||
| 1705 | |||
| 1706 | /* Add event handler so we can detect C-g. */ | 1704 | /* Add event handler so we can detect C-g. */ |
| 1707 | install_menu_quit_handler (NULL); | 1705 | install_menu_quit_handler (NULL); |
| 1708 | free_menubar_widget_value_tree (first_wv); | 1706 | free_menubar_widget_value_tree (first_wv); |
diff --git a/src/xfns.c b/src/xfns.c index b8f128b6cdc..eb790263867 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -159,6 +159,10 @@ int x_use_old_gtk_file_dialog; | |||
| 159 | 159 | ||
| 160 | int x_gtk_show_hidden_files; | 160 | int x_gtk_show_hidden_files; |
| 161 | 161 | ||
| 162 | /* If non-zero, don't collapse to tool bar when it is detached. */ | ||
| 163 | |||
| 164 | int x_gtk_whole_detached_tool_bar; | ||
| 165 | |||
| 162 | /* The background and shape of the mouse pointer, and shape when not | 166 | /* The background and shape of the mouse pointer, and shape when not |
| 163 | over text or in the modeline. */ | 167 | over text or in the modeline. */ |
| 164 | 168 | ||
| @@ -5809,6 +5813,12 @@ Note that this is just the default, there is a toggle button on the file | |||
| 5809 | chooser to show or not show hidden files on a case by case basis. */); | 5813 | chooser to show or not show hidden files on a case by case basis. */); |
| 5810 | x_gtk_show_hidden_files = 0; | 5814 | x_gtk_show_hidden_files = 0; |
| 5811 | 5815 | ||
| 5816 | DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", &x_gtk_whole_detached_tool_bar, | ||
| 5817 | doc: /* *If non-nil, a detached tool bar is shown in full. | ||
| 5818 | The default is to just show an arrow and pressing on that arrow shows | ||
| 5819 | the tool bar buttons. */); | ||
| 5820 | x_gtk_whole_detached_tool_bar = 0; | ||
| 5821 | |||
| 5812 | Fprovide (intern ("x"), Qnil); | 5822 | Fprovide (intern ("x"), Qnil); |
| 5813 | 5823 | ||
| 5814 | #ifdef USE_X_TOOLKIT | 5824 | #ifdef USE_X_TOOLKIT |
diff --git a/src/xterm.c b/src/xterm.c index afbc718d645..86e780cc611 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -325,8 +325,7 @@ static void x_set_window_size_1 P_ ((struct frame *, int, int, int)); | |||
| 325 | static const XColor *x_color_cells P_ ((Display *, int *)); | 325 | static const XColor *x_color_cells P_ ((Display *, int *)); |
| 326 | static void x_update_window_end P_ ((struct window *, int, int)); | 326 | static void x_update_window_end P_ ((struct window *, int, int)); |
| 327 | void x_delete_display P_ ((struct x_display_info *)); | 327 | void x_delete_display P_ ((struct x_display_info *)); |
| 328 | static unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *, | 328 | |
| 329 | unsigned)); | ||
| 330 | static int x_io_error_quitter P_ ((Display *)); | 329 | static int x_io_error_quitter P_ ((Display *)); |
| 331 | int x_catch_errors P_ ((Display *)); | 330 | int x_catch_errors P_ ((Display *)); |
| 332 | void x_uncatch_errors P_ ((Display *, int)); | 331 | void x_uncatch_errors P_ ((Display *, int)); |
| @@ -3470,7 +3469,7 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3470 | /* Convert between the modifier bits X uses and the modifier bits | 3469 | /* Convert between the modifier bits X uses and the modifier bits |
| 3471 | Emacs uses. */ | 3470 | Emacs uses. */ |
| 3472 | 3471 | ||
| 3473 | static unsigned int | 3472 | unsigned int |
| 3474 | x_x_to_emacs_modifiers (dpyinfo, state) | 3473 | x_x_to_emacs_modifiers (dpyinfo, state) |
| 3475 | struct x_display_info *dpyinfo; | 3474 | struct x_display_info *dpyinfo; |
| 3476 | unsigned int state; | 3475 | unsigned int state; |
| @@ -3598,6 +3597,9 @@ note_mouse_movement (frame, event) | |||
| 3598 | last_mouse_motion_event = *event; | 3597 | last_mouse_motion_event = *event; |
| 3599 | XSETFRAME (last_mouse_motion_frame, frame); | 3598 | XSETFRAME (last_mouse_motion_frame, frame); |
| 3600 | 3599 | ||
| 3600 | if (!FRAME_X_OUTPUT (frame)) | ||
| 3601 | return 0; | ||
| 3602 | |||
| 3601 | if (event->window != FRAME_X_WINDOW (frame)) | 3603 | if (event->window != FRAME_X_WINDOW (frame)) |
| 3602 | { | 3604 | { |
| 3603 | frame->mouse_moved = 1; | 3605 | frame->mouse_moved = 1; |
diff --git a/src/xterm.h b/src/xterm.h index 78d9bc8871c..106317979f1 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1004,6 +1004,8 @@ extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int)); | |||
| 1004 | extern void set_vertical_scroll_bar P_ ((struct window *)); | 1004 | extern void set_vertical_scroll_bar P_ ((struct window *)); |
| 1005 | 1005 | ||
| 1006 | extern int x_dispatch_event P_ ((XEvent *, Display *)); | 1006 | extern int x_dispatch_event P_ ((XEvent *, Display *)); |
| 1007 | extern unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *, | ||
| 1008 | unsigned)); | ||
| 1007 | 1009 | ||
| 1008 | /* Defined in xselect.c */ | 1010 | /* Defined in xselect.c */ |
| 1009 | 1011 | ||