diff options
| author | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
| commit | e0bc17abe6979d607e8de4684dddb96e53c60065 (patch) | |
| tree | b7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /lisp | |
| parent | f158167a84475d5fc41931531406821e6413afd7 (diff) | |
| parent | 707994d2626cf0f01c3ece4028d73835068d64dc (diff) | |
| download | emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'lisp')
52 files changed, 1073 insertions, 703 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e99856fe5f3..c22ab994eff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,221 @@ | |||
| 1 | 2004-10-30 Simon Josefsson <jas@extundo.com> | ||
| 2 | |||
| 3 | * progmodes/autoconf.el (autoconf-font-lock-keywords): Recognize | ||
| 4 | AS_* too. | ||
| 5 | |||
| 6 | 2004-10-29 Simon Josefsson <jas@extundo.com> | ||
| 7 | |||
| 8 | * subr.el (read-passwd): Move back from password.el. | ||
| 9 | |||
| 10 | * password.el: Remove, not ready yet. | ||
| 11 | |||
| 12 | 2004-10-29 Andreas Schwab <schwab@suse.de> | ||
| 13 | |||
| 14 | * speedbar.el (speedbar-frame-parameters): Improve customize type. | ||
| 15 | |||
| 16 | 2004-10-29 Sam Steingold <sds@gnu.org> | ||
| 17 | |||
| 18 | * mouse.el (mouse-show-mark): Replace the last occurrence of | ||
| 19 | x-lost-selection-hooks with x-lost-selection-functions. | ||
| 20 | |||
| 21 | 2004-10-28 Stefan <monnier@iro.umontreal.ca> | ||
| 22 | |||
| 23 | * mouse.el (mouse-show-mark): Adjust to new name and don't assume | ||
| 24 | x-lost-selection-functions is bound. | ||
| 25 | |||
| 26 | * mouse-sel.el (mouse-sel-mode): | ||
| 27 | * emacs-lisp/lselect.el: Adjust to new names for | ||
| 28 | x-(lost|sent)-selection-functions. | ||
| 29 | |||
| 30 | * subr.el (x-lost-selection-hooks, x-sent-selection-hooks): | ||
| 31 | New obsolete aliases of x-lost-selection-functions and | ||
| 32 | x-sent-selection-functions. | ||
| 33 | |||
| 34 | 2004-10-28 Kim F. Storm <storm@cua.dk> | ||
| 35 | |||
| 36 | * imenu.el (imenu-scanning-message): Remove. | ||
| 37 | (imenu-progress-message): Make it a no-op. | ||
| 38 | |||
| 39 | 2004-10-28 John Paul Wallington <jpw@gnu.org> | ||
| 40 | |||
| 41 | * files.el (set-auto-mode): Call `throw' correctly. | ||
| 42 | |||
| 43 | 2004-10-28 Juri Linkov <juri@jurta.org> | ||
| 44 | |||
| 45 | * info.el (Info-file-list-for-emacs): Add ("Info" . "info") | ||
| 46 | to search `Info-...' commands in `info' manual. | ||
| 47 | (Info-goto-emacs-command-node, Info-goto-emacs-key-command-node): | ||
| 48 | Add 'info-file "emacs" property. | ||
| 49 | (Info-find-emacs-command-nodes): Fix index line number regexp. | ||
| 50 | Set real line number (instead of fake 0) in first element of the | ||
| 51 | returned list. | ||
| 52 | (Info-goto-emacs-command-node): Use line number of first element | ||
| 53 | to set point in the first found Info node. | ||
| 54 | |||
| 55 | * progmodes/grep.el (grep-regexp-alist): Move match highlighting | ||
| 56 | code to `grep-mode-font-lock-keywords'. | ||
| 57 | (grep-mode-font-lock-keywords): Delete grep markers instead | ||
| 58 | of making them invisible. | ||
| 59 | |||
| 60 | 2004-10-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 61 | |||
| 62 | * mail/emacsbug.el (report-emacs-bug): Insert x-server-vendor | ||
| 63 | and x-server-version in bug report. | ||
| 64 | |||
| 65 | 2004-10-28 Daniel Pfeiffer <occitan@esperanto.org> | ||
| 66 | |||
| 67 | * files.el (set-auto-mode-0): New function. | ||
| 68 | (set-auto-mode): Use it to handle aliased modes and to | ||
| 69 | be consistent between C-x C-f and C-x C-w. | ||
| 70 | |||
| 71 | 2004-10-28 Kenichi Handa <handa@m17n.org> | ||
| 72 | |||
| 73 | * international/utf-8.el (utf-translate-cjk-charsets): Add | ||
| 74 | katakana-jisx0201. | ||
| 75 | |||
| 76 | * international/subst-jis.el: Add data for JISX0201. | ||
| 77 | |||
| 78 | 2004-10-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 79 | |||
| 80 | * obsolete/hilit19.el (hilit-mode): New function. | ||
| 81 | Move all the toplevel side-effecting stuff into it, so that loading | ||
| 82 | hilit19 doesn't mess everything up any more. | ||
| 83 | |||
| 84 | 2004-10-27 Richard M. Stallman <rms@gnu.org> | ||
| 85 | |||
| 86 | * add-log.el (add-change-log-entry): Set up mailing address | ||
| 87 | and full name later, and don't alter add-log-mailing-address | ||
| 88 | or add-log-full-name. | ||
| 89 | |||
| 90 | * elide-head.el (elide-head): Change error to message. | ||
| 91 | (elide-head-show): Likewise. | ||
| 92 | |||
| 93 | * apropos.el (apropos-macrop): Doc fix. | ||
| 94 | |||
| 95 | * mouse.el (mouse-show-mark): Do most processing the same | ||
| 96 | regardless of transient-mark-mode. | ||
| 97 | |||
| 98 | * shadowfile.el (shadow-copy-files): Use interactive-p | ||
| 99 | only to control whether to print a message. | ||
| 100 | |||
| 101 | * tar-mode.el (tar-mode): Use write-contents-functions, | ||
| 102 | not write-contents-hooks. | ||
| 103 | |||
| 104 | * eshell/em-unix.el (eshell-du-sum-directory): Don't use | ||
| 105 | directory-sep-char. | ||
| 106 | |||
| 107 | 2004-10-27 Richard M. Stallman <rms@gnu.org> | ||
| 108 | |||
| 109 | * strokes.el (strokes-unload-hook): Fix previous change. | ||
| 110 | |||
| 111 | * type-break.el (type-break-run-at-time): Always use run-at-time; | ||
| 112 | forget the alternatives. | ||
| 113 | (type-break-cancel-function-timers): Always use cancel-function-timers; | ||
| 114 | forget the alternatives. | ||
| 115 | |||
| 116 | * pcomplete.el (pcomplete-entries): Don't use directory-sep-char. | ||
| 117 | |||
| 118 | 2004-10-27 Kenichi Handa <handa@m17n.org> | ||
| 119 | |||
| 120 | * international/subst-jis.el: Use utf-translate-cjk-substitutable-p. | ||
| 121 | |||
| 122 | * international/subst-gb2312.el: Likewise. | ||
| 123 | |||
| 124 | * international/subst-big5.el: Likewise. | ||
| 125 | |||
| 126 | * international/subst-ksc.el: Likewise. | ||
| 127 | |||
| 128 | * international/utf-8.el (utf-translate-cjk-unicode-range-string): | ||
| 129 | New variable. | ||
| 130 | (utf-translate-cjk-set-unicode-range): New function. | ||
| 131 | (utf-translate-cjk-unicode-range): Make it customizable. | ||
| 132 | (utf-8-post-read-conversion): | ||
| 133 | Use utf-translate-cjk-unicode-range-string. | ||
| 134 | (ccl-decode-mule-utf-8): Check utf-subst-table-for-decode for more | ||
| 135 | Unicode ranges. | ||
| 136 | |||
| 137 | 2004-10-26 Daniel Pfeiffer <occitan@esperanto.org> | ||
| 138 | |||
| 139 | * files.el (auto-mode-alist): Add pod, js, xbm and xpm and group | ||
| 140 | trivial variants to shorten the list. | ||
| 141 | (xml-based-modes): New var. | ||
| 142 | (set-auto-mode): Give interpreter-mode-alist or <?xml or <!DOCTYPE | ||
| 143 | declaration higher priority than auto-mode-alist. | ||
| 144 | |||
| 145 | * find-file.el (cc-other-file-alist): Bring it in line with | ||
| 146 | cc-mode's auto-mode-alist entries and use \' instead of $. | ||
| 147 | |||
| 148 | * textmodes/sgml-mode.el (sgml-mode): Fix imenu-generic-expression | ||
| 149 | and add "Id" and "Name" submenus to it. | ||
| 150 | |||
| 151 | * imenu.el (imenu--generic-function): Skip matches in comments. | ||
| 152 | |||
| 153 | 2004-10-26 Jay Belanger <belanger@truman.edu> | ||
| 154 | |||
| 155 | * calc/calc.el (calc,full-calc, calc-quit, calc-keypad) | ||
| 156 | (full-calc-keypad, calc-trail-display): Use an extra argument | ||
| 157 | instead of `interactive-p'. | ||
| 158 | |||
| 159 | * calc/calc-misc.el (calc-other-window): Use an extra argument | ||
| 160 | instead of `interactive-p'. | ||
| 161 | |||
| 162 | * calc/calc-rewr.el (calc-match): Use an extra argument instead of | ||
| 163 | `interactive-p'. | ||
| 164 | |||
| 165 | 2004-10-26 Kim F. Storm <storm@cua.dk> | ||
| 166 | |||
| 167 | * help.el (describe-key): Describe both down-event and up-event | ||
| 168 | for a mouse click. | ||
| 169 | |||
| 170 | 2004-10-26 Richard M. Stallman <rms@gnu.org> | ||
| 171 | |||
| 172 | * woman.el (woman): Don't call interactive-p. | ||
| 173 | |||
| 174 | * pcomplete.el (pcomplete): Instead of interactive-p, | ||
| 175 | use an arg set non-nil by the interactive spec. | ||
| 176 | |||
| 177 | * menu-bar.el (menu-bar-make-toggle): Instead of interactive-p, | ||
| 178 | use an arg set non-nil by the interactive spec. | ||
| 179 | |||
| 180 | * man.el (Man-cleanup-manpage): Instead of interactive-p, | ||
| 181 | use an arg set non-nil by the interactive spec. | ||
| 182 | |||
| 183 | 2004-10-26 Pavel Kobiakov <pk_at_work@yahoo.com> | ||
| 184 | |||
| 185 | * progmodes/flymake.el (flymake-split-string): | ||
| 186 | Use `flymake-split-string-remove-empty-edges' in any case. | ||
| 187 | |||
| 188 | 2004-10-26 Masatake YAMATO <jet@gyve.org> | ||
| 189 | |||
| 190 | * progmodes/flymake.el (flymake-err-line-patterns): | ||
| 191 | Use `compilation-error-regexp-alist-alist' instead of | ||
| 192 | `compilation-error-regexp-alist'. | ||
| 193 | |||
| 194 | 2004-10-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 195 | |||
| 196 | * textmodes/tex-mode.el (tex-font-lock-keywords-1): Fix up the spurious | ||
| 197 | verbatim face on the \ of \end{verbatim}. | ||
| 198 | |||
| 199 | 2004-10-25 Jay Belanger <belanger@truman.edu> | ||
| 200 | |||
| 201 | * calc/calc-incom.el (calc-digit-dots): Inhibit read-only before | ||
| 202 | erasing minibuffer. | ||
| 203 | |||
| 204 | 2004-10-25 Simon Josefsson <jas@extundo.com> | ||
| 205 | |||
| 206 | * subr.el (read-passwd): Move to net/password.el. | ||
| 207 | |||
| 208 | * net/password.el (read-passwd): Add. Autoload it. | ||
| 209 | |||
| 210 | 2004-10-25 Kai Grossjohann <kai.grossjohann@gmx.net> | ||
| 211 | |||
| 212 | * mouse-sel.el (mouse-sel-mode): Specify custom group. | ||
| 213 | |||
| 214 | * simple.el (process-file): Fix logic. | ||
| 215 | |||
| 1 | 2004-10-24 Luc Teirlinck <teirllm@auburn.edu> | 216 | 2004-10-24 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 217 | ||
| 3 | * indent.el (set-left-margin, set-right-margin): Delete redundant | 218 | * indent.el (set-left-margin, set-right-margin): Delete redundant code. |
| 4 | code. | ||
| 5 | (increase-right-margin): Remove erroneous call to `interactive-p'. | 219 | (increase-right-margin): Remove erroneous call to `interactive-p'. |
| 6 | 220 | ||
| 7 | 2004-10-24 Kim F. Storm <storm@cua.dk> | 221 | 2004-10-24 Kim F. Storm <storm@cua.dk> |
| @@ -22,24 +236,23 @@ | |||
| 22 | 236 | ||
| 23 | 2004-10-24 Masatake YAMATO <jet@gyve.org> | 237 | 2004-10-24 Masatake YAMATO <jet@gyve.org> |
| 24 | 238 | ||
| 25 | * progmodes/gdb-ui.el (gdb-assembler-font-lock-keywords): Handle | 239 | * progmodes/gdb-ui.el (gdb-assembler-font-lock-keywords): |
| 26 | periods and underscores in a function name. | 240 | Handle periods and underscores in a function name. |
| 27 | Remove the address fontification. | 241 | Remove the address fontification. |
| 28 | 242 | ||
| 29 | 2004-10-24 Masatake YAMATO <jet@gyve.org> | 243 | 2004-10-24 Masatake YAMATO <jet@gyve.org> |
| 30 | 244 | ||
| 31 | * progmodes/asm-mode.el (asm-font-lock-keywords): Use | 245 | * progmodes/asm-mode.el (asm-font-lock-keywords): |
| 32 | font-lock-variable-name-face for registers. | 246 | Use font-lock-variable-name-face for registers. |
| 33 | 247 | ||
| 34 | 2004-10-24 Nick Roberts <nickrob@snap.net.nz> | 248 | 2004-10-24 Nick Roberts <nickrob@snap.net.nz> |
| 35 | 249 | ||
| 36 | * progmodes/gdb-ui.el (gdb-get-create-buffer): Allow modes to run | 250 | * progmodes/gdb-ui.el (gdb-get-create-buffer): Allow modes to run |
| 37 | kill-all-local-variables. | 251 | kill-all-local-variables. |
| 38 | (gdb-breakpoints-mode, gdb-frames-mode, gdb-threads-mode) | 252 | (gdb-breakpoints-mode, gdb-frames-mode, gdb-threads-mode) |
| 39 | (gdb-registers-mode, gdb-locals-mode, gdb-assembler-mode): Use | 253 | (gdb-registers-mode, gdb-locals-mode, gdb-assembler-mode): |
| 40 | kill-all-local-variables and provide mode-hooks. | 254 | Use kill-all-local-variables and provide mode-hooks. |
| 41 | (gdb-assembler-font-lock-keywords): New font lock keywords | 255 | (gdb-assembler-font-lock-keywords): New font lock keywords definition. |
| 42 | definition. | ||
| 43 | (gdb-assembler-mode): Use 'gdb-assembler-font-lock-keywords'. | 256 | (gdb-assembler-mode): Use 'gdb-assembler-font-lock-keywords'. |
| 44 | Suggested by Masatake YAMATO <jet@gyve.org>. | 257 | Suggested by Masatake YAMATO <jet@gyve.org>. |
| 45 | 258 | ||
| @@ -84,13 +297,16 @@ | |||
| 84 | 2004-10-21 Jay Belanger <belanger@truman.edu> | 297 | 2004-10-21 Jay Belanger <belanger@truman.edu> |
| 85 | 298 | ||
| 86 | * calc/calc-aent.el (calc-alg-ent-map, calc-alg-ent-esc-map): | 299 | * calc/calc-aent.el (calc-alg-ent-map, calc-alg-ent-esc-map): |
| 87 | Declared these variables with defvar. | 300 | Declare these variables with defvar. |
| 88 | 301 | ||
| 89 | * calc/calc-aent.el (calc-do-alg-entry): Since `calc-alg-ent-map' | 302 | * calc/calc-aent.el (calc-do-alg-entry): Since `calc-alg-ent-map' |
| 90 | is bound, only check to see if it is bound. | 303 | is bound, only check to see if it is bound. |
| 91 | 304 | ||
| 92 | 2004-10-21 Stefan Monnier <monnier@iro.umontreal.ca> | 305 | 2004-10-21 Stefan Monnier <monnier@iro.umontreal.ca> |
| 93 | 306 | ||
| 307 | * textmodes/tex-mode.el (tex-compilation-parse-errors): | ||
| 308 | Don't output messages. | ||
| 309 | |||
| 94 | * calc/calc-help.el (calc-describe-bindings): Fix last change. | 310 | * calc/calc-help.el (calc-describe-bindings): Fix last change. |
| 95 | 311 | ||
| 96 | 2004-10-21 John Paul Wallington <jpw@gnu.org> | 312 | 2004-10-21 John Paul Wallington <jpw@gnu.org> |
diff --git a/lisp/add-log.el b/lisp/add-log.el index 26faea2ddc3..ae135b2bfb3 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -471,20 +471,6 @@ Today's date is calculated according to `change-log-time-zone-rule' if | |||
| 471 | non-nil, otherwise in local time." | 471 | non-nil, otherwise in local time." |
| 472 | (interactive (list current-prefix-arg | 472 | (interactive (list current-prefix-arg |
| 473 | (prompt-for-change-log-name))) | 473 | (prompt-for-change-log-name))) |
| 474 | (or add-log-full-name | ||
| 475 | (setq add-log-full-name (user-full-name))) | ||
| 476 | (or add-log-mailing-address | ||
| 477 | (setq add-log-mailing-address user-mail-address)) | ||
| 478 | (if whoami | ||
| 479 | (progn | ||
| 480 | (setq add-log-full-name (read-input "Full name: " add-log-full-name)) | ||
| 481 | ;; Note that some sites have room and phone number fields in | ||
| 482 | ;; full name which look silly when inserted. Rather than do | ||
| 483 | ;; anything about that here, let user give prefix argument so that | ||
| 484 | ;; s/he can edit the full name field in prompter if s/he wants. | ||
| 485 | (setq add-log-mailing-address | ||
| 486 | (read-input "Mailing address: " add-log-mailing-address)))) | ||
| 487 | |||
| 488 | (let* ((defun (add-log-current-defun)) | 474 | (let* ((defun (add-log-current-defun)) |
| 489 | (version (and change-log-version-info-enabled | 475 | (version (and change-log-version-info-enabled |
| 490 | (change-log-version-number-search))) | 476 | (change-log-version-number-search))) |
| @@ -495,7 +481,19 @@ non-nil, otherwise in local time." | |||
| 495 | (file-name (expand-file-name (find-change-log file-name buffer-file))) | 481 | (file-name (expand-file-name (find-change-log file-name buffer-file))) |
| 496 | ;; Set ITEM to the file name to use in the new item. | 482 | ;; Set ITEM to the file name to use in the new item. |
| 497 | (item (add-log-file-name buffer-file file-name)) | 483 | (item (add-log-file-name buffer-file file-name)) |
| 498 | bound) | 484 | bound |
| 485 | (full-name (or add-log-full-name (user-full-name))) | ||
| 486 | (mailing-address (or add-log-mailing-address user-mail-address))) | ||
| 487 | |||
| 488 | (if whoami | ||
| 489 | (progn | ||
| 490 | (setq full-name (read-input "Full name: " full-name)) | ||
| 491 | ;; Note that some sites have room and phone number fields in | ||
| 492 | ;; full name which look silly when inserted. Rather than do | ||
| 493 | ;; anything about that here, let user give prefix argument so that | ||
| 494 | ;; s/he can edit the full name field in prompter if s/he wants. | ||
| 495 | (setq mailing-address | ||
| 496 | (read-input "Mailing address: " mailing-address)))) | ||
| 499 | 497 | ||
| 500 | (unless (equal file-name buffer-file-name) | 498 | (unless (equal file-name buffer-file-name) |
| 501 | (if (or other-window (window-dedicated-p (selected-window))) | 499 | (if (or other-window (window-dedicated-p (selected-window))) |
| @@ -515,11 +513,11 @@ non-nil, otherwise in local time." | |||
| 515 | ;; Advance into first entry if it is usable; else make new one. | 513 | ;; Advance into first entry if it is usable; else make new one. |
| 516 | (let ((new-entries (mapcar (lambda (addr) | 514 | (let ((new-entries (mapcar (lambda (addr) |
| 517 | (concat (funcall add-log-time-format) | 515 | (concat (funcall add-log-time-format) |
| 518 | " " add-log-full-name | 516 | " " full-name |
| 519 | " <" addr ">")) | 517 | " <" addr ">")) |
| 520 | (if (consp add-log-mailing-address) | 518 | (if (consp mailing-address) |
| 521 | add-log-mailing-address | 519 | mailing-address |
| 522 | (list add-log-mailing-address))))) | 520 | (list mailing-address))))) |
| 523 | (if (and (not add-log-always-start-new-record) | 521 | (if (and (not add-log-always-start-new-record) |
| 524 | (let ((hit nil)) | 522 | (let ((hit nil)) |
| 525 | (dolist (entry new-entries hit) | 523 | (dolist (entry new-entries hit) |
diff --git a/lisp/apropos.el b/lisp/apropos.el index e5904e73b71..8bfaa3ad592 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -875,7 +875,7 @@ If non-nil TEXT is a string that will be printed as a heading." | |||
| 875 | 875 | ||
| 876 | 876 | ||
| 877 | (defun apropos-macrop (symbol) | 877 | (defun apropos-macrop (symbol) |
| 878 | "T if SYMBOL is a Lisp macro." | 878 | "Return t if SYMBOL is a Lisp macro." |
| 879 | (and (fboundp symbol) | 879 | (and (fboundp symbol) |
| 880 | (consp (setq symbol | 880 | (consp (setq symbol |
| 881 | (symbol-function symbol))) | 881 | (symbol-function symbol))) |
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index b8bb7ab4f9a..7dc7f08b4bd 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el | |||
| @@ -183,7 +183,8 @@ | |||
| 183 | (if calc-prev-prev-char | 183 | (if calc-prev-prev-char |
| 184 | (calcDigit-nondigit) | 184 | (calcDigit-nondigit) |
| 185 | (setq calc-digit-value nil) | 185 | (setq calc-digit-value nil) |
| 186 | (erase-buffer) | 186 | (let ((inhibit-read-only t)) |
| 187 | (erase-buffer)) | ||
| 187 | (exit-minibuffer))) | 188 | (exit-minibuffer))) |
| 188 | ;; just ignore extra decimal point, anticipating ".." | 189 | ;; just ignore extra decimal point, anticipating ".." |
| 189 | (delete-backward-char 1))) | 190 | (delete-backward-char 1))) |
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index c01d37e6848..159b1ee3178 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el | |||
| @@ -130,9 +130,9 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)." | |||
| 130 | "Now using full screen for Calc" | 130 | "Now using full screen for Calc" |
| 131 | "Now using partial screen for Calc")))) | 131 | "Now using partial screen for Calc")))) |
| 132 | 132 | ||
| 133 | (defun calc-other-window () | 133 | (defun calc-other-window (&optional interactive) |
| 134 | "Invoke the Calculator in another window." | 134 | "Invoke the Calculator in another window." |
| 135 | (interactive) | 135 | (interactive "p") |
| 136 | (if (memq major-mode '(calc-mode calc-trail-mode)) | 136 | (if (memq major-mode '(calc-mode calc-trail-mode)) |
| 137 | (progn | 137 | (progn |
| 138 | (other-window 1) | 138 | (other-window 1) |
| @@ -141,7 +141,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)." | |||
| 141 | (if (get-buffer-window "*Calculator*") | 141 | (if (get-buffer-window "*Calculator*") |
| 142 | (calc-quit) | 142 | (calc-quit) |
| 143 | (let ((win (selected-window))) | 143 | (let ((win (selected-window))) |
| 144 | (calc nil win (interactive-p)))))) | 144 | (calc nil win interactive))))) |
| 145 | 145 | ||
| 146 | (defun another-calc () | 146 | (defun another-calc () |
| 147 | "Create another, independent Calculator buffer." | 147 | "Create another, independent Calculator buffer." |
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index 51cffb753fc..47b48bd88d8 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el | |||
| @@ -143,15 +143,15 @@ | |||
| 143 | (calc-pop-push-record-list n "rwrt" (list expr))) | 143 | (calc-pop-push-record-list n "rwrt" (list expr))) |
| 144 | (calc-handle-whys))) | 144 | (calc-handle-whys))) |
| 145 | 145 | ||
| 146 | (defun calc-match (pat) | 146 | (defun calc-match (pat &optional interactive) |
| 147 | (interactive "sPattern: \n") | 147 | (interactive "sPattern: \np") |
| 148 | (calc-slow-wrapper | 148 | (calc-slow-wrapper |
| 149 | (let (n expr) | 149 | (let (n expr) |
| 150 | (if (or (null pat) (equal pat "") (equal pat "$")) | 150 | (if (or (null pat) (equal pat "") (equal pat "$")) |
| 151 | (setq expr (calc-top-n 2) | 151 | (setq expr (calc-top-n 2) |
| 152 | pat (calc-top-n 1) | 152 | pat (calc-top-n 1) |
| 153 | n 2) | 153 | n 2) |
| 154 | (if (interactive-p) (setq calc-previous-alg-entry pat)) | 154 | (if interactive (setq calc-previous-alg-entry pat)) |
| 155 | (setq pat (if (stringp pat) (math-read-expr pat) pat)) | 155 | (setq pat (if (stringp pat) (math-read-expr pat) pat)) |
| 156 | (if (eq (car-safe pat) 'error) | 156 | (if (eq (car-safe pat) 'error) |
| 157 | (error "Bad format in expression: %s" (nth 1 pat))) | 157 | (error "Bad format in expression: %s" (nth 1 pat))) |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index c1669f78f08..4ace5fb6780 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -1142,7 +1142,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1142 | ;;;###autoload | 1142 | ;;;###autoload |
| 1143 | (defun calc (&optional arg full-display interactive) | 1143 | (defun calc (&optional arg full-display interactive) |
| 1144 | "The Emacs Calculator. Full documentation is listed under \"calc-mode\"." | 1144 | "The Emacs Calculator. Full documentation is listed under \"calc-mode\"." |
| 1145 | (interactive "P") | 1145 | (interactive "P\ni\np") |
| 1146 | (if arg | 1146 | (if arg |
| 1147 | (unless (eq arg 0) | 1147 | (unless (eq arg 0) |
| 1148 | (calc-extensions) | 1148 | (calc-extensions) |
| @@ -1188,17 +1188,16 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1188 | (window-point full-display) | 1188 | (window-point full-display) |
| 1189 | (select-window full-display)) | 1189 | (select-window full-display)) |
| 1190 | (calc-check-defines) | 1190 | (calc-check-defines) |
| 1191 | (when (and calc-said-hello | 1191 | (when (and calc-said-hello interactive) |
| 1192 | (or (interactive-p) interactive)) | ||
| 1193 | (sit-for 2) | 1192 | (sit-for 2) |
| 1194 | (message "")) | 1193 | (message "")) |
| 1195 | (setq calc-said-hello t))))) | 1194 | (setq calc-said-hello t))))) |
| 1196 | 1195 | ||
| 1197 | ;;;###autoload | 1196 | ;;;###autoload |
| 1198 | (defun full-calc () | 1197 | (defun full-calc (&optional interactive) |
| 1199 | "Invoke the Calculator and give it a full-sized window." | 1198 | "Invoke the Calculator and give it a full-sized window." |
| 1200 | (interactive) | 1199 | (interactive "p") |
| 1201 | (calc nil t (interactive-p))) | 1200 | (calc nil t interactive)) |
| 1202 | 1201 | ||
| 1203 | (defun calc-same-interface (arg) | 1202 | (defun calc-same-interface (arg) |
| 1204 | "Invoke the Calculator using the most recent interface (calc or calc-keypad)." | 1203 | "Invoke the Calculator using the most recent interface (calc or calc-keypad)." |
| @@ -1215,8 +1214,8 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1215 | (calc arg calc-full-mode t)))))) | 1214 | (calc arg calc-full-mode t)))))) |
| 1216 | 1215 | ||
| 1217 | 1216 | ||
| 1218 | (defun calc-quit (&optional non-fatal) | 1217 | (defun calc-quit (&optional non-fatal interactive) |
| 1219 | (interactive) | 1218 | (interactive "i\np") |
| 1220 | (and calc-standalone-flag (not non-fatal) | 1219 | (and calc-standalone-flag (not non-fatal) |
| 1221 | (save-buffers-kill-emacs nil)) | 1220 | (save-buffers-kill-emacs nil)) |
| 1222 | (if (and (equal (buffer-name) "*Gnuplot Trail*") | 1221 | (if (and (equal (buffer-name) "*Gnuplot Trail*") |
| @@ -1226,7 +1225,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1226 | (calc-edit-cancel) | 1225 | (calc-edit-cancel) |
| 1227 | (if (eq major-mode 'MacEdit-mode) | 1226 | (if (eq major-mode 'MacEdit-mode) |
| 1228 | (MacEdit-cancel-edit) | 1227 | (MacEdit-cancel-edit) |
| 1229 | (if (and (interactive-p) | 1228 | (if (and interactive |
| 1230 | calc-embedded-info | 1229 | calc-embedded-info |
| 1231 | (eq (current-buffer) (aref calc-embedded-info 0))) | 1230 | (eq (current-buffer) (aref calc-embedded-info 0))) |
| 1232 | (calc-embedded nil) | 1231 | (calc-embedded nil) |
| @@ -1266,22 +1265,22 @@ or a list containing a character position and an error message in string form." | |||
| 1266 | (calc-do-calc-eval str separator args)) | 1265 | (calc-do-calc-eval str separator args)) |
| 1267 | 1266 | ||
| 1268 | ;;;###autoload | 1267 | ;;;###autoload |
| 1269 | (defun calc-keypad () | 1268 | (defun calc-keypad (&optional interactive) |
| 1270 | "Invoke the Calculator in \"visual keypad\" mode. | 1269 | "Invoke the Calculator in \"visual keypad\" mode. |
| 1271 | This is most useful in the X window system. | 1270 | This is most useful in the X window system. |
| 1272 | In this mode, click on the Calc \"buttons\" using the left mouse button. | 1271 | In this mode, click on the Calc \"buttons\" using the left mouse button. |
| 1273 | Or, position the cursor manually and do M-x calc-keypad-press." | 1272 | Or, position the cursor manually and do M-x calc-keypad-press." |
| 1274 | (interactive) | 1273 | (interactive "p") |
| 1275 | (calc-extensions) | 1274 | (calc-extensions) |
| 1276 | (calc-do-keypad calc-full-mode (interactive-p))) | 1275 | (calc-do-keypad calc-full-mode interactive)) |
| 1277 | 1276 | ||
| 1278 | ;;;###autoload | 1277 | ;;;###autoload |
| 1279 | (defun full-calc-keypad () | 1278 | (defun full-calc-keypad (&optional interactive) |
| 1280 | "Invoke the Calculator in full-screen \"visual keypad\" mode. | 1279 | "Invoke the Calculator in full-screen \"visual keypad\" mode. |
| 1281 | See calc-keypad for details." | 1280 | See calc-keypad for details." |
| 1282 | (interactive) | 1281 | (interactive "p") |
| 1283 | (calc-extensions) | 1282 | (calc-extensions) |
| 1284 | (calc-do-keypad t (interactive-p))) | 1283 | (calc-do-keypad t interactive)) |
| 1285 | 1284 | ||
| 1286 | 1285 | ||
| 1287 | (defvar calc-aborted-prefix nil) | 1286 | (defvar calc-aborted-prefix nil) |
| @@ -1802,8 +1801,8 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack." | |||
| 1802 | val) | 1801 | val) |
| 1803 | 1802 | ||
| 1804 | 1803 | ||
| 1805 | (defun calc-trail-display (flag &optional no-refresh) | 1804 | (defun calc-trail-display (flag &optional no-refresh interactive) |
| 1806 | (interactive "P") | 1805 | (interactive "P\ni\np") |
| 1807 | (let ((win (get-buffer-window (calc-trail-buffer)))) | 1806 | (let ((win (get-buffer-window (calc-trail-buffer)))) |
| 1808 | (if (setq calc-display-trail | 1807 | (if (setq calc-display-trail |
| 1809 | (not (if flag (memq flag '(nil 0)) win))) | 1808 | (not (if flag (memq flag '(nil 0)) win))) |
| @@ -1817,7 +1816,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack." | |||
| 1817 | (setq overlay-arrow-string calc-trail-overlay | 1816 | (setq overlay-arrow-string calc-trail-overlay |
| 1818 | overlay-arrow-position calc-trail-pointer) | 1817 | overlay-arrow-position calc-trail-pointer) |
| 1819 | (or no-refresh | 1818 | (or no-refresh |
| 1820 | (if (interactive-p) | 1819 | (if interactive |
| 1821 | (calc-do-refresh) | 1820 | (calc-do-refresh) |
| 1822 | (calc-refresh)))))) | 1821 | (calc-refresh)))))) |
| 1823 | (if win | 1822 | (if win |
| @@ -1825,7 +1824,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack." | |||
| 1825 | (delete-window win) | 1824 | (delete-window win) |
| 1826 | (calc-wrapper | 1825 | (calc-wrapper |
| 1827 | (or no-refresh | 1826 | (or no-refresh |
| 1828 | (if (interactive-p) | 1827 | (if interactive |
| 1829 | (calc-do-refresh) | 1828 | (calc-do-refresh) |
| 1830 | (calc-refresh)))))))) | 1829 | (calc-refresh)))))))) |
| 1831 | calc-trail-buffer) | 1830 | calc-trail-buffer) |
diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 8fc8e12a3fb..fed6ecee7af 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el | |||
| @@ -98,7 +98,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." | |||
| 98 | (if rest (setq rest (cdr rest)))) | 98 | (if rest (setq rest (cdr rest)))) |
| 99 | (if (not (and beg end)) | 99 | (if (not (and beg end)) |
| 100 | (if (interactive-p) | 100 | (if (interactive-p) |
| 101 | (error "No header found")) | 101 | (message "No header found")) |
| 102 | (goto-char beg) | 102 | (goto-char beg) |
| 103 | (end-of-line) | 103 | (end-of-line) |
| 104 | (if (overlayp elide-head-overlay) | 104 | (if (overlayp elide-head-overlay) |
| @@ -115,7 +115,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." | |||
| 115 | (overlay-buffer elide-head-overlay)) | 115 | (overlay-buffer elide-head-overlay)) |
| 116 | (delete-overlay elide-head-overlay) | 116 | (delete-overlay elide-head-overlay) |
| 117 | (if (interactive-p) | 117 | (if (interactive-p) |
| 118 | (error "No header hidden")))) | 118 | (message "No header hidden")))) |
| 119 | 119 | ||
| 120 | (provide 'elide-head) | 120 | (provide 'elide-head) |
| 121 | 121 | ||
diff --git a/lisp/emacs-lisp/lselect.el b/lisp/emacs-lisp/lselect.el index b292eefbaec..42dad0c48d8 100644 --- a/lisp/emacs-lisp/lselect.el +++ b/lisp/emacs-lisp/lselect.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; lselect.el --- Lucid interface to X Selections | 1 | ;;; lselect.el --- Lucid interface to X Selections |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1990, 1993 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1993, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Keywords: emulations | 6 | ;; Keywords: emulations |
| @@ -146,7 +146,7 @@ secondary selection instead of the primary selection." | |||
| 146 | (x-disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) | 146 | (x-disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) |
| 147 | 147 | ||
| 148 | (defun x-dehilight-selection (selection) | 148 | (defun x-dehilight-selection (selection) |
| 149 | "for use as a value of x-lost-selection-hooks." | 149 | "for use as a value of `x-lost-selection-functions'." |
| 150 | (cond ((eq selection 'PRIMARY) | 150 | (cond ((eq selection 'PRIMARY) |
| 151 | (if primary-selection-extent | 151 | (if primary-selection-extent |
| 152 | (let ((inhibit-quit t)) | 152 | (let ((inhibit-quit t)) |
| @@ -160,23 +160,23 @@ secondary selection instead of the primary selection." | |||
| 160 | (setq secondary-selection-extent nil))))) | 160 | (setq secondary-selection-extent nil))))) |
| 161 | nil) | 161 | nil) |
| 162 | 162 | ||
| 163 | (setq x-lost-selection-hooks 'x-dehilight-selection) | 163 | (setq x-lost-selection-functions 'x-dehilight-selection) |
| 164 | 164 | ||
| 165 | (defun x-notice-selection-requests (selection type successful) | 165 | (defun x-notice-selection-requests (selection type successful) |
| 166 | "for possible use as the value of x-sent-selection-hooks." | 166 | "for possible use as the value of `x-sent-selection-functions'." |
| 167 | (if (not successful) | 167 | (if (not successful) |
| 168 | (message "Selection request failed to convert %s to %s" | 168 | (message "Selection request failed to convert %s to %s" |
| 169 | selection type) | 169 | selection type) |
| 170 | (message "Sent selection %s as %s" selection type))) | 170 | (message "Sent selection %s as %s" selection type))) |
| 171 | 171 | ||
| 172 | (defun x-notice-selection-failures (selection type successful) | 172 | (defun x-notice-selection-failures (selection type successful) |
| 173 | "for possible use as the value of x-sent-selection-hooks." | 173 | "for possible use as the value of `x-sent-selection-functions'." |
| 174 | (or successful | 174 | (or successful |
| 175 | (message "Selection request failed to convert %s to %s" | 175 | (message "Selection request failed to convert %s to %s" |
| 176 | selection type))) | 176 | selection type))) |
| 177 | 177 | ||
| 178 | ;(setq x-sent-selection-hooks 'x-notice-selection-requests) | 178 | ;(setq x-sent-selection-functions 'x-notice-selection-requests) |
| 179 | ;(setq x-sent-selection-hooks 'x-notice-selection-failures) | 179 | ;(setq x-sent-selection-functions 'x-notice-selection-failures) |
| 180 | 180 | ||
| 181 | 181 | ||
| 182 | ;; Random utility functions | 182 | ;; Random utility functions |
| @@ -232,5 +232,5 @@ the kill ring or the Clipboard." | |||
| 232 | 232 | ||
| 233 | (provide 'lselect) | 233 | (provide 'lselect) |
| 234 | 234 | ||
| 235 | ;;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 | 235 | ;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 |
| 236 | ;;; lselect.el ends here | 236 | ;;; lselect.el ends here |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index fb3c537936f..00411c8ca4c 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; cua-base.el --- emulate CUA key bindings | 1 | ;;; cua-base.el --- emulate CUA key bindings |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997,98,99,200,01,02,03,04 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Kim F. Storm <storm@cua.dk> | 6 | ;; Author: Kim F. Storm <storm@cua.dk> |
| 6 | ;; Keywords: keyboard emulation convenience cua | 7 | ;; Keywords: keyboard emulation convenience cua |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index ce30cec6604..d932916d8c9 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -799,7 +799,7 @@ external command." | |||
| 799 | (size 0.0)) | 799 | (size 0.0)) |
| 800 | (while entries | 800 | (while entries |
| 801 | (unless (string-match "\\`\\.\\.?\\'" (caar entries)) | 801 | (unless (string-match "\\`\\.\\.?\\'" (caar entries)) |
| 802 | (let* ((entry (concat path (char-to-string directory-sep-char) | 802 | (let* ((entry (concat path "/" |
| 803 | (caar entries))) | 803 | (caar entries))) |
| 804 | (symlink (and (stringp (cadr (car entries))) | 804 | (symlink (and (stringp (cadr (car entries))) |
| 805 | (cadr (car entries))))) | 805 | (cadr (car entries))))) |
diff --git a/lisp/files.el b/lisp/files.el index 7c06316a487..26f0ed608a2 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1645,41 +1645,35 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1645 | (mapc | 1645 | (mapc |
| 1646 | (lambda (elt) | 1646 | (lambda (elt) |
| 1647 | (cons (purecopy (car elt)) (cdr elt))) | 1647 | (cons (purecopy (car elt)) (cdr elt))) |
| 1648 | '(("\\.te?xt\\'" . text-mode) | 1648 | '(;; do this first, so that .html.pl is Polish html, not Perl |
| 1649 | ("\\.tex\\'" . tex-mode) | 1649 | ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode) |
| 1650 | ("\\.te?xt\\'" . text-mode) | ||
| 1651 | ("\\.[tT]e[xX]\\'" . tex-mode) | ||
| 1650 | ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. | 1652 | ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. |
| 1651 | ("\\.ltx\\'" . latex-mode) | 1653 | ("\\.ltx\\'" . latex-mode) |
| 1652 | ("\\.dtx\\'" . doctex-mode) | 1654 | ("\\.dtx\\'" . doctex-mode) |
| 1653 | ("\\.el\\'" . emacs-lisp-mode) | 1655 | ("\\.el\\'" . emacs-lisp-mode) |
| 1654 | ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) | 1656 | ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) |
| 1655 | ("\\.l\\'" . lisp-mode) | 1657 | ("\\.l\\'" . lisp-mode) |
| 1656 | ("\\.lisp\\'" . lisp-mode) | 1658 | ("\\.li?sp\\'" . lisp-mode) |
| 1657 | ("\\.f\\'" . fortran-mode) | 1659 | ("\\.[fF]\\'" . fortran-mode) |
| 1658 | ("\\.F\\'" . fortran-mode) | ||
| 1659 | ("\\.for\\'" . fortran-mode) | 1660 | ("\\.for\\'" . fortran-mode) |
| 1660 | ("\\.p\\'" . pascal-mode) | 1661 | ("\\.p\\'" . pascal-mode) |
| 1661 | ("\\.pas\\'" . pascal-mode) | 1662 | ("\\.pas\\'" . pascal-mode) |
| 1662 | ("\\.ad[abs]\\'" . ada-mode) | 1663 | ("\\.ad[abs]\\'" . ada-mode) |
| 1663 | ("\\.ad[bs].dg\\'" . ada-mode) | 1664 | ("\\.ad[bs].dg\\'" . ada-mode) |
| 1664 | ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode) | 1665 | ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) |
| 1665 | ("\\.s?html?\\'" . html-mode) | ||
| 1666 | ("\\.mk\\'" . makefile-mode) | 1666 | ("\\.mk\\'" . makefile-mode) |
| 1667 | ("\\(M\\|m\\|GNUm\\)akefile\\'" . makefile-mode) | 1667 | ("\\([Mm]\\|GNUm\\)akep*file\\'" . makefile-mode) |
| 1668 | ("\\.am\\'" . makefile-mode) ;For Automake. | 1668 | ("\\.am\\'" . makefile-mode) ;For Automake. |
| 1669 | ;; Less common extensions come here | 1669 | ;; Less common extensions come here |
| 1670 | ;; so more common ones above are found faster. | 1670 | ;; so more common ones above are found faster. |
| 1671 | ("\\.texinfo\\'" . texinfo-mode) | 1671 | ("\\.texinfo\\'" . texinfo-mode) |
| 1672 | ("\\.te?xi\\'" . texinfo-mode) | 1672 | ("\\.te?xi\\'" . texinfo-mode) |
| 1673 | ("\\.s\\'" . asm-mode) | 1673 | ("\\.[sS]\\'" . asm-mode) |
| 1674 | ("\\.S\\'" . asm-mode) | ||
| 1675 | ("\\.asm\\'" . asm-mode) | 1674 | ("\\.asm\\'" . asm-mode) |
| 1676 | ("ChangeLog\\'" . change-log-mode) | 1675 | ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) |
| 1677 | ("change\\.log\\'" . change-log-mode) | 1676 | ("[cC]hange[lL]og\\.[0-9]+\\'" . change-log-mode) |
| 1678 | ("changelo\\'" . change-log-mode) | ||
| 1679 | ("ChangeLog\\.[0-9]+\\'" . change-log-mode) | ||
| 1680 | ;; for MSDOS and MS-Windows (which are case-insensitive) | ||
| 1681 | ("changelog\\'" . change-log-mode) | ||
| 1682 | ("changelog\\.[0-9]+\\'" . change-log-mode) | ||
| 1683 | ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) | 1677 | ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) |
| 1684 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) | 1678 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) |
| 1685 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) | 1679 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) |
| @@ -1688,36 +1682,28 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1688 | ("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) | 1682 | ("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) |
| 1689 | ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) | 1683 | ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) |
| 1690 | ("\\.m?spec\\'" . sh-mode) | 1684 | ("\\.m?spec\\'" . sh-mode) |
| 1691 | ("\\.mm\\'" . nroff-mode) | 1685 | ("\\.m[mes]\\'" . nroff-mode) |
| 1692 | ("\\.me\\'" . nroff-mode) | ||
| 1693 | ("\\.ms\\'" . nroff-mode) | ||
| 1694 | ("\\.man\\'" . nroff-mode) | 1686 | ("\\.man\\'" . nroff-mode) |
| 1695 | ("\\.TeX\\'" . tex-mode) | ||
| 1696 | ("\\.sty\\'" . latex-mode) | 1687 | ("\\.sty\\'" . latex-mode) |
| 1697 | ("\\.cls\\'" . latex-mode) ;LaTeX 2e class | 1688 | ("\\.cl[so]\\'" . latex-mode) ;LaTeX 2e class option |
| 1698 | ("\\.clo\\'" . latex-mode) ;LaTeX 2e class option | ||
| 1699 | ("\\.bbl\\'" . latex-mode) | 1689 | ("\\.bbl\\'" . latex-mode) |
| 1700 | ("\\.bib\\'" . bibtex-mode) | 1690 | ("\\.bib\\'" . bibtex-mode) |
| 1701 | ("\\.sql\\'" . sql-mode) | 1691 | ("\\.sql\\'" . sql-mode) |
| 1702 | ("\\.m4\\'" . m4-mode) | 1692 | ("\\.m[4c]\\'" . m4-mode) |
| 1703 | ("\\.mc\\'" . m4-mode) | ||
| 1704 | ("\\.mf\\'" . metafont-mode) | 1693 | ("\\.mf\\'" . metafont-mode) |
| 1705 | ("\\.mp\\'" . metapost-mode) | 1694 | ("\\.mp\\'" . metapost-mode) |
| 1706 | ("\\.vhdl?\\'" . vhdl-mode) | 1695 | ("\\.vhdl?\\'" . vhdl-mode) |
| 1707 | ("\\.article\\'" . text-mode) | 1696 | ("\\.article\\'" . text-mode) |
| 1708 | ("\\.letter\\'" . text-mode) | 1697 | ("\\.letter\\'" . text-mode) |
| 1709 | ("\\.tcl\\'" . tcl-mode) | 1698 | ("\\.i?tcl\\'" . tcl-mode) |
| 1710 | ("\\.exp\\'" . tcl-mode) | 1699 | ("\\.exp\\'" . tcl-mode) |
| 1711 | ("\\.itcl\\'" . tcl-mode) | ||
| 1712 | ("\\.itk\\'" . tcl-mode) | 1700 | ("\\.itk\\'" . tcl-mode) |
| 1713 | ("\\.icn\\'" . icon-mode) | 1701 | ("\\.icn\\'" . icon-mode) |
| 1714 | ("\\.sim\\'" . simula-mode) | 1702 | ("\\.sim\\'" . simula-mode) |
| 1715 | ("\\.mss\\'" . scribe-mode) | 1703 | ("\\.mss\\'" . scribe-mode) |
| 1716 | ("\\.f90\\'" . f90-mode) | 1704 | ("\\.f9[05]\\'" . f90-mode) |
| 1717 | ("\\.f95\\'" . f90-mode) | ||
| 1718 | ("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode | 1705 | ("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode |
| 1719 | ("\\.pro\\'" . idlwave-mode) | 1706 | ("\\.pro\\'" . idlwave-mode) |
| 1720 | ("\\.lsp\\'" . lisp-mode) | ||
| 1721 | ("\\.prolog\\'" . prolog-mode) | 1707 | ("\\.prolog\\'" . prolog-mode) |
| 1722 | ("\\.tar\\'" . tar-mode) | 1708 | ("\\.tar\\'" . tar-mode) |
| 1723 | ("\\.\\(arc\\|zip\\|lzh\\|zoo\\|ear\\|jar\\|war\\)\\'" . archive-mode) | 1709 | ("\\.\\(arc\\|zip\\|lzh\\|zoo\\|ear\\|jar\\|war\\)\\'" . archive-mode) |
| @@ -1733,10 +1719,11 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1733 | ("\\`/tmp/fol/" . text-mode) | 1719 | ("\\`/tmp/fol/" . text-mode) |
| 1734 | ("\\.oak\\'" . scheme-mode) | 1720 | ("\\.oak\\'" . scheme-mode) |
| 1735 | ("\\.sgml?\\'" . sgml-mode) | 1721 | ("\\.sgml?\\'" . sgml-mode) |
| 1736 | ("\\.xml\\'" . sgml-mode) | 1722 | ("\\.x[ms]l\\'" . xml-mode) |
| 1737 | ("\\.xsl\\'" . sgml-mode) | ||
| 1738 | ("\\.dtd\\'" . sgml-mode) | 1723 | ("\\.dtd\\'" . sgml-mode) |
| 1739 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) | 1724 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) |
| 1725 | ("\\.js\\'" . java-mode) ; javascript-mode would be better | ||
| 1726 | ("\\.x[bp]m\\'" . c-mode) | ||
| 1740 | ;; .emacs or .gnus or .viper following a directory delimiter in | 1727 | ;; .emacs or .gnus or .viper following a directory delimiter in |
| 1741 | ;; Unix, MSDOG or VMS syntax. | 1728 | ;; Unix, MSDOG or VMS syntax. |
| 1742 | ("[]>:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode) | 1729 | ("[]>:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode) |
| @@ -1760,7 +1747,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1760 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. | 1747 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. |
| 1761 | ;; Using mode nil rather than `ignore' would let the search continue | 1748 | ;; Using mode nil rather than `ignore' would let the search continue |
| 1762 | ;; through this list (with the shortened name) rather than start over. | 1749 | ;; through this list (with the shortened name) rather than start over. |
| 1763 | ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" ignore t) | 1750 | ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) |
| 1764 | ;; The following should come after the ChangeLog pattern | 1751 | ;; The following should come after the ChangeLog pattern |
| 1765 | ;; for the sake of ChangeLog.1, etc. | 1752 | ;; for the sake of ChangeLog.1, etc. |
| 1766 | ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. | 1753 | ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. |
| @@ -1849,12 +1836,20 @@ be interpreted by the interpreter matched by the second group of the | |||
| 1849 | regular expression. The mode is then determined as the mode associated | 1836 | regular expression. The mode is then determined as the mode associated |
| 1850 | with that interpreter in `interpreter-mode-alist'.") | 1837 | with that interpreter in `interpreter-mode-alist'.") |
| 1851 | 1838 | ||
| 1852 | (defun set-auto-mode (&optional just-from-file-name) | 1839 | (defvar xml-based-modes '(html-mode) |
| 1840 | "Modes that override an XML declaration. | ||
| 1841 | When `set-auto-mode' sees an <?xml or <!DOCTYPE declaration, that | ||
| 1842 | buffer will be in some XML mode. If `auto-mode-alist' associates | ||
| 1843 | the file with one of the modes in this list, that mode will be | ||
| 1844 | used. Else `xml-mode' or `sgml-mode' is used.") | ||
| 1845 | |||
| 1846 | (defun set-auto-mode (&optional keep-mode-if-same) | ||
| 1853 | "Select major mode appropriate for current buffer. | 1847 | "Select major mode appropriate for current buffer. |
| 1854 | This checks for a -*- mode tag in the buffer's text, | 1848 | This checks for a -*- mode tag in the buffer's text, checks the |
| 1855 | compares the filename against the entries in `auto-mode-alist', | 1849 | interpreter that runs this file against `interpreter-mode-alist', |
| 1856 | or checks the interpreter that runs this file against | 1850 | looks for an <?xml or <!DOCTYPE declaration (see |
| 1857 | `interpreter-mode-alist'. | 1851 | `xml-based-modes'), or compares the filename against the entries |
| 1852 | in `auto-mode-alist'. | ||
| 1858 | 1853 | ||
| 1859 | It does not check for the `mode:' local variable in the | 1854 | It does not check for the `mode:' local variable in the |
| 1860 | Local Variables section of the file; for that, use `hack-local-variables'. | 1855 | Local Variables section of the file; for that, use `hack-local-variables'. |
| @@ -1862,14 +1857,16 @@ Local Variables section of the file; for that, use `hack-local-variables'. | |||
| 1862 | If `enable-local-variables' is nil, this function does not check for a | 1857 | If `enable-local-variables' is nil, this function does not check for a |
| 1863 | -*- mode tag. | 1858 | -*- mode tag. |
| 1864 | 1859 | ||
| 1865 | If the optional argument JUST-FROM-FILE-NAME is non-nil, | 1860 | If the optional argument KEEP-MODE-IF-SAME is non-nil, then we |
| 1866 | then we do not set anything but the major mode, | 1861 | only set the major mode, if that would change it." |
| 1867 | and we don't even do that unless it would come from the file name." | ||
| 1868 | ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- | 1862 | ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- |
| 1869 | (let (end done modes) | 1863 | (let (end done mode modes xml) |
| 1864 | ;; Find a -*- mode tag | ||
| 1870 | (save-excursion | 1865 | (save-excursion |
| 1871 | (goto-char (point-min)) | 1866 | (goto-char (point-min)) |
| 1872 | (skip-chars-forward " \t\n") | 1867 | (skip-chars-forward " \t\n") |
| 1868 | ;; While we're at this point, check xml for later. | ||
| 1869 | (setq xml (looking-at "<\\?xml \\|<!DOCTYPE")) | ||
| 1873 | (and enable-local-variables | 1870 | (and enable-local-variables |
| 1874 | (setq end (set-auto-mode-1)) | 1871 | (setq end (set-auto-mode-1)) |
| 1875 | (if (save-excursion (search-forward ":" end t)) | 1872 | (if (save-excursion (search-forward ":" end t)) |
| @@ -1891,62 +1888,71 @@ and we don't even do that unless it would come from the file name." | |||
| 1891 | (push (intern (concat (downcase (buffer-substring (point) end)) | 1888 | (push (intern (concat (downcase (buffer-substring (point) end)) |
| 1892 | "-mode")) | 1889 | "-mode")) |
| 1893 | modes)))) | 1890 | modes)))) |
| 1894 | ;; If we found modes to use, invoke them now, | 1891 | ;; If we found modes to use, invoke them now, outside the save-excursion. |
| 1895 | ;; outside the save-excursion. | 1892 | (if modes |
| 1896 | (unless just-from-file-name | 1893 | (catch 'nop |
| 1897 | (dolist (mode (nreverse modes)) | 1894 | (dolist (mode (nreverse modes)) |
| 1898 | (if (not (functionp mode)) | 1895 | (if (not (functionp mode)) |
| 1899 | (message "Ignoring unknown mode `%s'" mode) | 1896 | (message "Ignoring unknown mode `%s'" mode) |
| 1900 | (setq done t) | 1897 | (setq done t) |
| 1901 | (funcall mode)))) | 1898 | (or (set-auto-mode-0 mode) |
| 1902 | ;; If we didn't find a mode from a -*- line, try using the file name. | 1899 | (throw 'nop nil))))) |
| 1900 | ;; If we didn't, look for an interpreter specified in the first line. | ||
| 1901 | ;; As a special case, allow for things like "#!/bin/env perl", which | ||
| 1902 | ;; finds the interpreter anywhere in $PATH. | ||
| 1903 | (setq mode (save-excursion | ||
| 1904 | (goto-char (point-min)) | ||
| 1905 | (if (looking-at auto-mode-interpreter-regexp) | ||
| 1906 | (match-string 2) | ||
| 1907 | "")) | ||
| 1908 | ;; Map interpreter name to a mode, signalling we're done at the | ||
| 1909 | ;; same time. | ||
| 1910 | done (assoc (file-name-nondirectory mode) | ||
| 1911 | interpreter-mode-alist)) | ||
| 1912 | ;; If we found an interpreter mode to use, invoke it now. | ||
| 1913 | (if done (set-auto-mode-0 (cdr done)))) | ||
| 1903 | (if (and (not done) buffer-file-name) | 1914 | (if (and (not done) buffer-file-name) |
| 1904 | (let ((name buffer-file-name) | 1915 | (let ((name buffer-file-name)) |
| 1905 | (keep-going t)) | ||
| 1906 | ;; Remove backup-suffixes from file name. | 1916 | ;; Remove backup-suffixes from file name. |
| 1907 | (setq name (file-name-sans-versions name)) | 1917 | (setq name (file-name-sans-versions name)) |
| 1908 | (while keep-going | 1918 | (while name |
| 1909 | (setq keep-going nil) | 1919 | ;; Find first matching alist entry. |
| 1910 | (let ((alist auto-mode-alist) | 1920 | (let ((case-fold-search |
| 1911 | (mode nil)) | 1921 | (memq system-type '(vax-vms windows-nt cygwin)))) |
| 1912 | ;; Find first matching alist entry. | 1922 | (if (and (setq mode (assoc-default name auto-mode-alist |
| 1913 | (let ((case-fold-search | 1923 | 'string-match)) |
| 1914 | (memq system-type '(vax-vms windows-nt cygwin)))) | 1924 | (consp mode) |
| 1915 | (while (and (not mode) alist) | 1925 | (cadr mode)) |
| 1916 | (if (string-match (car (car alist)) name) | 1926 | (setq mode (car mode) |
| 1917 | (if (and (consp (cdr (car alist))) | 1927 | name (substring name 0 (match-beginning 0))) |
| 1918 | (nth 2 (car alist))) | 1928 | (setq name))) |
| 1919 | (setq mode (car (cdr (car alist))) | 1929 | (when mode |
| 1920 | name (substring name 0 (match-beginning 0)) | 1930 | (if xml (or (memq mode xml-based-modes) |
| 1921 | keep-going t) | 1931 | (setq mode 'xml-mode))) |
| 1922 | (setq mode (cdr (car alist)) | 1932 | (set-auto-mode-0 mode) |
| 1923 | keep-going nil))) | 1933 | (setq done t))))) |
| 1924 | (setq alist (cdr alist)))) | 1934 | (and xml |
| 1925 | (if mode | 1935 | (not done) |
| 1926 | ;; When JUST-FROM-FILE-NAME is set, | 1936 | (set-auto-mode-0 'xml-mode)))) |
| 1927 | ;; we are working on behalf of set-visited-file-name. | 1937 | |
| 1928 | ;; In that case, if the major mode specified is the | 1938 | |
| 1929 | ;; same one we already have, don't actually reset it. | 1939 | ;; When `keep-mode-if-same' is set, we are working on behalf of |
| 1930 | ;; We don't want to lose minor modes such as Font Lock. | 1940 | ;; set-visited-file-name. In that case, if the major mode specified is the |
| 1931 | (unless (and just-from-file-name (eq mode major-mode)) | 1941 | ;; same one we already have, don't actually reset it. We don't want to lose |
| 1932 | (funcall mode)) | 1942 | ;; minor modes such as Font Lock. |
| 1933 | ;; If we can't deduce a mode from the file name, | 1943 | (defun set-auto-mode-0 (mode) |
| 1934 | ;; look for an interpreter specified in the first line. | 1944 | "Apply MODE and return it. |
| 1935 | ;; As a special case, allow for things like "#!/bin/env perl", | 1945 | If `keep-mode-if-same' is non-nil MODE is chased of any aliases and |
| 1936 | ;; which finds the interpreter anywhere in $PATH. | 1946 | compared to current major mode. If they are the same, do nothing |
| 1937 | (let ((interpreter | 1947 | and return nil." |
| 1938 | (save-excursion | 1948 | (when keep-mode-if-same |
| 1939 | (goto-char (point-min)) | 1949 | (while (symbolp (symbol-function mode)) |
| 1940 | (if (looking-at auto-mode-interpreter-regexp) | 1950 | (setq mode (symbol-function mode))) |
| 1941 | (match-string 2) | 1951 | (if (eq mode major-mode) |
| 1942 | ""))) | 1952 | (setq mode))) |
| 1943 | elt) | 1953 | (when mode |
| 1944 | ;; Map interpreter name to a mode. | 1954 | (funcall mode) |
| 1945 | (setq elt (assoc (file-name-nondirectory interpreter) | 1955 | mode)) |
| 1946 | interpreter-mode-alist)) | ||
| 1947 | (unless just-from-file-name | ||
| 1948 | (if elt | ||
| 1949 | (funcall (cdr elt)))))))))))) | ||
| 1950 | 1956 | ||
| 1951 | 1957 | ||
| 1952 | (defun set-auto-mode-1 () | 1958 | (defun set-auto-mode-1 () |
| @@ -2157,7 +2163,7 @@ is specified, returning t if it is specified." | |||
| 2157 | (error "Local variables entry is missing the suffix"))) | 2163 | (error "Local variables entry is missing the suffix"))) |
| 2158 | (forward-line 1)) | 2164 | (forward-line 1)) |
| 2159 | (goto-char (point-min)) | 2165 | (goto-char (point-min)) |
| 2160 | 2166 | ||
| 2161 | (while (not (eobp)) | 2167 | (while (not (eobp)) |
| 2162 | ;; Find the variable name; strip whitespace. | 2168 | ;; Find the variable name; strip whitespace. |
| 2163 | (skip-chars-forward " \t") | 2169 | (skip-chars-forward " \t") |
diff --git a/lisp/find-file.el b/lisp/find-file.el index 4805d08400b..d85d2ab0f51 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | ;; format above can be changed to include a function to be called when the | 57 | ;; format above can be changed to include a function to be called when the |
| 58 | ;; current file matches the regexp: | 58 | ;; current file matches the regexp: |
| 59 | ;; | 59 | ;; |
| 60 | ;; '(("\\.cc$" cc-function) | 60 | ;; '(("\\.cc$" cc--function) |
| 61 | ;; ("\\.hh$" hh-function)) | 61 | ;; ("\\.hh$" hh-function)) |
| 62 | ;; | 62 | ;; |
| 63 | ;; These functions must return a list consisting of the possible names of the | 63 | ;; These functions must return a list consisting of the possible names of the |
| @@ -239,22 +239,26 @@ the preceding slash. The star represents all the subdirectories except | |||
| 239 | :group 'ff) | 239 | :group 'ff) |
| 240 | 240 | ||
| 241 | (defcustom cc-other-file-alist | 241 | (defcustom cc-other-file-alist |
| 242 | '( | 242 | '(("\\.cc\\'" (".hh" ".h")) |
| 243 | ("\\.cc$" (".hh" ".h")) | 243 | ("\\.hh\\'" (".cc" ".C")) |
| 244 | ("\\.hh$" (".cc" ".C")) | ||
| 245 | 244 | ||
| 246 | ("\\.c$" (".h")) | 245 | ("\\.c\\'" (".h")) |
| 247 | ("\\.h$" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp")) | 246 | ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp")) |
| 248 | 247 | ||
| 249 | ("\\.C$" (".H" ".hh" ".h")) | 248 | ("\\.C\\'" (".H" ".hh" ".h")) |
| 250 | ("\\.H$" (".C" ".CC")) | 249 | ("\\.H\\'" (".C" ".CC")) |
| 251 | 250 | ||
| 252 | ("\\.CC$" (".HH" ".H" ".hh" ".h")) | 251 | ("\\.CC\\'" (".HH" ".H" ".hh" ".h")) |
| 253 | ("\\.HH$" (".CC")) | 252 | ("\\.HH\\'" (".CC")) |
| 254 | 253 | ||
| 255 | ("\\.cxx$" (".hh" ".h")) | 254 | ("\\.c\\+\\+\\'" (".h++" ".hh" ".h")) |
| 256 | ("\\.cpp$" (".hh" ".h")) | 255 | ("\\.h\\+\\+\\'" (".c++")) |
| 257 | ) | 256 | |
| 257 | ("\\.cpp\\'" (".hpp" ".hh" ".h")) | ||
| 258 | ("\\.hpp\\'" (".cpp")) | ||
| 259 | |||
| 260 | ("\\.cxx\\'" (".hxx" ".hh" ".h")) | ||
| 261 | ("\\.hxx\\'" (".cxx"))) | ||
| 258 | "*Alist of extensions to find given the current file's extension. | 262 | "*Alist of extensions to find given the current file's extension. |
| 259 | 263 | ||
| 260 | This list should contain the most used extensions before the others, | 264 | This list should contain the most used extensions before the others, |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2a4b0a80398..2c658a4c562 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,39 @@ | |||
| 1 | 2004-10-29 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * mm-util.el (mm-coding-system-priorities): Prefer iso-8859-1 than | ||
| 4 | iso-2022-jp even in the Japanese language environment. Suggested | ||
| 5 | by Jason Rumney <jasonr@gnu.org>. | ||
| 6 | |||
| 7 | 2004-10-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 8 | |||
| 9 | * gnus-sum.el (gnus-update-summary-mark-positions): Allow users to | ||
| 10 | use the same characters as the dummy marks; make it free from | ||
| 11 | getting affected by the language environment. | ||
| 12 | (gnus-summary-read-group-1): Update mark positions only when the | ||
| 13 | format spec is updated. | ||
| 14 | |||
| 15 | * gnus-spec.el (gnus-update-format-specifications): Return a list | ||
| 16 | of updated types. | ||
| 17 | |||
| 18 | 2004-10-26 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 19 | |||
| 20 | * nnspool.el (nnspool-spool-directory): Use news-path if the | ||
| 21 | news-directory variable is not bound. | ||
| 22 | |||
| 23 | * gnus-group.el (gnus-group-line-format-alist): Convert the value | ||
| 24 | of gnus-tmp-news-method into string if it may be passed to | ||
| 25 | gnus-correct-length which takes only a string argument. | ||
| 26 | |||
| 27 | 2004-10-25 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 28 | |||
| 29 | * html2text.el (html2text-buffer-head): Removed. Use `goto-char' | ||
| 30 | instead. | ||
| 31 | |||
| 32 | 2004-10-24 Kevin Greiner <kevin.greiner@compsol.cc> | ||
| 33 | |||
| 34 | * gnus-start.el (gnus-convert-old-newsrc): Fixed numeric | ||
| 35 | comparison on string. | ||
| 36 | |||
| 1 | 2004-10-21 Katsumi Yamaoka <yamaoka@jpl.org> | 37 | 2004-10-21 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 38 | ||
| 3 | * mm-view.el (mm-display-inline-fontify): Inhibit font-lock when | 39 | * mm-view.el (mm-display-inline-fontify): Inhibit font-lock when |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index f3b2f91cd5e..c55264b22de 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -491,7 +491,10 @@ simple manner.") | |||
| 491 | (?O gnus-tmp-moderated-string ?s) | 491 | (?O gnus-tmp-moderated-string ?s) |
| 492 | (?p gnus-tmp-process-marked ?c) | 492 | (?p gnus-tmp-process-marked ?c) |
| 493 | (?s gnus-tmp-news-server ?s) | 493 | (?s gnus-tmp-news-server ?s) |
| 494 | (?n gnus-tmp-news-method ?s) | 494 | (?n ,(if (featurep 'xemacs) |
| 495 | '(symbol-name gnus-tmp-news-method) | ||
| 496 | 'gnus-tmp-news-method) | ||
| 497 | ?s) | ||
| 495 | (?P gnus-group-indentation ?s) | 498 | (?P gnus-group-indentation ?s) |
| 496 | (?E gnus-tmp-group-icon ?s) | 499 | (?E gnus-tmp-group-icon ?s) |
| 497 | (?B gnus-tmp-summary-live ?c) | 500 | (?B gnus-tmp-summary-live ?c) |
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 690fc7e026a..dc93fef5176 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el | |||
| @@ -183,7 +183,8 @@ text properties. This is only needed on XEmacs, as FSF Emacs does this anyway." | |||
| 183 | (insert (gnus-pp-to-string spec)))) | 183 | (insert (gnus-pp-to-string spec)))) |
| 184 | 184 | ||
| 185 | (defun gnus-update-format-specifications (&optional force &rest types) | 185 | (defun gnus-update-format-specifications (&optional force &rest types) |
| 186 | "Update all (necessary) format specifications." | 186 | "Update all (necessary) format specifications. |
| 187 | Return a list of updated types." | ||
| 187 | ;; Make the indentation array. | 188 | ;; Make the indentation array. |
| 188 | ;; See whether all the stored info needs to be flushed. | 189 | ;; See whether all the stored info needs to be flushed. |
| 189 | (when (or force | 190 | (when (or force |
| @@ -195,13 +196,12 @@ text properties. This is only needed on XEmacs, as FSF Emacs does this anyway." | |||
| 195 | (setq gnus-format-specs nil)) | 196 | (setq gnus-format-specs nil)) |
| 196 | 197 | ||
| 197 | ;; Go through all the formats and see whether they need updating. | 198 | ;; Go through all the formats and see whether they need updating. |
| 198 | (let (new-format entry type val) | 199 | (let (new-format entry type val updated) |
| 199 | (while (setq type (pop types)) | 200 | (while (setq type (pop types)) |
| 200 | ;; Jump to the proper buffer to find out the value of the | 201 | ;; Jump to the proper buffer to find out the value of the |
| 201 | ;; variable, if possible. (It may be buffer-local.) | 202 | ;; variable, if possible. (It may be buffer-local.) |
| 202 | (save-excursion | 203 | (save-excursion |
| 203 | (let ((buffer (intern (format "gnus-%s-buffer" type))) | 204 | (let ((buffer (intern (format "gnus-%s-buffer" type)))) |
| 204 | val) | ||
| 205 | (when (and (boundp buffer) | 205 | (when (and (boundp buffer) |
| 206 | (setq val (symbol-value buffer)) | 206 | (setq val (symbol-value buffer)) |
| 207 | (gnus-buffer-exists-p val)) | 207 | (gnus-buffer-exists-p val)) |
| @@ -231,10 +231,12 @@ text properties. This is only needed on XEmacs, as FSF Emacs does this anyway." | |||
| 231 | (setcar (cdr entry) val) | 231 | (setcar (cdr entry) val) |
| 232 | (setcar entry new-format)) | 232 | (setcar entry new-format)) |
| 233 | (push (list type new-format val) gnus-format-specs)) | 233 | (push (list type new-format val) gnus-format-specs)) |
| 234 | (set (intern (format "gnus-%s-line-format-spec" type)) val))))) | 234 | (set (intern (format "gnus-%s-line-format-spec" type)) val) |
| 235 | (push type updated)))) | ||
| 235 | 236 | ||
| 236 | (unless (assq 'version gnus-format-specs) | 237 | (unless (assq 'version gnus-format-specs) |
| 237 | (push (cons 'version emacs-version) gnus-format-specs))) | 238 | (push (cons 'version emacs-version) gnus-format-specs)) |
| 239 | updated)) | ||
| 238 | 240 | ||
| 239 | (defvar gnus-mouse-face-0 'highlight) | 241 | (defvar gnus-mouse-face-0 'highlight) |
| 240 | (defvar gnus-mouse-face-1 'highlight) | 242 | (defvar gnus-mouse-face-1 'highlight) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index c6445b460ff..971124ba831 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -2225,7 +2225,8 @@ If FORCE is non-nil, the .newsrc file is read." | |||
| 2225 | (defun gnus-convert-old-newsrc () | 2225 | (defun gnus-convert-old-newsrc () |
| 2226 | "Convert old newsrc formats into the current format, if needed." | 2226 | "Convert old newsrc formats into the current format, if needed." |
| 2227 | (let ((fcv (and gnus-newsrc-file-version | 2227 | (let ((fcv (and gnus-newsrc-file-version |
| 2228 | (gnus-continuum-version gnus-newsrc-file-version)))) | 2228 | (gnus-continuum-version gnus-newsrc-file-version))) |
| 2229 | (gcv (gnus-continuum-version))) | ||
| 2229 | (when fcv | 2230 | (when fcv |
| 2230 | ;; A newsrc file was loaded. | 2231 | ;; A newsrc file was loaded. |
| 2231 | (let (prompt-displayed | 2232 | (let (prompt-displayed |
| @@ -2259,7 +2260,7 @@ If FORCE is non-nil, the .newsrc file is read." | |||
| 2259 | ;; Perform converters to bring older version up to date. | 2260 | ;; Perform converters to bring older version up to date. |
| 2260 | (when (and converters (< fcv (caar converters))) | 2261 | (when (and converters (< fcv (caar converters))) |
| 2261 | (while (and converters (< fcv (caar converters)) | 2262 | (while (and converters (< fcv (caar converters)) |
| 2262 | (<= (caar converters) gnus-version)) | 2263 | (<= (caar converters) gcv)) |
| 2263 | (let* ((converter-spec (pop converters)) | 2264 | (let* ((converter-spec (pop converters)) |
| 2264 | (convert-to (nth 1 converter-spec)) | 2265 | (convert-to (nth 1 converter-spec)) |
| 2265 | (load-from (nth 2 converter-spec)) | 2266 | (load-from (nth 2 converter-spec)) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 14ad9c99a3b..6ce2f55e2b7 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -3225,43 +3225,54 @@ buffer that was in action when the last article was fetched." | |||
| 3225 | (save-excursion | 3225 | (save-excursion |
| 3226 | (when (gnus-buffer-exists-p gnus-summary-buffer) | 3226 | (when (gnus-buffer-exists-p gnus-summary-buffer) |
| 3227 | (set-buffer gnus-summary-buffer)) | 3227 | (set-buffer gnus-summary-buffer)) |
| 3228 | (let ((gnus-replied-mark 129) | 3228 | (let ((spec gnus-summary-line-format-spec) |
| 3229 | (gnus-score-below-mark 130) | 3229 | pos) |
| 3230 | (gnus-score-over-mark 130) | ||
| 3231 | (gnus-undownloaded-mark 131) | ||
| 3232 | (spec gnus-summary-line-format-spec) | ||
| 3233 | gnus-visual pos) | ||
| 3234 | (save-excursion | 3230 | (save-excursion |
| 3235 | (gnus-set-work-buffer) | 3231 | (gnus-set-work-buffer) |
| 3236 | (let ((gnus-summary-line-format-spec spec) | 3232 | (let ((gnus-tmp-unread ?Z) |
| 3233 | (gnus-replied-mark ?Z) | ||
| 3234 | (gnus-score-below-mark ?Z) | ||
| 3235 | (gnus-score-over-mark ?Z) | ||
| 3236 | (gnus-undownloaded-mark ?Z) | ||
| 3237 | (gnus-summary-line-format-spec spec) | ||
| 3237 | (gnus-newsgroup-downloadable '(0)) | 3238 | (gnus-newsgroup-downloadable '(0)) |
| 3238 | marks) | 3239 | (header [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil]) |
| 3239 | (insert ?\200 "\200" ?\201 "\201" ?\202 "\202" ?\203 "\203") | 3240 | case-fold-search ignores) |
| 3240 | (while (not (bobp)) | 3241 | ;; Here, all marks are bound to Z. |
| 3241 | (push (buffer-substring (1- (point)) (point)) marks) | 3242 | (gnus-summary-insert-line header |
| 3242 | (backward-char)) | 3243 | 0 nil t gnus-tmp-unread t nil "" nil 1) |
| 3244 | (goto-char (point-min)) | ||
| 3245 | ;; Memorize the positions of the same characters as dummy marks. | ||
| 3246 | (while (re-search-forward "[A-D]" nil t) | ||
| 3247 | (push (point) ignores)) | ||
| 3243 | (erase-buffer) | 3248 | (erase-buffer) |
| 3244 | (gnus-summary-insert-line | 3249 | ;; We use A-D as dummy marks in order to know column positions |
| 3245 | [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil] | 3250 | ;; where marks should be inserted. |
| 3246 | 0 nil t 128 t nil "" nil 1) | 3251 | (setq gnus-tmp-unread ?A |
| 3252 | gnus-replied-mark ?B | ||
| 3253 | gnus-score-below-mark ?C | ||
| 3254 | gnus-score-over-mark ?C | ||
| 3255 | gnus-undownloaded-mark ?D) | ||
| 3256 | (gnus-summary-insert-line header | ||
| 3257 | 0 nil t gnus-tmp-unread t nil "" nil 1) | ||
| 3258 | ;; Ignore characters which aren't dummy marks. | ||
| 3259 | (dolist (p ignores) | ||
| 3260 | (delete-region (goto-char (1- p)) p) | ||
| 3261 | (insert ?Z)) | ||
| 3247 | (goto-char (point-min)) | 3262 | (goto-char (point-min)) |
| 3248 | (setq pos (list (cons 'unread | 3263 | (setq pos (list (cons 'unread |
| 3249 | (and (or (search-forward (nth 0 marks) nil t) | 3264 | (and (search-forward "A" nil t) |
| 3250 | (search-forward (nth 1 marks) nil t)) | ||
| 3251 | (- (point) (point-min) 1))))) | 3265 | (- (point) (point-min) 1))))) |
| 3252 | (goto-char (point-min)) | 3266 | (goto-char (point-min)) |
| 3253 | (push (cons 'replied (and (or (search-forward (nth 2 marks) nil t) | 3267 | (push (cons 'replied (and (search-forward "B" nil t) |
| 3254 | (search-forward (nth 3 marks) nil t)) | ||
| 3255 | (- (point) (point-min) 1))) | 3268 | (- (point) (point-min) 1))) |
| 3256 | pos) | 3269 | pos) |
| 3257 | (goto-char (point-min)) | 3270 | (goto-char (point-min)) |
| 3258 | (push (cons 'score (and (or (search-forward (nth 4 marks) nil t) | 3271 | (push (cons 'score (and (search-forward "C" nil t) |
| 3259 | (search-forward (nth 5 marks) nil t)) | ||
| 3260 | (- (point) (point-min) 1))) | 3272 | (- (point) (point-min) 1))) |
| 3261 | pos) | 3273 | pos) |
| 3262 | (goto-char (point-min)) | 3274 | (goto-char (point-min)) |
| 3263 | (push (cons 'download (and (or (search-forward (nth 6 marks) nil t) | 3275 | (push (cons 'download (and (search-forward "D" nil t) |
| 3264 | (search-forward (nth 7 marks) nil t)) | ||
| 3265 | (- (point) (point-min) 1))) | 3276 | (- (point) (point-min) 1))) |
| 3266 | pos))) | 3277 | pos))) |
| 3267 | (setq gnus-summary-mark-positions pos)))) | 3278 | (setq gnus-summary-mark-positions pos)))) |
| @@ -3559,9 +3570,11 @@ If NO-DISPLAY, don't generate a summary buffer." | |||
| 3559 | (gnus-active gnus-newsgroup-name))) | 3570 | (gnus-active gnus-newsgroup-name))) |
| 3560 | ;; You can change the summary buffer in some way with this hook. | 3571 | ;; You can change the summary buffer in some way with this hook. |
| 3561 | (gnus-run-hooks 'gnus-select-group-hook) | 3572 | (gnus-run-hooks 'gnus-select-group-hook) |
| 3562 | (gnus-update-format-specifications | 3573 | (when (memq 'summary (gnus-update-format-specifications |
| 3563 | nil 'summary 'summary-mode 'summary-dummy) | 3574 | nil 'summary 'summary-mode 'summary-dummy)) |
| 3564 | (gnus-update-summary-mark-positions) | 3575 | ;; The format specification for the summary line was updated, |
| 3576 | ;; so we need to update the mark positions as well. | ||
| 3577 | (gnus-update-summary-mark-positions)) | ||
| 3565 | ;; Do score processing. | 3578 | ;; Do score processing. |
| 3566 | (when gnus-use-scoring | 3579 | (when gnus-use-scoring |
| 3567 | (gnus-possibly-score-headers)) | 3580 | (gnus-possibly-score-headers)) |
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index 6f1ef3b0289..31d1869c695 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el | |||
| @@ -116,12 +116,6 @@ formatting, and then moved afterward.") | |||
| 116 | ;; <Utility functions> | 116 | ;; <Utility functions> |
| 117 | ;; | 117 | ;; |
| 118 | 118 | ||
| 119 | (defun html2text-buffer-head () | ||
| 120 | (if (string= mode-name "Article") | ||
| 121 | (beginning-of-buffer) | ||
| 122 | (beginning-of-buffer) | ||
| 123 | ) | ||
| 124 | ) | ||
| 125 | 119 | ||
| 126 | (defun html2text-replace-string (from-string to-string p1 p2) | 120 | (defun html2text-replace-string (from-string to-string p1 p2) |
| 127 | (goto-char p1) | 121 | (goto-char p1) |
| @@ -432,11 +426,11 @@ formatting, and then moved afterward.") | |||
| 432 | "This _tries_ to fix up the paragraphs - this is done in quite a ad-hook | 426 | "This _tries_ to fix up the paragraphs - this is done in quite a ad-hook |
| 433 | fashion, quite close to pure guess-work. It does work in some cases though." | 427 | fashion, quite close to pure guess-work. It does work in some cases though." |
| 434 | (interactive) | 428 | (interactive) |
| 435 | (html2text-buffer-head) | 429 | (goto-char (point-min)) |
| 436 | (replace-regexp "^<br>$" "") | 430 | (replace-regexp "^<br>$" "") |
| 437 | ;; Removing lonely <br> on a single line, if they are left intact we | 431 | ;; Removing lonely <br> on a single line, if they are left intact we |
| 438 | ;; dont have any paragraphs at all. | 432 | ;; dont have any paragraphs at all. |
| 439 | (html2text-buffer-head) | 433 | (goto-char (point-min)) |
| 440 | (while (not (eobp)) | 434 | (while (not (eobp)) |
| 441 | (let ((p1 (point))) | 435 | (let ((p1 (point))) |
| 442 | (forward-paragraph 1) | 436 | (forward-paragraph 1) |
| @@ -462,7 +456,7 @@ fashion, quite close to pure guess-work. It does work in some cases though." | |||
| 462 | See the documentation for that variable." | 456 | See the documentation for that variable." |
| 463 | (interactive) | 457 | (interactive) |
| 464 | (dolist (tag tag-list) | 458 | (dolist (tag tag-list) |
| 465 | (html2text-buffer-head) | 459 | (goto-char (point-min)) |
| 466 | (while (re-search-forward (format "\\(</?%s[^>]*>\\)" tag) (point-max) t) | 460 | (while (re-search-forward (format "\\(</?%s[^>]*>\\)" tag) (point-max) t) |
| 467 | (delete-region (match-beginning 0) (match-end 0))))) | 461 | (delete-region (match-beginning 0) (match-end 0))))) |
| 468 | 462 | ||
| @@ -472,7 +466,7 @@ See the documentation for that variable." | |||
| 472 | (dolist (tag-and-function html2text-format-tag-list) | 466 | (dolist (tag-and-function html2text-format-tag-list) |
| 473 | (let ((tag (car tag-and-function)) | 467 | (let ((tag (car tag-and-function)) |
| 474 | (function (cdr tag-and-function))) | 468 | (function (cdr tag-and-function))) |
| 475 | (html2text-buffer-head) | 469 | (goto-char (point-min)) |
| 476 | (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) | 470 | (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) |
| 477 | (point-max) t) | 471 | (point-max) t) |
| 478 | (let ((p1) | 472 | (let ((p1) |
| @@ -497,7 +491,7 @@ See the documentation for that variable." | |||
| 497 | "See the variable \"html2text-replace-list\" for documentation" | 491 | "See the variable \"html2text-replace-list\" for documentation" |
| 498 | (interactive) | 492 | (interactive) |
| 499 | (dolist (e html2text-replace-list) | 493 | (dolist (e html2text-replace-list) |
| 500 | (html2text-buffer-head) | 494 | (goto-char (point-min)) |
| 501 | (let ((old-string (car e)) | 495 | (let ((old-string (car e)) |
| 502 | (new-string (cdr e))) | 496 | (new-string (cdr e))) |
| 503 | (html2text-replace-string old-string new-string (point-min) (point-max)) | 497 | (html2text-replace-string old-string new-string (point-min) (point-max)) |
| @@ -511,7 +505,7 @@ See the documentation for that variable." | |||
| 511 | (dolist (tag-and-function html2text-format-single-element-list) | 505 | (dolist (tag-and-function html2text-format-single-element-list) |
| 512 | (let ((tag (car tag-and-function)) | 506 | (let ((tag (car tag-and-function)) |
| 513 | (function (cdr tag-and-function))) | 507 | (function (cdr tag-and-function))) |
| 514 | (html2text-buffer-head) | 508 | (goto-char (point-min)) |
| 515 | (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) | 509 | (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) |
| 516 | (point-max) t) | 510 | (point-max) t) |
| 517 | (let ((p1) | 511 | (let ((p1) |
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index c608820c8ed..b68b4ec584c 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -302,9 +302,10 @@ Valid elements include: | |||
| 302 | (if (boundp 'current-language-environment) | 302 | (if (boundp 'current-language-environment) |
| 303 | (let ((lang (symbol-value 'current-language-environment))) | 303 | (let ((lang (symbol-value 'current-language-environment))) |
| 304 | (cond ((string= lang "Japanese") | 304 | (cond ((string= lang "Japanese") |
| 305 | ;; Japanese users may prefer iso-2022-jp to shift-jis. | 305 | ;; Japanese users prefer iso-2022-jp to euc-japan or |
| 306 | '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis | 306 | ;; shift_jis, however iso-8859-1 should be used when |
| 307 | iso-latin-1 utf-8))))) | 307 | ;; there are only ASCII text and Latin-1 characters. |
| 308 | '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8))))) | ||
| 308 | "Preferred coding systems for encoding outgoing messages. | 309 | "Preferred coding systems for encoding outgoing messages. |
| 309 | 310 | ||
| 310 | More than one suitable coding system may be found for some text. | 311 | More than one suitable coding system may be found for some text. |
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 9a08cdfe71c..d54897a7750 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el | |||
| @@ -44,7 +44,10 @@ This is most commonly `inews' or `injnews'.") | |||
| 44 | "Switches for nnspool-request-post to pass to `inews' for posting news. | 44 | "Switches for nnspool-request-post to pass to `inews' for posting news. |
| 45 | If you are using Cnews, you probably should set this variable to nil.") | 45 | If you are using Cnews, you probably should set this variable to nil.") |
| 46 | 46 | ||
| 47 | (defvoo nnspool-spool-directory (file-name-as-directory news-directory) | 47 | (defvoo nnspool-spool-directory |
| 48 | (file-name-as-directory (if (boundp 'news-directory) | ||
| 49 | (symbol-value 'news-directory) | ||
| 50 | news-path)) | ||
| 48 | "Local news spool directory.") | 51 | "Local news spool directory.") |
| 49 | 52 | ||
| 50 | (defvoo nnspool-nov-directory (concat nnspool-spool-directory "over.view/") | 53 | (defvoo nnspool-nov-directory (concat nnspool-spool-directory "over.view/") |
diff --git a/lisp/help.el b/lisp/help.el index c27bcc49055..ee35d007639 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -573,14 +573,14 @@ the last key hit are used." | |||
| 573 | (if (symbolp defn) defn (prin1-to-string defn))))))))) | 573 | (if (symbolp defn) defn (prin1-to-string defn))))))))) |
| 574 | 574 | ||
| 575 | 575 | ||
| 576 | (defun describe-key (key &optional untranslated) | 576 | (defun describe-key (key &optional untranslated up-event) |
| 577 | "Display documentation of the function invoked by KEY. | 577 | "Display documentation of the function invoked by KEY. |
| 578 | KEY should be a key sequence--when calling from a program, | 578 | KEY should be a key sequence--when calling from a program, |
| 579 | pass a string or a vector. | 579 | pass a string or a vector. |
| 580 | If non-nil UNTRANSLATED is a vector of the untranslated events. | 580 | If non-nil UNTRANSLATED is a vector of the untranslated events. |
| 581 | It can also be a number in which case the untranslated events from | 581 | It can also be a number in which case the untranslated events from |
| 582 | the last key hit are used." | 582 | the last key hit are used." |
| 583 | (interactive "kDescribe key: \np") | 583 | (interactive "kDescribe key: \np\nU") |
| 584 | (if (numberp untranslated) | 584 | (if (numberp untranslated) |
| 585 | (setq untranslated (this-single-command-raw-keys))) | 585 | (setq untranslated (this-single-command-raw-keys))) |
| 586 | (save-excursion | 586 | (save-excursion |
| @@ -608,6 +608,17 @@ the last key hit are used." | |||
| 608 | (prin1 defn) | 608 | (prin1 defn) |
| 609 | (princ "\n which is ") | 609 | (princ "\n which is ") |
| 610 | (describe-function-1 defn) | 610 | (describe-function-1 defn) |
| 611 | (when up-event | ||
| 612 | (let ((defn (or (string-key-binding up-event) (key-binding up-event)))) | ||
| 613 | (unless (or (null defn) (integerp defn) (equal defn 'undefined)) | ||
| 614 | (princ "\n\n-------------- up event ---------------\n\n") | ||
| 615 | (princ (key-description up-event)) | ||
| 616 | (if (windowp window) | ||
| 617 | (princ " at that spot")) | ||
| 618 | (princ " runs the command ") | ||
| 619 | (prin1 defn) | ||
| 620 | (princ "\n which is ") | ||
| 621 | (describe-function-1 defn)))) | ||
| 611 | (print-help-return-message))))))) | 622 | (print-help-return-message))))))) |
| 612 | 623 | ||
| 613 | 624 | ||
diff --git a/lisp/imenu.el b/lisp/imenu.el index 6859c0c74c7..7c775dc6337 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -62,6 +62,8 @@ | |||
| 62 | 62 | ||
| 63 | ;;; Code: | 63 | ;;; Code: |
| 64 | 64 | ||
| 65 | (require 'newcomment) | ||
| 66 | |||
| 65 | (eval-when-compile (require 'cl)) | 67 | (eval-when-compile (require 'cl)) |
| 66 | 68 | ||
| 67 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 69 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -159,16 +161,17 @@ element should come before the second. The arguments are cons cells; | |||
| 159 | :type 'integer | 161 | :type 'integer |
| 160 | :group 'imenu) | 162 | :group 'imenu) |
| 161 | 163 | ||
| 162 | (defcustom imenu-scanning-message "Scanning buffer for index (%3d%%)" | 164 | ;; No longer used. KFS 2004-10-27 |
| 163 | "*Progress message during the index scanning of the buffer. | 165 | ;; (defcustom imenu-scanning-message "Scanning buffer for index (%3d%%)" |
| 164 | If non-nil, user gets a message during the scanning of the buffer. | 166 | ;; "*Progress message during the index scanning of the buffer. |
| 165 | 167 | ;; If non-nil, user gets a message during the scanning of the buffer. | |
| 166 | Relevant only if the mode-specific function that creates the buffer | 168 | ;; |
| 167 | index use `imenu-progress-message', and not useful if that is fast, in | 169 | ;; Relevant only if the mode-specific function that creates the buffer |
| 168 | which case you might as well set this to nil." | 170 | ;; index use `imenu-progress-message', and not useful if that is fast, in |
| 169 | :type '(choice string | 171 | ;; which case you might as well set this to nil." |
| 170 | (const :tag "None" nil)) | 172 | ;; :type '(choice string |
| 171 | :group 'imenu) | 173 | ;; (const :tag "None" nil)) |
| 174 | ;; :group 'imenu) | ||
| 172 | 175 | ||
| 173 | (defcustom imenu-space-replacement "." | 176 | (defcustom imenu-space-replacement "." |
| 174 | "*The replacement string for spaces in index names. | 177 | "*The replacement string for spaces in index names. |
| @@ -298,16 +301,22 @@ The function in this variable is called when selecting a normal index-item.") | |||
| 298 | ;; is calculated. | 301 | ;; is calculated. |
| 299 | ;; PREVPOS is the variable in which we store the last position displayed. | 302 | ;; PREVPOS is the variable in which we store the last position displayed. |
| 300 | (defmacro imenu-progress-message (prevpos &optional relpos reverse) | 303 | (defmacro imenu-progress-message (prevpos &optional relpos reverse) |
| 301 | `(and | 304 | |
| 302 | imenu-scanning-message | 305 | ;; Made obsolete/empty, as computers are now faster than the eye, and |
| 303 | (let ((pos ,(if relpos | 306 | ;; it had problems updating the messages correctly, and could shadow |
| 304 | relpos | 307 | ;; more important messages/prompts in the minibuffer. KFS 2004-10-27. |
| 305 | `(imenu--relative-position ,reverse)))) | 308 | |
| 306 | (if ,(if relpos t | 309 | ;; `(and |
| 307 | `(> pos (+ 5 ,prevpos))) | 310 | ;; imenu-scanning-message |
| 308 | (progn | 311 | ;; (let ((pos ,(if relpos |
| 309 | (message imenu-scanning-message pos) | 312 | ;; relpos |
| 310 | (setq ,prevpos pos)))))) | 313 | ;; `(imenu--relative-position ,reverse)))) |
| 314 | ;; (if ,(if relpos t | ||
| 315 | ;; `(> pos (+ 5 ,prevpos))) | ||
| 316 | ;; (progn | ||
| 317 | ;; (message imenu-scanning-message pos) | ||
| 318 | ;; (setq ,prevpos pos))))) | ||
| 319 | ) | ||
| 311 | 320 | ||
| 312 | 321 | ||
| 313 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 322 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -763,7 +772,7 @@ the alist look like: | |||
| 763 | (INDEX-NAME . INDEX-POSITION) | 772 | (INDEX-NAME . INDEX-POSITION) |
| 764 | or like: | 773 | or like: |
| 765 | (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...) | 774 | (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...) |
| 766 | They may also be nested index alists like: | 775 | They may also be nested index alists like: |
| 767 | (INDEX-NAME . INDEX-ALIST) | 776 | (INDEX-NAME . INDEX-ALIST) |
| 768 | depending on PATTERNS." | 777 | depending on PATTERNS." |
| 769 | 778 | ||
| @@ -796,32 +805,37 @@ depending on PATTERNS." | |||
| 796 | (regexp (nth 1 pat)) | 805 | (regexp (nth 1 pat)) |
| 797 | (index (nth 2 pat)) | 806 | (index (nth 2 pat)) |
| 798 | (function (nth 3 pat)) | 807 | (function (nth 3 pat)) |
| 799 | (rest (nthcdr 4 pat))) | 808 | (rest (nthcdr 4 pat)) |
| 809 | cs) | ||
| 800 | ;; Go backwards for convenience of adding items in order. | 810 | ;; Go backwards for convenience of adding items in order. |
| 801 | (goto-char (point-max)) | 811 | (goto-char (point-max)) |
| 802 | (while (re-search-backward regexp nil t) | 812 | (while (re-search-backward regexp nil t) |
| 803 | (imenu-progress-message prev-pos nil t) | 813 | (goto-char (match-end index)) |
| 804 | (setq beg (match-beginning index)) | 814 | (setq beg (match-beginning index)) |
| 805 | ;; Add this sort of submenu only when we've found an | 815 | (if (setq cs (save-match-data (comment-beginning))) |
| 806 | ;; item for it, avoiding empty, duff menus. | 816 | (goto-char cs) ; skip this one, it's in a comment |
| 807 | (unless (assoc menu-title index-alist) | 817 | (goto-char beg) |
| 808 | (push (list menu-title) index-alist)) | 818 | (imenu-progress-message prev-pos nil t) |
| 809 | (if imenu-use-markers | 819 | ;; Add this sort of submenu only when we've found an |
| 810 | (setq beg (copy-marker beg))) | 820 | ;; item for it, avoiding empty, duff menus. |
| 811 | (let ((item | 821 | (unless (assoc menu-title index-alist) |
| 812 | (if function | 822 | (push (list menu-title) index-alist)) |
| 813 | (nconc (list (match-string-no-properties index) | 823 | (if imenu-use-markers |
| 814 | beg function) | 824 | (setq beg (copy-marker beg))) |
| 815 | rest) | 825 | (let ((item |
| 816 | (cons (match-string-no-properties index) | 826 | (if function |
| 817 | beg))) | 827 | (nconc (list (match-string-no-properties index) |
| 818 | ;; This is the desired submenu, | 828 | beg function) |
| 819 | ;; starting with its title (or nil). | 829 | rest) |
| 820 | (menu (assoc menu-title index-alist))) | 830 | (cons (match-string-no-properties index) |
| 821 | ;; Insert the item unless it is already present. | 831 | beg))) |
| 822 | (unless (member item (cdr menu)) | 832 | ;; This is the desired submenu, |
| 823 | (setcdr menu | 833 | ;; starting with its title (or nil). |
| 824 | (cons item (cdr menu)))))))) | 834 | (menu (assoc menu-title index-alist))) |
| 835 | ;; Insert the item unless it is already present. | ||
| 836 | (unless (member item (cdr menu)) | ||
| 837 | (setcdr menu | ||
| 838 | (cons item (cdr menu))))))))) | ||
| 825 | (set-syntax-table old-table))) | 839 | (set-syntax-table old-table))) |
| 826 | (imenu-progress-message prev-pos 100 t) | 840 | (imenu-progress-message prev-pos 100 t) |
| 827 | ;; Sort each submenu by position. | 841 | ;; Sort each submenu by position. |
diff --git a/lisp/info.el b/lisp/info.el index 4fc7b5c9cf7..2e0ddd0fb02 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1980,7 +1980,7 @@ Because of ambiguities, this should be concatenated with something like | |||
| 1980 | (if (match-beginning 5) | 1980 | (if (match-beginning 5) |
| 1981 | (string-to-number (match-string 5)) | 1981 | (string-to-number (match-string 5)) |
| 1982 | (buffer-substring (match-beginning 0) (1- (match-beginning 1))))) | 1982 | (buffer-substring (match-beginning 0) (1- (match-beginning 1))))) |
| 1983 | ;;; Comment out the next line to use names of cross-references: | 1983 | ;;; Uncomment next line to use names of cross-references in non-index nodes: |
| 1984 | ;;; (setq Info-point-loc | 1984 | ;;; (setq Info-point-loc |
| 1985 | ;;; (buffer-substring (match-beginning 0) (1- (match-beginning 1)))) | 1985 | ;;; (buffer-substring (match-beginning 0) (1- (match-beginning 1)))) |
| 1986 | ) | 1986 | ) |
| @@ -3214,7 +3214,7 @@ Allowed only if variable `Info-enable-edit' is non-nil." | |||
| 3214 | (message "Tags may have changed. Use Info-tagify if necessary"))) | 3214 | (message "Tags may have changed. Use Info-tagify if necessary"))) |
| 3215 | 3215 | ||
| 3216 | (defvar Info-file-list-for-emacs | 3216 | (defvar Info-file-list-for-emacs |
| 3217 | '("ediff" "eudc" "forms" "gnus" "info" ("mh" . "mh-e") | 3217 | '("ediff" "eudc" "forms" "gnus" "info" ("Info" . "info") ("mh" . "mh-e") |
| 3218 | "sc" "message" ("dired" . "dired-x") "viper" "vip" "idlwave" | 3218 | "sc" "message" ("dired" . "dired-x") "viper" "vip" "idlwave" |
| 3219 | ("c" . "ccmode") ("c++" . "ccmode") ("objc" . "ccmode") | 3219 | ("c" . "ccmode") ("c++" . "ccmode") ("objc" . "ccmode") |
| 3220 | ("java" . "ccmode") ("idl" . "ccmode") ("pike" . "ccmode") | 3220 | ("java" . "ccmode") ("idl" . "ccmode") ("pike" . "ccmode") |
| @@ -3245,11 +3245,13 @@ The `info-file' property of COMMAND says which Info manual to search. | |||
| 3245 | If COMMAND has no property, the variable `Info-file-list-for-emacs' | 3245 | If COMMAND has no property, the variable `Info-file-list-for-emacs' |
| 3246 | defines heuristics for which Info manual to try. | 3246 | defines heuristics for which Info manual to try. |
| 3247 | The locations are of the format used in `Info-history', i.e. | 3247 | The locations are of the format used in `Info-history', i.e. |
| 3248 | \(FILENAME NODENAME BUFFERPOS\)." | 3248 | \(FILENAME NODENAME BUFFERPOS\), where BUFFERPOS is the line number |
| 3249 | (let ((where '()) | 3249 | in the first element of the returned list (which is treated specially in |
| 3250 | `Info-goto-emacs-command-node'), and 0 for the rest elements of a list." | ||
| 3251 | (let ((where '()) line-number | ||
| 3250 | (cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) | 3252 | (cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) |
| 3251 | "\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\." | 3253 | "\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\." |
| 3252 | "\\([ \t]*(line[ \t]*[0-9]*)\\)?$")) | 3254 | "\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?")) |
| 3253 | (info-file "emacs")) ;default | 3255 | (info-file "emacs")) ;default |
| 3254 | ;; Determine which info file this command is documented in. | 3256 | ;; Determine which info file this command is documented in. |
| 3255 | (if (get command 'info-file) | 3257 | (if (get command 'info-file) |
| @@ -3288,11 +3290,17 @@ The locations are of the format used in `Info-history', i.e. | |||
| 3288 | (cons (list Info-current-file | 3290 | (cons (list Info-current-file |
| 3289 | (match-string-no-properties 2) | 3291 | (match-string-no-properties 2) |
| 3290 | 0) | 3292 | 0) |
| 3291 | where))) | 3293 | where)) |
| 3294 | (setq line-number (and (match-beginning 3) | ||
| 3295 | (string-to-number (match-string 3))))) | ||
| 3292 | (and (setq nodes (cdr nodes) node (car nodes)))) | 3296 | (and (setq nodes (cdr nodes) node (car nodes)))) |
| 3293 | (Info-goto-node node))) | 3297 | (Info-goto-node node))) |
| 3294 | where)) | 3298 | (if (and line-number where) |
| 3299 | (cons (list (nth 0 (car where)) (nth 1 (car where)) line-number) | ||
| 3300 | (cdr where)) | ||
| 3301 | where))) | ||
| 3295 | 3302 | ||
| 3303 | ;;;###autoload (put 'Info-goto-emacs-command-node 'info-file "emacs") | ||
| 3296 | ;;;###autoload | 3304 | ;;;###autoload |
| 3297 | (defun Info-goto-emacs-command-node (command) | 3305 | (defun Info-goto-emacs-command-node (command) |
| 3298 | "Go to the Info node in the Emacs manual for command COMMAND. | 3306 | "Go to the Info node in the Emacs manual for command COMMAND. |
| @@ -3316,9 +3324,11 @@ COMMAND must be a symbol or string." | |||
| 3316 | ;; Bind Info-history to nil, to prevent the last Index node | 3324 | ;; Bind Info-history to nil, to prevent the last Index node |
| 3317 | ;; visited by Info-find-emacs-command-nodes from being | 3325 | ;; visited by Info-find-emacs-command-nodes from being |
| 3318 | ;; pushed onto the history. | 3326 | ;; pushed onto the history. |
| 3319 | (let ((Info-history nil) (Info-history-list nil)) | 3327 | (let ((Info-history nil) (Info-history-list nil) |
| 3320 | (Info-find-node (car (car where)) | 3328 | (line-number (nth 2 (car where)))) |
| 3321 | (car (cdr (car where))))) | 3329 | (Info-find-node (nth 0 (car where)) (nth 1 (car where))) |
| 3330 | (if (and (integerp line-number) (> line-number 0)) | ||
| 3331 | (forward-line (1- line-number)))) | ||
| 3322 | (if (> num-matches 1) | 3332 | (if (> num-matches 1) |
| 3323 | (progn | 3333 | (progn |
| 3324 | ;; (car where) will be pushed onto Info-history | 3334 | ;; (car where) will be pushed onto Info-history |
| @@ -3332,6 +3342,7 @@ COMMAND must be a symbol or string." | |||
| 3332 | (if (> num-matches 2) "them" "it"))))) | 3342 | (if (> num-matches 2) "them" "it"))))) |
| 3333 | (error "Couldn't find documentation for %s" command)))) | 3343 | (error "Couldn't find documentation for %s" command)))) |
| 3334 | 3344 | ||
| 3345 | ;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file "emacs") | ||
| 3335 | ;;;###autoload | 3346 | ;;;###autoload |
| 3336 | (defun Info-goto-emacs-key-command-node (key) | 3347 | (defun Info-goto-emacs-key-command-node (key) |
| 3337 | "Go to the node in the Emacs manual which describes the command bound to KEY. | 3348 | "Go to the node in the Emacs manual which describes the command bound to KEY. |
diff --git a/lisp/international/subst-big5.el b/lisp/international/subst-big5.el index f2004b07544..9a17974ab01 100644 --- a/lisp/international/subst-big5.el +++ b/lisp/international/subst-big5.el | |||
| @@ -32,9 +32,9 @@ | |||
| 32 | (lambda (pair) | 32 | (lambda (pair) |
| 33 | (let ((unicode (car pair)) | 33 | (let ((unicode (car pair)) |
| 34 | (char (cadr pair))) | 34 | (char (cadr pair))) |
| 35 | (if (or (and (>= unicode #x2e80) (<= unicode #xd7a3)) | 35 | ;; exclude non-supporting components from decode table |
| 36 | (and (>= unicode #xff00) (<= unicode #xffef))) | 36 | (if (utf-translate-cjk-substitutable-p unicode) |
| 37 | (puthash unicode char ucs-unicode-to-mule-cjk)) | 37 | (puthash unicode char ucs-unicode-to-mule-cjk)) |
| 38 | (puthash char unicode ucs-mule-cjk-to-unicode))) | 38 | (puthash char unicode ucs-mule-cjk-to-unicode))) |
| 39 | '((#xa7 ?¡±) | 39 | '((#xa7 ?¡±) |
| 40 | (#xaf ?¡Â) | 40 | (#xaf ?¡Â) |
diff --git a/lisp/international/subst-gb2312.el b/lisp/international/subst-gb2312.el index dba26c9bd5c..446420490c5 100644 --- a/lisp/international/subst-gb2312.el +++ b/lisp/international/subst-gb2312.el | |||
| @@ -32,9 +32,9 @@ | |||
| 32 | (lambda (pair) | 32 | (lambda (pair) |
| 33 | (let ((unicode (car pair)) | 33 | (let ((unicode (car pair)) |
| 34 | (char (cadr pair))) | 34 | (char (cadr pair))) |
| 35 | (if (or (and (>= unicode #x2e80) (<= unicode #xd7a3)) | 35 | ;; exclude non-supporting components from decode table |
| 36 | (and (>= unicode #xff00) (<= unicode #xffef))) | 36 | (if (utf-translate-cjk-substitutable-p unicode) |
| 37 | (puthash unicode char ucs-unicode-to-mule-cjk)) | 37 | (puthash unicode char ucs-unicode-to-mule-cjk)) |
| 38 | (puthash char unicode ucs-mule-cjk-to-unicode))) | 38 | (puthash char unicode ucs-mule-cjk-to-unicode))) |
| 39 | '((#xa4 ?¡è) | 39 | '((#xa4 ?¡è) |
| 40 | (#xa7 ?¡ì) | 40 | (#xa7 ?¡ì) |
diff --git a/lisp/international/subst-jis.el b/lisp/international/subst-jis.el index edd01c0a0b3..2dfe3297ba0 100644 --- a/lisp/international/subst-jis.el +++ b/lisp/international/subst-jis.el | |||
| @@ -45,11 +45,11 @@ | |||
| 45 | (mapc | 45 | (mapc |
| 46 | (lambda (pair) | 46 | (lambda (pair) |
| 47 | (let ((unicode (car pair)) | 47 | (let ((unicode (car pair)) |
| 48 | (char (cadr pair))) | 48 | (char (cadr pair)) |
| 49 | ;; exclude non-CJK components from decode table | 49 | (tail utf-translate-cjk-unicode-range)) |
| 50 | (if (or (and (>= unicode #x2e80) (<= unicode #xd7a3)) | 50 | ;; exclude non-supporting components from decode table |
| 51 | (and (>= unicode #xff00) (<= unicode #xffef))) | 51 | (if (utf-translate-cjk-substitutable-p unicode) |
| 52 | (puthash unicode char ucs-unicode-to-mule-cjk)) | 52 | (puthash unicode char ucs-unicode-to-mule-cjk)) |
| 53 | (puthash char unicode ucs-mule-cjk-to-unicode))) | 53 | (puthash char unicode ucs-mule-cjk-to-unicode))) |
| 54 | '( | 54 | '( |
| 55 | ;; jisx0208 | 55 | ;; jisx0208 |
| @@ -13001,7 +13001,73 @@ | |||
| 13001 | (#x9fa2 ?íá) | 13001 | (#x9fa2 ?íá) |
| 13002 | (#x9fa3 ?íâ) | 13002 | (#x9fa3 ?íâ) |
| 13003 | (#x9fa5 ?íã) | 13003 | (#x9fa5 ?íã) |
| 13004 | (#xff5e ?¢·))) | 13004 | (#xff5e ?¢·) |
| 13005 | |||
| 13006 | ;; jisx0201 | ||
| 13007 | (#xFF61 ?Ž¡) | ||
| 13008 | (#xFF62 ?\Ž¢) | ||
| 13009 | (#xFF63 ?\Ž£) | ||
| 13010 | (#xFF64 ?ޤ) | ||
| 13011 | (#xFF65 ?Ž¥) | ||
| 13012 | (#xFF66 ?ަ) | ||
| 13013 | (#xFF67 ?ާ) | ||
| 13014 | (#xFF68 ?ލ) | ||
| 13015 | (#xFF69 ?Ž©) | ||
| 13016 | (#xFF6A ?Žª) | ||
| 13017 | (#xFF6B ?Ž«) | ||
| 13018 | (#xFF6C ?ެ) | ||
| 13019 | (#xFF6D ?Ž) | ||
| 13020 | (#xFF6E ?Ž®) | ||
| 13021 | (#xFF6F ?ޝ) | ||
| 13022 | (#xFF70 ?ް) | ||
| 13023 | (#xFF71 ?ޱ) | ||
| 13024 | (#xFF72 ?޲) | ||
| 13025 | (#xFF73 ?޳) | ||
| 13026 | (#xFF74 ?Ž´) | ||
| 13027 | (#xFF75 ?޵) | ||
| 13028 | (#xFF76 ?޶) | ||
| 13029 | (#xFF77 ?Ž·) | ||
| 13030 | (#xFF78 ?ޏ) | ||
| 13031 | (#xFF79 ?޹) | ||
| 13032 | (#xFF7A ?Žº) | ||
| 13033 | (#xFF7B ?Ž») | ||
| 13034 | (#xFF7C ?޼) | ||
| 13035 | (#xFF7D ?޽) | ||
| 13036 | (#xFF7E ?޾) | ||
| 13037 | (#xFF7F ?Ž¿) | ||
| 13038 | (#xFF80 ?ŽÀ) | ||
| 13039 | (#xFF81 ?ŽÁ) | ||
| 13040 | (#xFF82 ?ŽÂ) | ||
| 13041 | (#xFF83 ?ŽÃ) | ||
| 13042 | (#xFF84 ?ŽÄ) | ||
| 13043 | (#xFF85 ?ŽÅ) | ||
| 13044 | (#xFF86 ?ŽÆ) | ||
| 13045 | (#xFF87 ?ŽÇ) | ||
| 13046 | (#xFF88 ?ŽÈ) | ||
| 13047 | (#xFF89 ?ŽÉ) | ||
| 13048 | (#xFF8A ?ŽÊ) | ||
| 13049 | (#xFF8B ?ŽË) | ||
| 13050 | (#xFF8C ?ŽÌ) | ||
| 13051 | (#xFF8D ?ŽÍ) | ||
| 13052 | (#xFF8E ?ŽÎ) | ||
| 13053 | (#xFF8F ?ŽÏ) | ||
| 13054 | (#xFF90 ?ŽÐ) | ||
| 13055 | (#xFF91 ?ŽÑ) | ||
| 13056 | (#xFF92 ?ŽÒ) | ||
| 13057 | (#xFF93 ?ŽÓ) | ||
| 13058 | (#xFF94 ?ŽÔ) | ||
| 13059 | (#xFF95 ?ŽÕ) | ||
| 13060 | (#xFF96 ?ŽÖ) | ||
| 13061 | (#xFF97 ?Ž×) | ||
| 13062 | (#xFF98 ?ŽØ) | ||
| 13063 | (#xFF99 ?ŽÙ) | ||
| 13064 | (#xFF9A ?ŽÚ) | ||
| 13065 | (#xFF9B ?ŽÛ) | ||
| 13066 | (#xFF9C ?ŽÜ) | ||
| 13067 | (#xFF9D ?ŽÝ) | ||
| 13068 | (#xFF9E ?ŽÞ) | ||
| 13069 | (#xFF9F ?Žß) | ||
| 13070 | )) | ||
| 13005 | 13071 | ||
| 13006 | ;;; arch-tag: 7f320453-b293-4159-af5e-6f0bab03048c | 13072 | ;;; arch-tag: 7f320453-b293-4159-af5e-6f0bab03048c |
| 13007 | ;;; subst-jis.el ends here | 13073 | ;;; subst-jis.el ends here |
diff --git a/lisp/international/subst-ksc.el b/lisp/international/subst-ksc.el index 9f4b329b675..3cc339bbf8b 100644 --- a/lisp/international/subst-ksc.el +++ b/lisp/international/subst-ksc.el | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | (lambda (pair) | 31 | (lambda (pair) |
| 32 | (let ((unicode (car pair)) | 32 | (let ((unicode (car pair)) |
| 33 | (char (cadr pair))) | 33 | (char (cadr pair))) |
| 34 | (if (or (and (>= unicode #x2e80) (<= unicode #xd7a3)) | 34 | ;; exclude non-supporting components from decode table |
| 35 | (and (>= unicode #xff00) (<= unicode #xffef))) | 35 | (if (utf-translate-cjk-substitutable-p unicode) |
| 36 | (puthash unicode char ucs-unicode-to-mule-cjk)) | 36 | (puthash unicode char ucs-unicode-to-mule-cjk)) |
| 37 | (puthash char unicode ucs-mule-cjk-to-unicode))) | 37 | (puthash char unicode ucs-mule-cjk-to-unicode))) |
| 38 | '((#xa1 ?¢®) | 38 | '((#xa1 ?¢®) |
| 39 | (#xa4 ?¢´) | 39 | (#xa4 ?¢´) |
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 5a7acee0f0e..ed658eb3ddf 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el | |||
| @@ -194,13 +194,88 @@ Setting this variable outside customize has no effect." | |||
| 194 | (defconst utf-translate-cjk-charsets '(chinese-gb2312 | 194 | (defconst utf-translate-cjk-charsets '(chinese-gb2312 |
| 195 | chinese-big5-1 chinese-big5-2 | 195 | chinese-big5-1 chinese-big5-2 |
| 196 | japanese-jisx0208 japanese-jisx0212 | 196 | japanese-jisx0208 japanese-jisx0212 |
| 197 | katakana-jisx0201 | ||
| 197 | korean-ksc5601) | 198 | korean-ksc5601) |
| 198 | "List of charsets supported by `utf-translate-cjk-mode'.") | 199 | "List of charsets supported by `utf-translate-cjk-mode'.") |
| 199 | 200 | ||
| 200 | (defconst utf-translate-cjk-unicode-range | 201 | (defvar utf-translate-cjk-lang-env nil |
| 201 | '((#x2e80 . #xd7a3) | 202 | "Language environment in which tables for `utf-translate-cjk-mode' is loaded. |
| 202 | (#xff00 . #xffef)) | 203 | The value nil means that the tables are not yet loaded.") |
| 203 | "List of Unicode code ranges supported by `utf-translate-cjk-mode'.") | 204 | |
| 205 | (defvar utf-translate-cjk-unicode-range) | ||
| 206 | |||
| 207 | ;; String generated from utf-translate-cjk-unicode-range. It is | ||
| 208 | ;; suitable for an argument to skip-chars-forward. | ||
| 209 | (defvar utf-translate-cjk-unicode-range-string nil) | ||
| 210 | |||
| 211 | (defun utf-translate-cjk-set-unicode-range (range) | ||
| 212 | (setq utf-translate-cjk-unicode-range range) | ||
| 213 | (setq utf-translate-cjk-unicode-range-string | ||
| 214 | (let ((decode-char-no-trans | ||
| 215 | #'(lambda (x) | ||
| 216 | (cond ((< x #x100) (make-char 'latin-iso8859-1 x)) | ||
| 217 | ((< x #x2500) | ||
| 218 | (setq x (- x #x100)) | ||
| 219 | (make-char 'mule-unicode-0100-24ff | ||
| 220 | (+ (/ x 96) 32) (+ (% x 96) 32))) | ||
| 221 | ((< x #x3400) | ||
| 222 | (setq x (- x #x2500)) | ||
| 223 | (make-char 'mule-unicode-2500-33ff | ||
| 224 | (+ (/ x 96) 32) (+ (% x 96) 32))) | ||
| 225 | (t | ||
| 226 | (setq x (- x #xe000)) | ||
| 227 | (make-char 'mule-unicode-e000-ffff | ||
| 228 | (+ (/ x 96) 32) (+ (% x 96) 32)))))) | ||
| 229 | ranges from to) | ||
| 230 | (dolist (elt range) | ||
| 231 | (setq from (max #xA0 (car elt)) to (min #xffff (cdr elt))) | ||
| 232 | (if (and (>= to #x3400) (< to #xE000)) | ||
| 233 | (setq to #x33FF)) | ||
| 234 | (cond ((< from #x100) | ||
| 235 | (if (>= to #xE000) | ||
| 236 | (setq ranges (cons (cons #xE000 to) ranges) | ||
| 237 | to #x33FF)) | ||
| 238 | (if (>= to #x2500) | ||
| 239 | (setq ranges (cons (cons #x2500 to) ranges) | ||
| 240 | to #x24FF)) | ||
| 241 | (if (>= to #x100) | ||
| 242 | (setq ranges (cons (cons #x100 to) ranges) | ||
| 243 | to #xFF))) | ||
| 244 | ((< from #x2500) | ||
| 245 | (if (>= to #xE000) | ||
| 246 | (setq ranges (cons (cons #xE000 to) ranges) | ||
| 247 | to #x33FF)) | ||
| 248 | (if (>= to #x2500) | ||
| 249 | (setq ranges (cons (cons #x2500 to) ranges) | ||
| 250 | to #x24FF))) | ||
| 251 | ((< from #x3400) | ||
| 252 | (if (>= to #xE000) | ||
| 253 | (setq ranges (cons (cons #xE000 to) ranges) | ||
| 254 | to #x33FF)))) | ||
| 255 | (if (<= from to) | ||
| 256 | (setq ranges (cons (cons from to) ranges)))) | ||
| 257 | (mapconcat #'(lambda (x) | ||
| 258 | (format "%c-%c" | ||
| 259 | (funcall decode-char-no-trans (car x)) | ||
| 260 | (funcall decode-char-no-trans (cdr x)))) | ||
| 261 | ranges ""))) | ||
| 262 | ;; These forces loading and settting tables for | ||
| 263 | ;; utf-translate-cjk-mode. | ||
| 264 | (setq utf-translate-cjk-lang-env nil | ||
| 265 | ucs-mule-cjk-to-unicode (make-hash-table :test 'eq) | ||
| 266 | ucs-unicode-to-mule-cjk (make-hash-table :test 'eq))) | ||
| 267 | |||
| 268 | (defcustom utf-translate-cjk-unicode-range '((#x2e80 . #xd7a3) | ||
| 269 | (#xff00 . #xffef)) | ||
| 270 | "List of Unicode code ranges supported by `utf-translate-cjk-mode'. | ||
| 271 | Setting this variable directly does not take effect; | ||
| 272 | use either \\[customize] or the function | ||
| 273 | `utf-translate-cjk-set-unicode-range'." | ||
| 274 | :version "21.4" | ||
| 275 | :type '(repeat (cons integer integer)) | ||
| 276 | :set (lambda (symbol value) | ||
| 277 | (utf-translate-cjk-set-unicode-range value)) | ||
| 278 | :group 'mule) | ||
| 204 | 279 | ||
| 205 | ;; Return non-nil if CODE-POINT is in `utf-translate-cjk-unicode-range'. | 280 | ;; Return non-nil if CODE-POINT is in `utf-translate-cjk-unicode-range'. |
| 206 | (defsubst utf-translate-cjk-substitutable-p (code-point) | 281 | (defsubst utf-translate-cjk-substitutable-p (code-point) |
| @@ -213,10 +288,6 @@ Setting this variable outside customize has no effect." | |||
| 213 | (setq elt nil))) | 288 | (setq elt nil))) |
| 214 | elt)) | 289 | elt)) |
| 215 | 290 | ||
| 216 | (defvar utf-translate-cjk-lang-env nil | ||
| 217 | "Language environment in which tables for `utf-translate-cjk-mode' is loaded. | ||
| 218 | The value nil means that the tables are not yet loaded.") | ||
| 219 | |||
| 220 | (defun utf-translate-cjk-load-tables () | 291 | (defun utf-translate-cjk-load-tables () |
| 221 | "Load tables for `utf-translate-cjk-mode'." | 292 | "Load tables for `utf-translate-cjk-mode'." |
| 222 | ;; Fixme: Allow the use of the CJK charsets to be | 293 | ;; Fixme: Allow the use of the CJK charsets to be |
| @@ -425,25 +496,32 @@ by the above coding systems, you can customize the user option | |||
| 425 | ;; 2-byte encoding 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx | 496 | ;; 2-byte encoding 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx |
| 426 | ((r1 &= #x3F) | 497 | ((r1 &= #x3F) |
| 427 | (r1 |= ((r0 & #x1F) << 6)) | 498 | (r1 |= ((r0 & #x1F) << 6)) |
| 428 | ;; Now r2 holds scalar value. We don't have to check | 499 | ;; Now r1 holds scalar value. We don't have to check |
| 429 | ;; `overlong sequence' because r0 >= 0xC2. | 500 | ;; `overlong sequence' because r0 >= 0xC2. |
| 430 | 501 | ||
| 431 | (if (r1 >= 256) | 502 | (if (r1 >= 256) |
| 432 | ;; mule-unicode-0100-24ff (< 0800) | 503 | ;; mule-unicode-0100-24ff (< 0800) |
| 433 | ((r0 = ,(charset-id 'mule-unicode-0100-24ff)) | 504 | ((r0 = r1) |
| 434 | (r1 -= #x0100) | 505 | (lookup-integer utf-subst-table-for-decode r0 r1) |
| 435 | (r2 = (((r1 / 96) + 32) << 7)) | 506 | (if (r7 == 0) |
| 436 | (r1 %= 96) | 507 | ((r0 = ,(charset-id 'mule-unicode-0100-24ff)) |
| 437 | (r1 += (r2 + 32)) | 508 | (r1 -= #x0100) |
| 438 | (translate-character | 509 | (r2 = (((r1 / 96) + 32) << 7)) |
| 439 | utf-translation-table-for-decode r0 r1) | 510 | (r1 %= 96) |
| 511 | (r1 += (r2 + 32)) | ||
| 512 | (translate-character | ||
| 513 | utf-translation-table-for-decode r0 r1))) | ||
| 440 | (write-multibyte-character r0 r1) | 514 | (write-multibyte-character r0 r1) |
| 441 | (read r0) | 515 | (read r0) |
| 442 | (repeat)) | 516 | (repeat)) |
| 443 | (if (r1 >= 160) | 517 | (if (r1 >= 160) |
| 444 | ;; latin-iso8859-1 | 518 | ;; latin-iso8859-1 |
| 445 | ((r1 -= 128) | 519 | ((r0 = r1) |
| 446 | (write-multibyte-character r6 r1) | 520 | (lookup-integer utf-subst-table-for-decode r0 r1) |
| 521 | (if (r7 == 0) | ||
| 522 | ((r1 -= 128) | ||
| 523 | (write-multibyte-character r6 r1)) | ||
| 524 | ((write-multibyte-character r0 r1))) | ||
| 447 | (read r0) | 525 | (read r0) |
| 448 | (repeat)) | 526 | (repeat)) |
| 449 | ;; eight-bit-control | 527 | ;; eight-bit-control |
| @@ -482,13 +560,16 @@ by the above coding systems, you can customize the user option | |||
| 482 | 560 | ||
| 483 | (if (r3 < #x2500) | 561 | (if (r3 < #x2500) |
| 484 | ;; mule-unicode-0100-24ff (>= 0800) | 562 | ;; mule-unicode-0100-24ff (>= 0800) |
| 485 | ((r0 = ,(charset-id 'mule-unicode-0100-24ff)) | 563 | ((r0 = r3) |
| 486 | (r3 -= #x0100) | 564 | (lookup-integer utf-subst-table-for-decode r0 r1) |
| 487 | (r3 //= 96) | 565 | (if (r7 == 0) |
| 488 | (r1 = (r7 + 32)) | 566 | ((r0 = ,(charset-id 'mule-unicode-0100-24ff)) |
| 489 | (r1 += ((r3 + 32) << 7)) | 567 | (r3 -= #x0100) |
| 490 | (translate-character | 568 | (r3 //= 96) |
| 491 | utf-translation-table-for-decode r0 r1) | 569 | (r1 = (r7 + 32)) |
| 570 | (r1 += ((r3 + 32) << 7)) | ||
| 571 | (translate-character | ||
| 572 | utf-translation-table-for-decode r0 r1))) | ||
| 492 | (write-multibyte-character r0 r1) | 573 | (write-multibyte-character r0 r1) |
| 493 | (read r0) | 574 | (read r0) |
| 494 | (repeat))) | 575 | (repeat))) |
| @@ -874,17 +955,17 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." | |||
| 874 | hash-table ch) | 955 | hash-table ch) |
| 875 | (set-buffer-multibyte t) | 956 | (set-buffer-multibyte t) |
| 876 | (when utf-translate-cjk-mode | 957 | (when utf-translate-cjk-mode |
| 877 | (if (not utf-translate-cjk-lang-env) | 958 | (unless utf-translate-cjk-lang-env |
| 878 | ;; Check these characters: | 959 | ;; Check these characters in utf-translate-cjk-range. |
| 879 | ;; "U+2e80-U+33ff", "U+ff00-U+ffef" | 960 | ;; We may have to translate them to CJK charsets. |
| 880 | ;; We may have to translate them to CJK charsets. | 961 | (skip-chars-forward |
| 881 | (let ((range2 "$,29@(B-$,2G$,3r`(B-$,3u/(B")) | 962 | (concat range utf-translate-cjk-unicode-range-string)) |
| 882 | (skip-chars-forward (concat range range2)) | 963 | (unless (eobp) |
| 883 | (unless (eobp) | 964 | (utf-translate-cjk-load-tables) |
| 884 | (utf-translate-cjk-load-tables) | 965 | (setq range |
| 885 | (setq range (concat range range2))) | 966 | (concat range utf-translate-cjk-unicode-range-string))) |
| 886 | (setq hash-table (get 'utf-subst-table-for-decode | 967 | (setq hash-table (get 'utf-subst-table-for-decode |
| 887 | 'translation-hash-table))))) | 968 | 'translation-hash-table)))) |
| 888 | (while (and (skip-chars-forward range) | 969 | (while (and (skip-chars-forward range) |
| 889 | (not (eobp))) | 970 | (not (eobp))) |
| 890 | (setq ch (following-char)) | 971 | (setq ch (following-char)) |
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index e93f76c3042..c5579b3c0db 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -128,6 +128,9 @@ usually do not have translators to read other languages for them.\n\n") | |||
| 128 | (insert "\n\n\n") | 128 | (insert "\n\n\n") |
| 129 | 129 | ||
| 130 | (insert "In " (emacs-version) "\n") | 130 | (insert "In " (emacs-version) "\n") |
| 131 | (if (fboundp 'x-server-vendor) | ||
| 132 | (insert "Distributor `" (x-server-vendor) "', version " | ||
| 133 | (mapconcat 'number-to-string (x-server-version) ".") "\n")) | ||
| 131 | (if (and system-configuration-options | 134 | (if (and system-configuration-options |
| 132 | (not (equal system-configuration-options ""))) | 135 | (not (equal system-configuration-options ""))) |
| 133 | (insert "configured using `configure " | 136 | (insert "configured using `configure " |
diff --git a/lisp/man.el b/lisp/man.el index cbfae21e44b..afd183fa720 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -893,12 +893,15 @@ header file(#include <foo.h>) and files in FILES" | |||
| 893 | 'Man-target-string (match-string target-pos) | 893 | 'Man-target-string (match-string target-pos) |
| 894 | ))))) | 894 | ))))) |
| 895 | 895 | ||
| 896 | (defun Man-cleanup-manpage () | 896 | (defun Man-cleanup-manpage (&optional interactive) |
| 897 | "Remove overstriking and underlining from the current buffer." | 897 | "Remove overstriking and underlining from the current buffer. |
| 898 | (interactive) | 898 | Normally skip any jobs that should have been done by the sed script, |
| 899 | but when called interactively, do those jobs even if the sed | ||
| 900 | script would have done them." | ||
| 901 | (interactive "p") | ||
| 899 | (message "Please wait: cleaning up the %s man page..." | 902 | (message "Please wait: cleaning up the %s man page..." |
| 900 | Man-arguments) | 903 | Man-arguments) |
| 901 | (if (or (interactive-p) (not Man-sed-script)) | 904 | (if (or interactive (not Man-sed-script)) |
| 902 | (progn | 905 | (progn |
| 903 | (goto-char (point-min)) | 906 | (goto-char (point-min)) |
| 904 | (while (search-forward "_\b" nil t) (backward-delete-char 2)) | 907 | (while (search-forward "_\b" nil t) (backward-delete-char 2)) |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 17deeff4619..22840896c17 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -596,10 +596,12 @@ PROPS are additional properties." | |||
| 596 | 596 | ||
| 597 | (defmacro menu-bar-make-toggle (name variable doc message help &rest body) | 597 | (defmacro menu-bar-make-toggle (name variable doc message help &rest body) |
| 598 | `(progn | 598 | `(progn |
| 599 | (defun ,name () | 599 | (defun ,name (&optional interactively) |
| 600 | ,(concat "Toggle whether to " (downcase (substring help 0 1)) | 600 | ,(concat "Toggle whether to " (downcase (substring help 0 1)) |
| 601 | (substring help 1) ".") | 601 | (substring help 1) ".\ |
| 602 | (interactive) | 602 | In an interactive call, record this option as a candidate for saving |
| 603 | by \"Save Options\" in Custom buffers.") | ||
| 604 | (interactive "p") | ||
| 603 | (if ,(if body `(progn . ,body) | 605 | (if ,(if body `(progn . ,body) |
| 604 | `(progn | 606 | `(progn |
| 605 | (custom-load-symbol ',variable) | 607 | (custom-load-symbol ',variable) |
| @@ -612,7 +614,7 @@ PROPS are additional properties." | |||
| 612 | ;; a variable is set interactively, as the purpose is to mark it as | 614 | ;; a variable is set interactively, as the purpose is to mark it as |
| 613 | ;; a candidate for "Save Options", and we do not want to save options | 615 | ;; a candidate for "Save Options", and we do not want to save options |
| 614 | ;; the user have already set explicitly in his init file. | 616 | ;; the user have already set explicitly in his init file. |
| 615 | (if (interactive-p) (customize-mark-as-set ',variable))) | 617 | (if interactively (customize-mark-as-set ',variable))) |
| 616 | '(menu-item ,doc ,name | 618 | '(menu-item ,doc ,name |
| 617 | :help ,help | 619 | :help ,help |
| 618 | :button (:toggle . (and (default-boundp ',variable) | 620 | :button (:toggle . (and (default-boundp ',variable) |
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el index f9b90fbfc6a..4f3741a5213 100644 --- a/lisp/mouse-sel.el +++ b/lisp/mouse-sel.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; mouse-sel.el --- multi-click selection support for Emacs 19 | 1 | ;;; mouse-sel.el --- multi-click selection support for Emacs 19 |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993,1994,1995,2001,2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Mike Williams <mdub@bigfoot.com> | 6 | ;; Author: Mike Williams <mdub@bigfoot.com> |
| 6 | ;; Keywords: mouse | 7 | ;; Keywords: mouse |
| @@ -240,9 +241,10 @@ to the kill ring. Pressing mouse-1 or mouse-3 kills it. | |||
| 240 | & mouse-3, but operate on the X secondary selection rather than the | 241 | & mouse-3, but operate on the X secondary selection rather than the |
| 241 | primary selection and region." | 242 | primary selection and region." |
| 242 | :global t | 243 | :global t |
| 244 | :group 'mouse-sel | ||
| 243 | (if mouse-sel-mode | 245 | (if mouse-sel-mode |
| 244 | (progn | 246 | (progn |
| 245 | (add-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook) | 247 | (add-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) |
| 246 | (when mouse-sel-default-bindings | 248 | (when mouse-sel-default-bindings |
| 247 | ;; Save original bindings and replace them with new ones. | 249 | ;; Save original bindings and replace them with new ones. |
| 248 | (setq mouse-sel-original-bindings | 250 | (setq mouse-sel-original-bindings |
| @@ -262,7 +264,7 @@ primary selection and region." | |||
| 262 | interprogram-paste-function nil)))) | 264 | interprogram-paste-function nil)))) |
| 263 | 265 | ||
| 264 | ;; Restore original bindings | 266 | ;; Restore original bindings |
| 265 | (remove-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook) | 267 | (remove-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) |
| 266 | (dolist (binding mouse-sel-original-bindings) | 268 | (dolist (binding mouse-sel-original-bindings) |
| 267 | (global-set-key (car binding) (cdr binding))) | 269 | (global-set-key (car binding) (cdr binding))) |
| 268 | ;; Restore the old values of these variables, | 270 | ;; Restore the old values of these variables, |
| @@ -711,5 +713,5 @@ If `mouse-yank-at-point' is non-nil, insert at point instead." | |||
| 711 | 713 | ||
| 712 | (provide 'mouse-sel) | 714 | (provide 'mouse-sel) |
| 713 | 715 | ||
| 714 | ;;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7 | 716 | ;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7 |
| 715 | ;;; mouse-sel.el ends here | 717 | ;;; mouse-sel.el ends here |
diff --git a/lisp/mouse.el b/lisp/mouse.el index abf62a97836..8f05324d84d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1025,54 +1025,56 @@ If MODE is 2 then do the same for lines." | |||
| 1025 | "List of keys which shall cause the mouse region to be deleted.") | 1025 | "List of keys which shall cause the mouse region to be deleted.") |
| 1026 | 1026 | ||
| 1027 | (defun mouse-show-mark () | 1027 | (defun mouse-show-mark () |
| 1028 | (if transient-mark-mode | 1028 | (let ((inhibit-quit t) |
| 1029 | (delete-overlay mouse-drag-overlay) | 1029 | (echo-keystrokes 0) |
| 1030 | (let ((inhibit-quit t) | 1030 | event events key ignore |
| 1031 | (echo-keystrokes 0) | 1031 | (x-lost-selection-functions |
| 1032 | event events key ignore | 1032 | (when (boundp 'x-lost-selection-functions) |
| 1033 | x-lost-selection-hooks) | 1033 | (copy-sequence x-lost-selection-functions)))) |
| 1034 | (add-hook 'x-lost-selection-hooks | 1034 | (add-hook 'x-lost-selection-functions |
| 1035 | (lambda (seltype) | 1035 | (lambda (seltype) |
| 1036 | (if (eq seltype 'PRIMARY) | 1036 | (when (eq seltype 'PRIMARY) |
| 1037 | (progn (setq ignore t) | 1037 | (setq ignore t) |
| 1038 | (throw 'mouse-show-mark t))))) | 1038 | (throw 'mouse-show-mark t)))) |
| 1039 | (move-overlay mouse-drag-overlay (point) (mark t)) | 1039 | (if transient-mark-mode |
| 1040 | (catch 'mouse-show-mark | 1040 | (delete-overlay mouse-drag-overlay) |
| 1041 | ;; In this loop, execute scroll bar and switch-frame events. | 1041 | (move-overlay mouse-drag-overlay (point) (mark t))) |
| 1042 | ;; Also ignore down-events that are undefined. | 1042 | (catch 'mouse-show-mark |
| 1043 | (while (progn (setq event (read-event)) | 1043 | ;; In this loop, execute scroll bar and switch-frame events. |
| 1044 | (setq events (append events (list event))) | 1044 | ;; Also ignore down-events that are undefined. |
| 1045 | (setq key (apply 'vector events)) | 1045 | (while (progn (setq event (read-event)) |
| 1046 | (or (and (consp event) | 1046 | (setq events (append events (list event))) |
| 1047 | (eq (car event) 'switch-frame)) | 1047 | (setq key (apply 'vector events)) |
| 1048 | (and (consp event) | 1048 | (or (and (consp event) |
| 1049 | (eq (posn-point (event-end event)) | 1049 | (eq (car event) 'switch-frame)) |
| 1050 | 'vertical-scroll-bar)) | 1050 | (and (consp event) |
| 1051 | (and (memq 'down (event-modifiers event)) | 1051 | (eq (posn-point (event-end event)) |
| 1052 | (not (key-binding key)) | 1052 | 'vertical-scroll-bar)) |
| 1053 | (not (mouse-undouble-last-event events)) | 1053 | (and (memq 'down (event-modifiers event)) |
| 1054 | (not (member key mouse-region-delete-keys))))) | 1054 | (not (key-binding key)) |
| 1055 | (and (consp event) | 1055 | (not (mouse-undouble-last-event events)) |
| 1056 | (or (eq (car event) 'switch-frame) | 1056 | (not (member key mouse-region-delete-keys))))) |
| 1057 | (eq (posn-point (event-end event)) | 1057 | (and (consp event) |
| 1058 | 'vertical-scroll-bar)) | 1058 | (or (eq (car event) 'switch-frame) |
| 1059 | (let ((keys (vector 'vertical-scroll-bar event))) | 1059 | (eq (posn-point (event-end event)) |
| 1060 | (and (key-binding keys) | 1060 | 'vertical-scroll-bar)) |
| 1061 | (progn | 1061 | (let ((keys (vector 'vertical-scroll-bar event))) |
| 1062 | (call-interactively (key-binding keys) | 1062 | (and (key-binding keys) |
| 1063 | nil keys) | 1063 | (progn |
| 1064 | (setq events nil))))))) | 1064 | (call-interactively (key-binding keys) |
| 1065 | ;; If we lost the selection, just turn off the highlighting. | 1065 | nil keys) |
| 1066 | (if ignore | 1066 | (setq events nil))))))) |
| 1067 | nil | 1067 | ;; If we lost the selection, just turn off the highlighting. |
| 1068 | ;; For certain special keys, delete the region. | 1068 | (unless ignore |
| 1069 | (if (member key mouse-region-delete-keys) | 1069 | ;; For certain special keys, delete the region. |
| 1070 | (delete-region (overlay-start mouse-drag-overlay) | 1070 | (if (member key mouse-region-delete-keys) |
| 1071 | (overlay-end mouse-drag-overlay)) | 1071 | (delete-region (overlay-start mouse-drag-overlay) |
| 1072 | ;; Otherwise, unread the key so it gets executed normally. | 1072 | (overlay-end mouse-drag-overlay)) |
| 1073 | (setq unread-command-events | 1073 | ;; Otherwise, unread the key so it gets executed normally. |
| 1074 | (nconc events unread-command-events)))) | 1074 | (setq unread-command-events |
| 1075 | (setq quit-flag nil) | 1075 | (nconc events unread-command-events)))) |
| 1076 | (setq quit-flag nil) | ||
| 1077 | (unless transient-mark-mode | ||
| 1076 | (delete-overlay mouse-drag-overlay)))) | 1078 | (delete-overlay mouse-drag-overlay)))) |
| 1077 | 1079 | ||
| 1078 | (defun mouse-set-mark (click) | 1080 | (defun mouse-set-mark (click) |
diff --git a/lisp/net/password.el b/lisp/net/password.el deleted file mode 100644 index e8be612ecca..00000000000 --- a/lisp/net/password.el +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | ;;; password.el --- Read passwords from user, possibly using a password cache. | ||
| 2 | |||
| 3 | ;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Simon Josefsson <simon@josefsson.org> | ||
| 6 | ;; Created: 2003-12-21 | ||
| 7 | ;; Keywords: password cache passphrase key | ||
| 8 | |||
| 9 | ;; This file is part of GNU Emacs. | ||
| 10 | |||
| 11 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 12 | ;; it under the terms of the GNU General Public License as published by | ||
| 13 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 14 | ;; any later version. | ||
| 15 | |||
| 16 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | ;; GNU General Public License for more details. | ||
| 20 | |||
| 21 | ;; You should have received a copy of the GNU General Public License | ||
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 24 | ;; Boston, MA 02111-1307, USA. | ||
| 25 | |||
| 26 | ;;; Commentary: | ||
| 27 | |||
| 28 | ;; Greatly influenced by pgg.el written by Daiki Ueno, with timer | ||
| 29 | ;; fixes for XEmacs by Katsumi Yamaoka. In fact, this is mostly just | ||
| 30 | ;; a rip-off. | ||
| 31 | ;; | ||
| 32 | ;; (password-read "Password? " "test") | ||
| 33 | ;; ;; Minibuffer prompt for password. | ||
| 34 | ;; => "foo" | ||
| 35 | ;; | ||
| 36 | ;; (password-cache-add "test" "foo") | ||
| 37 | ;; => nil | ||
| 38 | |||
| 39 | ;; Note the previous two can be replaced with: | ||
| 40 | ;; (password-read-and-add "Password? " "test") | ||
| 41 | ;; ;; Minibuffer prompt for password. | ||
| 42 | ;; => "foo" | ||
| 43 | ;; ;; "foo" is now cached with key "test" | ||
| 44 | |||
| 45 | |||
| 46 | ;; (password-read "Password? " "test") | ||
| 47 | ;; ;; No minibuffer prompt | ||
| 48 | ;; => "foo" | ||
| 49 | ;; | ||
| 50 | ;; (password-read "Password? " "test") | ||
| 51 | ;; ;; No minibuffer prompt | ||
| 52 | ;; => "foo" | ||
| 53 | ;; | ||
| 54 | ;; ;; Wait `password-cache-expiry' seconds. | ||
| 55 | ;; | ||
| 56 | ;; (password-read "Password? " "test") | ||
| 57 | ;; ;; Minibuffer prompt for password is back. | ||
| 58 | ;; => "foo" | ||
| 59 | |||
| 60 | ;;; Code: | ||
| 61 | |||
| 62 | (when (featurep 'xemacs) | ||
| 63 | (require 'run-at-time)) | ||
| 64 | |||
| 65 | (eval-when-compile | ||
| 66 | (require 'cl)) | ||
| 67 | |||
| 68 | (defcustom password-cache t | ||
| 69 | "Whether to cache passwords." | ||
| 70 | :group 'password | ||
| 71 | :type 'boolean) | ||
| 72 | |||
| 73 | (defcustom password-cache-expiry 16 | ||
| 74 | "How many seconds passwords are cached, or nil to disable expiring. | ||
| 75 | Whether passwords are cached at all is controlled by `password-cache'." | ||
| 76 | :group 'password | ||
| 77 | :type '(choice (const :tag "Never" nil) | ||
| 78 | (integer :tag "Seconds"))) | ||
| 79 | |||
| 80 | (defvar password-data (make-vector 7 0)) | ||
| 81 | |||
| 82 | (defun password-read (prompt &optional key) | ||
| 83 | "Read password, for use with KEY, from user, or from cache if wanted. | ||
| 84 | KEY indicate the purpose of the password, so the cache can | ||
| 85 | separate passwords. The cache is not used if KEY is nil. It is | ||
| 86 | typically a string. | ||
| 87 | The variable `password-cache' control whether the cache is used." | ||
| 88 | (or (and password-cache | ||
| 89 | key | ||
| 90 | (symbol-value (intern-soft key password-data))) | ||
| 91 | (read-passwd prompt))) | ||
| 92 | |||
| 93 | (defun password-read-and-add (prompt &optional key) | ||
| 94 | "Read password, for use with KEY, from user, or from cache if wanted. | ||
| 95 | Then store the password in the cache. Uses `password-read' and | ||
| 96 | `password-cache-add'." | ||
| 97 | (let ((password (password-read prompt key))) | ||
| 98 | (when (and password key) | ||
| 99 | (password-cache-add key password)) | ||
| 100 | password)) | ||
| 101 | |||
| 102 | (defun password-cache-remove (key) | ||
| 103 | "Remove password indexed by KEY from password cache. | ||
| 104 | This is typically run be a timer setup from `password-cache-add', | ||
| 105 | but can be invoked at any time to forcefully remove passwords | ||
| 106 | from the cache. This may be useful when it has been detected | ||
| 107 | that a password is invalid, so that `password-read' query the | ||
| 108 | user again." | ||
| 109 | (let ((password (symbol-value (intern-soft key password-data)))) | ||
| 110 | (when password | ||
| 111 | (fillarray password ?_) | ||
| 112 | (unintern key password-data)))) | ||
| 113 | |||
| 114 | (defun password-cache-add (key password) | ||
| 115 | "Add password to cache. | ||
| 116 | The password is removed by a timer after `password-cache-expiry' | ||
| 117 | seconds." | ||
| 118 | (set (intern key password-data) password) | ||
| 119 | (when password-cache-expiry | ||
| 120 | (run-at-time password-cache-expiry nil | ||
| 121 | #'password-cache-remove | ||
| 122 | key)) | ||
| 123 | nil) | ||
| 124 | |||
| 125 | (provide 'password) | ||
| 126 | |||
| 127 | ;;; arch-tag: ab160494-16c8-4c68-a4a1-73eebf6686e5 | ||
| 128 | ;;; password.el ends here | ||
diff --git a/lisp/obsolete/hilit19.el b/lisp/obsolete/hilit19.el index 4d8af4b5a2b..a5fd33adcaa 100644 --- a/lisp/obsolete/hilit19.el +++ b/lisp/obsolete/hilit19.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; hilit19.el --- customizable highlighting for Emacs 19 | 1 | ;;; hilit19.el --- customizable highlighting for Emacs 19 |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1993, 1994, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1993, 1994, 2001, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jonathan Stigelman <stig@hackvan.com> | 5 | ;; Author: Jonathan Stigelman <stig@hackvan.com> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -397,8 +397,6 @@ See the hilit-lookup-face-create documentation for valid face names.") | |||
| 397 | If hilit19 is dumped into emacs at your site, you may have to set this in | 397 | If hilit19 is dumped into emacs at your site, you may have to set this in |
| 398 | your init file.") | 398 | your init file.") |
| 399 | 399 | ||
| 400 | (eval-when-compile (setq byte-optimize t)) | ||
| 401 | |||
| 402 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 400 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 403 | ;; Use this to report bugs: | 401 | ;; Use this to report bugs: |
| 404 | 402 | ||
| @@ -945,47 +943,61 @@ the entire buffer is forced." | |||
| 945 | ;; Initialization. | 943 | ;; Initialization. |
| 946 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 944 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 947 | 945 | ||
| 948 | (and (not hilit-inhibit-rebinding) | 946 | (define-minor-mode hilit-mode |
| 949 | (progn | 947 | "Obsolete minor mode. Use `global-font-lock-mode' instead." |
| 950 | (substitute-key-definition 'yank 'hilit-yank | 948 | :global t |
| 951 | (current-global-map)) | 949 | |
| 952 | (substitute-key-definition 'yank-pop 'hilit-yank-pop | 950 | (unless (and hilit-inhibit-rebinding hilit-mode) |
| 953 | (current-global-map)) | 951 | (substitute-key-definition |
| 954 | (substitute-key-definition 'recenter 'hilit-recenter | 952 | (if hilit-mode 'yank 'hilit-yank) |
| 955 | (current-global-map)))) | 953 | (if hilit-mode 'hilit-yank 'yank) |
| 956 | 954 | (current-global-map)) | |
| 957 | (global-set-key [?\C-\S-l] 'hilit-repaint-command) | 955 | (substitute-key-definition |
| 958 | 956 | (if hilit-mode 'yank-pop 'hilit-yank-pop) | |
| 959 | (add-hook 'find-file-hook 'hilit-find-file-hook t) | 957 | (if hilit-mode 'hilit-yank-pop 'yank-pop) |
| 958 | (current-global-map)) | ||
| 959 | (substitute-key-definition | ||
| 960 | (if hilit-mode 'recenter 'hilit-recenter) | ||
| 961 | (if hilit-mode 'hilit-recenter 'recenter) | ||
| 962 | (current-global-map))) | ||
| 963 | |||
| 964 | (if hilit-mode | ||
| 965 | (global-set-key [?\C-\S-l] 'hilit-repaint-command) | ||
| 966 | (global-unset-key [?\C-\S-l])) | ||
| 967 | |||
| 968 | (if hilit-mode | ||
| 969 | (add-hook 'find-file-hook 'hilit-find-file-hook t) | ||
| 970 | (remove-hook 'find-file-hook 'hilit-find-file-hook)) | ||
| 971 | |||
| 972 | (unless (and hilit-inhibit-hooks hilit-mode) | ||
| 973 | (condition-case c | ||
| 974 | (progn | ||
| 975 | |||
| 976 | ;; BUFFER highlights... | ||
| 977 | (mapcar (lambda (hook) | ||
| 978 | (if hilit-mode | ||
| 979 | (add-hook hook 'hilit-rehighlight-buffer-quietly) | ||
| 980 | (remove-hook hook 'hilit-rehighlight-buffer-quietly))) | ||
| 981 | '( | ||
| 982 | Info-selection-hook | ||
| 983 | |||
| 984 | ;; runs too early vm-summary-mode-hooks | ||
| 985 | vm-summary-pointer-hook | ||
| 986 | vm-preview-message-hook | ||
| 987 | vm-show-message-hook | ||
| 988 | |||
| 989 | rmail-show-message-hook | ||
| 990 | mail-setup-hook | ||
| 991 | mh-show-mode-hook | ||
| 992 | |||
| 993 | dired-after-readin-hook | ||
| 994 | )) | ||
| 995 | ) | ||
| 996 | (error (message "Error loading highlight hooks: %s" c) | ||
| 997 | (ding) (sit-for 1))))) | ||
| 960 | 998 | ||
| 961 | (eval-when-compile (require 'gnus)) ; no compilation gripes | 999 | (eval-when-compile (require 'gnus)) ; no compilation gripes |
| 962 | 1000 | ||
| 963 | (and (not hilit-inhibit-hooks) | ||
| 964 | (condition-case c | ||
| 965 | (progn | ||
| 966 | |||
| 967 | ;; BUFFER highlights... | ||
| 968 | (mapcar (function | ||
| 969 | (lambda (hook) | ||
| 970 | (add-hook hook 'hilit-rehighlight-buffer-quietly))) | ||
| 971 | '( | ||
| 972 | Info-selection-hook | ||
| 973 | |||
| 974 | ;; runs too early vm-summary-mode-hooks | ||
| 975 | vm-summary-pointer-hook | ||
| 976 | vm-preview-message-hook | ||
| 977 | vm-show-message-hook | ||
| 978 | |||
| 979 | rmail-show-message-hook | ||
| 980 | mail-setup-hook | ||
| 981 | mh-show-mode-hook | ||
| 982 | |||
| 983 | dired-after-readin-hook | ||
| 984 | )) | ||
| 985 | ) | ||
| 986 | (error (message "Error loading highlight hooks: %s" c) | ||
| 987 | (ding) (sit-for 1)))) | ||
| 988 | |||
| 989 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1001 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 990 | ;; Default patterns for various modes. | 1002 | ;; Default patterns for various modes. |
| 991 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1003 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -1510,5 +1522,5 @@ number of backslashes." | |||
| 1510 | 1522 | ||
| 1511 | (provide 'hilit19) | 1523 | (provide 'hilit19) |
| 1512 | 1524 | ||
| 1513 | ;;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d | 1525 | ;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d |
| 1514 | ;;; hilit19.el ends here | 1526 | ;;; hilit19.el ends here |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 1260867f7c6..f4b796dd1a7 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -150,7 +150,7 @@ This mirrors the optional behavior of tcsh." | |||
| 150 | :type 'boolean | 150 | :type 'boolean |
| 151 | :group 'pcomplete) | 151 | :group 'pcomplete) |
| 152 | 152 | ||
| 153 | (defcustom pcomplete-suffix-list (list directory-sep-char ?:) | 153 | (defcustom pcomplete-suffix-list (list ?/ ?:) |
| 154 | "*A list of characters which constitute a proper suffix." | 154 | "*A list of characters which constitute a proper suffix." |
| 155 | :type '(repeat character) | 155 | :type '(repeat character) |
| 156 | :group 'pcomplete) | 156 | :group 'pcomplete) |
| @@ -347,12 +347,12 @@ modified to be an empty string, or the desired separation string." | |||
| 347 | ;;; User Functions: | 347 | ;;; User Functions: |
| 348 | 348 | ||
| 349 | ;;;###autoload | 349 | ;;;###autoload |
| 350 | (defun pcomplete () | 350 | (defun pcomplete (&optional interactively) |
| 351 | "Support extensible programmable completion. | 351 | "Support extensible programmable completion. |
| 352 | To use this function, just bind the TAB key to it, or add it to your | 352 | To use this function, just bind the TAB key to it, or add it to your |
| 353 | completion functions list (it should occur fairly early in the list)." | 353 | completion functions list (it should occur fairly early in the list)." |
| 354 | (interactive) | 354 | (interactive "p") |
| 355 | (if (and (interactive-p) | 355 | (if (and interactively |
| 356 | pcomplete-cycle-completions | 356 | pcomplete-cycle-completions |
| 357 | pcomplete-current-completions | 357 | pcomplete-current-completions |
| 358 | (memq last-command '(pcomplete | 358 | (memq last-command '(pcomplete |
| @@ -740,7 +740,7 @@ component, `default-directory' is used as the basis for completion." | |||
| 740 | (function | 740 | (function |
| 741 | (lambda (file) | 741 | (lambda (file) |
| 742 | (if (eq (aref file (1- (length file))) | 742 | (if (eq (aref file (1- (length file))) |
| 743 | directory-sep-char) | 743 | ?/) |
| 744 | (and pcomplete-dir-ignore | 744 | (and pcomplete-dir-ignore |
| 745 | (string-match pcomplete-dir-ignore file)) | 745 | (string-match pcomplete-dir-ignore file)) |
| 746 | (and pcomplete-file-ignore | 746 | (and pcomplete-file-ignore |
| @@ -757,11 +757,11 @@ component, `default-directory' is used as the basis for completion." | |||
| 757 | ;; since . is earlier in the ASCII alphabet than | 757 | ;; since . is earlier in the ASCII alphabet than |
| 758 | ;; / | 758 | ;; / |
| 759 | (let ((left (if (eq (aref l (1- (length l))) | 759 | (let ((left (if (eq (aref l (1- (length l))) |
| 760 | directory-sep-char) | 760 | ?/) |
| 761 | (substring l 0 (1- (length l))) | 761 | (substring l 0 (1- (length l))) |
| 762 | l)) | 762 | l)) |
| 763 | (right (if (eq (aref r (1- (length r))) | 763 | (right (if (eq (aref r (1- (length r))) |
| 764 | directory-sep-char) | 764 | ?/) |
| 765 | (substring r 0 (1- (length r))) | 765 | (substring r 0 (1- (length r))) |
| 766 | r))) | 766 | r))) |
| 767 | (if above-cutoff | 767 | (if above-cutoff |
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index 5bdb1fb25eb..ec83e33b10d 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; autoconf.el --- mode for editing Autoconf configure.in files | 1 | ;;; autoconf.el --- mode for editing Autoconf configure.in files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Love <fx@gnu.org> | 5 | ;; Author: Dave Love <fx@gnu.org> |
| 6 | ;; Keywords: languages | 6 | ;; Keywords: languages |
| @@ -49,7 +49,7 @@ | |||
| 49 | "AC_\\(SUBST\\|DEFINE\\(_UNQUOTED\\)?\\)(\\(\\sw+\\)") | 49 | "AC_\\(SUBST\\|DEFINE\\(_UNQUOTED\\)?\\)(\\(\\sw+\\)") |
| 50 | 50 | ||
| 51 | (defvar autoconf-font-lock-keywords | 51 | (defvar autoconf-font-lock-keywords |
| 52 | `(("A[CHM]_\\sw+" . font-lock-keyword-face) | 52 | `(("A[CHMS]_\\sw+" . font-lock-keyword-face) |
| 53 | (,autoconf-definition-regexp | 53 | (,autoconf-definition-regexp |
| 54 | 3 font-lock-function-name-face) | 54 | 3 font-lock-function-name-face) |
| 55 | ;; Are any other M4 keywords really appropriate for configure.in, | 55 | ;; Are any other M4 keywords really appropriate for configure.in, |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0dc73e96664..223455e9872 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -181,6 +181,16 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 181 | (epc | 181 | (epc |
| 182 | "^Error [0-9]+ at (\\([0-9]+\\):\\([^)\n]+\\))" 2 1) | 182 | "^Error [0-9]+ at (\\([0-9]+\\):\\([^)\n]+\\))" 2 1) |
| 183 | 183 | ||
| 184 | (ftnchek-file | ||
| 185 | "^File \\(.+\\.f\\):$" | ||
| 186 | 1 nil nil 0) | ||
| 187 | (ftnchek-line-file | ||
| 188 | "\\(^Warning .* \\)?line \\([0-9]+\\)\\(?: col \\([0-9]+\\)\\)? file \\(.+\\.f\\)" | ||
| 189 | 4 2 3 (1) nil (1 'default nil t)) | ||
| 190 | (ftnchek-line | ||
| 191 | "\\(?:^\\(Warning\\) .* \\)?line \\([0-9]+\\)\\(?: col \\([0-9]+\\)\\)?" | ||
| 192 | nil 2 3 (1) nil (1 (compilation-face '(1)) nil t)) | ||
| 193 | |||
| 184 | (iar | 194 | (iar |
| 185 | "^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:" | 195 | "^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:" |
| 186 | 1 2 nil (3)) | 196 | 1 2 nil (3)) |
| @@ -191,8 +201,8 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 191 | 201 | ||
| 192 | ;; fixme: should be `mips' | 202 | ;; fixme: should be `mips' |
| 193 | (irix | 203 | (irix |
| 194 | "^[-[:alnum:]_/]+: \\(?:[sS]evere\\|[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\ | 204 | "^[-[:alnum:]_/ ]+: \\(?:\\(?:[sS]evere\\|[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*: \\)?\ |
| 195 | \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2)) | 205 | \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2)) |
| 196 | 206 | ||
| 197 | (java | 207 | (java |
| 198 | "^\\(?:[ \t]+at \\|==[0-9]+== +\\(?:at\\|b\\(y\\)\\)\\).+(\\([^()\n]+\\):\\([0-9]+\\))$" 2 3 nil (1)) | 208 | "^\\(?:[ \t]+at \\|==[0-9]+== +\\(?:at\\|b\\(y\\)\\)\\).+(\\([^()\n]+\\):\\([0-9]+\\))$" 2 3 nil (1)) |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 2cd62eeecee..3ccea967bc5 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -94,7 +94,7 @@ | |||
| 94 | (defun flymake-split-string(str pattern) | 94 | (defun flymake-split-string(str pattern) |
| 95 | (cond | 95 | (cond |
| 96 | ((equal flymake-emacs 'xemacs) (flymake-split-string-remove-empty-edges str pattern)) | 96 | ((equal flymake-emacs 'xemacs) (flymake-split-string-remove-empty-edges str pattern)) |
| 97 | (t (split-string str pattern)) | 97 | (t (flymake-split-string-remove-empty-edges str pattern)) |
| 98 | ) | 98 | ) |
| 99 | ) | 99 | ) |
| 100 | 100 | ||
| @@ -1243,7 +1243,8 @@ Whenether a buffer for master-file-name exists, use it as a source instead of re | |||
| 1243 | (" *\\(\\[javac\\]\\)? *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" | 1243 | (" *\\(\\[javac\\]\\)? *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" |
| 1244 | 2 4 nil 5) | 1244 | 2 4 nil 5) |
| 1245 | ) | 1245 | ) |
| 1246 | compilation-error-regexp-alist) | 1246 | ;; compilation-error-regexp-alist) |
| 1247 | (mapcar (lambda (x) (cdr x)) compilation-error-regexp-alist-alist)) | ||
| 1247 | "patterns for matching error/warning lines, (regexp file-idx line-idx err-text-idx)" | 1248 | "patterns for matching error/warning lines, (regexp file-idx line-idx err-text-idx)" |
| 1248 | ) | 1249 | ) |
| 1249 | ;(defcustom flymake-err-line-patterns | 1250 | ;(defcustom flymake-err-line-patterns |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 64f8808c7f1..1486ec7e5cf 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -25,28 +25,28 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | 27 | ||
| 28 | ;; This mode acts as a graphical user interface to GDB. You can interact with | 28 | ;; This mode acts as a graphical user interface to GDB. You can interact with |
| 29 | ;; GDB through the GUD buffer in the usual way, but there are also further | 29 | ;; GDB through the GUD buffer in the usual way, but there are also further |
| 30 | ;; buffers which control the execution and describe the state of your program. | 30 | ;; buffers which control the execution and describe the state of your program. |
| 31 | ;; It separates the input/output of your program from that of GDB, if | 31 | ;; It separates the input/output of your program from that of GDB, if |
| 32 | ;; required, and watches expressions in the speedbar. It also uses features of | 32 | ;; required, and watches expressions in the speedbar. It also uses features of |
| 33 | ;; Emacs 21 such as the fringe/display margin for breakpoints, and the toolbar | 33 | ;; Emacs 21 such as the fringe/display margin for breakpoints, and the toolbar |
| 34 | ;; (see the GDB Graphical Interface section in the Emacs info manual). | 34 | ;; (see the GDB Graphical Interface section in the Emacs info manual). |
| 35 | 35 | ||
| 36 | ;; Start the debugger with M-x gdba. | 36 | ;; Start the debugger with M-x gdba. |
| 37 | 37 | ||
| 38 | ;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim | 38 | ;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim |
| 39 | ;; Kingdon and uses GDB's annotation interface. You don't need to know about | 39 | ;; Kingdon and uses GDB's annotation interface. You don't need to know about |
| 40 | ;; annotations to use this mode as a debugger, but if you are interested | 40 | ;; annotations to use this mode as a debugger, but if you are interested |
| 41 | ;; developing the mode itself, then see the Annotations section in the GDB | 41 | ;; developing the mode itself, then see the Annotations section in the GDB |
| 42 | ;; info manual. | 42 | ;; info manual. |
| 43 | ;; | 43 | ;; |
| 44 | ;; GDB developers plan to make the annotation interface obsolete. A new | 44 | ;; GDB developers plan to make the annotation interface obsolete. A new |
| 45 | ;; interface called GDB/MI (machine interface) has been designed to replace | 45 | ;; interface called GDB/MI (machine interface) has been designed to replace |
| 46 | ;; it. Some GDB/MI commands are used in this file through the CLI command | 46 | ;; it. Some GDB/MI commands are used in this file through the CLI command |
| 47 | ;; 'interpreter mi <mi-command>'. A file called gdb-mi.el is included in the | 47 | ;; 'interpreter mi <mi-command>'. A file called gdb-mi.el is included in the |
| 48 | ;; GDB repository for future releases (6.2 onwards) that uses GDB/MI as the | 48 | ;; GDB repository for future releases (6.2 onwards) that uses GDB/MI as the |
| 49 | ;; primary interface to GDB. It is still under development and is part of a | 49 | ;; primary interface to GDB. It is still under development and is part of a |
| 50 | ;; process to migrate Emacs from annotations to GDB/MI. | 50 | ;; process to migrate Emacs from annotations to GDB/MI. |
| 51 | ;; | 51 | ;; |
| 52 | ;; Known Bugs: | 52 | ;; Known Bugs: |
| @@ -63,7 +63,7 @@ | |||
| 63 | (defvar gdb-current-language nil) | 63 | (defvar gdb-current-language nil) |
| 64 | (defvar gdb-view-source t "Non-nil means that source code can be viewed.") | 64 | (defvar gdb-view-source t "Non-nil means that source code can be viewed.") |
| 65 | (defvar gdb-selected-view 'source "Code type that user wishes to view.") | 65 | (defvar gdb-selected-view 'source "Code type that user wishes to view.") |
| 66 | (defvar gdb-var-list nil "List of variables in watch window") | 66 | (defvar gdb-var-list nil "List of variables in watch window.") |
| 67 | (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") | 67 | (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") |
| 68 | (defvar gdb-buffer-type nil) | 68 | (defvar gdb-buffer-type nil) |
| 69 | (defvar gdb-overlay-arrow-position nil) | 69 | (defvar gdb-overlay-arrow-position nil) |
| @@ -85,12 +85,12 @@ other with the source file with the main routine of the inferior. | |||
| 85 | If `gdb-many-windows' is t, regardless of the value of | 85 | If `gdb-many-windows' is t, regardless of the value of |
| 86 | `gdb-show-main', the layout below will appear unless | 86 | `gdb-show-main', the layout below will appear unless |
| 87 | `gdb-use-inferior-io-buffer' is nil when the source buffer | 87 | `gdb-use-inferior-io-buffer' is nil when the source buffer |
| 88 | occupies the full width of the frame. Keybindings are given in | 88 | occupies the full width of the frame. Keybindings are given in |
| 89 | relevant buffer. | 89 | relevant buffer. |
| 90 | 90 | ||
| 91 | Watch expressions appear in the speedbar/slowbar. | 91 | Watch expressions appear in the speedbar/slowbar. |
| 92 | 92 | ||
| 93 | The following interactive lisp functions help control operation : | 93 | The following commands help control operation : |
| 94 | 94 | ||
| 95 | `gdb-many-windows' - Toggle the number of windows gdb uses. | 95 | `gdb-many-windows' - Toggle the number of windows gdb uses. |
| 96 | `gdb-restore-windows' - To restore the window layout. | 96 | `gdb-restore-windows' - To restore the window layout. |
| @@ -120,8 +120,7 @@ detailed description of this mode. | |||
| 120 | RET gdb-frames-select | SPC gdb-toggle-breakpoint | 120 | RET gdb-frames-select | SPC gdb-toggle-breakpoint |
| 121 | | RET gdb-goto-breakpoint | 121 | | RET gdb-goto-breakpoint |
| 122 | | d gdb-delete-breakpoint | 122 | | d gdb-delete-breakpoint |
| 123 | --------------------------------------------------------------------- | 123 | ---------------------------------------------------------------------" |
| 124 | " | ||
| 125 | ;; | 124 | ;; |
| 126 | (interactive (list (gud-query-cmdline 'gdba))) | 125 | (interactive (list (gud-query-cmdline 'gdba))) |
| 127 | ;; | 126 | ;; |
| @@ -210,8 +209,7 @@ detailed description of this mode. | |||
| 210 | (run-hooks 'gdba-mode-hook)) | 209 | (run-hooks 'gdba-mode-hook)) |
| 211 | 210 | ||
| 212 | (defcustom gdb-use-colon-colon-notation nil | 211 | (defcustom gdb-use-colon-colon-notation nil |
| 213 | "Non-nil means use FUNCTION::VARIABLE format to display variables in the | 212 | "If non-nil use FUN::VAR format to display variables in the speedbar." ; |
| 214 | speedbar." | ||
| 215 | :type 'boolean | 213 | :type 'boolean |
| 216 | :group 'gud) | 214 | :group 'gud) |
| 217 | 215 | ||
| @@ -376,7 +374,7 @@ speedbar." | |||
| 376 | (setq gdb-var-changed t)))))) | 374 | (setq gdb-var-changed t)))))) |
| 377 | 375 | ||
| 378 | (defun gdb-edit-value (text token indent) | 376 | (defun gdb-edit-value (text token indent) |
| 379 | "Assign a value to a variable displayed in the speedbar" | 377 | "Assign a value to a variable displayed in the speedbar." |
| 380 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) | 378 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) |
| 381 | (varnum (cadr var)) (value)) | 379 | (varnum (cadr var)) (value)) |
| 382 | (setq value (read-string "New value: ")) | 380 | (setq value (read-string "New value: ")) |
| @@ -389,8 +387,8 @@ speedbar." | |||
| 389 | 'ignore)))) | 387 | 'ignore)))) |
| 390 | 388 | ||
| 391 | (defcustom gdb-show-changed-values t | 389 | (defcustom gdb-show-changed-values t |
| 392 | "Non-nil means use font-lock-warning-face to display values that have | 390 | "If non-nil highlight values that have recently changed in the speedbar. |
| 393 | recently changed in the speedbar." | 391 | The highlighting is done with `font-lock-warning-face'." |
| 394 | :type 'boolean | 392 | :type 'boolean |
| 395 | :group 'gud) | 393 | :group 'gud) |
| 396 | 394 | ||
| @@ -422,23 +420,23 @@ INDENT is the current indentation depth." | |||
| 422 | "The disposition of the output of the current gdb command. | 420 | "The disposition of the output of the current gdb command. |
| 423 | Possible values are these symbols: | 421 | Possible values are these symbols: |
| 424 | 422 | ||
| 425 | user -- gdb output should be copied to the GUD buffer | 423 | `user' -- gdb output should be copied to the GUD buffer |
| 426 | for the user to see. | 424 | for the user to see. |
| 427 | 425 | ||
| 428 | inferior -- gdb output should be copied to the inferior-io buffer | 426 | `inferior' -- gdb output should be copied to the inferior-io buffer |
| 429 | 427 | ||
| 430 | pre-emacs -- output should be ignored util the post-prompt | 428 | `pre-emacs' -- output should be ignored util the post-prompt |
| 431 | annotation is received. Then the output-sink | 429 | annotation is received. Then the output-sink |
| 432 | becomes:... | 430 | becomes:... |
| 433 | emacs -- output should be collected in the partial-output-buffer | 431 | `emacs' -- output should be collected in the partial-output-buffer |
| 434 | for subsequent processing by a command. This is the | 432 | for subsequent processing by a command. This is the |
| 435 | disposition of output generated by commands that | 433 | disposition of output generated by commands that |
| 436 | gdb mode sends to gdb on its own behalf. | 434 | gdb mode sends to gdb on its own behalf. |
| 437 | post-emacs -- ignore output until the prompt annotation is | 435 | `post-emacs' -- ignore output until the prompt annotation is |
| 438 | received, then go to USER disposition. | 436 | received, then go to USER disposition. |
| 439 | 437 | ||
| 440 | gdba (gdb-ui.el) uses all five values, gdbmi (gdb-mi.el) only two | 438 | gdba (gdb-ui.el) uses all five values, gdbmi (gdb-mi.el) only two |
| 441 | (user and emacs).") | 439 | \(`user' and `emacs').") |
| 442 | 440 | ||
| 443 | (defvar gdb-current-item nil | 441 | (defvar gdb-current-item nil |
| 444 | "The most recent command item sent to gdb.") | 442 | "The most recent command item sent to gdb.") |
| @@ -619,7 +617,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 619 | 617 | ||
| 620 | (defun gdb-send (proc string) | 618 | (defun gdb-send (proc string) |
| 621 | "A comint send filter for gdb. | 619 | "A comint send filter for gdb. |
| 622 | This filter may simply queue output for a later time." | 620 | This filter may simply queue input for a later time." |
| 623 | (if gud-running | 621 | (if gud-running |
| 624 | (process-send-string proc (concat string "\n")) | 622 | (process-send-string proc (concat string "\n")) |
| 625 | (gdb-enqueue-input (concat string "\n")))) | 623 | (gdb-enqueue-input (concat string "\n")))) |
| @@ -705,25 +703,25 @@ This filter may simply queue output for a later time." | |||
| 705 | (setq gdb-current-item item) | 703 | (setq gdb-current-item item) |
| 706 | (with-current-buffer gud-comint-buffer | 704 | (with-current-buffer gud-comint-buffer |
| 707 | (if (eq gud-minor-mode 'gdba) | 705 | (if (eq gud-minor-mode 'gdba) |
| 708 | (progn | 706 | (if (stringp item) |
| 709 | (if (stringp item) | ||
| 710 | (progn | ||
| 711 | (setq gdb-output-sink 'user) | ||
| 712 | (process-send-string (get-buffer-process gud-comint-buffer) item)) | ||
| 713 | (progn | 707 | (progn |
| 714 | (gdb-clear-partial-output) | 708 | (setq gdb-output-sink 'user) |
| 715 | (setq gdb-output-sink 'pre-emacs) | 709 | (process-send-string (get-buffer-process gud-comint-buffer) item)) |
| 716 | (process-send-string (get-buffer-process gud-comint-buffer) | 710 | (progn |
| 717 | (car item))))) | 711 | (gdb-clear-partial-output) |
| 718 | ; case: eq gud-minor-mode 'gdbmi | 712 | (setq gdb-output-sink 'pre-emacs) |
| 713 | (process-send-string (get-buffer-process gud-comint-buffer) | ||
| 714 | (car item)))) | ||
| 715 | ;; case: eq gud-minor-mode 'gdbmi | ||
| 719 | (gdb-clear-partial-output) | 716 | (gdb-clear-partial-output) |
| 720 | (setq gdb-output-sink 'emacs) | 717 | (setq gdb-output-sink 'emacs) |
| 721 | (process-send-string (get-buffer-process gud-comint-buffer) | 718 | (process-send-string (get-buffer-process gud-comint-buffer) |
| 722 | (car item))))) | 719 | (car item))))) |
| 723 | 720 | ||
| 724 | (defun gdb-pre-prompt (ignored) | 721 | (defun gdb-pre-prompt (ignored) |
| 725 | "An annotation handler for `pre-prompt'. This terminates the collection of | 722 | "An annotation handler for `pre-prompt'. |
| 726 | output from a previous command if that happens to be in effect." | 723 | This terminates the collection of output from a previous command if that |
| 724 | happens to be in effect." | ||
| 727 | (let ((sink gdb-output-sink)) | 725 | (let ((sink gdb-output-sink)) |
| 728 | (cond | 726 | (cond |
| 729 | ((eq sink 'user) t) | 727 | ((eq sink 'user) t) |
| @@ -761,8 +759,9 @@ This sends the next command (if any) to gdb." | |||
| 761 | (setq gdb-prompting t)) | 759 | (setq gdb-prompting t)) |
| 762 | 760 | ||
| 763 | (defun gdb-starting (ignored) | 761 | (defun gdb-starting (ignored) |
| 764 | "An annotation handler for `starting'. This says that I/O for the | 762 | "An annotation handler for `starting'. |
| 765 | subprocess is now the program being debugged, not GDB." | 763 | This says that I/O for the subprocess is now the program being debugged, |
| 764 | not GDB." | ||
| 766 | (let ((sink gdb-output-sink)) | 765 | (let ((sink gdb-output-sink)) |
| 767 | (cond | 766 | (cond |
| 768 | ((eq sink 'user) | 767 | ((eq sink 'user) |
| @@ -773,8 +772,9 @@ subprocess is now the program being debugged, not GDB." | |||
| 773 | (t (error "Unexpected `starting' annotation"))))) | 772 | (t (error "Unexpected `starting' annotation"))))) |
| 774 | 773 | ||
| 775 | (defun gdb-stopping (ignored) | 774 | (defun gdb-stopping (ignored) |
| 776 | "An annotation handler for `exited' and other annotations which say that I/O | 775 | "An annotation handler for `exited' and other annotations. |
| 777 | for the subprocess is now GDB, not the program being debugged." | 776 | They say that I/O for the subprocess is now GDB, not the program |
| 777 | being debugged." | ||
| 778 | (if gdb-use-inferior-io-buffer | 778 | (if gdb-use-inferior-io-buffer |
| 779 | (let ((sink gdb-output-sink)) | 779 | (let ((sink gdb-output-sink)) |
| 780 | (cond | 780 | (cond |
| @@ -792,8 +792,9 @@ for the subprocess is now GDB, not the program being debugged." | |||
| 792 | (t (error "Unexpected frame-begin annotation (%S)" sink))))) | 792 | (t (error "Unexpected frame-begin annotation (%S)" sink))))) |
| 793 | 793 | ||
| 794 | (defun gdb-stopped (ignored) | 794 | (defun gdb-stopped (ignored) |
| 795 | "An annotation handler for `stopped'. It is just like gdb-stopping, except | 795 | "An annotation handler for `stopped'. |
| 796 | that if we already set the output sink to 'user in gdb-stopping, that is fine." | 796 | It is just like `gdb-stopping', except that if we already set the output |
| 797 | sink to `user' in `gdb-stopping', that is fine." | ||
| 797 | (setq gud-running nil) | 798 | (setq gud-running nil) |
| 798 | (let ((sink gdb-output-sink)) | 799 | (let ((sink gdb-output-sink)) |
| 799 | (cond | 800 | (cond |
| @@ -803,8 +804,9 @@ that if we already set the output sink to 'user in gdb-stopping, that is fine." | |||
| 803 | (t (error "Unexpected stopped annotation"))))) | 804 | (t (error "Unexpected stopped annotation"))))) |
| 804 | 805 | ||
| 805 | (defun gdb-post-prompt (ignored) | 806 | (defun gdb-post-prompt (ignored) |
| 806 | "An annotation handler for `post-prompt'. This begins the collection of | 807 | "An annotation handler for `post-prompt'. |
| 807 | output from the current command if that happens to be appropriate." | 808 | This begins the collection of output from the current command if that |
| 809 | happens to be appropriate." | ||
| 808 | (if (not gdb-pending-triggers) | 810 | (if (not gdb-pending-triggers) |
| 809 | (progn | 811 | (progn |
| 810 | (gdb-get-current-frame) | 812 | (gdb-get-current-frame) |
| @@ -832,7 +834,7 @@ output from the current command if that happens to be appropriate." | |||
| 832 | (error "Phase error in gdb-post-prompt (got %s)" sink))))) | 834 | (error "Phase error in gdb-post-prompt (got %s)" sink))))) |
| 833 | 835 | ||
| 834 | (defun gud-gdba-marker-filter (string) | 836 | (defun gud-gdba-marker-filter (string) |
| 835 | "A gud marker filter for gdb. Handle a burst of output from GDB." | 837 | "A gud marker filter for gdb. Handle a burst of output from GDB." |
| 836 | (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) | 838 | (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) |
| 837 | ;; Recall the left over gud-marker-acc from last time | 839 | ;; Recall the left over gud-marker-acc from last time |
| 838 | (setq gud-marker-acc (concat gud-marker-acc string)) | 840 | (setq gud-marker-acc (concat gud-marker-acc string)) |
| @@ -1065,10 +1067,10 @@ static char *magick[] = { | |||
| 1065 | "PBM data used for disabled breakpoint icon.") | 1067 | "PBM data used for disabled breakpoint icon.") |
| 1066 | 1068 | ||
| 1067 | (defvar breakpoint-enabled-icon nil | 1069 | (defvar breakpoint-enabled-icon nil |
| 1068 | "Icon for enabled breakpoint in display margin") | 1070 | "Icon for enabled breakpoint in display margin.") |
| 1069 | 1071 | ||
| 1070 | (defvar breakpoint-disabled-icon nil | 1072 | (defvar breakpoint-disabled-icon nil |
| 1071 | "Icon for disabled breakpoint in display margin") | 1073 | "Icon for disabled breakpoint in display margin.") |
| 1072 | 1074 | ||
| 1073 | ;; Bitmap for breakpoint in fringe | 1075 | ;; Bitmap for breakpoint in fringe |
| 1074 | (define-fringe-bitmap 'breakpoint | 1076 | (define-fringe-bitmap 'breakpoint |
| @@ -1133,7 +1135,7 @@ static char *magick[] = { | |||
| 1133 | (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom))) | 1135 | (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom))) |
| 1134 | 1136 | ||
| 1135 | (defun gdb-mouse-toggle-breakpoint (event) | 1137 | (defun gdb-mouse-toggle-breakpoint (event) |
| 1136 | "Toggle breakpoint in left fringe/margin with mouse click" | 1138 | "Toggle breakpoint in left fringe/margin with mouse click." |
| 1137 | (interactive "e") | 1139 | (interactive "e") |
| 1138 | (mouse-minibuffer-check event) | 1140 | (mouse-minibuffer-check event) |
| 1139 | (let ((posn (event-end event))) | 1141 | (let ((posn (event-end event))) |
| @@ -1718,11 +1720,11 @@ static char *magick[] = { | |||
| 1718 | (other-window 1)) | 1720 | (other-window 1)) |
| 1719 | 1721 | ||
| 1720 | (defcustom gdb-many-windows nil | 1722 | (defcustom gdb-many-windows nil |
| 1721 | "Nil (the default value) means just pop up the GUD buffer | 1723 | "Nil means just pop up the GUD buffer unless `gdb-show-main' is t. |
| 1722 | unless `gdb-show-main' is t. In this case it starts with two | 1724 | In this case it starts with two windows: one displaying the GUD |
| 1723 | windows: one displaying the GUD buffer and the other with the | 1725 | buffer and the other with the source file with the main routine |
| 1724 | source file with the main routine of the inferior. Non-nil means | 1726 | of the inferior. Non-nil means display the layout shown for |
| 1725 | display the layout shown for `gdba'." | 1727 | `gdba'." |
| 1726 | :type 'boolean | 1728 | :type 'boolean |
| 1727 | :group 'gud) | 1729 | :group 'gud) |
| 1728 | 1730 | ||
| @@ -1760,8 +1762,8 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 1760 | (other-window 1))) | 1762 | (other-window 1))) |
| 1761 | 1763 | ||
| 1762 | (defun gdb-reset () | 1764 | (defun gdb-reset () |
| 1763 | "Exit a debugging session cleanly by killing the gdb buffers and resetting | 1765 | "Exit a debugging session cleanly. |
| 1764 | the source buffers." | 1766 | Kills the gdb buffers and resets the source buffers." |
| 1765 | (dolist (buffer (buffer-list)) | 1767 | (dolist (buffer (buffer-list)) |
| 1766 | (unless (eq buffer gud-comint-buffer) | 1768 | (unless (eq buffer gud-comint-buffer) |
| 1767 | (with-current-buffer buffer | 1769 | (with-current-buffer buffer |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 4d9e05109a8..71927642a96 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; grep.el --- run compiler as inferior of Emacs, parse error messages | 1 | ;;; grep.el --- run compiler as inferior of Emacs, parse error messages |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 02, 2004 | 3 | ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2001, 2002, 2004 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Roland McGrath <roland@gnu.org> | 6 | ;; Author: Roland McGrath <roland@gnu.org> |
| 7 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -252,21 +252,12 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 252 | \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) | 252 | \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) |
| 253 | ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" | 253 | ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
| 254 | 1 2 | 254 | 1 2 |
| 255 | ;; Calculate column positions (beg . end) of first grep match on a line | ||
| 255 | ((lambda () | 256 | ((lambda () |
| 256 | (setq compilation-error-screen-columns nil) | 257 | (setq compilation-error-screen-columns nil) |
| 257 | (- (match-beginning 5) (match-end 3) 8)) | 258 | (- (match-beginning 5) (match-end 3) 8)) |
| 258 | . | 259 | . |
| 259 | (lambda () (- (match-end 5) (match-end 3) 8))) | 260 | (lambda () (- (match-end 5) (match-end 3) 8)))) |
| 260 | nil nil | ||
| 261 | (4 (list 'face nil 'invisible t 'intangible t)) | ||
| 262 | (5 (list 'face compilation-column-face)) | ||
| 263 | (6 (list 'face nil 'invisible t 'intangible t)) | ||
| 264 | ;; highlight other matches on the same line | ||
| 265 | ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" | ||
| 266 | nil nil | ||
| 267 | (1 (list 'face nil 'invisible t 'intangible t)) | ||
| 268 | (2 (list 'face compilation-column-face) t) | ||
| 269 | (3 (list 'face nil 'invisible t 'intangible t)))) | ||
| 270 | ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) | 261 | ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) |
| 271 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | 262 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
| 272 | 263 | ||
| @@ -294,7 +285,16 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 294 | ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" | 285 | ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" |
| 295 | (0 '(face nil message nil help-echo nil mouse-face nil) t) | 286 | (0 '(face nil message nil help-echo nil mouse-face nil) t) |
| 296 | (1 compilation-warning-face) | 287 | (1 compilation-warning-face) |
| 297 | (2 compilation-line-face))) | 288 | (2 compilation-line-face)) |
| 289 | ;; Highlight grep matches and delete markers | ||
| 290 | ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" | ||
| 291 | (2 compilation-column-face) | ||
| 292 | ((lambda (p)) | ||
| 293 | (progn | ||
| 294 | ;; Delete markers with `replace-match' because it updates | ||
| 295 | ;; the match-data, whereas `delete-region' would render it obsolete. | ||
| 296 | (replace-match "" t t nil 3) | ||
| 297 | (replace-match "" t t nil 1))))) | ||
| 298 | "Additional things to highlight in grep output. | 298 | "Additional things to highlight in grep output. |
| 299 | This gets tacked on the end of the generated expressions.") | 299 | This gets tacked on the end of the generated expressions.") |
| 300 | 300 | ||
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index f047223cbae..b3149500ae5 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el | |||
| @@ -518,8 +518,9 @@ Pending copies are stored in variable `shadow-files-to-copy', and in | |||
| 518 | `shadow-save-buffers-kill-emacs', so it is not usually necessary to | 518 | `shadow-save-buffers-kill-emacs', so it is not usually necessary to |
| 519 | call it manually." | 519 | call it manually." |
| 520 | (interactive "P") | 520 | (interactive "P") |
| 521 | (if (and (not shadow-files-to-copy) (interactive-p)) | 521 | (if (not shadow-files-to-copy) |
| 522 | (message "No files need to be shadowed.") | 522 | (if (interactive-p) |
| 523 | (message "No files need to be shadowed.")) | ||
| 523 | (save-excursion | 524 | (save-excursion |
| 524 | (map-y-or-n-p (function | 525 | (map-y-or-n-p (function |
| 525 | (lambda (pair) | 526 | (lambda (pair) |
diff --git a/lisp/simple.el b/lisp/simple.el index 34215a39c8b..2ce0cc57b15 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1901,13 +1901,13 @@ value passed." | |||
| 1901 | (if fh (apply fh 'process-file program infile buffer display args) | 1901 | (if fh (apply fh 'process-file program infile buffer display args) |
| 1902 | (when infile (setq lc (file-local-copy infile))) | 1902 | (when infile (setq lc (file-local-copy infile))) |
| 1903 | (setq stderr-file (when (and (consp buffer) (stringp (cadr buffer))) | 1903 | (setq stderr-file (when (and (consp buffer) (stringp (cadr buffer))) |
| 1904 | (make-temp-file "emacs")))) | 1904 | (make-temp-file "emacs"))) |
| 1905 | (prog1 | 1905 | (prog1 |
| 1906 | (apply 'call-process program | 1906 | (apply 'call-process program |
| 1907 | (or lc infile) | 1907 | (or lc infile) |
| 1908 | (if stderr-file (list (car buffer) stderr-file) buffer) | 1908 | (if stderr-file (list (car buffer) stderr-file) buffer) |
| 1909 | display args) | 1909 | display args) |
| 1910 | (when stderr-file (copy-file stderr-file (cadr buffer)))) | 1910 | (when stderr-file (copy-file stderr-file (cadr buffer))))) |
| 1911 | (when stderr-file (delete-file stderr-file)) | 1911 | (when stderr-file (delete-file stderr-file)) |
| 1912 | (when lc (delete-file lc))))) | 1912 | (when lc (delete-file lc))))) |
| 1913 | 1913 | ||
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index db16f2f78f3..c182dffdba7 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -354,7 +354,9 @@ Any parameter supported by a frame may be added. The parameter `height' | |||
| 354 | will be initialized to the height of the frame speedbar is | 354 | will be initialized to the height of the frame speedbar is |
| 355 | attached to and added to this list before the new frame is initialized." | 355 | attached to and added to this list before the new frame is initialized." |
| 356 | :group 'speedbar | 356 | :group 'speedbar |
| 357 | :type '(repeat (sexp :tag "Parameter:"))) | 357 | :type '(repeat (cons :format "%v" |
| 358 | (symbol :tag "Parameter") | ||
| 359 | (sexp :tag "Value")))) | ||
| 358 | 360 | ||
| 359 | ;; These values by Hrvoje Niksic <hniksic@srce.hr> | 361 | ;; These values by Hrvoje Niksic <hniksic@srce.hr> |
| 360 | (defcustom speedbar-frame-plist | 362 | (defcustom speedbar-frame-plist |
diff --git a/lisp/strokes.el b/lisp/strokes.el index 57f1e3355b2..f1121d1fee5 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -1746,7 +1746,7 @@ Store XPM in buffer BUFNAME if supplied \(default is ` *strokes-xpm*'\)" | |||
| 1746 | (strokes-mode -1) | 1746 | (strokes-mode -1) |
| 1747 | (remove-hook 'kill-emacs-query-functions 'strokes-prompt-user-save-strokes)) | 1747 | (remove-hook 'kill-emacs-query-functions 'strokes-prompt-user-save-strokes)) |
| 1748 | 1748 | ||
| 1749 | (add-hooks 'strokes-unload-hook 'strokes-unload-hook) | 1749 | (add-hook 'strokes-unload-hook 'strokes-unload-hook) |
| 1750 | 1750 | ||
| 1751 | (run-hooks 'strokes-load-hook) | 1751 | (run-hooks 'strokes-load-hook) |
| 1752 | (provide 'strokes) | 1752 | (provide 'strokes) |
diff --git a/lisp/subr.el b/lisp/subr.el index a06b136b642..621aec8d571 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -817,6 +817,10 @@ is converted into a string by expressing it in decimal." | |||
| 817 | (make-obsolete-variable 'post-command-idle-delay | 817 | (make-obsolete-variable 'post-command-idle-delay |
| 818 | "use timers instead, with `run-with-idle-timer'." "before 19.34") | 818 | "use timers instead, with `run-with-idle-timer'." "before 19.34") |
| 819 | 819 | ||
| 820 | (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) | ||
| 821 | (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4") | ||
| 822 | (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) | ||
| 823 | (make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4") | ||
| 820 | 824 | ||
| 821 | ;;;; Alternate names for functions - these are not being phased out. | 825 | ;;;; Alternate names for functions - these are not being phased out. |
| 822 | 826 | ||
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 62686d026c1..42dcc0f7a26 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el | |||
| @@ -578,7 +578,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. | |||
| 578 | ;; Prevent loss of data when saving the file. | 578 | ;; Prevent loss of data when saving the file. |
| 579 | (set (make-local-variable 'file-precious-flag) t) | 579 | (set (make-local-variable 'file-precious-flag) t) |
| 580 | (auto-save-mode 0) | 580 | (auto-save-mode 0) |
| 581 | (set (make-local-variable 'write-contents-hooks) '(tar-mode-write-file)) | 581 | (set (make-local-variable 'write-contents-functions) '(tar-mode-write-file)) |
| 582 | (widen) | 582 | (widen) |
| 583 | (if (and (boundp 'tar-header-offset) tar-header-offset) | 583 | (if (and (boundp 'tar-header-offset) tar-header-offset) |
| 584 | (narrow-to-region (point-min) (byte-to-position tar-header-offset)) | 584 | (narrow-to-region (point-min) (byte-to-position tar-header-offset)) |
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 6e7b2a9a51c..4ac96b2e4b0 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -453,10 +453,22 @@ Do \\[describe-key] on the following bindings to discover what they do. | |||
| 453 | ;; recognized. | 453 | ;; recognized. |
| 454 | (set (make-local-variable 'comment-start-skip) "\\(?:<!\\)?--[ \t]*") | 454 | (set (make-local-variable 'comment-start-skip) "\\(?:<!\\)?--[ \t]*") |
| 455 | (set (make-local-variable 'comment-end-skip) "[ \t]*--\\([ \t\n]*>\\)?") | 455 | (set (make-local-variable 'comment-end-skip) "[ \t]*--\\([ \t\n]*>\\)?") |
| 456 | ;; This definition probably is not useful in derived modes. | 456 | ;; This definition has an HTML leaning but probably fits well for other modes. |
| 457 | (set (make-local-variable 'imenu-generic-expression) | 457 | (setq imenu-generic-expression |
| 458 | (concat "<!\\(element\\|entity\\)[ \t\n]+%?[ \t\n]*\\(" | 458 | `((nil |
| 459 | sgml-name-re "\\)"))) | 459 | ,(concat "<!\\(element\\|entity\\)[ \t\n]+%?[ \t\n]*\\(" |
| 460 | sgml-name-re "\\)") | ||
| 461 | 2) | ||
| 462 | ("Id" | ||
| 463 | ,(concat "<[^>]+[ \t\n]+[Ii][Dd]=\\(['\"]" | ||
| 464 | (if sgml-xml-mode "" "?") | ||
| 465 | "\\)\\(" sgml-name-re "\\)\\1") | ||
| 466 | 2) | ||
| 467 | ("Name" | ||
| 468 | ,(concat "<[^>]+[ \t\n]+[Nn][Aa][Mm][Ee]=\\(['\"]" | ||
| 469 | (if sgml-xml-mode "" "?") | ||
| 470 | "\\)\\(" sgml-name-re "\\)\\1") | ||
| 471 | 2)))) | ||
| 460 | 472 | ||
| 461 | ;; Some programs (such as Glade 2) generate XML which has | 473 | ;; Some programs (such as Glade 2) generate XML which has |
| 462 | ;; -*- mode: xml -*-. | 474 | ;; -*- mode: xml -*-. |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 5c5e0a4d1c7..cb5bf24badd 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -468,6 +468,10 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 468 | ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) | 468 | ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) |
| 469 | (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) | 469 | (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) |
| 470 | (list | 470 | (list |
| 471 | ;; font-lock-syntactic-keywords causes the \ of \end{verbatim} to be | ||
| 472 | ;; highlighted as tex-verbatim-face. Let's undo that. | ||
| 473 | ;; This is ugly and brittle :-( --Stef | ||
| 474 | '("^\\(\\\\\\)end" (1 (get-text-property (match-end 1) 'face) t)) | ||
| 471 | ;; display $$ math $$ | 475 | ;; display $$ math $$ |
| 472 | ;; We only mark the match between $$ and $$ because the $$ delimiters | 476 | ;; We only mark the match between $$ and $$ because the $$ delimiters |
| 473 | ;; themselves have already been marked (along with $..$) by syntactic | 477 | ;; themselves have already been marked (along with $..$) by syntactic |
| @@ -619,6 +623,8 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 619 | ;; 2 - font-lock considers the preceding \n as being part of the | 623 | ;; 2 - font-lock considers the preceding \n as being part of the |
| 620 | ;; preceding line, so things gets screwed every time the previous | 624 | ;; preceding line, so things gets screwed every time the previous |
| 621 | ;; line is re-font-locked on its own. | 625 | ;; line is re-font-locked on its own. |
| 626 | ;; There's a hack in tex-font-lock-keywords-1 to remove the verbatim | ||
| 627 | ;; face from the \ but C-M-f still jumps to the wrong spot :-( --Stef | ||
| 622 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) | 628 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) |
| 623 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") | 629 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") |
| 624 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") | 630 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") |
diff --git a/lisp/type-break.el b/lisp/type-break.el index 253e1406f06..ec96ab09fe2 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el | |||
| @@ -1005,8 +1005,8 @@ FRAC should be the inverse of the fractional value; for example, a value of | |||
| 1005 | (setcar type-break-keystroke-threshold lower) | 1005 | (setcar type-break-keystroke-threshold lower) |
| 1006 | (setcdr type-break-keystroke-threshold upper) | 1006 | (setcdr type-break-keystroke-threshold upper) |
| 1007 | (if (interactive-p) | 1007 | (if (interactive-p) |
| 1008 | (message "min threshold: %d\tmax threshold: %d" lower upper) | 1008 | (message "min threshold: %d\tmax threshold: %d" lower upper)) |
| 1009 | type-break-keystroke-threshold))) | 1009 | type-break-keystroke-threshold)) |
| 1010 | 1010 | ||
| 1011 | 1011 | ||
| 1012 | ;;; misc functions | 1012 | ;;; misc functions |
| @@ -1103,37 +1103,12 @@ With optional non-nil ALL, force redisplay of all mode-lines." | |||
| 1103 | 1103 | ||
| 1104 | (defun type-break-run-at-time (time repeat function) | 1104 | (defun type-break-run-at-time (time repeat function) |
| 1105 | (condition-case nil (or (require 'timer) (require 'itimer)) (error nil)) | 1105 | (condition-case nil (or (require 'timer) (require 'itimer)) (error nil)) |
| 1106 | (cond ((fboundp 'run-at-time) | 1106 | (run-at-time time repeat function)) |
| 1107 | (run-at-time time repeat function)) | ||
| 1108 | ((fboundp 'start-timer) | ||
| 1109 | (let ((name (if (symbolp function) | ||
| 1110 | (symbol-name function) | ||
| 1111 | "type-break"))) | ||
| 1112 | (start-timer name function time repeat))) | ||
| 1113 | ((fboundp 'start-itimer) | ||
| 1114 | (let ((name (if (symbolp function) | ||
| 1115 | (symbol-name function) | ||
| 1116 | "type-break"))) | ||
| 1117 | (start-itimer name function time repeat))))) | ||
| 1118 | 1107 | ||
| 1119 | (defvar timer-dont-exit) | 1108 | (defvar timer-dont-exit) |
| 1120 | (defun type-break-cancel-function-timers (function) | 1109 | (defun type-break-cancel-function-timers (function) |
| 1121 | (cond ((fboundp 'cancel-function-timers) | 1110 | (let ((timer-dont-exit t)) |
| 1122 | (let ((timer-dont-exit t)) | 1111 | (cancel-function-timers function))) |
| 1123 | (cancel-function-timers function))) | ||
| 1124 | ((fboundp 'delete-timer) | ||
| 1125 | (let ((list timer-list)) | ||
| 1126 | (while list | ||
| 1127 | (and (eq (funcall 'timer-function (car list)) function) | ||
| 1128 | (delete-timer (car list))) | ||
| 1129 | (setq list (cdr list))))) | ||
| 1130 | ((fboundp 'delete-itimer) | ||
| 1131 | (with-no-warnings | ||
| 1132 | (let ((list itimer-list)) | ||
| 1133 | (while list | ||
| 1134 | (and (eq (funcall 'itimer-function (car list)) function) | ||
| 1135 | (delete-itimer (car list))) | ||
| 1136 | (setq list (cdr list)))))))) | ||
| 1137 | 1112 | ||
| 1138 | 1113 | ||
| 1139 | ;;; Demo wrappers | 1114 | ;;; Demo wrappers |
diff --git a/lisp/woman.el b/lisp/woman.el index cea1c61bcc4..610590a2972 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1132,7 +1132,7 @@ Used non-interactively, arguments are optional: if given then TOPIC | |||
| 1132 | should be a topic string and non-nil RE-CACHE forces re-caching." | 1132 | should be a topic string and non-nil RE-CACHE forces re-caching." |
| 1133 | (interactive (list nil current-prefix-arg)) | 1133 | (interactive (list nil current-prefix-arg)) |
| 1134 | ;; The following test is for non-interactive calls via gnudoit etc. | 1134 | ;; The following test is for non-interactive calls via gnudoit etc. |
| 1135 | (if (or (interactive-p) (not (stringp topic)) (string-match "\\S " topic)) | 1135 | (if (or (not (stringp topic)) (string-match "\\S " topic)) |
| 1136 | (let ((file-name (woman-file-name topic re-cache))) | 1136 | (let ((file-name (woman-file-name topic re-cache))) |
| 1137 | (if file-name | 1137 | (if file-name |
| 1138 | (woman-find-file file-name) | 1138 | (woman-find-file file-name) |