diff options
| author | Miles Bader | 2004-12-14 07:34:55 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-12-14 07:34:55 +0000 |
| commit | dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5 (patch) | |
| tree | c3da6c32ac0401833eb29b6a4be9cf93febf248e /lisp | |
| parent | 56cc8ca9b68886dc4aae4c8ef44ad5e62b59db49 (diff) | |
| parent | 734c576596678065b39591128d88609bc6fc5aad (diff) | |
| download | emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.tar.gz emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733
Update from CVS: man/calc.texi: Fix some TeX definitions.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77
Update from CVS
Diffstat (limited to 'lisp')
37 files changed, 1302 insertions, 615 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db884f5af3b..6912fb5d861 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,207 @@ | |||
| 1 | 2004-12-14 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * buff-menu.el (list-buffers-noselect): Collect internal info | ||
| 4 | for every buffer in BUFFER-LIST arg too. | ||
| 5 | (Buffer-menu-switch-other-window): Bind pop-up-windows to t. | ||
| 6 | (Buffer-menu-switch-other-window, Buffer-menu-2-window): | ||
| 7 | Bind same-window-buffer-names and same-window-regexps to nil. | ||
| 8 | |||
| 9 | 2004-12-13 Juri Linkov <juri@jurta.org> | ||
| 10 | |||
| 11 | * simple.el (next-error-buffer-p, next-error-find-buffer): | ||
| 12 | Doc fix. | ||
| 13 | |||
| 14 | * mail/supercite.el (sc-cite-frame-alist): Doc fix. | ||
| 15 | (sc-cite-region, sc-uncite-region, sc-recite-region): | ||
| 16 | Fix previous change to handle not alist as a symbol, but | ||
| 17 | a citation frame as a symbol that represents a variable name. | ||
| 18 | |||
| 19 | 2004-12-13 Richard M. Stallman <rms@gnu.org> | ||
| 20 | |||
| 21 | * filecache.el (file-cache-add-directory-using-find): | ||
| 22 | Only set up file-cache-find-command-posix-flag if we will use it. | ||
| 23 | |||
| 24 | * bindings.el (mode-line-buffer-identification-keymap): | ||
| 25 | Don't cancel the mode-line's usual down-mouse-1 binding. | ||
| 26 | |||
| 27 | * cus-edit.el (custom-face-selected): Handle `default' specs. | ||
| 28 | (custom-face-edit): Increase extra-offset. | ||
| 29 | (custom-display): Handle `default' specs. | ||
| 30 | |||
| 31 | * xml.el (xml-name-re, xml-entity-value-re): Add defvars. | ||
| 32 | |||
| 33 | * emacs-lisp/elint.el (elint-standard-variables) | ||
| 34 | (elint-unknown-builtin-args): Move definitions up. | ||
| 35 | |||
| 36 | * net/browse-url.el (browse-url-url-at-point): Add autoload. | ||
| 37 | |||
| 38 | * info.el (info-xref-visited): Use `default' instead of t. | ||
| 39 | (Info-try-follow-nearest-node): Don't explicitly load browse-url. | ||
| 40 | |||
| 41 | * faces.el (header-line, mode-line-inactive, tool-bar): | ||
| 42 | Use `default' instead of t for setting the defaults. | ||
| 43 | (face-spec-choose): Separate `t' from `default'. | ||
| 44 | |||
| 45 | * subr.el (while-no-input): New macro. | ||
| 46 | |||
| 47 | 2004-12-13 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE> (tiny change) | ||
| 48 | |||
| 49 | * filecache.el (file-cache-add-directory-using-find): | ||
| 50 | Only test file-cache-find-command-posix-flag on some systems. | ||
| 51 | |||
| 52 | 2004-12-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 53 | |||
| 54 | * vc-svn.el (vc-svn-repository-hostname): Adjust to new format. | ||
| 55 | Reported by Ville Skytt,Ad(B <scop@xemacs.org>. | ||
| 56 | (vc-svn-annotate-current-time, vc-svn-annotate-time-of-rev) | ||
| 57 | (vc-svn-annotate-time, vc-svn-annotate-extract-revision-at-line) | ||
| 58 | (vc-svn-annotate-command, vc-svn-annotate-re): Support for svn annotate. | ||
| 59 | |||
| 60 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 61 | |||
| 62 | * files.el (find-file-other-window, find-file-other-frame): | ||
| 63 | Add the first buffer to the returned value to return the complete | ||
| 64 | list of all visited buffers. | ||
| 65 | (find-file-read-only, find-file-read-only-other-window) | ||
| 66 | (find-file-read-only-other-frame): Use nil for `mustmatch' arg of | ||
| 67 | `find-file-read-args'. Signal an error about non-existent file | ||
| 68 | only if file name doesn't contain wildcards. Toggle read-only in | ||
| 69 | all visited buffers. | ||
| 70 | (find-alternate-file, find-alternate-file-other-window): | ||
| 71 | Add optional arg `wildcards'. Doc fix. Set `wildcards' to t when | ||
| 72 | called interactively. Pass arg `wildcards' to other functions. | ||
| 73 | (find-file-noselect): Doc fix. | ||
| 74 | |||
| 75 | * ffap.el (ffap-dired-wildcards): Set default to "[*?][^/]*\\'". | ||
| 76 | Doc fix. | ||
| 77 | (ffap-directory-finder): New variable. | ||
| 78 | (ffap-string-at-point-mode-alist): Add * and ? to `file'. | ||
| 79 | (ffap-file-at-point): Add /* to immediately rejected names. | ||
| 80 | Return absolute file names matching ffap-dired-wildcards. | ||
| 81 | (ffap-read-file-or-url): Set default value for `completing-read' | ||
| 82 | to `buffer-file-name'. | ||
| 83 | (find-file-at-point): When filename matches ffap-dired-wildcards, | ||
| 84 | call ffap-file-finder with t arg `wildcards', instead of dired. | ||
| 85 | (ffap-other-window, ffap-other-frame): Return visited buffers. | ||
| 86 | (ffap-read-only, ffap-read-only-other-window) | ||
| 87 | (ffap-read-only-other-frame, ffap-alternate-file): New commands. | ||
| 88 | (dired-at-point): Call ffap-directory-finder instead of dired. | ||
| 89 | (ffap-dired-other-window, ffap-dired-other-frame) | ||
| 90 | (ffap-list-directory): New commands. | ||
| 91 | (ffap-bindings): New keybindings for new commands. | ||
| 92 | |||
| 93 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 94 | |||
| 95 | * simple.el (beginning-of-buffer, end-of-buffer): | ||
| 96 | * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): | ||
| 97 | Do not push mark when mark is active in transient-mark-mode. | ||
| 98 | |||
| 99 | * simple.el (mark-word): | ||
| 100 | * emacs-lisp/lisp.el (mark-sexp, mark-defun): | ||
| 101 | * textmodes/paragraphs.el (mark-paragraph): | ||
| 102 | Extend the region when mark is active in transient-mark-mode, | ||
| 103 | regardless of the last command. Doc fix. | ||
| 104 | |||
| 105 | * simple.el (mark-word): Preserve direction when repeating. | ||
| 106 | Make arg optional. Interactive "p" -> "P". | ||
| 107 | (transient-mark-mode, inhibit-mark-movement): Doc fix. | ||
| 108 | |||
| 109 | * emacs-lisp/lisp.el (mark-sexp): Reverse the condition for | ||
| 110 | preserving direction, to mark forward instead of backward when mark | ||
| 111 | is equal to point (e.g. when C-SPC C-M-SPC is typed in t-m-m). | ||
| 112 | |||
| 113 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 114 | |||
| 115 | * isearch.el (isearch-edit-string): Set 7th arg of | ||
| 116 | `read-from-minibuffer' to `t' to inherit the current input | ||
| 117 | method (whose name is indicated by [IM] in the minibuffer prompt) | ||
| 118 | from the current buffer to the minibuffer. | ||
| 119 | (isearch-lazy-highlight-update): Put body to `with-local-quit' | ||
| 120 | to allow C-g quitting for lazy highlighting looping inside the | ||
| 121 | search with nested repetition operators. Add overlay to the list | ||
| 122 | before setting its face and other properties to avoid the case of | ||
| 123 | code quitting after placing the new overlay but before it's | ||
| 124 | recorded on the list. Select the window where isearch was | ||
| 125 | activated, to highlight matches in the right window when isearch | ||
| 126 | switches the current window to the minibuffer. | ||
| 127 | |||
| 128 | * international/isearch-x.el | ||
| 129 | (isearch-process-search-multibyte-characters): | ||
| 130 | Use `isearch-message' as initial input for `read-string' instead | ||
| 131 | of adding it to the minibuffer prompt. After reading a string | ||
| 132 | remove the initial value of `isearch-message' from the string. | ||
| 133 | |||
| 134 | * replace.el (replace-match-maybe-edit): Doc fix. | ||
| 135 | (perform-replace): Don't call `replace-highlight' when automatic | ||
| 136 | replacement is requested in literal mode, since it is intended | ||
| 137 | only to highlight words during entering a new replacement string | ||
| 138 | for \? in non-literal mode. | ||
| 139 | |||
| 140 | * replace.el (query-replace-highlight): Add new value `isearch' | ||
| 141 | that allows query replacement to use isearch highlighting. | ||
| 142 | Change type from `boolean' to `choice'. Doc fix. | ||
| 143 | (replace-highlight, replace-dehighlight, perform-replace): | ||
| 144 | Use isearch highlighting if query-replace-highlight eq `isearch'. | ||
| 145 | |||
| 146 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 147 | |||
| 148 | * emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments) | ||
| 149 | (checkdoc-message-text, checkdoc-defun): Fix format messages for `error'. | ||
| 150 | |||
| 151 | * textmodes/tex-mode.el (latex-backward-sexp-1): Handle the special | ||
| 152 | case of \end{verbatim}. | ||
| 153 | |||
| 154 | 2004-12-11 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 155 | |||
| 156 | * term.el (term-termcap-format): Synchronyze with terminfo. | ||
| 157 | (term-emulate-terminal): Handle reset. | ||
| 158 | (term-reset-terminal): New function. | ||
| 159 | |||
| 160 | 2004-12-11 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 161 | |||
| 162 | * play/zone.el (zone-programs): Add `zone-pgm-random-life'. | ||
| 163 | (zone-fill-out-screen): New func. | ||
| 164 | (zone-pgm-drip): Use `zone-fill-out-screen'. | ||
| 165 | Also, no longer go to point-min on every cycle. | ||
| 166 | (zone-pgm-paragraph-spaz): Allow spazzing for texinfo-mode. | ||
| 167 | (zone-pgm-random-life-wait): New user var. | ||
| 168 | (zone-pgm-random-life): New func. | ||
| 169 | |||
| 170 | 2004-12-10 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 171 | |||
| 172 | * files.el (auto-mode-alist): Map .com to DCL mode. | ||
| 173 | |||
| 174 | 2004-12-09 Richard M. Stallman <rms@gnu.org> | ||
| 175 | |||
| 176 | * isearch.el (isearch-mode-map): Treat S-SPC like SPC. | ||
| 177 | |||
| 178 | 2004-12-09 Nick Roberts <nickrob@snap.net.nz> | ||
| 179 | |||
| 180 | * xt-mouse.el (xterm-mouse-event): Correct cursor position in a | ||
| 181 | buffer with a display margin. | ||
| 182 | |||
| 183 | 2004-12-08 Jay Belanger <belanger@truman.edu> | ||
| 184 | |||
| 185 | * calc/calc-keypd.el (calc-keypad-mode): Unbind unused mouse events. | ||
| 186 | (calc-keypad-left-click): Set buffer to calc-keymap-buffer. | ||
| 187 | |||
| 188 | 2004-12-08 Richard M. Stallman <rms@gnu.org> | ||
| 189 | |||
| 190 | * faces.el: Delete code to set display table. | ||
| 191 | (escape-glyph): Redefine to be less loud. (Copy minibuffer-prompt.) | ||
| 192 | |||
| 193 | 2004-12-08 Jay Belanger <belanger@truman.edu> | ||
| 194 | |||
| 195 | * calc/calc.el: Add math-read-preprocess-string to autoloads. | ||
| 196 | |||
| 197 | * calc/calc-ext.el (math-read-replacement-list) | ||
| 198 | (math-read-superscripts, math-read-preprocess-string): Move to | ||
| 199 | calc-aent.el. | ||
| 200 | |||
| 201 | * calc/calc-aent.el (math-read-replacement-list) | ||
| 202 | (math-read-superscripts, math-read-preprocess-string): Move from | ||
| 203 | calc-ext.el. | ||
| 204 | |||
| 1 | 2004-12-07 Stefan Monnier <monnier@iro.umontreal.ca> | 205 | 2004-12-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 206 | ||
| 3 | * isearch.el (isearch-quote-char): Fix up typo in last change. | 207 | * isearch.el (isearch-quote-char): Fix up typo in last change. |
| @@ -10,10 +214,9 @@ | |||
| 10 | * edmacro.el: `edit-kbd-macro' is now bound to `C-x C-k e'. | 214 | * edmacro.el: `edit-kbd-macro' is now bound to `C-x C-k e'. |
| 11 | (edmacro-finish-edit): Further update for keyboard macros that are | 215 | (edmacro-finish-edit): Further update for keyboard macros that are |
| 12 | lambda forms. | 216 | lambda forms. |
| 13 | (edmacro-sanitize-for-string): Correctly remove Meta modifier | 217 | (edmacro-sanitize-for-string): Correctly remove Meta modifier. |
| 14 | (as suggested by Kim Storm). | ||
| 15 | 218 | ||
| 16 | 2004-12-06 Stefan Monnier <monnier@iro.umontreal.ca> | 219 | 2004-12-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 17 | 220 | ||
| 18 | * font-lock.el (font-lock-unfontify-region): Save buffer state. | 221 | * font-lock.el (font-lock-unfontify-region): Save buffer state. |
| 19 | (font-lock-default-unfontify-region): Don't save buffer state any more. | 222 | (font-lock-default-unfontify-region): Don't save buffer state any more. |
| @@ -7853,7 +8056,115 @@ | |||
| 7853 | (compilation-forget-errors): Don't localize already local | 8056 | (compilation-forget-errors): Don't localize already local |
| 7854 | compilation-locs and remove FIXME about refontifying. | 8057 | compilation-locs and remove FIXME about refontifying. |
| 7855 | 8058 | ||
| 7856 | 2004-04-14 | 8059 | 2004-04-14 Kim F. Storm <storm@cua.dk> |
| 8060 | |||
| 8061 | * startup.el (emacs-quick-startup): New defvar (set by -Q). | ||
| 8062 | (command-line): New option -Q. Like -q --no-site-file, but | ||
| 8063 | in addition it also disables menu-bar, tool-bar, scroll-bars, | ||
| 8064 | tool-tips, and the blinking cursor. | ||
| 8065 | (command-line-1): Skip startup screen if -Q. | ||
| 8066 | (fancy-splash-head): Use ":align-to center" prop to center splash image. | ||
| 8067 | |||
| 8068 | * emulation/cua-base.el (cua-read-only-cursor-color) | ||
| 8069 | (cua-overwrite-cursor-color, cua-global-mark-cursor-color): Doc fix. | ||
| 8070 | |||
| 8071 | 2004-04-13 Dave Love <fx@gnu.org> | ||
| 8072 | |||
| 8073 | * progmodes/python.el: Doc fixes. Changes for compiler warnings. | ||
| 8074 | (syntax): Don't require. | ||
| 8075 | (python) <defgroup>: Add :version. | ||
| 8076 | (python-quote-syntax): Re-written. | ||
| 8077 | (inferior-python-mode): Move stuff here from run-python and add | ||
| 8078 | some more. | ||
| 8079 | (python-preoutput-continuation, python-preoutput-result) | ||
| 8080 | (python-dotty-syntax-table): New. | ||
| 8081 | (python-describe-symbol): Use them. | ||
| 8082 | (run-python): Move stuff to inferior-python-mode. Modify code | ||
| 8083 | loaded into Python. | ||
| 8084 | (python-send-region): Use python-proc, python-send-string. | ||
| 8085 | (python-send-string): Send newlines too. Callers changed. | ||
| 8086 | (python-load-file): Re-written. | ||
| 8087 | (python-eldoc-function): New. | ||
| 8088 | (info-look): Don't require. | ||
| 8089 | (python-after-info-look): New. A modified version of former | ||
| 8090 | top-level code for use with eval-after-load. | ||
| 8091 | (python-maybe-jython, python-guess-indent): Use widened buffer. | ||
| 8092 | (python-fill-paragraph): Re-written. | ||
| 8093 | (python-mode): Fix outline-regexp. Set outline-heading-end-regexp, | ||
| 8094 | eldoc-print-current-symbol-info-function. Add to eldoc-mode-hook. | ||
| 8095 | |||
| 8096 | 2004-04-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8097 | |||
| 8098 | * progmodes/python.el (run-python): Use compilation-shell-minor-mode. | ||
| 8099 | Set compilation-error-regexp-alist earlier. | ||
| 8100 | |||
| 8101 | * progmodes/compile.el (compilation-minor-mode-map) | ||
| 8102 | (compilation-shell-minor-mode-map, compile-mouse-goto-error) | ||
| 8103 | (compile-goto-error): Re-merge the mouse and non-mouse commands. | ||
| 8104 | |||
| 8105 | 2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8106 | |||
| 8107 | * progmodes/compile.el (compile-goto-error): Select the buffer/window | ||
| 8108 | corresponding to the event. | ||
| 8109 | |||
| 8110 | 2004-04-12 Joe Buehler <jbuehler@hekiman.com> | ||
| 8111 | |||
| 8112 | * loadup.el: Add cygwin to system-type list, for unexec() support. | ||
| 8113 | |||
| 8114 | 2004-04-12 John Paul Wallington <jpw@gnu.org> | ||
| 8115 | |||
| 8116 | * ibuffer.el (ibuffer-delete-window-on-quit): Remove. | ||
| 8117 | (ibuffer-restore-window-config-on-quit): New variable to replace | ||
| 8118 | `ibuffer-delete-window-on-quit'. Update all references. | ||
| 8119 | (ibuffer-prev-window-config): New variable. | ||
| 8120 | (ibuffer-quit): Restore previous window configuration instead of | ||
| 8121 | deleting window. | ||
| 8122 | (ibuffer): Save window configuration before showing Ibuffer buffer. | ||
| 8123 | |||
| 8124 | * help.el (describe-mode): Doc fix. | ||
| 8125 | |||
| 8126 | 2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8127 | |||
| 8128 | * progmodes/compile.el (compilation-mode-font-lock-keywords): Fix test | ||
| 8129 | not to treat nil as a function. | ||
| 8130 | |||
| 8131 | * vc-arch.el (vc-arch-root): Be a bit more careful. | ||
| 8132 | (vc-arch-register): Save the buffer if we modified it. | ||
| 8133 | (vc-arch-delete-rej-if-obsolete): Save excursion. | ||
| 8134 | (vc-arch-find-file-hook): Use the simpler after-save-hook. | ||
| 8135 | (vc-arch-responsible-p, vc-arch-init-version): New functions. | ||
| 8136 | |||
| 8137 | * net/ldap.el (ldap-search): Use list*. | ||
| 8138 | |||
| 8139 | 2004-04-12 Juri Linkov <juri@jurta.org> | ||
| 8140 | |||
| 8141 | * info.el (Info-follow-reference): Allow multiline reference name. | ||
| 8142 | |||
| 8143 | 2004-04-11 Dave Love <fx@gnu.org> | ||
| 8144 | |||
| 8145 | * emacs-lisp/bytecomp.el (byte-compile-cond): Fix last change. | ||
| 8146 | |||
| 8147 | * progmodes/python.el: New file. | ||
| 8148 | |||
| 8149 | 2004-04-11 Andre Spiegel <spiegel@gnu.org> | ||
| 8150 | |||
| 8151 | * vc-hooks.el (vc-arg-list): Function removed. | ||
| 8152 | (vc-default-workfile-unchanged-p): Use condition-case to check for | ||
| 8153 | backward compatibility. | ||
| 8154 | |||
| 8155 | * vc.el (vc-print-log): Use condition-case to check for backward | ||
| 8156 | compatibility. | ||
| 8157 | |||
| 8158 | 2004-04-11 Juri Linkov <juri@jurta.org> | ||
| 8159 | |||
| 8160 | * dired.el (dired-faces): New defgroup. | ||
| 8161 | (dired-header, dired-mark, dired-marked, dired-flagged) | ||
| 8162 | (dired-warning, dired-directory, dired-symlink, dired-ignored): | ||
| 8163 | New faces. | ||
| 8164 | (dired-header-face, dired-mark-face, dired-marked-face) | ||
| 8165 | (dired-flagged-face, dired-warning-face, dired-directory-face) | ||
| 8166 | (dired-symlink-face, dired-ignored-face): New face variables. | ||
| 8167 | (dired-font-lock-keywords): Use them instead of font-lock faces. | ||
| 7857 | Split the rule for dired marks into 3 separate rules: for marks, | 8168 | Split the rule for dired marks into 3 separate rules: for marks, |
| 7858 | marked file names and flagged file names. | 8169 | marked file names and flagged file names. |
| 7859 | 8170 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index b3459b62ac8..93921c6f982 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -448,7 +448,6 @@ Menu of mode operations in the mode line.") | |||
| 448 | (let ((map (make-sparse-keymap))) | 448 | (let ((map (make-sparse-keymap))) |
| 449 | ;; Bind down- events so that the global keymap won't ``shine | 449 | ;; Bind down- events so that the global keymap won't ``shine |
| 450 | ;; through''. | 450 | ;; through''. |
| 451 | (define-key map [mode-line down-mouse-1] 'ignore) | ||
| 452 | (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer) | 451 | (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer) |
| 453 | (define-key map [header-line down-mouse-1] 'ignore) | 452 | (define-key map [header-line down-mouse-1] 'ignore) |
| 454 | (define-key map [header-line mouse-1] 'mode-line-unbury-buffer) | 453 | (define-key map [header-line mouse-1] 'mode-line-unbury-buffer) |
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 990ab32c9a4..1c3fa704041 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -484,14 +484,19 @@ in the selected frame." | |||
| 484 | "Make the other window select this line's buffer. | 484 | "Make the other window select this line's buffer. |
| 485 | The current window remains selected." | 485 | The current window remains selected." |
| 486 | (interactive) | 486 | (interactive) |
| 487 | (display-buffer (Buffer-menu-buffer t))) | 487 | (let ((pop-up-windows t) |
| 488 | same-window-buffer-names | ||
| 489 | same-window-regexps) | ||
| 490 | (display-buffer (Buffer-menu-buffer t)))) | ||
| 488 | 491 | ||
| 489 | (defun Buffer-menu-2-window () | 492 | (defun Buffer-menu-2-window () |
| 490 | "Select this line's buffer, with previous buffer in second window." | 493 | "Select this line's buffer, with previous buffer in second window." |
| 491 | (interactive) | 494 | (interactive) |
| 492 | (let ((buff (Buffer-menu-buffer t)) | 495 | (let ((buff (Buffer-menu-buffer t)) |
| 493 | (menu (current-buffer)) | 496 | (menu (current-buffer)) |
| 494 | (pop-up-windows t)) | 497 | (pop-up-windows t) |
| 498 | same-window-buffer-names | ||
| 499 | same-window-regexps) | ||
| 495 | (delete-other-windows) | 500 | (delete-other-windows) |
| 496 | (switch-to-buffer (other-buffer)) | 501 | (switch-to-buffer (other-buffer)) |
| 497 | (pop-to-buffer buff) | 502 | (pop-to-buffer buff) |
| @@ -671,8 +676,7 @@ For more information, see the function `buffer-menu'." | |||
| 671 | ;; line with the beginning of the text (rather than with the left | 676 | ;; line with the beginning of the text (rather than with the left |
| 672 | ;; scrollbar or the left fringe). –-Stef | 677 | ;; scrollbar or the left fringe). –-Stef |
| 673 | (setq header (concat (propertize " " 'display '(space :align-to 0)) | 678 | (setq header (concat (propertize " " 'display '(space :align-to 0)) |
| 674 | header)) | 679 | header))) |
| 675 | ) | ||
| 676 | (with-current-buffer (get-buffer-create "*Buffer List*") | 680 | (with-current-buffer (get-buffer-create "*Buffer List*") |
| 677 | (setq buffer-read-only nil) | 681 | (setq buffer-read-only nil) |
| 678 | (erase-buffer) | 682 | (erase-buffer) |
| @@ -684,47 +688,45 @@ For more information, see the function `buffer-menu'." | |||
| 684 | (mapcar (lambda (c) | 688 | (mapcar (lambda (c) |
| 685 | (if (memq c '(?\n ?\ )) c underline)) | 689 | (if (memq c '(?\n ?\ )) c underline)) |
| 686 | header))))) | 690 | header))))) |
| 687 | (if buffer-list | 691 | ;; Collect info for every buffer we're interested in. |
| 688 | (setq list buffer-list) | 692 | (dolist (buffer (or buffer-list (buffer-list))) |
| 689 | ;; Collect info for every buffer we're interested in. | 693 | (with-current-buffer buffer |
| 690 | (dolist (buffer (buffer-list)) | 694 | (let ((name (buffer-name)) |
| 691 | (with-current-buffer buffer | 695 | (file buffer-file-name)) |
| 692 | (let ((name (buffer-name)) | 696 | (unless (and (not buffer-list) |
| 693 | (file buffer-file-name)) | 697 | (or |
| 694 | (cond | 698 | ;; Don't mention internal buffers. |
| 695 | ;; Don't mention internal buffers. | 699 | (and (string= (substring name 0 1) " ") (null file)) |
| 696 | ((and (string= (substring name 0 1) " ") (null file))) | 700 | ;; Maybe don't mention buffers without files. |
| 697 | ;; Maybe don't mention buffers without files. | 701 | (and files-only (not file)) |
| 698 | ((and files-only (not file))) | 702 | (string= name "*Buffer List*"))) |
| 699 | ((string= name "*Buffer List*")) | 703 | ;; Otherwise output info. |
| 700 | ;; Otherwise output info. | 704 | (let ((mode (concat (format-mode-line mode-name nil nil buffer) |
| 701 | (t | 705 | (if mode-line-process |
| 702 | (let ((mode (concat (format-mode-line mode-name nil nil buffer) | 706 | (format-mode-line mode-line-process |
| 703 | (if mode-line-process | 707 | nil nil buffer)))) |
| 704 | (format-mode-line mode-line-process | 708 | (bits (string |
| 705 | nil nil buffer)))) | 709 | (if (eq buffer old-buffer) ?. ?\ ) |
| 706 | (bits (string | 710 | ;; Handle readonly status. The output buffer |
| 707 | (if (eq buffer old-buffer) ?. ?\ ) | 711 | ;; is special cased to appear readonly; it is |
| 708 | ;; Handle readonly status. The output buffer | 712 | ;; actually made so at a later date. |
| 709 | ;; is special cased to appear readonly; it is | 713 | (if (or (eq buffer standard-output) |
| 710 | ;; actually made so at a later date. | 714 | buffer-read-only) |
| 711 | (if (or (eq buffer standard-output) | 715 | ?% ?\ ) |
| 712 | buffer-read-only) | 716 | ;; Identify modified buffers. |
| 713 | ?% ?\ ) | 717 | (if (buffer-modified-p) ?* ?\ ) |
| 714 | ;; Identify modified buffers. | 718 | ;; Space separator. |
| 715 | (if (buffer-modified-p) ?* ?\ ) | 719 | ?\ ))) |
| 716 | ;; Space separator. | 720 | (unless file |
| 717 | ?\ ))) | 721 | ;; No visited file. Check local value of |
| 718 | (unless file | 722 | ;; list-buffers-directory. |
| 719 | ;; No visited file. Check local value of | 723 | (when (and (boundp 'list-buffers-directory) |
| 720 | ;; list-buffers-directory. | 724 | list-buffers-directory) |
| 721 | (when (and (boundp 'list-buffers-directory) | 725 | (setq file list-buffers-directory))) |
| 722 | list-buffers-directory) | 726 | (push (list buffer bits name (buffer-size) mode file) |
| 723 | (setq file list-buffers-directory))) | 727 | list)))))) |
| 724 | (push (list buffer bits name (buffer-size) mode file) | 728 | ;; Preserve the original buffer-list ordering, just in case. |
| 725 | list))))))) | 729 | (setq list (nreverse list)) |
| 726 | ;; Preserve the original buffer-list ordering, just in case. | ||
| 727 | (setq list (nreverse list))) | ||
| 728 | ;; Place the buffers's info in the output buffer, sorted if necessary. | 730 | ;; Place the buffers's info in the output buffer, sorted if necessary. |
| 729 | (dolist (buffer | 731 | (dolist (buffer |
| 730 | (if Buffer-menu-sort-column | 732 | (if Buffer-menu-sort-column |
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 4c62e570349..c062a822e89 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -465,6 +465,73 @@ T means abort and give an error message.") | |||
| 465 | 465 | ||
| 466 | ;;; Algebraic expression parsing. [Public] | 466 | ;;; Algebraic expression parsing. [Public] |
| 467 | 467 | ||
| 468 | (defvar math-read-replacement-list | ||
| 469 | '(;; Misc symbols | ||
| 470 | ("±" "+/-") ; plus or minus | ||
| 471 | ("×" "*") ; multiplication sign | ||
| 472 | ("÷" ":") ; division sign | ||
| 473 | ("−" "-") ; subtraction sign | ||
| 474 | ("∕" "/") ; division sign | ||
| 475 | ("∗" "*") ; asterisk multiplication | ||
| 476 | ("∞" "inf") ; infinity symbol | ||
| 477 | ("≤" "<=") | ||
| 478 | ("≥" ">=") | ||
| 479 | ("≦" "<=") | ||
| 480 | ("≧" ">=") | ||
| 481 | ;; fractions | ||
| 482 | ("¼" "(1:4)") ; 1/4 | ||
| 483 | ("½" "(1:2)") ; 1/2 | ||
| 484 | ("¾" "(3:4)") ; 3/4 | ||
| 485 | ("⅓" "(1:3)") ; 1/3 | ||
| 486 | ("⅔" "(2:3)") ; 2/3 | ||
| 487 | ("⅕" "(1:5)") ; 1/5 | ||
| 488 | ("⅖" "(2:5)") ; 2/5 | ||
| 489 | ("⅗" "(3:5)") ; 3/5 | ||
| 490 | ("⅘" "(4:5)") ; 4/5 | ||
| 491 | ("⅙" "(1:6)") ; 1/6 | ||
| 492 | ("⅚" "(5:6)") ; 5/6 | ||
| 493 | ("⅛" "(1:8)") ; 1/8 | ||
| 494 | ("⅜" "(3:8)") ; 3/8 | ||
| 495 | ("⅝" "(5:8)") ; 5/8 | ||
| 496 | ("⅞" "(7:8)") ; 7/8 | ||
| 497 | ("⅟" "1:") ; 1/... | ||
| 498 | ;; superscripts | ||
| 499 | ("⁰" "0") ; 0 | ||
| 500 | ("¹" "1") ; 1 | ||
| 501 | ("²" "2") ; 2 | ||
| 502 | ("³" "3") ; 3 | ||
| 503 | ("⁴" "4") ; 4 | ||
| 504 | ("⁵" "5") ; 5 | ||
| 505 | ("⁶" "6") ; 6 | ||
| 506 | ("⁷" "7") ; 7 | ||
| 507 | ("⁸" "8") ; 8 | ||
| 508 | ("⁹" "9") ; 9 | ||
| 509 | ("⁺" "+") ; + | ||
| 510 | ("⁻" "-") ; - | ||
| 511 | ("⁽" "(") ; ( | ||
| 512 | ("⁾" ")") ; ) | ||
| 513 | ("ⁿ" "n") ; n | ||
| 514 | ("ⁱ" "i")) ; i | ||
| 515 | "A list whose elements (old new) indicate replacements to make | ||
| 516 | in Calc algebraic input.") | ||
| 517 | |||
| 518 | (defvar math-read-superscripts | ||
| 519 | "⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾ⁿⁱ" ; 0123456789+-()ni | ||
| 520 | "A string consisting of the superscripts allowed by Calc.") | ||
| 521 | |||
| 522 | (defun math-read-preprocess-string (str) | ||
| 523 | "Replace some substrings of STR by Calc equivalents." | ||
| 524 | (setq str | ||
| 525 | (replace-regexp-in-string (concat "[" math-read-superscripts "]+") | ||
| 526 | "^(\\&)" str)) | ||
| 527 | (let ((rep-list math-read-replacement-list)) | ||
| 528 | (while rep-list | ||
| 529 | (setq str | ||
| 530 | (replace-regexp-in-string (nth 0 (car rep-list)) | ||
| 531 | (nth 1 (car rep-list)) str)) | ||
| 532 | (setq rep-list (cdr rep-list)))) | ||
| 533 | str) | ||
| 534 | |||
| 468 | ;; The next few variables are local to math-read-exprs (and math-read-expr | 535 | ;; The next few variables are local to math-read-exprs (and math-read-expr |
| 469 | ;; in calc-ext.el), but are set in functions they call. | 536 | ;; in calc-ext.el), but are set in functions they call. |
| 470 | 537 | ||
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index d308a391a05..89588b4ea74 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -2874,73 +2874,6 @@ calc-kill calc-kill-region calc-yank)))) | |||
| 2874 | 2874 | ||
| 2875 | (defvar math-expr-data) | 2875 | (defvar math-expr-data) |
| 2876 | 2876 | ||
| 2877 | (defvar math-read-replacement-list | ||
| 2878 | '(;; Misc symbols | ||
| 2879 | ("±" "+/-") ; plus or minus | ||
| 2880 | ("×" "*") ; multiplication sign | ||
| 2881 | ("÷" ":") ; division sign | ||
| 2882 | ("−" "-") ; subtraction sign | ||
| 2883 | ("∕" "/") ; division sign | ||
| 2884 | ("∗" "*") ; asterisk multiplication | ||
| 2885 | ("∞" "inf") ; infinity symbol | ||
| 2886 | ("≤" "<=") | ||
| 2887 | ("≥" ">=") | ||
| 2888 | ("≦" "<=") | ||
| 2889 | ("≧" ">=") | ||
| 2890 | ;; fractions | ||
| 2891 | ("¼" "(1:4)") ; 1/4 | ||
| 2892 | ("½" "(1:2)") ; 1/2 | ||
| 2893 | ("¾" "(3:4)") ; 3/4 | ||
| 2894 | ("⅓" "(1:3)") ; 1/3 | ||
| 2895 | ("⅔" "(2:3)") ; 2/3 | ||
| 2896 | ("⅕" "(1:5)") ; 1/5 | ||
| 2897 | ("⅖" "(2:5)") ; 2/5 | ||
| 2898 | ("⅗" "(3:5)") ; 3/5 | ||
| 2899 | ("⅘" "(4:5)") ; 4/5 | ||
| 2900 | ("⅙" "(1:6)") ; 1/6 | ||
| 2901 | ("⅚" "(5:6)") ; 5/6 | ||
| 2902 | ("⅛" "(1:8)") ; 1/8 | ||
| 2903 | ("⅜" "(3:8)") ; 3/8 | ||
| 2904 | ("⅝" "(5:8)") ; 5/8 | ||
| 2905 | ("⅞" "(7:8)") ; 7/8 | ||
| 2906 | ("⅟" "1:") ; 1/... | ||
| 2907 | ;; superscripts | ||
| 2908 | ("⁰" "0") ; 0 | ||
| 2909 | ("¹" "1") ; 1 | ||
| 2910 | ("²" "2") ; 2 | ||
| 2911 | ("³" "3") ; 3 | ||
| 2912 | ("⁴" "4") ; 4 | ||
| 2913 | ("⁵" "5") ; 5 | ||
| 2914 | ("⁶" "6") ; 6 | ||
| 2915 | ("⁷" "7") ; 7 | ||
| 2916 | ("⁸" "8") ; 8 | ||
| 2917 | ("⁹" "9") ; 9 | ||
| 2918 | ("⁺" "+") ; + | ||
| 2919 | ("⁻" "-") ; - | ||
| 2920 | ("⁽" "(") ; ( | ||
| 2921 | ("⁾" ")") ; ) | ||
| 2922 | ("ⁿ" "n") ; n | ||
| 2923 | ("ⁱ" "i")) ; i | ||
| 2924 | "A list whose elements (old new) indicate replacements to make | ||
| 2925 | in Calc algebraic input.") | ||
| 2926 | |||
| 2927 | (defvar math-read-superscripts | ||
| 2928 | "⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾ⁿⁱ" ; 0123456789+-()ni | ||
| 2929 | "A string consisting of the superscripts allowed by Calc.") | ||
| 2930 | |||
| 2931 | (defun math-read-preprocess-string (str) | ||
| 2932 | "Replace some substrings of STR by Calc equivalents." | ||
| 2933 | (setq str | ||
| 2934 | (replace-regexp-in-string (concat "[" math-read-superscripts "]+") | ||
| 2935 | "^(\\&)" str)) | ||
| 2936 | (let ((rep-list math-read-replacement-list)) | ||
| 2937 | (while rep-list | ||
| 2938 | (setq str | ||
| 2939 | (replace-regexp-in-string (nth 0 (car rep-list)) | ||
| 2940 | (nth 1 (car rep-list)) str)) | ||
| 2941 | (setq rep-list (cdr rep-list)))) | ||
| 2942 | str) | ||
| 2943 | |||
| 2944 | (defun math-read-expr (math-exp-str) | 2877 | (defun math-read-expr (math-exp-str) |
| 2945 | (let ((math-exp-pos 0) | 2878 | (let ((math-exp-pos 0) |
| 2946 | (math-exp-old-pos 0) | 2879 | (math-exp-old-pos 0) |
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index e517ac1942b..2c2a0f0f4aa 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el | |||
| @@ -236,9 +236,21 @@ | |||
| 236 | (define-key calc-keypad-mode-map (kbd "RET") 'calc-keypad-press) | 236 | (define-key calc-keypad-mode-map (kbd "RET") 'calc-keypad-press) |
| 237 | (define-key calc-keypad-mode-map (kbd "TAB") 'calc-keypad-menu) | 237 | (define-key calc-keypad-mode-map (kbd "TAB") 'calc-keypad-menu) |
| 238 | (define-key calc-keypad-mode-map "q" 'calc-keypad-off) | 238 | (define-key calc-keypad-mode-map "q" 'calc-keypad-off) |
| 239 | (define-key calc-keypad-mode-map [(mouse-3)] 'calc-keypad-right-click) | 239 | (define-key calc-keypad-mode-map [down-mouse-1] 'ignore) |
| 240 | (define-key calc-keypad-mode-map [(mouse-2)] 'calc-keypad-middle-click) | 240 | (define-key calc-keypad-mode-map [drag-mouse-1] 'ignore) |
| 241 | (define-key calc-keypad-mode-map [(mouse-1)] 'calc-keypad-left-click) | 241 | (define-key calc-keypad-mode-map [double-mouse-1] 'ignore) |
| 242 | (define-key calc-keypad-mode-map [triple-mouse-1] 'ignore) | ||
| 243 | (define-key calc-keypad-mode-map [down-mouse-2] 'ignore) | ||
| 244 | (define-key calc-keypad-mode-map [drag-mouse-2] 'ignore) | ||
| 245 | (define-key calc-keypad-mode-map [double-mouse-2] 'ignore) | ||
| 246 | (define-key calc-keypad-mode-map [triple-mouse-2] 'ignore) | ||
| 247 | (define-key calc-keypad-mode-map [down-mouse-3] 'ignore) | ||
| 248 | (define-key calc-keypad-mode-map [drag-mouse-3] 'ignore) | ||
| 249 | (define-key calc-keypad-mode-map [double-mouse-3] 'ignore) | ||
| 250 | (define-key calc-keypad-mode-map [triple-mouse-3] 'ignore) | ||
| 251 | (define-key calc-keypad-mode-map [mouse-3] 'calc-keypad-right-click) | ||
| 252 | (define-key calc-keypad-mode-map [mouse-2] 'calc-keypad-middle-click) | ||
| 253 | (define-key calc-keypad-mode-map [mouse-1] 'calc-keypad-left-click) | ||
| 242 | (put 'calc-keypad-mode 'mode-class 'special) | 254 | (put 'calc-keypad-mode 'mode-class 'special) |
| 243 | (make-local-variable 'calc-main-buffer)) | 255 | (make-local-variable 'calc-main-buffer)) |
| 244 | 256 | ||
| @@ -529,8 +541,9 @@ | |||
| 529 | (defun calc-keypad-left-click (event) | 541 | (defun calc-keypad-left-click (event) |
| 530 | "Handle a left-button mouse click in Calc Keypad window." | 542 | "Handle a left-button mouse click in Calc Keypad window." |
| 531 | (interactive "e") | 543 | (interactive "e") |
| 532 | (goto-char (posn-point (event-start event))) | 544 | (with-current-buffer calc-keypad-buffer |
| 533 | (calc-keypad-press)) | 545 | (goto-char (posn-point (event-start event))) |
| 546 | (calc-keypad-press))) | ||
| 534 | 547 | ||
| 535 | (defun calc-keypad-right-click (event) | 548 | (defun calc-keypad-right-click (event) |
| 536 | "Handle a right-button mouse click in Calc Keypad window." | 549 | "Handle a right-button mouse click in Calc Keypad window." |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index a7e840594ec..d8e6eb3017c 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -890,7 +890,7 @@ If nil, selections displayed but ignored.") | |||
| 890 | calc-check-user-syntax calc-do-alg-entry calc-do-calc-eval | 890 | calc-check-user-syntax calc-do-alg-entry calc-do-calc-eval |
| 891 | calc-do-quick-calc calc-match-user-syntax math-build-parse-table | 891 | calc-do-quick-calc calc-match-user-syntax math-build-parse-table |
| 892 | math-find-user-tokens math-read-expr-list math-read-exprs math-read-if | 892 | math-find-user-tokens math-read-expr-list math-read-exprs math-read-if |
| 893 | math-read-token math-remove-dashes) | 893 | math-read-token math-remove-dashes math-read-preprocess-string) |
| 894 | 894 | ||
| 895 | ("calc-embed" calc-do-embedded-activate) | 895 | ("calc-embed" calc-do-embedded-activate) |
| 896 | 896 | ||
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 046c1bebcf7..5f3ffc6f8bf 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1561,9 +1561,9 @@ item in another window.\n\n")) | |||
| 1561 | :group 'custom-magic-faces) | 1561 | :group 'custom-magic-faces) |
| 1562 | 1562 | ||
| 1563 | (defface custom-set-face '((((class color)) | 1563 | (defface custom-set-face '((((class color)) |
| 1564 | (:foreground "blue" :background "white")) | 1564 | (:foreground "blue" :background "white")) |
| 1565 | (t | 1565 | (t |
| 1566 | (:slant italic))) | 1566 | (:slant italic))) |
| 1567 | "Face used when the customize item has been set." | 1567 | "Face used when the customize item has been set." |
| 1568 | :group 'custom-magic-faces) | 1568 | :group 'custom-magic-faces) |
| 1569 | 1569 | ||
| @@ -1578,31 +1578,32 @@ item in another window.\n\n")) | |||
| 1578 | "Face used when the customize item has been saved." | 1578 | "Face used when the customize item has been saved." |
| 1579 | :group 'custom-magic-faces) | 1579 | :group 'custom-magic-faces) |
| 1580 | 1580 | ||
| 1581 | (defconst custom-magic-alist '((nil "#" underline "\ | 1581 | (defconst custom-magic-alist |
| 1582 | '((nil "#" underline "\ | ||
| 1582 | uninitialized, you should not see this.") | 1583 | uninitialized, you should not see this.") |
| 1583 | (unknown "?" italic "\ | 1584 | (unknown "?" italic "\ |
| 1584 | unknown, you should not see this.") | 1585 | unknown, you should not see this.") |
| 1585 | (hidden "-" default "\ | 1586 | (hidden "-" default "\ |
| 1586 | hidden, invoke \"Show\" in the previous line to show." "\ | 1587 | hidden, invoke \"Show\" in the previous line to show." "\ |
| 1587 | group now hidden, invoke \"Show\", above, to show contents.") | 1588 | group now hidden, invoke \"Show\", above, to show contents.") |
| 1588 | (invalid "x" custom-invalid-face "\ | 1589 | (invalid "x" custom-invalid-face "\ |
| 1589 | the value displayed for this %c is invalid and cannot be set.") | 1590 | the value displayed for this %c is invalid and cannot be set.") |
| 1590 | (modified "*" custom-modified-face "\ | 1591 | (modified "*" custom-modified-face "\ |
| 1591 | you have edited the value as text, but you have not set the %c." "\ | 1592 | you have edited the value as text, but you have not set the %c." "\ |
| 1592 | you have edited something in this group, but not set it.") | 1593 | you have edited something in this group, but not set it.") |
| 1593 | (set "+" custom-set-face "\ | 1594 | (set "+" custom-set-face "\ |
| 1594 | you have set this %c, but not saved it for future sessions." "\ | 1595 | you have set this %c, but not saved it for future sessions." "\ |
| 1595 | something in this group has been set, but not saved.") | 1596 | something in this group has been set, but not saved.") |
| 1596 | (changed ":" custom-changed-face "\ | 1597 | (changed ":" custom-changed-face "\ |
| 1597 | this %c has been changed outside the customize buffer." "\ | 1598 | this %c has been changed outside the customize buffer." "\ |
| 1598 | something in this group has been changed outside customize.") | 1599 | something in this group has been changed outside customize.") |
| 1599 | (saved "!" custom-saved-face "\ | 1600 | (saved "!" custom-saved-face "\ |
| 1600 | this %c has been set and saved." "\ | 1601 | this %c has been set and saved." "\ |
| 1601 | something in this group has been set and saved.") | 1602 | something in this group has been set and saved.") |
| 1602 | (rogue "@" custom-rogue-face "\ | 1603 | (rogue "@" custom-rogue-face "\ |
| 1603 | this %c has not been changed with customize." "\ | 1604 | this %c has not been changed with customize." "\ |
| 1604 | something in this group is not prepared for customization.") | 1605 | something in this group is not prepared for customization.") |
| 1605 | (standard " " nil "\ | 1606 | (standard " " nil "\ |
| 1606 | this %c is unchanged from its standard setting." "\ | 1607 | this %c is unchanged from its standard setting." "\ |
| 1607 | visible group members are all at standard settings.")) | 1608 | visible group members are all at standard settings.")) |
| 1608 | "Alist of customize option states. | 1609 | "Alist of customize option states. |
| @@ -2576,7 +2577,7 @@ to switch between two values." | |||
| 2576 | "Edit face attributes." | 2577 | "Edit face attributes." |
| 2577 | :format "%t: %v" | 2578 | :format "%t: %v" |
| 2578 | :tag "Attributes" | 2579 | :tag "Attributes" |
| 2579 | :extra-offset 12 | 2580 | :extra-offset 13 |
| 2580 | :button-args '(:help-echo "Control whether this attribute has any effect.") | 2581 | :button-args '(:help-echo "Control whether this attribute has any effect.") |
| 2581 | :value-to-internal 'custom-face-edit-fix-value | 2582 | :value-to-internal 'custom-face-edit-fix-value |
| 2582 | :match (lambda (widget value) | 2583 | :match (lambda (widget value) |
| @@ -2689,6 +2690,7 @@ Also change :reverse-video to :inverse-video." | |||
| 2689 | :value t | 2690 | :value t |
| 2690 | :help-echo "Specify frames where the face attributes should be used." | 2691 | :help-echo "Specify frames where the face attributes should be used." |
| 2691 | :args '((const :tag "all" t) | 2692 | :args '((const :tag "all" t) |
| 2693 | (const :tag "defaults" default) | ||
| 2692 | (checklist | 2694 | (checklist |
| 2693 | :offset 0 | 2695 | :offset 0 |
| 2694 | :extra-offset 9 | 2696 | :extra-offset 9 |
| @@ -2817,13 +2819,29 @@ Only match frames that support the specified face attributes.") | |||
| 2817 | 2819 | ||
| 2818 | (define-widget 'custom-face-selected 'group | 2820 | (define-widget 'custom-face-selected 'group |
| 2819 | "Edit the attributes of the selected display in a face specification." | 2821 | "Edit the attributes of the selected display in a face specification." |
| 2820 | :args '((repeat :format "" | 2822 | :args '((choice :inline t |
| 2821 | :inline t | 2823 | (group :tag "With Defaults" :inline t |
| 2822 | (group custom-display-unselected sexp)) | 2824 | (group (const :tag "" default) |
| 2823 | (group (sexp :format "") custom-face-edit) | 2825 | (custom-face-edit :tag " Default\n Attributes")) |
| 2824 | (repeat :format "" | 2826 | (repeat :format "" |
| 2825 | :inline t | 2827 | :inline t |
| 2826 | sexp))) | 2828 | (group custom-display-unselected sexp)) |
| 2829 | (group (sexp :format "") | ||
| 2830 | (custom-face-edit :tag " Overriding\n Attributes")) | ||
| 2831 | (repeat :format "" | ||
| 2832 | :inline t | ||
| 2833 | sexp)) | ||
| 2834 | (group :tag "No Defaults" :inline t | ||
| 2835 | (repeat :format "" | ||
| 2836 | :inline t | ||
| 2837 | (group custom-display-unselected sexp)) | ||
| 2838 | (group (sexp :format "") | ||
| 2839 | (custom-face-edit :tag "\n Attributes")) | ||
| 2840 | (repeat :format "" | ||
| 2841 | :inline t | ||
| 2842 | sexp))))) | ||
| 2843 | |||
| 2844 | |||
| 2827 | 2845 | ||
| 2828 | (defconst custom-face-selected (widget-convert 'custom-face-selected) | 2846 | (defconst custom-face-selected (widget-convert 'custom-face-selected) |
| 2829 | "Converted version of the `custom-face-selected' widget.") | 2847 | "Converted version of the `custom-face-selected' widget.") |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index cc2be890657..7b022e9f118 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -919,7 +919,7 @@ is the starting location. If this is nil, `point-min' is used instead." | |||
| 919 | (progn | 919 | (progn |
| 920 | (goto-char wrong) | 920 | (goto-char wrong) |
| 921 | (if (not take-notes) | 921 | (if (not take-notes) |
| 922 | (error (checkdoc-error-text msg))))) | 922 | (error "%s" (checkdoc-error-text msg))))) |
| 923 | (checkdoc-show-diagnostics) | 923 | (checkdoc-show-diagnostics) |
| 924 | (if (interactive-p) | 924 | (if (interactive-p) |
| 925 | (message "No style warnings.")))) | 925 | (message "No style warnings.")))) |
| @@ -952,7 +952,7 @@ if there is one." | |||
| 952 | (e (checkdoc-file-comments-engine)) | 952 | (e (checkdoc-file-comments-engine)) |
| 953 | (checkdoc-generate-compile-warnings-flag | 953 | (checkdoc-generate-compile-warnings-flag |
| 954 | (or take-notes checkdoc-generate-compile-warnings-flag))) | 954 | (or take-notes checkdoc-generate-compile-warnings-flag))) |
| 955 | (if e (error (checkdoc-error-text e))) | 955 | (if e (error "%s" (checkdoc-error-text e))) |
| 956 | (checkdoc-show-diagnostics) | 956 | (checkdoc-show-diagnostics) |
| 957 | e)) | 957 | e)) |
| 958 | 958 | ||
| @@ -990,7 +990,7 @@ Optional argument TAKE-NOTES causes all errors to be logged." | |||
| 990 | (if (not (interactive-p)) | 990 | (if (not (interactive-p)) |
| 991 | e | 991 | e |
| 992 | (if e | 992 | (if e |
| 993 | (error (checkdoc-error-text e)) | 993 | (error "%s" (checkdoc-error-text e)) |
| 994 | (checkdoc-show-diagnostics))) | 994 | (checkdoc-show-diagnostics))) |
| 995 | (goto-char p)) | 995 | (goto-char p)) |
| 996 | (if (interactive-p) (message "Checking interactive message text...done."))) | 996 | (if (interactive-p) (message "Checking interactive message text...done."))) |
| @@ -1033,15 +1033,15 @@ space at the end of each line." | |||
| 1033 | (msg (checkdoc-this-string-valid))) | 1033 | (msg (checkdoc-this-string-valid))) |
| 1034 | (if msg (if no-error | 1034 | (if msg (if no-error |
| 1035 | (message (checkdoc-error-text msg)) | 1035 | (message (checkdoc-error-text msg)) |
| 1036 | (error (checkdoc-error-text msg))) | 1036 | (error "%s" (checkdoc-error-text msg))) |
| 1037 | (setq msg (checkdoc-message-text-search beg end)) | 1037 | (setq msg (checkdoc-message-text-search beg end)) |
| 1038 | (if msg (if no-error | 1038 | (if msg (if no-error |
| 1039 | (message (checkdoc-error-text msg)) | 1039 | (message (checkdoc-error-text msg)) |
| 1040 | (error (checkdoc-error-text msg))) | 1040 | (error "%s" (checkdoc-error-text msg))) |
| 1041 | (setq msg (checkdoc-rogue-space-check-engine beg end)) | 1041 | (setq msg (checkdoc-rogue-space-check-engine beg end)) |
| 1042 | (if msg (if no-error | 1042 | (if msg (if no-error |
| 1043 | (message (checkdoc-error-text msg)) | 1043 | (message (checkdoc-error-text msg)) |
| 1044 | (error (checkdoc-error-text msg)))))) | 1044 | (error "%s" (checkdoc-error-text msg)))))) |
| 1045 | (if (interactive-p) (message "Checkdoc: done.")))))) | 1045 | (if (interactive-p) (message "Checkdoc: done.")))))) |
| 1046 | 1046 | ||
| 1047 | ;;; Ispell interface for forcing a spell check | 1047 | ;;; Ispell interface for forcing a spell check |
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index bf9c1d39f95..9454bfc9da3 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el | |||
| @@ -50,6 +50,85 @@ | |||
| 50 | "*The buffer to insert lint messages in.") | 50 | "*The buffer to insert lint messages in.") |
| 51 | 51 | ||
| 52 | ;;; | 52 | ;;; |
| 53 | ;;; Data | ||
| 54 | ;;; | ||
| 55 | |||
| 56 | (defconst elint-standard-variables | ||
| 57 | '(abbrev-mode auto-fill-function buffer-auto-save-file-name | ||
| 58 | buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format | ||
| 59 | buffer-file-name buffer-file-number buffer-file-truename | ||
| 60 | buffer-file-type buffer-invisibility-spec buffer-offer-save | ||
| 61 | buffer-read-only buffer-saved-size buffer-undo-list | ||
| 62 | cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column | ||
| 63 | default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column | ||
| 64 | header-line-format indicate-buffer-boundaries indicate-empty-lines | ||
| 65 | left-fringe-width | ||
| 66 | left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode | ||
| 67 | mark-active mark-ring mode-line-buffer-identification | ||
| 68 | mode-line-format mode-line-modified mode-line-process mode-name | ||
| 69 | overwrite-mode | ||
| 70 | point-before-scroll right-fringe-width right-margin-width | ||
| 71 | scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display | ||
| 72 | selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) | ||
| 73 | "Standard buffer local vars.") | ||
| 74 | |||
| 75 | (defconst elint-unknown-builtin-args | ||
| 76 | '((while test &rest forms) | ||
| 77 | (insert-before-markers-and-inherit &rest text) | ||
| 78 | (catch tag &rest body) | ||
| 79 | (and &rest args) | ||
| 80 | (funcall func &rest args) | ||
| 81 | (insert &rest args) | ||
| 82 | (vconcat &rest args) | ||
| 83 | (run-hook-with-args hook &rest args) | ||
| 84 | (message-or-box string &rest args) | ||
| 85 | (save-window-excursion &rest body) | ||
| 86 | (append &rest args) | ||
| 87 | (logior &rest args) | ||
| 88 | (progn &rest body) | ||
| 89 | (insert-and-inherit &rest args) | ||
| 90 | (message-box string &rest args) | ||
| 91 | (prog2 x y &rest body) | ||
| 92 | (prog1 first &rest body) | ||
| 93 | (insert-before-markers &rest args) | ||
| 94 | (call-process-region start end program &optional delete | ||
| 95 | destination display &rest args) | ||
| 96 | (concat &rest args) | ||
| 97 | (vector &rest args) | ||
| 98 | (run-hook-with-args-until-success hook &rest args) | ||
| 99 | (track-mouse &rest body) | ||
| 100 | (unwind-protect bodyform &rest unwindforms) | ||
| 101 | (save-restriction &rest body) | ||
| 102 | (quote arg) | ||
| 103 | (make-byte-code &rest args) | ||
| 104 | (or &rest args) | ||
| 105 | (cond &rest clauses) | ||
| 106 | (start-process name buffer program &rest args) | ||
| 107 | (run-hook-with-args-until-failure hook &rest args) | ||
| 108 | (if cond then &rest else) | ||
| 109 | (apply function &rest args) | ||
| 110 | (format string &rest args) | ||
| 111 | (encode-time second minute hour day month year zone &rest args) | ||
| 112 | (min &rest args) | ||
| 113 | (logand &rest args) | ||
| 114 | (logxor &rest args) | ||
| 115 | (max &rest args) | ||
| 116 | (list &rest args) | ||
| 117 | (message string &rest args) | ||
| 118 | (defvar symbol init doc) | ||
| 119 | (call-process program &optional infile destination display &rest args) | ||
| 120 | (with-output-to-temp-buffer bufname &rest body) | ||
| 121 | (nconc &rest args) | ||
| 122 | (save-excursion &rest body) | ||
| 123 | (run-hooks &rest hooks) | ||
| 124 | (/ x y &rest zs) | ||
| 125 | (- x &rest y) | ||
| 126 | (+ &rest args) | ||
| 127 | (* &rest args) | ||
| 128 | (interactive &optional args)) | ||
| 129 | "Those built-ins for which we can't find arguments.") | ||
| 130 | |||
| 131 | ;;; | ||
| 53 | ;;; ADT: top-form | 132 | ;;; ADT: top-form |
| 54 | ;;; | 133 | ;;; |
| 55 | 134 | ||
| @@ -724,85 +803,6 @@ If no documentation could be found args will be `unknown'." | |||
| 724 | (if list list | 803 | (if list list |
| 725 | (elint-find-builtins)))) | 804 | (elint-find-builtins)))) |
| 726 | 805 | ||
| 727 | ;;; | ||
| 728 | ;;; Data | ||
| 729 | ;;; | ||
| 730 | |||
| 731 | (defconst elint-standard-variables | ||
| 732 | '(abbrev-mode auto-fill-function buffer-auto-save-file-name | ||
| 733 | buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format | ||
| 734 | buffer-file-name buffer-file-number buffer-file-truename | ||
| 735 | buffer-file-type buffer-invisibility-spec buffer-offer-save | ||
| 736 | buffer-read-only buffer-saved-size buffer-undo-list | ||
| 737 | cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column | ||
| 738 | default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column | ||
| 739 | header-line-format indicate-buffer-boundaries indicate-empty-lines | ||
| 740 | left-fringe-width | ||
| 741 | left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode | ||
| 742 | mark-active mark-ring mode-line-buffer-identification | ||
| 743 | mode-line-format mode-line-modified mode-line-process mode-name | ||
| 744 | overwrite-mode | ||
| 745 | point-before-scroll right-fringe-width right-margin-width | ||
| 746 | scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display | ||
| 747 | selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) | ||
| 748 | "Standard buffer local vars.") | ||
| 749 | |||
| 750 | (defconst elint-unknown-builtin-args | ||
| 751 | '((while test &rest forms) | ||
| 752 | (insert-before-markers-and-inherit &rest text) | ||
| 753 | (catch tag &rest body) | ||
| 754 | (and &rest args) | ||
| 755 | (funcall func &rest args) | ||
| 756 | (insert &rest args) | ||
| 757 | (vconcat &rest args) | ||
| 758 | (run-hook-with-args hook &rest args) | ||
| 759 | (message-or-box string &rest args) | ||
| 760 | (save-window-excursion &rest body) | ||
| 761 | (append &rest args) | ||
| 762 | (logior &rest args) | ||
| 763 | (progn &rest body) | ||
| 764 | (insert-and-inherit &rest args) | ||
| 765 | (message-box string &rest args) | ||
| 766 | (prog2 x y &rest body) | ||
| 767 | (prog1 first &rest body) | ||
| 768 | (insert-before-markers &rest args) | ||
| 769 | (call-process-region start end program &optional delete | ||
| 770 | destination display &rest args) | ||
| 771 | (concat &rest args) | ||
| 772 | (vector &rest args) | ||
| 773 | (run-hook-with-args-until-success hook &rest args) | ||
| 774 | (track-mouse &rest body) | ||
| 775 | (unwind-protect bodyform &rest unwindforms) | ||
| 776 | (save-restriction &rest body) | ||
| 777 | (quote arg) | ||
| 778 | (make-byte-code &rest args) | ||
| 779 | (or &rest args) | ||
| 780 | (cond &rest clauses) | ||
| 781 | (start-process name buffer program &rest args) | ||
| 782 | (run-hook-with-args-until-failure hook &rest args) | ||
| 783 | (if cond then &rest else) | ||
| 784 | (apply function &rest args) | ||
| 785 | (format string &rest args) | ||
| 786 | (encode-time second minute hour day month year zone &rest args) | ||
| 787 | (min &rest args) | ||
| 788 | (logand &rest args) | ||
| 789 | (logxor &rest args) | ||
| 790 | (max &rest args) | ||
| 791 | (list &rest args) | ||
| 792 | (message string &rest args) | ||
| 793 | (defvar symbol init doc) | ||
| 794 | (call-process program &optional infile destination display &rest args) | ||
| 795 | (with-output-to-temp-buffer bufname &rest body) | ||
| 796 | (nconc &rest args) | ||
| 797 | (save-excursion &rest body) | ||
| 798 | (run-hooks &rest hooks) | ||
| 799 | (/ x y &rest zs) | ||
| 800 | (- x &rest y) | ||
| 801 | (+ &rest args) | ||
| 802 | (* &rest args) | ||
| 803 | (interactive &optional args)) | ||
| 804 | "Those built-ins for which we can't find arguments.") | ||
| 805 | |||
| 806 | (provide 'elint) | 806 | (provide 'elint) |
| 807 | 807 | ||
| 808 | ;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f | 808 | ;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 87b3fcff96c..090f793c700 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -73,17 +73,18 @@ move forward across N balanced expressions." | |||
| 73 | "Set mark ARG sexps from point. | 73 | "Set mark ARG sexps from point. |
| 74 | The place mark goes is the same place \\[forward-sexp] would | 74 | The place mark goes is the same place \\[forward-sexp] would |
| 75 | move to with the same argument. | 75 | move to with the same argument. |
| 76 | If this command is repeated, it marks the next ARG sexps after the ones | 76 | If this command is repeated or mark is active in Transient Mark mode, |
| 77 | already marked." | 77 | it marks the next ARG sexps after the ones already marked." |
| 78 | (interactive "P") | 78 | (interactive "P") |
| 79 | (cond ((and (eq last-command this-command) (mark t)) | 79 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 80 | (and transient-mark-mode mark-active)) | ||
| 80 | (setq arg (if arg (prefix-numeric-value arg) | 81 | (setq arg (if arg (prefix-numeric-value arg) |
| 81 | (if (> (mark) (point)) 1 -1))) | 82 | (if (< (mark) (point)) -1 1))) |
| 82 | (set-mark | 83 | (set-mark |
| 83 | (save-excursion | 84 | (save-excursion |
| 84 | (goto-char (mark)) | 85 | (goto-char (mark)) |
| 85 | (forward-sexp arg) | 86 | (forward-sexp arg) |
| 86 | (point)))) | 87 | (point)))) |
| 87 | (t | 88 | (t |
| 88 | (push-mark | 89 | (push-mark |
| 89 | (save-excursion | 90 | (save-excursion |
| @@ -191,9 +192,11 @@ open-parenthesis, and point ends up at the beginning of the line. | |||
| 191 | If variable `beginning-of-defun-function' is non-nil, its value | 192 | If variable `beginning-of-defun-function' is non-nil, its value |
| 192 | is called as a function to find the defun's beginning." | 193 | is called as a function to find the defun's beginning." |
| 193 | (interactive "p") | 194 | (interactive "p") |
| 194 | (and (eq this-command 'beginning-of-defun) | 195 | (or inhibit-mark-movement |
| 195 | (or inhibit-mark-movement (eq last-command 'beginning-of-defun) | 196 | (not (eq this-command 'beginning-of-defun)) |
| 196 | (push-mark))) | 197 | (eq last-command 'beginning-of-defun) |
| 198 | (and transient-mark-mode mark-active) | ||
| 199 | (push-mark)) | ||
| 197 | (and (beginning-of-defun-raw arg) | 200 | (and (beginning-of-defun-raw arg) |
| 198 | (progn (beginning-of-line) t))) | 201 | (progn (beginning-of-line) t))) |
| 199 | 202 | ||
| @@ -242,9 +245,11 @@ matches the open-parenthesis that starts a defun; see function | |||
| 242 | If variable `end-of-defun-function' is non-nil, its value | 245 | If variable `end-of-defun-function' is non-nil, its value |
| 243 | is called as a function to find the defun's end." | 246 | is called as a function to find the defun's end." |
| 244 | (interactive "p") | 247 | (interactive "p") |
| 245 | (and (eq this-command 'end-of-defun) | 248 | (or inhibit-mark-movement |
| 246 | (or inhibit-mark-movement (eq last-command 'end-of-defun) | 249 | (not (eq this-command 'end-of-defun)) |
| 247 | (push-mark))) | 250 | (eq last-command 'end-of-defun) |
| 251 | (and transient-mark-mode mark-active) | ||
| 252 | (push-mark)) | ||
| 248 | (if (or (null arg) (= arg 0)) (setq arg 1)) | 253 | (if (or (null arg) (= arg 0)) (setq arg 1)) |
| 249 | (if end-of-defun-function | 254 | (if end-of-defun-function |
| 250 | (if (> arg 0) | 255 | (if (> arg 0) |
| @@ -289,10 +294,11 @@ is called as a function to find the defun's end." | |||
| 289 | (defun mark-defun () | 294 | (defun mark-defun () |
| 290 | "Put mark at end of this defun, point at beginning. | 295 | "Put mark at end of this defun, point at beginning. |
| 291 | The defun marked is the one that contains point or follows point. | 296 | The defun marked is the one that contains point or follows point. |
| 292 | If this command is repeated, marks more defuns after the ones | 297 | If this command is repeated or mark is active in Transient Mark mode, |
| 293 | already marked." | 298 | it marks more defuns after the ones already marked." |
| 294 | (interactive) | 299 | (interactive) |
| 295 | (cond ((and (eq last-command this-command) (mark t)) | 300 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 301 | (and transient-mark-mode mark-active)) | ||
| 296 | (set-mark | 302 | (set-mark |
| 297 | (save-excursion | 303 | (save-excursion |
| 298 | (goto-char (mark)) | 304 | (goto-char (mark)) |
diff --git a/lisp/faces.el b/lisp/faces.el index 35a2bd71399..5a7c119899d 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1335,21 +1335,29 @@ If SPEC is nil, return nil." | |||
| 1335 | (unless frame | 1335 | (unless frame |
| 1336 | (setq frame (selected-frame))) | 1336 | (setq frame (selected-frame))) |
| 1337 | (let ((tail spec) | 1337 | (let ((tail spec) |
| 1338 | result all) | 1338 | result defaults) |
| 1339 | (while tail | 1339 | (while tail |
| 1340 | (let* ((entry (pop tail)) | 1340 | (let* ((entry (pop tail)) |
| 1341 | (display (car entry)) | 1341 | (display (car entry)) |
| 1342 | (attrs (cdr entry))) | 1342 | (attrs (cdr entry)) |
| 1343 | (when (face-spec-set-match-display display frame) | 1343 | thisval) |
| 1344 | (setq result (if (null (cdr attrs)) ;; was (listp (car attrs)) | 1344 | ;; Get the attributes as actually specified by this alternative. |
| 1345 | ;; Old-style entry, the attribute list is the | 1345 | (setq thisval |
| 1346 | ;; first element. | 1346 | (if (null (cdr attrs)) ;; was (listp (car attrs)) |
| 1347 | (car attrs) | 1347 | ;; Old-style entry, the attribute list is the |
| 1348 | attrs)) | 1348 | ;; first element. |
| 1349 | (if (eq display t) | 1349 | (car attrs) |
| 1350 | (setq all result result nil) | 1350 | attrs)) |
| 1351 | |||
| 1352 | ;; If the condition is `default', that sets the default | ||
| 1353 | ;; for following conditions. | ||
| 1354 | (if (eq display 'default) | ||
| 1355 | (setq defaults thisval) | ||
| 1356 | ;; Otherwise, if it matches, use it. | ||
| 1357 | (when (face-spec-set-match-display display frame) | ||
| 1358 | (setq result thisval) | ||
| 1351 | (setq tail nil))))) | 1359 | (setq tail nil))))) |
| 1352 | (if all (append result all) result))) | 1360 | (if defaults (append result defaults) result))) |
| 1353 | 1361 | ||
| 1354 | 1362 | ||
| 1355 | (defun face-spec-reset-face (face &optional frame) | 1363 | (defun face-spec-reset-face (face &optional frame) |
| @@ -1787,7 +1795,7 @@ created." | |||
| 1787 | :group 'basic-faces) | 1795 | :group 'basic-faces) |
| 1788 | 1796 | ||
| 1789 | (defface mode-line-inactive | 1797 | (defface mode-line-inactive |
| 1790 | '((t | 1798 | '((default |
| 1791 | :inherit mode-line) | 1799 | :inherit mode-line) |
| 1792 | (((type x w32 mac) (background light) (class color)) | 1800 | (((type x w32 mac) (background light) (class color)) |
| 1793 | :weight light | 1801 | :weight light |
| @@ -1807,7 +1815,7 @@ created." | |||
| 1807 | (put 'modeline-inactive 'face-alias 'mode-line-inactive) | 1815 | (put 'modeline-inactive 'face-alias 'mode-line-inactive) |
| 1808 | 1816 | ||
| 1809 | (defface header-line | 1817 | (defface header-line |
| 1810 | '((t | 1818 | '((default |
| 1811 | :inherit mode-line) | 1819 | :inherit mode-line) |
| 1812 | (((type tty)) | 1820 | (((type tty)) |
| 1813 | ;; This used to be `:inverse-video t', but that doesn't look very | 1821 | ;; This used to be `:inverse-video t', but that doesn't look very |
| @@ -1843,7 +1851,7 @@ created." | |||
| 1843 | 1851 | ||
| 1844 | 1852 | ||
| 1845 | (defface tool-bar | 1853 | (defface tool-bar |
| 1846 | '((t | 1854 | '((default |
| 1847 | :box (:line-width 1 :style released-button) | 1855 | :box (:line-width 1 :style released-button) |
| 1848 | :foreground "black") | 1856 | :foreground "black") |
| 1849 | (((type x w32 mac) (class color)) | 1857 | (((type x w32 mac) (class color)) |
| @@ -2022,32 +2030,11 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2022 | :group 'font-lock ; like `show-trailing-whitespace' | 2030 | :group 'font-lock ; like `show-trailing-whitespace' |
| 2023 | :group 'basic-faces) | 2031 | :group 'basic-faces) |
| 2024 | 2032 | ||
| 2025 | 2033 | (defface escape-glyph '((((background dark)) :foreground "cyan") | |
| 2026 | ;; Make escape characters stand out in display | 2034 | (((type pc)) :foreground "magenta") |
| 2027 | 2035 | (t :foreground "dark blue")) | |
| 2028 | (defface escape-glyph | 2036 | "Face for displaying \\ and ^ in multichar glyphs." |
| 2029 | '((t :inherit secondary-selection)) | ||
| 2030 | "Basic face for displaying \\ and ^ in multichar glyphs. | ||
| 2031 | It is also used for ... in ellipses." | ||
| 2032 | :group 'basic-faces) | 2037 | :group 'basic-faces) |
| 2033 | |||
| 2034 | (put 'display-table 'char-table-extra-slots 6) | ||
| 2035 | |||
| 2036 | (or standard-display-table | ||
| 2037 | ;; avoid using autoloaded make-display-table here | ||
| 2038 | (setq standard-display-table (make-char-table 'display-table nil))) | ||
| 2039 | |||
| 2040 | (let* ((face (lsh (face-id 'escape-glyph) 19)) | ||
| 2041 | (backslash (+ face ?\\)) | ||
| 2042 | (dot (+ face ?.))) | ||
| 2043 | (set-char-table-extra-slot standard-display-table 2 backslash) | ||
| 2044 | (aset standard-display-table 2208 (vector backslash ?\s)) | ||
| 2045 | (aset standard-display-table 2221 (vector backslash ?-)) | ||
| 2046 | (set-char-table-extra-slot standard-display-table 3 (+ face ?^)) | ||
| 2047 | (set-char-table-extra-slot standard-display-table 4 (vector dot dot dot))) | ||
| 2048 | |||
| 2049 | |||
| 2050 | |||
| 2051 | 2038 | ||
| 2052 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2039 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2053 | ;;; Manipulating font names. | 2040 | ;;; Manipulating font names. |
diff --git a/lisp/ffap.el b/lisp/ffap.el index dc78bd355be..ab9d223256f 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -42,10 +42,21 @@ | |||
| 42 | ;; | 42 | ;; |
| 43 | ;; ffap-bindings makes the following global key bindings: | 43 | ;; ffap-bindings makes the following global key bindings: |
| 44 | ;; | 44 | ;; |
| 45 | ;; C-x C-f find-file-at-point (abbreviated as ffap) | 45 | ;; C-x C-f find-file-at-point (abbreviated as ffap) |
| 46 | ;; C-x d dired-at-point | 46 | ;; C-x C-r ffap-read-only |
| 47 | ;; C-x 4 f ffap-other-window | 47 | ;; C-x C-v ffap-alternate-file |
| 48 | ;; C-x 5 f ffap-other-frame | 48 | ;; |
| 49 | ;; C-x d dired-at-point | ||
| 50 | ;; C-x C-d ffap-list-directory | ||
| 51 | ;; | ||
| 52 | ;; C-x 4 f ffap-other-window | ||
| 53 | ;; C-x 4 r ffap-read-only-other-window | ||
| 54 | ;; C-x 4 d ffap-dired-other-window | ||
| 55 | ;; | ||
| 56 | ;; C-x 5 f ffap-other-frame | ||
| 57 | ;; C-x 5 r ffap-read-only-other-frame | ||
| 58 | ;; C-x 5 d ffap-dired-other-frame | ||
| 59 | ;; | ||
| 49 | ;; S-mouse-3 ffap-at-mouse | 60 | ;; S-mouse-3 ffap-at-mouse |
| 50 | ;; C-S-mouse-3 ffap-menu | 61 | ;; C-S-mouse-3 ffap-menu |
| 51 | ;; | 62 | ;; |
| @@ -202,13 +213,17 @@ Sensible values are nil, \"news\", or \"mailto\"." | |||
| 202 | ;; through this section for features that you like, put an appropriate | 213 | ;; through this section for features that you like, put an appropriate |
| 203 | ;; enabler in your .emacs file. | 214 | ;; enabler in your .emacs file. |
| 204 | 215 | ||
| 205 | (defcustom ffap-dired-wildcards nil | 216 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" |
| 206 | ;; Suggestion from RHOGEE, 07 Jul 1994. Disabled, dired is still | ||
| 207 | ;; available by "C-x C-d <pattern>", and valid filenames may | ||
| 208 | ;; sometimes contain wildcard characters. | ||
| 209 | "*A regexp matching filename wildcard characters, or nil. | 217 | "*A regexp matching filename wildcard characters, or nil. |
| 218 | |||
| 210 | If `find-file-at-point' gets a filename matching this pattern, | 219 | If `find-file-at-point' gets a filename matching this pattern, |
| 211 | it passes it on to `dired' instead of `find-file'." | 220 | it passes it on to `find-file' with non-nil WILDCARDS argument, |
| 221 | which expands wildcards and visits multiple files. To visit | ||
| 222 | a file whose name contains wildcard characters you can suppress | ||
| 223 | wildcard expansion by setting `find-file-wildcards'. | ||
| 224 | |||
| 225 | If `dired-at-point' gets a filename matching this pattern, | ||
| 226 | it passes it on to `dired'." | ||
| 212 | :type '(choice (const :tag "Disable" nil) | 227 | :type '(choice (const :tag "Disable" nil) |
| 213 | (const :tag "Enable" "[*?][^/]*\\'") | 228 | (const :tag "Enable" "[*?][^/]*\\'") |
| 214 | ;; regexp -- probably not useful | 229 | ;; regexp -- probably not useful |
| @@ -236,6 +251,12 @@ ffap most of the time." | |||
| 236 | :group 'ffap) | 251 | :group 'ffap) |
| 237 | (put 'ffap-file-finder 'risky-local-variable t) | 252 | (put 'ffap-file-finder 'risky-local-variable t) |
| 238 | 253 | ||
| 254 | (defcustom ffap-directory-finder 'dired | ||
| 255 | "*The command called by `dired-at-point' to find a directory." | ||
| 256 | :type 'function | ||
| 257 | :group 'ffap) | ||
| 258 | (put 'ffap-directory-finder 'risky-local-variable t) | ||
| 259 | |||
| 239 | (defcustom ffap-url-fetcher | 260 | (defcustom ffap-url-fetcher |
| 240 | (if (fboundp 'browse-url) | 261 | (if (fboundp 'browse-url) |
| 241 | 'browse-url ; rely on browse-url-browser-function | 262 | 'browse-url ; rely on browse-url-browser-function |
| @@ -939,7 +960,7 @@ If t, `ffap-tex-init' will initialize this when needed.") | |||
| 939 | ;; Slightly controversial decisions: | 960 | ;; Slightly controversial decisions: |
| 940 | ;; * strip trailing "@" and ":" | 961 | ;; * strip trailing "@" and ":" |
| 941 | ;; * no commas (good for latex) | 962 | ;; * no commas (good for latex) |
| 942 | (file "--:$+<>@-Z_a-z~" "<@" "@>;.,!?:") | 963 | (file "--:$+<>@-Z_a-z~*?" "<@" "@>;.,!:") |
| 943 | ;; An url, or maybe a email/news message-id: | 964 | ;; An url, or maybe a email/news message-id: |
| 944 | (url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?") | 965 | (url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?") |
| 945 | ;; Find a string that does *not* contain a colon: | 966 | ;; Find a string that does *not* contain a colon: |
| @@ -1120,8 +1141,8 @@ which may actually result in an url rather than a filename." | |||
| 1120 | (default-directory default-directory)) | 1141 | (default-directory default-directory)) |
| 1121 | (unwind-protect | 1142 | (unwind-protect |
| 1122 | (cond | 1143 | (cond |
| 1123 | ;; Immediate rejects (/ and // are too common in C++): | 1144 | ;; Immediate rejects (/ and // and /* are too common in C/C++): |
| 1124 | ((member name '("" "/" "//" ".")) nil) | 1145 | ((member name '("" "/" "//" "/*" ".")) nil) |
| 1125 | ;; Immediately test local filenames. If default-directory is | 1146 | ;; Immediately test local filenames. If default-directory is |
| 1126 | ;; remote, you probably already have a connection. | 1147 | ;; remote, you probably already have a connection. |
| 1127 | ((and (not abs) (ffap-file-exists-string name))) | 1148 | ((and (not abs) (ffap-file-exists-string name))) |
| @@ -1187,6 +1208,12 @@ which may actually result in an url rather than a filename." | |||
| 1187 | remote-dir (substring name (match-end 1))))) | 1208 | remote-dir (substring name (match-end 1))))) |
| 1188 | (ffap-file-exists-string | 1209 | (ffap-file-exists-string |
| 1189 | (ffap-replace-file-component remote-dir name)))))) | 1210 | (ffap-replace-file-component remote-dir name)))))) |
| 1211 | ((and ffap-dired-wildcards | ||
| 1212 | (string-match ffap-dired-wildcards name) | ||
| 1213 | abs | ||
| 1214 | (ffap-file-exists-string (file-name-directory | ||
| 1215 | (directory-file-name name))) | ||
| 1216 | name)) | ||
| 1190 | ;; Try all parent directories by deleting the trailing directory | 1217 | ;; Try all parent directories by deleting the trailing directory |
| 1191 | ;; name until existing directory is found or name stops changing | 1218 | ;; name until existing directory is found or name stops changing |
| 1192 | ((let ((dir name)) | 1219 | ((let ((dir name)) |
| @@ -1227,7 +1254,9 @@ which may actually result in an url rather than a filename." | |||
| 1227 | dir | 1254 | dir |
| 1228 | nil | 1255 | nil |
| 1229 | (if dir (cons guess (length dir)) guess) | 1256 | (if dir (cons guess (length dir)) guess) |
| 1230 | (list 'file-name-history)))) | 1257 | (list 'file-name-history) |
| 1258 | (and buffer-file-name | ||
| 1259 | (abbreviate-file-name buffer-file-name))))) | ||
| 1231 | ;; Do file substitution like (interactive "F"), suggested by MCOOK. | 1260 | ;; Do file substitution like (interactive "F"), suggested by MCOOK. |
| 1232 | (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) | 1261 | (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) |
| 1233 | ;; Should not do it on url's, where $ is a common (VMS?) character. | 1262 | ;; Should not do it on url's, where $ is a common (VMS?) character. |
| @@ -1357,10 +1386,12 @@ See <ftp://ftp.mathcs.emory.edu/pub/mic/emacs/> for latest version." | |||
| 1357 | ((ffap-url-p filename) | 1386 | ((ffap-url-p filename) |
| 1358 | (let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC | 1387 | (let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC |
| 1359 | (funcall ffap-url-fetcher filename))) | 1388 | (funcall ffap-url-fetcher filename))) |
| 1360 | ;; This junk more properly belongs in a modified ffap-file-finder: | ||
| 1361 | ((and ffap-dired-wildcards | 1389 | ((and ffap-dired-wildcards |
| 1362 | (string-match ffap-dired-wildcards filename)) | 1390 | (string-match ffap-dired-wildcards filename) |
| 1363 | (dired filename)) | 1391 | find-file-wildcards |
| 1392 | ;; Check if it's find-file that supports wildcards arg | ||
| 1393 | (memq ffap-file-finder '(find-file find-alternate-file))) | ||
| 1394 | (funcall ffap-file-finder (expand-file-name filename) t)) | ||
| 1364 | ((or (not ffap-newfile-prompt) | 1395 | ((or (not ffap-newfile-prompt) |
| 1365 | (file-exists-p filename) | 1396 | (file-exists-p filename) |
| 1366 | (y-or-n-p "File does not exist, create buffer? ")) | 1397 | (y-or-n-p "File does not exist, create buffer? ")) |
| @@ -1556,9 +1587,7 @@ Return value: | |||
| 1556 | ))) | 1587 | ))) |
| 1557 | 1588 | ||
| 1558 | 1589 | ||
| 1559 | ;;; ffap-other-* commands: | 1590 | ;;; ffap-other-*, ffap-read-only-*, ffap-alternate-* commands: |
| 1560 | ;; | ||
| 1561 | ;; Requested by KPC. | ||
| 1562 | 1591 | ||
| 1563 | ;; There could be a real `ffap-noselect' function, but we would need | 1592 | ;; There could be a real `ffap-noselect' function, but we would need |
| 1564 | ;; at least two new user variables, and there is no w3-fetch-noselect. | 1593 | ;; at least two new user variables, and there is no w3-fetch-noselect. |
| @@ -1568,23 +1597,70 @@ Return value: | |||
| 1568 | "Like `ffap', but put buffer in another window. | 1597 | "Like `ffap', but put buffer in another window. |
| 1569 | Only intended for interactive use." | 1598 | Only intended for interactive use." |
| 1570 | (interactive) | 1599 | (interactive) |
| 1571 | (switch-to-buffer-other-window | 1600 | (let (value) |
| 1572 | (save-window-excursion (call-interactively 'ffap) (current-buffer)))) | 1601 | (switch-to-buffer-other-window |
| 1602 | (save-window-excursion | ||
| 1603 | (setq value (call-interactively 'ffap)) | ||
| 1604 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1605 | (setq value (current-buffer))) | ||
| 1606 | (current-buffer))) | ||
| 1607 | value)) | ||
| 1573 | 1608 | ||
| 1574 | (defun ffap-other-frame nil | 1609 | (defun ffap-other-frame nil |
| 1575 | "Like `ffap', but put buffer in another frame. | 1610 | "Like `ffap', but put buffer in another frame. |
| 1576 | Only intended for interactive use." | 1611 | Only intended for interactive use." |
| 1577 | (interactive) | 1612 | (interactive) |
| 1578 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): | 1613 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): |
| 1579 | (let* ((win (selected-window)) (wdp (window-dedicated-p win))) | 1614 | (let* ((win (selected-window)) |
| 1615 | (wdp (window-dedicated-p win)) | ||
| 1616 | value) | ||
| 1580 | (unwind-protect | 1617 | (unwind-protect |
| 1581 | (progn | 1618 | (progn |
| 1582 | (set-window-dedicated-p win nil) | 1619 | (set-window-dedicated-p win nil) |
| 1583 | (switch-to-buffer-other-frame | 1620 | (switch-to-buffer-other-frame |
| 1584 | (save-window-excursion | 1621 | (save-window-excursion |
| 1585 | (call-interactively 'ffap) | 1622 | (setq value (call-interactively 'ffap)) |
| 1623 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1624 | (setq value (current-buffer))) | ||
| 1586 | (current-buffer)))) | 1625 | (current-buffer)))) |
| 1587 | (set-window-dedicated-p win wdp)))) | 1626 | (set-window-dedicated-p win wdp)) |
| 1627 | value)) | ||
| 1628 | |||
| 1629 | (defun ffap-read-only () | ||
| 1630 | "Like `ffap', but mark buffer as read-only. | ||
| 1631 | Only intended for interactive use." | ||
| 1632 | (interactive) | ||
| 1633 | (let ((value (call-interactively 'ffap))) | ||
| 1634 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1635 | (setq value (current-buffer))) | ||
| 1636 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1637 | (if (listp value) value (list value))) | ||
| 1638 | value)) | ||
| 1639 | |||
| 1640 | (defun ffap-read-only-other-window () | ||
| 1641 | "Like `ffap', but put buffer in another window and mark as read-only. | ||
| 1642 | Only intended for interactive use." | ||
| 1643 | (interactive) | ||
| 1644 | (let ((value (ffap-other-window))) | ||
| 1645 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1646 | (if (listp value) value (list value))) | ||
| 1647 | value)) | ||
| 1648 | |||
| 1649 | (defun ffap-read-only-other-frame () | ||
| 1650 | "Like `ffap', but put buffer in another frame and mark as read-only. | ||
| 1651 | Only intended for interactive use." | ||
| 1652 | (interactive) | ||
| 1653 | (let ((value (ffap-other-frame))) | ||
| 1654 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1655 | (if (listp value) value (list value))) | ||
| 1656 | value)) | ||
| 1657 | |||
| 1658 | (defun ffap-alternate-file () | ||
| 1659 | "Like `ffap' and `find-alternate-file'. | ||
| 1660 | Only intended for interactive use." | ||
| 1661 | (interactive) | ||
| 1662 | (let ((ffap-file-finder 'find-alternate-file)) | ||
| 1663 | (call-interactively 'ffap))) | ||
| 1588 | 1664 | ||
| 1589 | 1665 | ||
| 1590 | ;;; Bug Reporter: | 1666 | ;;; Bug Reporter: |
| @@ -1665,24 +1741,26 @@ ffap most of the time." | |||
| 1665 | (not current-prefix-arg) | 1741 | (not current-prefix-arg) |
| 1666 | current-prefix-arg)) | 1742 | current-prefix-arg)) |
| 1667 | (let (current-prefix-arg) ; already interpreted | 1743 | (let (current-prefix-arg) ; already interpreted |
| 1668 | (call-interactively 'dired)) | 1744 | (call-interactively ffap-directory-finder)) |
| 1669 | (or filename (setq filename (dired-at-point-prompter))) | 1745 | (or filename (setq filename (dired-at-point-prompter))) |
| 1670 | (cond | 1746 | (cond |
| 1671 | ((ffap-url-p filename) | 1747 | ((ffap-url-p filename) |
| 1672 | (funcall ffap-url-fetcher filename)) | 1748 | (funcall ffap-url-fetcher filename)) |
| 1673 | ((and ffap-dired-wildcards | 1749 | ((and ffap-dired-wildcards |
| 1674 | (string-match ffap-dired-wildcards filename)) | 1750 | (string-match ffap-dired-wildcards filename)) |
| 1675 | (dired filename)) | 1751 | (funcall ffap-directory-finder filename)) |
| 1676 | ((file-exists-p filename) | 1752 | ((file-exists-p filename) |
| 1677 | (if (file-directory-p filename) | 1753 | (if (file-directory-p filename) |
| 1678 | (dired (expand-file-name filename)) | 1754 | (funcall ffap-directory-finder |
| 1679 | (dired (concat (expand-file-name filename) "*")))) | 1755 | (expand-file-name filename)) |
| 1756 | (funcall ffap-directory-finder | ||
| 1757 | (concat (expand-file-name filename) "*")))) | ||
| 1680 | ((and (file-writable-p | 1758 | ((and (file-writable-p |
| 1681 | (or (file-name-directory (directory-file-name filename)) | 1759 | (or (file-name-directory (directory-file-name filename)) |
| 1682 | filename)) | 1760 | filename)) |
| 1683 | (y-or-n-p "Directory does not exist, create it? ")) | 1761 | (y-or-n-p "Directory does not exist, create it? ")) |
| 1684 | (make-directory filename) | 1762 | (make-directory filename) |
| 1685 | (dired filename)) | 1763 | (funcall ffap-directory-finder filename)) |
| 1686 | ((error "No such file or directory `%s'" filename))))) | 1764 | ((error "No such file or directory `%s'" filename))))) |
| 1687 | 1765 | ||
| 1688 | (defun dired-at-point-prompter (&optional guess) | 1766 | (defun dired-at-point-prompter (&optional guess) |
| @@ -1712,16 +1790,66 @@ ffap most of the time." | |||
| 1712 | (and guess (ffap-highlight)))) | 1790 | (and guess (ffap-highlight)))) |
| 1713 | (ffap-highlight t))) | 1791 | (ffap-highlight t))) |
| 1714 | 1792 | ||
| 1793 | ;;; ffap-dired-other-*, ffap-list-directory commands: | ||
| 1794 | |||
| 1795 | (defun ffap-dired-other-window () | ||
| 1796 | "Like `dired-at-point', but put buffer in another window. | ||
| 1797 | Only intended for interactive use." | ||
| 1798 | (interactive) | ||
| 1799 | (let (value) | ||
| 1800 | (switch-to-buffer-other-window | ||
| 1801 | (save-window-excursion | ||
| 1802 | (setq value (call-interactively 'dired-at-point)) | ||
| 1803 | (current-buffer))) | ||
| 1804 | value)) | ||
| 1805 | |||
| 1806 | (defun ffap-dired-other-frame () | ||
| 1807 | "Like `dired-at-point', but put buffer in another frame. | ||
| 1808 | Only intended for interactive use." | ||
| 1809 | (interactive) | ||
| 1810 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): | ||
| 1811 | (let* ((win (selected-window)) | ||
| 1812 | (wdp (window-dedicated-p win)) | ||
| 1813 | value) | ||
| 1814 | (unwind-protect | ||
| 1815 | (progn | ||
| 1816 | (set-window-dedicated-p win nil) | ||
| 1817 | (switch-to-buffer-other-frame | ||
| 1818 | (save-window-excursion | ||
| 1819 | (setq value (call-interactively 'dired-at-point)) | ||
| 1820 | (current-buffer)))) | ||
| 1821 | (set-window-dedicated-p win wdp)) | ||
| 1822 | value)) | ||
| 1823 | |||
| 1824 | (defun ffap-list-directory () | ||
| 1825 | "Like `dired-at-point' and `list-directory'. | ||
| 1826 | Only intended for interactive use." | ||
| 1827 | (interactive) | ||
| 1828 | (let ((ffap-directory-finder 'list-directory)) | ||
| 1829 | (call-interactively 'dired-at-point))) | ||
| 1830 | |||
| 1831 | |||
| 1715 | ;;; Offer default global bindings (`ffap-bindings'): | 1832 | ;;; Offer default global bindings (`ffap-bindings'): |
| 1716 | 1833 | ||
| 1717 | (defvar ffap-bindings | 1834 | (defvar ffap-bindings |
| 1718 | '( | 1835 | '( |
| 1719 | (global-set-key [S-mouse-3] 'ffap-at-mouse) | 1836 | (global-set-key [S-mouse-3] 'ffap-at-mouse) |
| 1720 | (global-set-key [C-S-mouse-3] 'ffap-menu) | 1837 | (global-set-key [C-S-mouse-3] 'ffap-menu) |
| 1838 | |||
| 1721 | (global-set-key "\C-x\C-f" 'find-file-at-point) | 1839 | (global-set-key "\C-x\C-f" 'find-file-at-point) |
| 1840 | (global-set-key "\C-x\C-r" 'ffap-read-only) | ||
| 1841 | (global-set-key "\C-x\C-v" 'ffap-alternate-file) | ||
| 1842 | |||
| 1722 | (global-set-key "\C-x4f" 'ffap-other-window) | 1843 | (global-set-key "\C-x4f" 'ffap-other-window) |
| 1723 | (global-set-key "\C-x5f" 'ffap-other-frame) | 1844 | (global-set-key "\C-x5f" 'ffap-other-frame) |
| 1845 | (global-set-key "\C-x4r" 'ffap-read-only-other-window) | ||
| 1846 | (global-set-key "\C-x5r" 'ffap-read-only-other-frame) | ||
| 1847 | |||
| 1724 | (global-set-key "\C-xd" 'dired-at-point) | 1848 | (global-set-key "\C-xd" 'dired-at-point) |
| 1849 | (global-set-key "\C-x4d" 'ffap-dired-other-window) | ||
| 1850 | (global-set-key "\C-x5d" 'ffap-dired-other-frame) | ||
| 1851 | (global-set-key "\C-x\C-d" 'ffap-list-directory) | ||
| 1852 | |||
| 1725 | (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook) | 1853 | (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook) |
| 1726 | (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook) | 1854 | (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook) |
| 1727 | (add-hook 'vm-mode-hook 'ffap-ro-mode-hook) | 1855 | (add-hook 'vm-mode-hook 'ffap-ro-mode-hook) |
diff --git a/lisp/filecache.el b/lisp/filecache.el index bd0b0f77781..90287ba5eef 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -337,21 +337,20 @@ in each directory, not to the directory list itself." | |||
| 337 | Find is run in DIRECTORY." | 337 | Find is run in DIRECTORY." |
| 338 | (interactive "DAdd files under directory: ") | 338 | (interactive "DAdd files under directory: ") |
| 339 | (let ((dir (expand-file-name directory))) | 339 | (let ((dir (expand-file-name directory))) |
| 340 | (if (eq file-cache-find-command-posix-flag 'not-defined) | 340 | (when (memq system-type '(windows-nt cygwin)) |
| 341 | (setq file-cache-find-command-posix-flag | 341 | (if (eq file-cache-find-command-posix-flag 'not-defined) |
| 342 | (executable-command-find-posix-p file-cache-find-command))) | 342 | (setq file-cache-find-command-posix-flag |
| 343 | (executable-command-find-posix-p file-cache-find-command)))) | ||
| 343 | (set-buffer (get-buffer-create file-cache-buffer)) | 344 | (set-buffer (get-buffer-create file-cache-buffer)) |
| 344 | (erase-buffer) | 345 | (erase-buffer) |
| 345 | (call-process file-cache-find-command nil | 346 | (call-process file-cache-find-command nil |
| 346 | (get-buffer file-cache-buffer) nil | 347 | (get-buffer file-cache-buffer) nil |
| 347 | dir "-name" | 348 | dir "-name" |
| 348 | (cond | 349 | (if (memq system-type '(windows-nt cygwin)) |
| 349 | (file-cache-find-command-posix-flag | 350 | (if file-cache-find-command-posix-flag |
| 350 | "\\*") | 351 | "\\*" |
| 351 | ((eq system-type 'windows-nt) | 352 | "'*'") |
| 352 | "'*'") | 353 | "*") |
| 353 | (t | ||
| 354 | "*")) | ||
| 355 | "-print") | 354 | "-print") |
| 356 | (file-cache-add-from-file-cache-buffer))) | 355 | (file-cache-add-from-file-cache-buffer))) |
| 357 | 356 | ||
diff --git a/lisp/files.el b/lisp/files.el index b1cd0fbf8d0..48c7c9a7489 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -932,8 +932,7 @@ suppress wildcard expansion by setting `find-file-wildcards'. | |||
| 932 | 932 | ||
| 933 | To visit a file without any kind of conversion and without | 933 | To visit a file without any kind of conversion and without |
| 934 | automatically choosing a major mode, use \\[find-file-literally]." | 934 | automatically choosing a major mode, use \\[find-file-literally]." |
| 935 | (interactive | 935 | (interactive (find-file-read-args "Find file: " nil)) |
| 936 | (find-file-read-args "Find file: " nil)) | ||
| 937 | (let ((value (find-file-noselect filename nil nil wildcards))) | 936 | (let ((value (find-file-noselect filename nil nil wildcards))) |
| 938 | (if (listp value) | 937 | (if (listp value) |
| 939 | (mapcar 'switch-to-buffer (nreverse value)) | 938 | (mapcar 'switch-to-buffer (nreverse value)) |
| @@ -955,8 +954,8 @@ expand wildcards (if any) and visit multiple files." | |||
| 955 | (if (listp value) | 954 | (if (listp value) |
| 956 | (progn | 955 | (progn |
| 957 | (setq value (nreverse value)) | 956 | (setq value (nreverse value)) |
| 958 | (switch-to-buffer-other-window (car value)) | 957 | (cons (switch-to-buffer-other-window (car value)) |
| 959 | (mapcar 'switch-to-buffer (cdr value))) | 958 | (mapcar 'switch-to-buffer (cdr value)))) |
| 960 | (switch-to-buffer-other-window value)))) | 959 | (switch-to-buffer-other-window value)))) |
| 961 | 960 | ||
| 962 | (defun find-file-other-frame (filename &optional wildcards) | 961 | (defun find-file-other-frame (filename &optional wildcards) |
| @@ -975,8 +974,8 @@ expand wildcards (if any) and visit multiple files." | |||
| 975 | (if (listp value) | 974 | (if (listp value) |
| 976 | (progn | 975 | (progn |
| 977 | (setq value (nreverse value)) | 976 | (setq value (nreverse value)) |
| 978 | (switch-to-buffer-other-frame (car value)) | 977 | (cons (switch-to-buffer-other-frame (car value)) |
| 979 | (mapcar 'switch-to-buffer (cdr value))) | 978 | (mapcar 'switch-to-buffer (cdr value)))) |
| 980 | (switch-to-buffer-other-frame value)))) | 979 | (switch-to-buffer-other-frame value)))) |
| 981 | 980 | ||
| 982 | (defun find-file-existing (filename &optional wildcards) | 981 | (defun find-file-existing (filename &optional wildcards) |
| @@ -991,35 +990,53 @@ Like \\[find-file] but only allow files that exists." | |||
| 991 | "Edit file FILENAME but don't allow changes. | 990 | "Edit file FILENAME but don't allow changes. |
| 992 | Like \\[find-file] but marks buffer as read-only. | 991 | Like \\[find-file] but marks buffer as read-only. |
| 993 | Use \\[toggle-read-only] to permit editing." | 992 | Use \\[toggle-read-only] to permit editing." |
| 994 | (interactive (find-file-read-args "Find file read-only: " t)) | 993 | (interactive (find-file-read-args "Find file read-only: " nil)) |
| 995 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 994 | (unless (or (and wildcards find-file-wildcards |
| 996 | (find-file filename wildcards) | 995 | (not (string-match "\\`/:" filename)) |
| 997 | (toggle-read-only 1) | 996 | (string-match "[[*?]" filename)) |
| 998 | (current-buffer)) | 997 | (file-exists-p filename)) |
| 998 | (error "%s does not exist" filename)) | ||
| 999 | (let ((value (find-file filename wildcards))) | ||
| 1000 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1001 | (if (listp value) value (list value))) | ||
| 1002 | value)) | ||
| 999 | 1003 | ||
| 1000 | (defun find-file-read-only-other-window (filename &optional wildcards) | 1004 | (defun find-file-read-only-other-window (filename &optional wildcards) |
| 1001 | "Edit file FILENAME in another window but don't allow changes. | 1005 | "Edit file FILENAME in another window but don't allow changes. |
| 1002 | Like \\[find-file-other-window] but marks buffer as read-only. | 1006 | Like \\[find-file-other-window] but marks buffer as read-only. |
| 1003 | Use \\[toggle-read-only] to permit editing." | 1007 | Use \\[toggle-read-only] to permit editing." |
| 1004 | (interactive (find-file-read-args "Find file read-only other window: " t)) | 1008 | (interactive (find-file-read-args "Find file read-only other window: " nil)) |
| 1005 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 1009 | (unless (or (and wildcards find-file-wildcards |
| 1006 | (find-file-other-window filename wildcards) | 1010 | (not (string-match "\\`/:" filename)) |
| 1007 | (toggle-read-only 1) | 1011 | (string-match "[[*?]" filename)) |
| 1008 | (current-buffer)) | 1012 | (file-exists-p filename)) |
| 1013 | (error "%s does not exist" filename)) | ||
| 1014 | (let ((value (find-file-other-window filename wildcards))) | ||
| 1015 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1016 | (if (listp value) value (list value))) | ||
| 1017 | value)) | ||
| 1009 | 1018 | ||
| 1010 | (defun find-file-read-only-other-frame (filename &optional wildcards) | 1019 | (defun find-file-read-only-other-frame (filename &optional wildcards) |
| 1011 | "Edit file FILENAME in another frame but don't allow changes. | 1020 | "Edit file FILENAME in another frame but don't allow changes. |
| 1012 | Like \\[find-file-other-frame] but marks buffer as read-only. | 1021 | Like \\[find-file-other-frame] but marks buffer as read-only. |
| 1013 | Use \\[toggle-read-only] to permit editing." | 1022 | Use \\[toggle-read-only] to permit editing." |
| 1014 | (interactive (find-file-read-args "Find file read-only other frame: " t)) | 1023 | (interactive (find-file-read-args "Find file read-only other frame: " nil)) |
| 1015 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 1024 | (unless (or (and wildcards find-file-wildcards |
| 1016 | (find-file-other-frame filename wildcards) | 1025 | (not (string-match "\\`/:" filename)) |
| 1017 | (toggle-read-only 1) | 1026 | (string-match "[[*?]" filename)) |
| 1018 | (current-buffer)) | 1027 | (file-exists-p filename)) |
| 1019 | 1028 | (error "%s does not exist" filename)) | |
| 1020 | (defun find-alternate-file-other-window (filename) | 1029 | (let ((value (find-file-other-frame filename wildcards))) |
| 1030 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1031 | (if (listp value) value (list value))) | ||
| 1032 | value)) | ||
| 1033 | |||
| 1034 | (defun find-alternate-file-other-window (filename &optional wildcards) | ||
| 1021 | "Find file FILENAME as a replacement for the file in the next window. | 1035 | "Find file FILENAME as a replacement for the file in the next window. |
| 1022 | This command does not select that window." | 1036 | This command does not select that window. |
| 1037 | |||
| 1038 | Interactively, or if WILDCARDS is non-nil in a call from Lisp, | ||
| 1039 | expand wildcards (if any) and replace the file with multiple files." | ||
| 1023 | (interactive | 1040 | (interactive |
| 1024 | (save-selected-window | 1041 | (save-selected-window |
| 1025 | (other-window 1) | 1042 | (other-window 1) |
| @@ -1030,17 +1047,21 @@ This command does not select that window." | |||
| 1030 | (setq file-name (file-name-nondirectory file) | 1047 | (setq file-name (file-name-nondirectory file) |
| 1031 | file-dir (file-name-directory file))) | 1048 | file-dir (file-name-directory file))) |
| 1032 | (list (read-file-name | 1049 | (list (read-file-name |
| 1033 | "Find alternate file: " file-dir nil nil file-name))))) | 1050 | "Find alternate file: " file-dir nil nil file-name) |
| 1051 | t)))) | ||
| 1034 | (if (one-window-p) | 1052 | (if (one-window-p) |
| 1035 | (find-file-other-window filename) | 1053 | (find-file-other-window filename wildcards) |
| 1036 | (save-selected-window | 1054 | (save-selected-window |
| 1037 | (other-window 1) | 1055 | (other-window 1) |
| 1038 | (find-alternate-file filename)))) | 1056 | (find-alternate-file filename wildcards)))) |
| 1039 | 1057 | ||
| 1040 | (defun find-alternate-file (filename) | 1058 | (defun find-alternate-file (filename &optional wildcards) |
| 1041 | "Find file FILENAME, select its buffer, kill previous buffer. | 1059 | "Find file FILENAME, select its buffer, kill previous buffer. |
| 1042 | If the current buffer now contains an empty file that you just visited | 1060 | If the current buffer now contains an empty file that you just visited |
| 1043 | \(presumably by mistake), use this command to visit the file you really want." | 1061 | \(presumably by mistake), use this command to visit the file you really want. |
| 1062 | |||
| 1063 | Interactively, or if WILDCARDS is non-nil in a call from Lisp, | ||
| 1064 | expand wildcards (if any) and replace the file with multiple files." | ||
| 1044 | (interactive | 1065 | (interactive |
| 1045 | (let ((file buffer-file-name) | 1066 | (let ((file buffer-file-name) |
| 1046 | (file-name nil) | 1067 | (file-name nil) |
| @@ -1049,7 +1070,8 @@ If the current buffer now contains an empty file that you just visited | |||
| 1049 | (setq file-name (file-name-nondirectory file) | 1070 | (setq file-name (file-name-nondirectory file) |
| 1050 | file-dir (file-name-directory file))) | 1071 | file-dir (file-name-directory file))) |
| 1051 | (list (read-file-name | 1072 | (list (read-file-name |
| 1052 | "Find alternate file: " file-dir nil nil file-name)))) | 1073 | "Find alternate file: " file-dir nil nil file-name) |
| 1074 | t))) | ||
| 1053 | (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions) | 1075 | (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions) |
| 1054 | (error "Aborted")) | 1076 | (error "Aborted")) |
| 1055 | (when (and (buffer-modified-p) (buffer-file-name)) | 1077 | (when (and (buffer-modified-p) (buffer-file-name)) |
| @@ -1077,7 +1099,7 @@ If the current buffer now contains an empty file that you just visited | |||
| 1077 | (setq buffer-file-truename nil) | 1099 | (setq buffer-file-truename nil) |
| 1078 | ;; Likewise for dired buffers. | 1100 | ;; Likewise for dired buffers. |
| 1079 | (setq dired-directory nil) | 1101 | (setq dired-directory nil) |
| 1080 | (find-file filename)) | 1102 | (find-file filename wildcards)) |
| 1081 | (when (eq obuf (current-buffer)) | 1103 | (when (eq obuf (current-buffer)) |
| 1082 | ;; This executes if find-file gets an error | 1104 | ;; This executes if find-file gets an error |
| 1083 | ;; and does not really find anything. | 1105 | ;; and does not really find anything. |
| @@ -1247,8 +1269,8 @@ Optional first arg NOWARN non-nil means suppress any warning messages. | |||
| 1247 | Optional second arg RAWFILE non-nil means the file is read literally. | 1269 | Optional second arg RAWFILE non-nil means the file is read literally. |
| 1248 | Optional third arg WILDCARDS non-nil means do wildcard processing | 1270 | Optional third arg WILDCARDS non-nil means do wildcard processing |
| 1249 | and visit all the matching files. When wildcards are actually | 1271 | and visit all the matching files. When wildcards are actually |
| 1250 | used and expanded, the value is a list of buffers | 1272 | used and expanded, return a list of buffers that are visiting |
| 1251 | that are visiting the various files." | 1273 | the various files." |
| 1252 | (setq filename | 1274 | (setq filename |
| 1253 | (abbreviate-file-name | 1275 | (abbreviate-file-name |
| 1254 | (expand-file-name filename))) | 1276 | (expand-file-name filename))) |
| @@ -1757,6 +1779,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1757 | ("\\.ses\\'" . ses-mode) | 1779 | ("\\.ses\\'" . ses-mode) |
| 1758 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) | 1780 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) |
| 1759 | ("\\.docbook\\'" . sgml-mode) | 1781 | ("\\.docbook\\'" . sgml-mode) |
| 1782 | ("\\.com\\'" . dcl-mode) | ||
| 1760 | ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) | 1783 | ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) |
| 1761 | ;; Windows candidates may be opened case sensitively on Unix | 1784 | ;; Windows candidates may be opened case sensitively on Unix |
| 1762 | ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) | 1785 | ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2b83229010d..518a9903085 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,8 +1,20 @@ | |||
| 1 | 2004-12-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min. | ||
| 4 | |||
| 5 | 2004-12-13 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 6 | |||
| 7 | * gnus-group.el (gnus-group-make-rss-group): Use | ||
| 8 | gnus-group-make-group instead of gnus-group-unsubscribe-group. | ||
| 9 | |||
| 10 | * gnus-start.el (gnus-setup-news): Honor user's setting to | ||
| 11 | gnus-message-archive-method. Suggested by Lute Kamstra | ||
| 12 | <Lute.Kamstra@xs4all.nl>. | ||
| 13 | |||
| 1 | 2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org> | 14 | 2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 15 | ||
| 3 | * message.el (message-forward-make-body-mml): Remove headers | 16 | * message.el (message-forward-make-body-mml): Remove headers |
| 4 | according to message-forward-ignored-headers if a message is | 17 | according to message-forward-ignored-headers if a message is decoded. |
| 5 | decoded. | ||
| 6 | 18 | ||
| 7 | 2004-12-02 Romain Francoise <romain@orebokech.com> | 19 | 2004-12-02 Romain Francoise <romain@orebokech.com> |
| 8 | 20 | ||
| @@ -60,17 +72,16 @@ | |||
| 60 | 72 | ||
| 61 | 2004-11-25 Reiner Steib <Reiner.Steib@gmx.de> | 73 | 2004-11-25 Reiner Steib <Reiner.Steib@gmx.de> |
| 62 | 74 | ||
| 63 | * message.el (message-forbidden-properties): Fixed typo in doc | 75 | * message.el (message-forbidden-properties): Fix typo in doc string. |
| 64 | string. | ||
| 65 | 76 | ||
| 66 | 2004-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | 77 | 2004-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 67 | 78 | ||
| 68 | * message.el (message-strip-forbidden-properties): Bind | 79 | * message.el (message-strip-forbidden-properties): |
| 69 | buffer-read-only (etc) to nil. | 80 | Bind buffer-read-only (etc) to nil. |
| 70 | 81 | ||
| 71 | 2004-11-25 Reiner Steib <Reiner.Steib@gmx.de> | 82 | 2004-11-25 Reiner Steib <Reiner.Steib@gmx.de> |
| 72 | 83 | ||
| 73 | * gnus-util.el (gnus-replace-in-string): Added doc string. | 84 | * gnus-util.el (gnus-replace-in-string): Add doc string. |
| 74 | 85 | ||
| 75 | * nnmail.el (nnmail-split-header-length-limit): Increase to 2048 | 86 | * nnmail.el (nnmail-split-header-length-limit): Increase to 2048 |
| 76 | to avoid problems when splitting mails with many recipients. | 87 | to avoid problems when splitting mails with many recipients. |
| @@ -97,8 +108,8 @@ | |||
| 97 | 108 | ||
| 98 | 2004-11-14 Reiner Steib <Reiner.Steib@gmx.de> | 109 | 2004-11-14 Reiner Steib <Reiner.Steib@gmx.de> |
| 99 | 110 | ||
| 100 | * gnus-start.el (gnus-convert-old-newsrc): Assign | 111 | * gnus-start.el (gnus-convert-old-newsrc): |
| 101 | legacy-gnus-agent to 5.10.7. | 112 | Assign legacy-gnus-agent to 5.10.7. |
| 102 | 113 | ||
| 103 | 2004-11-10 Katsumi Yamaoka <yamaoka@jpl.org> | 114 | 2004-11-10 Katsumi Yamaoka <yamaoka@jpl.org> |
| 104 | 115 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index f6286c7de87..7450fee69ee 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -5066,7 +5066,7 @@ If given a numerical ARG, move forward ARG pages." | |||
| 5066 | (goto-char (point-min)) | 5066 | (goto-char (point-min)) |
| 5067 | (gnus-insert-prev-page-button))) | 5067 | (gnus-insert-prev-page-button))) |
| 5068 | (when (and (gnus-visual-p 'page-marker) | 5068 | (when (and (gnus-visual-p 'page-marker) |
| 5069 | (< (+ (point-max) 2) (buffer-size))) | 5069 | (< (point-max) (save-restriction (widen) (point-max)))) |
| 5070 | (save-excursion | 5070 | (save-excursion |
| 5071 | (goto-char (point-max)) | 5071 | (goto-char (point-max)) |
| 5072 | (gnus-insert-next-page-button)))))) | 5072 | (gnus-insert-next-page-button)))))) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index c55264b22de..b7d0cf9eef4 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -2592,8 +2592,7 @@ If there is, use Gnus to create an nnrss group" | |||
| 2592 | (href (cdr (assoc 'href feedinfo)))) | 2592 | (href (cdr (assoc 'href feedinfo)))) |
| 2593 | (push (list title href desc) | 2593 | (push (list title href desc) |
| 2594 | nnrss-group-alist) | 2594 | nnrss-group-alist) |
| 2595 | (gnus-group-unsubscribe-group | 2595 | (gnus-group-make-group title '(nnrss "")) |
| 2596 | (concat "nnrss:" title)) | ||
| 2597 | (nnrss-save-server-data nil)) | 2596 | (nnrss-save-server-data nil)) |
| 2598 | (error "No feeds found for %s" url)))) | 2597 | (error "No feeds found for %s" url)))) |
| 2599 | 2598 | ||
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index ddf00a37ee1..c1c79033267 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -954,16 +954,28 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." | |||
| 954 | ;; Make sure the archive server is available to all and sundry. | 954 | ;; Make sure the archive server is available to all and sundry. |
| 955 | (when gnus-message-archive-method | 955 | (when gnus-message-archive-method |
| 956 | (unless (assoc "archive" gnus-server-alist) | 956 | (unless (assoc "archive" gnus-server-alist) |
| 957 | (push `("archive" | 957 | (let ((method (or (and (stringp gnus-message-archive-method) |
| 958 | nnfolder | 958 | (gnus-server-to-method |
| 959 | "archive" | 959 | gnus-message-archive-method)) |
| 960 | (nnfolder-directory | 960 | gnus-message-archive-method))) |
| 961 | ,(nnheader-concat message-directory "archive")) | 961 | ;; Check whether the archive method is writable. |
| 962 | (nnfolder-active-file | 962 | (unless (or (stringp method) |
| 963 | ,(nnheader-concat message-directory "archive/active")) | 963 | (memq 'respool (assoc (format "%s" (car method)) |
| 964 | (nnfolder-get-new-mail nil) | 964 | gnus-valid-select-methods))) |
| 965 | (nnfolder-inhibit-expiry t)) | 965 | (setq method "archive")) ;; The default. |
| 966 | gnus-server-alist))) | 966 | (push (if (stringp method) |
| 967 | `("archive" | ||
| 968 | nnfolder | ||
| 969 | ,method | ||
| 970 | (nnfolder-directory | ||
| 971 | ,(nnheader-concat message-directory method)) | ||
| 972 | (nnfolder-active-file | ||
| 973 | ,(nnheader-concat message-directory | ||
| 974 | (concat method "/active"))) | ||
| 975 | (nnfolder-get-new-mail nil) | ||
| 976 | (nnfolder-inhibit-expiry t)) | ||
| 977 | (cons "archive" method)) | ||
| 978 | gnus-server-alist)))) | ||
| 967 | 979 | ||
| 968 | ;; If we don't read the complete active file, we fill in the | 980 | ;; If we don't read the complete active file, we fill in the |
| 969 | ;; hashtb here. | 981 | ;; hashtb here. |
diff --git a/lisp/info.el b/lisp/info.el index ef4225e5a3e..750f302d422 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -86,7 +86,7 @@ The Lisp code is executed when the node is selected.") | |||
| 86 | :group 'info) | 86 | :group 'info) |
| 87 | 87 | ||
| 88 | (defface info-xref-visited | 88 | (defface info-xref-visited |
| 89 | '((t :inherit info-xref) | 89 | '((default :inherit info-xref) |
| 90 | (((class color) (background light)) :foreground "magenta4") | 90 | (((class color) (background light)) :foreground "magenta4") |
| 91 | (((class color) (background dark)) :foreground "magenta3")) ;"violet"? | 91 | (((class color) (background dark)) :foreground "magenta3")) ;"violet"? |
| 92 | "Face for visited Info cross-references." | 92 | "Face for visited Info cross-references." |
| @@ -2834,8 +2834,7 @@ if point is in a menu item description, follow that menu item." | |||
| 2834 | "Follow a node reference near point. Return non-nil if successful." | 2834 | "Follow a node reference near point. Return non-nil if successful." |
| 2835 | (let (node) | 2835 | (let (node) |
| 2836 | (cond | 2836 | (cond |
| 2837 | ((and (Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") | 2837 | ((Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") |
| 2838 | (or (featurep 'browse-url) (require 'browse-url nil t))) | ||
| 2839 | (setq node t) | 2838 | (setq node t) |
| 2840 | (browse-url (browse-url-url-at-point))) | 2839 | (browse-url (browse-url-url-at-point))) |
| 2841 | ((setq node (Info-get-token (point) "\\*note[ \n\t]+" | 2840 | ((setq node (Info-get-token (point) "\\*note[ \n\t]+" |
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 60736277b97..aad6b6e745e 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el | |||
| @@ -97,7 +97,7 @@ | |||
| 97 | (defun isearch-process-search-multibyte-characters (last-char) | 97 | (defun isearch-process-search-multibyte-characters (last-char) |
| 98 | (if (eq this-command 'isearch-printing-char) | 98 | (if (eq this-command 'isearch-printing-char) |
| 99 | (let ((overriding-terminal-local-map nil) | 99 | (let ((overriding-terminal-local-map nil) |
| 100 | (prompt (concat (isearch-message-prefix) isearch-message)) | 100 | (prompt (concat (isearch-message-prefix))) |
| 101 | (minibuffer-local-map isearch-minibuffer-local-map) | 101 | (minibuffer-local-map isearch-minibuffer-local-map) |
| 102 | str) | 102 | str) |
| 103 | (if isearch-input-method-function | 103 | (if isearch-input-method-function |
| @@ -107,11 +107,12 @@ | |||
| 107 | (cons 'with-input-method | 107 | (cons 'with-input-method |
| 108 | (cons last-char unread-command-events)) | 108 | (cons last-char unread-command-events)) |
| 109 | ;; Inherit current-input-method in a minibuffer. | 109 | ;; Inherit current-input-method in a minibuffer. |
| 110 | str (read-string prompt nil nil nil t)) | 110 | str (read-string prompt isearch-message nil nil t)) |
| 111 | (if (not str) | 111 | (if (not str) |
| 112 | ;; All inputs were deleted while the input method | 112 | ;; All inputs were deleted while the input method |
| 113 | ;; was working. | 113 | ;; was working. |
| 114 | (setq str "") | 114 | (setq str "") |
| 115 | (setq str (substring str (length isearch-message))) | ||
| 115 | (if (and (= (length str) 1) | 116 | (if (and (= (length str) 1) |
| 116 | (= (aref str 0) last-char) | 117 | (= (aref str 0) last-char) |
| 117 | (>= last-char 128)) | 118 | (>= last-char 128)) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index e8bb47509be..b15a8f5affe 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -258,6 +258,7 @@ Default value, nil, means edit the string instead." | |||
| 258 | (define-key map "\r" 'isearch-exit) | 258 | (define-key map "\r" 'isearch-exit) |
| 259 | (define-key map "\C-j" 'isearch-printing-char) | 259 | (define-key map "\C-j" 'isearch-printing-char) |
| 260 | (define-key map "\t" 'isearch-printing-char) | 260 | (define-key map "\t" 'isearch-printing-char) |
| 261 | (define-key map [?\S-\ ] 'isearch-printing-char) | ||
| 261 | 262 | ||
| 262 | (define-key map "\C-w" 'isearch-yank-word-or-char) | 263 | (define-key map "\C-w" 'isearch-yank-word-or-char) |
| 263 | (define-key map "\M-\C-w" 'isearch-del-char) | 264 | (define-key map "\M-\C-w" 'isearch-del-char) |
| @@ -938,7 +939,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 938 | (isearch-message-prefix nil nil isearch-nonincremental) | 939 | (isearch-message-prefix nil nil isearch-nonincremental) |
| 939 | isearch-string | 940 | isearch-string |
| 940 | minibuffer-local-isearch-map nil | 941 | minibuffer-local-isearch-map nil |
| 941 | 'junk-ring)) | 942 | 'junk-ring nil t)) |
| 942 | isearch-new-message | 943 | isearch-new-message |
| 943 | (mapconcat 'isearch-text-char-description | 944 | (mapconcat 'isearch-text-char-description |
| 944 | isearch-new-string ""))) | 945 | isearch-new-string ""))) |
| @@ -2381,59 +2382,64 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 2381 | (let ((max isearch-lazy-highlight-max-at-a-time) | 2382 | (let ((max isearch-lazy-highlight-max-at-a-time) |
| 2382 | (looping t) | 2383 | (looping t) |
| 2383 | nomore) | 2384 | nomore) |
| 2384 | (save-excursion | 2385 | (with-local-quit |
| 2385 | (save-match-data | 2386 | (save-selected-window |
| 2386 | (goto-char (if isearch-forward | 2387 | (if (and (window-live-p isearch-lazy-highlight-window) |
| 2387 | isearch-lazy-highlight-end | 2388 | (not (eq (selected-window) isearch-lazy-highlight-window))) |
| 2388 | isearch-lazy-highlight-start)) | 2389 | (select-window isearch-lazy-highlight-window)) |
| 2389 | (while looping | 2390 | (save-excursion |
| 2390 | (let ((found (isearch-lazy-highlight-search))) | 2391 | (save-match-data |
| 2391 | (when max | 2392 | (goto-char (if isearch-forward |
| 2392 | (setq max (1- max)) | 2393 | isearch-lazy-highlight-end |
| 2393 | (if (<= max 0) | 2394 | isearch-lazy-highlight-start)) |
| 2394 | (setq looping nil))) | 2395 | (while looping |
| 2395 | (if found | 2396 | (let ((found (isearch-lazy-highlight-search))) |
| 2396 | (let ((mb (match-beginning 0)) | 2397 | (when max |
| 2397 | (me (match-end 0))) | 2398 | (setq max (1- max)) |
| 2398 | (if (= mb me) ;zero-length match | 2399 | (if (<= max 0) |
| 2400 | (setq looping nil))) | ||
| 2401 | (if found | ||
| 2402 | (let ((mb (match-beginning 0)) | ||
| 2403 | (me (match-end 0))) | ||
| 2404 | (if (= mb me) ;zero-length match | ||
| 2405 | (if isearch-forward | ||
| 2406 | (if (= mb (if isearch-lazy-highlight-wrapped | ||
| 2407 | isearch-lazy-highlight-start | ||
| 2408 | (window-end))) | ||
| 2409 | (setq found nil) | ||
| 2410 | (forward-char 1)) | ||
| 2411 | (if (= mb (if isearch-lazy-highlight-wrapped | ||
| 2412 | isearch-lazy-highlight-end | ||
| 2413 | (window-start))) | ||
| 2414 | (setq found nil) | ||
| 2415 | (forward-char -1))) | ||
| 2416 | |||
| 2417 | ;; non-zero-length match | ||
| 2418 | (let ((ov (make-overlay mb me))) | ||
| 2419 | (push ov isearch-lazy-highlight-overlays) | ||
| 2420 | (overlay-put ov 'face isearch-lazy-highlight-face) | ||
| 2421 | (overlay-put ov 'priority 0) ;lower than main overlay | ||
| 2422 | (overlay-put ov 'window (selected-window)))) | ||
| 2423 | (if isearch-forward | ||
| 2424 | (setq isearch-lazy-highlight-end (point)) | ||
| 2425 | (setq isearch-lazy-highlight-start (point))))) | ||
| 2426 | |||
| 2427 | ;; not found or zero-length match at the search bound | ||
| 2428 | (if (not found) | ||
| 2429 | (if isearch-lazy-highlight-wrapped | ||
| 2430 | (setq looping nil | ||
| 2431 | nomore t) | ||
| 2432 | (setq isearch-lazy-highlight-wrapped t) | ||
| 2399 | (if isearch-forward | 2433 | (if isearch-forward |
| 2400 | (if (= mb (if isearch-lazy-highlight-wrapped | 2434 | (progn |
| 2401 | isearch-lazy-highlight-start | 2435 | (setq isearch-lazy-highlight-end (window-start)) |
| 2402 | (window-end))) | 2436 | (goto-char (window-start))) |
| 2403 | (setq found nil) | 2437 | (setq isearch-lazy-highlight-start (window-end)) |
| 2404 | (forward-char 1)) | 2438 | (goto-char (window-end))))))) |
| 2405 | (if (= mb (if isearch-lazy-highlight-wrapped | 2439 | (unless nomore |
| 2406 | isearch-lazy-highlight-end | 2440 | (setq isearch-lazy-highlight-timer |
| 2407 | (window-start))) | 2441 | (run-at-time isearch-lazy-highlight-interval nil |
| 2408 | (setq found nil) | 2442 | 'isearch-lazy-highlight-update))))))))) |
| 2409 | (forward-char -1))) | ||
| 2410 | |||
| 2411 | ;; non-zero-length match | ||
| 2412 | (let ((ov (make-overlay mb me))) | ||
| 2413 | (overlay-put ov 'face isearch-lazy-highlight-face) | ||
| 2414 | (overlay-put ov 'priority 0) ;lower than main overlay | ||
| 2415 | (overlay-put ov 'window (selected-window)) | ||
| 2416 | (push ov isearch-lazy-highlight-overlays))) | ||
| 2417 | (if isearch-forward | ||
| 2418 | (setq isearch-lazy-highlight-end (point)) | ||
| 2419 | (setq isearch-lazy-highlight-start (point))))) | ||
| 2420 | |||
| 2421 | ;; not found or zero-length match at the search bound | ||
| 2422 | (if (not found) | ||
| 2423 | (if isearch-lazy-highlight-wrapped | ||
| 2424 | (setq looping nil | ||
| 2425 | nomore t) | ||
| 2426 | (setq isearch-lazy-highlight-wrapped t) | ||
| 2427 | (if isearch-forward | ||
| 2428 | (progn | ||
| 2429 | (setq isearch-lazy-highlight-end (window-start)) | ||
| 2430 | (goto-char (window-start))) | ||
| 2431 | (setq isearch-lazy-highlight-start (window-end)) | ||
| 2432 | (goto-char (window-end))))))) | ||
| 2433 | (unless nomore | ||
| 2434 | (setq isearch-lazy-highlight-timer | ||
| 2435 | (run-at-time isearch-lazy-highlight-interval nil | ||
| 2436 | 'isearch-lazy-highlight-update))))))) | ||
| 2437 | 2443 | ||
| 2438 | (defun isearch-resume (search regexp word forward message case-fold) | 2444 | (defun isearch-resume (search regexp word forward message case-fold) |
| 2439 | "Resume an incremental search. | 2445 | "Resume an incremental search. |
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index c1f4b6f0170..06282c430f0 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el | |||
| @@ -146,8 +146,9 @@ Each element of this list has the following form: | |||
| 146 | (...))) | 146 | (...))) |
| 147 | 147 | ||
| 148 | Where INFOKEY is a key for `sc-mail-field', REGEXP is a regular | 148 | Where INFOKEY is a key for `sc-mail-field', REGEXP is a regular |
| 149 | expression to match against the INFOKEY's value. FRAME is a citation | 149 | expression to match against the INFOKEY's value. FRAME is |
| 150 | frame, or a variable containing a citation frame." | 150 | a citation frame, or a symbol that represents the name of |
| 151 | a variable whose value is a citation frame." | ||
| 151 | :type '(repeat (list symbol (repeat (cons regexp | 152 | :type '(repeat (list symbol (repeat (cons regexp |
| 152 | (choice (repeat (repeat sexp)) | 153 | (choice (repeat (repeat sexp)) |
| 153 | symbol))))) | 154 | symbol))))) |
| @@ -1434,12 +1435,11 @@ When called interactively, the optional arg INTERACTIVE is non-nil, | |||
| 1434 | and that means call `sc-select-attribution' too." | 1435 | and that means call `sc-select-attribution' too." |
| 1435 | (interactive "r\nP\np") | 1436 | (interactive "r\nP\np") |
| 1436 | (undo-boundary) | 1437 | (undo-boundary) |
| 1437 | (let ((frame (or (sc-scan-info-alist | 1438 | (let ((frame (sc-scan-info-alist sc-cite-frame-alist)) |
| 1438 | (if (symbolp sc-cite-frame-alist) | ||
| 1439 | (symbol-value sc-cite-frame-alist) | ||
| 1440 | sc-cite-frame-alist)) | ||
| 1441 | sc-default-cite-frame)) | ||
| 1442 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) | 1439 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) |
| 1440 | (if (and frame (symbolp frame)) | ||
| 1441 | (setq frame (symbol-value frame))) | ||
| 1442 | (or frame (setq frame sc-default-cite-frame)) | ||
| 1443 | (run-hooks 'sc-pre-cite-hook) | 1443 | (run-hooks 'sc-pre-cite-hook) |
| 1444 | (if interactive | 1444 | (if interactive |
| 1445 | (sc-select-attribution)) | 1445 | (sc-select-attribution)) |
| @@ -1450,11 +1450,10 @@ and that means call `sc-select-attribution' too." | |||
| 1450 | First runs `sc-pre-uncite-hook'." | 1450 | First runs `sc-pre-uncite-hook'." |
| 1451 | (interactive "r") | 1451 | (interactive "r") |
| 1452 | (undo-boundary) | 1452 | (undo-boundary) |
| 1453 | (let ((frame (or (sc-scan-info-alist | 1453 | (let ((frame (sc-scan-info-alist sc-uncite-frame-alist))) |
| 1454 | (if (symbolp sc-uncite-frame-alist) | 1454 | (if (and frame (symbolp frame)) |
| 1455 | (symbol-value sc-uncite-frame-alist) | 1455 | (setq frame (symbol-value frame))) |
| 1456 | sc-uncite-frame-alist)) | 1456 | (or frame (setq frame sc-default-uncite-frame)) |
| 1457 | sc-default-uncite-frame))) | ||
| 1458 | (run-hooks 'sc-pre-uncite-hook) | 1457 | (run-hooks 'sc-pre-uncite-hook) |
| 1459 | (regi-interpret frame start end))) | 1458 | (regi-interpret frame start end))) |
| 1460 | 1459 | ||
| @@ -1465,11 +1464,10 @@ First runs `sc-pre-recite-hook'." | |||
| 1465 | (let ((sc-confirm-always-p t)) | 1464 | (let ((sc-confirm-always-p t)) |
| 1466 | (sc-select-attribution)) | 1465 | (sc-select-attribution)) |
| 1467 | (undo-boundary) | 1466 | (undo-boundary) |
| 1468 | (let ((frame (or (sc-scan-info-alist | 1467 | (let ((frame (sc-scan-info-alist sc-recite-frame-alist))) |
| 1469 | (if (symbolp sc-recite-frame-alist) | 1468 | (if (and frame (symbolp frame)) |
| 1470 | (symbol-value sc-recite-frame-alist) | 1469 | (setq frame (symbol-value frame))) |
| 1471 | sc-recite-frame-alist)) | 1470 | (or frame (setq frame sc-default-recite-frame)) |
| 1472 | sc-default-recite-frame))) | ||
| 1473 | (run-hooks 'sc-pre-recite-hook) | 1471 | (run-hooks 'sc-pre-recite-hook) |
| 1474 | (regi-interpret frame start end))) | 1472 | (regi-interpret frame start end))) |
| 1475 | 1473 | ||
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 098f2988f1b..6e679876eef 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -575,6 +575,7 @@ down (this *won't* always work)." | |||
| 575 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 575 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 576 | ;; URL input | 576 | ;; URL input |
| 577 | 577 | ||
| 578 | ;;;###autoload | ||
| 578 | (defun browse-url-url-at-point () | 579 | (defun browse-url-url-at-point () |
| 579 | (let ((url (thing-at-point 'url))) | 580 | (let ((url (thing-at-point 'url))) |
| 580 | (set-text-properties 0 (length url) nil url) | 581 | (set-text-properties 0 (length url) nil url) |
diff --git a/lisp/play/zone.el b/lisp/play/zone.el index abe9657a9d8..e073e343f02 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el | |||
| @@ -75,6 +75,7 @@ If nil, don't interrupt for about 1^26 seconds.") | |||
| 75 | zone-pgm-paragraph-spaz | 75 | zone-pgm-paragraph-spaz |
| 76 | zone-pgm-stress | 76 | zone-pgm-stress |
| 77 | zone-pgm-stress-destress | 77 | zone-pgm-stress-destress |
| 78 | zone-pgm-random-life | ||
| 78 | ]) | 79 | ]) |
| 79 | 80 | ||
| 80 | (defmacro zone-orig (&rest body) | 81 | (defmacro zone-orig (&rest body) |
| @@ -459,6 +460,26 @@ If the element is a function or a list of a function and a number, | |||
| 459 | (sit-for wait)) | 460 | (sit-for wait)) |
| 460 | (delete-char -1) (insert c-string))) | 461 | (delete-char -1) (insert c-string))) |
| 461 | 462 | ||
| 463 | (defun zone-fill-out-screen (width height) | ||
| 464 | (save-excursion | ||
| 465 | (goto-char (point-min)) | ||
| 466 | ;; fill out rectangular ws block | ||
| 467 | (while (not (eobp)) | ||
| 468 | (end-of-line) | ||
| 469 | (let ((cc (current-column))) | ||
| 470 | (if (< cc width) | ||
| 471 | (insert (make-string (- width cc) 32)) | ||
| 472 | (delete-char (- width cc)))) | ||
| 473 | (unless (eobp) | ||
| 474 | (forward-char 1))) | ||
| 475 | ;; pad ws past bottom of screen | ||
| 476 | (let ((nl (- height (count-lines (point-min) (point))))) | ||
| 477 | (when (> nl 0) | ||
| 478 | (let ((line (concat (make-string (1- width) ? ) "\n"))) | ||
| 479 | (do ((i 0 (1+ i))) | ||
| 480 | ((= i nl)) | ||
| 481 | (insert line))))))) | ||
| 482 | |||
| 462 | (defun zone-fall-through-ws (c col wend) | 483 | (defun zone-fall-through-ws (c col wend) |
| 463 | (let ((fall-p nil) ; todo: move outward | 484 | (let ((fall-p nil) ; todo: move outward |
| 464 | (wait 0.15) | 485 | (wait 0.15) |
| @@ -486,27 +507,9 @@ If the element is a function or a list of a function and a number, | |||
| 486 | (mc 0) ; miss count | 507 | (mc 0) ; miss count |
| 487 | (total (* ww wh)) | 508 | (total (* ww wh)) |
| 488 | (fall-p nil)) | 509 | (fall-p nil)) |
| 489 | (goto-char (point-min)) | 510 | (zone-fill-out-screen ww wh) |
| 490 | ;; fill out rectangular ws block | ||
| 491 | (while (not (eobp)) | ||
| 492 | (end-of-line) | ||
| 493 | (let ((cc (current-column))) | ||
| 494 | (if (< cc ww) | ||
| 495 | (insert (make-string (- ww cc) ? )) | ||
| 496 | (delete-char (- ww cc)))) | ||
| 497 | (unless (eobp) | ||
| 498 | (forward-char 1))) | ||
| 499 | ;; pad ws past bottom of screen | ||
| 500 | (let ((nl (- wh (count-lines (point-min) (point))))) | ||
| 501 | (when (> nl 0) | ||
| 502 | (let ((line (concat (make-string (1- ww) ? ) "\n"))) | ||
| 503 | (do ((i 0 (1+ i))) | ||
| 504 | ((= i nl)) | ||
| 505 | (insert line))))) | ||
| 506 | (catch 'done | 511 | (catch 'done |
| 507 | (while (not (input-pending-p)) | 512 | (while (not (input-pending-p)) |
| 508 | (goto-char (point-min)) | ||
| 509 | (sit-for 0) | ||
| 510 | (let ((wbeg (window-start)) | 513 | (let ((wbeg (window-start)) |
| 511 | (wend (window-end))) | 514 | (wend (window-end))) |
| 512 | (setq mc 0) | 515 | (setq mc 0) |
| @@ -552,7 +555,9 @@ If the element is a function or a list of a function and a number, | |||
| 552 | ;;;; zone-pgm-paragraph-spaz | 555 | ;;;; zone-pgm-paragraph-spaz |
| 553 | 556 | ||
| 554 | (defun zone-pgm-paragraph-spaz () | 557 | (defun zone-pgm-paragraph-spaz () |
| 555 | (if (memq (zone-orig major-mode) '(text-mode fundamental-mode)) | 558 | (if (memq (zone-orig major-mode) |
| 559 | ;; there should be a better way to distinguish textish modes | ||
| 560 | '(text-mode texinfo-mode fundamental-mode)) | ||
| 556 | (let ((fill-column fill-column) | 561 | (let ((fill-column fill-column) |
| 557 | (fc-min fill-column) | 562 | (fc-min fill-column) |
| 558 | (fc-max fill-column) | 563 | (fc-max fill-column) |
| @@ -570,7 +575,7 @@ If the element is a function or a list of a function and a number, | |||
| 570 | (zone-pgm-rotate))) | 575 | (zone-pgm-rotate))) |
| 571 | 576 | ||
| 572 | 577 | ||
| 573 | ;;;; zone-pgm-stress | 578 | ;;;; stressing and destressing |
| 574 | 579 | ||
| 575 | (defun zone-pgm-stress () | 580 | (defun zone-pgm-stress () |
| 576 | (goto-char (point-min)) | 581 | (goto-char (point-min)) |
| @@ -596,9 +601,6 @@ If the element is a function or a list of a function and a number, | |||
| 596 | (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) | 601 | (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) |
| 597 | (sit-for 0.1))))) | 602 | (sit-for 0.1))))) |
| 598 | 603 | ||
| 599 | |||
| 600 | ;;;; zone-pgm-stress-destress | ||
| 601 | |||
| 602 | (defun zone-pgm-stress-destress () | 604 | (defun zone-pgm-stress-destress () |
| 603 | (zone-call 'zone-pgm-stress 25) | 605 | (zone-call 'zone-pgm-stress 25) |
| 604 | (zone-hiding-modeline | 606 | (zone-hiding-modeline |
| @@ -617,6 +619,59 @@ If the element is a function or a list of a function and a number, | |||
| 617 | zone-pgm-drip)))) | 619 | zone-pgm-drip)))) |
| 618 | 620 | ||
| 619 | 621 | ||
| 622 | ;;;; the lyfe so short the craft so long to lerne --chaucer | ||
| 623 | |||
| 624 | (defvar zone-pgm-random-life-wait nil | ||
| 625 | "*Seconds to wait between successive `life' generations. | ||
| 626 | If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") | ||
| 627 | |||
| 628 | (defun zone-pgm-random-life () | ||
| 629 | (require 'life) | ||
| 630 | (zone-fill-out-screen (1- (window-width)) (1- (window-height))) | ||
| 631 | (let ((top (progn (goto-char (window-start)) (forward-line 7) (point))) | ||
| 632 | (bot (progn (goto-char (window-end)) (forward-line -7) (point))) | ||
| 633 | (rtc (- (frame-width) 11)) | ||
| 634 | (min (window-start)) | ||
| 635 | (max (1- (window-end))) | ||
| 636 | c col) | ||
| 637 | (delete-region max (point-max)) | ||
| 638 | (while (progn (goto-char (+ min (random max))) | ||
| 639 | (and (sit-for 0.005) | ||
| 640 | (or (progn (skip-chars-forward " @\n" max) | ||
| 641 | (not (= max (point)))) | ||
| 642 | (unless (or (= 0 (skip-chars-backward " @\n" min)) | ||
| 643 | (= min (point))) | ||
| 644 | (forward-char -1) | ||
| 645 | t)))) | ||
| 646 | (setq c (char-after)) | ||
| 647 | (unless (or (not c) (= ?\n c)) | ||
| 648 | (forward-char 1) | ||
| 649 | (insert-and-inherit ; keep colors | ||
| 650 | (cond ((or (> top (point)) | ||
| 651 | (< bot (point)) | ||
| 652 | (or (> 11 (setq col (current-column))) | ||
| 653 | (< rtc col))) | ||
| 654 | 32) | ||
| 655 | ((and (<= ?a c) (>= ?z c)) (+ c (- ?A ?a))) | ||
| 656 | ((and (<= ?A c) (>= ?Z c)) ?*) | ||
| 657 | (t ?@))) | ||
| 658 | (forward-char -1) | ||
| 659 | (delete-char -1))) | ||
| 660 | (sit-for 3) | ||
| 661 | (setq col nil) | ||
| 662 | (goto-char bot) | ||
| 663 | (while (< top (point)) | ||
| 664 | (setq c (point)) | ||
| 665 | (move-to-column 9) | ||
| 666 | (setq col (cons (buffer-substring (point) c) col)) | ||
| 667 | (end-of-line 0) | ||
| 668 | (forward-char -10)) | ||
| 669 | (let ((life-patterns (vector (cons (make-string (length (car col)) 32) | ||
| 670 | col)))) | ||
| 671 | (life (or zone-pgm-random-life-wait (random 4))) | ||
| 672 | (kill-buffer nil)))) | ||
| 673 | |||
| 674 | |||
| 620 | ;;;;;;;;;;;;;;; | 675 | ;;;;;;;;;;;;;;; |
| 621 | (provide 'zone) | 676 | (provide 'zone) |
| 622 | 677 | ||
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index eaa6f3be4ea..44675470b67 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -841,6 +841,8 @@ IDL has currently stepped.") | |||
| 841 | (defvar idlwave-shell-sources-query) | 841 | (defvar idlwave-shell-sources-query) |
| 842 | (defvar idlwave-shell-mode-map) | 842 | (defvar idlwave-shell-mode-map) |
| 843 | (defvar idlwave-shell-calling-stack-index) | 843 | (defvar idlwave-shell-calling-stack-index) |
| 844 | (defvar idlwave-shell-only-prompt-pattern nil) | ||
| 845 | (defvar tool-bar-map) | ||
| 844 | 846 | ||
| 845 | (defun idlwave-shell-mode () | 847 | (defun idlwave-shell-mode () |
| 846 | "Major mode for interacting with an inferior IDL process. | 848 | "Major mode for interacting with an inferior IDL process. |
| @@ -994,7 +996,7 @@ IDL has currently stepped.") | |||
| 994 | (setq idlwave-shell-hide-output nil) | 996 | (setq idlwave-shell-hide-output nil) |
| 995 | 997 | ||
| 996 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 998 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 997 | (make-local-hook 'kill-buffer-hook) | 999 | ;;(make-local-hook 'kill-buffer-hook) |
| 998 | (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm | 1000 | (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm |
| 999 | nil 'local) | 1001 | nil 'local) |
| 1000 | (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local) | 1002 | (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local) |
| @@ -1038,7 +1040,7 @@ IDL has currently stepped.") | |||
| 1038 | (setq abbrev-mode t) | 1040 | (setq abbrev-mode t) |
| 1039 | 1041 | ||
| 1040 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1042 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 1041 | (make-local-hook 'post-command-hook) | 1043 | ;;(make-local-hook 'post-command-hook) |
| 1042 | (add-hook 'post-command-hook 'idlwave-command-hook nil t) | 1044 | (add-hook 'post-command-hook 'idlwave-command-hook nil t) |
| 1043 | 1045 | ||
| 1044 | ;; Read the command history? | 1046 | ;; Read the command history? |
| @@ -1458,7 +1460,6 @@ Otherwise just move the line. Move down unless UP is non-nil." | |||
| 1458 | "Return t if the shell process is running." | 1460 | "Return t if the shell process is running." |
| 1459 | (eq (process-status idlwave-shell-process-name) 'run)) | 1461 | (eq (process-status idlwave-shell-process-name) 'run)) |
| 1460 | 1462 | ||
| 1461 | (defvar idlwave-shell-only-prompt-pattern nil) | ||
| 1462 | (defun idlwave-shell-filter-hidden-output (output) | 1463 | (defun idlwave-shell-filter-hidden-output (output) |
| 1463 | "Filter hidden output, leaving the good stuff. | 1464 | "Filter hidden output, leaving the good stuff. |
| 1464 | 1465 | ||
| @@ -1475,6 +1476,7 @@ error messages, etc." | |||
| 1475 | 1476 | ||
| 1476 | (defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" | 1477 | (defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" |
| 1477 | "Buffer containing hidden output from IDL commands.") | 1478 | "Buffer containing hidden output from IDL commands.") |
| 1479 | (defvar idlwave-shell-current-state nil) | ||
| 1478 | 1480 | ||
| 1479 | (defun idlwave-shell-filter (proc string) | 1481 | (defun idlwave-shell-filter (proc string) |
| 1480 | "Watch for IDL prompt and filter incoming text. | 1482 | "Watch for IDL prompt and filter incoming text. |
| @@ -1627,7 +1629,55 @@ and then calls `idlwave-shell-send-command' for any pending commands." | |||
| 1627 | (run-hooks 'idlwave-shell-sentinel-hook)) | 1629 | (run-hooks 'idlwave-shell-sentinel-hook)) |
| 1628 | (run-hooks 'idlwave-shell-sentinel-hook)))) | 1630 | (run-hooks 'idlwave-shell-sentinel-hook)))) |
| 1629 | 1631 | ||
| 1630 | (defvar idlwave-shell-current-state nil) | 1632 | (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" |
| 1633 | "Buffer containing syntax errors from IDL compilations.") | ||
| 1634 | |||
| 1635 | ;; FIXME: the following two variables do not currently allow line breaks | ||
| 1636 | ;; in module and file names. I am not sure if it will be necessary to | ||
| 1637 | ;; change this. Currently it seems to work the way it is. | ||
| 1638 | (defvar idlwave-shell-syntax-error | ||
| 1639 | "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1640 | "A regular expression to match an IDL syntax error. | ||
| 1641 | The 1st pair matches the file name, the second pair matches the line | ||
| 1642 | number.") | ||
| 1643 | |||
| 1644 | (defvar idlwave-shell-other-error | ||
| 1645 | "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1646 | "A regular expression to match any IDL error.") | ||
| 1647 | |||
| 1648 | (defvar idlwave-shell-halting-error | ||
| 1649 | "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" | ||
| 1650 | "A regular expression to match errors which halt execution.") | ||
| 1651 | |||
| 1652 | (defvar idlwave-shell-cant-continue-error | ||
| 1653 | "^% Can't continue from this point.\n" | ||
| 1654 | "A regular expression to match errors stepping errors.") | ||
| 1655 | |||
| 1656 | (defvar idlwave-shell-file-line-message | ||
| 1657 | (concat | ||
| 1658 | "\\(" ; program name group (1) | ||
| 1659 | "\\$MAIN\\$\\|" ; main level routine | ||
| 1660 | "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] | ||
| 1661 | "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2) | ||
| 1662 | "\\)" ; end program name group (1) | ||
| 1663 | "[ \t\n]+" ; white space | ||
| 1664 | "\\(" ; line number group (3) | ||
| 1665 | "[0-9]+" ; the line number (the fix point) | ||
| 1666 | "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) | ||
| 1667 | "\\)" ; end line number group (3) | ||
| 1668 | "[ \t\n]+" ; white space | ||
| 1669 | "\\(" ; file name group (5) | ||
| 1670 | "[^ \t\n]+" ; file names can contain any non-white | ||
| 1671 | "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6) | ||
| 1672 | "\\)" ; end line number group (5) | ||
| 1673 | ) | ||
| 1674 | "*A regular expression to parse out the file name and line number. | ||
| 1675 | The 1st group should match the subroutine name. | ||
| 1676 | The 3rd group is the line number. | ||
| 1677 | The 5th group is the file name. | ||
| 1678 | All parts may contain linebreaks surrounded by spaces. This is important | ||
| 1679 | in IDL5 which inserts random linebreaks in long module and file names.") | ||
| 1680 | |||
| 1631 | (defun idlwave-shell-scan-for-state () | 1681 | (defun idlwave-shell-scan-for-state () |
| 1632 | "Scan for state info. Looks for messages in output from last IDL | 1682 | "Scan for state info. Looks for messages in output from last IDL |
| 1633 | command indicating where IDL has stopped. The types of messages we are | 1683 | command indicating where IDL has stopped. The types of messages we are |
| @@ -1721,55 +1771,6 @@ the above." | |||
| 1721 | ;; Otherwise, no particular state | 1771 | ;; Otherwise, no particular state |
| 1722 | (t (setq idlwave-shell-current-state nil))))) | 1772 | (t (setq idlwave-shell-current-state nil))))) |
| 1723 | 1773 | ||
| 1724 | (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" | ||
| 1725 | "Buffer containing syntax errors from IDL compilations.") | ||
| 1726 | |||
| 1727 | ;; FIXME: the following two variables do not currently allow line breaks | ||
| 1728 | ;; in module and file names. I am not sure if it will be necessary to | ||
| 1729 | ;; change this. Currently it seems to work the way it is. | ||
| 1730 | (defvar idlwave-shell-syntax-error | ||
| 1731 | "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1732 | "A regular expression to match an IDL syntax error. | ||
| 1733 | The 1st pair matches the file name, the second pair matches the line | ||
| 1734 | number.") | ||
| 1735 | |||
| 1736 | (defvar idlwave-shell-other-error | ||
| 1737 | "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1738 | "A regular expression to match any IDL error.") | ||
| 1739 | |||
| 1740 | (defvar idlwave-shell-halting-error | ||
| 1741 | "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" | ||
| 1742 | "A regular expression to match errors which halt execution.") | ||
| 1743 | |||
| 1744 | (defvar idlwave-shell-cant-continue-error | ||
| 1745 | "^% Can't continue from this point.\n" | ||
| 1746 | "A regular expression to match errors stepping errors.") | ||
| 1747 | |||
| 1748 | (defvar idlwave-shell-file-line-message | ||
| 1749 | (concat | ||
| 1750 | "\\(" ; program name group (1) | ||
| 1751 | "\\$MAIN\\$\\|" ; main level routine | ||
| 1752 | "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] | ||
| 1753 | "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2) | ||
| 1754 | "\\)" ; end program name group (1) | ||
| 1755 | "[ \t\n]+" ; white space | ||
| 1756 | "\\(" ; line number group (3) | ||
| 1757 | "[0-9]+" ; the line number (the fix point) | ||
| 1758 | "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) | ||
| 1759 | "\\)" ; end line number group (3) | ||
| 1760 | "[ \t\n]+" ; white space | ||
| 1761 | "\\(" ; file name group (5) | ||
| 1762 | "[^ \t\n]+" ; file names can contain any non-white | ||
| 1763 | "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6) | ||
| 1764 | "\\)" ; end line number group (5) | ||
| 1765 | ) | ||
| 1766 | "*A regular expression to parse out the file name and line number. | ||
| 1767 | The 1st group should match the subroutine name. | ||
| 1768 | The 3rd group is the line number. | ||
| 1769 | The 5th group is the file name. | ||
| 1770 | All parts may contain linebreaks surrounded by spaces. This is important | ||
| 1771 | in IDL5 which inserts random linebreaks in long module and file names.") | ||
| 1772 | |||
| 1773 | (defun idlwave-shell-parse-line (string &optional skip-main) | 1774 | (defun idlwave-shell-parse-line (string &optional skip-main) |
| 1774 | "Parse IDL message for the subroutine, file name and line number. | 1775 | "Parse IDL message for the subroutine, file name and line number. |
| 1775 | We need to work hard here to remove the stupid line breaks inserted by | 1776 | We need to work hard here to remove the stupid line breaks inserted by |
| @@ -2102,8 +2103,8 @@ Change the default directory for the process buffer to concur." | |||
| 2102 | 'hide 'wait) | 2103 | 'hide 'wait) |
| 2103 | ;; If we don't know anything about the class, update shell routines | 2104 | ;; If we don't know anything about the class, update shell routines |
| 2104 | (if (and idlwave-shell-get-object-class | 2105 | (if (and idlwave-shell-get-object-class |
| 2105 | (not (assoc-ignore-case idlwave-shell-get-object-class | 2106 | (not (assoc-string idlwave-shell-get-object-class |
| 2106 | (idlwave-class-alist)))) | 2107 | (idlwave-class-alist) t))) |
| 2107 | (idlwave-shell-maybe-update-routine-info)) | 2108 | (idlwave-shell-maybe-update-routine-info)) |
| 2108 | idlwave-shell-get-object-class))) | 2109 | idlwave-shell-get-object-class))) |
| 2109 | 2110 | ||
| @@ -2165,9 +2166,10 @@ keywords." | |||
| 2165 | (idlwave-complete arg))))) | 2166 | (idlwave-complete arg))))) |
| 2166 | 2167 | ||
| 2167 | ;; Get rid of opaque dynamic variable passing of link? | 2168 | ;; Get rid of opaque dynamic variable passing of link? |
| 2169 | (defvar link) ;dynamic variable | ||
| 2168 | (defun idlwave-shell-complete-execcomm-help (mode word) | 2170 | (defun idlwave-shell-complete-execcomm-help (mode word) |
| 2169 | (let ((word (or (nth 1 idlwave-completion-help-info) word)) | 2171 | (let ((word (or (nth 1 idlwave-completion-help-info) word)) |
| 2170 | (entry (assoc-ignore-case word idlwave-executive-commands-alist))) | 2172 | (entry (assoc-string word idlwave-executive-commands-alist t))) |
| 2171 | (cond | 2173 | (cond |
| 2172 | ((eq mode 'test) | 2174 | ((eq mode 'test) |
| 2173 | (and (stringp word) entry (cdr entry))) | 2175 | (and (stringp word) entry (cdr entry))) |
| @@ -2217,6 +2219,7 @@ args of an executive .run, .rnew or .compile." | |||
| 2217 | (looking-at "\\$"))) | 2219 | (looking-at "\\$"))) |
| 2218 | 2220 | ||
| 2219 | ;; Debugging Commands ------------------------------------------------------ | 2221 | ;; Debugging Commands ------------------------------------------------------ |
| 2222 | (defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode | ||
| 2220 | 2223 | ||
| 2221 | (defun idlwave-shell-redisplay (&optional hide) | 2224 | (defun idlwave-shell-redisplay (&optional hide) |
| 2222 | "Tries to resync the display with where execution has stopped. | 2225 | "Tries to resync the display with where execution has stopped. |
| @@ -3517,6 +3520,7 @@ considered the new breakpoint if the file name of frame matches." | |||
| 3517 | 3520 | ||
| 3518 | (defvar idlwave-shell-bp-overlays nil | 3521 | (defvar idlwave-shell-bp-overlays nil |
| 3519 | "Alist of overlays marking breakpoints") | 3522 | "Alist of overlays marking breakpoints") |
| 3523 | (defvar idlwave-shell-bp-glyph) | ||
| 3520 | 3524 | ||
| 3521 | (defun idlwave-shell-update-bp-overlays () | 3525 | (defun idlwave-shell-update-bp-overlays () |
| 3522 | "Update the overlays which mark breakpoints in the source code. | 3526 | "Update the overlays which mark breakpoints in the source code. |
| @@ -3605,7 +3609,6 @@ Existing overlays are recycled, in order to minimize consumption." | |||
| 3605 | (set-window-buffer win buf)))))))) | 3609 | (set-window-buffer win buf)))))))) |
| 3606 | 3610 | ||
| 3607 | 3611 | ||
| 3608 | (defvar idlwave-shell-bp-glyph) | ||
| 3609 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) | 3612 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) |
| 3610 | "Make a new overlay for highlighting breakpoints. | 3613 | "Make a new overlay for highlighting breakpoints. |
| 3611 | 3614 | ||
| @@ -4026,7 +4029,7 @@ Otherwise, just expand the file name." | |||
| 4026 | '(alt)))) | 4029 | '(alt)))) |
| 4027 | (shift (memq 'shift mod)) | 4030 | (shift (memq 'shift mod)) |
| 4028 | (mod-noshift (delete 'shift (copy-sequence mod))) | 4031 | (mod-noshift (delete 'shift (copy-sequence mod))) |
| 4029 | s k1 c2 k2 cmd cannotshift) | 4032 | s k1 c2 k2 cmd electric only-buffer cannotshift) |
| 4030 | (while (setq s (pop specs)) | 4033 | (while (setq s (pop specs)) |
| 4031 | (setq k1 (nth 0 s) | 4034 | (setq k1 (nth 0 s) |
| 4032 | c2 (nth 1 s) | 4035 | c2 (nth 1 s) |
| @@ -4089,6 +4092,9 @@ Otherwise, just expand the file name." | |||
| 4089 | (setq idlwave-shell-suppress-electric-debug nil)) | 4092 | (setq idlwave-shell-suppress-electric-debug nil)) |
| 4090 | (idlwave-shell-electric-debug-mode)) | 4093 | (idlwave-shell-electric-debug-mode)) |
| 4091 | 4094 | ||
| 4095 | (defvar idlwave-shell-electric-debug-read-only) | ||
| 4096 | (defvar idlwave-shell-electric-debug-buffers nil) | ||
| 4097 | |||
| 4092 | (easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode | 4098 | (easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode |
| 4093 | "Toggle Electric Debug mode. | 4099 | "Toggle Electric Debug mode. |
| 4094 | With no argument, this command toggles the mode. | 4100 | With no argument, this command toggles the mode. |
| @@ -4138,7 +4144,6 @@ idlwave-shell-electric-debug-mode-map) | |||
| 4138 | (force-mode-line-update)) | 4144 | (force-mode-line-update)) |
| 4139 | 4145 | ||
| 4140 | ;; Turn it off in all relevant buffers | 4146 | ;; Turn it off in all relevant buffers |
| 4141 | (defvar idlwave-shell-electric-debug-buffers nil) | ||
| 4142 | (defun idlwave-shell-electric-debug-all-off () | 4147 | (defun idlwave-shell-electric-debug-all-off () |
| 4143 | (setq idlwave-shell-suppress-electric-debug nil) | 4148 | (setq idlwave-shell-suppress-electric-debug nil) |
| 4144 | (let ((buffers idlwave-shell-electric-debug-buffers) | 4149 | (let ((buffers idlwave-shell-electric-debug-buffers) |
diff --git a/lisp/replace.el b/lisp/replace.el index 8a5c0a9680c..646f693cd7f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1214,7 +1214,7 @@ but coerced to the correct value of INTEGERS." | |||
| 1214 | 1214 | ||
| 1215 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) | 1215 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) |
| 1216 | "Make a replacement with `replace-match', editing `\\?'. | 1216 | "Make a replacement with `replace-match', editing `\\?'. |
| 1217 | NEXTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no | 1217 | NEWTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no |
| 1218 | check for `\\?' is made to save time. MATCH-DATA is used for the | 1218 | check for `\\?' is made to save time. MATCH-DATA is used for the |
| 1219 | replacement. In case editing is done, it is changed to use markers. | 1219 | replacement. In case editing is done, it is changed to use markers. |
| 1220 | 1220 | ||
| @@ -1281,6 +1281,8 @@ make, or the user didn't cancel the call." | |||
| 1281 | ;; (match-data); otherwise it is t if a match is possible at point. | 1281 | ;; (match-data); otherwise it is t if a match is possible at point. |
| 1282 | (match-again t) | 1282 | (match-again t) |
| 1283 | 1283 | ||
| 1284 | (isearch-string isearch-string) | ||
| 1285 | (isearch-regexp isearch-regexp) | ||
| 1284 | (message | 1286 | (message |
| 1285 | (if query-flag | 1287 | (if query-flag |
| 1286 | (substitute-command-keys | 1288 | (substitute-command-keys |
| @@ -1313,6 +1315,10 @@ make, or the user didn't cancel the call." | |||
| 1313 | (if regexp-flag from-string | 1315 | (if regexp-flag from-string |
| 1314 | (regexp-quote from-string)) | 1316 | (regexp-quote from-string)) |
| 1315 | "\\b"))) | 1317 | "\\b"))) |
| 1318 | (if (eq query-replace-highlight 'isearch) | ||
| 1319 | (setq isearch-string search-string | ||
| 1320 | isearch-regexp regexp-flag)) | ||
| 1321 | |||
| 1316 | (push-mark) | 1322 | (push-mark) |
| 1317 | (undo-boundary) | 1323 | (undo-boundary) |
| 1318 | (unwind-protect | 1324 | (unwind-protect |
| @@ -1380,7 +1386,7 @@ make, or the user didn't cancel the call." | |||
| 1380 | (if (not query-flag) | 1386 | (if (not query-flag) |
| 1381 | (let ((inhibit-read-only | 1387 | (let ((inhibit-read-only |
| 1382 | query-replace-skip-read-only)) | 1388 | query-replace-skip-read-only)) |
| 1383 | (unless noedit | 1389 | (unless (or literal noedit) |
| 1384 | (replace-highlight (nth 0 real-match-data) | 1390 | (replace-highlight (nth 0 real-match-data) |
| 1385 | (nth 1 real-match-data))) | 1391 | (nth 1 real-match-data))) |
| 1386 | (setq noedit | 1392 | (setq noedit |
| @@ -1528,7 +1534,14 @@ make, or the user didn't cancel the call." | |||
| 1528 | (setq unread-command-events | 1534 | (setq unread-command-events |
| 1529 | (append (listify-key-sequence key) | 1535 | (append (listify-key-sequence key) |
| 1530 | unread-command-events)) | 1536 | unread-command-events)) |
| 1531 | (setq done t)))) | 1537 | (setq done t))) |
| 1538 | (when (eq query-replace-highlight 'isearch) | ||
| 1539 | ;; Force isearch rehighlighting | ||
| 1540 | (if (not (memq def '(skip backup))) | ||
| 1541 | (setq isearch-lazy-highlight-last-string nil)) | ||
| 1542 | ;; Restore isearch data in case of isearching during edit | ||
| 1543 | (setq isearch-string search-string | ||
| 1544 | isearch-regexp regexp-flag))) | ||
| 1532 | ;; Record previous position for ^ when we move on. | 1545 | ;; Record previous position for ^ when we move on. |
| 1533 | ;; Change markers to numbers in the match data | 1546 | ;; Change markers to numbers in the match data |
| 1534 | ;; since lots of markers slow down editing. | 1547 | ;; since lots of markers slow down editing. |
| @@ -1563,27 +1576,38 @@ make, or the user didn't cancel the call." | |||
| 1563 | (if (= replace-count 1) "" "s"))) | 1576 | (if (= replace-count 1) "" "s"))) |
| 1564 | (and keep-going stack))) | 1577 | (and keep-going stack))) |
| 1565 | 1578 | ||
| 1566 | (defcustom query-replace-highlight t | 1579 | (defcustom query-replace-highlight |
| 1567 | "*Non-nil means to highlight words during query replacement." | 1580 | (if (and search-highlight isearch-lazy-highlight) 'isearch t) |
| 1568 | :type 'boolean | 1581 | "*Non-nil means to highlight words during query replacement. |
| 1582 | If `isearch', use isearch highlighting for query replacement." | ||
| 1583 | :type '(choice (const :tag "Highlight" t) | ||
| 1584 | (const :tag "No highlighting" nil) | ||
| 1585 | (const :tag "Isearch highlighting" 'isearch)) | ||
| 1569 | :group 'matching) | 1586 | :group 'matching) |
| 1570 | 1587 | ||
| 1571 | (defvar replace-overlay nil) | 1588 | (defvar replace-overlay nil) |
| 1572 | 1589 | ||
| 1573 | (defun replace-dehighlight () | 1590 | (defun replace-dehighlight () |
| 1574 | (and replace-overlay | 1591 | (cond ((eq query-replace-highlight 'isearch) |
| 1575 | (progn | 1592 | (isearch-dehighlight t) |
| 1576 | (delete-overlay replace-overlay) | 1593 | (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) |
| 1577 | (setq replace-overlay nil)))) | 1594 | (setq isearch-lazy-highlight-last-string nil)) |
| 1595 | (query-replace-highlight | ||
| 1596 | (when replace-overlay | ||
| 1597 | (delete-overlay replace-overlay) | ||
| 1598 | (setq replace-overlay nil))))) | ||
| 1578 | 1599 | ||
| 1579 | (defun replace-highlight (start end) | 1600 | (defun replace-highlight (start end) |
| 1580 | (and query-replace-highlight | 1601 | (cond ((eq query-replace-highlight 'isearch) |
| 1581 | (if replace-overlay | 1602 | (isearch-highlight start end) |
| 1582 | (move-overlay replace-overlay start end (current-buffer)) | 1603 | (isearch-lazy-highlight-new-loop)) |
| 1583 | (setq replace-overlay (make-overlay start end)) | 1604 | (query-replace-highlight |
| 1584 | (overlay-put replace-overlay 'face | 1605 | (if replace-overlay |
| 1585 | (if (facep 'query-replace) | 1606 | (move-overlay replace-overlay start end (current-buffer)) |
| 1586 | 'query-replace 'region))))) | 1607 | (setq replace-overlay (make-overlay start end)) |
| 1608 | (overlay-put replace-overlay 'face | ||
| 1609 | (if (facep 'query-replace) | ||
| 1610 | 'query-replace 'region)))))) | ||
| 1587 | 1611 | ||
| 1588 | ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 | 1612 | ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 |
| 1589 | ;;; replace.el ends here | 1613 | ;;; replace.el ends here |
diff --git a/lisp/simple.el b/lisp/simple.el index 979f3835c57..4a95b18bcb9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -123,33 +123,33 @@ to navigate in it.") | |||
| 123 | 123 | ||
| 124 | (make-variable-buffer-local 'next-error-function) | 124 | (make-variable-buffer-local 'next-error-function) |
| 125 | 125 | ||
| 126 | (defsubst next-error-buffer-p (buffer | 126 | (defsubst next-error-buffer-p (buffer |
| 127 | &optional | 127 | &optional |
| 128 | extra-test-inclusive | 128 | extra-test-inclusive |
| 129 | extra-test-exclusive) | 129 | extra-test-exclusive) |
| 130 | "Test if BUFFER is a next-error capable buffer. | 130 | "Test if BUFFER is a next-error capable buffer. |
| 131 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. | 131 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. |
| 132 | EXTRA-TEST-INCLUSIVE is called to disallow buffers." | 132 | EXTRA-TEST-EXCLUSIVE is called to disallow buffers." |
| 133 | (with-current-buffer buffer | 133 | (with-current-buffer buffer |
| 134 | (or (and extra-test-inclusive (funcall extra-test-inclusive)) | 134 | (or (and extra-test-inclusive (funcall extra-test-inclusive)) |
| 135 | (and (if extra-test-exclusive (funcall extra-test-exclusive) t) | 135 | (and (if extra-test-exclusive (funcall extra-test-exclusive) t) |
| 136 | next-error-function)))) | 136 | next-error-function)))) |
| 137 | 137 | ||
| 138 | (defun next-error-find-buffer (&optional other-buffer | 138 | (defun next-error-find-buffer (&optional other-buffer |
| 139 | extra-test-inclusive | 139 | extra-test-inclusive |
| 140 | extra-test-exclusive) | 140 | extra-test-exclusive) |
| 141 | "Return a next-error capable buffer. | 141 | "Return a next-error capable buffer. |
| 142 | OTHER-BUFFER will disallow the current buffer. | 142 | OTHER-BUFFER will disallow the current buffer. |
| 143 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. | 143 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. |
| 144 | EXTRA-TEST-INCLUSIVE is called to disallow buffers." | 144 | EXTRA-TEST-EXCLUSIVE is called to disallow buffers." |
| 145 | (or | 145 | (or |
| 146 | ;; 1. If one window on the selected frame displays such buffer, return it. | 146 | ;; 1. If one window on the selected frame displays such buffer, return it. |
| 147 | (let ((window-buffers | 147 | (let ((window-buffers |
| 148 | (delete-dups | 148 | (delete-dups |
| 149 | (delq nil (mapcar (lambda (w) | 149 | (delq nil (mapcar (lambda (w) |
| 150 | (if (next-error-buffer-p | 150 | (if (next-error-buffer-p |
| 151 | (window-buffer w) | 151 | (window-buffer w) |
| 152 | extra-test-inclusive extra-test-exclusive) | 152 | extra-test-inclusive extra-test-exclusive) |
| 153 | (window-buffer w))) | 153 | (window-buffer w))) |
| 154 | (window-list)))))) | 154 | (window-list)))))) |
| 155 | (if other-buffer | 155 | (if other-buffer |
| @@ -159,29 +159,29 @@ EXTRA-TEST-INCLUSIVE is called to disallow buffers." | |||
| 159 | ;; 2. If next-error-last-buffer is set to a live buffer, use that. | 159 | ;; 2. If next-error-last-buffer is set to a live buffer, use that. |
| 160 | (if (and next-error-last-buffer | 160 | (if (and next-error-last-buffer |
| 161 | (buffer-name next-error-last-buffer) | 161 | (buffer-name next-error-last-buffer) |
| 162 | (next-error-buffer-p next-error-last-buffer | 162 | (next-error-buffer-p next-error-last-buffer |
| 163 | extra-test-inclusive extra-test-exclusive) | 163 | extra-test-inclusive extra-test-exclusive) |
| 164 | (or (not other-buffer) | 164 | (or (not other-buffer) |
| 165 | (not (eq next-error-last-buffer (current-buffer))))) | 165 | (not (eq next-error-last-buffer (current-buffer))))) |
| 166 | next-error-last-buffer) | 166 | next-error-last-buffer) |
| 167 | ;; 3. If the current buffer is a next-error capable buffer, return it. | 167 | ;; 3. If the current buffer is a next-error capable buffer, return it. |
| 168 | (if (and (not other-buffer) | 168 | (if (and (not other-buffer) |
| 169 | (next-error-buffer-p (current-buffer) | 169 | (next-error-buffer-p (current-buffer) |
| 170 | extra-test-inclusive extra-test-exclusive)) | 170 | extra-test-inclusive extra-test-exclusive)) |
| 171 | (current-buffer)) | 171 | (current-buffer)) |
| 172 | ;; 4. Look for a next-error capable buffer in a buffer list. | 172 | ;; 4. Look for a next-error capable buffer in a buffer list. |
| 173 | (let ((buffers (buffer-list))) | 173 | (let ((buffers (buffer-list))) |
| 174 | (while (and buffers | 174 | (while (and buffers |
| 175 | (or (not (next-error-buffer-p | 175 | (or (not (next-error-buffer-p |
| 176 | (car buffers) | 176 | (car buffers) |
| 177 | extra-test-inclusive extra-test-exclusive)) | 177 | extra-test-inclusive extra-test-exclusive)) |
| 178 | (and other-buffer (eq (car buffers) (current-buffer))))) | 178 | (and other-buffer (eq (car buffers) (current-buffer))))) |
| 179 | (setq buffers (cdr buffers))) | 179 | (setq buffers (cdr buffers))) |
| 180 | (if buffers | 180 | (if buffers |
| 181 | (car buffers) | 181 | (car buffers) |
| 182 | (or (and other-buffer | 182 | (or (and other-buffer |
| 183 | (next-error-buffer-p (current-buffer) | 183 | (next-error-buffer-p (current-buffer) |
| 184 | extra-test-inclusive extra-test-exclusive) | 184 | extra-test-inclusive extra-test-exclusive) |
| 185 | ;; The current buffer is a next-error capable buffer. | 185 | ;; The current buffer is a next-error capable buffer. |
| 186 | (progn | 186 | (progn |
| 187 | (if other-buffer | 187 | (if other-buffer |
| @@ -646,7 +646,8 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." | |||
| 646 | (constrain-to-field nil orig-pos t))))) | 646 | (constrain-to-field nil orig-pos t))))) |
| 647 | 647 | ||
| 648 | (defvar inhibit-mark-movement nil | 648 | (defvar inhibit-mark-movement nil |
| 649 | "If non-nil, \\[beginning-of-buffer] and \\[end-of-buffer] does not set the mark.") | 649 | "If non-nil, movement commands, such as \\[beginning-of-buffer], \ |
| 650 | do not set the mark.") | ||
| 650 | 651 | ||
| 651 | (defun beginning-of-buffer (&optional arg) | 652 | (defun beginning-of-buffer (&optional arg) |
| 652 | "Move point to the beginning of the buffer; leave mark at previous position. | 653 | "Move point to the beginning of the buffer; leave mark at previous position. |
| @@ -659,8 +660,10 @@ of the accessible part of the buffer. | |||
| 659 | Don't use this command in Lisp programs! | 660 | Don't use this command in Lisp programs! |
| 660 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 661 | \(goto-char (point-min)) is faster and avoids clobbering the mark." |
| 661 | (interactive "P") | 662 | (interactive "P") |
| 662 | (unless (or inhibit-mark-movement (consp arg)) | 663 | (or inhibit-mark-movement |
| 663 | (push-mark)) | 664 | (consp arg) |
| 665 | (and transient-mark-mode mark-active) | ||
| 666 | (push-mark)) | ||
| 664 | (let ((size (- (point-max) (point-min)))) | 667 | (let ((size (- (point-max) (point-min)))) |
| 665 | (goto-char (if (and arg (not (consp arg))) | 668 | (goto-char (if (and arg (not (consp arg))) |
| 666 | (+ (point-min) | 669 | (+ (point-min) |
| @@ -683,8 +686,10 @@ of the accessible part of the buffer. | |||
| 683 | Don't use this command in Lisp programs! | 686 | Don't use this command in Lisp programs! |
| 684 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 687 | \(goto-char (point-max)) is faster and avoids clobbering the mark." |
| 685 | (interactive "P") | 688 | (interactive "P") |
| 686 | (unless (or inhibit-mark-movement (consp arg)) | 689 | (or inhibit-mark-movement |
| 687 | (push-mark)) | 690 | (consp arg) |
| 691 | (and transient-mark-mode mark-active) | ||
| 692 | (push-mark)) | ||
| 688 | (let ((size (- (point-max) (point-min)))) | 693 | (let ((size (- (point-max) (point-min)))) |
| 689 | (goto-char (if (and arg (not (consp arg))) | 694 | (goto-char (if (and arg (not (consp arg))) |
| 690 | (- (point-max) | 695 | (- (point-max) |
| @@ -2987,11 +2992,11 @@ You can also deactivate the mark by typing \\[keyboard-quit] or | |||
| 2987 | Many commands change their behavior when Transient Mark mode is in effect | 2992 | Many commands change their behavior when Transient Mark mode is in effect |
| 2988 | and the mark is active, by acting on the region instead of their usual | 2993 | and the mark is active, by acting on the region instead of their usual |
| 2989 | default part of the buffer's text. Examples of such commands include | 2994 | default part of the buffer's text. Examples of such commands include |
| 2990 | \\[comment-dwim], \\[flush-lines], \\[ispell], \\[keep-lines], | 2995 | \\[comment-dwim], \\[flush-lines], \\[keep-lines], \ |
| 2991 | \\[query-replace], \\[query-replace-regexp], and \\[undo]. Invoke | 2996 | \\[query-replace], \\[query-replace-regexp], \\[ispell], and \\[undo]. |
| 2992 | \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at | 2997 | Invoke \\[apropos-documentation] and type \"transient\" or |
| 2993 | the prompt, to see the documentation of commands which are sensitive to | 2998 | \"mark.*active\" at the prompt, to see the documentation of |
| 2994 | the Transient Mark mode." | 2999 | commands which are sensitive to the Transient Mark mode." |
| 2995 | :global t :group 'editing-basics :require nil) | 3000 | :global t :group 'editing-basics :require nil) |
| 2996 | 3001 | ||
| 2997 | (defun pop-global-mark () | 3002 | (defun pop-global-mark () |
| @@ -3242,7 +3247,7 @@ Outline mode sets this." | |||
| 3242 | (if (if forward | 3247 | (if (if forward |
| 3243 | ;; If going forward, don't accept the previous | 3248 | ;; If going forward, don't accept the previous |
| 3244 | ;; allowable position if it is before the target line. | 3249 | ;; allowable position if it is before the target line. |
| 3245 | (< line-beg (point)) | 3250 | (< line-beg (point)) |
| 3246 | ;; If going backward, don't accept the previous | 3251 | ;; If going backward, don't accept the previous |
| 3247 | ;; allowable position if it is still after the target line. | 3252 | ;; allowable position if it is still after the target line. |
| 3248 | (<= (point) line-end)) | 3253 | (<= (point) line-end)) |
| @@ -3523,12 +3528,17 @@ With argument, do this that many times." | |||
| 3523 | (interactive "p") | 3528 | (interactive "p") |
| 3524 | (forward-word (- (or arg 1)))) | 3529 | (forward-word (- (or arg 1)))) |
| 3525 | 3530 | ||
| 3526 | (defun mark-word (arg) | 3531 | (defun mark-word (&optional arg) |
| 3527 | "Set mark arg words away from point. | 3532 | "Set mark ARG words away from point. |
| 3528 | If this command is repeated, it marks the next ARG words after the ones | 3533 | The place mark goes is the same place \\[forward-word] would |
| 3529 | already marked." | 3534 | move to with the same argument. |
| 3530 | (interactive "p") | 3535 | If this command is repeated or mark is active in Transient Mark mode, |
| 3531 | (cond ((and (eq last-command this-command) (mark t)) | 3536 | it marks the next ARG words after the ones already marked." |
| 3537 | (interactive "P") | ||
| 3538 | (cond ((or (and (eq last-command this-command) (mark t)) | ||
| 3539 | (and transient-mark-mode mark-active)) | ||
| 3540 | (setq arg (if arg (prefix-numeric-value arg) | ||
| 3541 | (if (< (mark) (point)) -1 1))) | ||
| 3532 | (set-mark | 3542 | (set-mark |
| 3533 | (save-excursion | 3543 | (save-excursion |
| 3534 | (goto-char (mark)) | 3544 | (goto-char (mark)) |
| @@ -3537,7 +3547,7 @@ already marked." | |||
| 3537 | (t | 3547 | (t |
| 3538 | (push-mark | 3548 | (push-mark |
| 3539 | (save-excursion | 3549 | (save-excursion |
| 3540 | (forward-word arg) | 3550 | (forward-word (prefix-numeric-value arg)) |
| 3541 | (point)) | 3551 | (point)) |
| 3542 | nil t)))) | 3552 | nil t)))) |
| 3543 | 3553 | ||
| @@ -4021,8 +4031,7 @@ or go back to just one window (by deleting all but the selected window)." | |||
| 4021 | (abort-recursive-edit)) | 4031 | (abort-recursive-edit)) |
| 4022 | (current-prefix-arg | 4032 | (current-prefix-arg |
| 4023 | nil) | 4033 | nil) |
| 4024 | ((and transient-mark-mode | 4034 | ((and transient-mark-mode mark-active) |
| 4025 | mark-active) | ||
| 4026 | (deactivate-mark)) | 4035 | (deactivate-mark)) |
| 4027 | ((> (recursion-depth) 0) | 4036 | ((> (recursion-depth) 0) |
| 4028 | (exit-recursive-edit)) | 4037 | (exit-recursive-edit)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 4c695ea167d..c20eaad9c56 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1862,6 +1862,19 @@ is allowed once again." | |||
| 1862 | ,@body) | 1862 | ,@body) |
| 1863 | (quit (setq quit-flag t) nil))) | 1863 | (quit (setq quit-flag t) nil))) |
| 1864 | 1864 | ||
| 1865 | (defmacro while-no-input (&rest body) | ||
| 1866 | "Execute BODY only as long as there's no pending input. | ||
| 1867 | If input arrives, that ends the execution of BODY, | ||
| 1868 | and `while-no-input' returns nil. If BODY finishes, | ||
| 1869 | `while-no-input' returns whatever value BODY produced." | ||
| 1870 | (declare (debug t) (indent 0)) | ||
| 1871 | (let ((catch-sym (make-symbol "input"))) | ||
| 1872 | `(with-local-quit | ||
| 1873 | (catch ',catch-sym | ||
| 1874 | (let ((throw-on-input ',catch-sym)) | ||
| 1875 | (when (sit-for 0 0 t) | ||
| 1876 | ,@body)))))) | ||
| 1877 | |||
| 1865 | (defmacro combine-after-change-calls (&rest body) | 1878 | (defmacro combine-after-change-calls (&rest body) |
| 1866 | "Execute BODY, but don't call the after-change functions till the end. | 1879 | "Execute BODY, but don't call the after-change functions till the end. |
| 1867 | If BODY makes changes in the buffer, they are recorded | 1880 | If BODY makes changes in the buffer, they are recorded |
diff --git a/lisp/term.el b/lisp/term.el index 8f3ba77daf5..32e249024d9 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1400,7 +1400,7 @@ The main purpose is to get rid of the local keymap." | |||
| 1400 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ | 1400 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ |
| 1401 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ | 1401 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ |
| 1402 | :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ | 1402 | :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ |
| 1403 | :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:" | 1403 | :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:" |
| 1404 | ;;; : -undefine ic | 1404 | ;;; : -undefine ic |
| 1405 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ | 1405 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ |
| 1406 | "termcap capabilities supported") | 1406 | "termcap capabilities supported") |
| @@ -2891,6 +2891,10 @@ See `term-prompt-regexp'." | |||
| 2891 | (term-goto (car term-saved-cursor) | 2891 | (term-goto (car term-saved-cursor) |
| 2892 | (cdr term-saved-cursor))) | 2892 | (cdr term-saved-cursor))) |
| 2893 | (setq term-terminal-state 0)) | 2893 | (setq term-terminal-state 0)) |
| 2894 | ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) | ||
| 2895 | ;; This is used by the "clear" program. | ||
| 2896 | (setq term-terminal-state 0) | ||
| 2897 | (term-reset-terminal)) | ||
| 2894 | ;; The \E#8 reset sequence for xterm. We | 2898 | ;; The \E#8 reset sequence for xterm. We |
| 2895 | ;; probably don't need to handle it, but this | 2899 | ;; probably don't need to handle it, but this |
| 2896 | ;; is the code to parse it. | 2900 | ;; is the code to parse it. |
| @@ -3018,13 +3022,29 @@ See `term-prompt-regexp'." | |||
| 3018 | (set-marker term-home-marker (point)) | 3022 | (set-marker term-home-marker (point)) |
| 3019 | (setq term-current-row (1- term-height)))))) | 3023 | (setq term-current-row (1- term-height)))))) |
| 3020 | 3024 | ||
| 3025 | ;;; Reset the terminal, delete all the content and set the face to the | ||
| 3026 | ;;; default one. | ||
| 3027 | (defun term-reset-terminal () | ||
| 3028 | (erase-buffer) | ||
| 3029 | (setq term-current-row 1) | ||
| 3030 | (setq term-current-column 1) | ||
| 3031 | (setq term-insert-mode nil) | ||
| 3032 | (setq term-current-face nil) | ||
| 3033 | (setq term-ansi-current-underline 0) | ||
| 3034 | (setq term-ansi-current-bold 0) | ||
| 3035 | (setq term-ansi-current-reverse 0) | ||
| 3036 | (setq term-ansi-current-color 0) | ||
| 3037 | (setq term-ansi-current-invisible 0) | ||
| 3038 | (setq term-ansi-face-already-done 1) | ||
| 3039 | (setq term-ansi-current-bg-color 0)) | ||
| 3040 | |||
| 3021 | ;;; New function to deal with ansi colorized output, as you can see you can | 3041 | ;;; New function to deal with ansi colorized output, as you can see you can |
| 3022 | ;;; have any bold/underline/fg/bg/reverse combination. -mm | 3042 | ;;; have any bold/underline/fg/bg/reverse combination. -mm |
| 3023 | 3043 | ||
| 3024 | (defun term-handle-colors-array (parameter) | 3044 | (defun term-handle-colors-array (parameter) |
| 3025 | (cond | 3045 | (cond |
| 3026 | 3046 | ||
| 3027 | ;;; Bold | 3047 | ;;; Bold (terminfo: bold) |
| 3028 | ((eq parameter 1) | 3048 | ((eq parameter 1) |
| 3029 | (setq term-ansi-current-bold 1)) | 3049 | (setq term-ansi-current-bold 1)) |
| 3030 | 3050 | ||
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 206f7a42f78..353aa0ee8a2 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -357,13 +357,15 @@ the number of paragraphs marked equals ARG. | |||
| 357 | If ARG is negative, point is put at end of this paragraph, mark is put | 357 | If ARG is negative, point is put at end of this paragraph, mark is put |
| 358 | at beginning of this or a previous paragraph. | 358 | at beginning of this or a previous paragraph. |
| 359 | 359 | ||
| 360 | If this command is repeated, it marks the next ARG paragraphs after (or | 360 | If this command is repeated or mark is active in Transient Mark mode, |
| 361 | before, if arg is negative) the ones already marked." | 361 | it marks the next ARG paragraphs after (or before, if arg is negative) |
| 362 | the ones already marked." | ||
| 362 | (interactive "p") | 363 | (interactive "p") |
| 363 | (unless arg (setq arg 1)) | 364 | (unless arg (setq arg 1)) |
| 364 | (when (zerop arg) | 365 | (when (zerop arg) |
| 365 | (error "Cannot mark zero paragraphs")) | 366 | (error "Cannot mark zero paragraphs")) |
| 366 | (cond ((and (eq last-command this-command) (mark t)) | 367 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 368 | (and transient-mark-mode mark-active)) | ||
| 367 | (set-mark | 369 | (set-mark |
| 368 | (save-excursion | 370 | (save-excursion |
| 369 | (goto-char (mark)) | 371 | (goto-char (mark)) |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 48b5edb3a69..1f9336fef50 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1351,7 +1351,9 @@ Mark is left at original location." | |||
| 1351 | (when (eq (char-after) ?{) | 1351 | (when (eq (char-after) ?{) |
| 1352 | (let ((newpos (point))) | 1352 | (let ((newpos (point))) |
| 1353 | (when (ignore-errors (backward-sexp 1) t) | 1353 | (when (ignore-errors (backward-sexp 1) t) |
| 1354 | (if (looking-at "\\\\end\\>") | 1354 | (if (or (looking-at "\\\\end\\>") |
| 1355 | ;; In case the \\ ends a verbatim section. | ||
| 1356 | (and (looking-at "end\\>") (eq (char-before) ?\\))) | ||
| 1355 | (tex-last-unended-begin) | 1357 | (tex-last-unended-begin) |
| 1356 | (goto-char newpos)))))))) | 1358 | (goto-char newpos)))))))) |
| 1357 | 1359 | ||
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index c9663baff8f..9bb5ef1c3e5 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-handlers.el: Don't `require' everything eagerly. | ||
| 4 | |||
| 1 | 2004-11-30 Paul Pogonyshev <pogonyshev@gmx.net> | 5 | 2004-11-30 Paul Pogonyshev <pogonyshev@gmx.net> |
| 2 | 6 | ||
| 3 | * url-http.el (url-http-handle-cookies): Bind `url-current-object' | 7 | * url-http.el (url-http-handle-cookies): Bind `url-current-object' |
| @@ -18,8 +22,7 @@ | |||
| 18 | 22 | ||
| 19 | 2004-11-12 Masatake YAMATO <jet@gyve.org> | 23 | 2004-11-12 Masatake YAMATO <jet@gyve.org> |
| 20 | 24 | ||
| 21 | * url-mailto.el (url-mailto): Fix a typo in the | 25 | * url-mailto.el (url-mailto): Fix a typo in the comment. |
| 22 | comment. | ||
| 23 | 26 | ||
| 24 | 2004-11-02 Masatake YAMATO <jet@gyve.org> | 27 | 2004-11-02 Masatake YAMATO <jet@gyve.org> |
| 25 | 28 | ||
| @@ -76,12 +79,12 @@ | |||
| 76 | 79 | ||
| 77 | * url-vars.el (url-passwd-entry-func): Var deleted. | 80 | * url-vars.el (url-passwd-entry-func): Var deleted. |
| 78 | (mm-mime-mule-charset-alist): Remove compatibility code for old Gnus. | 81 | (mm-mime-mule-charset-alist): Remove compatibility code for old Gnus. |
| 79 | (url-weekday-alist): Renamed from weekday-alist. | 82 | (url-weekday-alist): Rename from weekday-alist. |
| 80 | (url-monthabbrev-alist): Renamed from monthabbrev-alist. | 83 | (url-monthabbrev-alist): Rename from monthabbrev-alist. |
| 81 | (url-vars-unload-hook): Initialize hook var to hold the function. | 84 | (url-vars-unload-hook): Initialize hook var to hold the function. |
| 82 | 85 | ||
| 83 | * url-util.el (url-get-normalized-date): Use | 86 | * url-util.el (url-get-normalized-date): Use url-weekday-alist and |
| 84 | url-weekday-alist and url-monthabbrev-alist. | 87 | url-monthabbrev-alist. |
| 85 | 88 | ||
| 86 | * url-misc.el: Load cl at compile time. | 89 | * url-misc.el: Load cl at compile time. |
| 87 | 90 | ||
| @@ -99,8 +102,8 @@ | |||
| 99 | * url-news.el (url-snews): Use nntp-open-tls-stream if | 102 | * url-news.el (url-snews): Use nntp-open-tls-stream if |
| 100 | url-gateway-method is tls. | 103 | url-gateway-method is tls. |
| 101 | 104 | ||
| 102 | * url-ldap.el (url-ldap-certificate-formatter): Use | 105 | * url-ldap.el (url-ldap-certificate-formatter): |
| 103 | tls-certificate-information if ssl.el is not available. | 106 | Use tls-certificate-information if ssl.el is not available. |
| 104 | 107 | ||
| 105 | * url-https.el (url-https-create-secure-wrapper): Use tls if ssl | 108 | * url-https.el (url-https-create-secure-wrapper): Use tls if ssl |
| 106 | is not available. | 109 | is not available. |
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index db961b9c27e..f90f21a3dbe 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el | |||
| @@ -25,11 +25,21 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | (require 'url) | 28 | ;; (require 'url) |
| 29 | (require 'url-parse) | 29 | (eval-when-compile (require 'url-parse)) |
| 30 | (require 'url-util) | 30 | ;; (require 'url-util) |
| 31 | (require 'mm-decode) | 31 | (eval-when-compile (require 'mm-decode)) |
| 32 | (require 'mailcap) | 32 | ;; (require 'mailcap) |
| 33 | ;; The following functions in the byte compiler's warnings are known not | ||
| 34 | ;; to cause any real problem for the following reasons: | ||
| 35 | ;; - mm-save-part-to-file, mm-destroy-parts: always used | ||
| 36 | ;; after mm-dissect-buffer and defined in the same file. | ||
| 37 | ;; The following are autoloaded instead of `require'd to avoid eagerly | ||
| 38 | ;; loading all of URL when turning on url-handler-mode in the .emacs. | ||
| 39 | (autoload 'url-retrieve-synchronously "url" "Retrieve url synchronously.") | ||
| 40 | (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") | ||
| 41 | (autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.") | ||
| 42 | (autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.") | ||
| 33 | 43 | ||
| 34 | (eval-when-compile | 44 | (eval-when-compile |
| 35 | (require 'cl)) | 45 | (require 'cl)) |
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index fafb5eff7cd..cbb951d60b7 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el | |||
| @@ -447,10 +447,14 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 447 | (vc-insert-file (expand-file-name ".svn/entries" dirname))) | 447 | (vc-insert-file (expand-file-name ".svn/entries" dirname))) |
| 448 | (goto-char (point-min)) | 448 | (goto-char (point-min)) |
| 449 | (when (re-search-forward | 449 | (when (re-search-forward |
| 450 | (concat "name=\"svn:this_dir\"[\n\t ]*" | 450 | ;; Old `svn' used name="svn:dir", newer use just name="". |
| 451 | "\\([-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | 451 | (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" |
| 452 | "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | ||
| 452 | "url=\"\\([^\"]+\\)\"") nil t) | 453 | "url=\"\\([^\"]+\\)\"") nil t) |
| 453 | (match-string 2)))) | 454 | ;; This is not a hostname but a URL. This may actually be considered |
| 455 | ;; as a feature since it allows vc-svn-stay-local to specify different | ||
| 456 | ;; behavior for different modules on the same server. | ||
| 457 | (match-string 1)))) | ||
| 454 | 458 | ||
| 455 | (defun vc-svn-parse-status (localp) | 459 | (defun vc-svn-parse-status (localp) |
| 456 | "Parse output of \"svn status\" command in the current buffer. | 460 | "Parse output of \"svn status\" command in the current buffer. |
| @@ -505,6 +509,30 @@ essential information." | |||
| 505 | (and (string-match "^[0-9]" tag) | 509 | (and (string-match "^[0-9]" tag) |
| 506 | (not (string-match "[^0-9]" tag)))) | 510 | (not (string-match "[^0-9]" tag)))) |
| 507 | 511 | ||
| 512 | ;; Support for `svn annotate' | ||
| 513 | |||
| 514 | (defun vc-svn-annotate-command (file buf &optional rev) | ||
| 515 | (vc-svn-command buf 0 file "annotate" (if rev (concat "-r" rev)))) | ||
| 516 | |||
| 517 | (defun vc-svn-annotate-time-of-rev (rev) | ||
| 518 | ;; Arbitrarily assume 10 commmits per day. | ||
| 519 | (/ (string-to-number rev) 10.0)) | ||
| 520 | |||
| 521 | (defun vc-svn-annotate-current-time () | ||
| 522 | (vc-svn-annotate-time-of-rev vc-annotate-parent-rev)) | ||
| 523 | |||
| 524 | (defconst vc-svn-annotate-re "[ \t]*\\([0-9]+\\)[ \t]+[^\t ]+ ") | ||
| 525 | |||
| 526 | (defun vc-svn-annotate-time () | ||
| 527 | (when (looking-at vc-svn-annotate-re) | ||
| 528 | (goto-char (match-end 0)) | ||
| 529 | (vc-svn-annotate-time-of-rev (match-string 1)))) | ||
| 530 | |||
| 531 | (defun vc-svn-annotate-extract-revision-at-line () | ||
| 532 | (save-excursion | ||
| 533 | (beginning-of-line) | ||
| 534 | (if (looking-at vc-svn-annotate-re) (match-string 1)))) | ||
| 535 | |||
| 508 | (provide 'vc-svn) | 536 | (provide 'vc-svn) |
| 509 | 537 | ||
| 510 | ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d | 538 | ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d |
diff --git a/lisp/xml.el b/lisp/xml.el index aba84d33230..daf5689c18b 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -179,6 +179,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded." | |||
| 179 | xml))) | 179 | xml))) |
| 180 | 180 | ||
| 181 | 181 | ||
| 182 | (defvar xml-name-re) | ||
| 183 | (defvar xml-entity-value-re) | ||
| 182 | (let* ((start-chars (concat "[:alpha:]:_")) | 184 | (let* ((start-chars (concat "[:alpha:]:_")) |
| 183 | (name-chars (concat "-[:digit:]." start-chars)) | 185 | (name-chars (concat "-[:digit:]." start-chars)) |
| 184 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ | 186 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index a261d3d36c8..19b58475a93 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -139,12 +139,13 @@ | |||
| 139 | default-header-line-format) | 139 | default-header-line-format) |
| 140 | 1 | 140 | 1 |
| 141 | 0))) | 141 | 0))) |
| 142 | (move-to-column (+ (car where) (current-column) | 142 | (move-to-column (- (+ (car where) (current-column) |
| 143 | (if (string-match "\\` \\*Minibuf" | 143 | (if (string-match "\\` \\*Minibuf" |
| 144 | (buffer-name)) | 144 | (buffer-name)) |
| 145 | (- (minibuffer-prompt-width)) | 145 | (- (minibuffer-prompt-width)) |
| 146 | 0) | 146 | 0) |
| 147 | (max 0 (1- (window-hscroll))))) | 147 | (max 0 (1- (window-hscroll)))) |
| 148 | left-margin-width)) | ||
| 148 | (point)) | 149 | (point)) |
| 149 | where)) | 150 | where)) |
| 150 | (mouse (intern | 151 | (mouse (intern |