diff options
| author | Miles Bader | 2006-05-10 20:42:41 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-05-10 20:42:41 +0000 |
| commit | 3bcf2b084a0dd1ff0399480d57b87e01cfe061dc (patch) | |
| tree | 355c68cda5a5c9c73824840df3cdae6320017283 /lisp | |
| parent | 0ea38cf9dca8f2b148d78f638eed17e8896984af (diff) | |
| parent | d105bfecce2288cd99f591382586a22a4ce1b6f2 (diff) | |
| download | emacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.tar.gz emacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.zip | |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 259-273)
- Update from CVS
- lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t
- Merge from gnus--rel--5.10
- Rename "field-at-point" to "field-at-pos"
- (comint-insert-input): Remove redundant calls to setq and goto-char
* gnus--rel--5.10 (patch 99-100)
- Merge from emacs--devo--0
- Update from CVS
Diffstat (limited to 'lisp')
52 files changed, 1290 insertions, 639 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b39bebc7215..da019cc2cbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,339 @@ | |||
| 1 | 2006-05-10 J.D. Smith <jdsmith@as.arizona.edu> | ||
| 2 | |||
| 3 | * progmodes/idlw-shell.el (idlwave-shell-move-or-history): | ||
| 4 | Remove spurious move to point-max (new comint behavior fixes). | ||
| 5 | |||
| 6 | * progmodes/idlwave.el (idlwave-push-mark): Removed obsolete | ||
| 7 | compatibility function (Emacs 18/19). | ||
| 8 | (idlwave-is-continuation-line): Always return point at start of | ||
| 9 | previous non-blank continuation line. | ||
| 10 | `keyword-parameters': Fix continued comment font-lock matcher. | ||
| 11 | (idlwave-font-lock-fontify-region): Written, use as | ||
| 12 | font-lock-fontify-region-function, to fix continued keyword | ||
| 13 | fontification issues. | ||
| 14 | |||
| 15 | 2006-05-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 16 | |||
| 17 | * term/mac-win.el (mac-font-panel-mode): Doc fix. | ||
| 18 | (mac-service-selection, mac-service-open-file) | ||
| 19 | (mac-service-open-selection, mac-service-mail-selection) | ||
| 20 | (mac-service-mail-to, mac-service-insert-text): Rename from | ||
| 21 | mac-services-*. All uses changed. | ||
| 22 | (mac-apple-event-map): Rename event symbol `services' to `service'. | ||
| 23 | |||
| 24 | 2006-05-10 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 25 | |||
| 26 | * emacs-lisp/ewoc.el (ewoc--dll-create, ewoc--node-delete) | ||
| 27 | (ewoc--node-enter-first, ewoc--node-enter-last) | ||
| 28 | (ewoc--delete-node-internal): Merge funcs into unique callers. | ||
| 29 | |||
| 30 | 2006-05-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 31 | |||
| 32 | * emacs-lisp/crm.el (completing-read-multiple): Properly handle | ||
| 33 | return value of read-from-minibuffer for empty input. | ||
| 34 | |||
| 35 | 2006-05-09 Miles Bader <miles@gnu.org> | ||
| 36 | |||
| 37 | * comint.el (comint-insert-input): Remove redundant calls to setq | ||
| 38 | and goto-char. | ||
| 39 | |||
| 40 | 2006-05-10 Nick Roberts <nickrob@snap.net.nz> | ||
| 41 | |||
| 42 | * comint.el (comint-insert-input): Make it work when | ||
| 43 | comint-use-prompt-regexp is t. | ||
| 44 | |||
| 45 | 2006-05-10 Miles Bader <miles@gnu.org> | ||
| 46 | |||
| 47 | * subr.el (field-at-pos): New function. | ||
| 48 | |||
| 49 | * comint.el (comint-insert-input): Use it. | ||
| 50 | |||
| 51 | 2006-05-09 Juri Linkov <juri@jurta.org> | ||
| 52 | |||
| 53 | * battery.el (battery-linux-proc-acpi): Also try | ||
| 54 | `/proc/acpi/thermal_zone/THR2/temperature'. | ||
| 55 | |||
| 56 | * files.el <safe-local-variable>: Remove `eval' and `let' binding | ||
| 57 | for now unused lambda `string-or-null'. | ||
| 58 | |||
| 59 | * add-log.el (change-log-default-name): Put `string-or-null-p' | ||
| 60 | instead of lambda on `safe-local-variable' property. | ||
| 61 | |||
| 62 | * diff-mode.el (diff-context->unified): Use `region-beginning' and | ||
| 63 | `region-end' instead of `mark' and `point'. | ||
| 64 | (diff-unified->context, diff-reverse-direction, diff-fixup-modifs): | ||
| 65 | Operate on region in Transient Mark mode when the mark is active. | ||
| 66 | Use `region-beginning' and `region-end' instead of `mark' and | ||
| 67 | `point'. | ||
| 68 | (diff-hunk-text, diff-goto-source): Doc fix. | ||
| 69 | |||
| 70 | * startup.el (fancy-splash-screens, normal-splash-screen): Use | ||
| 71 | face `mode-line-buffer-id' for mode-line buffer face instead of | ||
| 72 | hard-coded `(:weight bold)'. | ||
| 73 | |||
| 74 | * arc-mode.el (archive-set-buffer-as-visiting-file): Bind | ||
| 75 | buffer-undo-list to t (undo-ask is reproducible by visiting | ||
| 76 | nested archives). | ||
| 77 | |||
| 78 | 2006-05-09 Kim F. Storm <storm@cua.dk> | ||
| 79 | |||
| 80 | * progmodes/grep.el (rgrep): Set default directory of *grep* | ||
| 81 | buffer if we start M-x rgrep in the *grep* buffer and choose | ||
| 82 | a different base directory. | ||
| 83 | |||
| 84 | 2006-05-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 85 | |||
| 86 | * net/tramp.el (tramp-register-file-name-handlers): Enable Tramp | ||
| 87 | completion also when ido is loaded. | ||
| 88 | |||
| 89 | 2006-05-09 Masatake YAMATO <jet@gyve.org> | ||
| 90 | |||
| 91 | * font-lock.el (cpp-font-lock-keywords-source-directives): Addded | ||
| 92 | "warning" and "import". | ||
| 93 | (cpp-font-lock-keywords): Added "warning". | ||
| 94 | |||
| 95 | 2006-05-08 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 96 | |||
| 97 | * term/xterm.el (terminal-init-xterm): Add more key bindings. | ||
| 98 | |||
| 99 | 2006-05-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 100 | |||
| 101 | * mwheel.el (mwheel-scroll): Make sure that when scrolling multiple | ||
| 102 | pages at a time, if we signal the end, we should indeed reach that end. | ||
| 103 | |||
| 104 | 2006-05-08 David Reitter <david.reitter@gmail.com> | ||
| 105 | |||
| 106 | * emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages | ||
| 107 | output during execution of the body. | ||
| 108 | |||
| 109 | 2006-05-08 Kim F. Storm <storm@cua.dk> | ||
| 110 | |||
| 111 | * progmodes/grep.el (lgrep, rgrep): Doc fixes. | ||
| 112 | |||
| 113 | 2006-05-08 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 114 | |||
| 115 | * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*): | ||
| 116 | Use with-current-buffer. | ||
| 117 | |||
| 118 | 2006-05-07 Kim F. Storm <storm@cua.dk> | ||
| 119 | |||
| 120 | * subr.el (add-to-history): Remove keep-dups arg. | ||
| 121 | |||
| 122 | * kmacro.el (kmacro-push-ring): Let-bind history-delete-duplicates | ||
| 123 | to nil around call to add-to-history. | ||
| 124 | |||
| 125 | 2006-05-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 126 | |||
| 127 | * emacs-lisp/syntax.el (syntax-ppss): Flush the cache before rather | ||
| 128 | than after a buffer modification. | ||
| 129 | |||
| 130 | 2006-05-08 Nick Roberts <nickrob@snap.net.nz> | ||
| 131 | |||
| 132 | * progmodes/gdb-ui.el (gdb-var-create-handler): Move speedbar | ||
| 133 | call to... | ||
| 134 | (gud-watch): ...here so speedbar is raised for already watched | ||
| 135 | expressions. | ||
| 136 | (gdb-speedbar-refresh): Delete function. | ||
| 137 | (gdb-speedbar-update, gdb-speedbar-timer-fn): New functions. | ||
| 138 | Use speedbar-timer-fn instead of speedbar-refresh (reverting | ||
| 139 | earlier change). | ||
| 140 | (gdb-var-evaluate-expression-handler) | ||
| 141 | (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Use it. | ||
| 142 | |||
| 143 | * speedbar.el (speedbar-timer-fn): Remove save-window-excursion. | ||
| 144 | Update localized contents for all buffers except ignored modes. | ||
| 145 | |||
| 146 | 2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 147 | |||
| 148 | * term/mac-win.el (mac-utxt-to-string): Use `eq' instead of `='. | ||
| 149 | (mac-atsu-font-table, mac-font-panel-mode): Add defvars. | ||
| 150 | (mac-bytes-to-digits, mac-handle-toolbar-switch-mode) | ||
| 151 | (mac-handle-font-panel-closed, mac-handle-font-selection): | ||
| 152 | New functions. | ||
| 153 | (mac-font-panel-mode): New minor mode. | ||
| 154 | (mac-apple-event-map): Add bindings for toolbar toggle button and | ||
| 155 | font panel. | ||
| 156 | (menu-bar-showhide-menu): Add mac-font-panel-mode. | ||
| 157 | |||
| 158 | 2006-05-07 John Paul Wallington <jpw@pobox.com> | ||
| 159 | |||
| 160 | * ibuffer.el (ibuffer-compressed-file-name-regexp): | ||
| 161 | Avoid `regexp-opt'; simplify regexp for readability. | ||
| 162 | |||
| 163 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 164 | |||
| 165 | * ldefs-boot.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 166 | * files.el (buffer-stale-function): | ||
| 167 | * dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 168 | * autorevert.el (global-auto-revert-non-file-buffers): Point Info | ||
| 169 | links to the main manual, not to emacs-xtra. | ||
| 170 | |||
| 171 | 2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 172 | |||
| 173 | * term/mac-win.el: (mac-utxt-to-string): Don't make adjustment for | ||
| 174 | MacJapanese if text is ASCII-only. | ||
| 175 | |||
| 176 | 2006-05-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 177 | |||
| 178 | * progmodes/gdb-ui.el (gdb-goto-breakpoint): Use or instead of | ||
| 179 | unless so nil isn't returned. | ||
| 180 | (gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window. | ||
| 181 | |||
| 182 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 183 | |||
| 184 | * subr.el (add-to-history): New function. | ||
| 185 | |||
| 186 | * ediff.el (ediff-files, ediff-files3, ediff-merge-files) | ||
| 187 | (ediff-merge-files-with-ancestor): | ||
| 188 | * env.el (setenv): | ||
| 189 | * isearch.el (isearch-update-ring): | ||
| 190 | * server.el (server-visit-files): | ||
| 191 | * progmodes/grep.el (lgrep, rgrep): | ||
| 192 | * progmodes/vhdl-mode.el (vhdl-generate-makefile-1): | ||
| 193 | * progmodes/xscheme.el (xscheme-insert-expression): | ||
| 194 | Use add-to-history. | ||
| 195 | |||
| 196 | * kmacro.el (kmacro-push-ring): Use add-to-history. | ||
| 197 | (kmacro-ring-length): Remove unused defun. | ||
| 198 | (kmacro-start-macro): Use kmacro-push-ring. | ||
| 199 | |||
| 200 | 2006-05-06 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 201 | |||
| 202 | * emacs-lisp/ewoc.el (ewoc-create, ewoc-set-hf): Use `insert' | ||
| 203 | directly instead of a lambda expression that calls it. | ||
| 204 | |||
| 205 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 206 | |||
| 207 | * avoid.el (mouse-avoidance-point-position): Use posn-at-point | ||
| 208 | instead of compute-motion. | ||
| 209 | |||
| 210 | 2006-05-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 211 | |||
| 212 | * ibuffer.el (ibuffer-compressed-file-name-regexp): Undo previous | ||
| 213 | change. | ||
| 214 | |||
| 215 | 2006-05-05 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 216 | |||
| 217 | * startup.el (command-line-1): Refer to "Pure Storage" on | ||
| 218 | pure-space-overflow. | ||
| 219 | |||
| 220 | 2006-05-05 Martin Rudalics <rudalics@gmx.at> | ||
| 221 | |||
| 222 | * emacs-lisp/re-builder.el (reb-update-overlays): Cycle through | ||
| 223 | provided faces once they all have been used up. | ||
| 224 | |||
| 225 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 226 | |||
| 227 | * startup.el (normal-splash-screen, fancy-splash-screens-1): Add a | ||
| 228 | reference to the Lisp manual to the warning about pure space | ||
| 229 | overflow. | ||
| 230 | |||
| 231 | 2006-05-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 232 | |||
| 233 | * textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload' | ||
| 234 | argument to avoid the call to `ispell-internal-change-dictionary' | ||
| 235 | when not needed. | ||
| 236 | (ispell-change-dictionary): Use this argument and call | ||
| 237 | `ispell-internal-change-dictionary' after the possible change | ||
| 238 | to `ispell-local-dictionary'. | ||
| 239 | (ispell-internal-change-dictionary): Check for a change in | ||
| 240 | personal dictionary use too. | ||
| 241 | Cosmetic changes from Agustin Martin | ||
| 242 | <agustin.martin@hispalinux.es>. | ||
| 243 | |||
| 244 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 245 | |||
| 246 | * startup.el (command-line): On MS-Windows, probe "~", not | ||
| 247 | "~USER", for warning about non-existent home directory | ||
| 248 | |||
| 249 | * arc-mode.el (archive-l-e): New optional argument `float' means | ||
| 250 | generate a float value. | ||
| 251 | (archive-arc-summarize, archive-lzh-summarize) | ||
| 252 | (archive-zip-summarize, archive-zoo-summarize): Invoke archive-l-e | ||
| 253 | with 3rd argument non-nil when file's size is being computed. | ||
| 254 | Format the file sizes with %8.0f instead of %8d. | ||
| 255 | |||
| 256 | 2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 257 | |||
| 258 | * cus-start.el (all): Add mac-dnd-known-types. | ||
| 259 | |||
| 260 | * term/mac-win.el: (mac-utxt-to-string, mac-string-to-utxt) | ||
| 261 | (mac-TEXT-to-string, mac-string-to-TEXT, mac-furl-to-string) | ||
| 262 | (mac-TIFF-to-string): New functions. | ||
| 263 | (x-get-selection, x-selection-value) | ||
| 264 | (mac-select-convert-to-string): Use them. | ||
| 265 | (mac-text-encoding-mac-japanese-basic-variant): New constant. | ||
| 266 | (mac-dnd-types-alist): New customization variable. | ||
| 267 | (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt) | ||
| 268 | (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data) | ||
| 269 | (mac-dnd-handle-drag-n-drop-event): New functions. | ||
| 270 | (mac-drag-n-drop): Remove function. | ||
| 271 | (global-map): Bind drag-n-drop and M-drag-n-drop to | ||
| 272 | mac-dnd-handle-drag-n-drop-event. | ||
| 273 | |||
| 274 | 2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org> | ||
| 275 | |||
| 276 | * progmodes/perl-mode.el (perl-beginning-of-function): | ||
| 277 | Skip anonymous subs. | ||
| 278 | |||
| 279 | 2006-05-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 280 | |||
| 281 | * ibuffer.el (ibuffer-compressed-file-name-regexp): Avoid loading | ||
| 282 | regexp-opt at run time. | ||
| 283 | |||
| 284 | * term.el (term-handle-ansi-escape): Fix off by one error. | ||
| 285 | |||
| 286 | 2006-05-04 Nick Roberts <nickrob@snap.net.nz> | ||
| 287 | |||
| 288 | * progmodes/gdb-ui.el (gdb-force-update): Delete variable... | ||
| 289 | (gdb-init-1, gdb-post-prompt): ...and references to it. | ||
| 290 | (gdb-frame-handler): Strip directory name from filename if present. | ||
| 291 | |||
| 292 | * progmodes/gud.el (gdb-force-update): Delete defvar | ||
| 293 | (gud-speedbar-buttons): ...and references to it. Use window-start | ||
| 294 | to try to keep positon in watch expression. | ||
| 295 | |||
| 296 | 2006-05-03 Richard Stallman <rms@gnu.org> | ||
| 297 | |||
| 298 | * simple.el (next-history-element, previous-history-element): Doc fix. | ||
| 299 | |||
| 300 | * isearch.el (isearch-update-ring): Doc fix. | ||
| 301 | |||
| 302 | 2006-05-03 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 303 | |||
| 304 | * isearch.el (isearch-update-ring): Take history-delete-duplicates | ||
| 305 | into consideration. Replace one arm ifs with whens. | ||
| 306 | |||
| 307 | 2006-05-03 Nick Roberts <nickrob@snap.net.nz> | ||
| 308 | |||
| 309 | * progmodes/gdb-ui.el (gud-watch): Let user select an expression. | ||
| 310 | (menu): Fix typo. | ||
| 311 | |||
| 312 | 2006-05-02 Miles Bader <miles@gnu.org> | ||
| 313 | |||
| 314 | * replace.el (occur-engine): Bind `inhibit-field-text-motion' to t. | ||
| 315 | |||
| 316 | 2006-05-02 Jay Belanger <belanger@truman.edu> | ||
| 317 | |||
| 318 | * calc/calc-embed.el: (calc-override-minor-modes-map) | ||
| 319 | (calc-override-minor-modes): New variables. | ||
| 320 | (calc-do-embedded): Make sure that Calc keystrokes aren't | ||
| 321 | overwritten by minor modes. | ||
| 322 | |||
| 323 | 2006-05-02 Chong Yidong <cyd@mit.edu> | ||
| 324 | |||
| 325 | * msb.el (msb): If EVENT is a down event, read and discard the up event. | ||
| 326 | |||
| 327 | 2006-05-02 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 328 | |||
| 329 | * startup.el (command-line-1): Refer to Lisp manual when | ||
| 330 | pure-space-overflow occurs. | ||
| 331 | |||
| 332 | * files.el (byte-compile-dynamic, byte-compile-dynamic-docstrings) | ||
| 333 | (byte-compile-warnings, find-file-visit-truename, indent-tabs-mode) | ||
| 334 | (left-margin, no-byte-compile, no-update-autoloads, truncate-lines) | ||
| 335 | (version-control): Don't use `t' for safe-local-variable declarations. | ||
| 336 | |||
| 1 | 2006-05-01 Richard Stallman <rms@gnu.org> | 337 | 2006-05-01 Richard Stallman <rms@gnu.org> |
| 2 | 338 | ||
| 3 | * diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C, | 339 | * diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C, |
| @@ -26,35 +362,35 @@ | |||
| 26 | (tramp-completion-handle-file-name-directory) | 362 | (tramp-completion-handle-file-name-directory) |
| 27 | (tramp-completion-handle-file-name-nondirectory) | 363 | (tramp-completion-handle-file-name-nondirectory) |
| 28 | (tramp-completion-handle-expand-file-name): Remove them. | 364 | (tramp-completion-handle-expand-file-name): Remove them. |
| 29 | (tramp-handle-file-name-directory): Return the real directory | 365 | (tramp-handle-file-name-directory): Return the real directory name. |
| 30 | name. Returning "/" only doesn't need to be necessary any longer. | 366 | Returning "/" only doesn't need to be necessary any longer. |
| 31 | (tramp-file-name-handler): Make special attention when in hostname | 367 | (tramp-file-name-handler): Make special attention when in hostname |
| 32 | completion mode. | 368 | completion mode. |
| 33 | (tramp-completion-file-name-handler): Revert patch from | 369 | (tramp-completion-file-name-handler): Revert patch from 2006-04-28. |
| 34 | 2006-04-28. | 370 | (tramp-register-file-name-handlers): |
| 35 | (tramp-register-file-name-handlers): Register | 371 | Register `tramp-completion-file-name-handler' only when |
| 36 | `tramp-completion-file-name-handler' only when | 372 | `partial-completion-mode' is enabled. |
| 37 | `partial-completion-mode is enabled. | 373 | (tramp-completion-handle-file-name-all-completions): |
| 38 | (tramp-completion-handle-file-name-all-completions): Delete | 374 | Delete directory part from results. |
| 39 | directory part from results. | ||
| 40 | (tramp-get-completion-methods, tramp-get-completion-user-host): | 375 | (tramp-get-completion-methods, tramp-get-completion-user-host): |
| 41 | Discard deleting "/", it doesn't work after the change of | 376 | Discard deleting "/", it doesn't work after the change of |
| 42 | `tramp-handle-file-name-directory' above. | 377 | `tramp-handle-file-name-directory' above. |
| 43 | 378 | ||
| 44 | 2006-05-01 Kim F. Storm <storm@cua.dk> | 379 | 2006-05-01 Kim F. Storm <storm@cua.dk> |
| 45 | 380 | ||
| 46 | * progmodes/grep.el (grep-expand-template): Use save-match-data. | 381 | * progmodes/grep.el (grep-expand-template): Use save-match-data |
| 382 | and symbol-value. | ||
| 47 | 383 | ||
| 48 | 2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 384 | 2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 49 | 385 | ||
| 50 | * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): Use | 386 | * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): |
| 51 | select-frame-set-input-focus instead of raise-frame. | 387 | Use select-frame-set-input-focus instead of raise-frame. |
| 52 | (global-map): Bind M-drag-n-drop to mac-drag-n-drop. | 388 | (global-map): Bind M-drag-n-drop to mac-drag-n-drop. |
| 53 | 389 | ||
| 54 | 2006-05-01 Nick Roberts <nickrob@snap.net.nz> | 390 | 2006-05-01 Nick Roberts <nickrob@snap.net.nz> |
| 55 | 391 | ||
| 56 | * progmodes/gud.el (gud-def): Add %c case. | 392 | * progmodes/gud.el (gud-def): Add %c case. |
| 57 | (gud-speedbar-buttons): Don'bind case-fold-search unnecessarily. | 393 | (gud-speedbar-buttons): Don't bind case-fold-search unnecessarily. |
| 58 | (gud-format-command): Make match case sensitive. Match on %F. | 394 | (gud-format-command): Make match case sensitive. Match on %F. |
| 59 | 395 | ||
| 60 | 2006-04-30 Glenn Morris <rgm@gnu.org> | 396 | 2006-04-30 Glenn Morris <rgm@gnu.org> |
| @@ -121,7 +457,7 @@ | |||
| 121 | (grep-read-regexp, grep-read-files): New helper functions. | 457 | (grep-read-regexp, grep-read-files): New helper functions. |
| 122 | (rgrep): Rename from grep-tree. Rework to use proper histories. | 458 | (rgrep): Rename from grep-tree. Rework to use proper histories. |
| 123 | Adapt to changes in defcustoms and functions above. | 459 | Adapt to changes in defcustoms and functions above. |
| 124 | (lgrep): New command, as grep, but using same interactive api as rgrep. | 460 | (lgrep): New command, as grep, but using same interactive UI as rgrep. |
| 125 | 461 | ||
| 126 | 2006-04-28 Michael Albinus <michael.albinus@gmx.de> | 462 | 2006-04-28 Michael Albinus <michael.albinus@gmx.de> |
| 127 | 463 | ||
diff --git a/lisp/add-log.el b/lisp/add-log.el index 47a839d539d..393a696d3f1 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -45,8 +45,7 @@ | |||
| 45 | :type '(choice (const :tag "default" nil) | 45 | :type '(choice (const :tag "default" nil) |
| 46 | string) | 46 | string) |
| 47 | :group 'change-log) | 47 | :group 'change-log) |
| 48 | (put 'change-log-default-name 'safe-local-variable | 48 | (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) |
| 49 | (lambda (a) (or (stringp a) (null a)))) | ||
| 50 | 49 | ||
| 51 | (defcustom change-log-mode-hook nil | 50 | (defcustom change-log-mode-hook nil |
| 52 | "Normal hook run by `change-log-mode'." | 51 | "Normal hook run by `change-log-mode'." |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index d699a78f8e8..9da83f1a635 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -480,10 +480,12 @@ Each descriptor is a vector of the form | |||
| 480 | (defsubst archive-name (suffix) | 480 | (defsubst archive-name (suffix) |
| 481 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) | 481 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) |
| 482 | 482 | ||
| 483 | (defun archive-l-e (str &optional len) | 483 | (defun archive-l-e (str &optional len float) |
| 484 | "Convert little endian string/vector STR to integer. | 484 | "Convert little endian string/vector STR to integer. |
| 485 | Alternatively, STR may be a buffer position in the current buffer | 485 | Alternatively, STR may be a buffer position in the current buffer |
| 486 | in which case a second argument, length LEN, should be supplied." | 486 | in which case a second argument, length LEN, should be supplied. |
| 487 | FLOAT, if non-nil, means generate and return a float instead of an integer | ||
| 488 | \(use this for numbers that can overflow the Emacs integer)." | ||
| 487 | (if (stringp str) | 489 | (if (stringp str) |
| 488 | (setq len (length str)) | 490 | (setq len (length str)) |
| 489 | (setq str (buffer-substring str (+ str len)))) | 491 | (setq str (buffer-substring str (+ str len)))) |
| @@ -492,7 +494,8 @@ in which case a second argument, length LEN, should be supplied." | |||
| 492 | (i 0)) | 494 | (i 0)) |
| 493 | (while (< i len) | 495 | (while (< i len) |
| 494 | (setq i (1+ i) | 496 | (setq i (1+ i) |
| 495 | result (+ (ash result 8) (aref str (- len i))))) | 497 | result (+ (if float (* result 256.0) (ash result 8)) |
| 498 | (aref str (- len i))))) | ||
| 496 | result)) | 499 | result)) |
| 497 | 500 | ||
| 498 | (defun archive-int-to-mode (mode) | 501 | (defun archive-int-to-mode (mode) |
| @@ -882,7 +885,8 @@ using `make-temp-file', and the generated name is returned." | |||
| 882 | "Set the current buffer as if it were visiting FILENAME." | 885 | "Set the current buffer as if it were visiting FILENAME." |
| 883 | (save-excursion | 886 | (save-excursion |
| 884 | (goto-char (point-min)) | 887 | (goto-char (point-min)) |
| 885 | (let ((coding | 888 | (let ((buffer-undo-list t) |
| 889 | (coding | ||
| 886 | (or coding-system-for-read | 890 | (or coding-system-for-read |
| 887 | (and set-auto-coding-function | 891 | (and set-auto-coding-function |
| 888 | (save-excursion | 892 | (save-excursion |
| @@ -1355,13 +1359,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1355 | (fnlen (or (string-match "\0" namefld) 13)) | 1359 | (fnlen (or (string-match "\0" namefld) 13)) |
| 1356 | (efnname (decode-coding-string (substring namefld 0 fnlen) | 1360 | (efnname (decode-coding-string (substring namefld 0 fnlen) |
| 1357 | archive-file-name-coding-system)) | 1361 | archive-file-name-coding-system)) |
| 1358 | (csize (archive-l-e (+ p 15) 4)) | 1362 | ;; Convert to float to avoid overflow for very large files. |
| 1363 | (csize (archive-l-e (+ p 15) 4 'float)) | ||
| 1359 | (moddate (archive-l-e (+ p 19) 2)) | 1364 | (moddate (archive-l-e (+ p 19) 2)) |
| 1360 | (modtime (archive-l-e (+ p 21) 2)) | 1365 | (modtime (archive-l-e (+ p 21) 2)) |
| 1361 | (ucsize (archive-l-e (+ p 25) 4)) | 1366 | (ucsize (archive-l-e (+ p 25) 4 'float)) |
| 1362 | (fiddle (string= efnname (upcase efnname))) | 1367 | (fiddle (string= efnname (upcase efnname))) |
| 1363 | (ifnname (if fiddle (downcase efnname) efnname)) | 1368 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1364 | (text (format " %8d %-11s %-8s %s" | 1369 | (text (format " %8.0f %-11s %-8s %s" |
| 1365 | ucsize | 1370 | ucsize |
| 1366 | (archive-dosdate moddate) | 1371 | (archive-dosdate moddate) |
| 1367 | (archive-dostime modtime) | 1372 | (archive-dostime modtime) |
| @@ -1383,7 +1388,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1383 | dash) | 1388 | dash) |
| 1384 | (archive-summarize-files (nreverse visual)) | 1389 | (archive-summarize-files (nreverse visual)) |
| 1385 | (insert dash | 1390 | (insert dash |
| 1386 | (format " %8d %d file%s" | 1391 | (format " %8.0f %d file%s" |
| 1387 | totalsize | 1392 | totalsize |
| 1388 | (length files) | 1393 | (length files) |
| 1389 | (if (= 1 (length files)) "" "s")) | 1394 | (if (= 1 (length files)) "" "s")) |
| @@ -1416,9 +1421,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1416 | (while (progn (goto-char p) ;beginning of a base header. | 1421 | (while (progn (goto-char p) ;beginning of a base header. |
| 1417 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) | 1422 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) |
| 1418 | (let* ((hsize (byte-after p)) ;size of the base header (level 0 and 1) | 1423 | (let* ((hsize (byte-after p)) ;size of the base header (level 0 and 1) |
| 1419 | (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2), | 1424 | ;; Convert to float to avoid overflow for very large files. |
| 1425 | (csize (archive-l-e (+ p 7) 4 'float)) ;size of a compressed file to follow (level 0 and 2), | ||
| 1420 | ;size of extended headers + the compressed file to follow (level 1). | 1426 | ;size of extended headers + the compressed file to follow (level 1). |
| 1421 | (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file. | 1427 | (ucsize (archive-l-e (+ p 11) 4 'float)) ;size of an uncompressed file. |
| 1422 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers | 1428 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers |
| 1423 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1429 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
| 1424 | (hdrlvl (byte-after (+ p 20))) ;header level | 1430 | (hdrlvl (byte-after (+ p 20))) ;header level |
| @@ -1493,12 +1499,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1493 | (archive-unixtime time1 time2) | 1499 | (archive-unixtime time1 time2) |
| 1494 | (archive-dostime time1))) | 1500 | (archive-dostime time1))) |
| 1495 | (setq text (if archive-alternate-display | 1501 | (setq text (if archive-alternate-display |
| 1496 | (format " %8d %5S %5S %s" | 1502 | (format " %8.0f %5S %5S %s" |
| 1497 | ucsize | 1503 | ucsize |
| 1498 | (or uid "?") | 1504 | (or uid "?") |
| 1499 | (or gid "?") | 1505 | (or gid "?") |
| 1500 | ifnname) | 1506 | ifnname) |
| 1501 | (format " %10s %8d %-11s %-8s %s" | 1507 | (format " %10s %8.0f %-11s %-8s %s" |
| 1502 | modestr | 1508 | modestr |
| 1503 | ucsize | 1509 | ucsize |
| 1504 | moddate | 1510 | moddate |
| @@ -1527,8 +1533,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1527 | "M Length Uid Gid File\n" | 1533 | "M Length Uid Gid File\n" |
| 1528 | "M Filemode Length Date Time File\n")) | 1534 | "M Filemode Length Date Time File\n")) |
| 1529 | (sumline (if archive-alternate-display | 1535 | (sumline (if archive-alternate-display |
| 1530 | " %8d %d file%s" | 1536 | " %8.0f %d file%s" |
| 1531 | " %8d %d file%s"))) | 1537 | " %8.0f %d file%s"))) |
| 1532 | (insert header dash) | 1538 | (insert header dash) |
| 1533 | (archive-summarize-files (nreverse visual)) | 1539 | (archive-summarize-files (nreverse visual)) |
| 1534 | (insert dash | 1540 | (insert dash |
| @@ -1622,7 +1628,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1622 | ;; (method (archive-l-e (+ p 10) 2)) | 1628 | ;; (method (archive-l-e (+ p 10) 2)) |
| 1623 | (modtime (archive-l-e (+ p 12) 2)) | 1629 | (modtime (archive-l-e (+ p 12) 2)) |
| 1624 | (moddate (archive-l-e (+ p 14) 2)) | 1630 | (moddate (archive-l-e (+ p 14) 2)) |
| 1625 | (ucsize (archive-l-e (+ p 24) 4)) | 1631 | ;; Convert to float to avoid overflow for very large files. |
| 1632 | (ucsize (archive-l-e (+ p 24) 4 'float)) | ||
| 1626 | (fnlen (archive-l-e (+ p 28) 2)) | 1633 | (fnlen (archive-l-e (+ p 28) 2)) |
| 1627 | (exlen (archive-l-e (+ p 30) 2)) | 1634 | (exlen (archive-l-e (+ p 30) 2)) |
| 1628 | (fclen (archive-l-e (+ p 32) 2)) | 1635 | (fclen (archive-l-e (+ p 32) 2)) |
| @@ -1647,7 +1654,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1647 | (string= (upcase efnname) efnname))) | 1654 | (string= (upcase efnname) efnname))) |
| 1648 | (ifnname (if fiddle (downcase efnname) efnname)) | 1655 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1649 | (width (string-width ifnname)) | 1656 | (width (string-width ifnname)) |
| 1650 | (text (format " %10s %8d %-11s %-8s %s" | 1657 | (text (format " %10s %8.0f %-11s %-8s %s" |
| 1651 | modestr | 1658 | modestr |
| 1652 | ucsize | 1659 | ucsize |
| 1653 | (archive-dosdate moddate) | 1660 | (archive-dosdate moddate) |
| @@ -1673,7 +1680,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1673 | dash) | 1680 | dash) |
| 1674 | (archive-summarize-files (nreverse visual)) | 1681 | (archive-summarize-files (nreverse visual)) |
| 1675 | (insert dash | 1682 | (insert dash |
| 1676 | (format " %8d %d file%s" | 1683 | (format " %8.0f %d file%s" |
| 1677 | totalsize | 1684 | totalsize |
| 1678 | (length files) | 1685 | (length files) |
| 1679 | (if (= 1 (length files)) "" "s")) | 1686 | (if (= 1 (length files)) "" "s")) |
| @@ -1726,7 +1733,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1726 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) | 1733 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) |
| 1727 | (moddate (archive-l-e (+ p 14) 2)) | 1734 | (moddate (archive-l-e (+ p 14) 2)) |
| 1728 | (modtime (archive-l-e (+ p 16) 2)) | 1735 | (modtime (archive-l-e (+ p 16) 2)) |
| 1729 | (ucsize (archive-l-e (+ p 20) 4)) | 1736 | ;; Convert to float to avoid overflow for very large files. |
| 1737 | (ucsize (archive-l-e (+ p 20) 4 'float)) | ||
| 1730 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) | 1738 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) |
| 1731 | (dirtype (byte-after (+ p 4))) | 1739 | (dirtype (byte-after (+ p 4))) |
| 1732 | (lfnlen (if (= dirtype 2) (byte-after (+ p 56)) 0)) | 1740 | (lfnlen (if (= dirtype 2) (byte-after (+ p 56)) 0)) |
| @@ -1749,7 +1757,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1749 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) | 1757 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) |
| 1750 | (ifnname (if fiddle (downcase efnname) efnname)) | 1758 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1751 | (width (string-width ifnname)) | 1759 | (width (string-width ifnname)) |
| 1752 | (text (format " %8d %-11s %-8s %s" | 1760 | (text (format " %8.0f %-11s %-8s %s" |
| 1753 | ucsize | 1761 | ucsize |
| 1754 | (archive-dosdate moddate) | 1762 | (archive-dosdate moddate) |
| 1755 | (archive-dostime modtime) | 1763 | (archive-dostime modtime) |
| @@ -1771,7 +1779,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1771 | dash) | 1779 | dash) |
| 1772 | (archive-summarize-files (nreverse visual)) | 1780 | (archive-summarize-files (nreverse visual)) |
| 1773 | (insert dash | 1781 | (insert dash |
| 1774 | (format " %8d %d file%s" | 1782 | (format " %8.0f %d file%s" |
| 1775 | totalsize | 1783 | totalsize |
| 1776 | (length files) | 1784 | (length files) |
| 1777 | (if (= 1 (length files)) "" "s")) | 1785 | (if (= 1 (length files)) "" "s")) |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 4119dba5755..9d189e027c0 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -215,10 +215,10 @@ changes in subdirectories or in the contents, size, modes, etc., | |||
| 215 | of files. You may still sometimes want to revert them manually. | 215 | of files. You may still sometimes want to revert them manually. |
| 216 | 216 | ||
| 217 | Use this option with care since it could lead to excessive auto-reverts. | 217 | Use this option with care since it could lead to excessive auto-reverts. |
| 218 | For more information, see Info node `(emacs-xtra)Autorevert'." | 218 | For more information, see Info node `(emacs)Autorevert'." |
| 219 | :group 'auto-revert | 219 | :group 'auto-revert |
| 220 | :type 'boolean | 220 | :type 'boolean |
| 221 | :link '(info-link "(emacs-xtra)Autorevert")) | 221 | :link '(info-link "(emacs)Autorevert")) |
| 222 | 222 | ||
| 223 | (defcustom global-auto-revert-ignore-modes () | 223 | (defcustom global-auto-revert-ignore-modes () |
| 224 | "List of major modes Global Auto-Revert Mode should not check." | 224 | "List of major modes Global Auto-Revert Mode should not check." |
diff --git a/lisp/avoid.el b/lisp/avoid.el index 1d97dd306db..1868707720e 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -139,23 +139,13 @@ Only applies in mouse-avoidance-modes `animate' and `jump'." | |||
| 139 | (defun mouse-avoidance-point-position () | 139 | (defun mouse-avoidance-point-position () |
| 140 | "Return the position of point as (FRAME X . Y). | 140 | "Return the position of point as (FRAME X . Y). |
| 141 | Analogous to `mouse-position'." | 141 | Analogous to `mouse-position'." |
| 142 | (let* ((w (selected-window)) | 142 | (let ((edges (window-inside-edges)) |
| 143 | (edges (window-inside-edges w)) | 143 | (x-y (posn-x-y (posn-at-point)))) |
| 144 | (list | ||
| 145 | (compute-motion (max (window-start w) (point-min)) ; start pos | ||
| 146 | ;; window-start can be < point-min if the | ||
| 147 | ;; latter has changed since the last redisplay | ||
| 148 | '(0 . 0) ; start XY | ||
| 149 | (point) ; stop pos | ||
| 150 | nil ; stop XY: none | ||
| 151 | nil ; width | ||
| 152 | (cons (window-hscroll w) 0) ; 0 may not be right? | ||
| 153 | (selected-window)))) | ||
| 154 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) | ||
| 155 | ;; we want: (frame hpos . vpos) | ||
| 156 | (cons (selected-frame) | 144 | (cons (selected-frame) |
| 157 | (cons (+ (car edges) (car (cdr list))) | 145 | (cons (+ (car edges) |
| 158 | (+ (car (cdr edges)) (car (cdr (cdr list)))))))) | 146 | (/ (car x-y) (frame-char-width))) |
| 147 | (+ (car (cdr edges)) | ||
| 148 | (/ (cdr x-y) (frame-char-height))))))) | ||
| 159 | 149 | ||
| 160 | ;(defun mouse-avoidance-point-position-test () | 150 | ;(defun mouse-avoidance-point-position-test () |
| 161 | ; (interactive) | 151 | ; (interactive) |
diff --git a/lisp/battery.el b/lisp/battery.el index 34f74aa9932..50edc8dde8a 100644 --- a/lisp/battery.el +++ b/lisp/battery.el | |||
| @@ -386,6 +386,14 @@ The following %-sequences are provided: | |||
| 386 | (when (re-search-forward | 386 | (when (re-search-forward |
| 387 | "temperature: +\\([0-9]+\\) C$" nil t) | 387 | "temperature: +\\([0-9]+\\) C$" nil t) |
| 388 | (match-string 1)))) | 388 | (match-string 1)))) |
| 389 | (when (file-exists-p | ||
| 390 | "/proc/acpi/thermal_zone/THR2/temperature") | ||
| 391 | (with-temp-buffer | ||
| 392 | (insert-file-contents | ||
| 393 | "/proc/acpi/thermal_zone/THR2/temperature") | ||
| 394 | (when (re-search-forward | ||
| 395 | "temperature: +\\([0-9]+\\) C$" nil t) | ||
| 396 | (match-string 1)))) | ||
| 389 | "N/A")) | 397 | "N/A")) |
| 390 | (cons ?r (or (and rate (concat (number-to-string rate) " " | 398 | (cons ?r (or (and rate (concat (number-to-string rate) " " |
| 391 | rate-type)) "N/A")) | 399 | rate-type)) "N/A")) |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index adb94ef7381..e54a94e4d39 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -206,6 +206,18 @@ | |||
| 206 | (defvar calc-embedded-firsttime-buf) | 206 | (defvar calc-embedded-firsttime-buf) |
| 207 | (defvar calc-embedded-firsttime-formula) | 207 | (defvar calc-embedded-firsttime-formula) |
| 208 | 208 | ||
| 209 | ;; The following is to take care of any minor modes which override | ||
| 210 | ;; a Calc command. | ||
| 211 | (defvar calc-override-minor-modes-map | ||
| 212 | (make-sparse-keymap) | ||
| 213 | "A list of keybindings that might be overwritten by minor modes.") | ||
| 214 | |||
| 215 | ;; Add any keys that might be overwritten here. | ||
| 216 | (define-key calc-override-minor-modes-map "`" 'calc-edit) | ||
| 217 | |||
| 218 | (defvar calc-override-minor-modes | ||
| 219 | (cons t calc-override-minor-modes-map)) | ||
| 220 | |||
| 209 | (defun calc-do-embedded (calc-embed-arg end obeg oend) | 221 | (defun calc-do-embedded (calc-embed-arg end obeg oend) |
| 210 | (if calc-embedded-info | 222 | (if calc-embedded-info |
| 211 | 223 | ||
| @@ -237,6 +249,8 @@ | |||
| 237 | truncate-lines (nth 2 mode) | 249 | truncate-lines (nth 2 mode) |
| 238 | buffer-read-only nil) | 250 | buffer-read-only nil) |
| 239 | (use-local-map (nth 1 mode)) | 251 | (use-local-map (nth 1 mode)) |
| 252 | (setq minor-mode-overriding-map-alist | ||
| 253 | (remq calc-override-minor-modes minor-mode-overriding-map-alist)) | ||
| 240 | (set-buffer-modified-p (buffer-modified-p)) | 254 | (set-buffer-modified-p (buffer-modified-p)) |
| 241 | (calc-embedded-restore-original-modes) | 255 | (calc-embedded-restore-original-modes) |
| 242 | (or calc-embedded-quiet | 256 | (or calc-embedded-quiet |
| @@ -297,6 +311,9 @@ | |||
| 297 | buffer-read-only t) | 311 | buffer-read-only t) |
| 298 | (set-buffer-modified-p (buffer-modified-p)) | 312 | (set-buffer-modified-p (buffer-modified-p)) |
| 299 | (use-local-map calc-mode-map) | 313 | (use-local-map calc-mode-map) |
| 314 | (setq minor-mode-overriding-map-alist | ||
| 315 | (cons calc-override-minor-modes | ||
| 316 | minor-mode-overriding-map-alist)) | ||
| 300 | (setq calc-no-refresh-evaltos nil) | 317 | (setq calc-no-refresh-evaltos nil) |
| 301 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) | 318 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) |
| 302 | (let (str) | 319 | (let (str) |
diff --git a/lisp/comint.el b/lisp/comint.el index 946085661fc..c7e5b3bdddd 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -802,27 +802,31 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 802 | ;; This doesn't use "e" because it is supposed to work | 802 | ;; This doesn't use "e" because it is supposed to work |
| 803 | ;; for events without parameters. | 803 | ;; for events without parameters. |
| 804 | (interactive (list last-input-event)) | 804 | (interactive (list last-input-event)) |
| 805 | (let ((pos (point))) | 805 | (when event |
| 806 | (if event (posn-set-point (event-end event))) | 806 | (posn-set-point (event-end event))) |
| 807 | (if (not (eq (get-char-property (point) 'field) 'input)) | 807 | (if comint-use-prompt-regexp |
| 808 | ;; No input at POS, fall back to the global definition. | 808 | (let ((input (funcall comint-get-old-input)) |
| 809 | (let* ((keys (this-command-keys)) | 809 | (process (get-buffer-process (current-buffer)))) |
| 810 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) | 810 | (if (not process) |
| 811 | (fun (and last-key (lookup-key global-map (vector last-key))))) | 811 | (error "Current buffer has no process") |
| 812 | (goto-char pos) | 812 | (goto-char (process-mark process)) |
| 813 | (and fun (call-interactively fun))) | 813 | (insert input))) |
| 814 | (setq pos (point)) | 814 | (let ((pos (point))) |
| 815 | ;; There's previous input at POS, insert it at the end of the buffer. | 815 | (if (not (eq (field-at-pos pos) 'input)) |
| 816 | (goto-char (point-max)) | 816 | ;; No input at POS, fall back to the global definition. |
| 817 | ;; First delete any old unsent input at the end | 817 | (let* ((keys (this-command-keys)) |
| 818 | (delete-region | 818 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) |
| 819 | (or (marker-position comint-accum-marker) | 819 | (fun (and last-key (lookup-key global-map (vector last-key))))) |
| 820 | (process-mark (get-buffer-process (current-buffer)))) | 820 | (and fun (call-interactively fun))) |
| 821 | (point)) | 821 | ;; There's previous input at POS, insert it at the end of the buffer. |
| 822 | ;; Insert the input at point | 822 | (goto-char (point-max)) |
| 823 | (insert (buffer-substring-no-properties | 823 | ;; First delete any old unsent input at the end |
| 824 | (previous-single-char-property-change (1+ pos) 'field) | 824 | (delete-region |
| 825 | (next-single-char-property-change pos 'field)))))) | 825 | (or (marker-position comint-accum-marker) |
| 826 | (process-mark (get-buffer-process (current-buffer)))) | ||
| 827 | (point)) | ||
| 828 | ;; Insert the input at point | ||
| 829 | (insert (field-string-no-properties pos)))))) | ||
| 826 | 830 | ||
| 827 | 831 | ||
| 828 | ;; Input history processing in a buffer | 832 | ;; Input history processing in a buffer |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index d6af9e999f5..79b142470d1 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -196,6 +196,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 196 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) | 196 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) |
| 197 | (integer :tag "time" 2) | 197 | (integer :tag "time" 2) |
| 198 | (other :tag "on"))) | 198 | (other :tag "on"))) |
| 199 | ;; macselect.c | ||
| 200 | (mac-dnd-known-types mac (repeat string) "22.1") | ||
| 199 | ;; macterm.c | 201 | ;; macterm.c |
| 200 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) | 202 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) |
| 201 | (const control) (const meta) | 203 | (const control) (const meta) |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index cc89aad6ca3..1a8402e06c4 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -633,8 +633,8 @@ Non-nil OLD means that we want the old file." | |||
| 633 | "Convert unified diffs to context diffs. | 633 | "Convert unified diffs to context diffs. |
| 634 | START and END are either taken from the region (if a prefix arg is given) or | 634 | START and END are either taken from the region (if a prefix arg is given) or |
| 635 | else cover the whole bufer." | 635 | else cover the whole bufer." |
| 636 | (interactive (if current-prefix-arg | 636 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 637 | (list (mark) (point)) | 637 | (list (region-beginning) (region-end)) |
| 638 | (list (point-min) (point-max)))) | 638 | (list (point-min) (point-max)))) |
| 639 | (unless (markerp end) (setq end (copy-marker end))) | 639 | (unless (markerp end) (setq end (copy-marker end))) |
| 640 | (let (;;(diff-inhibit-after-change t) | 640 | (let (;;(diff-inhibit-after-change t) |
| @@ -722,7 +722,7 @@ START and END are either taken from the region | |||
| 722 | \(when it is highlighted) or else cover the whole buffer. | 722 | \(when it is highlighted) or else cover the whole buffer. |
| 723 | With a prefix argument, convert unified format to context format." | 723 | With a prefix argument, convert unified format to context format." |
| 724 | (interactive (if (and transient-mark-mode mark-active) | 724 | (interactive (if (and transient-mark-mode mark-active) |
| 725 | (list (mark) (point) current-prefix-arg) | 725 | (list (region-beginning) (region-end) current-prefix-arg) |
| 726 | (list (point-min) (point-max) current-prefix-arg))) | 726 | (list (point-min) (point-max) current-prefix-arg))) |
| 727 | (if to-context | 727 | (if to-context |
| 728 | (diff-unified->context start end) | 728 | (diff-unified->context start end) |
| @@ -795,8 +795,8 @@ With a prefix argument, convert unified format to context format." | |||
| 795 | "Reverse the direction of the diffs. | 795 | "Reverse the direction of the diffs. |
| 796 | START and END are either taken from the region (if a prefix arg is given) or | 796 | START and END are either taken from the region (if a prefix arg is given) or |
| 797 | else cover the whole bufer." | 797 | else cover the whole bufer." |
| 798 | (interactive (if current-prefix-arg | 798 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 799 | (list (mark) (point)) | 799 | (list (region-beginning) (region-end)) |
| 800 | (list (point-min) (point-max)))) | 800 | (list (point-min) (point-max)))) |
| 801 | (unless (markerp end) (setq end (copy-marker end))) | 801 | (unless (markerp end) (setq end (copy-marker end))) |
| 802 | (let (;;(diff-inhibit-after-change t) | 802 | (let (;;(diff-inhibit-after-change t) |
| @@ -857,8 +857,8 @@ else cover the whole bufer." | |||
| 857 | "Fixup the hunk headers (in case the buffer was modified). | 857 | "Fixup the hunk headers (in case the buffer was modified). |
| 858 | START and END are either taken from the region (if a prefix arg is given) or | 858 | START and END are either taken from the region (if a prefix arg is given) or |
| 859 | else cover the whole bufer." | 859 | else cover the whole bufer." |
| 860 | (interactive (if current-prefix-arg | 860 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 861 | (list (mark) (point)) | 861 | (list (region-beginning) (region-end)) |
| 862 | (list (point-min) (point-max)))) | 862 | (list (point-min) (point-max)))) |
| 863 | (let ((inhibit-read-only t)) | 863 | (let ((inhibit-read-only t)) |
| 864 | (save-excursion | 864 | (save-excursion |
| @@ -1069,7 +1069,7 @@ Only works for unified diffs." | |||
| 1069 | 1069 | ||
| 1070 | (defun diff-hunk-text (hunk destp char-offset) | 1070 | (defun diff-hunk-text (hunk destp char-offset) |
| 1071 | "Return the literal source text from HUNK as (TEXT . OFFSET). | 1071 | "Return the literal source text from HUNK as (TEXT . OFFSET). |
| 1072 | if DESTP is nil TEXT is the source, otherwise the destination text. | 1072 | If DESTP is nil, TEXT is the source, otherwise the destination text. |
| 1073 | CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding | 1073 | CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding |
| 1074 | char-offset in TEXT." | 1074 | char-offset in TEXT." |
| 1075 | (with-temp-buffer | 1075 | (with-temp-buffer |
| @@ -1302,7 +1302,7 @@ With a prefix argument, try to REVERSE the hunk." | |||
| 1302 | `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg | 1302 | `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg |
| 1303 | is given) determines whether to jump to the old or the new file. | 1303 | is given) determines whether to jump to the old or the new file. |
| 1304 | If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) | 1304 | If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) |
| 1305 | then `diff-jump-to-old-file' is also set, for the next invocations." | 1305 | then `diff-jump-to-old-file' is also set, for the next invocations." |
| 1306 | (interactive (list current-prefix-arg last-input-event)) | 1306 | (interactive (list current-prefix-arg last-input-event)) |
| 1307 | ;; When pointing at a removal line, we probably want to jump to | 1307 | ;; When pointing at a removal line, we probably want to jump to |
| 1308 | ;; the old location, and else to the new (i.e. as if reverting). | 1308 | ;; the old location, and else to the new (i.e. as if reverting). |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 20b0037ab7e..e07689973e4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -918,7 +918,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 918 | may have to reset some subdirectory switches after a `dired-undo'. | 918 | may have to reset some subdirectory switches after a `dired-undo'. |
| 919 | You can reset all subdirectory switches to the default using | 919 | You can reset all subdirectory switches to the default using |
| 920 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 920 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 921 | See Info node `(emacs-xtra)Subdir switches' for more details." | 921 | See Info node `(emacs)Subdir switches' for more details." |
| 922 | ;; Moves point if the next ARG files are redisplayed. | 922 | ;; Moves point if the next ARG files are redisplayed. |
| 923 | (interactive "P\np") | 923 | (interactive "P\np") |
| 924 | (if (and test-for-subdir (dired-get-subdir)) | 924 | (if (and test-for-subdir (dired-get-subdir)) |
| @@ -1761,7 +1761,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 1761 | may have to reset some subdirectory switches after a `dired-undo'. | 1761 | may have to reset some subdirectory switches after a `dired-undo'. |
| 1762 | You can reset all subdirectory switches to the default using | 1762 | You can reset all subdirectory switches to the default using |
| 1763 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 1763 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 1764 | See Info node `(emacs-xtra)Subdir switches' for more details." | 1764 | See Info node `(emacs)Subdir switches' for more details." |
| 1765 | (interactive | 1765 | (interactive |
| 1766 | (list (dired-get-filename) | 1766 | (list (dired-get-filename) |
| 1767 | (if current-prefix-arg | 1767 | (if current-prefix-arg |
diff --git a/lisp/ediff.el b/lisp/ediff.el index bb6cfc6b72e..14f634f0cd2 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -210,12 +210,11 @@ | |||
| 210 | ediff-last-dir-B | 210 | ediff-last-dir-B |
| 211 | (file-name-directory f))) | 211 | (file-name-directory f))) |
| 212 | (progn | 212 | (progn |
| 213 | (setq file-name-history | 213 | (add-to-history 'file-name-history |
| 214 | (cons (ediff-abbreviate-file-name | 214 | (ediff-abbreviate-file-name |
| 215 | (expand-file-name | 215 | (expand-file-name |
| 216 | (file-name-nondirectory f) | 216 | (file-name-nondirectory f) |
| 217 | dir-B)) | 217 | dir-B))) |
| 218 | file-name-history)) | ||
| 219 | (ediff-get-default-file-name f 1))) | 218 | (ediff-get-default-file-name f 1))) |
| 220 | ))) | 219 | ))) |
| 221 | (ediff-files-internal file-A | 220 | (ediff-files-internal file-A |
| @@ -246,25 +245,22 @@ | |||
| 246 | ediff-last-dir-B | 245 | ediff-last-dir-B |
| 247 | (file-name-directory f))) | 246 | (file-name-directory f))) |
| 248 | (progn | 247 | (progn |
| 249 | (setq file-name-history | 248 | (add-to-history 'file-name-history |
| 250 | (cons | 249 | (ediff-abbreviate-file-name |
| 251 | (ediff-abbreviate-file-name | 250 | (expand-file-name |
| 252 | (expand-file-name | 251 | (file-name-nondirectory f) |
| 253 | (file-name-nondirectory f) | 252 | dir-B))) |
| 254 | dir-B)) | ||
| 255 | file-name-history)) | ||
| 256 | (ediff-get-default-file-name f 1)))) | 253 | (ediff-get-default-file-name f 1)))) |
| 257 | (ediff-read-file-name "File C to compare" | 254 | (ediff-read-file-name "File C to compare" |
| 258 | (setq dir-C (if ediff-use-last-dir | 255 | (setq dir-C (if ediff-use-last-dir |
| 259 | ediff-last-dir-C | 256 | ediff-last-dir-C |
| 260 | (file-name-directory ff))) | 257 | (file-name-directory ff))) |
| 261 | (progn | 258 | (progn |
| 262 | (setq file-name-history | 259 | (add-to-history 'file-name-history |
| 263 | (cons (ediff-abbreviate-file-name | 260 | (ediff-abbreviate-file-name |
| 264 | (expand-file-name | 261 | (expand-file-name |
| 265 | (file-name-nondirectory ff) | 262 | (file-name-nondirectory ff) |
| 266 | dir-C)) | 263 | dir-C))) |
| 267 | file-name-history)) | ||
| 268 | (ediff-get-default-file-name ff 2))) | 264 | (ediff-get-default-file-name ff 2))) |
| 269 | ))) | 265 | ))) |
| 270 | (ediff-files-internal file-A | 266 | (ediff-files-internal file-A |
| @@ -1109,12 +1105,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1109 | ediff-last-dir-B | 1105 | ediff-last-dir-B |
| 1110 | (file-name-directory f))) | 1106 | (file-name-directory f))) |
| 1111 | (progn | 1107 | (progn |
| 1112 | (setq file-name-history | 1108 | (add-to-history 'file-name-history |
| 1113 | (cons (ediff-abbreviate-file-name | 1109 | (ediff-abbreviate-file-name |
| 1114 | (expand-file-name | 1110 | (expand-file-name |
| 1115 | (file-name-nondirectory f) | 1111 | (file-name-nondirectory f) |
| 1116 | dir-B)) | 1112 | dir-B))) |
| 1117 | file-name-history)) | ||
| 1118 | (ediff-get-default-file-name f 1))) | 1113 | (ediff-get-default-file-name f 1))) |
| 1119 | ))) | 1114 | ))) |
| 1120 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1115 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
| @@ -1153,13 +1148,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1153 | ediff-last-dir-B | 1148 | ediff-last-dir-B |
| 1154 | (file-name-directory f))) | 1149 | (file-name-directory f))) |
| 1155 | (progn | 1150 | (progn |
| 1156 | (setq file-name-history | 1151 | (add-to-history 'file-name-history |
| 1157 | (cons | 1152 | (ediff-abbreviate-file-name |
| 1158 | (ediff-abbreviate-file-name | 1153 | (expand-file-name |
| 1159 | (expand-file-name | 1154 | (file-name-nondirectory f) |
| 1160 | (file-name-nondirectory f) | 1155 | dir-B))) |
| 1161 | dir-B)) | ||
| 1162 | file-name-history)) | ||
| 1163 | (ediff-get-default-file-name f 1)))) | 1156 | (ediff-get-default-file-name f 1)))) |
| 1164 | (ediff-read-file-name "Ancestor file" | 1157 | (ediff-read-file-name "Ancestor file" |
| 1165 | (setq dir-ancestor | 1158 | (setq dir-ancestor |
| @@ -1167,12 +1160,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1167 | ediff-last-dir-ancestor | 1160 | ediff-last-dir-ancestor |
| 1168 | (file-name-directory ff))) | 1161 | (file-name-directory ff))) |
| 1169 | (progn | 1162 | (progn |
| 1170 | (setq file-name-history | 1163 | (add-to-history 'file-name-history |
| 1171 | (cons (ediff-abbreviate-file-name | 1164 | (ediff-abbreviate-file-name |
| 1172 | (expand-file-name | 1165 | (expand-file-name |
| 1173 | (file-name-nondirectory ff) | 1166 | (file-name-nondirectory ff) |
| 1174 | dir-ancestor)) | 1167 | dir-ancestor))) |
| 1175 | file-name-history)) | ||
| 1176 | (ediff-get-default-file-name ff 2))) | 1168 | (ediff-get-default-file-name ff 2))) |
| 1177 | ))) | 1169 | ))) |
| 1178 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1170 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 5a9787b5ca8..11d4d7fb2ba 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el | |||
| @@ -592,25 +592,28 @@ The return value of this function is a list of the read strings. | |||
| 592 | See the documentation for `completing-read' for details on the arguments: | 592 | See the documentation for `completing-read' for details on the arguments: |
| 593 | PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and | 593 | PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and |
| 594 | INHERIT-INPUT-METHOD." | 594 | INHERIT-INPUT-METHOD." |
| 595 | (let ((minibuffer-completion-table (function crm-collection-fn)) | 595 | (let* ((minibuffer-completion-table (function crm-collection-fn)) |
| 596 | (minibuffer-completion-predicate predicate) | 596 | (minibuffer-completion-predicate predicate) |
| 597 | ;; see completing_read in src/minibuf.c | 597 | ;; see completing_read in src/minibuf.c |
| 598 | (minibuffer-completion-confirm | 598 | (minibuffer-completion-confirm |
| 599 | (unless (eq require-match t) require-match)) | 599 | (unless (eq require-match t) require-match)) |
| 600 | (crm-completion-table table) | 600 | (crm-completion-table table) |
| 601 | crm-last-exact-completion | 601 | crm-last-exact-completion |
| 602 | crm-current-element | 602 | crm-current-element |
| 603 | crm-left-of-element | 603 | crm-left-of-element |
| 604 | crm-right-of-element | 604 | crm-right-of-element |
| 605 | crm-beginning-of-element | 605 | crm-beginning-of-element |
| 606 | crm-end-of-element | 606 | crm-end-of-element |
| 607 | (map (if require-match | 607 | (map (if require-match |
| 608 | crm-local-must-match-map | 608 | crm-local-must-match-map |
| 609 | crm-local-completion-map))) | 609 | crm-local-completion-map)) |
| 610 | (split-string (read-from-minibuffer | 610 | ;; If the user enters empty input, read-from-minibuffer returns |
| 611 | prompt initial-input map | 611 | ;; the empty string, not DEF. |
| 612 | nil hist def inherit-input-method) | 612 | (input (read-from-minibuffer |
| 613 | crm-separator))) | 613 | prompt initial-input map |
| 614 | nil hist def inherit-input-method))) | ||
| 615 | (and def (string-equal input "") (setq input def)) | ||
| 616 | (split-string input crm-separator))) | ||
| 614 | 617 | ||
| 615 | ;; testing and debugging | 618 | ;; testing and debugging |
| 616 | ;; (defun crm-init-test-environ () | 619 | ;; (defun crm-init-test-environ () |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index caac02c2ee3..5475ed530d3 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -139,7 +139,8 @@ For example, you could write | |||
| 139 | (setq body (list* lighter keymap body) lighter nil keymap nil)) | 139 | (setq body (list* lighter keymap body) lighter nil keymap nil)) |
| 140 | ((keywordp keymap) (push keymap body) (setq keymap nil))) | 140 | ((keywordp keymap) (push keymap body) (setq keymap nil))) |
| 141 | 141 | ||
| 142 | (let* ((mode-name (symbol-name mode)) | 142 | (let* ((last-message (current-message)) |
| 143 | (mode-name (symbol-name mode)) | ||
| 143 | (pretty-name (easy-mmode-pretty-mode-name mode lighter)) | 144 | (pretty-name (easy-mmode-pretty-mode-name mode lighter)) |
| 144 | (globalp nil) | 145 | (globalp nil) |
| 145 | (set nil) | 146 | (set nil) |
| @@ -236,7 +237,10 @@ With zero or negative ARG turn mode off. | |||
| 236 | (if (called-interactively-p) | 237 | (if (called-interactively-p) |
| 237 | (progn | 238 | (progn |
| 238 | ,(if globalp `(customize-mark-as-set ',mode)) | 239 | ,(if globalp `(customize-mark-as-set ',mode)) |
| 239 | (unless (current-message) | 240 | ;; Avoid overwriting a message shown by the body, |
| 241 | ;; but do overwrite previous messages. | ||
| 242 | (unless ,(and (current-message) | ||
| 243 | (not (equal last-message (current-message)))) | ||
| 240 | (message ,(format "%s %%sabled" pretty-name) | 244 | (message ,(format "%s %%sabled" pretty-name) |
| 241 | (if ,mode "en" "dis"))))) | 245 | (if ,mode "en" "dis"))))) |
| 242 | (force-mode-line-update) | 246 | (force-mode-line-update) |
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 085ae532a63..6ef14558a6a 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el | |||
| @@ -144,13 +144,6 @@ | |||
| 144 | 144 | ||
| 145 | \(fn NODE CHILD)") | 145 | \(fn NODE CHILD)") |
| 146 | 146 | ||
| 147 | (defun ewoc--dll-create () | ||
| 148 | "Create an empty doubly linked list." | ||
| 149 | (let ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST))) | ||
| 150 | (setf (ewoc--node-right dummy-node) dummy-node) | ||
| 151 | (setf (ewoc--node-left dummy-node) dummy-node) | ||
| 152 | dummy-node)) | ||
| 153 | |||
| 154 | (defun ewoc--node-enter-before (node elemnode) | 147 | (defun ewoc--node-enter-before (node elemnode) |
| 155 | "Insert ELEMNODE before NODE in a DLL." | 148 | "Insert ELEMNODE before NODE in a DLL." |
| 156 | (assert (and (null (ewoc--node-left elemnode)) (null (ewoc--node-right elemnode)))) | 149 | (assert (and (null (ewoc--node-left elemnode)) (null (ewoc--node-right elemnode)))) |
| @@ -159,14 +152,6 @@ | |||
| 159 | (setf (ewoc--node-right (ewoc--node-left node)) elemnode) | 152 | (setf (ewoc--node-right (ewoc--node-left node)) elemnode) |
| 160 | (setf (ewoc--node-left node) elemnode)) | 153 | (setf (ewoc--node-left node) elemnode)) |
| 161 | 154 | ||
| 162 | (defun ewoc--node-enter-first (dll node) | ||
| 163 | "Add a free floating NODE first in DLL." | ||
| 164 | (ewoc--node-enter-before (ewoc--node-right dll) node)) | ||
| 165 | |||
| 166 | (defun ewoc--node-enter-last (dll node) | ||
| 167 | "Add a free floating NODE last in DLL." | ||
| 168 | (ewoc--node-enter-before dll node)) | ||
| 169 | |||
| 170 | (defun ewoc--node-next (dll node) | 155 | (defun ewoc--node-next (dll node) |
| 171 | "Return the node after NODE, or nil if NODE is the last node." | 156 | "Return the node after NODE, or nil if NODE is the last node." |
| 172 | (unless (eq (ewoc--node-right node) dll) (ewoc--node-right node))) | 157 | (unless (eq (ewoc--node-right node) dll) (ewoc--node-right node))) |
| @@ -175,16 +160,6 @@ | |||
| 175 | "Return the node before NODE, or nil if NODE is the first node." | 160 | "Return the node before NODE, or nil if NODE is the first node." |
| 176 | (unless (eq (ewoc--node-left node) dll) (ewoc--node-left node))) | 161 | (unless (eq (ewoc--node-left node) dll) (ewoc--node-left node))) |
| 177 | 162 | ||
| 178 | (defun ewoc--node-delete (node) | ||
| 179 | "Unbind NODE from its doubly linked list and return it." | ||
| 180 | ;; This is a no-op when applied to the dummy node. This will return | ||
| 181 | ;; nil if applied to the dummy node since it always contains nil. | ||
| 182 | (setf (ewoc--node-right (ewoc--node-left node)) (ewoc--node-right node)) | ||
| 183 | (setf (ewoc--node-left (ewoc--node-right node)) (ewoc--node-left node)) | ||
| 184 | (setf (ewoc--node-left node) nil) | ||
| 185 | (setf (ewoc--node-right node) nil) | ||
| 186 | node) | ||
| 187 | |||
| 188 | (defun ewoc--node-nth (dll n) | 163 | (defun ewoc--node-nth (dll n) |
| 189 | "Return the Nth node from the doubly linked list DLL. | 164 | "Return the Nth node from the doubly linked list DLL. |
| 190 | N counts from zero. If DLL is not that long, nil is returned. | 165 | N counts from zero. If DLL is not that long, nil is returned. |
| @@ -221,16 +196,12 @@ dll bound to ewoc--dll, and VARLIST bound as in a let*. | |||
| 221 | dll will be bound when VARLIST is initialized, but the current | 196 | dll will be bound when VARLIST is initialized, but the current |
| 222 | buffer will *not* have been changed. | 197 | buffer will *not* have been changed. |
| 223 | Return value of last form in FORMS." | 198 | Return value of last form in FORMS." |
| 224 | (let ((old-buffer (make-symbol "old-buffer")) | 199 | (let ((hnd (make-symbol "ewoc"))) |
| 225 | (hnd (make-symbol "ewoc"))) | 200 | `(let* ((,hnd ,ewoc) |
| 226 | `(let* ((,old-buffer (current-buffer)) | ||
| 227 | (,hnd ,ewoc) | ||
| 228 | (dll (ewoc--dll ,hnd)) | 201 | (dll (ewoc--dll ,hnd)) |
| 229 | ,@varlist) | 202 | ,@varlist) |
| 230 | (set-buffer (ewoc--buffer ,hnd)) | 203 | (with-current-buffer (ewoc--buffer ,hnd) |
| 231 | (unwind-protect | 204 | ,@forms)))) |
| 232 | (progn ,@forms) | ||
| 233 | (set-buffer ,old-buffer))))) | ||
| 234 | 205 | ||
| 235 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) | 206 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) |
| 236 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) | 207 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) |
| @@ -261,26 +232,6 @@ start position and the element DATA." | |||
| 261 | (funcall pretty-printer data) | 232 | (funcall pretty-printer data) |
| 262 | (ewoc--node-create (copy-marker pos) data)))) | 233 | (ewoc--node-create (copy-marker pos) data)))) |
| 263 | 234 | ||
| 264 | |||
| 265 | (defun ewoc--delete-node-internal (ewoc node) | ||
| 266 | "Delete a data string from EWOC. | ||
| 267 | Can not be used on the footer. Return the wrapper that is deleted. | ||
| 268 | The start-marker in the wrapper is set to nil, so that it doesn't | ||
| 269 | consume any more resources." | ||
| 270 | (let ((dll (ewoc--dll ewoc)) | ||
| 271 | (inhibit-read-only t)) | ||
| 272 | ;; If we are about to delete the node pointed at by last-node, | ||
| 273 | ;; set last-node to nil. | ||
| 274 | (if (eq (ewoc--last-node ewoc) node) | ||
| 275 | (setf (ewoc--last-node ewoc) nil)) | ||
| 276 | |||
| 277 | (delete-region (ewoc--node-start-marker node) | ||
| 278 | (ewoc--node-start-marker (ewoc--node-next dll node))) | ||
| 279 | (set-marker (ewoc--node-start-marker node) nil) | ||
| 280 | ;; Delete the node, and return the wrapper. | ||
| 281 | (ewoc--node-delete node))) | ||
| 282 | |||
| 283 | |||
| 284 | (defun ewoc--refresh-node (pp node) | 235 | (defun ewoc--refresh-node (pp node) |
| 285 | "Redisplay the element represented by NODE using the pretty-printer PP." | 236 | "Redisplay the element represented by NODE using the pretty-printer PP." |
| 286 | (let ((inhibit-read-only t)) | 237 | (let ((inhibit-read-only t)) |
| @@ -313,19 +264,23 @@ Optional second argument HEADER is a string that will always be | |||
| 313 | present at the top of the ewoc. HEADER should end with a | 264 | present at the top of the ewoc. HEADER should end with a |
| 314 | newline. Optional third argument FOOTER is similar, and will | 265 | newline. Optional third argument FOOTER is similar, and will |
| 315 | be inserted at the bottom of the ewoc." | 266 | be inserted at the bottom of the ewoc." |
| 316 | (let ((new-ewoc | 267 | (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) |
| 317 | (ewoc--create (current-buffer) | 268 | (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) |
| 318 | pretty-printer nil nil (ewoc--dll-create))) | 269 | (setf (ewoc--node-left dummy-node) dummy-node) |
| 319 | (pos (point))) | 270 | dummy-node)) |
| 271 | (new-ewoc | ||
| 272 | (ewoc--create (current-buffer) | ||
| 273 | pretty-printer nil nil dll)) | ||
| 274 | (pos (point))) | ||
| 320 | (ewoc--set-buffer-bind-dll new-ewoc | 275 | (ewoc--set-buffer-bind-dll new-ewoc |
| 321 | ;; Set default values | 276 | ;; Set default values |
| 322 | (unless header (setq header "")) | 277 | (unless header (setq header "")) |
| 323 | (unless footer (setq footer "")) | 278 | (unless footer (setq footer "")) |
| 324 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) | 279 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) |
| 325 | (let ((foot (ewoc--create-node footer (lambda (x) (insert footer)) pos)) | 280 | (let ((foot (ewoc--create-node footer 'insert pos)) |
| 326 | (head (ewoc--create-node header (lambda (x) (insert header)) pos))) | 281 | (head (ewoc--create-node header 'insert pos))) |
| 327 | (ewoc--node-enter-first dll head) | 282 | (ewoc--node-enter-before (ewoc--node-right dll) head) |
| 328 | (ewoc--node-enter-last dll foot) | 283 | (ewoc--node-enter-before dll foot) |
| 329 | (setf (ewoc--header new-ewoc) head) | 284 | (setf (ewoc--header new-ewoc) head) |
| 330 | (setf (ewoc--footer new-ewoc) foot))) | 285 | (setf (ewoc--footer new-ewoc) foot))) |
| 331 | ;; Return the ewoc | 286 | ;; Return the ewoc |
| @@ -421,11 +376,27 @@ ARGS are given they will be passed to the PREDICATE." | |||
| 421 | (ewoc--set-buffer-bind-dll-let* ewoc | 376 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 422 | ((node (ewoc--node-nth dll 1)) | 377 | ((node (ewoc--node-nth dll 1)) |
| 423 | (footer (ewoc--footer ewoc)) | 378 | (footer (ewoc--footer ewoc)) |
| 424 | (next nil)) | 379 | (next nil) |
| 380 | (L nil) (R nil) | ||
| 381 | (inhibit-read-only t)) | ||
| 425 | (while (not (eq node footer)) | 382 | (while (not (eq node footer)) |
| 426 | (setq next (ewoc--node-next dll node)) | 383 | (setq next (ewoc--node-next dll node)) |
| 427 | (unless (apply predicate (ewoc--node-data node) args) | 384 | (unless (apply predicate (ewoc--node-data node) args) |
| 428 | (ewoc--delete-node-internal ewoc node)) | 385 | ;; If we are about to delete the node pointed at by last-node, |
| 386 | ;; set last-node to nil. | ||
| 387 | (if (eq (ewoc--last-node ewoc) node) | ||
| 388 | (setf (ewoc--last-node ewoc) nil)) | ||
| 389 | (delete-region (ewoc--node-start-marker node) | ||
| 390 | (ewoc--node-start-marker (ewoc--node-next dll node))) | ||
| 391 | (set-marker (ewoc--node-start-marker node) nil) | ||
| 392 | (setf L (ewoc--node-left node) | ||
| 393 | R (ewoc--node-right node) | ||
| 394 | ;; Link neighbors to each other. | ||
| 395 | (ewoc--node-right L) R | ||
| 396 | (ewoc--node-left R) L | ||
| 397 | ;; Forget neighbors. | ||
| 398 | (ewoc--node-left node) nil | ||
| 399 | (ewoc--node-right node) nil)) | ||
| 429 | (setq node next)))) | 400 | (setq node next)))) |
| 430 | 401 | ||
| 431 | (defun ewoc-locate (ewoc &optional pos guess) | 402 | (defun ewoc-locate (ewoc &optional pos guess) |
| @@ -601,8 +572,8 @@ Return nil if the buffer has been deleted." | |||
| 601 | "Set the HEADER and FOOTER of EWOC." | 572 | "Set the HEADER and FOOTER of EWOC." |
| 602 | (setf (ewoc--node-data (ewoc--header ewoc)) header) | 573 | (setf (ewoc--node-data (ewoc--header ewoc)) header) |
| 603 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) | 574 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) |
| 604 | (ewoc--refresh-node (lambda (x) (insert header)) (ewoc--header ewoc)) | 575 | (ewoc--refresh-node 'insert (ewoc--header ewoc)) |
| 605 | (ewoc--refresh-node (lambda (x) (insert footer)) (ewoc--footer ewoc))) | 576 | (ewoc--refresh-node 'insert (ewoc--footer ewoc))) |
| 606 | 577 | ||
| 607 | 578 | ||
| 608 | (provide 'ewoc) | 579 | (provide 'ewoc) |
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 827578f694c..5dc67e4ac21 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el | |||
| @@ -112,7 +112,7 @@ | |||
| 112 | (if (not (fboundp 'make-overlay)) | 112 | (if (not (fboundp 'make-overlay)) |
| 113 | (require 'overlay)) | 113 | (require 'overlay)) |
| 114 | 114 | ||
| 115 | ;; User costomizable variables | 115 | ;; User customizable variables |
| 116 | (defgroup re-builder nil | 116 | (defgroup re-builder nil |
| 117 | "Options for the RE Builder." | 117 | "Options for the RE Builder." |
| 118 | :group 'lisp | 118 | :group 'lisp |
| @@ -627,11 +627,9 @@ Return t if the (cooked) expression changed." | |||
| 627 | beg (match-end 0))) | 627 | beg (match-end 0))) |
| 628 | i)) | 628 | i)) |
| 629 | 629 | ||
| 630 | |||
| 631 | (defun reb-update-overlays (&optional subexp) | 630 | (defun reb-update-overlays (&optional subexp) |
| 632 | "Switch to `reb-target-buffer' and mark all matches of `reb-regexp'. | 631 | "Switch to `reb-target-buffer' and mark all matches of `reb-regexp'. |
| 633 | If SUBEXP is non-nil mark only the corresponding sub-expressions." | 632 | If SUBEXP is non-nil mark only the corresponding sub-expressions." |
| 634 | |||
| 635 | (let* ((re (reb-target-binding reb-regexp)) | 633 | (let* ((re (reb-target-binding reb-regexp)) |
| 636 | (subexps (reb-count-subexps re)) | 634 | (subexps (reb-count-subexps re)) |
| 637 | (matches 0) | 635 | (matches 0) |
| @@ -645,24 +643,35 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." | |||
| 645 | (or (not reb-auto-match-limit) | 643 | (or (not reb-auto-match-limit) |
| 646 | (< matches reb-auto-match-limit))) | 644 | (< matches reb-auto-match-limit))) |
| 647 | (if (= 0 (length (match-string 0))) | 645 | (if (= 0 (length (match-string 0))) |
| 648 | (error "Empty regular expression!")) | 646 | (error "Empty regular expression!")) |
| 649 | (let ((i 0)) | 647 | (let ((i 0) |
| 648 | suffix max-suffix) | ||
| 650 | (setq matches (1+ matches)) | 649 | (setq matches (1+ matches)) |
| 651 | (while (<= i subexps) | 650 | (while (<= i subexps) |
| 652 | (if (and (or (not subexp) (= subexp i)) | 651 | (if (and (or (not subexp) (= subexp i)) |
| 653 | (match-beginning i)) | 652 | (match-beginning i)) |
| 654 | (let ((overlay (make-overlay (match-beginning i) | 653 | (let ((overlay (make-overlay (match-beginning i) |
| 655 | (match-end i))) | 654 | (match-end i))) |
| 656 | (face-name (format "reb-match-%d" i))) | 655 | ;; When we have exceeded the number of provided faces, |
| 657 | (if (not firstmatch) | 656 | ;; cycle thru them where `max-suffix' denotes the maximum |
| 658 | (setq firstmatch (match-data))) | 657 | ;; suffix for `reb-match-*' that has been defined and |
| 658 | ;; `suffix' the suffix calculated for the current match. | ||
| 659 | (face | ||
| 660 | (cond | ||
| 661 | (max-suffix | ||
| 662 | (if (= suffix max-suffix) | ||
| 663 | (setq suffix 1) | ||
| 664 | (setq suffix (1+ suffix))) | ||
| 665 | (intern-soft (format "reb-match-%d" suffix))) | ||
| 666 | ((intern-soft (format "reb-match-%d" i))) | ||
| 667 | ((setq max-suffix (1- i)) | ||
| 668 | (setq suffix 1) | ||
| 669 | ;; `reb-match-1' must exist. | ||
| 670 | 'reb-match-1)))) | ||
| 671 | (unless firstmatch (setq firstmatch (match-data))) | ||
| 659 | (setq reb-overlays (cons overlay reb-overlays) | 672 | (setq reb-overlays (cons overlay reb-overlays) |
| 660 | submatches (1+ submatches)) | 673 | submatches (1+ submatches)) |
| 661 | (overlay-put | 674 | (overlay-put overlay 'face face) |
| 662 | overlay 'face | ||
| 663 | (or (intern-soft face-name) | ||
| 664 | (error "Too many subexpressions - face `%s' not defined" | ||
| 665 | face-name ))) | ||
| 666 | (overlay-put overlay 'priority i))) | 675 | (overlay-put overlay 'priority i))) |
| 667 | (setq i (1+ i)))))) | 676 | (setq i (1+ i)))))) |
| 668 | (let ((count (if subexp submatches matches))) | 677 | (let ((count (if subexp submatches matches))) |
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 1484c38a403..695d7877b38 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el | |||
| @@ -27,9 +27,9 @@ | |||
| 27 | 27 | ||
| 28 | ;; The main exported function is `syntax-ppss'. You might also need | 28 | ;; The main exported function is `syntax-ppss'. You might also need |
| 29 | ;; to call `syntax-ppss-flush-cache' or to add it to | 29 | ;; to call `syntax-ppss-flush-cache' or to add it to |
| 30 | ;; after-change-functions'(although this is automatically done by | 30 | ;; before-change-functions'(although this is automatically done by |
| 31 | ;; syntax-ppss when needed, but that might fail if syntax-ppss is | 31 | ;; syntax-ppss when needed, but that might fail if syntax-ppss is |
| 32 | ;; called in a context where after-change-functions is temporarily | 32 | ;; called in a context where before-change-functions is temporarily |
| 33 | ;; let-bound to nil). | 33 | ;; let-bound to nil). |
| 34 | 34 | ||
| 35 | ;;; Todo: | 35 | ;;; Todo: |
| @@ -94,10 +94,9 @@ point (where the PPSS is equivalent to nil).") | |||
| 94 | (setq syntax-ppss-last nil) | 94 | (setq syntax-ppss-last nil) |
| 95 | (setcar syntax-ppss-last nil))) | 95 | (setcar syntax-ppss-last nil))) |
| 96 | ;; Unregister if there's no cache left. Sadly this doesn't work | 96 | ;; Unregister if there's no cache left. Sadly this doesn't work |
| 97 | ;; because `after-change-functions' is temporarily bound to nil here. | 97 | ;; because `before-change-functions' is temporarily bound to nil here. |
| 98 | ;; (unless syntax-ppss-cache | 98 | ;; (unless syntax-ppss-cache |
| 99 | ;; (remove-hook 'after-change-functions | 99 | ;; (remove-hook 'before-change-functions 'syntax-ppss-flush-cache t)) |
| 100 | ;; 'syntax-ppss-after-change-function t)) | ||
| 101 | ) | 100 | ) |
| 102 | 101 | ||
| 103 | (defvar syntax-ppss-stats | 102 | (defvar syntax-ppss-stats |
| @@ -148,7 +147,7 @@ Point is at POS when this function returns." | |||
| 148 | ;; too far from `pos', we could try to use other positions | 147 | ;; too far from `pos', we could try to use other positions |
| 149 | ;; in (nth 9 old-ppss), but that doesn't seem to happen in | 148 | ;; in (nth 9 old-ppss), but that doesn't seem to happen in |
| 150 | ;; practice and it would complicate this code (and the | 149 | ;; practice and it would complicate this code (and the |
| 151 | ;; after-change-function code even more). But maybe it | 150 | ;; before-change-function code even more). But maybe it |
| 152 | ;; would be useful in "degenerate" cases such as when the | 151 | ;; would be useful in "degenerate" cases such as when the |
| 153 | ;; whole file is wrapped in a set of parenthesis. | 152 | ;; whole file is wrapped in a set of parenthesis. |
| 154 | (setq pt-min (or (car (nth 9 old-ppss)) | 153 | (setq pt-min (or (car (nth 9 old-ppss)) |
| @@ -176,10 +175,10 @@ Point is at POS when this function returns." | |||
| 176 | (setq cache (cdr cache))) | 175 | (setq cache (cdr cache))) |
| 177 | (if cache (setq pt-min (caar cache) ppss (cdar cache))) | 176 | (if cache (setq pt-min (caar cache) ppss (cdar cache))) |
| 178 | 177 | ||
| 179 | ;; Setup the after-change function if necessary. | 178 | ;; Setup the before-change function if necessary. |
| 180 | (unless (or syntax-ppss-cache syntax-ppss-last) | 179 | (unless (or syntax-ppss-cache syntax-ppss-last) |
| 181 | (add-hook 'after-change-functions | 180 | (add-hook 'before-change-functions |
| 182 | 'syntax-ppss-flush-cache nil t)) | 181 | 'syntax-ppss-flush-cache t t)) |
| 183 | 182 | ||
| 184 | ;; Use the best of OLD-POS and CACHE. | 183 | ;; Use the best of OLD-POS and CACHE. |
| 185 | (if (or (not old-pos) (< old-pos pt-min)) | 184 | (if (or (not old-pos) (< old-pos pt-min)) |
diff --git a/lisp/env.el b/lisp/env.el index 1b6c038cbea..5a3de0ac712 100644 --- a/lisp/env.el +++ b/lisp/env.el | |||
| @@ -117,7 +117,7 @@ a side-effect." | |||
| 117 | (let* ((var (read-envvar-name "Set environment variable: " nil)) | 117 | (let* ((var (read-envvar-name "Set environment variable: " nil)) |
| 118 | (value (getenv var))) | 118 | (value (getenv var))) |
| 119 | (when value | 119 | (when value |
| 120 | (push value setenv-history)) | 120 | (add-to-history 'setenv-history value)) |
| 121 | ;; Here finally we specify the args to give call setenv with. | 121 | ;; Here finally we specify the args to give call setenv with. |
| 122 | (list var | 122 | (list var |
| 123 | (read-from-minibuffer (format "Set %s to value: " var) | 123 | (read-from-minibuffer (format "Set %s to value: " var) |
diff --git a/lisp/files.el b/lisp/files.el index 76167eb27cf..29cd3038500 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2349,31 +2349,29 @@ asking you for confirmation." | |||
| 2349 | ;; For variables defined in the C source code the declaration should go here: | 2349 | ;; For variables defined in the C source code the declaration should go here: |
| 2350 | 2350 | ||
| 2351 | ;; FIXME: Some variables should be moved according to the rules above. | 2351 | ;; FIXME: Some variables should be moved according to the rules above. |
| 2352 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) | 2352 | (mapc (lambda (pair) |
| 2353 | (eval | 2353 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2354 | `(mapc (lambda (pair) | 2354 | '((byte-compile-dynamic . booleanp) |
| 2355 | (put (car pair) 'safe-local-variable (cdr pair))) | 2355 | (byte-compile-dynamic-docstrings . booleanp) |
| 2356 | '((byte-compile-dynamic . t) | 2356 | (byte-compile-warnings . booleanp) |
| 2357 | (byte-compile-dynamic-docstrings . t) | 2357 | (c-basic-offset . integerp) |
| 2358 | (byte-compile-warnings . t) | 2358 | (c-file-style . stringp) |
| 2359 | (c-basic-offset . integerp) | 2359 | (c-indent-level . integerp) |
| 2360 | (c-file-style . stringp) | 2360 | (comment-column . integerp) |
| 2361 | (c-indent-level . integerp) | 2361 | (compile-command . string-or-null-p) |
| 2362 | (comment-column . integerp) | 2362 | (find-file-visit-truename . booleanp) |
| 2363 | (compile-command . string-or-null-p) | 2363 | (fill-column . integerp) |
| 2364 | (find-file-visit-truename . t) | 2364 | (fill-prefix . string-or-null-p) |
| 2365 | (fill-column . integerp) | 2365 | (indent-tabs-mode . booleanp) ;; C source code |
| 2366 | (fill-prefix . string-or-null-p) | 2366 | (kept-old-versions . integerp) |
| 2367 | (indent-tabs-mode . t) | 2367 | (kept-new-versions . integerp) |
| 2368 | (kept-old-versions . integerp) | 2368 | (left-margin . integerp) |
| 2369 | (kept-new-versions . integerp) | 2369 | (no-byte-compile . booleanp) |
| 2370 | (left-margin . t) | 2370 | (no-update-autoloads . booleanp) |
| 2371 | (no-byte-compile . t) | 2371 | (outline-regexp . string-or-null-p) |
| 2372 | (no-update-autoloads . t) | 2372 | (tab-width . integerp) ;; C source code |
| 2373 | (outline-regexp . string-or-null-p) | 2373 | (truncate-lines . booleanp) ;; C source code |
| 2374 | (tab-width . integerp) ;; C source code | 2374 | (version-control . symbolp))) |
| 2375 | (truncate-lines . t) ;; C source code | ||
| 2376 | (version-control . t))))) | ||
| 2377 | 2375 | ||
| 2378 | (put 'c-set-style 'safe-local-eval-function t) | 2376 | (put 'c-set-style 'safe-local-eval-function t) |
| 2379 | 2377 | ||
| @@ -3931,7 +3929,7 @@ user. In such situations, one has to be careful with potentially | |||
| 3931 | time consuming operations. | 3929 | time consuming operations. |
| 3932 | 3930 | ||
| 3933 | For more information on how this variable is used by Auto Revert mode, | 3931 | For more information on how this variable is used by Auto Revert mode, |
| 3934 | see Info node `(emacs-xtra)Supporting additional buffers'.") | 3932 | see Info node `(emacs)Supporting additional buffers'.") |
| 3935 | 3933 | ||
| 3936 | (defvar before-revert-hook nil | 3934 | (defvar before-revert-hook nil |
| 3937 | "Normal hook for `revert-buffer' to run before reverting. | 3935 | "Normal hook for `revert-buffer' to run before reverting. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 83f7b542139..b16a0cc1096 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1975,17 +1975,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 1975 | ;; | 1975 | ;; |
| 1976 | ;; (regexp-opt | 1976 | ;; (regexp-opt |
| 1977 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1977 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1978 | ;; "ifndef" "include" "line" "pragma" "undef")) | 1978 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")) |
| 1979 | ;; | 1979 | ;; |
| 1980 | (defconst cpp-font-lock-keywords-source-directives | 1980 | (defconst cpp-font-lock-keywords-source-directives |
| 1981 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef" | 1981 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" |
| 1982 | "Regular expressoin used in `cpp-font-lock-keywords'.") | 1982 | "Regular expressoin used in `cpp-font-lock-keywords'.") |
| 1983 | 1983 | ||
| 1984 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: | 1984 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: |
| 1985 | ;; | 1985 | ;; |
| 1986 | ;; (regexp-opt-depth (regexp-opt | 1986 | ;; (regexp-opt-depth (regexp-opt |
| 1987 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1987 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1988 | ;; "ifndef" "include" "line" "pragma" "undef"))) | 1988 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))) |
| 1989 | ;; | 1989 | ;; |
| 1990 | (defconst cpp-font-lock-keywords-source-depth 0 | 1990 | (defconst cpp-font-lock-keywords-source-depth 0 |
| 1991 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. | 1991 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. |
| @@ -1997,7 +1997,7 @@ Used in `cpp-font-lock-keywords'.") | |||
| 1997 | (list | 1997 | (list |
| 1998 | ;; | 1998 | ;; |
| 1999 | ;; Fontify error directives. | 1999 | ;; Fontify error directives. |
| 2000 | '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) | 2000 | '("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) |
| 2001 | ;; | 2001 | ;; |
| 2002 | ;; Fontify filenames in #include <...> preprocessor directives as strings. | 2002 | ;; Fontify filenames in #include <...> preprocessor directives as strings. |
| 2003 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" | 2003 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cecc180f522..7f0f248c7cf 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2006-05-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment. | ||
| 4 | (mm-copy-to-buffer): Use with-current-buffer. | ||
| 5 | (mm-display-part): Simplify. | ||
| 6 | (mm-inlinable-p): Add optional arg `type'. | ||
| 7 | |||
| 8 | * gnus-art.el (gnus-mime-view-part-as-type): Add optional PRED | ||
| 9 | argument. | ||
| 10 | (gnus-mime-view-part-externally, gnus-mime-view-part-internally): | ||
| 11 | Try harder to show the attachment internally or externally using | ||
| 12 | gnus-mime-view-part-as-type. | ||
| 13 | |||
| 14 | 2006-05-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 15 | |||
| 16 | * gnus-art.el (gnus-mime-view-part-as-type-internal): Try to fetch | ||
| 17 | `filename' from Content-Disposition if Content-Type doesn't | ||
| 18 | provide `name'. | ||
| 19 | (gnus-mime-view-part-as-type): Set default instead of | ||
| 20 | initial-input. | ||
| 21 | |||
| 1 | 2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> | 22 | 2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 23 | ||
| 3 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made | 24 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7e3b843d500..208103f805d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4317,21 +4317,29 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4317 | 4317 | ||
| 4318 | (defun gnus-mime-view-part-as-type-internal () | 4318 | (defun gnus-mime-view-part-as-type-internal () |
| 4319 | (gnus-article-check-buffer) | 4319 | (gnus-article-check-buffer) |
| 4320 | (let* ((name (mail-content-type-get | 4320 | (let* ((handle (get-text-property (point) 'gnus-data)) |
| 4321 | (mm-handle-type (get-text-property (point) 'gnus-data)) | 4321 | (name (or |
| 4322 | 'name)) | 4322 | ;; Content-Type: foo/bar; name=... |
| 4323 | (mail-content-type-get (mm-handle-type handle) 'name) | ||
| 4324 | ;; Content-Disposition: attachment; filename=... | ||
| 4325 | (cdr (assq 'filename (cdr (mm-handle-disposition handle)))))) | ||
| 4323 | (def-type (and name (mm-default-file-encoding name)))) | 4326 | (def-type (and name (mm-default-file-encoding name)))) |
| 4324 | (and def-type (cons def-type 0)))) | 4327 | (and def-type (cons def-type 0)))) |
| 4325 | 4328 | ||
| 4326 | (defun gnus-mime-view-part-as-type (&optional mime-type) | 4329 | (defun gnus-mime-view-part-as-type (&optional mime-type pred) |
| 4327 | "Choose a MIME media type, and view the part as such." | 4330 | "Choose a MIME media type, and view the part as such. |
| 4331 | If non-nil, PRED is a predicate to use during completion to limit the | ||
| 4332 | available media-types." | ||
| 4328 | (interactive) | 4333 | (interactive) |
| 4329 | (unless mime-type | 4334 | (unless mime-type |
| 4330 | (setq mime-type (completing-read | 4335 | (setq mime-type |
| 4331 | "View as MIME type: " | 4336 | (let ((default (gnus-mime-view-part-as-type-internal))) |
| 4332 | (mapcar #'list (mailcap-mime-types)) | 4337 | (completing-read |
| 4333 | nil nil | 4338 | (format "View as MIME type (default %s): " |
| 4334 | (gnus-mime-view-part-as-type-internal)))) | 4339 | (car default)) |
| 4340 | (mapcar #'list (mailcap-mime-types)) | ||
| 4341 | pred nil nil nil | ||
| 4342 | (car default))))) | ||
| 4335 | (gnus-article-check-buffer) | 4343 | (gnus-article-check-buffer) |
| 4336 | (let ((handle (get-text-property (point) 'gnus-data))) | 4344 | (let ((handle (get-text-property (point) 'gnus-data))) |
| 4337 | (when handle | 4345 | (when handle |
| @@ -4511,12 +4519,18 @@ specified charset." | |||
| 4511 | (mm-inlined-types nil) | 4519 | (mm-inlined-types nil) |
| 4512 | (mail-parse-charset gnus-newsgroup-charset) | 4520 | (mail-parse-charset gnus-newsgroup-charset) |
| 4513 | (mail-parse-ignored-charsets | 4521 | (mail-parse-ignored-charsets |
| 4514 | (save-excursion (set-buffer gnus-summary-buffer) | 4522 | (with-current-buffer gnus-summary-buffer |
| 4515 | gnus-newsgroup-ignored-charsets))) | 4523 | gnus-newsgroup-ignored-charsets)) |
| 4516 | (when handle | 4524 | (type (mm-handle-media-type handle)) |
| 4517 | (if (mm-handle-undisplayer handle) | 4525 | (method (mailcap-mime-info type)) |
| 4518 | (mm-remove-part handle) | 4526 | (mm-enable-external t)) |
| 4519 | (mm-display-part handle))))) | 4527 | (if (not (stringp method)) |
| 4528 | (gnus-mime-view-part-as-type | ||
| 4529 | nil (lambda (type) (stringp (mailcap-mime-info type)))) | ||
| 4530 | (when handle | ||
| 4531 | (if (mm-handle-undisplayer handle) | ||
| 4532 | (mm-remove-part handle) | ||
| 4533 | (mm-display-part handle)))))) | ||
| 4520 | 4534 | ||
| 4521 | (defun gnus-mime-view-part-internally (&optional handle) | 4535 | (defun gnus-mime-view-part-internally (&optional handle) |
| 4522 | "View the MIME part under point with an internal viewer. | 4536 | "View the MIME part under point with an internal viewer. |
| @@ -4528,13 +4542,16 @@ If no internal viewer is available, use an external viewer." | |||
| 4528 | (mm-inline-large-images t) | 4542 | (mm-inline-large-images t) |
| 4529 | (mail-parse-charset gnus-newsgroup-charset) | 4543 | (mail-parse-charset gnus-newsgroup-charset) |
| 4530 | (mail-parse-ignored-charsets | 4544 | (mail-parse-ignored-charsets |
| 4531 | (save-excursion (set-buffer gnus-summary-buffer) | 4545 | (with-current-buffer gnus-summary-buffer |
| 4532 | gnus-newsgroup-ignored-charsets)) | 4546 | gnus-newsgroup-ignored-charsets)) |
| 4533 | (inhibit-read-only t)) | 4547 | (inhibit-read-only t)) |
| 4534 | (when handle | 4548 | (if (not (mm-inlinable-p handle)) |
| 4535 | (if (mm-handle-undisplayer handle) | 4549 | (gnus-mime-view-part-as-type |
| 4536 | (mm-remove-part handle) | 4550 | nil (lambda (type) (mm-inlinable-p handle type))) |
| 4537 | (mm-display-part handle))))) | 4551 | (when handle |
| 4552 | (if (mm-handle-undisplayer handle) | ||
| 4553 | (mm-remove-part handle) | ||
| 4554 | (mm-display-part handle)))))) | ||
| 4538 | 4555 | ||
| 4539 | (defun gnus-mime-action-on-part (&optional action) | 4556 | (defun gnus-mime-action-on-part (&optional action) |
| 4540 | "Do something with the MIME attachment at \(point\)." | 4557 | "Do something with the MIME attachment at \(point\)." |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index b79e081f0e1..c5fd5d3c258 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -562,7 +562,7 @@ Postpone undisplaying of viewers for types in | |||
| 562 | description) | 562 | description) |
| 563 | (setq type (split-string (car ctl) "/")) | 563 | (setq type (split-string (car ctl) "/")) |
| 564 | (setq subtype (cadr type) | 564 | (setq subtype (cadr type) |
| 565 | type (pop type)) | 565 | type (car type)) |
| 566 | (setq | 566 | (setq |
| 567 | result | 567 | result |
| 568 | (cond | 568 | (cond |
| @@ -641,16 +641,15 @@ Postpone undisplaying of viewers for types in | |||
| 641 | 641 | ||
| 642 | (defun mm-copy-to-buffer () | 642 | (defun mm-copy-to-buffer () |
| 643 | "Copy the contents of the current buffer to a fresh buffer." | 643 | "Copy the contents of the current buffer to a fresh buffer." |
| 644 | (save-excursion | ||
| 645 | (let ((obuf (current-buffer)) | 644 | (let ((obuf (current-buffer)) |
| 646 | beg) | 645 | beg) |
| 647 | (goto-char (point-min)) | 646 | (goto-char (point-min)) |
| 648 | (search-forward-regexp "^\n" nil t) | 647 | (search-forward-regexp "^\n" nil t) |
| 649 | (setq beg (point)) | 648 | (setq beg (point)) |
| 650 | (set-buffer | 649 | (with-current-buffer |
| 651 | ;; Preserve the data's unibyteness (for url-insert-file-contents). | 650 | ;; Preserve the data's unibyteness (for url-insert-file-contents). |
| 652 | (let ((default-enable-multibyte-characters (mm-multibyte-p))) | 651 | (let ((default-enable-multibyte-characters (mm-multibyte-p))) |
| 653 | (generate-new-buffer " *mm*"))) | 652 | (generate-new-buffer " *mm*")) |
| 654 | (insert-buffer-substring obuf beg) | 653 | (insert-buffer-substring obuf beg) |
| 655 | (current-buffer)))) | 654 | (current-buffer)))) |
| 656 | 655 | ||
| @@ -701,7 +700,8 @@ external if displayed external." | |||
| 701 | (forward-line 1) | 700 | (forward-line 1) |
| 702 | (mm-insert-inline handle (mm-get-part handle)) | 701 | (mm-insert-inline handle (mm-get-part handle)) |
| 703 | 'inline) | 702 | 'inline) |
| 704 | (if (and method ;; If nil, we always use "save". | 703 | (setq external |
| 704 | (and method ;; If nil, we always use "save". | ||
| 705 | (stringp method) ;; 'mailcap-save-binary-file | 705 | (stringp method) ;; 'mailcap-save-binary-file |
| 706 | (or (eq mm-enable-external t) | 706 | (or (eq mm-enable-external t) |
| 707 | (and (eq mm-enable-external 'ask) | 707 | (and (eq mm-enable-external 'ask) |
| @@ -714,9 +714,7 @@ external if displayed external." | |||
| 714 | (concat | 714 | (concat |
| 715 | " \"" (format method filename) "\"") | 715 | " \"" (format method filename) "\"") |
| 716 | "") | 716 | "") |
| 717 | "? "))))) | 717 | "? ")))))) |
| 718 | (setq external t) | ||
| 719 | (setq external nil)) | ||
| 720 | (if external | 718 | (if external |
| 721 | (mm-display-external | 719 | (mm-display-external |
| 722 | handle (or method 'mailcap-save-binary-file)) | 720 | handle (or method 'mailcap-save-binary-file)) |
| @@ -1019,10 +1017,12 @@ external if displayed external." | |||
| 1019 | methods nil))) | 1017 | methods nil))) |
| 1020 | result)) | 1018 | result)) |
| 1021 | 1019 | ||
| 1022 | (defun mm-inlinable-p (handle) | 1020 | (defun mm-inlinable-p (handle &optional type) |
| 1023 | "Say whether HANDLE can be displayed inline." | 1021 | "Say whether HANDLE can be displayed inline. |
| 1022 | TYPE is the mime-type of the object; it defaults to the one given | ||
| 1023 | in HANDLE." | ||
| 1024 | (unless type (setq type (mm-handle-media-type handle))) | ||
| 1024 | (let ((alist mm-inline-media-tests) | 1025 | (let ((alist mm-inline-media-tests) |
| 1025 | (type (mm-handle-media-type handle)) | ||
| 1026 | test) | 1026 | test) |
| 1027 | (while alist | 1027 | (while alist |
| 1028 | (when (string-match (caar alist) type) | 1028 | (when (string-match (caar alist) type) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 0a84f9b0c82..6264d2e56b5 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -325,9 +325,7 @@ directory, like `default-directory'." | |||
| 325 | :group 'ibuffer) | 325 | :group 'ibuffer) |
| 326 | 326 | ||
| 327 | (defcustom ibuffer-compressed-file-name-regexp | 327 | (defcustom ibuffer-compressed-file-name-regexp |
| 328 | (concat "\\.\\(" | 328 | "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$" |
| 329 | (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z")) | ||
| 330 | "\\)$") | ||
| 331 | "Regexp to match compressed file names." | 329 | "Regexp to match compressed file names." |
| 332 | :type 'regexp | 330 | :type 'regexp |
| 333 | :group 'ibuffer) | 331 | :group 'ibuffer) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index c372880a5e6..356f6e9fbb1 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -826,21 +826,11 @@ NOPUSH is t and EDIT is t." | |||
| 826 | 826 | ||
| 827 | (defun isearch-update-ring (string &optional regexp) | 827 | (defun isearch-update-ring (string &optional regexp) |
| 828 | "Add STRING to the beginning of the search ring. | 828 | "Add STRING to the beginning of the search ring. |
| 829 | REGEXP says which ring to use." | 829 | REGEXP if non-nil says use the regexp search ring." |
| 830 | (if regexp | 830 | (add-to-history |
| 831 | (if (or (null regexp-search-ring) | 831 | (if regexp 'regexp-search-ring 'search-ring) |
| 832 | (not (string= string (car regexp-search-ring)))) | 832 | string |
| 833 | (progn | 833 | (if regexp regexp-search-ring-max search-ring-max))) |
| 834 | (push string regexp-search-ring) | ||
| 835 | (if (> (length regexp-search-ring) regexp-search-ring-max) | ||
| 836 | (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) | ||
| 837 | nil)))) | ||
| 838 | (if (or (null search-ring) | ||
| 839 | (not (string= string (car search-ring)))) | ||
| 840 | (progn | ||
| 841 | (push string search-ring) | ||
| 842 | (if (> (length search-ring) search-ring-max) | ||
| 843 | (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) | ||
| 844 | 834 | ||
| 845 | ;; Switching buffers should first terminate isearch-mode. | 835 | ;; Switching buffers should first terminate isearch-mode. |
| 846 | ;; ;; For Emacs 19, the frame switch event is handled. | 836 | ;; ;; For Emacs 19, the frame switch event is handled. |
diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 4566d4c32c3..d3db76fcc8a 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el | |||
| @@ -349,10 +349,8 @@ and `kmacro-counter-format'.") | |||
| 349 | (defun kmacro-push-ring (&optional elt) | 349 | (defun kmacro-push-ring (&optional elt) |
| 350 | "Push ELT or current macro onto `kmacro-ring'." | 350 | "Push ELT or current macro onto `kmacro-ring'." |
| 351 | (when (setq elt (or elt (kmacro-ring-head))) | 351 | (when (setq elt (or elt (kmacro-ring-head))) |
| 352 | (let ((len (length kmacro-ring))) | 352 | (let ((history-delete-duplicates nil)) |
| 353 | (setq kmacro-ring (cons elt kmacro-ring)) | 353 | (add-to-history 'kmacro-ring elt kmacro-ring-max)))) |
| 354 | (if (>= len kmacro-ring-max) | ||
| 355 | (setcdr (nthcdr len kmacro-ring) nil))))) | ||
| 356 | 354 | ||
| 357 | 355 | ||
| 358 | (defun kmacro-split-ring-element (elt) | 356 | (defun kmacro-split-ring-element (elt) |
| @@ -377,11 +375,6 @@ Non-nil arg RAW means just return raw first element." | |||
| 377 | (kmacro-pop-ring1 raw))) | 375 | (kmacro-pop-ring1 raw))) |
| 378 | 376 | ||
| 379 | 377 | ||
| 380 | (defun kmacro-ring-length () | ||
| 381 | "Return length of macro ring, including pseudo head." | ||
| 382 | (+ (if last-kbd-macro 1 0) (length kmacro-ring))) | ||
| 383 | |||
| 384 | |||
| 385 | (defun kmacro-ring-empty-p (&optional none) | 378 | (defun kmacro-ring-empty-p (&optional none) |
| 386 | "Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty. | 379 | "Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty. |
| 387 | Check only `last-kbd-macro' if optional arg NONE is non-nil." | 380 | Check only `last-kbd-macro' if optional arg NONE is non-nil." |
| @@ -577,13 +570,8 @@ Use \\[kmacro-bind-to-key] to bind it to a key sequence." | |||
| 577 | (let ((append (and arg (listp arg)))) | 570 | (let ((append (and arg (listp arg)))) |
| 578 | (unless append | 571 | (unless append |
| 579 | (if last-kbd-macro | 572 | (if last-kbd-macro |
| 580 | (let ((len (length kmacro-ring))) | 573 | (kmacro-push-ring |
| 581 | (setq kmacro-ring | 574 | (list last-kbd-macro kmacro-counter kmacro-counter-format-start))) |
| 582 | (cons | ||
| 583 | (list last-kbd-macro kmacro-counter kmacro-counter-format-start) | ||
| 584 | kmacro-ring)) | ||
| 585 | (if (>= len kmacro-ring-max) | ||
| 586 | (setcdr (nthcdr len kmacro-ring) nil)))) | ||
| 587 | (setq kmacro-counter (or (if arg (prefix-numeric-value arg)) | 575 | (setq kmacro-counter (or (if arg (prefix-numeric-value arg)) |
| 588 | kmacro-initial-counter-value | 576 | kmacro-initial-counter-value |
| 589 | 0) | 577 | 0) |
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 6e2bc5c8eb5..da95c93bb08 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -6978,7 +6978,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 6978 | may have to reset some subdirectory switches after a `dired-undo'. | 6978 | may have to reset some subdirectory switches after a `dired-undo'. |
| 6979 | You can reset all subdirectory switches to the default using | 6979 | You can reset all subdirectory switches to the default using |
| 6980 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 6980 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 6981 | See Info node `(emacs-xtra)Subdir switches' for more details. | 6981 | See Info node `(emacs)Subdir switches' for more details. |
| 6982 | 6982 | ||
| 6983 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) | 6983 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) |
| 6984 | 6984 | ||
| @@ -7116,7 +7116,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 7116 | may have to reset some subdirectory switches after a `dired-undo'. | 7116 | may have to reset some subdirectory switches after a `dired-undo'. |
| 7117 | You can reset all subdirectory switches to the default using | 7117 | You can reset all subdirectory switches to the default using |
| 7118 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 7118 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 7119 | See Info node `(emacs-xtra)Subdir switches' for more details. | 7119 | See Info node `(emacs)Subdir switches' for more details. |
| 7120 | 7120 | ||
| 7121 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) | 7121 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) |
| 7122 | 7122 | ||
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index f7846394638..94632f8c38d 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 8.0. | ||
| 4 | |||
| 5 | * mh-e.el (Version, mh-version): Update for release 8.0. | ||
| 6 | |||
| 7 | 2006-05-05 Bill Wohler <wohler@newt.com> | ||
| 8 | |||
| 9 | * mh-e.el: Update commentary. | ||
| 10 | |||
| 1 | 2006-04-28 Bill Wohler <wohler@newt.com> | 11 | 2006-04-28 Bill Wohler <wohler@newt.com> |
| 2 | 12 | ||
| 3 | Release MH-E version 7.95. | 13 | Release MH-E version 7.95. |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 88b8c5bac09..28fff81e93b 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | ;; Author: Bill Wohler <wohler@newt.com> | 7 | ;; Author: Bill Wohler <wohler@newt.com> |
| 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| 9 | ;; Version: 7.95 | 9 | ;; Version: 8.0 |
| 10 | ;; Keywords: mail | 10 | ;; Keywords: mail |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -28,6 +28,20 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Commentary: | 29 | ;;; Commentary: |
| 30 | 30 | ||
| 31 | ;; MH-E is an Emacs interface to the MH mail system. | ||
| 32 | |||
| 33 | ;; MH-E is supported by GNU Emacs 21 and 22, as well as XEmacs 21 | ||
| 34 | ;; (except for versions 21.5.9-21.5.16). It is compatible with MH | ||
| 35 | ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils | ||
| 36 | ;; 0.4 and higher. | ||
| 37 | |||
| 38 | ;; MH (Message Handler) is a powerful mail reader. See | ||
| 39 | ;; http://rand-mh.sourceforge.net/. | ||
| 40 | |||
| 41 | ;; N.B. MH must have been compiled with the MHE compiler flag or several | ||
| 42 | ;; features necessary for MH-E will be missing from MH commands, specifically | ||
| 43 | ;; the -build switch to repl and forw. | ||
| 44 | |||
| 31 | ;; How to use: | 45 | ;; How to use: |
| 32 | ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands. | 46 | ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands. |
| 33 | ;; C-u M-x mh-rmail to visit any folder. | 47 | ;; C-u M-x mh-rmail to visit any folder. |
| @@ -44,23 +58,6 @@ | |||
| 44 | ;; If you want to customize MH-E before explicitly loading it, add this: | 58 | ;; If you want to customize MH-E before explicitly loading it, add this: |
| 45 | ;; (require 'mh-cus-load) | 59 | ;; (require 'mh-cus-load) |
| 46 | 60 | ||
| 47 | ;; MH (Message Handler) is a powerful mail reader. | ||
| 48 | |||
| 49 | ;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu | ||
| 50 | ;; (send to mh-users-request to be added). See the monthly Frequently Asked | ||
| 51 | ;; Questions posting there for information on getting MH and MH-E: | ||
| 52 | ;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html | ||
| 53 | |||
| 54 | ;; N.B. MH must have been compiled with the MHE compiler flag or several | ||
| 55 | ;; features necessary for MH-E will be missing from MH commands, specifically | ||
| 56 | ;; the -build switch to repl and forw. | ||
| 57 | |||
| 58 | ;; MH-E is an Emacs interface to the MH mail system. | ||
| 59 | |||
| 60 | ;; MH-E is supported in GNU Emacs 21 and 22 as well as XEmacs 21 | ||
| 61 | ;; (except for versions 21.5.9-21.5.16), with MH 6.8.4 on, nmh 1.0.4 | ||
| 62 | ;; on, and GNU mailutils 0.4 on. | ||
| 63 | |||
| 64 | ;; Mailing Lists: | 61 | ;; Mailing Lists: |
| 65 | ;; mh-e-users@lists.sourceforge.net | 62 | ;; mh-e-users@lists.sourceforge.net |
| 66 | ;; mh-e-announce@lists.sourceforge.net | 63 | ;; mh-e-announce@lists.sourceforge.net |
| @@ -136,7 +133,7 @@ | |||
| 136 | ;; Try to keep variables local to a single file. Provide accessors if | 133 | ;; Try to keep variables local to a single file. Provide accessors if |
| 137 | ;; variables are shared. Use this section as a last resort. | 134 | ;; variables are shared. Use this section as a last resort. |
| 138 | 135 | ||
| 139 | (defconst mh-version "7.95" "Version number of MH-E.") | 136 | (defconst mh-version "8.0" "Version number of MH-E.") |
| 140 | 137 | ||
| 141 | ;; Variants | 138 | ;; Variants |
| 142 | 139 | ||
diff --git a/lisp/msb.el b/lisp/msb.el index 95cbfc85df4..61ddce5dae0 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -473,6 +473,11 @@ selects that window. | |||
| 473 | See the function `mouse-select-buffer' and the variable | 473 | See the function `mouse-select-buffer' and the variable |
| 474 | `msb-menu-cond' for more information about how the menus are split." | 474 | `msb-menu-cond' for more information about how the menus are split." |
| 475 | (interactive "e") | 475 | (interactive "e") |
| 476 | ;; If EVENT is a down-event, read and discard the | ||
| 477 | ;; corresponding up-event. | ||
| 478 | (and (eventp event) | ||
| 479 | (memq 'down (event-modifiers event)) | ||
| 480 | (read-event)) | ||
| 476 | (let ((old-window (selected-window)) | 481 | (let ((old-window (selected-window)) |
| 477 | (window (posn-window (event-start event)))) | 482 | (window (posn-window (event-start event)))) |
| 478 | (unless (framep window) (select-window window)) | 483 | (unless (framep window) (select-window window)) |
diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 662b992b343..b61971c7ea5 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el | |||
| @@ -204,8 +204,25 @@ This should only be bound to mouse buttons 4 and 5." | |||
| 204 | (setq amt (* amt (event-click-count event)))) | 204 | (setq amt (* amt (event-click-count event)))) |
| 205 | (unwind-protect | 205 | (unwind-protect |
| 206 | (let ((button (mwheel-event-button event))) | 206 | (let ((button (mwheel-event-button event))) |
| 207 | (cond ((eq button mouse-wheel-down-event) (scroll-down amt)) | 207 | (cond ((eq button mouse-wheel-down-event) |
| 208 | ((eq button mouse-wheel-up-event) (scroll-up amt)) | 208 | (condition-case nil (scroll-down amt) |
| 209 | ;; Make sure we do indeed scroll to the beginning of | ||
| 210 | ;; the buffer. | ||
| 211 | (beginning-of-buffer | ||
| 212 | (unwind-protect | ||
| 213 | (scroll-down) | ||
| 214 | ;; If the first scroll succeeded, then some scrolling | ||
| 215 | ;; is possible: keep scrolling til the beginning but | ||
| 216 | ;; do not signal an error. For some reason, we have | ||
| 217 | ;; to do it even if the first scroll signalled an | ||
| 218 | ;; error, because otherwise the window is recentered | ||
| 219 | ;; for a reason that escapes me. This problem seems | ||
| 220 | ;; to only affect scroll-down. --Stef | ||
| 221 | (set-window-start (selected-window) (point-min)))))) | ||
| 222 | ((eq button mouse-wheel-up-event) | ||
| 223 | (condition-case nil (scroll-up amt) | ||
| 224 | ;; Make sure we do indeed scroll to the end of the buffer. | ||
| 225 | (end-of-buffer (while t (scroll-up))))) | ||
| 209 | (t (error "Bad binding in mwheel-scroll")))) | 226 | (t (error "Bad binding in mwheel-scroll")))) |
| 210 | (if curwin (select-window curwin)))) | 227 | (if curwin (select-window curwin)))) |
| 211 | (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time) | 228 | (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6e166aa2393..2ebc4d0b45e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4331,7 +4331,7 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4331 | "Add tramp file name handlers to `file-name-handler-alist'." | 4331 | "Add tramp file name handlers to `file-name-handler-alist'." |
| 4332 | (add-to-list 'file-name-handler-alist | 4332 | (add-to-list 'file-name-handler-alist |
| 4333 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) | 4333 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) |
| 4334 | (when partial-completion-mode | 4334 | (when (or partial-completion-mode (featurep 'ido)) |
| 4335 | (add-to-list 'file-name-handler-alist | 4335 | (add-to-list 'file-name-handler-alist |
| 4336 | (cons tramp-completion-file-name-regexp | 4336 | (cons tramp-completion-file-name-regexp |
| 4337 | 'tramp-completion-file-name-handler)) | 4337 | 'tramp-completion-file-name-handler)) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index a5163319fbf..a20f11e0aa2 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -114,8 +114,6 @@ Set to \"main\" at start if gdb-show-main is t.") | |||
| 114 | Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) | 114 | Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) |
| 115 | where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame | 115 | where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame |
| 116 | address for root variables.") | 116 | address for root variables.") |
| 117 | (defvar gdb-force-update t | ||
| 118 | "Non-nil means that view of watch expressions will be updated in the speedbar.") | ||
| 119 | (defvar gdb-main-file nil "Source file from which program execution begins.") | 117 | (defvar gdb-main-file nil "Source file from which program execution begins.") |
| 120 | (defvar gdb-overlay-arrow-position nil) | 118 | (defvar gdb-overlay-arrow-position nil) |
| 121 | (defvar gdb-server-prefix nil) | 119 | (defvar gdb-server-prefix nil) |
| @@ -527,7 +525,6 @@ With arg, use separate IO iff arg is positive." | |||
| 527 | gdb-current-language nil | 525 | gdb-current-language nil |
| 528 | gdb-frame-number nil | 526 | gdb-frame-number nil |
| 529 | gdb-var-list nil | 527 | gdb-var-list nil |
| 530 | gdb-force-update t | ||
| 531 | gdb-main-file nil | 528 | gdb-main-file nil |
| 532 | gdb-first-post-prompt t | 529 | gdb-first-post-prompt t |
| 533 | gdb-prompting nil | 530 | gdb-prompting nil |
| @@ -690,10 +687,14 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 690 | (if event (posn-set-point (event-end event))) | 687 | (if event (posn-set-point (event-end event))) |
| 691 | (require 'tooltip) | 688 | (require 'tooltip) |
| 692 | (save-selected-window | 689 | (save-selected-window |
| 693 | (let ((expr (if arg | 690 | (let ((expr |
| 694 | (completing-read "Name of variable: " | 691 | (if arg |
| 695 | 'gud-gdb-complete-command) | 692 | (completing-read "Name of variable: " |
| 696 | (tooltip-identifier-from-point (point))))) | 693 | 'gud-gdb-complete-command) |
| 694 | (if (and transient-mark-mode mark-active) | ||
| 695 | (buffer-substring (region-beginning) (region-end)) | ||
| 696 | (tooltip-identifier-from-point (point)))))) | ||
| 697 | (speedbar 1) | ||
| 697 | (catch 'already-watched | 698 | (catch 'already-watched |
| 698 | (dolist (var gdb-var-list) | 699 | (dolist (var gdb-var-list) |
| 699 | (unless (string-match "\\." (car var)) | 700 | (unless (string-match "\\." (car var)) |
| @@ -725,7 +726,6 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 725 | (match-string 3) | 726 | (match-string 3) |
| 726 | nil nil gdb-frame-address))) | 727 | nil nil gdb-frame-address))) |
| 727 | (push var gdb-var-list) | 728 | (push var gdb-var-list) |
| 728 | (speedbar 1) | ||
| 729 | (unless (string-equal | 729 | (unless (string-equal |
| 730 | speedbar-initial-expansion-list-name "GUD") | 730 | speedbar-initial-expansion-list-name "GUD") |
| 731 | (speedbar-change-initial-expansion-list "GUD")) | 731 | (speedbar-change-initial-expansion-list "GUD")) |
| @@ -741,13 +741,26 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 741 | (message-box "Watching expressions requires gdb 6.0 onwards") | 741 | (message-box "Watching expressions requires gdb 6.0 onwards") |
| 742 | (message-box "No symbol \"%s\" in current context." expr)))) | 742 | (message-box "No symbol \"%s\" in current context." expr)))) |
| 743 | 743 | ||
| 744 | (defun gdb-speedbar-update () | ||
| 745 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 746 | ;; Dummy command to update speedbar even when idle. | ||
| 747 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) | ||
| 748 | ;; Keep gdb-pending-triggers non-nil till end. | ||
| 749 | (push 'gdb-speedbar-timer gdb-pending-triggers))) | ||
| 750 | |||
| 751 | (defun gdb-speedbar-timer-fn () | ||
| 752 | (setq gdb-pending-triggers | ||
| 753 | (delq 'gdb-speedbar-timer gdb-pending-triggers)) | ||
| 754 | (speedbar-timer-fn)) | ||
| 755 | |||
| 744 | (defun gdb-var-evaluate-expression-handler (varnum changed) | 756 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| 745 | (goto-char (point-min)) | 757 | (goto-char (point-min)) |
| 746 | (re-search-forward ".*value=\\(\".*\"\\)" nil t) | 758 | (re-search-forward ".*value=\\(\".*\"\\)" nil t) |
| 747 | (let ((var (assoc varnum gdb-var-list))) | 759 | (let ((var (assoc varnum gdb-var-list))) |
| 748 | (when var | 760 | (when var |
| 749 | (if changed (setcar (nthcdr 5 var) 'changed)) | 761 | (if changed (setcar (nthcdr 5 var) 'changed)) |
| 750 | (setcar (nthcdr 4 var) (read (match-string 1)))))) | 762 | (setcar (nthcdr 4 var) (read (match-string 1))))) |
| 763 | (gdb-speedbar-update)) | ||
| 751 | 764 | ||
| 752 | (defun gdb-var-list-children (varnum) | 765 | (defun gdb-var-list-children (varnum) |
| 753 | (gdb-enqueue-input | 766 | (gdb-enqueue-input |
| @@ -811,21 +824,7 @@ type_changed=\".*?\".*?}") | |||
| 811 | varnum "\"\n") | 824 | varnum "\"\n") |
| 812 | `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))))) | 825 | `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))))) |
| 813 | (setq gdb-pending-triggers | 826 | (setq gdb-pending-triggers |
| 814 | (delq 'gdb-var-update gdb-pending-triggers)) | 827 | (delq 'gdb-var-update gdb-pending-triggers))) |
| 815 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 816 | ;; Dummy command to update speedbar at right time. | ||
| 817 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh)) | ||
| 818 | ;; Keep gdb-pending-triggers non-nil till end. | ||
| 819 | (push 'gdb-speedbar-refresh gdb-pending-triggers))) | ||
| 820 | |||
| 821 | (defun gdb-speedbar-refresh () | ||
| 822 | (setq gdb-pending-triggers | ||
| 823 | (delq 'gdb-speedbar-refresh gdb-pending-triggers)) | ||
| 824 | (with-current-buffer gud-comint-buffer | ||
| 825 | (let ((speedbar-verbosity-level 0) | ||
| 826 | (speedbar-shown-directories nil)) | ||
| 827 | (save-excursion | ||
| 828 | (speedbar-refresh))))) | ||
| 829 | 828 | ||
| 830 | (defun gdb-var-delete () | 829 | (defun gdb-var-delete () |
| 831 | "Delete watch expression at point from the speedbar." | 830 | "Delete watch expression at point from the speedbar." |
| @@ -1378,7 +1377,6 @@ happens to be appropriate." | |||
| 1378 | ;; FIXME: with GDB-6 on Darwin, this might very well work. | 1377 | ;; FIXME: with GDB-6 on Darwin, this might very well work. |
| 1379 | ;; Only needed/used with speedbar/watch expressions. | 1378 | ;; Only needed/used with speedbar/watch expressions. |
| 1380 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 1379 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 1381 | (setq gdb-force-update t) | ||
| 1382 | (if (string-equal gdb-version "pre-6.4") | 1380 | (if (string-equal gdb-version "pre-6.4") |
| 1383 | (gdb-var-update) | 1381 | (gdb-var-update) |
| 1384 | (gdb-var-update-1))))) | 1382 | (gdb-var-update-1))))) |
| @@ -1913,7 +1911,7 @@ static char *magick[] = { | |||
| 1913 | (let* ((buffer (find-file-noselect | 1911 | (let* ((buffer (find-file-noselect |
| 1914 | (if (file-exists-p file) file | 1912 | (if (file-exists-p file) file |
| 1915 | (cdr (assoc bptno gdb-location-alist))))) | 1913 | (cdr (assoc bptno gdb-location-alist))))) |
| 1916 | (window (unless (gdb-display-source-buffer buffer) | 1914 | (window (or (gdb-display-source-buffer buffer) |
| 1917 | (display-buffer buffer)))) | 1915 | (display-buffer buffer)))) |
| 1918 | (setq gdb-source-window window) | 1916 | (setq gdb-source-window window) |
| 1919 | (with-current-buffer buffer | 1917 | (with-current-buffer buffer |
| @@ -2691,7 +2689,7 @@ corresponding to the mode line clicked." | |||
| 2691 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer | 2689 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer |
| 2692 | :enable gdb-use-separate-io-buffer)) | 2690 | :enable gdb-use-separate-io-buffer)) |
| 2693 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 2691 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 2694 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) | 2692 | (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer)) |
| 2695 | (define-key menu [breakpoints] | 2693 | (define-key menu [breakpoints] |
| 2696 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) | 2694 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) |
| 2697 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) | 2695 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) |
| @@ -2755,6 +2753,7 @@ corresponding to the mode line clicked." | |||
| 2755 | ;; Put buffer list in window if we | 2753 | ;; Put buffer list in window if we |
| 2756 | ;; can't find a source file. | 2754 | ;; can't find a source file. |
| 2757 | (list-buffers-noselect)))) | 2755 | (list-buffers-noselect)))) |
| 2756 | (setq gdb-source-window (selected-window)) | ||
| 2758 | (when gdb-use-separate-io-buffer | 2757 | (when gdb-use-separate-io-buffer |
| 2759 | (split-window-horizontally) | 2758 | (split-window-horizontally) |
| 2760 | (other-window 1) | 2759 | (other-window 1) |
| @@ -2782,6 +2781,7 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 2782 | (if gud-last-last-frame | 2781 | (if gud-last-last-frame |
| 2783 | (gud-find-file (car gud-last-last-frame)) | 2782 | (gud-find-file (car gud-last-last-frame)) |
| 2784 | (gud-find-file gdb-main-file))) | 2783 | (gud-find-file gdb-main-file))) |
| 2784 | (setq gdb-source-window (selected-window)) | ||
| 2785 | (other-window 1)))) | 2785 | (other-window 1)))) |
| 2786 | 2786 | ||
| 2787 | (defun gdb-reset () | 2787 | (defun gdb-reset () |
| @@ -2803,8 +2803,6 @@ Kills the gdb buffers, and resets variables and the source buffers." | |||
| 2803 | (setq overlay-arrow-variable-list | 2803 | (setq overlay-arrow-variable-list |
| 2804 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) | 2804 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) |
| 2805 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) | 2805 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) |
| 2806 | (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 2807 | (speedbar-refresh)) | ||
| 2808 | (setq gud-running nil) | 2806 | (setq gud-running nil) |
| 2809 | (setq gdb-active-process nil) | 2807 | (setq gdb-active-process nil) |
| 2810 | (setq gdb-var-list nil) | 2808 | (setq gdb-var-list nil) |
| @@ -3163,7 +3161,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 3163 | (if (and (match-string 3) gud-overlay-arrow-position) | 3161 | (if (and (match-string 3) gud-overlay-arrow-position) |
| 3164 | (let ((buffer (marker-buffer gud-overlay-arrow-position)) | 3162 | (let ((buffer (marker-buffer gud-overlay-arrow-position)) |
| 3165 | (position (marker-position gud-overlay-arrow-position))) | 3163 | (position (marker-position gud-overlay-arrow-position))) |
| 3166 | (when (and buffer (string-equal (buffer-name buffer) (match-string 3))) | 3164 | (when (and buffer |
| 3165 | (string-equal (buffer-name buffer) | ||
| 3166 | (file-name-nondirectory (match-string 3)))) | ||
| 3167 | (with-current-buffer buffer | 3167 | (with-current-buffer buffer |
| 3168 | (setq fringe-indicator-alist | 3168 | (setq fringe-indicator-alist |
| 3169 | (if (string-equal gdb-frame-number "0") | 3169 | (if (string-equal gdb-frame-number "0") |
| @@ -3230,7 +3230,8 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | |||
| 3230 | (throw 'child-already-watched nil)) | 3230 | (throw 'child-already-watched nil)) |
| 3231 | (push varchild var-list)))) | 3231 | (push varchild var-list)))) |
| 3232 | (push var var-list))) | 3232 | (push var var-list))) |
| 3233 | (setq gdb-var-list (nreverse var-list))))) | 3233 | (setq gdb-var-list (nreverse var-list)))) |
| 3234 | (gdb-speedbar-update)) | ||
| 3234 | 3235 | ||
| 3235 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. | 3236 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. |
| 3236 | (defun gdb-var-update-1 () | 3237 | (defun gdb-var-update-1 () |
| @@ -3263,11 +3264,7 @@ in_scope=\"\\(.*?\\)\".*?}") | |||
| 3263 | (read (match-string 2))))))) | 3264 | (read (match-string 2))))))) |
| 3264 | (setq gdb-pending-triggers | 3265 | (setq gdb-pending-triggers |
| 3265 | (delq 'gdb-var-update gdb-pending-triggers)) | 3266 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 3266 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 3267 | (gdb-speedbar-update)) |
| 3267 | ;; dummy command to update speedbar at right time | ||
| 3268 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh)) | ||
| 3269 | ;; keep gdb-pending-triggers non-nil till end | ||
| 3270 | (push 'gdb-speedbar-refresh gdb-pending-triggers))) | ||
| 3271 | 3268 | ||
| 3272 | ;; Registers buffer. | 3269 | ;; Registers buffer. |
| 3273 | ;; | 3270 | ;; |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 0aba9d42b84..410a973d1b4 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -584,7 +584,7 @@ substitution string. Note dynamic scoping of variables.") | |||
| 584 | (setq command | 584 | (setq command |
| 585 | (replace-match | 585 | (replace-match |
| 586 | (or (if (symbolp (cdr kw)) | 586 | (or (if (symbolp (cdr kw)) |
| 587 | (eval (cdr kw)) | 587 | (symbol-value (cdr kw)) |
| 588 | (save-match-data (eval (cdr kw)))) | 588 | (save-match-data (eval (cdr kw)))) |
| 589 | "") | 589 | "") |
| 590 | t t command)))))) | 590 | t t command)))))) |
| @@ -639,9 +639,9 @@ The search is limited to file names matching shell pattern FILES. | |||
| 639 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 639 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 640 | entering `ch' is equivalent to `*.[ch]'. | 640 | entering `ch' is equivalent to `*.[ch]'. |
| 641 | 641 | ||
| 642 | With \\[universal-argument] prefix, allow user to edit the constructed | 642 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 643 | shell command line before it is executed. | 643 | before it is executed. |
| 644 | With two \\[universal-argument] prefixes, edit and run grep shell command. | 644 | With two \\[universal-argument] prefixes, directly edit and run `grep-command'. |
| 645 | 645 | ||
| 646 | Collect output in a buffer. While grep runs asynchronously, you | 646 | Collect output in a buffer. While grep runs asynchronously, you |
| 647 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] | 647 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] |
| @@ -676,7 +676,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]." | |||
| 676 | (setq command | 676 | (setq command |
| 677 | (read-from-minibuffer "Confirm: " | 677 | (read-from-minibuffer "Confirm: " |
| 678 | command nil nil 'grep-history)) | 678 | command nil nil 'grep-history)) |
| 679 | (push command grep-history)))) | 679 | (add-to-history 'grep-history command)))) |
| 680 | (when command | 680 | (when command |
| 681 | ;; Setting process-setup-function makes exit-message-function work | 681 | ;; Setting process-setup-function makes exit-message-function work |
| 682 | ;; even when async processes aren't supported. | 682 | ;; even when async processes aren't supported. |
| @@ -687,14 +687,14 @@ This command shares argument histories with \\[rgrep] and \\[grep]." | |||
| 687 | 687 | ||
| 688 | ;;;###autoload | 688 | ;;;###autoload |
| 689 | (defun rgrep (regexp &optional files dir) | 689 | (defun rgrep (regexp &optional files dir) |
| 690 | "Recusively grep for REGEXP in FILES in directory tree rooted at DIR. | 690 | "Recursively grep for REGEXP in FILES in directory tree rooted at DIR. |
| 691 | The search is limited to file names matching shell pattern FILES. | 691 | The search is limited to file names matching shell pattern FILES. |
| 692 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 692 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 693 | entering `ch' is equivalent to `*.[ch]'. | 693 | entering `ch' is equivalent to `*.[ch]'. |
| 694 | 694 | ||
| 695 | With \\[universal-argument] prefix, allow user to edit the constructed | 695 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 696 | shell command line before it is executed. | 696 | before it is executed. |
| 697 | With two \\[universal-argument] prefixes, edit and run grep-find shell command. | 697 | With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. |
| 698 | 698 | ||
| 699 | Collect output in a buffer. While find runs asynchronously, you | 699 | Collect output in a buffer. While find runs asynchronously, you |
| 700 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] | 700 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] |
| @@ -721,16 +721,16 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 721 | (if (null files) | 721 | (if (null files) |
| 722 | (if (not (string= regexp grep-find-command)) | 722 | (if (not (string= regexp grep-find-command)) |
| 723 | (compilation-start regexp 'grep-mode)) | 723 | (compilation-start regexp 'grep-mode)) |
| 724 | (let* ((default-directory (file-name-as-directory (expand-file-name dir))) | 724 | (setq dir (file-name-as-directory (expand-file-name dir))) |
| 725 | (command (grep-expand-template | 725 | (let ((command (grep-expand-template |
| 726 | grep-find-template | 726 | grep-find-template |
| 727 | regexp | 727 | regexp |
| 728 | (concat "\\( -name " | 728 | (concat "\\( -name " |
| 729 | (mapconcat #'shell-quote-argument | 729 | (mapconcat #'shell-quote-argument |
| 730 | (split-string files) | 730 | (split-string files) |
| 731 | " -o -name ") | 731 | " -o -name ") |
| 732 | " \\)") | 732 | " \\)") |
| 733 | default-directory | 733 | dir |
| 734 | (and grep-find-ignored-directories | 734 | (and grep-find-ignored-directories |
| 735 | (concat "\\( -path '*/" | 735 | (concat "\\( -path '*/" |
| 736 | (mapconcat #'identity | 736 | (mapconcat #'identity |
| @@ -742,8 +742,12 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 742 | (setq command | 742 | (setq command |
| 743 | (read-from-minibuffer "Confirm: " | 743 | (read-from-minibuffer "Confirm: " |
| 744 | command nil nil 'grep-find-history)) | 744 | command nil nil 'grep-find-history)) |
| 745 | (push command grep-find-history)) | 745 | (add-to-history 'grep-find-history command)) |
| 746 | (compilation-start command 'grep-mode)))))) | 746 | (let ((default-directory dir)) |
| 747 | (compilation-start command 'grep-mode)) | ||
| 748 | ;; Set default-directory if we started rgrep in the *grep* buffer. | ||
| 749 | (if (eq next-error-last-buffer (current-buffer)) | ||
| 750 | (setq default-directory dir))))))) | ||
| 747 | 751 | ||
| 748 | 752 | ||
| 749 | (provide 'grep) | 753 | (provide 'grep) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 11259aa3965..5be88668353 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -49,7 +49,6 @@ | |||
| 49 | (defvar gdb-macro-info) | 49 | (defvar gdb-macro-info) |
| 50 | (defvar gdb-server-prefix) | 50 | (defvar gdb-server-prefix) |
| 51 | (defvar gdb-show-changed-values) | 51 | (defvar gdb-show-changed-values) |
| 52 | (defvar gdb-force-update) | ||
| 53 | (defvar gdb-var-list) | 52 | (defvar gdb-var-list) |
| 54 | (defvar gdb-speedbar-auto-raise) | 53 | (defvar gdb-speedbar-auto-raise) |
| 55 | (defvar tool-bar-map) | 54 | (defvar tool-bar-map) |
| @@ -442,37 +441,55 @@ required by the caller." | |||
| 442 | (buffer-name gud-comint-buffer)) | 441 | (buffer-name gud-comint-buffer)) |
| 443 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) | 442 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) |
| 444 | (window (get-buffer-window (current-buffer) 0)) | 443 | (window (get-buffer-window (current-buffer) 0)) |
| 444 | (start (window-start window)) | ||
| 445 | (p (window-point window))) | 445 | (p (window-point window))) |
| 446 | (cond | 446 | (cond |
| 447 | ((memq minor-mode '(gdbmi gdba)) | 447 | ((memq minor-mode '(gdbmi gdba)) |
| 448 | (when (or gdb-force-update | 448 | (erase-buffer) |
| 449 | (not (save-excursion | 449 | (insert "Watch Expressions:\n") |
| 450 | (goto-char (point-min)) | 450 | (if gdb-speedbar-auto-raise |
| 451 | (looking-at "Watch Expressions:")))) | 451 | (raise-frame speedbar-frame)) |
| 452 | (erase-buffer) | 452 | (let ((var-list gdb-var-list) parent) |
| 453 | (insert "Watch Expressions:\n") | 453 | (while var-list |
| 454 | (if gdb-speedbar-auto-raise | 454 | (let* (char (depth 0) (start 0) (var (car var-list)) |
| 455 | (raise-frame speedbar-frame)) | 455 | (varnum (car var)) (expr (nth 1 var)) |
| 456 | (let ((var-list gdb-var-list) parent) | 456 | (type (nth 3 var)) (value (nth 4 var)) |
| 457 | (while var-list | 457 | (status (nth 5 var))) |
| 458 | (let* (char (depth 0) (start 0) (var (car var-list)) | 458 | (put-text-property |
| 459 | (varnum (car var)) (expr (nth 1 var)) | 459 | 0 (length expr) 'face font-lock-variable-name-face expr) |
| 460 | (type (nth 3 var)) (value (nth 4 var)) | 460 | (put-text-property |
| 461 | (status (nth 5 var))) | 461 | 0 (length type) 'face font-lock-type-face type) |
| 462 | (put-text-property | 462 | (while (string-match "\\." varnum start) |
| 463 | 0 (length expr) 'face font-lock-variable-name-face expr) | 463 | (setq depth (1+ depth) |
| 464 | (put-text-property | 464 | start (1+ (match-beginning 0)))) |
| 465 | 0 (length type) 'face font-lock-type-face type) | 465 | (if (eq depth 0) (setq parent nil)) |
| 466 | (while (string-match "\\." varnum start) | 466 | (if (or (equal (nth 2 var) "0") |
| 467 | (setq depth (1+ depth) | 467 | (and (equal (nth 2 var) "1") |
| 468 | start (1+ (match-beginning 0)))) | 468 | (string-match "char \\*$" type))) |
| 469 | (if (eq depth 0) (setq parent nil)) | 469 | (speedbar-make-tag-line |
| 470 | (if (or (equal (nth 2 var) "0") | 470 | 'bracket ?? nil nil |
| 471 | (and (equal (nth 2 var) "1") | 471 | (concat expr "\t" value) |
| 472 | (string-match "char \\*$" type))) | 472 | (if (or parent (eq status 'out-of-scope)) |
| 473 | nil 'gdb-edit-value) | ||
| 474 | nil | ||
| 475 | (if gdb-show-changed-values | ||
| 476 | (or parent (case status | ||
| 477 | (changed 'font-lock-warning-face) | ||
| 478 | (out-of-scope 'shadow) | ||
| 479 | (t t))) | ||
| 480 | t) | ||
| 481 | depth) | ||
| 482 | (if (eq status 'out-of-scope) (setq parent 'shadow)) | ||
| 483 | (if (and (nth 1 var-list) | ||
| 484 | (string-match (concat varnum "\\.") | ||
| 485 | (car (nth 1 var-list)))) | ||
| 486 | (setq char ?-) | ||
| 487 | (setq char ?+)) | ||
| 488 | (if (string-match "\\*$" type) | ||
| 473 | (speedbar-make-tag-line | 489 | (speedbar-make-tag-line |
| 474 | 'bracket ?? nil nil | 490 | 'bracket char |
| 475 | (concat expr "\t" value) | 491 | 'gdb-speedbar-expand-node varnum |
| 492 | (concat expr "\t" type "\t" value) | ||
| 476 | (if (or parent (eq status 'out-of-scope)) | 493 | (if (or parent (eq status 'out-of-scope)) |
| 477 | nil 'gdb-edit-value) | 494 | nil 'gdb-edit-value) |
| 478 | nil | 495 | nil |
| @@ -483,37 +500,15 @@ required by the caller." | |||
| 483 | (t t))) | 500 | (t t))) |
| 484 | t) | 501 | t) |
| 485 | depth) | 502 | depth) |
| 486 | (if (eq status 'out-of-scope) (setq parent 'shadow)) | 503 | (speedbar-make-tag-line |
| 487 | (if (and (nth 1 var-list) | 504 | 'bracket char |
| 488 | (string-match (concat varnum "\\.") | 505 | 'gdb-speedbar-expand-node varnum |
| 489 | (car (nth 1 var-list)))) | 506 | (concat expr "\t" type) |
| 490 | (setq char ?-) | 507 | nil nil |
| 491 | (setq char ?+)) | 508 | (if (and (or parent status) gdb-show-changed-values) |
| 492 | (if (string-match "\\*$" type) | 509 | 'shadow t) |
| 493 | (speedbar-make-tag-line | 510 | depth)))) |
| 494 | 'bracket char | 511 | (setq var-list (cdr var-list))))) |
| 495 | 'gdb-speedbar-expand-node varnum | ||
| 496 | (concat expr "\t" type "\t" value) | ||
| 497 | (if (or parent (eq status 'out-of-scope)) | ||
| 498 | nil 'gdb-edit-value) | ||
| 499 | nil | ||
| 500 | (if gdb-show-changed-values | ||
| 501 | (or parent (case status | ||
| 502 | (changed 'font-lock-warning-face) | ||
| 503 | (out-of-scope 'shadow) | ||
| 504 | (t t))) | ||
| 505 | t) | ||
| 506 | depth) | ||
| 507 | (speedbar-make-tag-line | ||
| 508 | 'bracket char | ||
| 509 | 'gdb-speedbar-expand-node varnum | ||
| 510 | (concat expr "\t" type) | ||
| 511 | nil nil | ||
| 512 | (if (and (or parent status) gdb-show-changed-values) | ||
| 513 | 'shadow t) | ||
| 514 | depth)))) | ||
| 515 | (setq var-list (cdr var-list)))) | ||
| 516 | (setq gdb-force-update nil))) | ||
| 517 | (t (unless (and (save-excursion | 512 | (t (unless (and (save-excursion |
| 518 | (goto-char (point-min)) | 513 | (goto-char (point-min)) |
| 519 | (looking-at "Current Stack:")) | 514 | (looking-at "Current Stack:")) |
| @@ -544,6 +539,7 @@ required by the caller." | |||
| 544 | (t (error "Should never be here"))) | 539 | (t (error "Should never be here"))) |
| 545 | frame t)))) | 540 | frame t)))) |
| 546 | (setq gud-last-speedbar-stackframe gud-last-last-frame)))) | 541 | (setq gud-last-speedbar-stackframe gud-last-last-frame)))) |
| 542 | (set-window-start window start) | ||
| 547 | (set-window-point window p)))) | 543 | (set-window-point window p)))) |
| 548 | 544 | ||
| 549 | 545 | ||
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 410875f2006..bdc8161c80f 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -1471,11 +1471,7 @@ Otherwise just move the line. Move down unless UP is non-nil." | |||
| 1471 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) | 1471 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) |
| 1472 | (if (and idlwave-shell-arrows-do-history | 1472 | (if (and idlwave-shell-arrows-do-history |
| 1473 | (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) | 1473 | (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) |
| 1474 | (progn | 1474 | (comint-previous-input arg) |
| 1475 | ;;(goto-char proc-pos) | ||
| 1476 | (goto-char (point-max)) | ||
| 1477 | ;;(and (not (eolp)) (kill-line nil)) | ||
| 1478 | (comint-previous-input arg)) | ||
| 1479 | (previous-line arg)))) | 1475 | (previous-line arg)))) |
| 1480 | 1476 | ||
| 1481 | (defun idlwave-shell-up-or-history (&optional arg) | 1477 | (defun idlwave-shell-up-or-history (&optional arg) |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 7a778766821..2f26c90ac21 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -1208,8 +1208,8 @@ As a user, you should not set this to t.") | |||
| 1208 | ;; Treats continuation lines, works only during whole buffer | 1208 | ;; Treats continuation lines, works only during whole buffer |
| 1209 | ;; fontification. Slow, use it only in fancy fontification. | 1209 | ;; fontification. Slow, use it only in fancy fontification. |
| 1210 | (keyword-parameters | 1210 | (keyword-parameters |
| 1211 | '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\\(\n[ \t]*;.*\\)*\n[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" | 1211 | '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" |
| 1212 | (5 font-lock-reference-face))) | 1212 | (6 font-lock-reference-face))) |
| 1213 | 1213 | ||
| 1214 | ;; System variables start with a bang. | 1214 | ;; System variables start with a bang. |
| 1215 | (system-variables | 1215 | (system-variables |
| @@ -1915,6 +1915,7 @@ The main features of this mode are | |||
| 1915 | 1915 | ||
| 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") | 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") |
| 1917 | (set (make-local-variable 'comment-start) ";") | 1917 | (set (make-local-variable 'comment-start) ";") |
| 1918 | (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions | ||
| 1918 | (set (make-local-variable 'require-final-newline) t) | 1919 | (set (make-local-variable 'require-final-newline) t) |
| 1919 | (set (make-local-variable 'abbrev-all-caps) t) | 1920 | (set (make-local-variable 'abbrev-all-caps) t) |
| 1920 | (set (make-local-variable 'indent-tabs-mode) nil) | 1921 | (set (make-local-variable 'indent-tabs-mode) nil) |
| @@ -1947,6 +1948,10 @@ The main features of this mode are | |||
| 1947 | ;; Following line is for Emacs - XEmacs uses the corresponding property | 1948 | ;; Following line is for Emacs - XEmacs uses the corresponding property |
| 1948 | ;; on the `idlwave-mode' symbol. | 1949 | ;; on the `idlwave-mode' symbol. |
| 1949 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) | 1950 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) |
| 1951 | (set (make-local-variable 'font-lock-mark-block-function) | ||
| 1952 | 'idlwave-mark-subprogram) | ||
| 1953 | (set (make-local-variable 'font-lock-fontify-region-function) | ||
| 1954 | 'idlwave-font-lock-fontify-region) | ||
| 1950 | 1955 | ||
| 1951 | ;; Imenu setup | 1956 | ;; Imenu setup |
| 1952 | (set (make-local-variable 'imenu-create-index-function) | 1957 | (set (make-local-variable 'imenu-create-index-function) |
| @@ -1956,6 +1961,15 @@ The main features of this mode are | |||
| 1956 | (set (make-local-variable 'imenu-prev-index-position-function) | 1961 | (set (make-local-variable 'imenu-prev-index-position-function) |
| 1957 | 'idlwave-prev-index-position) | 1962 | 'idlwave-prev-index-position) |
| 1958 | 1963 | ||
| 1964 | ;; HideShow setup | ||
| 1965 | (add-to-list 'hs-special-modes-alist | ||
| 1966 | (list 'idlwave-mode | ||
| 1967 | idlwave-begin-block-reg | ||
| 1968 | idlwave-end-block-reg | ||
| 1969 | ";" | ||
| 1970 | 'idlwave-forward-block nil)) | ||
| 1971 | |||
| 1972 | |||
| 1959 | ;; Make a local post-command-hook and add our hook to it | 1973 | ;; Make a local post-command-hook and add our hook to it |
| 1960 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1974 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 1961 | ;; (make-local-hook 'post-command-hook) | 1975 | ;; (make-local-hook 'post-command-hook) |
| @@ -2000,16 +2014,22 @@ The main features of this mode are | |||
| 2000 | (idlwave-read-paths) ; we may need these early | 2014 | (idlwave-read-paths) ; we may need these early |
| 2001 | (setq idlwave-setup-done t))) | 2015 | (setq idlwave-setup-done t))) |
| 2002 | 2016 | ||
| 2017 | (defun idlwave-font-lock-fontify-region (beg end &optional verbose) | ||
| 2018 | "Fontify continuation lines correctly." | ||
| 2019 | (let (pos) | ||
| 2020 | (save-excursion | ||
| 2021 | (goto-char beg) | ||
| 2022 | (forward-line -1) | ||
| 2023 | (when (setq pos (idlwave-is-continuation-line)) | ||
| 2024 | (goto-char pos) | ||
| 2025 | (idlwave-beginning-of-statement) | ||
| 2026 | (setq beg (point))))) | ||
| 2027 | (font-lock-default-fontify-region beg end verbose)) | ||
| 2028 | |||
| 2003 | ;; | 2029 | ;; |
| 2004 | ;; Code Formatting ---------------------------------------------------- | 2030 | ;; Code Formatting ---------------------------------------------------- |
| 2005 | ;; | 2031 | ;; |
| 2006 | 2032 | ||
| 2007 | (defun idlwave-push-mark (&rest rest) | ||
| 2008 | "Push mark for compatibility with Emacs 18/19." | ||
| 2009 | (if (fboundp 'iconify-frame) | ||
| 2010 | (apply 'push-mark rest) | ||
| 2011 | (push-mark))) | ||
| 2012 | |||
| 2013 | (defun idlwave-hard-tab () | 2033 | (defun idlwave-hard-tab () |
| 2014 | "Inserts TAB in buffer in current position." | 2034 | "Inserts TAB in buffer in current position." |
| 2015 | (interactive) | 2035 | (interactive) |
| @@ -2403,7 +2423,7 @@ non-nil." | |||
| 2403 | (idlwave-end-of-statement) | 2423 | (idlwave-end-of-statement) |
| 2404 | (let ((end (point))) | 2424 | (let ((end (point))) |
| 2405 | (idlwave-beginning-of-statement) | 2425 | (idlwave-beginning-of-statement) |
| 2406 | (idlwave-push-mark end nil t))) | 2426 | (push-mark end nil t))) |
| 2407 | 2427 | ||
| 2408 | (defun idlwave-mark-block () | 2428 | (defun idlwave-mark-block () |
| 2409 | "Mark containing block." | 2429 | "Mark containing block." |
| @@ -2414,7 +2434,7 @@ non-nil." | |||
| 2414 | (let ((end (point))) | 2434 | (let ((end (point))) |
| 2415 | (idlwave-backward-block) | 2435 | (idlwave-backward-block) |
| 2416 | (idlwave-beginning-of-statement) | 2436 | (idlwave-beginning-of-statement) |
| 2417 | (idlwave-push-mark end nil t))) | 2437 | (push-mark end nil t))) |
| 2418 | 2438 | ||
| 2419 | 2439 | ||
| 2420 | (defun idlwave-mark-subprogram () | 2440 | (defun idlwave-mark-subprogram () |
| @@ -2425,7 +2445,7 @@ The marks are pushed." | |||
| 2425 | (idlwave-beginning-of-subprogram) | 2445 | (idlwave-beginning-of-subprogram) |
| 2426 | (let ((beg (point))) | 2446 | (let ((beg (point))) |
| 2427 | (idlwave-forward-block) | 2447 | (idlwave-forward-block) |
| 2428 | (idlwave-push-mark beg nil t)) | 2448 | (push-mark beg nil t)) |
| 2429 | (exchange-point-and-mark)) | 2449 | (exchange-point-and-mark)) |
| 2430 | 2450 | ||
| 2431 | (defun idlwave-backward-up-block (&optional arg) | 2451 | (defun idlwave-backward-up-block (&optional arg) |
| @@ -2446,11 +2466,12 @@ If prefix ARG < 0 then move forward to enclosing block end." | |||
| 2446 | (idlwave-block-jump-out 1 'nomark) | 2466 | (idlwave-block-jump-out 1 'nomark) |
| 2447 | (backward-word 1)) | 2467 | (backward-word 1)) |
| 2448 | 2468 | ||
| 2449 | (defun idlwave-forward-block () | 2469 | (defun idlwave-forward-block (&optional arg) |
| 2450 | "Move across next nested block." | 2470 | "Move across next nested block." |
| 2451 | (interactive) | 2471 | (interactive) |
| 2452 | (if (idlwave-down-block 1) | 2472 | (let ((arg (or arg 1))) |
| 2453 | (idlwave-block-jump-out 1 'nomark))) | 2473 | (if (idlwave-down-block arg) |
| 2474 | (idlwave-block-jump-out arg 'nomark)))) | ||
| 2454 | 2475 | ||
| 2455 | (defun idlwave-backward-block () | 2476 | (defun idlwave-backward-block () |
| 2456 | "Move backward across previous nested block." | 2477 | "Move backward across previous nested block." |
| @@ -2496,12 +2517,11 @@ The marks are pushed." | |||
| 2496 | (if (re-search-forward idlwave-doclib-end nil t) | 2517 | (if (re-search-forward idlwave-doclib-end nil t) |
| 2497 | (progn | 2518 | (progn |
| 2498 | (forward-line 1) | 2519 | (forward-line 1) |
| 2499 | (idlwave-push-mark beg nil t) | 2520 | (push-mark beg nil t) |
| 2500 | (message "Could not find end of doc library header."))) | 2521 | (message "Could not find end of doc library header."))) |
| 2501 | (message "Could not find doc library header start.") | 2522 | (message "Could not find doc library header start.") |
| 2502 | (goto-char here))))) | 2523 | (goto-char here))))) |
| 2503 | 2524 | ||
| 2504 | |||
| 2505 | (defun idlwave-current-routine () | 2525 | (defun idlwave-current-routine () |
| 2506 | "Return (NAME TYPE CLASS) of current routine." | 2526 | "Return (NAME TYPE CLASS) of current routine." |
| 2507 | (idlwave-routines) | 2527 | (idlwave-routines) |
| @@ -3194,13 +3214,14 @@ Skips any whitespace. Returns 0 if the end-of-line follows the whitespace." | |||
| 3194 | "Tests if current line is continuation line. | 3214 | "Tests if current line is continuation line. |
| 3195 | Blank or comment-only lines following regular continuation lines (with | 3215 | Blank or comment-only lines following regular continuation lines (with |
| 3196 | `$') count as continuations too." | 3216 | `$') count as continuations too." |
| 3197 | (save-excursion | 3217 | (let (p) |
| 3198 | (or | 3218 | (save-excursion |
| 3199 | (idlwave-look-at "\\<\\$") | 3219 | (or |
| 3200 | (catch 'loop | 3220 | (idlwave-look-at "\\<\\$") |
| 3201 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") | 3221 | (catch 'loop |
| 3202 | (eq (forward-line -1) 0)) | 3222 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") |
| 3203 | (if (idlwave-look-at "\\<\\$") (throw 'loop t))))))) | 3223 | (eq (forward-line -1) 0)) |
| 3224 | (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) | ||
| 3204 | 3225 | ||
| 3205 | (defun idlwave-is-comment-line () | 3226 | (defun idlwave-is-comment-line () |
| 3206 | "Tests if the current line is a comment line." | 3227 | "Tests if the current line is a comment line." |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 43b33aa39ae..4d63b07d87c 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -923,8 +923,9 @@ Returns new value of point in all cases." | |||
| 923 | (or arg (setq arg 1)) | 923 | (or arg (setq arg 1)) |
| 924 | (if (< arg 0) (forward-char 1)) | 924 | (if (< arg 0) (forward-char 1)) |
| 925 | (and (/= arg 0) | 925 | (and (/= arg 0) |
| 926 | (re-search-backward "^\\s(\\|^\\s-*sub\\b[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." | 926 | (re-search-backward |
| 927 | nil 'move arg) | 927 | "^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." |
| 928 | nil 'move arg) | ||
| 928 | (goto-char (1- (match-end 0)))) | 929 | (goto-char (1- (match-end 0)))) |
| 929 | (point)) | 930 | (point)) |
| 930 | 931 | ||
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index d81a5fcf47b..987b37cf2c2 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -16723,8 +16723,7 @@ specified by a target." | |||
| 16723 | (progn (save-buffer) | 16723 | (progn (save-buffer) |
| 16724 | (kill-buffer (current-buffer)) | 16724 | (kill-buffer (current-buffer)) |
| 16725 | (set-buffer orig-buffer) | 16725 | (set-buffer orig-buffer) |
| 16726 | (setq file-name-history | 16726 | (add-to-history 'file-name-history makefile-path-name)) |
| 16727 | (cons makefile-path-name file-name-history))) | ||
| 16728 | (vhdl-warning-when-idle | 16727 | (vhdl-warning-when-idle |
| 16729 | (format "File not writable: \"%s\"" | 16728 | (format "File not writable: \"%s\"" |
| 16730 | (abbreviate-file-name makefile-path-name))) | 16729 | (abbreviate-file-name makefile-path-name))) |
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 4f1cd37a9f7..0f55c71ac70 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -580,12 +580,9 @@ The strings are concatenated and terminated by a newline." | |||
| 580 | ;;;; Scheme expressions ring | 580 | ;;;; Scheme expressions ring |
| 581 | 581 | ||
| 582 | (defun xscheme-insert-expression (string) | 582 | (defun xscheme-insert-expression (string) |
| 583 | (setq xscheme-expressions-ring (cons string xscheme-expressions-ring)) | 583 | (setq xscheme-expressions-ring-yank-pointer |
| 584 | (if (> (length xscheme-expressions-ring) xscheme-expressions-ring-max) | 584 | (add-to-history 'xscheme-expressions-ring string |
| 585 | (setcdr (nthcdr (1- xscheme-expressions-ring-max) | 585 | xscheme-expressions-ring-max))) |
| 586 | xscheme-expressions-ring) | ||
| 587 | nil)) | ||
| 588 | (setq xscheme-expressions-ring-yank-pointer xscheme-expressions-ring)) | ||
| 589 | 586 | ||
| 590 | (defun xscheme-rotate-yank-pointer (arg) | 587 | (defun xscheme-rotate-yank-pointer (arg) |
| 591 | "Rotate the yanking point in the kill ring." | 588 | "Rotate the yanking point in the kill ring." |
diff --git a/lisp/replace.el b/lisp/replace.el index 3187bbbbd36..f1792b499fc 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1098,6 +1098,7 @@ See also `multi-occur'." | |||
| 1098 | (endpt nil) | 1098 | (endpt nil) |
| 1099 | (marker nil) | 1099 | (marker nil) |
| 1100 | (curstring "") | 1100 | (curstring "") |
| 1101 | (inhibit-field-text-motion t) | ||
| 1101 | (headerpt (with-current-buffer out-buf (point)))) | 1102 | (headerpt (with-current-buffer out-buf (point)))) |
| 1102 | (with-current-buffer buf | 1103 | (with-current-buffer buf |
| 1103 | (or coding | 1104 | (or coding |
diff --git a/lisp/server.el b/lisp/server.el index befcd22ad3a..43b2dc63389 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -411,7 +411,7 @@ so don't mark these buffers specially, just visit them normally." | |||
| 411 | ;; deleted file, offer to write it. | 411 | ;; deleted file, offer to write it. |
| 412 | (let* ((filen (car file)) | 412 | (let* ((filen (car file)) |
| 413 | (obuf (get-file-buffer filen))) | 413 | (obuf (get-file-buffer filen))) |
| 414 | (push filen file-name-history) | 414 | (add-to-history 'file-name-history filen) |
| 415 | (if (and obuf (set-buffer obuf)) | 415 | (if (and obuf (set-buffer obuf)) |
| 416 | (progn | 416 | (progn |
| 417 | (cond ((file-exists-p filen) | 417 | (cond ((file-exists-p filen) |
diff --git a/lisp/simple.el b/lisp/simple.el index 6b571aaba3f..9fc0770ad68 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1156,7 +1156,7 @@ they are expressions; otherwise they are strings. | |||
| 1156 | \(That convention is designed to do the right thing for | 1156 | \(That convention is designed to do the right thing for |
| 1157 | recursive uses of the minibuffer.)") | 1157 | recursive uses of the minibuffer.)") |
| 1158 | (setq minibuffer-history-variable 'minibuffer-history) | 1158 | (setq minibuffer-history-variable 'minibuffer-history) |
| 1159 | (setq minibuffer-history-position nil) | 1159 | (setq minibuffer-history-position nil) ;; Defvar is in C code. |
| 1160 | (defvar minibuffer-history-search-history nil) | 1160 | (defvar minibuffer-history-search-history nil) |
| 1161 | 1161 | ||
| 1162 | (defvar minibuffer-text-before-history nil | 1162 | (defvar minibuffer-text-before-history nil |
| @@ -1281,7 +1281,8 @@ makes the search case-sensitive." | |||
| 1281 | (defvar minibuffer-temporary-goal-position nil) | 1281 | (defvar minibuffer-temporary-goal-position nil) |
| 1282 | 1282 | ||
| 1283 | (defun next-history-element (n) | 1283 | (defun next-history-element (n) |
| 1284 | "Insert the next element of the minibuffer history into the minibuffer." | 1284 | "Puts next element of the minibuffer history in the minibuffer. |
| 1285 | With argument N, it uses the Nth following element." | ||
| 1285 | (interactive "p") | 1286 | (interactive "p") |
| 1286 | (or (zerop n) | 1287 | (or (zerop n) |
| 1287 | (let ((narg (- minibuffer-history-position n)) | 1288 | (let ((narg (- minibuffer-history-position n)) |
| @@ -1324,7 +1325,8 @@ makes the search case-sensitive." | |||
| 1324 | (goto-char (or minibuffer-temporary-goal-position (point-max)))))) | 1325 | (goto-char (or minibuffer-temporary-goal-position (point-max)))))) |
| 1325 | 1326 | ||
| 1326 | (defun previous-history-element (n) | 1327 | (defun previous-history-element (n) |
| 1327 | "Inserts the previous element of the minibuffer history into the minibuffer." | 1328 | "Puts previous element of the minibuffer history in the minibuffer. |
| 1329 | With argument N, it uses the Nth previous element." | ||
| 1328 | (interactive "p") | 1330 | (interactive "p") |
| 1329 | (next-history-element (- n))) | 1331 | (next-history-element (- n))) |
| 1330 | 1332 | ||
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 4b83f08d89d..b3913f6f6c6 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -2529,8 +2529,7 @@ name will have the function FIND-FUN and not token." | |||
| 2529 | default-directory) | 2529 | default-directory) |
| 2530 | (speedbar-message nil)))) | 2530 | (speedbar-message nil)))) |
| 2531 | ;; Else, we can do a short cut. No text cache. | 2531 | ;; Else, we can do a short cut. No text cache. |
| 2532 | (let ((cbd (expand-file-name default-directory)) | 2532 | (let ((cbd (expand-file-name default-directory))) |
| 2533 | ) | ||
| 2534 | (set-buffer speedbar-buffer) | 2533 | (set-buffer speedbar-buffer) |
| 2535 | (speedbar-with-writable | 2534 | (speedbar-with-writable |
| 2536 | (let* ((window (get-buffer-window speedbar-buffer 0)) | 2535 | (let* ((window (get-buffer-window speedbar-buffer 0)) |
| @@ -2542,8 +2541,7 @@ name will have the function FIND-FUN and not token." | |||
| 2542 | (funcall func cbd 0)) | 2541 | (funcall func cbd 0)) |
| 2543 | (speedbar-reconfigure-keymaps) | 2542 | (speedbar-reconfigure-keymaps) |
| 2544 | (set-window-point window p) | 2543 | (set-window-point window p) |
| 2545 | (set-window-start window start))) | 2544 | (set-window-start window start))))))) |
| 2546 | )))) | ||
| 2547 | 2545 | ||
| 2548 | (defun speedbar-update-directory-contents () | 2546 | (defun speedbar-update-directory-contents () |
| 2549 | "Update the contents of the speedbar buffer based on the current directory." | 2547 | "Update the contents of the speedbar buffer based on the current directory." |
| @@ -2677,7 +2675,6 @@ Also resets scanner functions." | |||
| 2677 | (frame-visible-p (speedbar-current-frame)) | 2675 | (frame-visible-p (speedbar-current-frame)) |
| 2678 | (not (eq (frame-visible-p (speedbar-current-frame)) 'icon))) | 2676 | (not (eq (frame-visible-p (speedbar-current-frame)) 'icon))) |
| 2679 | (let ((af (selected-frame))) | 2677 | (let ((af (selected-frame))) |
| 2680 | (save-window-excursion | ||
| 2681 | (dframe-select-attached-frame speedbar-frame) | 2678 | (dframe-select-attached-frame speedbar-frame) |
| 2682 | ;; make sure we at least choose a window to | 2679 | ;; make sure we at least choose a window to |
| 2683 | ;; get a good directory from | 2680 | ;; get a good directory from |
| @@ -2704,14 +2701,8 @@ Also resets scanner functions." | |||
| 2704 | "Updating speedbar to special mode: %s...done" | 2701 | "Updating speedbar to special mode: %s...done" |
| 2705 | major-mode) | 2702 | major-mode) |
| 2706 | (speedbar-message nil)))) | 2703 | (speedbar-message nil)))) |
| 2707 | ;; Update all the contents if directories change! | 2704 | (speedbar-update-localized-contents)) |
| 2708 | (if (or (member major-mode speedbar-ignored-modes) | 2705 | (select-frame af)) |
| 2709 | (eq af (speedbar-current-frame)) | ||
| 2710 | (not (buffer-file-name))) | ||
| 2711 | nil | ||
| 2712 | (speedbar-update-localized-contents) | ||
| 2713 | )) | ||
| 2714 | (select-frame af))) | ||
| 2715 | ;; Now run stealthy updates of time-consuming items | 2706 | ;; Now run stealthy updates of time-consuming items |
| 2716 | (speedbar-stealthy-updates))))) | 2707 | (speedbar-stealthy-updates))))) |
| 2717 | (run-hooks 'speedbar-timer-hook)) | 2708 | (run-hooks 'speedbar-timer-hook)) |
diff --git a/lisp/startup.el b/lisp/startup.el index 66676c302b9..f1a68fd8509 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -821,7 +821,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 821 | (format "Invalid user name %s" | 821 | (format "Invalid user name %s" |
| 822 | init-file-user) | 822 | init-file-user) |
| 823 | :error) | 823 | :error) |
| 824 | (if (file-directory-p (expand-file-name (concat "~" init-file-user))) | 824 | (if (file-directory-p (expand-file-name |
| 825 | ;; We don't support ~USER on MS-Windows except | ||
| 826 | ;; for the current user, and always load .emacs | ||
| 827 | ;; from the current user's home directory (see | ||
| 828 | ;; below). So always check "~", even if invoked | ||
| 829 | ;; with "-u USER", or if $USER or $LOGNAME are | ||
| 830 | ;; set to something different. | ||
| 831 | (if (eq system-type 'windows-nt) | ||
| 832 | "~" | ||
| 833 | (concat "~" init-file-user)))) | ||
| 825 | nil | 834 | nil |
| 826 | (display-warning 'initialization | 835 | (display-warning 'initialization |
| 827 | (format "User %s has no home directory" | 836 | (format "User %s has no home directory" |
| @@ -1302,7 +1311,9 @@ where FACE is a valid face specification, as it can be used with | |||
| 1302 | (set-buffer buffer) | 1311 | (set-buffer buffer) |
| 1303 | (erase-buffer) | 1312 | (erase-buffer) |
| 1304 | (if pure-space-overflow | 1313 | (if pure-space-overflow |
| 1305 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1314 | (insert "\ |
| 1315 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1316 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1306 | (fancy-splash-head) | 1317 | (fancy-splash-head) |
| 1307 | (apply #'fancy-splash-insert text) | 1318 | (apply #'fancy-splash-insert text) |
| 1308 | (fancy-splash-tail) | 1319 | (fancy-splash-tail) |
| @@ -1359,7 +1370,7 @@ mouse." | |||
| 1359 | emulation-mode-map-alists nil | 1370 | emulation-mode-map-alists nil |
| 1360 | buffer-undo-list t | 1371 | buffer-undo-list t |
| 1361 | mode-line-format (propertize "---- %b %-" | 1372 | mode-line-format (propertize "---- %b %-" |
| 1362 | 'face '(:weight bold)) | 1373 | 'face 'mode-line-buffer-id) |
| 1363 | fancy-splash-stop-time (+ (float-time) | 1374 | fancy-splash-stop-time (+ (float-time) |
| 1364 | fancy-splash-max-time) | 1375 | fancy-splash-max-time) |
| 1365 | timer (run-with-timer 0 fancy-splash-delay | 1376 | timer (run-with-timer 0 fancy-splash-delay |
| @@ -1408,10 +1419,12 @@ we put it on this frame." | |||
| 1408 | (with-current-buffer (get-buffer-create "GNU Emacs") | 1419 | (with-current-buffer (get-buffer-create "GNU Emacs") |
| 1409 | (set (make-local-variable 'tab-width) 8) | 1420 | (set (make-local-variable 'tab-width) 8) |
| 1410 | (set (make-local-variable 'mode-line-format) | 1421 | (set (make-local-variable 'mode-line-format) |
| 1411 | (propertize "---- %b %-" 'face '(:weight bold))) | 1422 | (propertize "---- %b %-" 'face 'mode-line-buffer-id)) |
| 1412 | 1423 | ||
| 1413 | (if pure-space-overflow | 1424 | (if pure-space-overflow |
| 1414 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1425 | (insert "\ |
| 1426 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1427 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1415 | 1428 | ||
| 1416 | ;; The convention for this piece of code is that | 1429 | ;; The convention for this piece of code is that |
| 1417 | ;; each piece of output starts with one or two newlines | 1430 | ;; each piece of output starts with one or two newlines |
| @@ -1624,9 +1637,7 @@ normal otherwise." | |||
| 1624 | (not noninteractive)) | 1637 | (not noninteractive)) |
| 1625 | (display-warning | 1638 | (display-warning |
| 1626 | 'initialization | 1639 | 'initialization |
| 1627 | "Building Emacs overflowed pure space." | 1640 | "Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)" |
| 1628 | ;; FIXME: Tell the user what kind of problems are possible and how to fix | ||
| 1629 | ;; the overflow. | ||
| 1630 | :warning)) | 1641 | :warning)) |
| 1631 | 1642 | ||
| 1632 | (when command-line-args-left | 1643 | (when command-line-args-left |
diff --git a/lisp/subr.el b/lisp/subr.el index 5c0317d00c3..5cc5be5f56b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1122,6 +1122,31 @@ The return value is the new value of LIST-VAR." | |||
| 1122 | (if (and oa ob) | 1122 | (if (and oa ob) |
| 1123 | (< oa ob) | 1123 | (< oa ob) |
| 1124 | oa))))))) | 1124 | oa))))))) |
| 1125 | |||
| 1126 | (defun add-to-history (history-var newelt &optional maxelt) | ||
| 1127 | "Add NEWELT to the history list stored in the variable HISTORY-VAR. | ||
| 1128 | Return the new history list. | ||
| 1129 | If MAXELT is non-nil, it specifies the maximum length of the history. | ||
| 1130 | Otherwise, the maximum history length is the value of the `history-length' | ||
| 1131 | property on symbol HISTORY-VAR, if set, or the value of the `history-length' | ||
| 1132 | variable. | ||
| 1133 | Remove duplicates of NEWELT unless `history-delete-duplicates' is nil." | ||
| 1134 | (unless maxelt | ||
| 1135 | (setq maxelt (or (get history-var 'history-length) | ||
| 1136 | history-length))) | ||
| 1137 | (let ((history (symbol-value history-var)) | ||
| 1138 | tail) | ||
| 1139 | (if history-delete-duplicates | ||
| 1140 | (setq history (delete newelt history))) | ||
| 1141 | (setq history (cons newelt history)) | ||
| 1142 | (when (integerp maxelt) | ||
| 1143 | (if (= 0 maxelt) | ||
| 1144 | (setq history nil) | ||
| 1145 | (setq tail (nthcdr (1- maxelt) history)) | ||
| 1146 | (when (consp tail) | ||
| 1147 | (setcdr tail nil)))) | ||
| 1148 | (set history-var history))) | ||
| 1149 | |||
| 1125 | 1150 | ||
| 1126 | ;;;; Mode hooks. | 1151 | ;;;; Mode hooks. |
| 1127 | 1152 | ||
| @@ -1931,6 +1956,13 @@ Otherwise, return nil." | |||
| 1931 | "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil." | 1956 | "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil." |
| 1932 | (memq object '(nil t))) | 1957 | (memq object '(nil t))) |
| 1933 | 1958 | ||
| 1959 | (defun field-at-pos (pos) | ||
| 1960 | "Return the field at position POS, taking stickiness etc into account" | ||
| 1961 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) | ||
| 1962 | (if (eq raw-field 'boundary) | ||
| 1963 | (get-char-property (1- (field-end pos)) 'field) | ||
| 1964 | raw-field))) | ||
| 1965 | |||
| 1934 | 1966 | ||
| 1935 | ;;;; Support for yanking and text properties. | 1967 | ;;;; Support for yanking and text properties. |
| 1936 | 1968 | ||
diff --git a/lisp/term.el b/lisp/term.el index 97d55dc107e..64f0efc767b 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -3318,7 +3318,7 @@ See `term-prompt-regexp'." | |||
| 3318 | ((eq char ?r) | 3318 | ((eq char ?r) |
| 3319 | (term-set-scroll-region | 3319 | (term-set-scroll-region |
| 3320 | (1- term-terminal-previous-parameter) | 3320 | (1- term-terminal-previous-parameter) |
| 3321 | term-terminal-parameter)) | 3321 | (1- term-terminal-parameter))) |
| 3322 | (t))) | 3322 | (t))) |
| 3323 | 3323 | ||
| 3324 | (defun term-set-scroll-region (top bottom) | 3324 | (defun term-set-scroll-region (top bottom) |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index fa8934aec9e..b97a3a9ec3a 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -79,9 +79,11 @@ | |||
| 79 | (eval-when-compile (require 'url)) | 79 | (eval-when-compile (require 'url)) |
| 80 | 80 | ||
| 81 | (defvar mac-charset-info-alist) | 81 | (defvar mac-charset-info-alist) |
| 82 | (defvar mac-services-selection) | 82 | (defvar mac-service-selection) |
| 83 | (defvar mac-system-script-code) | 83 | (defvar mac-system-script-code) |
| 84 | (defvar mac-apple-event-map) | 84 | (defvar mac-apple-event-map) |
| 85 | (defvar mac-atsu-font-table) | ||
| 86 | (defvar mac-font-panel-mode) | ||
| 85 | (defvar x-invocation-args) | 87 | (defvar x-invocation-args) |
| 86 | 88 | ||
| 87 | (defvar x-command-line-resources nil) | 89 | (defvar x-command-line-resources nil) |
| @@ -1128,6 +1130,17 @@ correspoinding TextEncodingBase value." | |||
| 1128 | (mac-add-charset-info "mac-dingbats" 34) | 1130 | (mac-add-charset-info "mac-dingbats" 34) |
| 1129 | (mac-add-charset-info "iso10646-1" 126) ; for ATSUI | 1131 | (mac-add-charset-info "iso10646-1" 126) ; for ATSUI |
| 1130 | 1132 | ||
| 1133 | (defconst mac-system-coding-system | ||
| 1134 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 1135 | mac-script-code-coding-systems)) | ||
| 1136 | 'mac-roman))) | ||
| 1137 | (if (eq system-type 'darwin) | ||
| 1138 | base | ||
| 1139 | (coding-system-change-eol-conversion base 'mac))) | ||
| 1140 | "Coding system derived from the system script code.") | ||
| 1141 | |||
| 1142 | (set-selection-coding-system mac-system-coding-system) | ||
| 1143 | |||
| 1131 | 1144 | ||
| 1132 | ;;;; Keyboard layout/language change events | 1145 | ;;;; Keyboard layout/language change events |
| 1133 | (defun mac-handle-language-change (event) | 1146 | (defun mac-handle-language-change (event) |
| @@ -1141,6 +1154,91 @@ correspoinding TextEncodingBase value." | |||
| 1141 | (define-key key-translation-map [?\x80] "\\")))) | 1154 | (define-key key-translation-map [?\x80] "\\")))) |
| 1142 | 1155 | ||
| 1143 | (define-key special-event-map [language-change] 'mac-handle-language-change) | 1156 | (define-key special-event-map [language-change] 'mac-handle-language-change) |
| 1157 | |||
| 1158 | |||
| 1159 | ;;;; Conversion between common flavors and Lisp string. | ||
| 1160 | |||
| 1161 | (defconst mac-text-encoding-mac-japanese-basic-variant #x20001 | ||
| 1162 | "MacJapanese text encoding without Apple double-byte extensions.") | ||
| 1163 | |||
| 1164 | (defun mac-utxt-to-string (data &optional coding-system) | ||
| 1165 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1166 | (let* ((encoding | ||
| 1167 | (and (eq system-type 'darwin) | ||
| 1168 | (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1169 | mac-text-encoding-mac-japanese-basic-variant)) | ||
| 1170 | (str (and (fboundp 'mac-code-convert-string) | ||
| 1171 | (mac-code-convert-string data nil | ||
| 1172 | (or encoding coding-system))))) | ||
| 1173 | (when str | ||
| 1174 | (setq str (decode-coding-string str coding-system)) | ||
| 1175 | (if (eq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1176 | ;; Does it contain Apple one-byte extensions other than | ||
| 1177 | ;; reverse solidus? | ||
| 1178 | (if (string-match "[\xa0\xfd-\xff]" str) | ||
| 1179 | (setq str nil) | ||
| 1180 | ;; ASCII-only? | ||
| 1181 | (unless (string-match "\\`[[:ascii:]]*\\'" str) | ||
| 1182 | (subst-char-in-string ?\x5c ?\(J\(B str t) | ||
| 1183 | (subst-char-in-string ?\x80 ?\\ str t))))) | ||
| 1184 | (or str | ||
| 1185 | (decode-coding-string data | ||
| 1186 | (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))))) | ||
| 1187 | |||
| 1188 | (defun mac-string-to-utxt (string &optional coding-system) | ||
| 1189 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1190 | (let (data encoding) | ||
| 1191 | (when (and (fboundp 'mac-code-convert-string) | ||
| 1192 | (memq (coding-system-base coding-system) | ||
| 1193 | (find-coding-systems-string string))) | ||
| 1194 | (setq coding-system | ||
| 1195 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1196 | (when (and (eq system-type 'darwin) | ||
| 1197 | (eq coding-system 'japanese-shift-jis-mac)) | ||
| 1198 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1199 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1200 | (subst-char-in-string ?\(J\(B ?\x5c string t)) | ||
| 1201 | (setq data (mac-code-convert-string | ||
| 1202 | (encode-coding-string string coding-system) | ||
| 1203 | (or encoding coding-system) nil))) | ||
| 1204 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | ||
| 1205 | 'utf-16be-mac | ||
| 1206 | 'utf-16le-mac))))) | ||
| 1207 | |||
| 1208 | (defun mac-TEXT-to-string (data &optional coding-system) | ||
| 1209 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1210 | (prog1 (setq data (decode-coding-string data coding-system)) | ||
| 1211 | (when (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1212 | ;; (subst-char-in-string ?\x5c ?\(J\(B data t) | ||
| 1213 | (subst-char-in-string ?\x80 ?\\ data t)))) | ||
| 1214 | |||
| 1215 | (defun mac-string-to-TEXT (string &optional coding-system) | ||
| 1216 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1217 | (let ((encodables (find-coding-systems-string string)) | ||
| 1218 | (rest mac-script-code-coding-systems)) | ||
| 1219 | (unless (memq (coding-system-base coding-system) encodables) | ||
| 1220 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1221 | (setq rest (cdr rest))) | ||
| 1222 | (if rest | ||
| 1223 | (setq coding-system (cdar rest))))) | ||
| 1224 | (setq coding-system | ||
| 1225 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1226 | (when (eq coding-system 'japanese-shift-jis-mac) | ||
| 1227 | ;; (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1228 | (setq string (subst-char-in-string ?\(J\(B ?\x5c string))) | ||
| 1229 | (encode-coding-string string coding-system)) | ||
| 1230 | |||
| 1231 | (defun mac-furl-to-string (data) | ||
| 1232 | ;; Remove a trailing nul character. | ||
| 1233 | (let ((len (length data))) | ||
| 1234 | (if (and (> len 0) (= (aref data (1- len)) ?\0)) | ||
| 1235 | (substring data 0 (1- len)) | ||
| 1236 | data))) | ||
| 1237 | |||
| 1238 | (defun mac-TIFF-to-string (data &optional text) | ||
| 1239 | (prog1 (or text (setq text (copy-sequence " "))) | ||
| 1240 | (put-text-property 0 (length text) 'display (create-image data 'tiff t) | ||
| 1241 | text))) | ||
| 1144 | 1242 | ||
| 1145 | ;;;; Selections | 1243 | ;;;; Selections |
| 1146 | 1244 | ||
| @@ -1190,22 +1288,11 @@ in `selection-converter-alist', which see." | |||
| 1190 | (when (and (stringp data) | 1288 | (when (and (stringp data) |
| 1191 | (setq data-type (get-text-property 0 'foreign-selection data))) | 1289 | (setq data-type (get-text-property 0 'foreign-selection data))) |
| 1192 | (cond ((eq data-type 'public.utf16-plain-text) | 1290 | (cond ((eq data-type 'public.utf16-plain-text) |
| 1193 | (let ((encoded (and (fboundp 'mac-code-convert-string) | 1291 | (setq data (mac-utxt-to-string data coding))) |
| 1194 | (mac-code-convert-string data nil coding)))) | ||
| 1195 | (if encoded | ||
| 1196 | (setq data (decode-coding-string encoded coding)) | ||
| 1197 | (setq data | ||
| 1198 | (decode-coding-string data | ||
| 1199 | (if (eq (byteorder) ?B) | ||
| 1200 | 'utf-16be 'utf-16le)))))) | ||
| 1201 | ((eq data-type 'com.apple.traditional-mac-plain-text) | 1292 | ((eq data-type 'com.apple.traditional-mac-plain-text) |
| 1202 | (setq data (decode-coding-string data coding))) | 1293 | (setq data (mac-TEXT-to-string data coding))) |
| 1203 | ((eq data-type 'public.file-url) | 1294 | ((eq data-type 'public.file-url) |
| 1204 | (setq data (decode-coding-string data 'utf-8)) | 1295 | (setq data (mac-furl-to-string data)))) |
| 1205 | ;; Remove a trailing nul character. | ||
| 1206 | (let ((len (length data))) | ||
| 1207 | (if (and (> len 0) (= (aref data (1- len)) ?\0)) | ||
| 1208 | (setq data (substring data 0 (1- len))))))) | ||
| 1209 | (put-text-property 0 (length data) 'foreign-selection data-type data)) | 1296 | (put-text-property 0 (length data) 'foreign-selection data-type data)) |
| 1210 | data)) | 1297 | data)) |
| 1211 | 1298 | ||
| @@ -1227,9 +1314,7 @@ in `selection-converter-alist', which see." | |||
| 1227 | (when tiff-image | 1314 | (when tiff-image |
| 1228 | (remove-text-properties 0 (length tiff-image) | 1315 | (remove-text-properties 0 (length tiff-image) |
| 1229 | '(foreign-selection nil) tiff-image) | 1316 | '(foreign-selection nil) tiff-image) |
| 1230 | (setq tiff-image (create-image tiff-image 'tiff t)) | 1317 | (setq text (mac-TIFF-to-string tiff-image text))) |
| 1231 | (or text (setq text " ")) | ||
| 1232 | (put-text-property 0 (length text) 'display tiff-image text)) | ||
| 1233 | text)) | 1318 | text)) |
| 1234 | 1319 | ||
| 1235 | ;;; Return the value of the current selection. | 1320 | ;;; Return the value of the current selection. |
| @@ -1300,11 +1385,7 @@ in `selection-converter-alist', which see." | |||
| 1300 | 1385 | ||
| 1301 | (defun mac-select-convert-to-string (selection type value) | 1386 | (defun mac-select-convert-to-string (selection type value) |
| 1302 | (let ((str (cdr (xselect-convert-to-string selection nil value))) | 1387 | (let ((str (cdr (xselect-convert-to-string selection nil value))) |
| 1303 | coding) | 1388 | (coding (or next-selection-coding-system selection-coding-system))) |
| 1304 | (setq coding (or next-selection-coding-system selection-coding-system)) | ||
| 1305 | (if coding | ||
| 1306 | (setq coding (coding-system-base coding)) | ||
| 1307 | (setq coding 'raw-text)) | ||
| 1308 | (when str | 1389 | (when str |
| 1309 | ;; If TYPE is nil, this is a local request, thus return STR as | 1390 | ;; If TYPE is nil, this is a local request, thus return STR as |
| 1310 | ;; is. Otherwise, encode STR. | 1391 | ;; is. Otherwise, encode STR. |
| @@ -1314,28 +1395,9 @@ in `selection-converter-alist', which see." | |||
| 1314 | (remove-text-properties 0 (length str) '(composition nil) str) | 1395 | (remove-text-properties 0 (length str) '(composition nil) str) |
| 1315 | (cond | 1396 | (cond |
| 1316 | ((eq type 'public.utf16-plain-text) | 1397 | ((eq type 'public.utf16-plain-text) |
| 1317 | (let (s) | 1398 | (setq str (mac-string-to-utxt str coding))) |
| 1318 | (when (and (fboundp 'mac-code-convert-string) | ||
| 1319 | (memq coding (find-coding-systems-string str))) | ||
| 1320 | (setq coding (coding-system-change-eol-conversion coding 'mac)) | ||
| 1321 | (setq s (mac-code-convert-string | ||
| 1322 | (encode-coding-string str coding) | ||
| 1323 | coding nil))) | ||
| 1324 | (setq str (or s | ||
| 1325 | (encode-coding-string str | ||
| 1326 | (if (eq (byteorder) ?B) | ||
| 1327 | 'utf-16be-mac | ||
| 1328 | 'utf-16le-mac)))))) | ||
| 1329 | ((eq type 'com.apple.traditional-mac-plain-text) | 1399 | ((eq type 'com.apple.traditional-mac-plain-text) |
| 1330 | (let ((encodables (find-coding-systems-string str)) | 1400 | (setq str (mac-string-to-TEXT str coding))) |
| 1331 | (rest mac-script-code-coding-systems)) | ||
| 1332 | (unless (memq coding encodables) | ||
| 1333 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1334 | (setq rest (cdr rest))) | ||
| 1335 | (if rest | ||
| 1336 | (setq coding (cdar rest))))) | ||
| 1337 | (setq coding (coding-system-change-eol-conversion coding 'mac)) | ||
| 1338 | (setq str (encode-coding-string str coding))) | ||
| 1339 | (t | 1401 | (t |
| 1340 | (error "Unknown selection type: %S" type)) | 1402 | (error "Unknown selection type: %S" type)) |
| 1341 | ))) | 1403 | ))) |
| @@ -1433,6 +1495,17 @@ in `selection-converter-alist', which see." | |||
| 1433 | (ash (lsh result extended-sign-len) (- extended-sign-len)) | 1495 | (ash (lsh result extended-sign-len) (- extended-sign-len)) |
| 1434 | result))) | 1496 | result))) |
| 1435 | 1497 | ||
| 1498 | (defun mac-bytes-to-digits (bytes &optional from to) | ||
| 1499 | (or from (setq from 0)) | ||
| 1500 | (or to (setq to (length bytes))) | ||
| 1501 | (let ((len (- to from)) | ||
| 1502 | (val 0.0)) | ||
| 1503 | (dotimes (i len) | ||
| 1504 | (setq val (+ (* val 256.0) | ||
| 1505 | (aref bytes (+ from (if (eq (byteorder) ?B) i | ||
| 1506 | (- len i 1))))))) | ||
| 1507 | (format "%.0f" val))) | ||
| 1508 | |||
| 1436 | (defun mac-ae-selection-range (ae) | 1509 | (defun mac-ae-selection-range (ae) |
| 1437 | ;; #pragma options align=mac68k | 1510 | ;; #pragma options align=mac68k |
| 1438 | ;; typedef struct SelectionRange { | 1511 | ;; typedef struct SelectionRange { |
| @@ -1518,37 +1591,109 @@ Currently the `mailto' scheme is supported." | |||
| 1518 | 1591 | ||
| 1519 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) | 1592 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) |
| 1520 | 1593 | ||
| 1521 | (defun mac-services-open-file () | 1594 | ;;; Converted Carbon Events |
| 1595 | (defun mac-handle-toolbar-switch-mode (event) | ||
| 1596 | "Toggle visibility of tool-bars in response to EVENT. | ||
| 1597 | With no keyboard modifiers, it toggles the visibility of the | ||
| 1598 | frame where the tool-bar toggle button was pressed. With some | ||
| 1599 | modifiers, it changes global tool-bar visibility setting." | ||
| 1600 | (interactive "e") | ||
| 1601 | (let* ((ae (mac-event-ae event)) | ||
| 1602 | (modifiers (cdr (mac-ae-parameter ae "kmod")))) | ||
| 1603 | (if (and modifiers (not (string= modifiers "\000\000\000\000"))) | ||
| 1604 | ;; Globally toggle tool-bar-mode if some modifier key is pressed. | ||
| 1605 | (tool-bar-mode) | ||
| 1606 | (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae)))) | ||
| 1607 | (rest (frame-list)) | ||
| 1608 | frame) | ||
| 1609 | (while (and (null frame) rest) | ||
| 1610 | (if (string= (frame-parameter (car rest) 'window-id) window-id) | ||
| 1611 | (setq frame (car rest))) | ||
| 1612 | (setq rest (cdr rest))) | ||
| 1613 | (set-frame-parameter frame 'tool-bar-lines | ||
| 1614 | (if (= (frame-parameter frame 'tool-bar-lines) 0) | ||
| 1615 | 1 0)))))) | ||
| 1616 | |||
| 1617 | ;; kEventClassWindow/kEventWindowToolbarSwitchMode | ||
| 1618 | (define-key mac-apple-event-map [window toolbar-switch-mode] | ||
| 1619 | 'mac-handle-toolbar-switch-mode) | ||
| 1620 | |||
| 1621 | ;;; Font panel | ||
| 1622 | (when (fboundp 'mac-set-font-panel-visibility) | ||
| 1623 | |||
| 1624 | (define-minor-mode mac-font-panel-mode | ||
| 1625 | "Toggle use of the font panel. | ||
| 1626 | With numeric ARG, display the font panel if and only if ARG is positive." | ||
| 1627 | :init-value nil | ||
| 1628 | :global t | ||
| 1629 | :group 'mac | ||
| 1630 | (mac-set-font-panel-visibility mac-font-panel-mode)) | ||
| 1631 | |||
| 1632 | (defun mac-handle-font-panel-closed (event) | ||
| 1633 | "Update internal status in response to font panel closed EVENT." | ||
| 1634 | (interactive "e") | ||
| 1635 | ;; Synchronize with the minor mode variable. | ||
| 1636 | (mac-font-panel-mode 0)) | ||
| 1637 | |||
| 1638 | (defun mac-handle-font-selection (event) | ||
| 1639 | "Change default face attributes according to font selection EVENT." | ||
| 1640 | (interactive "e") | ||
| 1641 | (let* ((ae (mac-event-ae event)) | ||
| 1642 | (fm-font-size (cdr (mac-ae-parameter ae "fmsz"))) | ||
| 1643 | (atsu-font-id (cdr (mac-ae-parameter ae "auid"))) | ||
| 1644 | (attribute-values (gethash atsu-font-id mac-atsu-font-table))) | ||
| 1645 | (if fm-font-size | ||
| 1646 | (setq attribute-values | ||
| 1647 | `(:height ,(* 10 (mac-bytes-to-integer fm-font-size)) | ||
| 1648 | ,@attribute-values))) | ||
| 1649 | (apply 'set-face-attribute 'default (selected-frame) attribute-values))) | ||
| 1650 | |||
| 1651 | ;; kEventClassFont/kEventFontPanelClosed | ||
| 1652 | (define-key mac-apple-event-map [font panel-closed] | ||
| 1653 | 'mac-handle-font-panel-closed) | ||
| 1654 | ;; kEventClassFont/kEventFontSelection | ||
| 1655 | (define-key mac-apple-event-map [font selection] 'mac-handle-font-selection) | ||
| 1656 | |||
| 1657 | (define-key-after menu-bar-showhide-menu [mac-font-panel-mode] | ||
| 1658 | (menu-bar-make-mm-toggle mac-font-panel-mode | ||
| 1659 | "Font Panel" | ||
| 1660 | "Show the font panel as a floating dialog") | ||
| 1661 | 'showhide-speedbar) | ||
| 1662 | |||
| 1663 | ) ;; (fboundp 'mac-set-font-panel-visibility) | ||
| 1664 | |||
| 1665 | ;;; Services | ||
| 1666 | (defun mac-service-open-file () | ||
| 1522 | "Open the file specified by the selection value for Services." | 1667 | "Open the file specified by the selection value for Services." |
| 1523 | (interactive) | 1668 | (interactive) |
| 1524 | (find-file-existing (x-selection-value mac-services-selection))) | 1669 | (find-file-existing (x-selection-value mac-service-selection))) |
| 1525 | 1670 | ||
| 1526 | (defun mac-services-open-selection () | 1671 | (defun mac-service-open-selection () |
| 1527 | "Create a new buffer containing the selection value for Services." | 1672 | "Create a new buffer containing the selection value for Services." |
| 1528 | (interactive) | 1673 | (interactive) |
| 1529 | (switch-to-buffer (generate-new-buffer "*untitled*")) | 1674 | (switch-to-buffer (generate-new-buffer "*untitled*")) |
| 1530 | (insert (x-selection-value mac-services-selection)) | 1675 | (insert (x-selection-value mac-service-selection)) |
| 1531 | (sit-for 0) | 1676 | (sit-for 0) |
| 1532 | (save-buffer) ; It pops up the save dialog. | 1677 | (save-buffer) ; It pops up the save dialog. |
| 1533 | ) | 1678 | ) |
| 1534 | 1679 | ||
| 1535 | (defun mac-services-mail-selection () | 1680 | (defun mac-service-mail-selection () |
| 1536 | "Prepare a mail buffer containing the selection value for Services." | 1681 | "Prepare a mail buffer containing the selection value for Services." |
| 1537 | (interactive) | 1682 | (interactive) |
| 1538 | (compose-mail) | 1683 | (compose-mail) |
| 1539 | (rfc822-goto-eoh) | 1684 | (rfc822-goto-eoh) |
| 1540 | (forward-line 1) | 1685 | (forward-line 1) |
| 1541 | (insert (x-selection-value mac-services-selection) "\n")) | 1686 | (insert (x-selection-value mac-service-selection) "\n")) |
| 1542 | 1687 | ||
| 1543 | (defun mac-services-mail-to () | 1688 | (defun mac-service-mail-to () |
| 1544 | "Prepare a mail buffer to be sent to the selection value for Services." | 1689 | "Prepare a mail buffer to be sent to the selection value for Services." |
| 1545 | (interactive) | 1690 | (interactive) |
| 1546 | (compose-mail (x-selection-value mac-services-selection))) | 1691 | (compose-mail (x-selection-value mac-service-selection))) |
| 1547 | 1692 | ||
| 1548 | (defun mac-services-insert-text () | 1693 | (defun mac-service-insert-text () |
| 1549 | "Insert the selection value for Services." | 1694 | "Insert the selection value for Services." |
| 1550 | (interactive) | 1695 | (interactive) |
| 1551 | (let ((text (x-selection-value mac-services-selection))) | 1696 | (let ((text (x-selection-value mac-service-selection))) |
| 1552 | (if (not buffer-read-only) | 1697 | (if (not buffer-read-only) |
| 1553 | (insert text) | 1698 | (insert text) |
| 1554 | (kill-new text) | 1699 | (kill-new text) |
| @@ -1556,15 +1701,17 @@ Currently the `mailto' scheme is supported." | |||
| 1556 | (substitute-command-keys | 1701 | (substitute-command-keys |
| 1557 | "The text from the Services menu can be accessed with \\[yank]"))))) | 1702 | "The text from the Services menu can be accessed with \\[yank]"))))) |
| 1558 | 1703 | ||
| 1559 | (define-key mac-apple-event-map [services paste] 'mac-services-insert-text) | 1704 | ;; kEventClassService/kEventServicePaste |
| 1560 | (define-key mac-apple-event-map [services perform open-file] | 1705 | (define-key mac-apple-event-map [service paste] 'mac-service-insert-text) |
| 1561 | 'mac-services-open-file) | 1706 | ;; kEventClassService/kEventServicePerform |
| 1562 | (define-key mac-apple-event-map [services perform open-selection] | 1707 | (define-key mac-apple-event-map [service perform open-file] |
| 1563 | 'mac-services-open-selection) | 1708 | 'mac-service-open-file) |
| 1564 | (define-key mac-apple-event-map [services perform mail-selection] | 1709 | (define-key mac-apple-event-map [service perform open-selection] |
| 1565 | 'mac-services-mail-selection) | 1710 | 'mac-service-open-selection) |
| 1566 | (define-key mac-apple-event-map [services perform mail-to] | 1711 | (define-key mac-apple-event-map [service perform mail-selection] |
| 1567 | 'mac-services-mail-to) | 1712 | 'mac-service-mail-selection) |
| 1713 | (define-key mac-apple-event-map [service perform mail-to] | ||
| 1714 | 'mac-service-mail-to) | ||
| 1568 | 1715 | ||
| 1569 | (defun mac-dispatch-apple-event (event) | 1716 | (defun mac-dispatch-apple-event (event) |
| 1570 | "Dispatch EVENT according to the keymap `mac-apple-event-map'." | 1717 | "Dispatch EVENT according to the keymap `mac-apple-event-map'." |
| @@ -1589,6 +1736,83 @@ Currently the `mailto' scheme is supported." | |||
| 1589 | ;; processed when the initial frame has been created: this is where | 1736 | ;; processed when the initial frame has been created: this is where |
| 1590 | ;; the files should be opened. | 1737 | ;; the files should be opened. |
| 1591 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) | 1738 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) |
| 1739 | |||
| 1740 | |||
| 1741 | ;;;; Drag and drop | ||
| 1742 | |||
| 1743 | (defcustom mac-dnd-types-alist | ||
| 1744 | '(("furl" . mac-dnd-handle-furl) | ||
| 1745 | ("hfs " . mac-dnd-handle-hfs) | ||
| 1746 | ("utxt" . mac-dnd-insert-utxt) | ||
| 1747 | ("TEXT" . mac-dnd-insert-TEXT) | ||
| 1748 | ("TIFF" . mac-dnd-insert-TIFF)) | ||
| 1749 | "Which function to call to handle a drop of that type. | ||
| 1750 | The function takes three arguments, WINDOW, ACTION and DATA. | ||
| 1751 | WINDOW is where the drop occured, ACTION is always `private' on | ||
| 1752 | Mac. DATA is the drop data. Unlike the x-dnd counterpart, the | ||
| 1753 | return value of the function is not significant. | ||
| 1754 | |||
| 1755 | See also `mac-dnd-known-types'." | ||
| 1756 | :version "22.1" | ||
| 1757 | :type 'alist | ||
| 1758 | :group 'mac) | ||
| 1759 | |||
| 1760 | (defun mac-dnd-handle-furl (window action data) | ||
| 1761 | (dnd-handle-one-url window action (mac-furl-to-string data))) | ||
| 1762 | |||
| 1763 | (defun mac-dnd-handle-hfs (window action data) | ||
| 1764 | ;; struct HFSFlavor { | ||
| 1765 | ;; OSType fileType; | ||
| 1766 | ;; OSType fileCreator; | ||
| 1767 | ;; UInt16 fdFlags; | ||
| 1768 | ;; FSSpec fileSpec; | ||
| 1769 | ;; }; | ||
| 1770 | (let* ((file-name (mac-coerce-ae-data "fss " (substring data 10) | ||
| 1771 | 'undecoded-file-name)) | ||
| 1772 | (url (concat "file://" | ||
| 1773 | (mapconcat 'url-hexify-string | ||
| 1774 | (split-string file-name "/") "/")))) | ||
| 1775 | (dnd-handle-one-url window action url))) | ||
| 1776 | |||
| 1777 | (defun mac-dnd-insert-utxt (window action data) | ||
| 1778 | (dnd-insert-text window action (mac-utxt-to-string data))) | ||
| 1779 | |||
| 1780 | (defun mac-dnd-insert-TEXT (window action data) | ||
| 1781 | (dnd-insert-text window action (mac-TEXT-to-string data))) | ||
| 1782 | |||
| 1783 | (defun mac-dnd-insert-TIFF (window action data) | ||
| 1784 | (dnd-insert-text window action (mac-TIFF-to-string data))) | ||
| 1785 | |||
| 1786 | (defun mac-dnd-drop-data (event frame window data type) | ||
| 1787 | (let* ((type-info (assoc type mac-dnd-types-alist)) | ||
| 1788 | (handler (cdr type-info)) | ||
| 1789 | (action 'private) | ||
| 1790 | (w (posn-window (event-start event)))) | ||
| 1791 | (when handler | ||
| 1792 | (if (and (windowp w) (window-live-p w) | ||
| 1793 | (not (window-minibuffer-p w)) | ||
| 1794 | (not (window-dedicated-p w))) | ||
| 1795 | ;; If dropping in an ordinary window which we could use, | ||
| 1796 | ;; let dnd-open-file-other-window specify what to do. | ||
| 1797 | (progn | ||
| 1798 | (goto-char (posn-point (event-start event))) | ||
| 1799 | (funcall handler window action data)) | ||
| 1800 | ;; If we can't display the file here, | ||
| 1801 | ;; make a new window for it. | ||
| 1802 | (let ((dnd-open-file-other-window t)) | ||
| 1803 | (select-frame frame) | ||
| 1804 | (funcall handler window action data)))))) | ||
| 1805 | |||
| 1806 | (defun mac-dnd-handle-drag-n-drop-event (event) | ||
| 1807 | "Receive drag and drop events." | ||
| 1808 | (interactive "e") | ||
| 1809 | (let ((window (posn-window (event-start event)))) | ||
| 1810 | (when (windowp window) (select-window window)) | ||
| 1811 | (dolist (item (mac-ae-list (mac-event-ae event))) | ||
| 1812 | (if (not (equal (car item) "null")) | ||
| 1813 | (mac-dnd-drop-data event (selected-frame) window | ||
| 1814 | (cdr item) (car item))))) | ||
| 1815 | (select-frame-set-input-focus (selected-frame))) | ||
| 1592 | 1816 | ||
| 1593 | ;;; Do the actual Windows setup here; the above code just defines | 1817 | ;;; Do the actual Windows setup here; the above code just defines |
| 1594 | ;;; functions and variables that we use now. | 1818 | ;;; functions and variables that we use now. |
| @@ -1884,37 +2108,11 @@ It returns a name of the created fontset." | |||
| 1884 | ;; Enable CLIPBOARD copy/paste through menu bar commands. | 2108 | ;; Enable CLIPBOARD copy/paste through menu bar commands. |
| 1885 | (menu-bar-enable-clipboard) | 2109 | (menu-bar-enable-clipboard) |
| 1886 | 2110 | ||
| 1887 | (defconst mac-system-coding-system | 2111 | ;; Initiate drag and drop |
| 1888 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 1889 | mac-script-code-coding-systems)) | ||
| 1890 | 'mac-roman))) | ||
| 1891 | (if (eq system-type 'darwin) | ||
| 1892 | base | ||
| 1893 | (coding-system-change-eol-conversion base 'mac))) | ||
| 1894 | "Coding system derived from the system script code.") | ||
| 1895 | 2112 | ||
| 1896 | (set-selection-coding-system mac-system-coding-system) | 2113 | (global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) |
| 2114 | (global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) | ||
| 1897 | 2115 | ||
| 1898 | (defun mac-drag-n-drop (event) | ||
| 1899 | "Edit the files listed in the drag-n-drop EVENT. | ||
| 1900 | Switch to a buffer editing the last file dropped." | ||
| 1901 | (interactive "e") | ||
| 1902 | ;; Make sure the drop target has positive co-ords | ||
| 1903 | ;; before setting the selected frame - otherwise it | ||
| 1904 | ;; won't work. <skx@tardis.ed.ac.uk> | ||
| 1905 | (let* ((window (posn-window (event-start event))) | ||
| 1906 | (coords (posn-x-y (event-start event))) | ||
| 1907 | (x (car coords)) | ||
| 1908 | (y (cdr coords))) | ||
| 1909 | (if (and (> x 0) (> y 0)) | ||
| 1910 | (set-frame-selected-window nil window)) | ||
| 1911 | (dolist (file-name (nth 2 event)) | ||
| 1912 | (dnd-handle-one-url window 'private | ||
| 1913 | (concat "file:" file-name)))) | ||
| 1914 | (select-frame-set-input-focus (selected-frame))) | ||
| 1915 | |||
| 1916 | (global-set-key [drag-n-drop] 'mac-drag-n-drop) | ||
| 1917 | (global-set-key [M-drag-n-drop] 'mac-drag-n-drop) | ||
| 1918 | 2116 | ||
| 1919 | ;;;; Non-toolkit Scroll bars | 2117 | ;;;; Non-toolkit Scroll bars |
| 1920 | 2118 | ||
| @@ -1979,6 +2177,7 @@ Switch to a buffer editing the last file dropped." | |||
| 1979 | (scroll-up 1))) | 2177 | (scroll-up 1))) |
| 1980 | 2178 | ||
| 1981 | ) | 2179 | ) |
| 2180 | |||
| 1982 | 2181 | ||
| 1983 | ;;;; Others | 2182 | ;;;; Others |
| 1984 | 2183 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 9cb7253b642..9ce9f34da96 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -227,6 +227,14 @@ | |||
| 227 | 227 | ||
| 228 | (define-key map "\e[4~" [select]) | 228 | (define-key map "\e[4~" [select]) |
| 229 | (define-key map "\e[29~" [print]) | 229 | (define-key map "\e[29~" [print]) |
| 230 | |||
| 231 | ;; These keys will be available xterm starting probably from | ||
| 232 | ;; version 214. | ||
| 233 | (define-key map "\e[27;5;8~" [(control ?\t)]) | ||
| 234 | (define-key map "\e[27;5;44~" [(control ?\,)]) | ||
| 235 | (define-key map "\e[27;5;46~" [(control ?\.)]) | ||
| 236 | (define-key map "\e[27;5;47~" [(control ?\/)]) | ||
| 237 | (define-key map "\e[27;5;92~" [(control ?\\)]) | ||
| 230 | 238 | ||
| 231 | ;; Other versions of xterm might emit these. | 239 | ;; Other versions of xterm might emit these. |
| 232 | (define-key map "\e[A" [up]) | 240 | (define-key map "\e[A" [up]) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index b83997baa2e..5629e8feb31 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2577,15 +2577,18 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2577 | (mapcar 'list (ispell-valid-dictionary-list))) | 2577 | (mapcar 'list (ispell-valid-dictionary-list))) |
| 2578 | nil t) | 2578 | nil t) |
| 2579 | current-prefix-arg)) | 2579 | current-prefix-arg)) |
| 2580 | (unless arg (ispell-buffer-local-dict)) | 2580 | (unless arg (ispell-buffer-local-dict 'no-reload)) |
| 2581 | (if (equal dict "default") (setq dict nil)) | 2581 | (if (equal dict "default") (setq dict nil)) |
| 2582 | ;; This relies on completing-read's bug of returning "" for no match | 2582 | ;; This relies on completing-read's bug of returning "" for no match |
| 2583 | (cond ((equal dict "") | 2583 | (cond ((equal dict "") |
| 2584 | (ispell-internal-change-dictionary) | ||
| 2584 | (message "Using %s dictionary" | 2585 | (message "Using %s dictionary" |
| 2585 | (or ispell-local-dictionary ispell-dictionary "default"))) | 2586 | (or ispell-local-dictionary ispell-dictionary "default"))) |
| 2586 | ((equal dict (or ispell-local-dictionary | 2587 | ((equal dict (or ispell-local-dictionary |
| 2587 | ispell-dictionary "default")) | 2588 | ispell-dictionary "default")) |
| 2588 | ;; Specified dictionary is the default already. No-op | 2589 | ;; Specified dictionary is the default already. Could reload |
| 2590 | ;; the dictionaries if needed. | ||
| 2591 | (ispell-internal-change-dictionary) | ||
| 2589 | (and (interactive-p) | 2592 | (and (interactive-p) |
| 2590 | (message "No change, using %s dictionary" dict))) | 2593 | (message "No change, using %s dictionary" dict))) |
| 2591 | (t ; reset dictionary! | 2594 | (t ; reset dictionary! |
| @@ -2604,13 +2607,16 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2604 | dict)))) | 2607 | dict)))) |
| 2605 | 2608 | ||
| 2606 | (defun ispell-internal-change-dictionary () | 2609 | (defun ispell-internal-change-dictionary () |
| 2607 | "Update the dictionary actually used by Ispell. | 2610 | "Update the dictionary and the personal dictionary used by Ispell. |
| 2608 | This may kill the Ispell process; if so, | 2611 | This may kill the Ispell process; if so, |
| 2609 | a new one will be started when needed." | 2612 | a new one will be started when needed." |
| 2610 | (let ((dict (or ispell-local-dictionary ispell-dictionary))) | 2613 | (let ((dict (or ispell-local-dictionary ispell-dictionary)) |
| 2611 | (unless (equal ispell-current-dictionary dict) | 2614 | (pdict (or ispell-local-pdict ispell-personal-dictionary))) |
| 2615 | (unless (and (equal ispell-current-dictionary dict) | ||
| 2616 | (equal ispell-current-personal-dictionary pdict)) | ||
| 2612 | (ispell-kill-ispell t) | 2617 | (ispell-kill-ispell t) |
| 2613 | (setq ispell-current-dictionary dict)))) | 2618 | (setq ispell-current-dictionary dict |
| 2619 | ispell-current-personal-dictionary pdict)))) | ||
| 2614 | 2620 | ||
| 2615 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. | 2621 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. |
| 2616 | 2622 | ||
| @@ -3637,8 +3643,9 @@ Includes Latex/Nroff modes and extended character mode." | |||
| 3637 | 3643 | ||
| 3638 | ;;; Can kill the current ispell process | 3644 | ;;; Can kill the current ispell process |
| 3639 | 3645 | ||
| 3640 | (defun ispell-buffer-local-dict () | 3646 | (defun ispell-buffer-local-dict (&optional no-reload) |
| 3641 | "Initializes local dictionary and local personal dictionary. | 3647 | "Initializes local dictionary and local personal dictionary. |
| 3648 | If optional NO-RELOAD is non-nil, do not make any dictionary reloading. | ||
| 3642 | When a dictionary is defined in the buffer (see variable | 3649 | When a dictionary is defined in the buffer (see variable |
| 3643 | `ispell-dictionary-keyword'), it will override the local setting | 3650 | `ispell-dictionary-keyword'), it will override the local setting |
| 3644 | from \\[ispell-change-dictionary]. | 3651 | from \\[ispell-change-dictionary]. |
| @@ -3665,12 +3672,9 @@ Both should not be used to define a buffer-local dictionary." | |||
| 3665 | (if (re-search-forward " *\\([^ \"]+\\)" end t) | 3672 | (if (re-search-forward " *\\([^ \"]+\\)" end t) |
| 3666 | (setq ispell-local-pdict | 3673 | (setq ispell-local-pdict |
| 3667 | (match-string-no-properties 1))))))) | 3674 | (match-string-no-properties 1))))))) |
| 3668 | ;; Reload if new personal dictionary defined. | 3675 | (unless no-reload |
| 3669 | (if (not (equal ispell-current-personal-dictionary | 3676 | ;; Reload if new dictionary (maybe the personal one) defined. |
| 3670 | (or ispell-local-pdict ispell-personal-dictionary))) | 3677 | (ispell-internal-change-dictionary))) |
| 3671 | (ispell-kill-ispell t)) | ||
| 3672 | ;; Reload if new dictionary defined. | ||
| 3673 | (ispell-internal-change-dictionary)) | ||
| 3674 | 3678 | ||
| 3675 | 3679 | ||
| 3676 | (defun ispell-buffer-local-words () | 3680 | (defun ispell-buffer-local-words () |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 92bdf480e06..1c3e383c9fb 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-05-05 Andreas Seltenreich <seltenreich@gmx.de> (tiny change) | ||
| 2 | |||
| 3 | * url-http.el (url-http-parse-headers): Don't reuse connection if | ||
| 4 | "Connection: close" header was seen. | ||
| 5 | |||
| 1 | 2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * url-gw.el (url-open-stream): Don't hide errors. | 8 | * url-gw.el (url-open-stream): Don't hide errors. |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index c401094593e..45bf97ec6b6 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -386,6 +386,10 @@ should be shown to the user." | |||
| 386 | (url-http-parse-response) | 386 | (url-http-parse-response) |
| 387 | (mail-narrow-to-head) | 387 | (mail-narrow-to-head) |
| 388 | ;;(narrow-to-region (point-min) url-http-end-of-headers) | 388 | ;;(narrow-to-region (point-min) url-http-end-of-headers) |
| 389 | (let ((connection (mail-fetch-field "Connection"))) | ||
| 390 | (if (and connection | ||
| 391 | (string= (downcase connection) "close")) | ||
| 392 | (delete-process url-http-process))) | ||
| 389 | (let ((class nil) | 393 | (let ((class nil) |
| 390 | (success nil)) | 394 | (success nil)) |
| 391 | (setq class (/ url-http-response-status 100)) | 395 | (setq class (/ url-http-response-status 100)) |