diff options
| author | Karoly Lorentey | 2006-05-10 15:04:01 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-05-10 15:04:01 +0000 |
| commit | 8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e (patch) | |
| tree | 6262988e87d6b347a8c90fcc3c5b49f9bb5b36e1 /lisp | |
| parent | f6cf85ac95e469835a2643024f995b471a4c5d52 (diff) | |
| parent | 9a4d87c8d5f4503d67d5155eae6d543cc31f86d0 (diff) | |
| download | emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.tar.gz emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-266
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-267
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-268
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-269
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-270
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-271
Rename "field-at-point" to "field-at-pos"
* emacs@sv.gnu.org/emacs--devo--0--patch-272
(comint-insert-input): Remove redundant calls to setq and goto-char
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
Diffstat (limited to 'lisp')
40 files changed, 983 insertions, 489 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c3c58767f7..4b3f30e9692 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,242 @@ | |||
| 1 | 2006-05-09 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * comint.el (comint-insert-input): Remove redundant calls to setq | ||
| 4 | and goto-char. | ||
| 5 | |||
| 6 | 2006-05-10 Nick Roberts <nickrob@snap.net.nz> | ||
| 7 | |||
| 8 | * comint.el (comint-insert-input): Make it work when | ||
| 9 | comint-use-prompt-regexp is t. | ||
| 10 | |||
| 11 | 2006-05-10 Miles Bader <miles@gnu.org> | ||
| 12 | |||
| 13 | * subr.el (field-at-pos): New function. | ||
| 14 | |||
| 15 | * comint.el (comint-insert-input): Use it. | ||
| 16 | |||
| 17 | 2006-05-09 Juri Linkov <juri@jurta.org> | ||
| 18 | |||
| 19 | * battery.el (battery-linux-proc-acpi): Also try | ||
| 20 | `/proc/acpi/thermal_zone/THR2/temperature'. | ||
| 21 | |||
| 22 | * files.el <safe-local-variable>: Remove `eval' and `let' binding | ||
| 23 | for now unused lambda `string-or-null'. | ||
| 24 | |||
| 25 | * add-log.el (change-log-default-name): Put `string-or-null-p' | ||
| 26 | instead of lambda on `safe-local-variable' property. | ||
| 27 | |||
| 28 | * diff-mode.el (diff-context->unified): Use `region-beginning' and | ||
| 29 | `region-end' instead of `mark' and `point'. | ||
| 30 | (diff-unified->context, diff-reverse-direction, diff-fixup-modifs): | ||
| 31 | Operate on region in Transient Mark mode when the mark is active. | ||
| 32 | Use `region-beginning' and `region-end' instead of `mark' and | ||
| 33 | `point'. | ||
| 34 | (diff-hunk-text, diff-goto-source): Doc fix. | ||
| 35 | |||
| 36 | * startup.el (fancy-splash-screens, normal-splash-screen): Use | ||
| 37 | face `mode-line-buffer-id' for mode-line buffer face instead of | ||
| 38 | hard-coded `(:weight bold)'. | ||
| 39 | |||
| 40 | * arc-mode.el (archive-set-buffer-as-visiting-file): Bind | ||
| 41 | buffer-undo-list to t (undo-ask is reproducible by visiting | ||
| 42 | nested archives). | ||
| 43 | |||
| 44 | 2006-05-09 Kim F. Storm <storm@cua.dk> | ||
| 45 | |||
| 46 | * progmodes/grep.el (rgrep): Set default directory of *grep* | ||
| 47 | buffer if we start M-x rgrep in the *grep* buffer and choose | ||
| 48 | a different base directory. | ||
| 49 | |||
| 50 | 2006-05-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 51 | |||
| 52 | * net/tramp.el (tramp-register-file-name-handlers): Enable Tramp | ||
| 53 | completion also when ido is loaded. | ||
| 54 | |||
| 55 | 2006-05-09 Masatake YAMATO <jet@gyve.org> | ||
| 56 | |||
| 57 | * font-lock.el (cpp-font-lock-keywords-source-directives): Addded | ||
| 58 | "warning" and "import". | ||
| 59 | (cpp-font-lock-keywords): Added "warning". | ||
| 60 | |||
| 61 | 2006-05-08 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 62 | |||
| 63 | * term/xterm.el (terminal-init-xterm): Add more key bindings. | ||
| 64 | |||
| 65 | 2006-05-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 66 | |||
| 67 | * mwheel.el (mwheel-scroll): Make sure that when scrolling multiple | ||
| 68 | pages at a time, if we signal the end, we should indeed reach that end. | ||
| 69 | |||
| 70 | 2006-05-08 David Reitter <david.reitter@gmail.com> | ||
| 71 | |||
| 72 | * emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages | ||
| 73 | output during execution of the body. | ||
| 74 | |||
| 75 | 2006-05-08 Kim F. Storm <storm@cua.dk> | ||
| 76 | |||
| 77 | * progmodes/grep.el (lgrep, rgrep): Doc fixes. | ||
| 78 | |||
| 79 | 2006-05-08 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 80 | |||
| 81 | * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*): | ||
| 82 | Use with-current-buffer. | ||
| 83 | |||
| 84 | 2006-05-07 Kim F. Storm <storm@cua.dk> | ||
| 85 | |||
| 86 | * subr.el (add-to-history): Remove keep-dups arg. | ||
| 87 | |||
| 88 | * kmacro.el (kmacro-push-ring): Let-bind history-delete-duplicates | ||
| 89 | to nil around call to add-to-history. | ||
| 90 | |||
| 91 | 2006-05-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 92 | |||
| 93 | * emacs-lisp/syntax.el (syntax-ppss): Flush the cache before rather | ||
| 94 | than after a buffer modification. | ||
| 95 | |||
| 96 | 2006-05-08 Nick Roberts <nickrob@snap.net.nz> | ||
| 97 | |||
| 98 | * progmodes/gdb-ui.el (gdb-var-create-handler): Move speedbar | ||
| 99 | call to... | ||
| 100 | (gud-watch): ...here so speedbar is raised for already watched | ||
| 101 | expressions. | ||
| 102 | (gdb-speedbar-refresh): Delete function. | ||
| 103 | (gdb-speedbar-update, gdb-speedbar-timer-fn): New functions. | ||
| 104 | Use speedbar-timer-fn instead of speedbar-refresh (reverting | ||
| 105 | earlier change). | ||
| 106 | (gdb-var-evaluate-expression-handler) | ||
| 107 | (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Use it. | ||
| 108 | |||
| 109 | * speedbar.el (speedbar-timer-fn): Remove save-window-excursion. | ||
| 110 | Update localized contents for all buffers except ignored modes. | ||
| 111 | |||
| 112 | 2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 113 | |||
| 114 | * term/mac-win.el (mac-utxt-to-string): Use `eq' instead of `='. | ||
| 115 | (mac-atsu-font-table, mac-font-panel-mode): Add defvars. | ||
| 116 | (mac-bytes-to-digits, mac-handle-toolbar-switch-mode) | ||
| 117 | (mac-handle-font-panel-closed, mac-handle-font-selection): | ||
| 118 | New functions. | ||
| 119 | (mac-font-panel-mode): New minor mode. | ||
| 120 | (mac-apple-event-map): Add bindings for toolbar toggle button and | ||
| 121 | font panel. | ||
| 122 | (menu-bar-showhide-menu): Add mac-font-panel-mode. | ||
| 123 | |||
| 124 | 2006-05-07 John Paul Wallington <jpw@pobox.com> | ||
| 125 | |||
| 126 | * ibuffer.el (ibuffer-compressed-file-name-regexp): | ||
| 127 | Avoid `regexp-opt'; simplify regexp for readability. | ||
| 128 | |||
| 129 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 130 | |||
| 131 | * ldefs-boot.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 132 | * files.el (buffer-stale-function): | ||
| 133 | * dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 134 | * autorevert.el (global-auto-revert-non-file-buffers): Point Info | ||
| 135 | links to the main manual, not to emacs-xtra. | ||
| 136 | |||
| 137 | 2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 138 | |||
| 139 | * term/mac-win.el: (mac-utxt-to-string): Don't make adjustment for | ||
| 140 | MacJapanese if text is ASCII-only. | ||
| 141 | |||
| 142 | 2006-05-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 143 | |||
| 144 | * progmodes/gdb-ui.el (gdb-goto-breakpoint): Use or instead of | ||
| 145 | unless so nil isn't returned. | ||
| 146 | (gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window. | ||
| 147 | |||
| 148 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 149 | |||
| 150 | * subr.el (add-to-history): New function. | ||
| 151 | |||
| 152 | * ediff.el (ediff-files, ediff-files3, ediff-merge-files) | ||
| 153 | (ediff-merge-files-with-ancestor): | ||
| 154 | * env.el (setenv): | ||
| 155 | * isearch.el (isearch-update-ring): | ||
| 156 | * server.el (server-visit-files): | ||
| 157 | * progmodes/grep.el (lgrep, rgrep): | ||
| 158 | * progmodes/vhdl-mode.el (vhdl-generate-makefile-1): | ||
| 159 | * progmodes/xscheme.el (xscheme-insert-expression): | ||
| 160 | Use add-to-history. | ||
| 161 | |||
| 162 | * kmacro.el (kmacro-push-ring): Use add-to-history. | ||
| 163 | (kmacro-ring-length): Remove unused defun. | ||
| 164 | (kmacro-start-macro): Use kmacro-push-ring. | ||
| 165 | |||
| 166 | 2006-05-06 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 167 | |||
| 168 | * emacs-lisp/ewoc.el (ewoc-create, ewoc-set-hf): Use `insert' | ||
| 169 | directly instead of a lambda expression that calls it. | ||
| 170 | |||
| 171 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 172 | |||
| 173 | * avoid.el (mouse-avoidance-point-position): Use posn-at-point | ||
| 174 | instead of compute-motion. | ||
| 175 | |||
| 176 | 2006-05-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 177 | |||
| 178 | * ibuffer.el (ibuffer-compressed-file-name-regexp): Undo previous | ||
| 179 | change. | ||
| 180 | |||
| 181 | 2006-05-05 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 182 | |||
| 183 | * startup.el (command-line-1): Refer to "Pure Storage" on | ||
| 184 | pure-space-overflow. | ||
| 185 | |||
| 186 | 2006-05-05 Martin Rudalics <rudalics@gmx.at> | ||
| 187 | |||
| 188 | * emacs-lisp/re-builder.el (reb-update-overlays): Cycle through | ||
| 189 | provided faces once they all have been used up. | ||
| 190 | |||
| 191 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 192 | |||
| 193 | * startup.el (normal-splash-screen, fancy-splash-screens-1): Add a | ||
| 194 | reference to the Lisp manual to the warning about pure space | ||
| 195 | overflow. | ||
| 196 | |||
| 197 | 2006-05-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 198 | |||
| 199 | * textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload' | ||
| 200 | argument to avoid the call to `ispell-internal-change-dictionary' | ||
| 201 | when not needed. | ||
| 202 | (ispell-change-dictionary): Use this argument and call | ||
| 203 | `ispell-internal-change-dictionary' after the possible change | ||
| 204 | to `ispell-local-dictionary'. | ||
| 205 | (ispell-internal-change-dictionary): Check for a change in | ||
| 206 | personal dictionary use too. | ||
| 207 | Cosmetic changes from Agustin Martin | ||
| 208 | <agustin.martin@hispalinux.es>. | ||
| 209 | |||
| 210 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 211 | |||
| 212 | * startup.el (command-line): On MS-Windows, probe "~", not | ||
| 213 | "~USER", for warning about non-existent home directory | ||
| 214 | |||
| 215 | * arc-mode.el (archive-l-e): New optional argument `float' means | ||
| 216 | generate a float value. | ||
| 217 | (archive-arc-summarize, archive-lzh-summarize) | ||
| 218 | (archive-zip-summarize, archive-zoo-summarize): Invoke archive-l-e | ||
| 219 | with 3rd argument non-nil when file's size is being computed. | ||
| 220 | Format the file sizes with %8.0f instead of %8d. | ||
| 221 | |||
| 222 | 2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 223 | |||
| 224 | * cus-start.el (all): Add mac-dnd-known-types. | ||
| 225 | |||
| 226 | * term/mac-win.el: (mac-utxt-to-string, mac-string-to-utxt) | ||
| 227 | (mac-TEXT-to-string, mac-string-to-TEXT, mac-furl-to-string) | ||
| 228 | (mac-TIFF-to-string): New functions. | ||
| 229 | (x-get-selection, x-selection-value) | ||
| 230 | (mac-select-convert-to-string): Use them. | ||
| 231 | (mac-text-encoding-mac-japanese-basic-variant): New constant. | ||
| 232 | (mac-dnd-types-alist): New customization variable. | ||
| 233 | (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt) | ||
| 234 | (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data) | ||
| 235 | (mac-dnd-handle-drag-n-drop-event): New functions. | ||
| 236 | (mac-drag-n-drop): Remove function. | ||
| 237 | (global-map): Bind drag-n-drop and M-drag-n-drop to | ||
| 238 | mac-dnd-handle-drag-n-drop-event. | ||
| 239 | |||
| 1 | 2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org> | 240 | 2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org> |
| 2 | 241 | ||
| 3 | * progmodes/perl-mode.el (perl-beginning-of-function): | 242 | * progmodes/perl-mode.el (perl-beginning-of-function): |
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 abf38994235..96b41eca88d 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -464,10 +464,12 @@ Each descriptor is a vector of the form | |||
| 464 | (defsubst archive-name (suffix) | 464 | (defsubst archive-name (suffix) |
| 465 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) | 465 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) |
| 466 | 466 | ||
| 467 | (defun archive-l-e (str &optional len) | 467 | (defun archive-l-e (str &optional len float) |
| 468 | "Convert little endian string/vector STR to integer. | 468 | "Convert little endian string/vector STR to integer. |
| 469 | Alternatively, STR may be a buffer position in the current buffer | 469 | Alternatively, STR may be a buffer position in the current buffer |
| 470 | in which case a second argument, length LEN, should be supplied." | 470 | in which case a second argument, length LEN, should be supplied. |
| 471 | FLOAT, if non-nil, means generate and return a float instead of an integer | ||
| 472 | \(use this for numbers that can overflow the Emacs integer)." | ||
| 471 | (if (stringp str) | 473 | (if (stringp str) |
| 472 | (setq len (length str)) | 474 | (setq len (length str)) |
| 473 | (setq str (buffer-substring str (+ str len)))) | 475 | (setq str (buffer-substring str (+ str len)))) |
| @@ -475,7 +477,8 @@ in which case a second argument, length LEN, should be supplied." | |||
| 475 | (i 0)) | 477 | (i 0)) |
| 476 | (while (< i len) | 478 | (while (< i len) |
| 477 | (setq i (1+ i) | 479 | (setq i (1+ i) |
| 478 | result (+ (ash result 8) (aref str (- len i))))) | 480 | result (+ (if float (* result 256.0) (ash result 8)) |
| 481 | (aref str (- len i))))) | ||
| 479 | result)) | 482 | result)) |
| 480 | 483 | ||
| 481 | (defun archive-int-to-mode (mode) | 484 | (defun archive-int-to-mode (mode) |
| @@ -860,7 +863,8 @@ using `make-temp-file', and the generated name is returned." | |||
| 860 | "Set the current buffer as if it were visiting FILENAME." | 863 | "Set the current buffer as if it were visiting FILENAME." |
| 861 | (save-excursion | 864 | (save-excursion |
| 862 | (goto-char (point-min)) | 865 | (goto-char (point-min)) |
| 863 | (let ((coding | 866 | (let ((buffer-undo-list t) |
| 867 | (coding | ||
| 864 | (or coding-system-for-read | 868 | (or coding-system-for-read |
| 865 | (and set-auto-coding-function | 869 | (and set-auto-coding-function |
| 866 | (save-excursion | 870 | (save-excursion |
| @@ -1331,13 +1335,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1331 | (let* ((namefld (buffer-substring (+ p 2) (+ p 2 13))) | 1335 | (let* ((namefld (buffer-substring (+ p 2) (+ p 2 13))) |
| 1332 | (fnlen (or (string-match "\0" namefld) 13)) | 1336 | (fnlen (or (string-match "\0" namefld) 13)) |
| 1333 | (efnname (substring namefld 0 fnlen)) | 1337 | (efnname (substring namefld 0 fnlen)) |
| 1334 | (csize (archive-l-e (+ p 15) 4)) | 1338 | ;; Convert to float to avoid overflow for very large files. |
| 1339 | (csize (archive-l-e (+ p 15) 4 'float)) | ||
| 1335 | (moddate (archive-l-e (+ p 19) 2)) | 1340 | (moddate (archive-l-e (+ p 19) 2)) |
| 1336 | (modtime (archive-l-e (+ p 21) 2)) | 1341 | (modtime (archive-l-e (+ p 21) 2)) |
| 1337 | (ucsize (archive-l-e (+ p 25) 4)) | 1342 | (ucsize (archive-l-e (+ p 25) 4 'float)) |
| 1338 | (fiddle (string= efnname (upcase efnname))) | 1343 | (fiddle (string= efnname (upcase efnname))) |
| 1339 | (ifnname (if fiddle (downcase efnname) efnname)) | 1344 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1340 | (text (format " %8d %-11s %-8s %s" | 1345 | (text (format " %8.0f %-11s %-8s %s" |
| 1341 | ucsize | 1346 | ucsize |
| 1342 | (archive-dosdate moddate) | 1347 | (archive-dosdate moddate) |
| 1343 | (archive-dostime modtime) | 1348 | (archive-dostime modtime) |
| @@ -1359,7 +1364,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1359 | dash) | 1364 | dash) |
| 1360 | (archive-summarize-files (nreverse visual)) | 1365 | (archive-summarize-files (nreverse visual)) |
| 1361 | (insert dash | 1366 | (insert dash |
| 1362 | (format " %8d %d file%s" | 1367 | (format " %8.0f %d file%s" |
| 1363 | totalsize | 1368 | totalsize |
| 1364 | (length files) | 1369 | (length files) |
| 1365 | (if (= 1 (length files)) "" "s")) | 1370 | (if (= 1 (length files)) "" "s")) |
| @@ -1393,9 +1398,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1393 | (while (progn (goto-char p) ;beginning of a base header. | 1398 | (while (progn (goto-char p) ;beginning of a base header. |
| 1394 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) | 1399 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) |
| 1395 | (let* ((hsize (char-after p)) ;size of the base header (level 0 and 1) | 1400 | (let* ((hsize (char-after p)) ;size of the base header (level 0 and 1) |
| 1396 | (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2), | 1401 | ;; Convert to float to avoid overflow for very large files. |
| 1402 | (csize (archive-l-e (+ p 7) 4 'float)) ;size of a compressed file to follow (level 0 and 2), | ||
| 1397 | ;size of extended headers + the compressed file to follow (level 1). | 1403 | ;size of extended headers + the compressed file to follow (level 1). |
| 1398 | (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file. | 1404 | (ucsize (archive-l-e (+ p 11) 4 'float)) ;size of an uncompressed file. |
| 1399 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers | 1405 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers |
| 1400 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1406 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
| 1401 | (hdrlvl (char-after (+ p 20))) ;header level | 1407 | (hdrlvl (char-after (+ p 20))) ;header level |
| @@ -1471,12 +1477,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1471 | (archive-unixtime time1 time2) | 1477 | (archive-unixtime time1 time2) |
| 1472 | (archive-dostime time1))) | 1478 | (archive-dostime time1))) |
| 1473 | (setq text (if archive-alternate-display | 1479 | (setq text (if archive-alternate-display |
| 1474 | (format " %8d %5S %5S %s" | 1480 | (format " %8.0f %5S %5S %s" |
| 1475 | ucsize | 1481 | ucsize |
| 1476 | (or uid "?") | 1482 | (or uid "?") |
| 1477 | (or gid "?") | 1483 | (or gid "?") |
| 1478 | ifnname) | 1484 | ifnname) |
| 1479 | (format " %10s %8d %-11s %-8s %s" | 1485 | (format " %10s %8.0f %-11s %-8s %s" |
| 1480 | modestr | 1486 | modestr |
| 1481 | ucsize | 1487 | ucsize |
| 1482 | moddate | 1488 | moddate |
| @@ -1506,8 +1512,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1506 | "M Length Uid Gid File\n" | 1512 | "M Length Uid Gid File\n" |
| 1507 | "M Filemode Length Date Time File\n")) | 1513 | "M Filemode Length Date Time File\n")) |
| 1508 | (sumline (if archive-alternate-display | 1514 | (sumline (if archive-alternate-display |
| 1509 | " %8d %d file%s" | 1515 | " %8.0f %d file%s" |
| 1510 | " %8d %d file%s"))) | 1516 | " %8.0f %d file%s"))) |
| 1511 | (insert header dash) | 1517 | (insert header dash) |
| 1512 | (archive-summarize-files (nreverse visual)) | 1518 | (archive-summarize-files (nreverse visual)) |
| 1513 | (insert dash | 1519 | (insert dash |
| @@ -1603,7 +1609,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1603 | ;; (method (archive-l-e (+ p 10) 2)) | 1609 | ;; (method (archive-l-e (+ p 10) 2)) |
| 1604 | (modtime (archive-l-e (+ p 12) 2)) | 1610 | (modtime (archive-l-e (+ p 12) 2)) |
| 1605 | (moddate (archive-l-e (+ p 14) 2)) | 1611 | (moddate (archive-l-e (+ p 14) 2)) |
| 1606 | (ucsize (archive-l-e (+ p 24) 4)) | 1612 | ;; Convert to float to avoid overflow for very large files. |
| 1613 | (ucsize (archive-l-e (+ p 24) 4 'float)) | ||
| 1607 | (fnlen (archive-l-e (+ p 28) 2)) | 1614 | (fnlen (archive-l-e (+ p 28) 2)) |
| 1608 | (exlen (archive-l-e (+ p 30) 2)) | 1615 | (exlen (archive-l-e (+ p 30) 2)) |
| 1609 | (fclen (archive-l-e (+ p 32) 2)) | 1616 | (fclen (archive-l-e (+ p 32) 2)) |
| @@ -1629,7 +1636,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1629 | (string= (upcase efnname) efnname))) | 1636 | (string= (upcase efnname) efnname))) |
| 1630 | (ifnname (if fiddle (downcase efnname) efnname)) | 1637 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1631 | (width (string-width ifnname)) | 1638 | (width (string-width ifnname)) |
| 1632 | (text (format " %10s %8d %-11s %-8s %s" | 1639 | (text (format " %10s %8.0f %-11s %-8s %s" |
| 1633 | modestr | 1640 | modestr |
| 1634 | ucsize | 1641 | ucsize |
| 1635 | (archive-dosdate moddate) | 1642 | (archive-dosdate moddate) |
| @@ -1655,7 +1662,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1655 | dash) | 1662 | dash) |
| 1656 | (archive-summarize-files (nreverse visual)) | 1663 | (archive-summarize-files (nreverse visual)) |
| 1657 | (insert dash | 1664 | (insert dash |
| 1658 | (format " %8d %d file%s" | 1665 | (format " %8.0f %d file%s" |
| 1659 | totalsize | 1666 | totalsize |
| 1660 | (length files) | 1667 | (length files) |
| 1661 | (if (= 1 (length files)) "" "s")) | 1668 | (if (= 1 (length files)) "" "s")) |
| @@ -1709,7 +1716,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1709 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) | 1716 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) |
| 1710 | (moddate (archive-l-e (+ p 14) 2)) | 1717 | (moddate (archive-l-e (+ p 14) 2)) |
| 1711 | (modtime (archive-l-e (+ p 16) 2)) | 1718 | (modtime (archive-l-e (+ p 16) 2)) |
| 1712 | (ucsize (archive-l-e (+ p 20) 4)) | 1719 | ;; Convert to float to avoid overflow for very large files. |
| 1720 | (ucsize (archive-l-e (+ p 20) 4 'float)) | ||
| 1713 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) | 1721 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) |
| 1714 | (dirtype (char-after (+ p 4))) | 1722 | (dirtype (char-after (+ p 4))) |
| 1715 | (lfnlen (if (= dirtype 2) (char-after (+ p 56)) 0)) | 1723 | (lfnlen (if (= dirtype 2) (char-after (+ p 56)) 0)) |
| @@ -1733,7 +1741,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1733 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) | 1741 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) |
| 1734 | (ifnname (if fiddle (downcase efnname) efnname)) | 1742 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1735 | (width (string-width ifnname)) | 1743 | (width (string-width ifnname)) |
| 1736 | (text (format " %8d %-11s %-8s %s" | 1744 | (text (format " %8.0f %-11s %-8s %s" |
| 1737 | ucsize | 1745 | ucsize |
| 1738 | (archive-dosdate moddate) | 1746 | (archive-dosdate moddate) |
| 1739 | (archive-dostime modtime) | 1747 | (archive-dostime modtime) |
| @@ -1755,7 +1763,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1755 | dash) | 1763 | dash) |
| 1756 | (archive-summarize-files (nreverse visual)) | 1764 | (archive-summarize-files (nreverse visual)) |
| 1757 | (insert dash | 1765 | (insert dash |
| 1758 | (format " %8d %d file%s" | 1766 | (format " %8.0f %d file%s" |
| 1759 | totalsize | 1767 | totalsize |
| 1760 | (length files) | 1768 | (length files) |
| 1761 | (if (= 1 (length files)) "" "s")) | 1769 | (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/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 f15dc3f7a4c..3110252288b 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -193,6 +193,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 193 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) | 193 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) |
| 194 | (integer :tag "time" 2) | 194 | (integer :tag "time" 2) |
| 195 | (other :tag "on"))) | 195 | (other :tag "on"))) |
| 196 | ;; macselect.c | ||
| 197 | (mac-dnd-known-types mac (repeat string) "22.1") | ||
| 196 | ;; macterm.c | 198 | ;; macterm.c |
| 197 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) | 199 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) |
| 198 | (const control) (const meta) | 200 | (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/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..278ffe6e7ca 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el | |||
| @@ -221,16 +221,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 | 221 | dll will be bound when VARLIST is initialized, but the current |
| 222 | buffer will *not* have been changed. | 222 | buffer will *not* have been changed. |
| 223 | Return value of last form in FORMS." | 223 | Return value of last form in FORMS." |
| 224 | (let ((old-buffer (make-symbol "old-buffer")) | 224 | (let ((hnd (make-symbol "ewoc"))) |
| 225 | (hnd (make-symbol "ewoc"))) | 225 | `(let* ((,hnd ,ewoc) |
| 226 | `(let* ((,old-buffer (current-buffer)) | ||
| 227 | (,hnd ,ewoc) | ||
| 228 | (dll (ewoc--dll ,hnd)) | 226 | (dll (ewoc--dll ,hnd)) |
| 229 | ,@varlist) | 227 | ,@varlist) |
| 230 | (set-buffer (ewoc--buffer ,hnd)) | 228 | (with-current-buffer (ewoc--buffer ,hnd) |
| 231 | (unwind-protect | 229 | ,@forms)))) |
| 232 | (progn ,@forms) | ||
| 233 | (set-buffer ,old-buffer))))) | ||
| 234 | 230 | ||
| 235 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) | 231 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) |
| 236 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) | 232 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) |
| @@ -322,8 +318,8 @@ be inserted at the bottom of the ewoc." | |||
| 322 | (unless header (setq header "")) | 318 | (unless header (setq header "")) |
| 323 | (unless footer (setq footer "")) | 319 | (unless footer (setq footer "")) |
| 324 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) | 320 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) |
| 325 | (let ((foot (ewoc--create-node footer (lambda (x) (insert footer)) pos)) | 321 | (let ((foot (ewoc--create-node footer 'insert pos)) |
| 326 | (head (ewoc--create-node header (lambda (x) (insert header)) pos))) | 322 | (head (ewoc--create-node header 'insert pos))) |
| 327 | (ewoc--node-enter-first dll head) | 323 | (ewoc--node-enter-first dll head) |
| 328 | (ewoc--node-enter-last dll foot) | 324 | (ewoc--node-enter-last dll foot) |
| 329 | (setf (ewoc--header new-ewoc) head) | 325 | (setf (ewoc--header new-ewoc) head) |
| @@ -601,8 +597,8 @@ Return nil if the buffer has been deleted." | |||
| 601 | "Set the HEADER and FOOTER of EWOC." | 597 | "Set the HEADER and FOOTER of EWOC." |
| 602 | (setf (ewoc--node-data (ewoc--header ewoc)) header) | 598 | (setf (ewoc--node-data (ewoc--header ewoc)) header) |
| 603 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) | 599 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) |
| 604 | (ewoc--refresh-node (lambda (x) (insert header)) (ewoc--header ewoc)) | 600 | (ewoc--refresh-node 'insert (ewoc--header ewoc)) |
| 605 | (ewoc--refresh-node (lambda (x) (insert footer)) (ewoc--footer ewoc))) | 601 | (ewoc--refresh-node 'insert (ewoc--footer ewoc))) |
| 606 | 602 | ||
| 607 | 603 | ||
| 608 | (provide 'ewoc) | 604 | (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 66d505ee011..d0c2208fc6f 100644 --- a/lisp/env.el +++ b/lisp/env.el | |||
| @@ -133,7 +133,7 @@ a side-effect." | |||
| 133 | (let* ((var (read-envvar-name "Set environment variable: " nil)) | 133 | (let* ((var (read-envvar-name "Set environment variable: " nil)) |
| 134 | (value (getenv var))) | 134 | (value (getenv var))) |
| 135 | (when value | 135 | (when value |
| 136 | (push value setenv-history)) | 136 | (add-to-history 'setenv-history value)) |
| 137 | ;; Here finally we specify the args to give call setenv with. | 137 | ;; Here finally we specify the args to give call setenv with. |
| 138 | (list var | 138 | (list var |
| 139 | (read-from-minibuffer (format "Set %s to value: " var) | 139 | (read-from-minibuffer (format "Set %s to value: " var) |
diff --git a/lisp/files.el b/lisp/files.el index 16c0f1288a1..c79365a6926 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2350,31 +2350,29 @@ asking you for confirmation." | |||
| 2350 | ;; For variables defined in the C source code the declaration should go here: | 2350 | ;; For variables defined in the C source code the declaration should go here: |
| 2351 | 2351 | ||
| 2352 | ;; FIXME: Some variables should be moved according to the rules above. | 2352 | ;; FIXME: Some variables should be moved according to the rules above. |
| 2353 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) | 2353 | (mapc (lambda (pair) |
| 2354 | (eval | 2354 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2355 | `(mapc (lambda (pair) | 2355 | '((byte-compile-dynamic . booleanp) |
| 2356 | (put (car pair) 'safe-local-variable (cdr pair))) | 2356 | (byte-compile-dynamic-docstrings . booleanp) |
| 2357 | '((byte-compile-dynamic . booleanp) | 2357 | (byte-compile-warnings . booleanp) |
| 2358 | (byte-compile-dynamic-docstrings . booleanp) | 2358 | (c-basic-offset . integerp) |
| 2359 | (byte-compile-warnings . booleanp) | 2359 | (c-file-style . stringp) |
| 2360 | (c-basic-offset . integerp) | 2360 | (c-indent-level . integerp) |
| 2361 | (c-file-style . stringp) | 2361 | (comment-column . integerp) |
| 2362 | (c-indent-level . integerp) | 2362 | (compile-command . string-or-null-p) |
| 2363 | (comment-column . integerp) | 2363 | (find-file-visit-truename . booleanp) |
| 2364 | (compile-command . string-or-null-p) | 2364 | (fill-column . integerp) |
| 2365 | (find-file-visit-truename . booleanp) | 2365 | (fill-prefix . string-or-null-p) |
| 2366 | (fill-column . integerp) | 2366 | (indent-tabs-mode . booleanp) ;; C source code |
| 2367 | (fill-prefix . string-or-null-p) | 2367 | (kept-old-versions . integerp) |
| 2368 | (indent-tabs-mode . booleanp) ;; C source code | 2368 | (kept-new-versions . integerp) |
| 2369 | (kept-old-versions . integerp) | 2369 | (left-margin . integerp) |
| 2370 | (kept-new-versions . integerp) | 2370 | (no-byte-compile . booleanp) |
| 2371 | (left-margin . integerp) | 2371 | (no-update-autoloads . booleanp) |
| 2372 | (no-byte-compile . booleanp) | 2372 | (outline-regexp . string-or-null-p) |
| 2373 | (no-update-autoloads . booleanp) | 2373 | (tab-width . integerp) ;; C source code |
| 2374 | (outline-regexp . string-or-null-p) | 2374 | (truncate-lines . booleanp) ;; C source code |
| 2375 | (tab-width . integerp) ;; C source code | 2375 | (version-control . symbolp))) |
| 2376 | (truncate-lines . booleanp) ;; C source code | ||
| 2377 | (version-control . symbolp))))) | ||
| 2378 | 2376 | ||
| 2379 | (put 'c-set-style 'safe-local-eval-function t) | 2377 | (put 'c-set-style 'safe-local-eval-function t) |
| 2380 | 2378 | ||
| @@ -3932,7 +3930,7 @@ user. In such situations, one has to be careful with potentially | |||
| 3932 | time consuming operations. | 3930 | time consuming operations. |
| 3933 | 3931 | ||
| 3934 | For more information on how this variable is used by Auto Revert mode, | 3932 | For more information on how this variable is used by Auto Revert mode, |
| 3935 | see Info node `(emacs-xtra)Supporting additional buffers'.") | 3933 | see Info node `(emacs)Supporting additional buffers'.") |
| 3936 | 3934 | ||
| 3937 | (defvar before-revert-hook nil | 3935 | (defvar before-revert-hook nil |
| 3938 | "Normal hook for `revert-buffer' to run before reverting. | 3936 | "Normal hook for `revert-buffer' to run before reverting. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c2b8d7200da..f001a0bfaac 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1974,17 +1974,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 1974 | ;; | 1974 | ;; |
| 1975 | ;; (regexp-opt | 1975 | ;; (regexp-opt |
| 1976 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1976 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1977 | ;; "ifndef" "include" "line" "pragma" "undef")) | 1977 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")) |
| 1978 | ;; | 1978 | ;; |
| 1979 | (defconst cpp-font-lock-keywords-source-directives | 1979 | (defconst cpp-font-lock-keywords-source-directives |
| 1980 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef" | 1980 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" |
| 1981 | "Regular expressoin used in `cpp-font-lock-keywords'.") | 1981 | "Regular expressoin used in `cpp-font-lock-keywords'.") |
| 1982 | 1982 | ||
| 1983 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: | 1983 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: |
| 1984 | ;; | 1984 | ;; |
| 1985 | ;; (regexp-opt-depth (regexp-opt | 1985 | ;; (regexp-opt-depth (regexp-opt |
| 1986 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1986 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1987 | ;; "ifndef" "include" "line" "pragma" "undef"))) | 1987 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))) |
| 1988 | ;; | 1988 | ;; |
| 1989 | (defconst cpp-font-lock-keywords-source-depth 0 | 1989 | (defconst cpp-font-lock-keywords-source-depth 0 |
| 1990 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. | 1990 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. |
| @@ -1996,7 +1996,7 @@ Used in `cpp-font-lock-keywords'.") | |||
| 1996 | (list | 1996 | (list |
| 1997 | ;; | 1997 | ;; |
| 1998 | ;; Fontify error directives. | 1998 | ;; Fontify error directives. |
| 1999 | '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) | 1999 | '("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) |
| 2000 | ;; | 2000 | ;; |
| 2001 | ;; Fontify filenames in #include <...> preprocessor directives as strings. | 2001 | ;; Fontify filenames in #include <...> preprocessor directives as strings. |
| 2002 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" | 2002 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 4b1069b26c1..6264d2e56b5 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -324,14 +324,11 @@ directory, like `default-directory'." | |||
| 324 | :type '(repeat function) | 324 | :type '(repeat function) |
| 325 | :group 'ibuffer) | 325 | :group 'ibuffer) |
| 326 | 326 | ||
| 327 | (eval-when-compile | ||
| 328 | (defcustom ibuffer-compressed-file-name-regexp | 327 | (defcustom ibuffer-compressed-file-name-regexp |
| 329 | (concat "\\.\\(" | 328 | "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$" |
| 330 | (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z")) | ||
| 331 | "\\)$") | ||
| 332 | "Regexp to match compressed file names." | 329 | "Regexp to match compressed file names." |
| 333 | :type 'regexp | 330 | :type 'regexp |
| 334 | :group 'ibuffer)) | 331 | :group 'ibuffer) |
| 335 | 332 | ||
| 336 | (defcustom ibuffer-hook nil | 333 | (defcustom ibuffer-hook nil |
| 337 | "Hook run when `ibuffer' is called." | 334 | "Hook run when `ibuffer' is called." |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 78b523f3845..840af2a9b81 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -831,21 +831,10 @@ NOPUSH is t and EDIT is t." | |||
| 831 | (defun isearch-update-ring (string &optional regexp) | 831 | (defun isearch-update-ring (string &optional regexp) |
| 832 | "Add STRING to the beginning of the search ring. | 832 | "Add STRING to the beginning of the search ring. |
| 833 | REGEXP if non-nil says use the regexp search ring." | 833 | REGEXP if non-nil says use the regexp search ring." |
| 834 | (if regexp | 834 | (add-to-history |
| 835 | (when (or (null regexp-search-ring) | 835 | (if regexp 'regexp-search-ring 'search-ring) |
| 836 | (not (string= string (car regexp-search-ring)))) | 836 | string |
| 837 | (when history-delete-duplicates | 837 | (if regexp regexp-search-ring-max search-ring-max))) |
| 838 | (setq regexp-search-ring (delete string regexp-search-ring))) | ||
| 839 | (push string regexp-search-ring) | ||
| 840 | (when (> (length regexp-search-ring) regexp-search-ring-max) | ||
| 841 | (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil))) | ||
| 842 | (when (or (null search-ring) | ||
| 843 | (not (string= string (car search-ring)))) | ||
| 844 | (when history-delete-duplicates | ||
| 845 | (setq search-ring (delete string search-ring))) | ||
| 846 | (push string search-ring) | ||
| 847 | (when (> (length search-ring) search-ring-max) | ||
| 848 | (setcdr (nthcdr (1- search-ring-max) search-ring) nil))))) | ||
| 849 | 838 | ||
| 850 | ;; Switching buffers should first terminate isearch-mode. | 839 | ;; Switching buffers should first terminate isearch-mode. |
| 851 | ;; ;; For Emacs 19, the frame switch event is handled. | 840 | ;; ;; 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 402278489bf..6d6c03823d3 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -7037,7 +7037,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 7037 | may have to reset some subdirectory switches after a `dired-undo'. | 7037 | may have to reset some subdirectory switches after a `dired-undo'. |
| 7038 | You can reset all subdirectory switches to the default using | 7038 | You can reset all subdirectory switches to the default using |
| 7039 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 7039 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 7040 | See Info node `(emacs-xtra)Subdir switches' for more details. | 7040 | See Info node `(emacs)Subdir switches' for more details. |
| 7041 | 7041 | ||
| 7042 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) | 7042 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) |
| 7043 | 7043 | ||
| @@ -7175,7 +7175,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 7175 | may have to reset some subdirectory switches after a `dired-undo'. | 7175 | may have to reset some subdirectory switches after a `dired-undo'. |
| 7176 | You can reset all subdirectory switches to the default using | 7176 | You can reset all subdirectory switches to the default using |
| 7177 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 7177 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 7178 | See Info node `(emacs-xtra)Subdir switches' for more details. | 7178 | See Info node `(emacs)Subdir switches' for more details. |
| 7179 | 7179 | ||
| 7180 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) | 7180 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) |
| 7181 | 7181 | ||
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/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 28fcb70bb8b..a20f11e0aa2 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -694,6 +694,7 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 694 | (if (and transient-mark-mode mark-active) | 694 | (if (and transient-mark-mode mark-active) |
| 695 | (buffer-substring (region-beginning) (region-end)) | 695 | (buffer-substring (region-beginning) (region-end)) |
| 696 | (tooltip-identifier-from-point (point)))))) | 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." |
| @@ -1912,7 +1911,7 @@ static char *magick[] = { | |||
| 1912 | (let* ((buffer (find-file-noselect | 1911 | (let* ((buffer (find-file-noselect |
| 1913 | (if (file-exists-p file) file | 1912 | (if (file-exists-p file) file |
| 1914 | (cdr (assoc bptno gdb-location-alist))))) | 1913 | (cdr (assoc bptno gdb-location-alist))))) |
| 1915 | (window (unless (gdb-display-source-buffer buffer) | 1914 | (window (or (gdb-display-source-buffer buffer) |
| 1916 | (display-buffer buffer)))) | 1915 | (display-buffer buffer)))) |
| 1917 | (setq gdb-source-window window) | 1916 | (setq gdb-source-window window) |
| 1918 | (with-current-buffer buffer | 1917 | (with-current-buffer buffer |
| @@ -2754,6 +2753,7 @@ corresponding to the mode line clicked." | |||
| 2754 | ;; Put buffer list in window if we | 2753 | ;; Put buffer list in window if we |
| 2755 | ;; can't find a source file. | 2754 | ;; can't find a source file. |
| 2756 | (list-buffers-noselect)))) | 2755 | (list-buffers-noselect)))) |
| 2756 | (setq gdb-source-window (selected-window)) | ||
| 2757 | (when gdb-use-separate-io-buffer | 2757 | (when gdb-use-separate-io-buffer |
| 2758 | (split-window-horizontally) | 2758 | (split-window-horizontally) |
| 2759 | (other-window 1) | 2759 | (other-window 1) |
| @@ -2781,6 +2781,7 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 2781 | (if gud-last-last-frame | 2781 | (if gud-last-last-frame |
| 2782 | (gud-find-file (car gud-last-last-frame)) | 2782 | (gud-find-file (car gud-last-last-frame)) |
| 2783 | (gud-find-file gdb-main-file))) | 2783 | (gud-find-file gdb-main-file))) |
| 2784 | (setq gdb-source-window (selected-window)) | ||
| 2784 | (other-window 1)))) | 2785 | (other-window 1)))) |
| 2785 | 2786 | ||
| 2786 | (defun gdb-reset () | 2787 | (defun gdb-reset () |
| @@ -2802,8 +2803,6 @@ Kills the gdb buffers, and resets variables and the source buffers." | |||
| 2802 | (setq overlay-arrow-variable-list | 2803 | (setq overlay-arrow-variable-list |
| 2803 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) | 2804 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) |
| 2804 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) | 2805 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) |
| 2805 | (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 2806 | (speedbar-refresh)) | ||
| 2807 | (setq gud-running nil) | 2806 | (setq gud-running nil) |
| 2808 | (setq gdb-active-process nil) | 2807 | (setq gdb-active-process nil) |
| 2809 | (setq gdb-var-list nil) | 2808 | (setq gdb-var-list nil) |
| @@ -3231,7 +3230,8 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | |||
| 3231 | (throw 'child-already-watched nil)) | 3230 | (throw 'child-already-watched nil)) |
| 3232 | (push varchild var-list)))) | 3231 | (push varchild var-list)))) |
| 3233 | (push var var-list))) | 3232 | (push var var-list))) |
| 3234 | (setq gdb-var-list (nreverse var-list))))) | 3233 | (setq gdb-var-list (nreverse var-list)))) |
| 3234 | (gdb-speedbar-update)) | ||
| 3235 | 3235 | ||
| 3236 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. | 3236 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. |
| 3237 | (defun gdb-var-update-1 () | 3237 | (defun gdb-var-update-1 () |
| @@ -3264,11 +3264,7 @@ in_scope=\"\\(.*?\\)\".*?}") | |||
| 3264 | (read (match-string 2))))))) | 3264 | (read (match-string 2))))))) |
| 3265 | (setq gdb-pending-triggers | 3265 | (setq gdb-pending-triggers |
| 3266 | (delq 'gdb-var-update gdb-pending-triggers)) | 3266 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 3267 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 3267 | (gdb-speedbar-update)) |
| 3268 | ;; dummy command to update speedbar at right time | ||
| 3269 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh)) | ||
| 3270 | ;; keep gdb-pending-triggers non-nil till end | ||
| 3271 | (push 'gdb-speedbar-refresh gdb-pending-triggers))) | ||
| 3272 | 3268 | ||
| 3273 | ;; Registers buffer. | 3269 | ;; Registers buffer. |
| 3274 | ;; | 3270 | ;; |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index c695272e92b..410a973d1b4 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -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/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/server.el b/lisp/server.el index 015c4c6f171..7835c56c3e2 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -858,7 +858,7 @@ so don't mark these buffers specially, just visit them normally." | |||
| 858 | ;; deleted file, offer to write it. | 858 | ;; deleted file, offer to write it. |
| 859 | (let* ((filen (car file)) | 859 | (let* ((filen (car file)) |
| 860 | (obuf (get-file-buffer filen))) | 860 | (obuf (get-file-buffer filen))) |
| 861 | (push filen file-name-history) | 861 | (add-to-history 'file-name-history filen) |
| 862 | (if (and obuf (set-buffer obuf)) | 862 | (if (and obuf (set-buffer obuf)) |
| 863 | (progn | 863 | (progn |
| 864 | (cond ((file-exists-p filen) | 864 | (cond ((file-exists-p filen) |
diff --git a/lisp/simple.el b/lisp/simple.el index bd8a9d1a284..57e716e4683 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1144,7 +1144,7 @@ they are expressions; otherwise they are strings. | |||
| 1144 | \(That convention is designed to do the right thing for | 1144 | \(That convention is designed to do the right thing for |
| 1145 | recursive uses of the minibuffer.)") | 1145 | recursive uses of the minibuffer.)") |
| 1146 | (setq minibuffer-history-variable 'minibuffer-history) | 1146 | (setq minibuffer-history-variable 'minibuffer-history) |
| 1147 | (setq minibuffer-history-position nil) | 1147 | (setq minibuffer-history-position nil) ;; Defvar is in C code. |
| 1148 | (defvar minibuffer-history-search-history nil) | 1148 | (defvar minibuffer-history-search-history nil) |
| 1149 | 1149 | ||
| 1150 | (defvar minibuffer-text-before-history nil | 1150 | (defvar minibuffer-text-before-history nil |
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 07039fa8c18..12a53113f0a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -827,7 +827,16 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 827 | (format "Invalid user name %s" | 827 | (format "Invalid user name %s" |
| 828 | init-file-user) | 828 | init-file-user) |
| 829 | :error) | 829 | :error) |
| 830 | (if (file-directory-p (expand-file-name (concat "~" init-file-user))) | 830 | (if (file-directory-p (expand-file-name |
| 831 | ;; We don't support ~USER on MS-Windows except | ||
| 832 | ;; for the current user, and always load .emacs | ||
| 833 | ;; from the current user's home directory (see | ||
| 834 | ;; below). So always check "~", even if invoked | ||
| 835 | ;; with "-u USER", or if $USER or $LOGNAME are | ||
| 836 | ;; set to something different. | ||
| 837 | (if (eq system-type 'windows-nt) | ||
| 838 | "~" | ||
| 839 | (concat "~" init-file-user)))) | ||
| 831 | nil | 840 | nil |
| 832 | (display-warning 'initialization | 841 | (display-warning 'initialization |
| 833 | (format "User %s has no home directory" | 842 | (format "User %s has no home directory" |
| @@ -1282,7 +1291,9 @@ where FACE is a valid face specification, as it can be used with | |||
| 1282 | (set-buffer buffer) | 1291 | (set-buffer buffer) |
| 1283 | (erase-buffer) | 1292 | (erase-buffer) |
| 1284 | (if pure-space-overflow | 1293 | (if pure-space-overflow |
| 1285 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1294 | (insert "\ |
| 1295 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1296 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1286 | (fancy-splash-head) | 1297 | (fancy-splash-head) |
| 1287 | (apply #'fancy-splash-insert text) | 1298 | (apply #'fancy-splash-insert text) |
| 1288 | (fancy-splash-tail) | 1299 | (fancy-splash-tail) |
| @@ -1354,7 +1365,7 @@ mouse." | |||
| 1354 | emulation-mode-map-alists nil | 1365 | emulation-mode-map-alists nil |
| 1355 | buffer-undo-list t | 1366 | buffer-undo-list t |
| 1356 | mode-line-format (propertize "---- %b %-" | 1367 | mode-line-format (propertize "---- %b %-" |
| 1357 | 'face '(:weight bold)) | 1368 | 'face 'mode-line-buffer-id) |
| 1358 | fancy-splash-stop-time (+ (float-time) | 1369 | fancy-splash-stop-time (+ (float-time) |
| 1359 | fancy-splash-max-time) | 1370 | fancy-splash-max-time) |
| 1360 | timer (run-with-timer 0 fancy-splash-delay | 1371 | timer (run-with-timer 0 fancy-splash-delay |
| @@ -1406,10 +1417,12 @@ we put it on this frame." | |||
| 1406 | (with-current-buffer (get-buffer-create "GNU Emacs") | 1417 | (with-current-buffer (get-buffer-create "GNU Emacs") |
| 1407 | (set (make-local-variable 'tab-width) 8) | 1418 | (set (make-local-variable 'tab-width) 8) |
| 1408 | (set (make-local-variable 'mode-line-format) | 1419 | (set (make-local-variable 'mode-line-format) |
| 1409 | (propertize "---- %b %-" 'face '(:weight bold))) | 1420 | (propertize "---- %b %-" 'face 'mode-line-buffer-id)) |
| 1410 | 1421 | ||
| 1411 | (if pure-space-overflow | 1422 | (if pure-space-overflow |
| 1412 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1423 | (insert "\ |
| 1424 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1425 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1413 | 1426 | ||
| 1414 | ;; The convention for this piece of code is that | 1427 | ;; The convention for this piece of code is that |
| 1415 | ;; each piece of output starts with one or two newlines | 1428 | ;; each piece of output starts with one or two newlines |
| @@ -1623,9 +1636,7 @@ normal otherwise." | |||
| 1623 | (not noninteractive)) | 1636 | (not noninteractive)) |
| 1624 | (display-warning | 1637 | (display-warning |
| 1625 | 'initialization | 1638 | 'initialization |
| 1626 | "Building Emacs overflowed pure space. See \"(elisp)Building Emacs\" for more information." | 1639 | "Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)" |
| 1627 | ;; FIXME: Tell the user what kind of problems are possible and how to fix | ||
| 1628 | ;; the overflow. | ||
| 1629 | :warning)) | 1640 | :warning)) |
| 1630 | 1641 | ||
| 1631 | (when command-line-args-left | 1642 | (when command-line-args-left |
diff --git a/lisp/subr.el b/lisp/subr.el index 43f1d5e57b1..bc7789f3384 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/mac-win.el b/lisp/term/mac-win.el index 4ab0606c18a..6931f796e5c 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -82,6 +82,8 @@ | |||
| 82 | (defvar mac-services-selection) | 82 | (defvar mac-services-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,107 @@ 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 | (cp-make-coding-system | ||
| 1134 | mac-centraleurroman | ||
| 1135 | [?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B | ||
| 1136 | ?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B | ||
| 1137 | ?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B | ||
| 1138 | ?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B | ||
| 1139 | ?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B | ||
| 1140 | ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B | ||
| 1141 | ?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B | ||
| 1142 | ?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B] | ||
| 1143 | "Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).") | ||
| 1144 | (coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman) | ||
| 1145 | |||
| 1146 | (cp-make-coding-system | ||
| 1147 | mac-cyrillic | ||
| 1148 | [?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B | ||
| 1149 | ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B | ||
| 1150 | ?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B | ||
| 1151 | ?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B | ||
| 1152 | ?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B | ||
| 1153 | ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B | ||
| 1154 | ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B | ||
| 1155 | ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B] | ||
| 1156 | "Mac Cyrillic Encoding (MIME:x-mac-cyrillic).") | ||
| 1157 | (coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic) | ||
| 1158 | |||
| 1159 | (let | ||
| 1160 | ((encoding-vector | ||
| 1161 | (vconcat | ||
| 1162 | (make-vector 32 nil) | ||
| 1163 | ;; mac-symbol (32..126) -> emacs-mule mapping | ||
| 1164 | [?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/ | ||
| 1165 | ?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\? | ||
| 1166 | ?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B | ||
| 1167 | ?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_ | ||
| 1168 | ?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B | ||
| 1169 | ?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B] | ||
| 1170 | (make-vector (- 160 127) nil) | ||
| 1171 | ;; mac-symbol (160..254) -> emacs-mule mapping | ||
| 1172 | ;; Mapping of the following characters are changed from the | ||
| 1173 | ;; original one: | ||
| 1174 | ;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif | ||
| 1175 | ;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif | ||
| 1176 | ;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif | ||
| 1177 | [?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B | ||
| 1178 | ?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B | ||
| 1179 | ?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B | ||
| 1180 | ?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B | ||
| 1181 | ?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B | ||
| 1182 | ?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B | ||
| 1183 | nil])) | ||
| 1184 | translation-table) | ||
| 1185 | (setq translation-table | ||
| 1186 | (make-translation-table-from-vector encoding-vector)) | ||
| 1187 | ;; (define-translation-table 'mac-symbol-decoder translation-table) | ||
| 1188 | (define-translation-table 'mac-symbol-encoder | ||
| 1189 | (char-table-extra-slot translation-table 0))) | ||
| 1190 | |||
| 1191 | (let | ||
| 1192 | ((encoding-vector | ||
| 1193 | (vconcat | ||
| 1194 | (make-vector 32 nil) | ||
| 1195 | ;; mac-dingbats (32..126) -> emacs-mule mapping | ||
| 1196 | [?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B | ||
| 1197 | ?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B | ||
| 1198 | ?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B | ||
| 1199 | ?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B | ||
| 1200 | ?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B | ||
| 1201 | ?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B | ||
| 1202 | nil | ||
| 1203 | ;; mac-dingbats (128..141) -> emacs-mule mapping | ||
| 1204 | ?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B] | ||
| 1205 | (make-vector (- 161 142) nil) | ||
| 1206 | ;; mac-dingbats (161..239) -> emacs-mule mapping | ||
| 1207 | [?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B | ||
| 1208 | ?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B | ||
| 1209 | ?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B | ||
| 1210 | ?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B | ||
| 1211 | ?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B | ||
| 1212 | nil | ||
| 1213 | ;; mac-dingbats (241..254) -> emacs-mule mapping | ||
| 1214 | ?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B | ||
| 1215 | nil])) | ||
| 1216 | translation-table) | ||
| 1217 | (setq translation-table | ||
| 1218 | (make-translation-table-from-vector encoding-vector)) | ||
| 1219 | ;; (define-translation-table 'mac-dingbats-decoder translation-table) | ||
| 1220 | (define-translation-table 'mac-dingbats-encoder | ||
| 1221 | (char-table-extra-slot translation-table 0))) | ||
| 1222 | |||
| 1223 | (defconst mac-system-coding-system | ||
| 1224 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 1225 | mac-script-code-coding-systems)) | ||
| 1226 | 'mac-roman))) | ||
| 1227 | (if (eq system-type 'darwin) | ||
| 1228 | base | ||
| 1229 | (coding-system-change-eol-conversion base 'mac))) | ||
| 1230 | "Coding system derived from the system script code.") | ||
| 1231 | |||
| 1232 | (set-selection-coding-system mac-system-coding-system) | ||
| 1233 | |||
| 1131 | 1234 | ||
| 1132 | ;;;; Keyboard layout/language change events | 1235 | ;;;; Keyboard layout/language change events |
| 1133 | (defun mac-handle-language-change (event) | 1236 | (defun mac-handle-language-change (event) |
| @@ -1141,6 +1244,91 @@ correspoinding TextEncodingBase value." | |||
| 1141 | (define-key key-translation-map [?\x80] "\\")))) | 1244 | (define-key key-translation-map [?\x80] "\\")))) |
| 1142 | 1245 | ||
| 1143 | (define-key special-event-map [language-change] 'mac-handle-language-change) | 1246 | (define-key special-event-map [language-change] 'mac-handle-language-change) |
| 1247 | |||
| 1248 | |||
| 1249 | ;;;; Conversion between common flavors and Lisp string. | ||
| 1250 | |||
| 1251 | (defconst mac-text-encoding-mac-japanese-basic-variant #x20001 | ||
| 1252 | "MacJapanese text encoding without Apple double-byte extensions.") | ||
| 1253 | |||
| 1254 | (defun mac-utxt-to-string (data &optional coding-system) | ||
| 1255 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1256 | (let* ((encoding | ||
| 1257 | (and (eq system-type 'darwin) | ||
| 1258 | (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1259 | mac-text-encoding-mac-japanese-basic-variant)) | ||
| 1260 | (str (and (fboundp 'mac-code-convert-string) | ||
| 1261 | (mac-code-convert-string data nil | ||
| 1262 | (or encoding coding-system))))) | ||
| 1263 | (when str | ||
| 1264 | (setq str (decode-coding-string str coding-system)) | ||
| 1265 | (if (eq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1266 | ;; Does it contain Apple one-byte extensions other than | ||
| 1267 | ;; reverse solidus? | ||
| 1268 | (if (string-match "[\xa0\xfd-\xff]" str) | ||
| 1269 | (setq str nil) | ||
| 1270 | ;; ASCII-only? | ||
| 1271 | (unless (string-match "\\`[[:ascii:]]*\\'" str) | ||
| 1272 | (subst-char-in-string ?\x5c ?\(J\(B str t) | ||
| 1273 | (subst-char-in-string ?\x80 ?\\ str t))))) | ||
| 1274 | (or str | ||
| 1275 | (decode-coding-string data | ||
| 1276 | (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))))) | ||
| 1277 | |||
| 1278 | (defun mac-string-to-utxt (string &optional coding-system) | ||
| 1279 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1280 | (let (data encoding) | ||
| 1281 | (when (and (fboundp 'mac-code-convert-string) | ||
| 1282 | (memq (coding-system-base coding-system) | ||
| 1283 | (find-coding-systems-string string))) | ||
| 1284 | (setq coding-system | ||
| 1285 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1286 | (when (and (eq system-type 'darwin) | ||
| 1287 | (eq coding-system 'japanese-shift-jis-mac)) | ||
| 1288 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1289 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1290 | (subst-char-in-string ?\(J\(B ?\x5c string t)) | ||
| 1291 | (setq data (mac-code-convert-string | ||
| 1292 | (encode-coding-string string coding-system) | ||
| 1293 | (or encoding coding-system) nil))) | ||
| 1294 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | ||
| 1295 | 'utf-16be-mac | ||
| 1296 | 'utf-16le-mac))))) | ||
| 1297 | |||
| 1298 | (defun mac-TEXT-to-string (data &optional coding-system) | ||
| 1299 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1300 | (prog1 (setq data (decode-coding-string data coding-system)) | ||
| 1301 | (when (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1302 | ;; (subst-char-in-string ?\x5c ?\(J\(B data t) | ||
| 1303 | (subst-char-in-string ?\x80 ?\\ data t)))) | ||
| 1304 | |||
| 1305 | (defun mac-string-to-TEXT (string &optional coding-system) | ||
| 1306 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1307 | (let ((encodables (find-coding-systems-string string)) | ||
| 1308 | (rest mac-script-code-coding-systems)) | ||
| 1309 | (unless (memq (coding-system-base coding-system) encodables) | ||
| 1310 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1311 | (setq rest (cdr rest))) | ||
| 1312 | (if rest | ||
| 1313 | (setq coding-system (cdar rest))))) | ||
| 1314 | (setq coding-system | ||
| 1315 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1316 | (when (eq coding-system 'japanese-shift-jis-mac) | ||
| 1317 | ;; (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1318 | (setq string (subst-char-in-string ?\(J\(B ?\x5c string))) | ||
| 1319 | (encode-coding-string string coding-system)) | ||
| 1320 | |||
| 1321 | (defun mac-furl-to-string (data) | ||
| 1322 | ;; Remove a trailing nul character. | ||
| 1323 | (let ((len (length data))) | ||
| 1324 | (if (and (> len 0) (= (aref data (1- len)) ?\0)) | ||
| 1325 | (substring data 0 (1- len)) | ||
| 1326 | data))) | ||
| 1327 | |||
| 1328 | (defun mac-TIFF-to-string (data &optional text) | ||
| 1329 | (prog1 (or text (setq text (copy-sequence " "))) | ||
| 1330 | (put-text-property 0 (length text) 'display (create-image data 'tiff t) | ||
| 1331 | text))) | ||
| 1144 | 1332 | ||
| 1145 | ;;;; Selections | 1333 | ;;;; Selections |
| 1146 | 1334 | ||
| @@ -1190,22 +1378,11 @@ in `selection-converter-alist', which see." | |||
| 1190 | (when (and (stringp data) | 1378 | (when (and (stringp data) |
| 1191 | (setq data-type (get-text-property 0 'foreign-selection data))) | 1379 | (setq data-type (get-text-property 0 'foreign-selection data))) |
| 1192 | (cond ((eq data-type 'public.utf16-plain-text) | 1380 | (cond ((eq data-type 'public.utf16-plain-text) |
| 1193 | (let ((encoded (and (fboundp 'mac-code-convert-string) | 1381 | (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) | 1382 | ((eq data-type 'com.apple.traditional-mac-plain-text) |
| 1202 | (setq data (decode-coding-string data coding))) | 1383 | (setq data (mac-TEXT-to-string data coding))) |
| 1203 | ((eq data-type 'public.file-url) | 1384 | ((eq data-type 'public.file-url) |
| 1204 | (setq data (decode-coding-string data 'utf-8)) | 1385 | (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)) | 1386 | (put-text-property 0 (length data) 'foreign-selection data-type data)) |
| 1210 | data)) | 1387 | data)) |
| 1211 | 1388 | ||
| @@ -1227,9 +1404,7 @@ in `selection-converter-alist', which see." | |||
| 1227 | (when tiff-image | 1404 | (when tiff-image |
| 1228 | (remove-text-properties 0 (length tiff-image) | 1405 | (remove-text-properties 0 (length tiff-image) |
| 1229 | '(foreign-selection nil) tiff-image) | 1406 | '(foreign-selection nil) tiff-image) |
| 1230 | (setq tiff-image (create-image tiff-image 'tiff t)) | 1407 | (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)) | 1408 | text)) |
| 1234 | 1409 | ||
| 1235 | ;;; Return the value of the current selection. | 1410 | ;;; Return the value of the current selection. |
| @@ -1300,11 +1475,7 @@ in `selection-converter-alist', which see." | |||
| 1300 | 1475 | ||
| 1301 | (defun mac-select-convert-to-string (selection type value) | 1476 | (defun mac-select-convert-to-string (selection type value) |
| 1302 | (let ((str (cdr (xselect-convert-to-string selection nil value))) | 1477 | (let ((str (cdr (xselect-convert-to-string selection nil value))) |
| 1303 | coding) | 1478 | (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 | 1479 | (when str |
| 1309 | ;; If TYPE is nil, this is a local request, thus return STR as | 1480 | ;; If TYPE is nil, this is a local request, thus return STR as |
| 1310 | ;; is. Otherwise, encode STR. | 1481 | ;; is. Otherwise, encode STR. |
| @@ -1314,28 +1485,9 @@ in `selection-converter-alist', which see." | |||
| 1314 | (remove-text-properties 0 (length str) '(composition nil) str) | 1485 | (remove-text-properties 0 (length str) '(composition nil) str) |
| 1315 | (cond | 1486 | (cond |
| 1316 | ((eq type 'public.utf16-plain-text) | 1487 | ((eq type 'public.utf16-plain-text) |
| 1317 | (let (s) | 1488 | (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) | 1489 | ((eq type 'com.apple.traditional-mac-plain-text) |
| 1330 | (let ((encodables (find-coding-systems-string str)) | 1490 | (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 | 1491 | (t |
| 1340 | (error "Unknown selection type: %S" type)) | 1492 | (error "Unknown selection type: %S" type)) |
| 1341 | ))) | 1493 | ))) |
| @@ -1433,6 +1585,17 @@ in `selection-converter-alist', which see." | |||
| 1433 | (ash (lsh result extended-sign-len) (- extended-sign-len)) | 1585 | (ash (lsh result extended-sign-len) (- extended-sign-len)) |
| 1434 | result))) | 1586 | result))) |
| 1435 | 1587 | ||
| 1588 | (defun mac-bytes-to-digits (bytes &optional from to) | ||
| 1589 | (or from (setq from 0)) | ||
| 1590 | (or to (setq to (length bytes))) | ||
| 1591 | (let ((len (- to from)) | ||
| 1592 | (val 0.0)) | ||
| 1593 | (dotimes (i len) | ||
| 1594 | (setq val (+ (* val 256.0) | ||
| 1595 | (aref bytes (+ from (if (eq (byteorder) ?B) i | ||
| 1596 | (- len i 1))))))) | ||
| 1597 | (format "%.0f" val))) | ||
| 1598 | |||
| 1436 | (defun mac-ae-selection-range (ae) | 1599 | (defun mac-ae-selection-range (ae) |
| 1437 | ;; #pragma options align=mac68k | 1600 | ;; #pragma options align=mac68k |
| 1438 | ;; typedef struct SelectionRange { | 1601 | ;; typedef struct SelectionRange { |
| @@ -1518,6 +1681,78 @@ Currently the `mailto' scheme is supported." | |||
| 1518 | 1681 | ||
| 1519 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) | 1682 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) |
| 1520 | 1683 | ||
| 1684 | ;;; Converted Carbon Events | ||
| 1685 | (defun mac-handle-toolbar-switch-mode (event) | ||
| 1686 | "Toggle visibility of tool-bars in response to EVENT. | ||
| 1687 | With no keyboard modifiers, it toggles the visibility of the | ||
| 1688 | frame where the tool-bar toggle button was pressed. With some | ||
| 1689 | modifiers, it changes global tool-bar visibility setting." | ||
| 1690 | (interactive "e") | ||
| 1691 | (let* ((ae (mac-event-ae event)) | ||
| 1692 | (modifiers (cdr (mac-ae-parameter ae "kmod")))) | ||
| 1693 | (if (and modifiers (not (string= modifiers "\000\000\000\000"))) | ||
| 1694 | ;; Globally toggle tool-bar-mode if some modifier key is pressed. | ||
| 1695 | (tool-bar-mode) | ||
| 1696 | (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae)))) | ||
| 1697 | (rest (frame-list)) | ||
| 1698 | frame) | ||
| 1699 | (while (and (null frame) rest) | ||
| 1700 | (if (string= (frame-parameter (car rest) 'window-id) window-id) | ||
| 1701 | (setq frame (car rest))) | ||
| 1702 | (setq rest (cdr rest))) | ||
| 1703 | (set-frame-parameter frame 'tool-bar-lines | ||
| 1704 | (if (= (frame-parameter frame 'tool-bar-lines) 0) | ||
| 1705 | 1 0)))))) | ||
| 1706 | |||
| 1707 | ;; kEventClassWindow/kEventWindowToolbarSwitchMode | ||
| 1708 | (define-key mac-apple-event-map [window toolbar-switch-mode] | ||
| 1709 | 'mac-handle-toolbar-switch-mode) | ||
| 1710 | |||
| 1711 | ;;; Font panel | ||
| 1712 | (when (fboundp 'mac-set-font-panel-visibility) | ||
| 1713 | |||
| 1714 | (define-minor-mode mac-font-panel-mode | ||
| 1715 | "Toggle use of the font panel. | ||
| 1716 | With numeric ARG, display the panel bar if and only if ARG is positive." | ||
| 1717 | :init-value nil | ||
| 1718 | :global t | ||
| 1719 | :group 'mac | ||
| 1720 | (mac-set-font-panel-visibility mac-font-panel-mode)) | ||
| 1721 | |||
| 1722 | (defun mac-handle-font-panel-closed (event) | ||
| 1723 | "Update internal status in response to font panel closed EVENT." | ||
| 1724 | (interactive "e") | ||
| 1725 | ;; Synchronize with the minor mode variable. | ||
| 1726 | (mac-font-panel-mode 0)) | ||
| 1727 | |||
| 1728 | (defun mac-handle-font-selection (event) | ||
| 1729 | "Change default face attributes according to font selection EVENT." | ||
| 1730 | (interactive "e") | ||
| 1731 | (let* ((ae (mac-event-ae event)) | ||
| 1732 | (fm-font-size (cdr (mac-ae-parameter ae "fmsz"))) | ||
| 1733 | (atsu-font-id (cdr (mac-ae-parameter ae "auid"))) | ||
| 1734 | (attribute-values (gethash atsu-font-id mac-atsu-font-table))) | ||
| 1735 | (if fm-font-size | ||
| 1736 | (setq attribute-values | ||
| 1737 | `(:height ,(* 10 (mac-bytes-to-integer fm-font-size)) | ||
| 1738 | ,@attribute-values))) | ||
| 1739 | (apply 'set-face-attribute 'default (selected-frame) attribute-values))) | ||
| 1740 | |||
| 1741 | ;; kEventClassFont/kEventFontPanelClosed | ||
| 1742 | (define-key mac-apple-event-map [font panel-closed] | ||
| 1743 | 'mac-handle-font-panel-closed) | ||
| 1744 | ;; kEventClassFont/kEventFontSelection | ||
| 1745 | (define-key mac-apple-event-map [font selection] 'mac-handle-font-selection) | ||
| 1746 | |||
| 1747 | (define-key-after menu-bar-showhide-menu [mac-font-panel-mode] | ||
| 1748 | (menu-bar-make-mm-toggle mac-font-panel-mode | ||
| 1749 | "Font Panel" | ||
| 1750 | "Show the font panel as a floating dialog") | ||
| 1751 | 'showhide-speedbar) | ||
| 1752 | |||
| 1753 | ) ;; (fboundp 'mac-set-font-panel-visibility) | ||
| 1754 | |||
| 1755 | ;;; Services | ||
| 1521 | (defun mac-services-open-file () | 1756 | (defun mac-services-open-file () |
| 1522 | "Open the file specified by the selection value for Services." | 1757 | "Open the file specified by the selection value for Services." |
| 1523 | (interactive) | 1758 | (interactive) |
| @@ -1589,6 +1824,83 @@ Currently the `mailto' scheme is supported." | |||
| 1589 | ;; processed when the initial frame has been created: this is where | 1824 | ;; processed when the initial frame has been created: this is where |
| 1590 | ;; the files should be opened. | 1825 | ;; the files should be opened. |
| 1591 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) | 1826 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) |
| 1827 | |||
| 1828 | |||
| 1829 | ;;;; Drag and drop | ||
| 1830 | |||
| 1831 | (defcustom mac-dnd-types-alist | ||
| 1832 | '(("furl" . mac-dnd-handle-furl) | ||
| 1833 | ("hfs " . mac-dnd-handle-hfs) | ||
| 1834 | ("utxt" . mac-dnd-insert-utxt) | ||
| 1835 | ("TEXT" . mac-dnd-insert-TEXT) | ||
| 1836 | ("TIFF" . mac-dnd-insert-TIFF)) | ||
| 1837 | "Which function to call to handle a drop of that type. | ||
| 1838 | The function takes three arguments, WINDOW, ACTION and DATA. | ||
| 1839 | WINDOW is where the drop occured, ACTION is always `private' on | ||
| 1840 | Mac. DATA is the drop data. Unlike the x-dnd counterpart, the | ||
| 1841 | return value of the function is not significant. | ||
| 1842 | |||
| 1843 | See also `mac-dnd-known-types'." | ||
| 1844 | :version "22.1" | ||
| 1845 | :type 'alist | ||
| 1846 | :group 'mac) | ||
| 1847 | |||
| 1848 | (defun mac-dnd-handle-furl (window action data) | ||
| 1849 | (dnd-handle-one-url window action (mac-furl-to-string data))) | ||
| 1850 | |||
| 1851 | (defun mac-dnd-handle-hfs (window action data) | ||
| 1852 | ;; struct HFSFlavor { | ||
| 1853 | ;; OSType fileType; | ||
| 1854 | ;; OSType fileCreator; | ||
| 1855 | ;; UInt16 fdFlags; | ||
| 1856 | ;; FSSpec fileSpec; | ||
| 1857 | ;; }; | ||
| 1858 | (let* ((file-name (mac-coerce-ae-data "fss " (substring data 10) | ||
| 1859 | 'undecoded-file-name)) | ||
| 1860 | (url (concat "file://" | ||
| 1861 | (mapconcat 'url-hexify-string | ||
| 1862 | (split-string file-name "/") "/")))) | ||
| 1863 | (dnd-handle-one-url window action url))) | ||
| 1864 | |||
| 1865 | (defun mac-dnd-insert-utxt (window action data) | ||
| 1866 | (dnd-insert-text window action (mac-utxt-to-string data))) | ||
| 1867 | |||
| 1868 | (defun mac-dnd-insert-TEXT (window action data) | ||
| 1869 | (dnd-insert-text window action (mac-TEXT-to-string data))) | ||
| 1870 | |||
| 1871 | (defun mac-dnd-insert-TIFF (window action data) | ||
| 1872 | (dnd-insert-text window action (mac-TIFF-to-string data))) | ||
| 1873 | |||
| 1874 | (defun mac-dnd-drop-data (event frame window data type) | ||
| 1875 | (let* ((type-info (assoc type mac-dnd-types-alist)) | ||
| 1876 | (handler (cdr type-info)) | ||
| 1877 | (action 'private) | ||
| 1878 | (w (posn-window (event-start event)))) | ||
| 1879 | (when handler | ||
| 1880 | (if (and (windowp w) (window-live-p w) | ||
| 1881 | (not (window-minibuffer-p w)) | ||
| 1882 | (not (window-dedicated-p w))) | ||
| 1883 | ;; If dropping in an ordinary window which we could use, | ||
| 1884 | ;; let dnd-open-file-other-window specify what to do. | ||
| 1885 | (progn | ||
| 1886 | (goto-char (posn-point (event-start event))) | ||
| 1887 | (funcall handler window action data)) | ||
| 1888 | ;; If we can't display the file here, | ||
| 1889 | ;; make a new window for it. | ||
| 1890 | (let ((dnd-open-file-other-window t)) | ||
| 1891 | (select-frame frame) | ||
| 1892 | (funcall handler window action data)))))) | ||
| 1893 | |||
| 1894 | (defun mac-dnd-handle-drag-n-drop-event (event) | ||
| 1895 | "Receive drag and drop events." | ||
| 1896 | (interactive "e") | ||
| 1897 | (let ((window (posn-window (event-start event)))) | ||
| 1898 | (when (windowp window) (select-window window)) | ||
| 1899 | (dolist (item (mac-ae-list (mac-event-ae event))) | ||
| 1900 | (if (not (equal (car item) "null")) | ||
| 1901 | (mac-dnd-drop-data event (selected-frame) window | ||
| 1902 | (cdr item) (car item))))) | ||
| 1903 | (select-frame-set-input-focus (selected-frame))) | ||
| 1592 | 1904 | ||
| 1593 | ;;; Do the actual Windows setup here; the above code just defines | 1905 | ;;; Do the actual Windows setup here; the above code just defines |
| 1594 | ;;; functions and variables that we use now. | 1906 | ;;; functions and variables that we use now. |
| @@ -1618,96 +1930,6 @@ Currently the `mailto' scheme is supported." | |||
| 1618 | 1930 | ||
| 1619 | (setq frame-creation-function 'x-create-frame-with-faces) | 1931 | (setq frame-creation-function 'x-create-frame-with-faces) |
| 1620 | 1932 | ||
| 1621 | (cp-make-coding-system | ||
| 1622 | mac-centraleurroman | ||
| 1623 | [?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B | ||
| 1624 | ?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B | ||
| 1625 | ?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B | ||
| 1626 | ?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B | ||
| 1627 | ?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B | ||
| 1628 | ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B | ||
| 1629 | ?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B | ||
| 1630 | ?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B] | ||
| 1631 | "Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).") | ||
| 1632 | (coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman) | ||
| 1633 | |||
| 1634 | (cp-make-coding-system | ||
| 1635 | mac-cyrillic | ||
| 1636 | [?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B | ||
| 1637 | ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B | ||
| 1638 | ?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B | ||
| 1639 | ?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B | ||
| 1640 | ?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B | ||
| 1641 | ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B | ||
| 1642 | ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B | ||
| 1643 | ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B] | ||
| 1644 | "Mac Cyrillic Encoding (MIME:x-mac-cyrillic).") | ||
| 1645 | (coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic) | ||
| 1646 | |||
| 1647 | (let | ||
| 1648 | ((encoding-vector | ||
| 1649 | (vconcat | ||
| 1650 | (make-vector 32 nil) | ||
| 1651 | ;; mac-symbol (32..126) -> emacs-mule mapping | ||
| 1652 | [?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/ | ||
| 1653 | ?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\? | ||
| 1654 | ?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B | ||
| 1655 | ?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_ | ||
| 1656 | ?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B | ||
| 1657 | ?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B] | ||
| 1658 | (make-vector (- 160 127) nil) | ||
| 1659 | ;; mac-symbol (160..254) -> emacs-mule mapping | ||
| 1660 | ;; Mapping of the following characters are changed from the | ||
| 1661 | ;; original one: | ||
| 1662 | ;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif | ||
| 1663 | ;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif | ||
| 1664 | ;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif | ||
| 1665 | [?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B | ||
| 1666 | ?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B | ||
| 1667 | ?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B | ||
| 1668 | ?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B | ||
| 1669 | ?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B | ||
| 1670 | ?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B | ||
| 1671 | nil])) | ||
| 1672 | translation-table) | ||
| 1673 | (setq translation-table | ||
| 1674 | (make-translation-table-from-vector encoding-vector)) | ||
| 1675 | ;; (define-translation-table 'mac-symbol-decoder translation-table) | ||
| 1676 | (define-translation-table 'mac-symbol-encoder | ||
| 1677 | (char-table-extra-slot translation-table 0))) | ||
| 1678 | |||
| 1679 | (let | ||
| 1680 | ((encoding-vector | ||
| 1681 | (vconcat | ||
| 1682 | (make-vector 32 nil) | ||
| 1683 | ;; mac-dingbats (32..126) -> emacs-mule mapping | ||
| 1684 | [?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B | ||
| 1685 | ?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B | ||
| 1686 | ?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B | ||
| 1687 | ?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B | ||
| 1688 | ?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B | ||
| 1689 | ?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B | ||
| 1690 | nil | ||
| 1691 | ;; mac-dingbats (128..141) -> emacs-mule mapping | ||
| 1692 | ?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B] | ||
| 1693 | (make-vector (- 161 142) nil) | ||
| 1694 | ;; mac-dingbats (161..239) -> emacs-mule mapping | ||
| 1695 | [?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B | ||
| 1696 | ?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B | ||
| 1697 | ?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B | ||
| 1698 | ?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B | ||
| 1699 | ?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B | ||
| 1700 | nil | ||
| 1701 | ;; mac-dingbats (241..254) -> emacs-mule mapping | ||
| 1702 | ?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B | ||
| 1703 | nil])) | ||
| 1704 | translation-table) | ||
| 1705 | (setq translation-table | ||
| 1706 | (make-translation-table-from-vector encoding-vector)) | ||
| 1707 | ;; (define-translation-table 'mac-dingbats-decoder translation-table) | ||
| 1708 | (define-translation-table 'mac-dingbats-encoder | ||
| 1709 | (char-table-extra-slot translation-table 0))) | ||
| 1710 | |||
| 1711 | (defvar mac-font-encoder-list | 1933 | (defvar mac-font-encoder-list |
| 1712 | '(("mac-roman" mac-roman-encoder | 1934 | '(("mac-roman" mac-roman-encoder |
| 1713 | ccl-encode-mac-roman-font "%s") | 1935 | ccl-encode-mac-roman-font "%s") |
| @@ -2012,37 +2234,11 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman") | |||
| 2012 | ;; Enable CLIPBOARD copy/paste through menu bar commands. | 2234 | ;; Enable CLIPBOARD copy/paste through menu bar commands. |
| 2013 | (menu-bar-enable-clipboard) | 2235 | (menu-bar-enable-clipboard) |
| 2014 | 2236 | ||
| 2015 | (defconst mac-system-coding-system | 2237 | ;; Initiate drag and drop |
| 2016 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 2017 | mac-script-code-coding-systems)) | ||
| 2018 | 'mac-roman))) | ||
| 2019 | (if (eq system-type 'darwin) | ||
| 2020 | base | ||
| 2021 | (coding-system-change-eol-conversion base 'mac))) | ||
| 2022 | "Coding system derived from the system script code.") | ||
| 2023 | |||
| 2024 | (set-selection-coding-system mac-system-coding-system) | ||
| 2025 | 2238 | ||
| 2026 | (defun mac-drag-n-drop (event) | 2239 | (global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) |
| 2027 | "Edit the files listed in the drag-n-drop EVENT. | 2240 | (global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) |
| 2028 | Switch to a buffer editing the last file dropped." | ||
| 2029 | (interactive "e") | ||
| 2030 | ;; Make sure the drop target has positive co-ords | ||
| 2031 | ;; before setting the selected frame - otherwise it | ||
| 2032 | ;; won't work. <skx@tardis.ed.ac.uk> | ||
| 2033 | (let* ((window (posn-window (event-start event))) | ||
| 2034 | (coords (posn-x-y (event-start event))) | ||
| 2035 | (x (car coords)) | ||
| 2036 | (y (cdr coords))) | ||
| 2037 | (if (and (> x 0) (> y 0)) | ||
| 2038 | (set-frame-selected-window nil window)) | ||
| 2039 | (dolist (file-name (nth 2 event)) | ||
| 2040 | (dnd-handle-one-url window 'private | ||
| 2041 | (concat "file:" file-name)))) | ||
| 2042 | (select-frame-set-input-focus (selected-frame))) | ||
| 2043 | 2241 | ||
| 2044 | (global-set-key [drag-n-drop] 'mac-drag-n-drop) | ||
| 2045 | (global-set-key [M-drag-n-drop] 'mac-drag-n-drop) | ||
| 2046 | 2242 | ||
| 2047 | ;;;; Non-toolkit Scroll bars | 2243 | ;;;; Non-toolkit Scroll bars |
| 2048 | 2244 | ||
| @@ -2107,6 +2303,7 @@ Switch to a buffer editing the last file dropped." | |||
| 2107 | (scroll-up 1))) | 2303 | (scroll-up 1))) |
| 2108 | 2304 | ||
| 2109 | ) | 2305 | ) |
| 2306 | |||
| 2110 | 2307 | ||
| 2111 | ;;;; Others | 2308 | ;;;; Others |
| 2112 | 2309 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 049d65c62fa..2bf36283983 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -162,6 +162,14 @@ | |||
| 162 | (define-key xterm-function-map "\e[4~" [select]) | 162 | (define-key xterm-function-map "\e[4~" [select]) |
| 163 | (define-key xterm-function-map "\e[29~" [print]) | 163 | (define-key xterm-function-map "\e[29~" [print]) |
| 164 | 164 | ||
| 165 | ;; These keys will be available xterm starting probably from | ||
| 166 | ;; version 214. | ||
| 167 | (define-key xterm-function-map "\e[27;5;8~" [(control ?\t)]) | ||
| 168 | (define-key xterm-function-map "\e[27;5;44~" [(control ?\,)]) | ||
| 169 | (define-key xterm-function-map "\e[27;5;46~" [(control ?\.)]) | ||
| 170 | (define-key xterm-function-map "\e[27;5;47~" [(control ?\/)]) | ||
| 171 | (define-key xterm-function-map "\e[27;5;92~" [(control ?\\)]) | ||
| 172 | |||
| 165 | ;; Other versions of xterm might emit these. | 173 | ;; Other versions of xterm might emit these. |
| 166 | (define-key xterm-function-map "\e[A" [up]) | 174 | (define-key xterm-function-map "\e[A" [up]) |
| 167 | (define-key xterm-function-map "\e[B" [down]) | 175 | (define-key xterm-function-map "\e[B" [down]) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index da77508dce3..fed06a572bb 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2607,15 +2607,18 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2607 | (mapcar 'list (ispell-valid-dictionary-list))) | 2607 | (mapcar 'list (ispell-valid-dictionary-list))) |
| 2608 | nil t) | 2608 | nil t) |
| 2609 | current-prefix-arg)) | 2609 | current-prefix-arg)) |
| 2610 | (unless arg (ispell-buffer-local-dict)) | 2610 | (unless arg (ispell-buffer-local-dict 'no-reload)) |
| 2611 | (if (equal dict "default") (setq dict nil)) | 2611 | (if (equal dict "default") (setq dict nil)) |
| 2612 | ;; This relies on completing-read's bug of returning "" for no match | 2612 | ;; This relies on completing-read's bug of returning "" for no match |
| 2613 | (cond ((equal dict "") | 2613 | (cond ((equal dict "") |
| 2614 | (ispell-internal-change-dictionary) | ||
| 2614 | (message "Using %s dictionary" | 2615 | (message "Using %s dictionary" |
| 2615 | (or ispell-local-dictionary ispell-dictionary "default"))) | 2616 | (or ispell-local-dictionary ispell-dictionary "default"))) |
| 2616 | ((equal dict (or ispell-local-dictionary | 2617 | ((equal dict (or ispell-local-dictionary |
| 2617 | ispell-dictionary "default")) | 2618 | ispell-dictionary "default")) |
| 2618 | ;; Specified dictionary is the default already. No-op | 2619 | ;; Specified dictionary is the default already. Could reload |
| 2620 | ;; the dictionaries if needed. | ||
| 2621 | (ispell-internal-change-dictionary) | ||
| 2619 | (and (interactive-p) | 2622 | (and (interactive-p) |
| 2620 | (message "No change, using %s dictionary" dict))) | 2623 | (message "No change, using %s dictionary" dict))) |
| 2621 | (t ; reset dictionary! | 2624 | (t ; reset dictionary! |
| @@ -2634,13 +2637,16 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2634 | dict)))) | 2637 | dict)))) |
| 2635 | 2638 | ||
| 2636 | (defun ispell-internal-change-dictionary () | 2639 | (defun ispell-internal-change-dictionary () |
| 2637 | "Update the dictionary actually used by Ispell. | 2640 | "Update the dictionary and the personal dictionary used by Ispell. |
| 2638 | This may kill the Ispell process; if so, | 2641 | This may kill the Ispell process; if so, |
| 2639 | a new one will be started when needed." | 2642 | a new one will be started when needed." |
| 2640 | (let ((dict (or ispell-local-dictionary ispell-dictionary))) | 2643 | (let ((dict (or ispell-local-dictionary ispell-dictionary)) |
| 2641 | (unless (equal ispell-current-dictionary dict) | 2644 | (pdict (or ispell-local-pdict ispell-personal-dictionary))) |
| 2645 | (unless (and (equal ispell-current-dictionary dict) | ||
| 2646 | (equal ispell-current-personal-dictionary pdict)) | ||
| 2642 | (ispell-kill-ispell t) | 2647 | (ispell-kill-ispell t) |
| 2643 | (setq ispell-current-dictionary dict)))) | 2648 | (setq ispell-current-dictionary dict |
| 2649 | ispell-current-personal-dictionary pdict)))) | ||
| 2644 | 2650 | ||
| 2645 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. | 2651 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. |
| 2646 | 2652 | ||
| @@ -3667,8 +3673,9 @@ Includes Latex/Nroff modes and extended character mode." | |||
| 3667 | 3673 | ||
| 3668 | ;;; Can kill the current ispell process | 3674 | ;;; Can kill the current ispell process |
| 3669 | 3675 | ||
| 3670 | (defun ispell-buffer-local-dict () | 3676 | (defun ispell-buffer-local-dict (&optional no-reload) |
| 3671 | "Initializes local dictionary and local personal dictionary. | 3677 | "Initializes local dictionary and local personal dictionary. |
| 3678 | If optional NO-RELOAD is non-nil, do not make any dictionary reloading. | ||
| 3672 | When a dictionary is defined in the buffer (see variable | 3679 | When a dictionary is defined in the buffer (see variable |
| 3673 | `ispell-dictionary-keyword'), it will override the local setting | 3680 | `ispell-dictionary-keyword'), it will override the local setting |
| 3674 | from \\[ispell-change-dictionary]. | 3681 | from \\[ispell-change-dictionary]. |
| @@ -3695,12 +3702,9 @@ Both should not be used to define a buffer-local dictionary." | |||
| 3695 | (if (re-search-forward " *\\([^ \"]+\\)" end t) | 3702 | (if (re-search-forward " *\\([^ \"]+\\)" end t) |
| 3696 | (setq ispell-local-pdict | 3703 | (setq ispell-local-pdict |
| 3697 | (match-string-no-properties 1))))))) | 3704 | (match-string-no-properties 1))))))) |
| 3698 | ;; Reload if new personal dictionary defined. | 3705 | (unless no-reload |
| 3699 | (if (not (equal ispell-current-personal-dictionary | 3706 | ;; Reload if new dictionary (maybe the personal one) defined. |
| 3700 | (or ispell-local-pdict ispell-personal-dictionary))) | 3707 | (ispell-internal-change-dictionary))) |
| 3701 | (ispell-kill-ispell t)) | ||
| 3702 | ;; Reload if new dictionary defined. | ||
| 3703 | (ispell-internal-change-dictionary)) | ||
| 3704 | 3708 | ||
| 3705 | 3709 | ||
| 3706 | (defun ispell-buffer-local-words () | 3710 | (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)) |