diff options
| author | Kenichi Handa | 2011-08-23 20:49:03 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-08-23 20:49:03 +0900 |
| commit | 821ff7208c4a8fb4b12a0ea8039006d2b2e57463 (patch) | |
| tree | 9c34cedc8b73af96522f01e5f5ba45de71d7dbb1 | |
| parent | 0902a04edd7a2e0ca5d73fd996e46f26d5228501 (diff) | |
| parent | 8ddde6516c5bd15ea8af79800779a28c8742c488 (diff) | |
| download | emacs-821ff7208c4a8fb4b12a0ea8039006d2b2e57463.tar.gz emacs-821ff7208c4a8fb4b12a0ea8039006d2b2e57463.zip | |
merge trunk
49 files changed, 796 insertions, 389 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index c2f7e3cb0d2..31752a2bc2a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-22 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * compilation.txt: Add more samples of output and non-output | ||
| 4 | switches (bug#9319). | ||
| 5 | |||
| 1 | 2011-08-19 Chong Yidong <cyd@stupidchicken.com> | 6 | 2011-08-19 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * themes/dichromacy-theme.el: | 8 | * themes/dichromacy-theme.el: |
| @@ -407,7 +407,7 @@ If non-nil, C-d, [delete], and DEL delete the region if it is active | |||
| 407 | and no prefix argument is given. If set to `kill', these commands | 407 | and no prefix argument is given. If set to `kill', these commands |
| 408 | kill instead. | 408 | kill instead. |
| 409 | 409 | ||
| 410 | *** New command `delete-forward-char', bound to C-d and [delete]. | 410 | *** New command `delete-forward-char', bound to [delete]. |
| 411 | This is meant for interactive use, and obeys `delete-active-region'. | 411 | This is meant for interactive use, and obeys `delete-active-region'. |
| 412 | The command `delete-char' does not obey `delete-active-region'. | 412 | The command `delete-char' does not obey `delete-active-region'. |
| 413 | 413 | ||
diff --git a/etc/compilation.txt b/etc/compilation.txt index 888c1f94c33..eeb09b1712c 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt | |||
| @@ -546,9 +546,20 @@ checking whether to build shared libraries... yes | |||
| 546 | checking whether -lc should be explicitly linked in... (cached) no | 546 | checking whether -lc should be explicitly linked in... (cached) no |
| 547 | checking For GLIB - version >= 2.0.0... yes (version 2.1.0) | 547 | checking For GLIB - version >= 2.0.0... yes (version 2.1.0) |
| 548 | checking FONTCONFIG_CFLAGS... | 548 | checking FONTCONFIG_CFLAGS... |
| 549 | g++ -o foo.o foo.cc | 549 | tool -o foo.o foo.c |
| 550 | tool1 -output=foo foo.x | 550 | tool -o=foo.o foo.c |
| 551 | tool2 --outfile foo foo.y | 551 | tool -output foo.o foo.c |
| 552 | tool -output=foo.o foo.c | ||
| 553 | tool -outfile foo.o foo.c | ||
| 554 | tool -outfile=foo.o foo.c | ||
| 555 | tool --output foo.o foo.c | ||
| 556 | tool --output=foo.o foo.c | ||
| 557 | tool --outfile foo.o foo.c | ||
| 558 | tool --outfile=foo.o foo.c | ||
| 559 | tool -omega foo.c foo2.c | ||
| 560 | tool -output-html-file foo.c foo2.c | ||
| 561 | tool --omega foo.c foo2.c | ||
| 562 | tool --output-html-file foo.c foo2.c | ||
| 552 | 563 | ||
| 553 | Compilation started at Wed Jul 20 12:20:10 | 564 | Compilation started at Wed Jul 20 12:20:10 |
| 554 | Compilation interrupt at Wed Jul 20 12:20:10 | 565 | Compilation interrupt at Wed Jul 20 12:20:10 |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 5309671651b..2dbccf9be39 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (OTHERS): | ||
| 4 | * makefile.w32-in (MISC): Add ipa-praat.elc. | ||
| 5 | |||
| 1 | 2011-07-23 Yair F <yair.f.lists@gmail.com> | 6 | 2011-07-23 Yair F <yair.f.lists@gmail.com> |
| 2 | 7 | ||
| 3 | * quail/hebrew.el ("hebrew"): Additional key mappings. | 8 | * quail/hebrew.el ("hebrew"): Additional key mappings. |
diff --git a/leim/Makefile.in b/leim/Makefile.in index 18eb8b62a96..87020616a57 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -124,6 +124,7 @@ OTHERS= \ | |||
| 124 | ${srcdir}/quail/arabic.elc \ | 124 | ${srcdir}/quail/arabic.elc \ |
| 125 | ${srcdir}/quail/ethiopic.elc \ | 125 | ${srcdir}/quail/ethiopic.elc \ |
| 126 | ${srcdir}/quail/ipa.elc \ | 126 | ${srcdir}/quail/ipa.elc \ |
| 127 | ${srcdir}/quail/ipa-praat.elc \ | ||
| 127 | ${srcdir}/quail/hebrew.elc \ | 128 | ${srcdir}/quail/hebrew.elc \ |
| 128 | ${srcdir}/quail/georgian.elc \ | 129 | ${srcdir}/quail/georgian.elc \ |
| 129 | $(srcdir)/quail/persian.elc \ | 130 | $(srcdir)/quail/persian.elc \ |
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 1ab14c72b3d..231384308f2 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in | |||
| @@ -118,6 +118,7 @@ MISC= \ | |||
| 118 | $(srcdir)/quail/arabic.elc \ | 118 | $(srcdir)/quail/arabic.elc \ |
| 119 | $(srcdir)/quail/ethiopic.elc \ | 119 | $(srcdir)/quail/ethiopic.elc \ |
| 120 | $(srcdir)/quail/ipa.elc \ | 120 | $(srcdir)/quail/ipa.elc \ |
| 121 | $(srcdir)/quail/ipa-praat.elc \ | ||
| 121 | $(srcdir)/quail/hebrew.elc \ | 122 | $(srcdir)/quail/hebrew.elc \ |
| 122 | $(srcdir)/quail/georgian.elc \ | 123 | $(srcdir)/quail/georgian.elc \ |
| 123 | $(srcdir)/quail/persian.elc \ | 124 | $(srcdir)/quail/persian.elc \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37fc5eb1a28..4df4d1445b1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -16,6 +16,142 @@ | |||
| 16 | * international/uni-titlecase.el: | 16 | * international/uni-titlecase.el: |
| 17 | * international/uni-uppercase.el: Regenerate. | 17 | * international/uni-uppercase.el: Regenerate. |
| 18 | 18 | ||
| 19 | 2011-08-23 Martin Rudalics <rudalics@gmx.at> | ||
| 20 | |||
| 21 | * help.el (help-window-setup): Fix message displayed when other | ||
| 22 | window is reused. (Bug#9341) | ||
| 23 | |||
| 24 | 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 25 | |||
| 26 | * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. | ||
| 27 | * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161). | ||
| 28 | |||
| 29 | * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. | ||
| 30 | Mark obsolete. | ||
| 31 | * shell.el (shell-parse-pcomplete-arguments): New function. | ||
| 32 | (shell-completion-vars): Use it instead (bug#9160). | ||
| 33 | |||
| 34 | 2011-08-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 35 | |||
| 36 | * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in | ||
| 37 | strings and comments (bug#9333). | ||
| 38 | |||
| 39 | * emacs-lisp/debug.el (debug-arglist): New function. | ||
| 40 | (debug-convert-byte-code): Use it. Handle lexical byte-codes. | ||
| 41 | (debug-on-entry-1): Handle interpreted closures (bug#9120). | ||
| 42 | |||
| 43 | 2011-08-22 Juri Linkov <juri@jurta.org> | ||
| 44 | |||
| 45 | * progmodes/compile.el (compilation-mode-font-lock-keywords): | ||
| 46 | Revert regexp that highlights output switches to its old | ||
| 47 | pre-2010-10-28 value and remove one `?' from it (bug#9319). | ||
| 48 | |||
| 49 | * progmodes/grep.el (grep-process-setup): Use `buffer-modified-p' | ||
| 50 | to check for empty output (bug#9226). | ||
| 51 | |||
| 52 | 2011-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 53 | |||
| 54 | * progmodes/scheme.el (scheme-mode-syntax-table): Don't use | ||
| 55 | symbol-constituent as the default, as that stops font-lock from | ||
| 56 | working properly (Bug#8843). | ||
| 57 | |||
| 58 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 59 | |||
| 60 | * mail/smtpmail.el (smtpmail-via-smtp): Only bind | ||
| 61 | `coding-system-for-*' around the process open call to avoid | ||
| 62 | auth-source side effects. | ||
| 63 | (smtpmail-try-auth-methods): Expand the secret password. | ||
| 64 | (smtpmail-query-smtp-server): Allow `quit'-ing out in case the | ||
| 65 | probe hangs. | ||
| 66 | |||
| 67 | 2011-08-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 68 | |||
| 69 | * term.el (term-mouse-paste): Yank primary selection (Bug#6845). | ||
| 70 | |||
| 71 | * emacs-lisp/find-func.el (find-function-noselect): New arg | ||
| 72 | lisp-only. | ||
| 73 | |||
| 74 | * emacs-lisp/edebug.el (edebug-instrument-function): Use it to | ||
| 75 | signal an error for built-in functions (Bug#6664). | ||
| 76 | |||
| 77 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 78 | |||
| 79 | * mail/smtpmail.el (smtpmail-smtp-user): New variable. | ||
| 80 | (smtpmail-try-auth-methods): Use it. | ||
| 81 | |||
| 82 | 2011-08-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 83 | |||
| 84 | * font-lock.el (font-lock-fontify-region) | ||
| 85 | (font-lock-unfontify-region, font-lock-default-fontify-buffer) | ||
| 86 | (font-lock-default-unfontify-buffer) | ||
| 87 | (font-lock-default-fontify-region) | ||
| 88 | (font-lock-default-unfontify-region): Add docstrings (Bug#8624). | ||
| 89 | |||
| 90 | * progmodes/compile.el (compilation-error-properties): | ||
| 91 | Fix confusion between file struct and message struct (Bug#9319). | ||
| 92 | (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to | ||
| 93 | `ant' regexp. | ||
| 94 | |||
| 95 | * net/browse-url.el (browse-url-firefox): Don't call | ||
| 96 | browse-url-firefox-sentinel unless using -remote (Bug#9328). | ||
| 97 | |||
| 98 | 2011-08-20 Glenn Morris <rgm@gnu.org> | ||
| 99 | |||
| 100 | * tutorial.el (help-with-tutorial): Avoid an error on short screens. | ||
| 101 | |||
| 102 | * tutorial.el (tutorial--default-keys): Update some default bindings. | ||
| 103 | |||
| 104 | * files.el (hack-local-variables): Fully ignore case for "mode:". | ||
| 105 | |||
| 106 | 2011-08-20 Alan Mackenzie <acm@muc.de> | ||
| 107 | |||
| 108 | Resolve invalid use of a regexp in regexp-opt. | ||
| 109 | |||
| 110 | * cc-fonts.el (c-complex-decl-matchers): Add in special detection | ||
| 111 | for a java annotation. | ||
| 112 | |||
| 113 | * cc-engine.el (c-forward-decl-or-cast-1): Add in special | ||
| 114 | detection for a java annotation. | ||
| 115 | |||
| 116 | * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling | ||
| 117 | for java. | ||
| 118 | (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". | ||
| 119 | |||
| 120 | 2011-08-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 121 | |||
| 122 | * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix | ||
| 123 | (Bug#9274). | ||
| 124 | |||
| 125 | 2011-08-20 Alan Mackenzie <acm@muc.de> | ||
| 126 | |||
| 127 | * Fontify CPP expressions correctly when starting in the middle of | ||
| 128 | such a construct. Mainly for when jit-lock etc. starts a chunk | ||
| 129 | here. | ||
| 130 | |||
| 131 | * progmodes/cc-fonts.el (c-font-lock-context): new buffer local | ||
| 132 | variable. | ||
| 133 | (c-make-font-lock-search-form): new function, extracted from | ||
| 134 | c-make-font-lock-search-function. | ||
| 135 | (c-make-font-lock-search-function): Use the above function. | ||
| 136 | (c-make-font-lock-context-search-function): New function. | ||
| 137 | (c-cpp-matchers): Enhance the preprocessor expression case with | ||
| 138 | the above function | ||
| 139 | (c-font-lock-complex-decl-prepare): Test for being in a CPP form | ||
| 140 | which takes an expression. | ||
| 141 | |||
| 142 | * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable. | ||
| 143 | |||
| 144 | 2011-08-20 Martin Rudalics <rudalics@gmx.at> | ||
| 145 | |||
| 146 | * window.el (display-buffer-reuse-window) | ||
| 147 | (display-buffer-pop-up-window): Don't reuse or split a side | ||
| 148 | window. | ||
| 149 | |||
| 150 | 2011-08-19 Glenn Morris <rgm@gnu.org> | ||
| 151 | |||
| 152 | * files.el (hack-local-variables-prop-line, hack-local-variables): | ||
| 153 | Downcase "Mode:". (Bug#9331) | ||
| 154 | |||
| 19 | 2011-08-18 Chong Yidong <cyd@stupidchicken.com> | 155 | 2011-08-18 Chong Yidong <cyd@stupidchicken.com> |
| 20 | 156 | ||
| 21 | * international/characters.el: Add L and R categories. | 157 | * international/characters.el: Add L and R categories. |
| @@ -46,8 +182,8 @@ | |||
| 46 | binding variables (bug#9298). Also clean up some unused | 182 | binding variables (bug#9298). Also clean up some unused |
| 47 | autoloads. | 183 | autoloads. |
| 48 | 184 | ||
| 49 | * net/network-stream.el (network-stream-open-starttls): Support | 185 | * net/network-stream.el (network-stream-open-starttls): |
| 50 | using starttls.el without using gnutls-cli. | 186 | Support using starttls.el without using gnutls-cli. |
| 51 | 187 | ||
| 52 | 2011-08-17 Juri Linkov <juri@jurta.org> | 188 | 2011-08-17 Juri Linkov <juri@jurta.org> |
| 53 | 189 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index c4f9369219a..57bfeb60f82 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -834,6 +834,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 834 | (setq i (1+ i)))) | 834 | (setq i (1+ i)))) |
| 835 | (define-key global-map [?\C-\M--] 'negative-argument) | 835 | (define-key global-map [?\C-\M--] 'negative-argument) |
| 836 | 836 | ||
| 837 | ;; Update tutorial--default-keys if you change these. | ||
| 837 | (define-key global-map "\177" 'delete-backward-char) | 838 | (define-key global-map "\177" 'delete-backward-char) |
| 838 | (define-key global-map "\C-d" 'delete-char) | 839 | (define-key global-map "\C-d" 'delete-char) |
| 839 | 840 | ||
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 157749500e7..8276030ccf8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -778,6 +778,7 @@ Redefining FUNCTION also cancels it." | |||
| 778 | (not (debugger-special-form-p symbol)))) | 778 | (not (debugger-special-form-p symbol)))) |
| 779 | t nil nil (symbol-name fn))) | 779 | t nil nil (symbol-name fn))) |
| 780 | (list (if (equal val "") fn (intern val))))) | 780 | (list (if (equal val "") fn (intern val))))) |
| 781 | ;; FIXME: Use advice.el. | ||
| 781 | (when (debugger-special-form-p function) | 782 | (when (debugger-special-form-p function) |
| 782 | (error "Function %s is a special form" function)) | 783 | (error "Function %s is a special form" function)) |
| 783 | (if (or (symbolp (symbol-function function)) | 784 | (if (or (symbolp (symbol-function function)) |
| @@ -835,24 +836,30 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 835 | (message "Cancelling debug-on-entry for all functions") | 836 | (message "Cancelling debug-on-entry for all functions") |
| 836 | (mapcar 'cancel-debug-on-entry debug-function-list))) | 837 | (mapcar 'cancel-debug-on-entry debug-function-list))) |
| 837 | 838 | ||
| 839 | (defun debug-arglist (definition) | ||
| 840 | ;; FIXME: copied from ad-arglist. | ||
| 841 | "Return the argument list of DEFINITION." | ||
| 842 | (require 'help-fns) | ||
| 843 | (help-function-arglist definition 'preserve-names)) | ||
| 844 | |||
| 838 | (defun debug-convert-byte-code (function) | 845 | (defun debug-convert-byte-code (function) |
| 839 | (let* ((defn (symbol-function function)) | 846 | (let* ((defn (symbol-function function)) |
| 840 | (macro (eq (car-safe defn) 'macro))) | 847 | (macro (eq (car-safe defn) 'macro))) |
| 841 | (when macro (setq defn (cdr defn))) | 848 | (when macro (setq defn (cdr defn))) |
| 842 | (unless (consp defn) | 849 | (when (byte-code-function-p defn) |
| 843 | ;; Assume a compiled code object. | 850 | (let* ((args (debug-arglist defn)) |
| 844 | (let* ((contents (append defn nil)) | ||
| 845 | (body | 851 | (body |
| 846 | (list (list 'byte-code (nth 1 contents) | 852 | `((,(if (memq '&rest args) #'apply #'funcall) |
| 847 | (nth 2 contents) (nth 3 contents))))) | 853 | ,defn |
| 848 | (if (nthcdr 5 contents) | 854 | ,@(remq '&rest (remq '&optional args)))))) |
| 849 | (setq body (cons (list 'interactive (nth 5 contents)) body))) | 855 | (if (> (length defn) 5) |
| 850 | (if (nth 4 contents) | 856 | (push `(interactive ,(aref defn 5)) body)) |
| 857 | (if (aref defn 4) | ||
| 851 | ;; Use `documentation' here, to get the actual string, | 858 | ;; Use `documentation' here, to get the actual string, |
| 852 | ;; in case the compiled function has a reference | 859 | ;; in case the compiled function has a reference |
| 853 | ;; to the .elc file. | 860 | ;; to the .elc file. |
| 854 | (setq body (cons (documentation function) body))) | 861 | (setq body (cons (documentation function) body))) |
| 855 | (setq defn (cons 'lambda (cons (car contents) body)))) | 862 | (setq defn `(closure (t) ,args ,@body))) |
| 856 | (when macro (setq defn (cons 'macro defn))) | 863 | (when macro (setq defn (cons 'macro defn))) |
| 857 | (fset function defn)))) | 864 | (fset function defn)))) |
| 858 | 865 | ||
| @@ -861,11 +868,12 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 861 | (tail defn)) | 868 | (tail defn)) |
| 862 | (when (eq (car-safe tail) 'macro) | 869 | (when (eq (car-safe tail) 'macro) |
| 863 | (setq tail (cdr tail))) | 870 | (setq tail (cdr tail))) |
| 864 | (if (not (eq (car-safe tail) 'lambda)) | 871 | (if (not (memq (car-safe tail) '(closure lambda))) |
| 865 | ;; Only signal an error when we try to set debug-on-entry. | 872 | ;; Only signal an error when we try to set debug-on-entry. |
| 866 | ;; When we try to clear debug-on-entry, we are now done. | 873 | ;; When we try to clear debug-on-entry, we are now done. |
| 867 | (when flag | 874 | (when flag |
| 868 | (error "%s is not a user-defined Lisp function" function)) | 875 | (error "%s is not a user-defined Lisp function" function)) |
| 876 | (if (eq (car tail) 'closure) (setq tail (cdr tail))) | ||
| 869 | (setq tail (cdr tail)) | 877 | (setq tail (cdr tail)) |
| 870 | ;; Skip the docstring. | 878 | ;; Skip the docstring. |
| 871 | (when (and (stringp (cadr tail)) (cddr tail)) | 879 | (when (and (stringp (cadr tail)) (cddr tail)) |
| @@ -875,9 +883,9 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 875 | (setq tail (cdr tail))) | 883 | (setq tail (cdr tail))) |
| 876 | (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) | 884 | (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) |
| 877 | ;; Add/remove debug statement as needed. | 885 | ;; Add/remove debug statement as needed. |
| 878 | (if flag | 886 | (setcdr tail (if flag |
| 879 | (setcdr tail (cons '(implement-debug-on-entry) (cdr tail))) | 887 | (cons '(implement-debug-on-entry) (cdr tail)) |
| 880 | (setcdr tail (cddr tail))))) | 888 | (cddr tail))))) |
| 881 | defn)) | 889 | defn)) |
| 882 | 890 | ||
| 883 | (defun debugger-list-functions () | 891 | (defun debugger-list-functions () |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index f84de0308bf..57d25c9e169 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -3408,7 +3408,7 @@ go to the end of the last sexp, or if that is the same point, then step." | |||
| 3408 | (message "%s is already instrumented." func) | 3408 | (message "%s is already instrumented." func) |
| 3409 | func) | 3409 | func) |
| 3410 | (t | 3410 | (t |
| 3411 | (let ((loc (find-function-noselect func))) | 3411 | (let ((loc (find-function-noselect func t))) |
| 3412 | (unless (cdr loc) | 3412 | (unless (cdr loc) |
| 3413 | (error "Could not find the definition in its file")) | 3413 | (error "Could not find the definition in its file")) |
| 3414 | (with-current-buffer (car loc) | 3414 | (with-current-buffer (car loc) |
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0194af2e3a8..2c7208db8a3 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -312,7 +312,7 @@ The search is done in the source for library LIBRARY." | |||
| 312 | (cons (current-buffer) nil)))))))) | 312 | (cons (current-buffer) nil)))))))) |
| 313 | 313 | ||
| 314 | ;;;###autoload | 314 | ;;;###autoload |
| 315 | (defun find-function-noselect (function) | 315 | (defun find-function-noselect (function &optional lisp-only) |
| 316 | "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. | 316 | "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. |
| 317 | 317 | ||
| 318 | Finds the source file containing the definition of FUNCTION | 318 | Finds the source file containing the definition of FUNCTION |
| @@ -320,6 +320,10 @@ in a buffer and the point of the definition. The buffer is | |||
| 320 | not selected. If the function definition can't be found in | 320 | not selected. If the function definition can't be found in |
| 321 | the buffer, returns (BUFFER). | 321 | the buffer, returns (BUFFER). |
| 322 | 322 | ||
| 323 | If FUNCTION is a built-in function, this function normally | ||
| 324 | attempts to find it in the Emacs C sources; however, if LISP-ONLY | ||
| 325 | is non-nil, signal an error instead. | ||
| 326 | |||
| 323 | If the file where FUNCTION is defined is not known, then it is | 327 | If the file where FUNCTION is defined is not known, then it is |
| 324 | searched for in `find-function-source-path' if non-nil, otherwise | 328 | searched for in `find-function-source-path' if non-nil, otherwise |
| 325 | in `load-path'." | 329 | in `load-path'." |
| @@ -345,6 +349,8 @@ in `load-path'." | |||
| 345 | (cond ((eq (car-safe def) 'autoload) | 349 | (cond ((eq (car-safe def) 'autoload) |
| 346 | (nth 1 def)) | 350 | (nth 1 def)) |
| 347 | ((subrp def) | 351 | ((subrp def) |
| 352 | (if lisp-only | ||
| 353 | (error "%s is a built-in function" function)) | ||
| 348 | (help-C-file-name def 'subr)) | 354 | (help-C-file-name def 'subr)) |
| 349 | ((symbol-file function 'defun))))) | 355 | ((symbol-file function 'defun))))) |
| 350 | (find-function-search-for-symbol function nil library)))) | 356 | (find-function-search-for-symbol function nil library)))) |
diff --git a/lisp/files.el b/lisp/files.el index 6b8a352f20c..07188e152b3 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3003,9 +3003,10 @@ mode, if there is one, otherwise nil." | |||
| 3003 | "-mode")))) | 3003 | "-mode")))) |
| 3004 | (or (equal keyname "coding") | 3004 | (or (equal keyname "coding") |
| 3005 | (condition-case nil | 3005 | (condition-case nil |
| 3006 | (push (cons (if (eq key 'eval) | 3006 | (push (cons (cond ((eq key 'eval) 'eval) |
| 3007 | 'eval | 3007 | ;; Downcase "Mode:". |
| 3008 | (indirect-variable key)) | 3008 | ((equal keyname "mode") 'mode) |
| 3009 | (t (indirect-variable key))) | ||
| 3009 | val) result) | 3010 | val) result) |
| 3010 | (error nil)))) | 3011 | (error nil)))) |
| 3011 | (skip-chars-forward " \t;"))) | 3012 | (skip-chars-forward " \t;"))) |
| @@ -3153,6 +3154,8 @@ major-mode." | |||
| 3153 | (var (let ((read-circle nil)) | 3154 | (var (let ((read-circle nil)) |
| 3154 | (read str))) | 3155 | (read str))) |
| 3155 | val val2) | 3156 | val val2) |
| 3157 | (and (equal (downcase (symbol-name var)) "mode") | ||
| 3158 | (setq var 'mode)) | ||
| 3156 | ;; Read the variable value. | 3159 | ;; Read the variable value. |
| 3157 | (skip-chars-forward "^:") | 3160 | (skip-chars-forward "^:") |
| 3158 | (forward-char 1) | 3161 | (forward-char 1) |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9cf889e1aec..c37a9ae916e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1018,14 +1018,20 @@ The region it returns may start or end in the middle of a line.") | |||
| 1018 | (funcall font-lock-unfontify-buffer-function)) | 1018 | (funcall font-lock-unfontify-buffer-function)) |
| 1019 | 1019 | ||
| 1020 | (defun font-lock-fontify-region (beg end &optional loudly) | 1020 | (defun font-lock-fontify-region (beg end &optional loudly) |
| 1021 | "Fontify the text between BEG and END. | ||
| 1022 | If LOUDLY is non-nil, print status messages while fontifying. | ||
| 1023 | This works by calling `font-lock-fontify-region-function'." | ||
| 1021 | (font-lock-set-defaults) | 1024 | (font-lock-set-defaults) |
| 1022 | (funcall font-lock-fontify-region-function beg end loudly)) | 1025 | (funcall font-lock-fontify-region-function beg end loudly)) |
| 1023 | 1026 | ||
| 1024 | (defun font-lock-unfontify-region (beg end) | 1027 | (defun font-lock-unfontify-region (beg end) |
| 1028 | "Unfontify the text between BEG and END. | ||
| 1029 | This works by calling `font-lock-unfontify-region-function'." | ||
| 1025 | (save-buffer-state | 1030 | (save-buffer-state |
| 1026 | (funcall font-lock-unfontify-region-function beg end))) | 1031 | (funcall font-lock-unfontify-region-function beg end))) |
| 1027 | 1032 | ||
| 1028 | (defun font-lock-default-fontify-buffer () | 1033 | (defun font-lock-default-fontify-buffer () |
| 1034 | "Fontify the whole buffer using `font-lock-fontify-region-function'." | ||
| 1029 | (let ((verbose (if (numberp font-lock-verbose) | 1035 | (let ((verbose (if (numberp font-lock-verbose) |
| 1030 | (> (buffer-size) font-lock-verbose) | 1036 | (> (buffer-size) font-lock-verbose) |
| 1031 | font-lock-verbose))) | 1037 | font-lock-verbose))) |
| @@ -1045,6 +1051,7 @@ The region it returns may start or end in the middle of a line.") | |||
| 1045 | (quit (font-lock-unfontify-buffer))))))) | 1051 | (quit (font-lock-unfontify-buffer))))))) |
| 1046 | 1052 | ||
| 1047 | (defun font-lock-default-unfontify-buffer () | 1053 | (defun font-lock-default-unfontify-buffer () |
| 1054 | "Unfontify the whole buffer using `font-lock-unfontify-region-function'." | ||
| 1048 | ;; Make sure we unfontify etc. in the whole buffer. | 1055 | ;; Make sure we unfontify etc. in the whole buffer. |
| 1049 | (save-restriction | 1056 | (save-restriction |
| 1050 | (widen) | 1057 | (widen) |
| @@ -1114,6 +1121,9 @@ Put first the functions more likely to cause a change and cheaper to compute.") | |||
| 1114 | changed)) | 1121 | changed)) |
| 1115 | 1122 | ||
| 1116 | (defun font-lock-default-fontify-region (beg end loudly) | 1123 | (defun font-lock-default-fontify-region (beg end loudly) |
| 1124 | "Fontify the text between BEG and END. | ||
| 1125 | If LOUDLY is non-nil, print status messages while fontifying. | ||
| 1126 | This function is the default `font-lock-fontify-region-function'." | ||
| 1117 | (save-buffer-state | 1127 | (save-buffer-state |
| 1118 | ;; Use the fontification syntax table, if any. | 1128 | ;; Use the fontification syntax table, if any. |
| 1119 | (with-syntax-table (or font-lock-syntax-table (syntax-table)) | 1129 | (with-syntax-table (or font-lock-syntax-table (syntax-table)) |
| @@ -1162,6 +1172,8 @@ This is used by `font-lock-default-unfontify-region' to decide | |||
| 1162 | what properties to clear before refontifying a region.") | 1172 | what properties to clear before refontifying a region.") |
| 1163 | 1173 | ||
| 1164 | (defun font-lock-default-unfontify-region (beg end) | 1174 | (defun font-lock-default-unfontify-region (beg end) |
| 1175 | "Unfontify the text between BEG and END. | ||
| 1176 | This function is the default `font-lock-unfontify-region-function'." | ||
| 1165 | (remove-list-of-text-properties | 1177 | (remove-list-of-text-properties |
| 1166 | beg end (append | 1178 | beg end (append |
| 1167 | font-lock-extra-managed-props | 1179 | font-lock-extra-managed-props |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 64ac50fe8f0..ad3e26f0f51 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, | ||
| 4 | continue on and do the clean-up phase (bug#9188). | ||
| 5 | |||
| 6 | * gnus-sum.el (gnus-summary-expire-articles): When expiring articles, | ||
| 7 | just ignore groups that can't be opened instead of erroring out | ||
| 8 | (bug#9225). | ||
| 9 | |||
| 10 | * gnus-art.el (gnus-article-update-date-headers): Flip the default to | ||
| 11 | nil since some many people are fuddy-duddies. | ||
| 12 | |||
| 13 | * gnus-html.el (gnus-html-image-fetched): Don't cache zero-length | ||
| 14 | images. | ||
| 15 | |||
| 16 | * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source | ||
| 17 | instead. | ||
| 18 | |||
| 19 | * pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. | ||
| 20 | |||
| 21 | * gnus-util.el (gnus-process-live-p): Copy over compat function. | ||
| 22 | |||
| 23 | * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop | ||
| 24 | processing. | ||
| 25 | |||
| 26 | * nntp.el (nntp-kill-buffer): Kill the process before killing the | ||
| 27 | buffer to avoid warnings. | ||
| 28 | |||
| 29 | 2011-08-20 Simon Josefsson <simon@josefsson.org> | ||
| 30 | |||
| 31 | * gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format | ||
| 32 | specified to reduce precision. | ||
| 33 | |||
| 34 | 2011-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 35 | |||
| 36 | * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) | ||
| 37 | bodystructures (bug#9314). | ||
| 38 | |||
| 1 | 2011-08-19 Katsumi Yamaoka <yamaoka@jpl.org> | 39 | 2011-08-19 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 40 | ||
| 3 | * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative): | 41 | * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative): |
| @@ -12,8 +50,29 @@ | |||
| 12 | `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't | 50 | `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't |
| 13 | available anymore. | 51 | available anymore. |
| 14 | 52 | ||
| 53 | 2011-08-12 Simon Josefsson <simon@josefsson.org> | ||
| 54 | |||
| 55 | * starttls.el (starttls-any-program-available): Define as obsolete | ||
| 56 | function. | ||
| 57 | |||
| 58 | 2011-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 59 | |||
| 60 | * gnus-util.el (gnus-y-or-n-p): Reinstate the message-clearing y-or-n-p | ||
| 61 | versions which Gnus use when appropriate. | ||
| 62 | |||
| 63 | * gnus-group.el (gnus-group-clear-data): Add a y-or-n query, since it's | ||
| 64 | a pretty destructive command. | ||
| 65 | |||
| 66 | * nnmail.el (nnmail-extra-headers): Clarify slightly (bug#9302). | ||
| 67 | |||
| 15 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | 68 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 16 | 69 | ||
| 70 | * message.el (message-fix-before-sending): Make a different warning | ||
| 71 | about NUL characters (bug#9270). | ||
| 72 | |||
| 73 | * gnus-sum.el (gnus-auto-select-subject): Allow specifying a function | ||
| 74 | from custom (bug#9260). | ||
| 75 | |||
| 17 | * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make | 76 | * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make |
| 18 | things work in Emacs 22 and XEmacs, too. | 77 | things work in Emacs 22 and XEmacs, too. |
| 19 | 78 | ||
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 424c55c40f5..26222119b98 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -3560,7 +3560,7 @@ articles in every agentized group? ")) | |||
| 3560 | units (cdr units))) | 3560 | units (cdr units))) |
| 3561 | 3561 | ||
| 3562 | (format "Expiry recovered %d NOV entries, deleted %d files,\ | 3562 | (format "Expiry recovered %d NOV entries, deleted %d files,\ |
| 3563 | and freed %f %s." | 3563 | and freed %.f %s." |
| 3564 | (nth 0 stats) | 3564 | (nth 0 stats) |
| 3565 | (nth 1 stats) | 3565 | (nth 1 stats) |
| 3566 | size (car units))) | 3566 | size (car units))) |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c6e0180dadc..eaf0ed52f51 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1039,7 +1039,7 @@ Some of these headers are updated automatically. See | |||
| 1039 | (item :tag "ISO8601 format" :value 'iso8601) | 1039 | (item :tag "ISO8601 format" :value 'iso8601) |
| 1040 | (item :tag "User-defined" :value 'user-defined))) | 1040 | (item :tag "User-defined" :value 'user-defined))) |
| 1041 | 1041 | ||
| 1042 | (defcustom gnus-article-update-date-headers 1 | 1042 | (defcustom gnus-article-update-date-headers nil |
| 1043 | "A number that says how often to update the date header (in seconds). | 1043 | "A number that says how often to update the date header (in seconds). |
| 1044 | If nil, don't update it at all." | 1044 | If nil, don't update it at all." |
| 1045 | :version "24.1" | 1045 | :version "24.1" |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2a31ccd34f0..5ae29053b6f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -3471,13 +3471,14 @@ sort in reverse order." | |||
| 3471 | "Clear all marks and read ranges from the current group. | 3471 | "Clear all marks and read ranges from the current group. |
| 3472 | Obeys the process/prefix convention." | 3472 | Obeys the process/prefix convention." |
| 3473 | (interactive "P") | 3473 | (interactive "P") |
| 3474 | (gnus-group-iterate arg | 3474 | (when (gnus-y-or-n-p "Really clear data? ") |
| 3475 | (lambda (group) | 3475 | (gnus-group-iterate arg |
| 3476 | (let (info) | 3476 | (lambda (group) |
| 3477 | (gnus-info-clear-data (setq info (gnus-get-info group))) | 3477 | (let (info) |
| 3478 | (gnus-get-unread-articles-in-group info (gnus-active group) t) | 3478 | (gnus-info-clear-data (setq info (gnus-get-info group))) |
| 3479 | (when (gnus-group-goto-group group) | 3479 | (gnus-get-unread-articles-in-group info (gnus-active group) t) |
| 3480 | (gnus-group-update-group-line)))))) | 3480 | (when (gnus-group-goto-group group) |
| 3481 | (gnus-group-update-group-line))))))) | ||
| 3481 | 3482 | ||
| 3482 | (defun gnus-group-clear-data-on-native-groups () | 3483 | (defun gnus-group-clear-data-on-native-groups () |
| 3483 | "Clear all marks and read ranges from all native groups." | 3484 | "Clear all marks and read ranges from all native groups." |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index d3da6aab1b7..f443c4021e2 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -399,15 +399,16 @@ Use ALT-TEXT for the image string." | |||
| 399 | (defun gnus-html-image-fetched (status buffer image) | 399 | (defun gnus-html-image-fetched (status buffer image) |
| 400 | "Callback function called when image has been fetched." | 400 | "Callback function called when image has been fetched." |
| 401 | (unless (plist-get status :error) | 401 | (unless (plist-get status :error) |
| 402 | (when gnus-html-image-automatic-caching | ||
| 403 | (url-store-in-cache (current-buffer))) | ||
| 404 | (when (and (or (search-forward "\n\n" nil t) | 402 | (when (and (or (search-forward "\n\n" nil t) |
| 405 | (search-forward "\r\n\r\n" nil t)) | 403 | (search-forward "\r\n\r\n" nil t)) |
| 406 | (buffer-live-p buffer)) | 404 | (not (eobp))) |
| 407 | (let ((data (buffer-substring (point) (point-max)))) | 405 | (when gnus-html-image-automatic-caching |
| 408 | (with-current-buffer buffer | 406 | (url-store-in-cache (current-buffer))) |
| 409 | (let ((inhibit-read-only t)) | 407 | (when (buffer-live-p buffer) |
| 410 | (gnus-html-put-image data (car image) (cadr image))))))) | 408 | (let ((data (buffer-substring (point) (point-max)))) |
| 409 | (with-current-buffer buffer | ||
| 410 | (let ((inhibit-read-only t)) | ||
| 411 | (gnus-html-put-image data (car image) (cadr image)))))))) | ||
| 411 | (kill-buffer (current-buffer))) | 412 | (kill-buffer (current-buffer))) |
| 412 | 413 | ||
| 413 | (defun gnus-html-get-image-data (url) | 414 | (defun gnus-html-get-image-data (url) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cd4699e6107..c01f91973a0 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -375,7 +375,8 @@ place point on some subject line." | |||
| 375 | (const unread) | 375 | (const unread) |
| 376 | (const first) | 376 | (const first) |
| 377 | (const unseen) | 377 | (const unseen) |
| 378 | (const unseen-or-unread))) | 378 | (const unseen-or-unread) |
| 379 | (function :tag "Function to call"))) | ||
| 379 | 380 | ||
| 380 | (defcustom gnus-auto-select-next t | 381 | (defcustom gnus-auto-select-next t |
| 381 | "*If non-nil, offer to go to the next group from the end of the previous. | 382 | "*If non-nil, offer to go to the next group from the end of the previous. |
| @@ -10286,34 +10287,33 @@ This will be the case if the article has both been mailed and posted." | |||
| 10286 | ;; There are expirable articles in this group, so we run them | 10287 | ;; There are expirable articles in this group, so we run them |
| 10287 | ;; through the expiry process. | 10288 | ;; through the expiry process. |
| 10288 | (gnus-message 6 "Expiring articles...") | 10289 | (gnus-message 6 "Expiring articles...") |
| 10289 | (unless (gnus-check-group gnus-newsgroup-name) | 10290 | (when (gnus-check-group gnus-newsgroup-name) |
| 10290 | (error "Can't open server for %s" gnus-newsgroup-name)) | 10291 | ;; The list of articles that weren't expired is returned. |
| 10291 | ;; The list of articles that weren't expired is returned. | 10292 | (save-excursion |
| 10292 | (save-excursion | 10293 | (if expiry-wait |
| 10293 | (if expiry-wait | 10294 | (let ((nnmail-expiry-wait-function nil) |
| 10294 | (let ((nnmail-expiry-wait-function nil) | 10295 | (nnmail-expiry-wait expiry-wait)) |
| 10295 | (nnmail-expiry-wait expiry-wait)) | 10296 | (setq es (gnus-request-expire-articles |
| 10296 | (setq es (gnus-request-expire-articles | 10297 | expirable gnus-newsgroup-name))) |
| 10297 | expirable gnus-newsgroup-name))) | 10298 | (setq es (gnus-request-expire-articles |
| 10298 | (setq es (gnus-request-expire-articles | 10299 | expirable gnus-newsgroup-name))) |
| 10299 | expirable gnus-newsgroup-name))) | 10300 | (unless total |
| 10300 | (unless total | 10301 | (setq gnus-newsgroup-expirable es)) |
| 10301 | (setq gnus-newsgroup-expirable es)) | 10302 | ;; We go through the old list of expirable, and mark all |
| 10302 | ;; We go through the old list of expirable, and mark all | 10303 | ;; really expired articles as nonexistent. |
| 10303 | ;; really expired articles as nonexistent. | 10304 | (unless (eq es expirable) ;If nothing was expired, we don't mark. |
| 10304 | (unless (eq es expirable) ;If nothing was expired, we don't mark. | 10305 | (let ((gnus-use-cache nil)) |
| 10305 | (let ((gnus-use-cache nil)) | 10306 | (dolist (article expirable) |
| 10306 | (dolist (article expirable) | 10307 | (when (and (not (memq article es)) |
| 10307 | (when (and (not (memq article es)) | 10308 | (gnus-data-find article)) |
| 10308 | (gnus-data-find article)) | 10309 | (gnus-summary-mark-article article gnus-canceled-mark) |
| 10309 | (gnus-summary-mark-article article gnus-canceled-mark) | 10310 | (run-hook-with-args 'gnus-summary-article-expire-hook |
| 10310 | (run-hook-with-args 'gnus-summary-article-expire-hook | 10311 | 'delete |
| 10311 | 'delete | 10312 | (gnus-data-header |
| 10312 | (gnus-data-header | 10313 | (assoc article (gnus-data-list nil))) |
| 10313 | (assoc article (gnus-data-list nil))) | 10314 | gnus-newsgroup-name |
| 10314 | gnus-newsgroup-name | 10315 | nil |
| 10315 | nil | 10316 | nil))))))) |
| 10316 | nil)))))) | ||
| 10317 | (gnus-message 6 "Expiring articles...done"))))) | 10317 | (gnus-message 6 "Expiring articles...done"))))) |
| 10318 | 10318 | ||
| 10319 | (defun gnus-summary-expire-articles-now () | 10319 | (defun gnus-summary-expire-articles-now () |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 7155c7f9607..34953611966 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -388,57 +388,14 @@ TIME defaults to the current time." | |||
| 388 | (define-key keymap key (pop plist)) | 388 | (define-key keymap key (pop plist)) |
| 389 | (pop plist))))) | 389 | (pop plist))))) |
| 390 | 390 | ||
| 391 | ;; Two silly functions to ensure that all `y-or-n-p' questions clear | 391 | (defun gnus-y-or-n-p (prompt) |
| 392 | ;; the echo area. | 392 | (prog1 |
| 393 | ;; | 393 | (y-or-n-p prompt) |
| 394 | ;; Do we really need these functions? Workarounds for bugs in the corresponding | 394 | (message ""))) |
| 395 | ;; Emacs functions? Maybe these bugs are no longer present in any supported | 395 | (defun gnus-yes-or-no-p (prompt) |
| 396 | ;; (X)Emacs version? Alias them to the original functions and see if anyone | 396 | (prog1 |
| 397 | ;; reports a problem. If not, replace with original functions. --rsteib, | 397 | (yes-or-no-p prompt) |
| 398 | ;; 2007-12-14 | 398 | (message ""))) |
| 399 | ;; | ||
| 400 | ;; All supported Emacsen clear the echo area after `yes-or-no-p', so we can | ||
| 401 | ;; remove `yes-or-no-p'. RMS says that not clearing after `y-or-n-p' is | ||
| 402 | ;; intentional (see below), so we could remove `gnus-y-or-n-p' too. | ||
| 403 | ;; Objections? --rsteib, 2008-02-16 | ||
| 404 | ;; | ||
| 405 | ;; ,----[ http://thread.gmane.org/gmane.emacs.gnus.general/65099/focus=66070 ] | ||
| 406 | ;; | From: Richard Stallman | ||
| 407 | ;; | Subject: Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p? | ||
| 408 | ;; | To: Katsumi Yamaoka [...] | ||
| 409 | ;; | Cc: emacs-devel@[...], xemacs-beta@[...], ding@[...] | ||
| 410 | ;; | Date: Mon, 07 Jan 2008 12:16:05 -0500 | ||
| 411 | ;; | Message-ID: <E1JBva1-000528-VY@fencepost.gnu.org> | ||
| 412 | ;; | | ||
| 413 | ;; | The behavior of `y-or-n-p' that it doesn't clear the question | ||
| 414 | ;; | and the answer is not serious of course, but I feel it is not | ||
| 415 | ;; | cool. | ||
| 416 | ;; | | ||
| 417 | ;; | It is intentional. | ||
| 418 | ;; | | ||
| 419 | ;; | Currently, it is commented out in the trunk by Reiner Steib. He | ||
| 420 | ;; | also wrote the benefit of leaving the question and the answer in | ||
| 421 | ;; | the echo area as follows: | ||
| 422 | ;; | | ||
| 423 | ;; | (http://article.gmane.org/gmane.emacs.gnus.general/66061) | ||
| 424 | ;; | > In contrast to yes-or-no-p it is much easier to type y, n, | ||
| 425 | ;; | > SPC, DEL, etc accidentally, so it might be useful for the user | ||
| 426 | ;; | > to see what he has typed. | ||
| 427 | ;; | | ||
| 428 | ;; | Yes, that is the reason. | ||
| 429 | ;; `---- | ||
| 430 | |||
| 431 | ;; (defun gnus-y-or-n-p (prompt) | ||
| 432 | ;; (prog1 | ||
| 433 | ;; (y-or-n-p prompt) | ||
| 434 | ;; (message ""))) | ||
| 435 | ;; (defun gnus-yes-or-no-p (prompt) | ||
| 436 | ;; (prog1 | ||
| 437 | ;; (yes-or-no-p prompt) | ||
| 438 | ;; (message ""))) | ||
| 439 | |||
| 440 | (defalias 'gnus-y-or-n-p 'y-or-n-p) | ||
| 441 | (defalias 'gnus-yes-or-no-p 'yes-or-no-p) | ||
| 442 | 399 | ||
| 443 | ;; By Frank Schmitt <ich@Frank-Schmitt.net>. Allows to have | 400 | ;; By Frank Schmitt <ich@Frank-Schmitt.net>. Allows to have |
| 444 | ;; age-depending date representations. (e.g. just the time if it's | 401 | ;; age-depending date representations. (e.g. just the time if it's |
| @@ -1292,6 +1249,13 @@ This function saves the current buffer." | |||
| 1292 | (with-current-buffer gnus-group-buffer | 1249 | (with-current-buffer gnus-group-buffer |
| 1293 | (eq major-mode 'gnus-group-mode)))) | 1250 | (eq major-mode 'gnus-group-mode)))) |
| 1294 | 1251 | ||
| 1252 | (defun gnus-process-live-p (process) | ||
| 1253 | "Returns non-nil if PROCESS is alive. | ||
| 1254 | A process is considered alive if its status is `run', `open', | ||
| 1255 | `listen', `connect' or `stop'." | ||
| 1256 | (memq (process-status process) | ||
| 1257 | '(run open listen connect stop))) | ||
| 1258 | |||
| 1295 | (defun gnus-remove-if (predicate sequence &optional hash-table-p) | 1259 | (defun gnus-remove-if (predicate sequence &optional hash-table-p) |
| 1296 | "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. | 1260 | "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. |
| 1297 | SEQUENCE should be a list, a vector, or a string. Returns always a list. | 1261 | SEQUENCE should be a list, a vector, or a string. Returns always a list. |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a157afe2ce6..52cef1925a2 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -4254,8 +4254,10 @@ conformance." | |||
| 4254 | "Invisible text found and made visible; continue sending? ") | 4254 | "Invisible text found and made visible; continue sending? ") |
| 4255 | (error "Invisible text found and made visible"))))) | 4255 | (error "Invisible text found and made visible"))))) |
| 4256 | (message-check 'illegible-text | 4256 | (message-check 'illegible-text |
| 4257 | (let (char found choice) | 4257 | (let (char found choice nul-chars) |
| 4258 | (message-goto-body) | 4258 | (message-goto-body) |
| 4259 | (setq nul-chars (save-excursion | ||
| 4260 | (search-forward "\000" nil t))) | ||
| 4259 | (while (progn | 4261 | (while (progn |
| 4260 | (skip-chars-forward mm-7bit-chars) | 4262 | (skip-chars-forward mm-7bit-chars) |
| 4261 | (when (get-text-property (point) 'no-illegible-text) | 4263 | (when (get-text-property (point) 'no-illegible-text) |
| @@ -4281,7 +4283,9 @@ conformance." | |||
| 4281 | (when found | 4283 | (when found |
| 4282 | (setq choice | 4284 | (setq choice |
| 4283 | (gnus-multiple-choice | 4285 | (gnus-multiple-choice |
| 4284 | "Non-printable characters found. Continue sending?" | 4286 | (if nul-chars |
| 4287 | "NUL characters found, which may cause problems. Continue sending?" | ||
| 4288 | "Non-printable characters found. Continue sending?") | ||
| 4285 | `((?d "Remove non-printable characters and send") | 4289 | `((?d "Remove non-printable characters and send") |
| 4286 | (?r ,(format | 4290 | (?r ,(format |
| 4287 | "Replace non-printable characters with \"%s\" and send" | 4291 | "Replace non-printable characters with \"%s\" and send" |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c940e06fbb6..2dbc465f8c9 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -216,9 +216,10 @@ textual parts.") | |||
| 216 | (let ((structure (ignore-errors | 216 | (let ((structure (ignore-errors |
| 217 | (read (current-buffer))))) | 217 | (read (current-buffer))))) |
| 218 | (while (and (consp structure) | 218 | (while (and (consp structure) |
| 219 | (not (stringp (car structure)))) | 219 | (not (atom (car structure)))) |
| 220 | (setq structure (car structure))) | 220 | (setq structure (car structure))) |
| 221 | (setq lines (if (and | 221 | (setq lines (if (and |
| 222 | (stringp (car structure)) | ||
| 222 | (equal (upcase (nth 0 structure)) "MESSAGE") | 223 | (equal (upcase (nth 0 structure)) "MESSAGE") |
| 223 | (equal (upcase (nth 1 structure)) "RFC822")) | 224 | (equal (upcase (nth 1 structure)) "RFC822")) |
| 224 | (nth 9 structure) | 225 | (nth 9 structure) |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 8906a036779..d83467a1ed5 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -554,7 +554,9 @@ parameter. It should return nil, `warn' or `delete'." | |||
| 554 | (const delete))) | 554 | (const delete))) |
| 555 | 555 | ||
| 556 | (defcustom nnmail-extra-headers '(To Newsgroups) | 556 | (defcustom nnmail-extra-headers '(To Newsgroups) |
| 557 | "*Extra headers to parse." | 557 | "Extra headers to parse. |
| 558 | In addition to the standard headers, these extra headers will be | ||
| 559 | included in NOV headers (and the like) when backends parse headers." | ||
| 558 | :version "21.1" | 560 | :version "21.1" |
| 559 | :group 'nnmail | 561 | :group 'nnmail |
| 560 | :type '(repeat symbol)) | 562 | :type '(repeat symbol)) |
| @@ -1840,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 1840 | ;; and fetch the mail from each. | 1842 | ;; and fetch the mail from each. |
| 1841 | (while (setq source (pop fetching-sources)) | 1843 | (while (setq source (pop fetching-sources)) |
| 1842 | (when (setq new | 1844 | (when (setq new |
| 1843 | (mail-source-fetch | 1845 | (condition-case cond |
| 1844 | source | 1846 | (mail-source-fetch |
| 1845 | (gnus-byte-compile | 1847 | source |
| 1846 | `(lambda (file orig-file) | 1848 | (gnus-byte-compile |
| 1847 | (nnmail-split-incoming | 1849 | `(lambda (file orig-file) |
| 1848 | file ',(intern (format "%s-save-mail" method)) | 1850 | (nnmail-split-incoming |
| 1849 | ',spool-func | 1851 | file ',(intern (format "%s-save-mail" method)) |
| 1850 | (or in-group | 1852 | ',spool-func |
| 1851 | (if (equal file orig-file) | 1853 | (or in-group |
| 1852 | nil | 1854 | (if (equal file orig-file) |
| 1853 | (nnmail-get-split-group orig-file ',source))) | 1855 | nil |
| 1854 | ',(intern (format "%s-active-number" method))))))) | 1856 | (nnmail-get-split-group orig-file |
| 1857 | ',source))) | ||
| 1858 | ',(intern (format "%s-active-number" method)))))) | ||
| 1859 | ((error quit) | ||
| 1860 | (message "Mail source %s failed: %s" source cond) | ||
| 1861 | 0))) | ||
| 1855 | (incf total new) | 1862 | (incf total new) |
| 1856 | (incf i))) | 1863 | (incf i))) |
| 1857 | ;; If we did indeed read any incoming spools, we save all info. | 1864 | ;; If we did indeed read any incoming spools, we save all info. |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 986fd51a613..325aa67f80d 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -261,6 +261,8 @@ See `nnml-marks-is-evil' for more information.") | |||
| 261 | (const :format "" "password") | 261 | (const :format "" "password") |
| 262 | (string :format "Password: %v"))))))) | 262 | (string :format "Password: %v"))))))) |
| 263 | 263 | ||
| 264 | (make-obsolete 'nntp-authinfo-file nil "Emacs 24.1") | ||
| 265 | |||
| 264 | 266 | ||
| 265 | 267 | ||
| 266 | (defvoo nntp-connection-timeout nil | 268 | (defvoo nntp-connection-timeout nil |
| @@ -430,6 +432,9 @@ be restored and the command retried." | |||
| 430 | 432 | ||
| 431 | (defun nntp-kill-buffer (buffer) | 433 | (defun nntp-kill-buffer (buffer) |
| 432 | (when (buffer-name buffer) | 434 | (when (buffer-name buffer) |
| 435 | (let ((process (get-buffer-process buffer))) | ||
| 436 | (when process | ||
| 437 | (delete-process process))) | ||
| 433 | (kill-buffer buffer) | 438 | (kill-buffer buffer) |
| 434 | (nnheader-init-server-buffer))) | 439 | (nnheader-init-server-buffer))) |
| 435 | 440 | ||
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index e29ddb0d44e..54c21703836 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el | |||
| @@ -178,6 +178,8 @@ Use streaming commands." | |||
| 178 | 178 | ||
| 179 | (defun pop3-wait-for-messages (process count total-size) | 179 | (defun pop3-wait-for-messages (process count total-size) |
| 180 | (while (< (pop3-number-of-responses total-size) count) | 180 | (while (< (pop3-number-of-responses total-size) count) |
| 181 | (unless (memq (process-status process) '(open run)) | ||
| 182 | (error "pop3 process died")) | ||
| 181 | (when total-size | 183 | (when total-size |
| 182 | (message "pop3 retrieved %dKB (%d%%)" | 184 | (message "pop3 retrieved %dKB (%d%%)" |
| 183 | (truncate (/ (buffer-size) 1000)) | 185 | (truncate (/ (buffer-size) 1000)) |
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index c1caca90cf0..b995f7478ce 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el | |||
| @@ -301,6 +301,10 @@ GNUTLS requires a port number." | |||
| 301 | starttls-gnutls-program | 301 | starttls-gnutls-program |
| 302 | starttls-program))) | 302 | starttls-program))) |
| 303 | 303 | ||
| 304 | (defalias 'starttls-any-program-available 'starttls-available-p) | ||
| 305 | (make-obsolete 'starttls-any-program-available 'starttls-available-p | ||
| 306 | "2011-08-02") | ||
| 307 | |||
| 304 | (provide 'starttls) | 308 | (provide 'starttls) |
| 305 | 309 | ||
| 306 | ;;; starttls.el ends here | 310 | ;;; starttls.el ends here |
diff --git a/lisp/help.el b/lisp/help.el index e6496f625d1..710dc34ea89 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1104,7 +1104,7 @@ This relies on `display-buffer-window' being correctly set up by | |||
| 1104 | ((eq help-value 'new-window) | 1104 | ((eq help-value 'new-window) |
| 1105 | "Type \\[delete-other-windows] to delete the help window") | 1105 | "Type \\[delete-other-windows] to delete the help window") |
| 1106 | ((eq help-value 'reuse-other-window) | 1106 | ((eq help-value 'reuse-other-window) |
| 1107 | "Type \\[switch-to-prev-buffer] RET to restore previous buffer")) | 1107 | "Type \"q\" in other window to quit")) |
| 1108 | help-window 'other)) | 1108 | help-window 'other)) |
| 1109 | (t | 1109 | (t |
| 1110 | ;; Not much to say here. | 1110 | ;; Not much to say here. |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 637d10135fa..40fbb072594 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25." | |||
| 86 | :type '(choice (integer :tag "Port") (string :tag "Service")) | 86 | :type '(choice (integer :tag "Port") (string :tag "Service")) |
| 87 | :group 'smtpmail) | 87 | :group 'smtpmail) |
| 88 | 88 | ||
| 89 | (defcustom smtpmail-smtp-user nil | ||
| 90 | "User name to use when looking up credentials." | ||
| 91 | :type '(choice (const nil) string) | ||
| 92 | :group 'smtpmail) | ||
| 93 | |||
| 89 | (defcustom smtpmail-local-domain nil | 94 | (defcustom smtpmail-local-domain nil |
| 90 | "Local domain name without a host name. | 95 | "Local domain name without a host name. |
| 91 | If the function `system-name' returns the full internet address, | 96 | If the function `system-name' returns the full internet address, |
| @@ -490,6 +495,7 @@ The list is in preference order.") | |||
| 490 | (auth-source-search | 495 | (auth-source-search |
| 491 | :host host | 496 | :host host |
| 492 | :port port | 497 | :port port |
| 498 | :user smtpmail-smtp-user | ||
| 493 | :max 1 | 499 | :max 1 |
| 494 | :require (and ask-for-password | 500 | :require (and ask-for-password |
| 495 | '(:user :secret)) | 501 | '(:user :secret)) |
| @@ -499,6 +505,8 @@ The list is in preference order.") | |||
| 499 | (save-function (and ask-for-password | 505 | (save-function (and ask-for-password |
| 500 | (plist-get auth-info :save-function))) | 506 | (plist-get auth-info :save-function))) |
| 501 | ret) | 507 | ret) |
| 508 | (when (functionp password) | ||
| 509 | (setq password (funcall password))) | ||
| 502 | (when (and user | 510 | (when (and user |
| 503 | (not password)) | 511 | (not password)) |
| 504 | ;; The user has stored the user name, but not the password, so | 512 | ;; The user has stored the user name, but not the password, so |
| @@ -510,6 +518,7 @@ The list is in preference order.") | |||
| 510 | :max 1 | 518 | :max 1 |
| 511 | :host host | 519 | :host host |
| 512 | :port port | 520 | :port port |
| 521 | :user smtpmail-smtp-user | ||
| 513 | :require '(:user :secret) | 522 | :require '(:user :secret) |
| 514 | :create t)) | 523 | :create t)) |
| 515 | password (plist-get auth-info :secret))) | 524 | password (plist-get auth-info :secret))) |
| @@ -593,8 +602,10 @@ The list is in preference order.") | |||
| 593 | (push smtpmail-smtp-server ports)) | 602 | (push smtpmail-smtp-server ports)) |
| 594 | (while (and (not smtpmail-smtp-server) | 603 | (while (and (not smtpmail-smtp-server) |
| 595 | (setq port (pop ports))) | 604 | (setq port (pop ports))) |
| 596 | (when (setq stream (ignore-errors | 605 | (when (setq stream (condition-case () |
| 597 | (open-network-stream "smtp" nil server port))) | 606 | (open-network-stream "smtp" nil server port) |
| 607 | (quit nil) | ||
| 608 | (error nil))) | ||
| 598 | (customize-save-variable 'smtpmail-smtp-server server) | 609 | (customize-save-variable 'smtpmail-smtp-server server) |
| 599 | (customize-save-variable 'smtpmail-smtp-service port) | 610 | (customize-save-variable 'smtpmail-smtp-service port) |
| 600 | (delete-process stream))) | 611 | (delete-process stream))) |
| @@ -615,8 +626,6 @@ The list is in preference order.") | |||
| 615 | (and mail-specify-envelope-from | 626 | (and mail-specify-envelope-from |
| 616 | (mail-envelope-from)) | 627 | (mail-envelope-from)) |
| 617 | user-mail-address)) | 628 | user-mail-address)) |
| 618 | (coding-system-for-read 'binary) | ||
| 619 | (coding-system-for-write 'binary) | ||
| 620 | response-code | 629 | response-code |
| 621 | process-buffer | 630 | process-buffer |
| 622 | result | 631 | result |
| @@ -635,21 +644,23 @@ The list is in preference order.") | |||
| 635 | (erase-buffer)) | 644 | (erase-buffer)) |
| 636 | 645 | ||
| 637 | ;; open the connection to the server | 646 | ;; open the connection to the server |
| 638 | (setq result | 647 | (let ((coding-system-for-read 'binary) |
| 639 | (open-network-stream | 648 | (coding-system-for-write 'binary)) |
| 640 | "smtpmail" process-buffer host port | 649 | (setq result |
| 641 | :type smtpmail-stream-type | 650 | (open-network-stream |
| 642 | :return-list t | 651 | "smtpmail" process-buffer host port |
| 643 | :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) | 652 | :type smtpmail-stream-type |
| 644 | :end-of-command "^[0-9]+ .*\r\n" | 653 | :return-list t |
| 645 | :success "^2.*\n" | 654 | :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) |
| 646 | :always-query-capabilities t | 655 | :end-of-command "^[0-9]+ .*\r\n" |
| 647 | :starttls-function | 656 | :success "^2.*\n" |
| 648 | (lambda (capabilities) | 657 | :always-query-capabilities t |
| 649 | (and (string-match "-STARTTLS" capabilities) | 658 | :starttls-function |
| 650 | "STARTTLS\r\n")) | 659 | (lambda (capabilities) |
| 651 | :client-certificate t | 660 | (and (string-match "-STARTTLS" capabilities) |
| 652 | :use-starttls-if-possible t)) | 661 | "STARTTLS\r\n")) |
| 662 | :client-certificate t | ||
| 663 | :use-starttls-if-possible t))) | ||
| 653 | 664 | ||
| 654 | ;; If we couldn't access the server at all, we give up. | 665 | ;; If we couldn't access the server at all, we give up. |
| 655 | (unless (setq process (car result)) | 666 | (unless (setq process (car result)) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b82147b97f1..313298de97e 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1119,27 +1119,13 @@ It also eliminates runs of equal strings." | |||
| 1119 | `(display (space :align-to ,column))) | 1119 | `(display (space :align-to ,column))) |
| 1120 | nil)))) | 1120 | nil)))) |
| 1121 | (if (not (consp str)) | 1121 | (if (not (consp str)) |
| 1122 | (put-text-property (point) | 1122 | (put-text-property (point) (progn (insert str) (point)) |
| 1123 | (progn | ||
| 1124 | (insert (bidi-string-mark-left-to-right | ||
| 1125 | str)) | ||
| 1126 | (point)) | ||
| 1127 | 'mouse-face 'highlight) | 1123 | 'mouse-face 'highlight) |
| 1128 | (put-text-property (point) | 1124 | (put-text-property (point) (progn (insert (car str)) (point)) |
| 1129 | (progn | ||
| 1130 | (insert | ||
| 1131 | (bidi-string-mark-left-to-right | ||
| 1132 | (car str))) | ||
| 1133 | (point)) | ||
| 1134 | 'mouse-face 'highlight) | 1125 | 'mouse-face 'highlight) |
| 1135 | (add-text-properties (point) | 1126 | (add-text-properties (point) (progn (insert (cadr str)) (point)) |
| 1136 | (progn | ||
| 1137 | (insert | ||
| 1138 | (bidi-string-mark-left-to-right | ||
| 1139 | (cadr str))) | ||
| 1140 | (point)) | ||
| 1141 | '(mouse-face nil | 1127 | '(mouse-face nil |
| 1142 | face completions-annotations))) | 1128 | face completions-annotations))) |
| 1143 | (cond | 1129 | (cond |
| 1144 | ((eq completions-format 'vertical) | 1130 | ((eq completions-format 'vertical) |
| 1145 | ;; Vertical format | 1131 | ;; Vertical format |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e18b42a275f..f9bc13e1e25 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -1103,26 +1103,32 @@ URL in a new window." | |||
| 1103 | (interactive (browse-url-interactive-arg "URL: ")) | 1103 | (interactive (browse-url-interactive-arg "URL: ")) |
| 1104 | (setq url (browse-url-encode-url url)) | 1104 | (setq url (browse-url-encode-url url)) |
| 1105 | (let* ((process-environment (browse-url-process-environment)) | 1105 | (let* ((process-environment (browse-url-process-environment)) |
| 1106 | (use-remote | ||
| 1107 | (not (memq system-type '(windows-nt ms-dos)))) | ||
| 1106 | (process | 1108 | (process |
| 1107 | (apply 'start-process | 1109 | (apply 'start-process |
| 1108 | (concat "firefox " url) nil | 1110 | (concat "firefox " url) nil |
| 1109 | browse-url-firefox-program | 1111 | browse-url-firefox-program |
| 1110 | (append | 1112 | (append |
| 1111 | browse-url-firefox-arguments | 1113 | browse-url-firefox-arguments |
| 1112 | (if (memq system-type '(windows-nt ms-dos)) | 1114 | (if use-remote |
| 1113 | (list url) | 1115 | (list "-remote" |
| 1114 | (list "-remote" | 1116 | (concat |
| 1115 | (concat "openURL(" | 1117 | "openURL(" |
| 1116 | url | 1118 | url |
| 1117 | (if (browse-url-maybe-new-window | 1119 | (if (browse-url-maybe-new-window new-window) |
| 1118 | new-window) | 1120 | (if browse-url-firefox-new-window-is-tab |
| 1119 | (if browse-url-firefox-new-window-is-tab | 1121 | ",new-tab" |
| 1120 | ",new-tab" | 1122 | ",new-window")) |
| 1121 | ",new-window")) | 1123 | ")")) |
| 1122 | ")"))))))) | 1124 | (list url)))))) |
| 1123 | (set-process-sentinel process | 1125 | ;; If we use -remote, the process exits with status code 2 if |
| 1124 | `(lambda (process change) | 1126 | ;; Firefox is not already running. The sentinel runs firefox |
| 1125 | (browse-url-firefox-sentinel process ,url))))) | 1127 | ;; directly if that happens. |
| 1128 | (when use-remote | ||
| 1129 | (set-process-sentinel process | ||
| 1130 | `(lambda (process change) | ||
| 1131 | (browse-url-firefox-sentinel process ,url)))))) | ||
| 1126 | 1132 | ||
| 1127 | (defun browse-url-firefox-sentinel (process url) | 1133 | (defun browse-url-firefox-sentinel (process url) |
| 1128 | "Handle a change to the process communicating with Firefox." | 1134 | "Handle a change to the process communicating with Firefox." |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 46a82e3720d..bdf2dadd16c 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -811,15 +811,19 @@ this is `comint-dynamic-complete-functions'." | |||
| 811 | (while (< (point) end) | 811 | (while (< (point) end) |
| 812 | (skip-chars-forward " \t\n") | 812 | (skip-chars-forward " \t\n") |
| 813 | (push (point) begins) | 813 | (push (point) begins) |
| 814 | (let ((skip t)) | 814 | (while |
| 815 | (while skip | 815 | (progn |
| 816 | (skip-chars-forward "^ \t\n") | 816 | (skip-chars-forward "^ \t\n\\") |
| 817 | (if (eq (char-before) ?\\) | 817 | (when (eq (char-after) ?\\) |
| 818 | (skip-chars-forward " \t\n") | 818 | (forward-char 1) |
| 819 | (setq skip nil)))) | 819 | (unless (eolp) |
| 820 | (forward-char 1) | ||
| 821 | t)))) | ||
| 820 | (push (buffer-substring-no-properties (car begins) (point)) | 822 | (push (buffer-substring-no-properties (car begins) (point)) |
| 821 | args)) | 823 | args)) |
| 822 | (cons (nreverse args) (nreverse begins))))) | 824 | (cons (nreverse args) (nreverse begins))))) |
| 825 | (make-obsolete 'pcomplete-parse-comint-arguments | ||
| 826 | 'comint-parse-pcomplete-arguments "24.1") | ||
| 823 | 827 | ||
| 824 | (defun pcomplete-parse-arguments (&optional expand-p) | 828 | (defun pcomplete-parse-arguments (&optional expand-p) |
| 825 | "Parse the command line arguments. Most completions need this info." | 829 | "Parse the command line arguments. Most completions need this info." |
| @@ -879,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'." | |||
| 879 | (or (run-hook-with-args-until-success | 883 | (or (run-hook-with-args-until-success |
| 880 | 'pcomplete-quote-arg-hook filename index) | 884 | 'pcomplete-quote-arg-hook filename index) |
| 881 | (when (memq c pcomplete-arg-quote-list) | 885 | (when (memq c pcomplete-arg-quote-list) |
| 882 | (string "\\" c)) | 886 | (string ?\\ c)) |
| 883 | (char-to-string c)) | 887 | (char-to-string c)) |
| 884 | (setq index (1+ index)))) | 888 | (setq index (1+ index)))) |
| 885 | filename | 889 | filename |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0d88f85d263..a1cbdc16560 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -6325,7 +6325,9 @@ comment at the start of cc-engine.el for more info." | |||
| 6325 | (let* ((start (point)) kwd-sym kwd-clause-end found-type) | 6325 | (let* ((start (point)) kwd-sym kwd-clause-end found-type) |
| 6326 | 6326 | ||
| 6327 | ;; Look for a specifier keyword clause. | 6327 | ;; Look for a specifier keyword clause. |
| 6328 | (when (looking-at c-prefix-spec-kwds-re) | 6328 | (when (or (looking-at c-prefix-spec-kwds-re) |
| 6329 | (and (c-major-mode-is 'java-mode) | ||
| 6330 | (looking-at "@[A-Za-z0-9]+"))) | ||
| 6329 | (if (looking-at c-typedef-key) | 6331 | (if (looking-at c-typedef-key) |
| 6330 | (setq at-typedef t)) | 6332 | (setq at-typedef t)) |
| 6331 | (setq kwd-sym (c-keyword-sym (match-string 1))) | 6333 | (setq kwd-sym (c-keyword-sym (match-string 1))) |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 2277ba760ab..3d5dc30d823 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -199,10 +199,16 @@ | |||
| 199 | (set-face-foreground 'c-annotation-face "blue") | 199 | (set-face-foreground 'c-annotation-face "blue") |
| 200 | 200 | ||
| 201 | (eval-and-compile | 201 | (eval-and-compile |
| 202 | ;; We need the following functions during compilation since they're | 202 | ;; We need the following definitions during compilation since they're |
| 203 | ;; called when the `c-lang-defconst' initializers are evaluated. | 203 | ;; used when the `c-lang-defconst' initializers are evaluated. Define |
| 204 | ;; Define them at runtime too for the sake of derived modes. | 204 | ;; them at runtime too for the sake of derived modes. |
| 205 | 205 | ||
| 206 | ;; This indicates the "font locking context", and is set just before | ||
| 207 | ;; fontification is done. If non-nil, it says, e.g., point starts | ||
| 208 | ;; from within a #if preprocessor construct. | ||
| 209 | (defvar c-font-lock-context nil) | ||
| 210 | (make-variable-buffer-local 'c-font-lock-context) | ||
| 211 | |||
| 206 | (defmacro c-put-font-lock-face (from to face) | 212 | (defmacro c-put-font-lock-face (from to face) |
| 207 | ;; Put a face on a region (overriding any existing face) in the way | 213 | ;; Put a face on a region (overriding any existing face) in the way |
| 208 | ;; font-lock would do it. In XEmacs that means putting an | 214 | ;; font-lock would do it. In XEmacs that means putting an |
| @@ -283,6 +289,45 @@ | |||
| 283 | nil))))) | 289 | nil))))) |
| 284 | res)))) | 290 | res)))) |
| 285 | 291 | ||
| 292 | (defun c-make-font-lock-search-form (regexp highlights) | ||
| 293 | ;; Return a lisp form which will fontify every occurence of REGEXP | ||
| 294 | ;; (a regular expression, NOT a function) between POINT and `limit' | ||
| 295 | ;; with HIGHLIGHTS, a list of highlighters as specified on page | ||
| 296 | ;; "Search-based Fontification" in the elisp manual. | ||
| 297 | `(while (re-search-forward ,regexp limit t) | ||
| 298 | (unless (progn | ||
| 299 | (goto-char (match-beginning 0)) | ||
| 300 | (c-skip-comments-and-strings limit)) | ||
| 301 | (goto-char (match-end 0)) | ||
| 302 | ,@(mapcar | ||
| 303 | (lambda (highlight) | ||
| 304 | (if (integerp (car highlight)) | ||
| 305 | ;; e.g. highlight is (1 font-lock-type-face t) | ||
| 306 | (progn | ||
| 307 | (unless (eq (nth 2 highlight) t) | ||
| 308 | (error | ||
| 309 | "The override flag must currently be t in %s" | ||
| 310 | highlight)) | ||
| 311 | (when (nth 3 highlight) | ||
| 312 | (error | ||
| 313 | "The laxmatch flag may currently not be set in %s" | ||
| 314 | highlight)) | ||
| 315 | `(save-match-data | ||
| 316 | (c-put-font-lock-face | ||
| 317 | (match-beginning ,(car highlight)) | ||
| 318 | (match-end ,(car highlight)) | ||
| 319 | ,(elt highlight 1)))) | ||
| 320 | ;; highlight is an "ANCHORED HIGHLIGHER" of the form | ||
| 321 | ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...) | ||
| 322 | (when (nth 3 highlight) | ||
| 323 | (error "Match highlights currently not supported in %s" | ||
| 324 | highlight)) | ||
| 325 | `(progn | ||
| 326 | ,(nth 1 highlight) | ||
| 327 | (save-match-data ,(car highlight)) | ||
| 328 | ,(nth 2 highlight)))) | ||
| 329 | highlights)))) | ||
| 330 | |||
| 286 | (defun c-make-font-lock-search-function (regexp &rest highlights) | 331 | (defun c-make-font-lock-search-function (regexp &rest highlights) |
| 287 | ;; This function makes a byte compiled function that works much like | 332 | ;; This function makes a byte compiled function that works much like |
| 288 | ;; a matcher element in `font-lock-keywords'. It cuts out a little | 333 | ;; a matcher element in `font-lock-keywords'. It cuts out a little |
| @@ -313,43 +358,101 @@ | |||
| 313 | ;; lambda more easily. | 358 | ;; lambda more easily. |
| 314 | (byte-compile | 359 | (byte-compile |
| 315 | `(lambda (limit) | 360 | `(lambda (limit) |
| 316 | (let (;; The font-lock package in Emacs is known to clobber | 361 | (let ( ;; The font-lock package in Emacs is known to clobber |
| 317 | ;; `parse-sexp-lookup-properties' (when it exists). | 362 | ;; `parse-sexp-lookup-properties' (when it exists). |
| 318 | (parse-sexp-lookup-properties | 363 | (parse-sexp-lookup-properties |
| 319 | (cc-eval-when-compile | 364 | (cc-eval-when-compile |
| 320 | (boundp 'parse-sexp-lookup-properties)))) | 365 | (boundp 'parse-sexp-lookup-properties)))) |
| 321 | (while (re-search-forward ,regexp limit t) | 366 | |
| 322 | (unless (progn | 367 | ;; (while (re-search-forward ,regexp limit t) |
| 323 | (goto-char (match-beginning 0)) | 368 | ;; (unless (progn |
| 324 | (c-skip-comments-and-strings limit)) | 369 | ;; (goto-char (match-beginning 0)) |
| 325 | (goto-char (match-end 0)) | 370 | ;; (c-skip-comments-and-strings limit)) |
| 326 | ,@(mapcar | 371 | ;; (goto-char (match-end 0)) |
| 327 | (lambda (highlight) | 372 | ;; ,@(mapcar |
| 328 | (if (integerp (car highlight)) | 373 | ;; (lambda (highlight) |
| 329 | (progn | 374 | ;; (if (integerp (car highlight)) |
| 330 | (unless (eq (nth 2 highlight) t) | 375 | ;; (progn |
| 331 | (error | 376 | ;; (unless (eq (nth 2 highlight) t) |
| 332 | "The override flag must currently be t in %s" | 377 | ;; (error |
| 333 | highlight)) | 378 | ;; "The override flag must currently be t in %s" |
| 334 | (when (nth 3 highlight) | 379 | ;; highlight)) |
| 335 | (error | 380 | ;; (when (nth 3 highlight) |
| 336 | "The laxmatch flag may currently not be set in %s" | 381 | ;; (error |
| 337 | highlight)) | 382 | ;; "The laxmatch flag may currently not be set in %s" |
| 338 | `(save-match-data | 383 | ;; highlight)) |
| 339 | (c-put-font-lock-face | 384 | ;; `(save-match-data |
| 340 | (match-beginning ,(car highlight)) | 385 | ;; (c-put-font-lock-face |
| 341 | (match-end ,(car highlight)) | 386 | ;; (match-beginning ,(car highlight)) |
| 342 | ,(elt highlight 1)))) | 387 | ;; (match-end ,(car highlight)) |
| 343 | (when (nth 3 highlight) | 388 | ;; ,(elt highlight 1)))) |
| 344 | (error "Match highlights currently not supported in %s" | 389 | ;; (when (nth 3 highlight) |
| 345 | highlight)) | 390 | ;; (error "Match highlights currently not supported in %s" |
| 346 | `(progn | 391 | ;; highlight)) |
| 347 | ,(nth 1 highlight) | 392 | ;; `(progn |
| 348 | (save-match-data ,(car highlight)) | 393 | ;; ,(nth 1 highlight) |
| 349 | ,(nth 2 highlight)))) | 394 | ;; (save-match-data ,(car highlight)) |
| 350 | highlights)))) | 395 | ;; ,(nth 2 highlight)))) |
| 396 | ;; highlights))) | ||
| 397 | ,(c-make-font-lock-search-form regexp highlights)) | ||
| 398 | |||
| 351 | nil))) | 399 | nil))) |
| 352 | 400 | ||
| 401 | (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) | ||
| 402 | ;; This function makes a byte compiled function that works much like | ||
| 403 | ;; a matcher element in `font-lock-keywords', with the following | ||
| 404 | ;; enhancement: the generated function will test for particular "font | ||
| 405 | ;; lock contexts" at the start of the region, i.e. is this point in | ||
| 406 | ;; the middle of some particular construct? if so the generated | ||
| 407 | ;; function will first fontify the tail of the construct, before | ||
| 408 | ;; going into the main loop and fontify full constructs up to limit. | ||
| 409 | ;; | ||
| 410 | ;; The generated function takes one parameter called `limit', and | ||
| 411 | ;; will fontify the region between POINT and LIMIT. | ||
| 412 | ;; | ||
| 413 | ;; NORMAL is a list of the form (REGEXP HIGHLIGHTS .....), and is | ||
| 414 | ;; used to fontify the "regular" bit of the region. | ||
| 415 | ;; STATE-STANZAS is list of elements of the form (STATE LIM REGEXP | ||
| 416 | ;; HIGHLIGHTS), each element coding one possible font lock context. | ||
| 417 | |||
| 418 | ;; o - REGEXP is a font-lock regular expression (NOT a function), | ||
| 419 | ;; o - HIGHLIGHTS is a list of zero or more highlighters as defined | ||
| 420 | ;; on page "Search-based Fontification" in the elisp manual. As | ||
| 421 | ;; yet (2009-06), they must have OVERRIDE set, and may not have | ||
| 422 | ;; LAXMATCH set. | ||
| 423 | ;; | ||
| 424 | ;; o - STATE is the "font lock context" (e.g. in-cpp-expr) and is | ||
| 425 | ;; not quoted. | ||
| 426 | ;; o - LIM is a lisp form whose evaluation will yield the limit | ||
| 427 | ;; position in the buffer for fontification by this stanza. | ||
| 428 | ;; | ||
| 429 | ;; This function does not do any hidden buffer changes, but the | ||
| 430 | ;; generated functions will. (They are however used in places | ||
| 431 | ;; covered by the font-lock context.) | ||
| 432 | ;; | ||
| 433 | ;; Note: Replace `byte-compile' with `eval' to debug the generated | ||
| 434 | ;; lambda more easily. | ||
| 435 | (byte-compile | ||
| 436 | `(lambda (limit) | ||
| 437 | (let ( ;; The font-lock package in Emacs is known to clobber | ||
| 438 | ;; `parse-sexp-lookup-properties' (when it exists). | ||
| 439 | (parse-sexp-lookup-properties | ||
| 440 | (cc-eval-when-compile | ||
| 441 | (boundp 'parse-sexp-lookup-properties)))) | ||
| 442 | ,@(mapcar | ||
| 443 | (lambda (stanza) | ||
| 444 | (let ((state (car stanza)) | ||
| 445 | (lim (nth 1 stanza)) | ||
| 446 | (regexp (nth 2 stanza)) | ||
| 447 | (highlights (cdr (cddr stanza)))) | ||
| 448 | `(if (eq c-font-lock-context ',state) | ||
| 449 | (let ((limit ,lim)) | ||
| 450 | ,(c-make-font-lock-search-form | ||
| 451 | regexp highlights))))) | ||
| 452 | state-stanzas) | ||
| 453 | ,(c-make-font-lock-search-form (car normal) (cdr normal)) | ||
| 454 | nil)))) | ||
| 455 | |||
| 353 | ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. | 456 | ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. |
| 354 | ; '(progn | 457 | ; '(progn |
| 355 | (def-edebug-spec c-fontify-types-and-refs let*) | 458 | (def-edebug-spec c-fontify-types-and-refs let*) |
| @@ -494,19 +597,24 @@ stuff. Used on level 1 and higher." | |||
| 494 | (c-lang-const c-cpp-expr-directives))) | 597 | (c-lang-const c-cpp-expr-directives))) |
| 495 | (cef-re (c-make-keywords-re t | 598 | (cef-re (c-make-keywords-re t |
| 496 | (c-lang-const c-cpp-expr-functions)))) | 599 | (c-lang-const c-cpp-expr-functions)))) |
| 497 | `((,(c-make-font-lock-search-function | 600 | |
| 498 | (concat noncontinued-line-end | 601 | `((,(c-make-font-lock-context-search-function |
| 499 | (c-lang-const c-opt-cpp-prefix) | 602 | `(,(concat noncontinued-line-end |
| 500 | ced-re ; 1 + ncle-depth | 603 | (c-lang-const c-opt-cpp-prefix) |
| 501 | ;; Match the whole logical line to look | 604 | ced-re ; 1 + ncle-depth |
| 502 | ;; for the functions in. | 605 | ;; Match the whole logical line to look |
| 503 | "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") | 606 | ;; for the functions in. |
| 504 | `((let ((limit (match-end 0))) | 607 | "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") |
| 505 | (while (re-search-forward ,cef-re limit 'move) | 608 | ((let ((limit (match-end 0))) |
| 506 | (c-put-font-lock-face (match-beginning 1) | 609 | (while (re-search-forward ,cef-re limit 'move) |
| 507 | (match-end 1) | 610 | (c-put-font-lock-face (match-beginning 1) |
| 508 | c-preprocessor-face-name))) | 611 | (match-end 1) |
| 509 | (goto-char (match-end ,(1+ ncle-depth))))))))) | 612 | c-preprocessor-face-name))) |
| 613 | (goto-char (match-end ,(1+ ncle-depth))))) | ||
| 614 | `(in-cpp-expr | ||
| 615 | (save-excursion (c-end-of-macro) (point)) | ||
| 616 | ,cef-re | ||
| 617 | (1 c-preprocessor-face-name t))))))) | ||
| 510 | 618 | ||
| 511 | ;; Fontify the directive names. | 619 | ;; Fontify the directive names. |
| 512 | (,(c-make-font-lock-search-function | 620 | (,(c-make-font-lock-search-function |
| @@ -759,6 +867,12 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 759 | (c-forward-syntactic-ws limit) | 867 | (c-forward-syntactic-ws limit) |
| 760 | (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) | 868 | (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) |
| 761 | 869 | ||
| 870 | (setq c-font-lock-context ;; (c-guess-font-lock-context) | ||
| 871 | (save-excursion | ||
| 872 | (if (and c-cpp-expr-intro-re | ||
| 873 | (c-beginning-of-macro) | ||
| 874 | (looking-at c-cpp-expr-intro-re)) | ||
| 875 | 'in-cpp-expr))) | ||
| 762 | nil) | 876 | nil) |
| 763 | 877 | ||
| 764 | (defun c-font-lock-<>-arglists (limit) | 878 | (defun c-font-lock-<>-arglists (limit) |
| @@ -1552,7 +1666,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." | |||
| 1552 | (unless (c-skip-comments-and-strings limit) | 1666 | (unless (c-skip-comments-and-strings limit) |
| 1553 | (c-forward-syntactic-ws) | 1667 | (c-forward-syntactic-ws) |
| 1554 | ;; Handle prefix declaration specifiers. | 1668 | ;; Handle prefix declaration specifiers. |
| 1555 | (when (looking-at c-prefix-spec-kwds-re) | 1669 | (when (or (looking-at c-prefix-spec-kwds-re) |
| 1670 | (and (c-major-mode-is 'java-mode) | ||
| 1671 | (looking-at "@[A-Za-z0-9]+"))) | ||
| 1556 | (c-forward-keyword-clause 1)) | 1672 | (c-forward-keyword-clause 1)) |
| 1557 | ,(if (c-major-mode-is 'c++-mode) | 1673 | ,(if (c-major-mode-is 'c++-mode) |
| 1558 | `(when (and (c-forward-type) | 1674 | `(when (and (c-forward-type) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 35097242cb7..279c5e46c46 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -815,6 +815,16 @@ expression." | |||
| 815 | t (if (c-lang-const c-opt-cpp-prefix) | 815 | t (if (c-lang-const c-opt-cpp-prefix) |
| 816 | '("if" "elif"))) | 816 | '("if" "elif"))) |
| 817 | 817 | ||
| 818 | (c-lang-defconst c-cpp-expr-intro-re | ||
| 819 | "Regexp which matches the start of a CPP directive which contains an | ||
| 820 | expression, or nil if there aren't any in the language." | ||
| 821 | t (if (c-lang-const c-cpp-expr-directives) | ||
| 822 | (concat | ||
| 823 | (c-lang-const c-opt-cpp-prefix) | ||
| 824 | (c-make-keywords-re t (c-lang-const c-cpp-expr-directives))))) | ||
| 825 | (c-lang-defvar c-cpp-expr-intro-re | ||
| 826 | (c-lang-const c-cpp-expr-intro-re)) | ||
| 827 | |||
| 818 | (c-lang-defconst c-cpp-expr-functions | 828 | (c-lang-defconst c-cpp-expr-functions |
| 819 | "List of functions in cpp expressions." | 829 | "List of functions in cpp expressions." |
| 820 | t (if (c-lang-const c-opt-cpp-prefix) | 830 | t (if (c-lang-const c-opt-cpp-prefix) |
| @@ -1813,7 +1823,7 @@ will be handled." | |||
| 1813 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") | 1823 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") |
| 1814 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. | 1824 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. |
| 1815 | java '("abstract" "const" "final" "native" "private" "protected" "public" | 1825 | java '("abstract" "const" "final" "native" "private" "protected" "public" |
| 1816 | "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") | 1826 | "static" "strictfp" "synchronized" "transient" "volatile") |
| 1817 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" | 1827 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" |
| 1818 | "public" "static" "variant")) | 1828 | "public" "static" "variant")) |
| 1819 | 1829 | ||
| @@ -1899,10 +1909,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds', | |||
| 1899 | 1909 | ||
| 1900 | (c-lang-defconst c-prefix-spec-kwds-re | 1910 | (c-lang-defconst c-prefix-spec-kwds-re |
| 1901 | ;; Adorned regexp of `c-prefix-spec-kwds'. | 1911 | ;; Adorned regexp of `c-prefix-spec-kwds'. |
| 1902 | t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) | 1912 | t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))) |
| 1903 | java (replace-regexp-in-string | ||
| 1904 | "\\\\\\[" "[" | ||
| 1905 | (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))))) | ||
| 1906 | 1913 | ||
| 1907 | (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) | 1914 | (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) |
| 1908 | 1915 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f3b873c8b1e..79fec080d57 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -145,7 +145,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 145 | 145 | ||
| 146 | (ant | 146 | (ant |
| 147 | "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ | 147 | "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ |
| 148 | \\( warning\\)?" 1 (2 . 4) (3 . 5) (4)) | 148 | \\( warning\\)?" 1 (2 . 4) (3 . 5) (6)) |
| 149 | 149 | ||
| 150 | (bash | 150 | (bash |
| 151 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) | 151 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) |
| @@ -523,7 +523,7 @@ you may also want to change `compilation-page-delimiter'.") | |||
| 523 | ;; Command output lines. Recognize `make[n]:' lines too. | 523 | ;; Command output lines. Recognize `make[n]:' lines too. |
| 524 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" | 524 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" |
| 525 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) | 525 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) |
| 526 | (" -\\(?:o[= ]?\\|-\\(?:outfile\\|output\\)[= ]\\)\\(\\S +\\)" . 1) | 526 | (" --?o\\(?:utfile\\|utput\\)?[= ]\\(\\S +\\)" . 1) |
| 527 | ("^Compilation \\(finished\\).*" | 527 | ("^Compilation \\(finished\\).*" |
| 528 | (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) | 528 | (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) |
| 529 | (1 compilation-info-face)) | 529 | (1 compilation-info-face)) |
| @@ -985,12 +985,15 @@ POS and RES.") | |||
| 985 | (let* ((prev | 985 | (let* ((prev |
| 986 | (or (get-text-property (1- prev-pos) 'compilation-message) | 986 | (or (get-text-property (1- prev-pos) 'compilation-message) |
| 987 | (get-text-property prev-pos 'compilation-message))) | 987 | (get-text-property prev-pos 'compilation-message))) |
| 988 | (prev-struct | 988 | (prev-file-struct |
| 989 | (car (nth 2 (car prev))))) | 989 | (and prev |
| 990 | (compilation--loc->file-struct | ||
| 991 | (compilation--message->loc prev))))) | ||
| 992 | |||
| 990 | ;; Construct FILE . DIR from that. | 993 | ;; Construct FILE . DIR from that. |
| 991 | (if prev-struct | 994 | (if prev-file-struct |
| 992 | (setq file (cons (car prev-struct) | 995 | (setq file (cons (caar prev-file-struct) |
| 993 | (cadr prev-struct)))))) | 996 | (cadr (car prev-file-struct))))))) |
| 994 | (unless file | 997 | (unless file |
| 995 | (setq file '("*unknown*"))))) | 998 | (setq file '("*unknown*"))))) |
| 996 | ;; All of these fields are optional, get them only if we have an index, and | 999 | ;; All of these fields are optional, get them only if we have an index, and |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 31100f3fac2..709f01444bf 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -463,9 +463,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 463 | (set (make-local-variable 'compilation-exit-message-function) | 463 | (set (make-local-variable 'compilation-exit-message-function) |
| 464 | (lambda (status code msg) | 464 | (lambda (status code msg) |
| 465 | (if (eq status 'exit) | 465 | (if (eq status 'exit) |
| 466 | (cond ((zerop code) | 466 | ;; This relies on the fact that `compilation-start' |
| 467 | ;; sets buffer-modified to nil before running the command, | ||
| 468 | ;; so the buffer is still unmodified if there is no output. | ||
| 469 | (cond ((and (zerop code) (buffer-modified-p)) | ||
| 467 | '("finished (matches found)\n" . "matched")) | 470 | '("finished (matches found)\n" . "matched")) |
| 468 | ((= code 1) | 471 | ((or (= code 1) (not (buffer-modified-p))) |
| 469 | '("finished with no matches found\n" . "no match")) | 472 | '("finished with no matches found\n" . "no match")) |
| 470 | (t | 473 | (t |
| 471 | (cons msg code))) | 474 | (cons msg code))) |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 4151e2bb79a..470b309434c 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -55,24 +55,24 @@ | |||
| 55 | (defvar scheme-mode-syntax-table | 55 | (defvar scheme-mode-syntax-table |
| 56 | (let ((st (make-syntax-table)) | 56 | (let ((st (make-syntax-table)) |
| 57 | (i 0)) | 57 | (i 0)) |
| 58 | 58 | ;; Symbol constituents | |
| 59 | ;; Default is atom-constituent. | 59 | ;; We used to treat chars 128-256 as symbol-constituent, but they |
| 60 | (while (< i 256) | 60 | ;; should be valid word constituents (Bug#8843). Note that valid |
| 61 | ;; identifier characters are Scheme-implementation dependent. | ||
| 62 | (while (< i ?0) | ||
| 61 | (modify-syntax-entry i "_ " st) | 63 | (modify-syntax-entry i "_ " st) |
| 62 | (setq i (1+ i))) | 64 | (setq i (1+ i))) |
| 63 | 65 | (setq i (1+ ?9)) | |
| 64 | ;; Word components. | 66 | (while (< i ?A) |
| 65 | (setq i ?0) | 67 | (modify-syntax-entry i "_ " st) |
| 66 | (while (<= i ?9) | ||
| 67 | (modify-syntax-entry i "w " st) | ||
| 68 | (setq i (1+ i))) | 68 | (setq i (1+ i))) |
| 69 | (setq i ?A) | 69 | (setq i (1+ ?Z)) |
| 70 | (while (<= i ?Z) | 70 | (while (< i ?a) |
| 71 | (modify-syntax-entry i "w " st) | 71 | (modify-syntax-entry i "_ " st) |
| 72 | (setq i (1+ i))) | 72 | (setq i (1+ i))) |
| 73 | (setq i ?a) | 73 | (setq i (1+ ?z)) |
| 74 | (while (<= i ?z) | 74 | (while (< i 128) |
| 75 | (modify-syntax-entry i "w " st) | 75 | (modify-syntax-entry i "_ " st) |
| 76 | (setq i (1+ i))) | 76 | (setq i (1+ i))) |
| 77 | 77 | ||
| 78 | ;; Whitespace | 78 | ;; Whitespace |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 31a4fbaef4d..7b949134c6c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -460,6 +460,7 @@ This is buffer-local in every such buffer.") | |||
| 460 | (define-key map "\C-c+" 'sh-add) | 460 | (define-key map "\C-c+" 'sh-add) |
| 461 | (define-key map "\C-\M-x" 'sh-execute-region) | 461 | (define-key map "\C-\M-x" 'sh-execute-region) |
| 462 | (define-key map "\C-c\C-x" 'executable-interpret) | 462 | (define-key map "\C-c\C-x" 'executable-interpret) |
| 463 | ;; FIXME: Use post-self-insert-hook. | ||
| 463 | (define-key map "<" 'sh-maybe-here-document) | 464 | (define-key map "<" 'sh-maybe-here-document) |
| 464 | (define-key map "(" 'skeleton-pair-insert-maybe) | 465 | (define-key map "(" 'skeleton-pair-insert-maybe) |
| 465 | (define-key map "{" 'skeleton-pair-insert-maybe) | 466 | (define-key map "{" 'skeleton-pair-insert-maybe) |
| @@ -3659,6 +3660,7 @@ The document is bounded by `sh-here-document-word'." | |||
| 3659 | (save-excursion | 3660 | (save-excursion |
| 3660 | (backward-char 2) | 3661 | (backward-char 2) |
| 3661 | (sh-quoted-p)) | 3662 | (sh-quoted-p)) |
| 3663 | (nth 8 (syntax-ppss)) | ||
| 3662 | (let ((tabs (if (string-match "\\`-" sh-here-document-word) | 3664 | (let ((tabs (if (string-match "\\`-" sh-here-document-word) |
| 3663 | (make-string (/ (current-indentation) tab-width) ?\t) | 3665 | (make-string (/ (current-indentation) tab-width) ?\t) |
| 3664 | "")) | 3666 | "")) |
diff --git a/lisp/shell.el b/lisp/shell.el index de811543ba0..01d1a688f0e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -383,6 +383,21 @@ to `dirtrack-mode'." | |||
| 383 | :group 'shell | 383 | :group 'shell |
| 384 | :type '(choice (const nil) regexp)) | 384 | :type '(choice (const nil) regexp)) |
| 385 | 385 | ||
| 386 | (defun shell-parse-pcomplete-arguments () | ||
| 387 | "Parse whitespace separated arguments in the current region." | ||
| 388 | (let ((begin (save-excursion (shell-backward-command 1) (point))) | ||
| 389 | (end (point)) | ||
| 390 | begins args) | ||
| 391 | (save-excursion | ||
| 392 | (goto-char begin) | ||
| 393 | (while (< (point) end) | ||
| 394 | (skip-chars-forward " \t\n") | ||
| 395 | (push (point) begins) | ||
| 396 | (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") | ||
| 397 | (goto-char (match-end 0)) | ||
| 398 | (push (buffer-substring-no-properties (car begins) (point)) | ||
| 399 | args)) | ||
| 400 | (cons (nreverse args) (nreverse begins))))) | ||
| 386 | 401 | ||
| 387 | (defun shell-completion-vars () | 402 | (defun shell-completion-vars () |
| 388 | "Setup completion vars for `shell-mode' and `read-shell-command'." | 403 | "Setup completion vars for `shell-mode' and `read-shell-command'." |
| @@ -396,8 +411,9 @@ to `dirtrack-mode'." | |||
| 396 | (set (make-local-variable 'comint-dynamic-complete-functions) | 411 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 397 | shell-dynamic-complete-functions) | 412 | shell-dynamic-complete-functions) |
| 398 | (set (make-local-variable 'pcomplete-parse-arguments-function) | 413 | (set (make-local-variable 'pcomplete-parse-arguments-function) |
| 399 | ;; FIXME: This function should be moved to shell.el. | 414 | #'shell-parse-pcomplete-arguments) |
| 400 | #'pcomplete-parse-comint-arguments) | 415 | (set (make-local-variable 'pcomplete-arg-quote-list) |
| 416 | (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) | ||
| 401 | (set (make-local-variable 'pcomplete-termination-string) | 417 | (set (make-local-variable 'pcomplete-termination-string) |
| 402 | (cond ((not comint-completion-addsuffix) "") | 418 | (cond ((not comint-completion-addsuffix) "") |
| 403 | ((stringp comint-completion-addsuffix) | 419 | ((stringp comint-completion-addsuffix) |
diff --git a/lisp/startup.el b/lisp/startup.el index 0dee969fb5a..6c3bb397e9a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -409,7 +409,7 @@ The regexp should not contain a starting \"\\`\" or a trailing | |||
| 409 | \"\\'\"; those are added automatically by callers.") | 409 | \"\\'\"; those are added automatically by callers.") |
| 410 | 410 | ||
| 411 | (defun normal-top-level-add-subdirs-to-load-path () | 411 | (defun normal-top-level-add-subdirs-to-load-path () |
| 412 | "Add all subdirectories of current directory to `load-path'. | 412 | "Add all subdirectories of `default-directory' to `load-path'. |
| 413 | More precisely, this uses only the subdirectories whose names | 413 | More precisely, this uses only the subdirectories whose names |
| 414 | start with letters or digits; it excludes any subdirectory named `RCS' | 414 | start with letters or digits; it excludes any subdirectory named `RCS' |
| 415 | or `CVS', and any subdirectory that contains a file named `.nosearch'." | 415 | or `CVS', and any subdirectory that contains a file named `.nosearch'." |
diff --git a/lisp/term.el b/lisp/term.el index 6d7f6f5c535..361ff685396 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1227,9 +1227,9 @@ without any interpretation." | |||
| 1227 | (make-string 1 char) | 1227 | (make-string 1 char) |
| 1228 | (format "\e%c" char))))) | 1228 | (format "\e%c" char))))) |
| 1229 | 1229 | ||
| 1230 | (defun term-mouse-paste (click arg) | 1230 | (defun term-mouse-paste (click) |
| 1231 | "Insert the last stretch of killed text at the position clicked on." | 1231 | "Insert the primary selection at the position clicked on." |
| 1232 | (interactive "e\nP") | 1232 | (interactive "e") |
| 1233 | (if (featurep 'xemacs) | 1233 | (if (featurep 'xemacs) |
| 1234 | (term-send-raw-string | 1234 | (term-send-raw-string |
| 1235 | (or (condition-case () (x-get-selection) (error ())) | 1235 | (or (condition-case () (x-get-selection) (error ())) |
| @@ -1238,10 +1238,17 @@ without any interpretation." | |||
| 1238 | (run-hooks 'mouse-leave-buffer-hook) | 1238 | (run-hooks 'mouse-leave-buffer-hook) |
| 1239 | (setq this-command 'yank) | 1239 | (setq this-command 'yank) |
| 1240 | (mouse-set-point click) | 1240 | (mouse-set-point click) |
| 1241 | (term-send-raw-string (current-kill (cond | 1241 | (term-send-raw-string |
| 1242 | ((listp arg) 0) | 1242 | (or (cond ; From `mouse-yank-primary': |
| 1243 | ((eq arg '-) -1) | 1243 | ((eq system-type 'windows-nt) |
| 1244 | (t (1- arg))))))) | 1244 | (or (x-get-selection 'PRIMARY) |
| 1245 | (x-get-selection-value))) | ||
| 1246 | ((fboundp 'x-get-selection-value) | ||
| 1247 | (or (x-get-selection-value) | ||
| 1248 | (x-get-selection 'PRIMARY))) | ||
| 1249 | (t | ||
| 1250 | (x-get-selection 'PRIMARY))) | ||
| 1251 | (error "No selection is available"))))) | ||
| 1245 | 1252 | ||
| 1246 | (defun term-paste () | 1253 | (defun term-paste () |
| 1247 | "Insert the last stretch of killed text at point." | 1254 | "Insert the last stretch of killed text at point." |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 77ef50843d3..c57ec33d2e2 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -253,7 +253,7 @@ LEFT and RIGHT are the elements to compare." | |||
| 253 | ;; * INSERTING AND DELETING | 253 | ;; * INSERTING AND DELETING |
| 254 | ;; C-u 8 * to insert ********. | 254 | ;; C-u 8 * to insert ********. |
| 255 | (delete-backward-char "\d") | 255 | (delete-backward-char "\d") |
| 256 | (delete-forward-char [?\C-d]) | 256 | (delete-char [?\C-d]) |
| 257 | (backward-kill-word [?\M-\d]) | 257 | (backward-kill-word [?\M-\d]) |
| 258 | (kill-word [?\M-d]) | 258 | (kill-word [?\M-d]) |
| 259 | (kill-line [?\C-k]) | 259 | (kill-line [?\C-k]) |
| @@ -298,7 +298,7 @@ LEFT and RIGHT are the elements to compare." | |||
| 298 | (isearch-backward [?\C-r]) | 298 | (isearch-backward [?\C-r]) |
| 299 | 299 | ||
| 300 | ;; * MULTIPLE WINDOWS | 300 | ;; * MULTIPLE WINDOWS |
| 301 | (split-window-vertically [?\C-x ?2]) | 301 | (split-window-above-each-other [?\C-x ?2]) |
| 302 | (scroll-other-window [?\C-\M-v]) | 302 | (scroll-other-window [?\C-\M-v]) |
| 303 | (other-window [?\C-x ?o]) | 303 | (other-window [?\C-x ?o]) |
| 304 | (find-file-other-window [?\C-x ?4 ?\C-f]) | 304 | (find-file-other-window [?\C-x ?4 ?\C-f]) |
| @@ -889,6 +889,11 @@ Run the Viper tutorial? ")) | |||
| 889 | (search-forward ">>") | 889 | (search-forward ">>") |
| 890 | (replace-match "]"))) | 890 | (replace-match "]"))) |
| 891 | (beginning-of-line) | 891 | (beginning-of-line) |
| 892 | ;; FIXME: if the window is not tall, and especially if the | ||
| 893 | ;; big red "NOTICE: The main purpose..." text has been | ||
| 894 | ;; inserted at the start of the buffer, the "type C-v to | ||
| 895 | ;; move to the next screen" might not be visible on the | ||
| 896 | ;; first screen (n < 0). How will the novice know what to do? | ||
| 892 | (let ((n (- (window-height (selected-window)) | 897 | (let ((n (- (window-height (selected-window)) |
| 893 | (count-lines (point-min) (point)) | 898 | (count-lines (point-min) (point)) |
| 894 | 6))) | 899 | 6))) |
| @@ -897,7 +902,7 @@ Run the Viper tutorial? ")) | |||
| 897 | ;; For a short gap, we don't need the [...] line, | 902 | ;; For a short gap, we don't need the [...] line, |
| 898 | ;; so delete it. | 903 | ;; so delete it. |
| 899 | (delete-region (point) (progn (end-of-line) (point))) | 904 | (delete-region (point) (progn (end-of-line) (point))) |
| 900 | (newline n)) | 905 | (if (> n 0) (newline n))) |
| 901 | ;; Some people get confused by the large gap. | 906 | ;; Some people get confused by the large gap. |
| 902 | (newline (/ n 2)) | 907 | (newline (/ n 2)) |
| 903 | 908 | ||
diff --git a/lisp/window.el b/lisp/window.el index eca3dcb435d..75fa0b46a1c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4763,8 +4763,10 @@ BUFFER, nil if none was found." | |||
| 4763 | (dolist (window (window-list-1 nil 'nomini method-frame)) | 4763 | (dolist (window (window-list-1 nil 'nomini method-frame)) |
| 4764 | (let ((window-buffer (window-buffer window))) | 4764 | (let ((window-buffer (window-buffer window))) |
| 4765 | (when (and (not (window-minibuffer-p window)) | 4765 | (when (and (not (window-minibuffer-p window)) |
| 4766 | ;; Don't reuse a side window. | 4766 | ;; Don't reuse a side window unless it shows the |
| 4767 | (or (not (eq (window-parameter window 'window-side) 'side)) | 4767 | ;; buffer already. |
| 4768 | (or (memq (window-parameter window 'window-side) | ||
| 4769 | '(nil none)) | ||
| 4768 | (eq window-buffer buffer)) | 4770 | (eq window-buffer buffer)) |
| 4769 | (or (not method-window) | 4771 | (or (not method-window) |
| 4770 | (and (eq method-window 'same) | 4772 | (and (eq method-window 'same) |
| @@ -5033,7 +5035,8 @@ description." | |||
| 5033 | ;; and must be neither a minibuffer window | 5035 | ;; and must be neither a minibuffer window |
| 5034 | (not (window-minibuffer-p window)) | 5036 | (not (window-minibuffer-p window)) |
| 5035 | ;; nor a side window. | 5037 | ;; nor a side window. |
| 5036 | (not (eq (window-parameter window 'window-side) 'side))) | 5038 | (memq (window-parameter window 'window-side) |
| 5039 | '(nil none))) | ||
| 5037 | (setq window | 5040 | (setq window |
| 5038 | (cond | 5041 | (cond |
| 5039 | ((memq side display-buffer-side-specifiers) | 5042 | ((memq side display-buffer-side-specifiers) |
| @@ -6079,9 +6082,6 @@ ignored. | |||
| 6079 | See also `same-window-regexps'." | 6082 | See also `same-window-regexps'." |
| 6080 | :type '(repeat (string :format "%v")) | 6083 | :type '(repeat (string :format "%v")) |
| 6081 | :group 'windows) | 6084 | :group 'windows) |
| 6082 | ;; (make-obsolete-variable | ||
| 6083 | ;; 'same-window-buffer-names | ||
| 6084 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6085 | 6085 | ||
| 6086 | (defcustom same-window-regexps nil | 6086 | (defcustom same-window-regexps nil |
| 6087 | "List of regexps saying which buffers should appear in the \"same\" window. | 6087 | "List of regexps saying which buffers should appear in the \"same\" window. |
| @@ -6097,9 +6097,6 @@ the buffer name. This is for compatibility with | |||
| 6097 | See also `same-window-buffer-names'." | 6097 | See also `same-window-buffer-names'." |
| 6098 | :type '(repeat (regexp :format "%v")) | 6098 | :type '(repeat (regexp :format "%v")) |
| 6099 | :group 'windows) | 6099 | :group 'windows) |
| 6100 | ;; (make-obsolete-variable | ||
| 6101 | ;; 'same-window-regexps | ||
| 6102 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6103 | 6100 | ||
| 6104 | (defun same-window-p (buffer-name) | 6101 | (defun same-window-p (buffer-name) |
| 6105 | "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. | 6102 | "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. |
| @@ -6124,8 +6121,6 @@ selected rather than \(as usual\) some other window. See | |||
| 6124 | (and (consp regexp) (stringp (car regexp)) | 6121 | (and (consp regexp) (stringp (car regexp)) |
| 6125 | (string-match-p (car regexp) buffer-name))) | 6122 | (string-match-p (car regexp) buffer-name))) |
| 6126 | (throw 'found t)))))))) | 6123 | (throw 'found t)))))))) |
| 6127 | ;; (make-obsolete | ||
| 6128 | ;; 'same-window-p "pass argument to buffer display function instead." "24.1") | ||
| 6129 | 6124 | ||
| 6130 | (defcustom special-display-frame-alist | 6125 | (defcustom special-display-frame-alist |
| 6131 | '((height . 14) (width . 80) (unsplittable . t)) | 6126 | '((height . 14) (width . 80) (unsplittable . t)) |
| @@ -6143,9 +6138,6 @@ These supersede the values given in `default-frame-alist'." | |||
| 6143 | (symbol :tag "Parameter") | 6138 | (symbol :tag "Parameter") |
| 6144 | (sexp :tag "Value"))) | 6139 | (sexp :tag "Value"))) |
| 6145 | :group 'frames) | 6140 | :group 'frames) |
| 6146 | ;; (make-obsolete-variable | ||
| 6147 | ;; 'special-display-frame-alist | ||
| 6148 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6149 | 6141 | ||
| 6150 | (defun special-display-popup-frame (buffer &optional args) | 6142 | (defun special-display-popup-frame (buffer &optional args) |
| 6151 | "Display BUFFER in a special frame and return the window chosen. | 6143 | "Display BUFFER in a special frame and return the window chosen. |
| @@ -6191,9 +6183,6 @@ and (cdr ARGS) as the rest of the arguments." | |||
| 6191 | (set-window-buffer (frame-selected-window frame) buffer) | 6183 | (set-window-buffer (frame-selected-window frame) buffer) |
| 6192 | (set-window-dedicated-p (frame-selected-window frame) t) | 6184 | (set-window-dedicated-p (frame-selected-window frame) t) |
| 6193 | (frame-selected-window frame)))))) | 6185 | (frame-selected-window frame)))))) |
| 6194 | ;; (make-obsolete | ||
| 6195 | ;; 'special-display-popup-frame | ||
| 6196 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6197 | 6186 | ||
| 6198 | (defcustom special-display-function 'special-display-popup-frame | 6187 | (defcustom special-display-function 'special-display-popup-frame |
| 6199 | "Function to call for displaying special buffers. | 6188 | "Function to call for displaying special buffers. |
| @@ -6210,9 +6199,6 @@ A buffer is special when its name is either listed in | |||
| 6210 | :type 'function | 6199 | :type 'function |
| 6211 | :group 'windows | 6200 | :group 'windows |
| 6212 | :group 'frames) | 6201 | :group 'frames) |
| 6213 | ;; (make-obsolete-variable | ||
| 6214 | ;; 'special-display-function | ||
| 6215 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6216 | 6202 | ||
| 6217 | (defcustom special-display-buffer-names nil | 6203 | (defcustom special-display-buffer-names nil |
| 6218 | "List of names of buffers that should be displayed specially. | 6204 | "List of names of buffers that should be displayed specially. |
| @@ -6277,9 +6263,6 @@ See also `special-display-regexps'." | |||
| 6277 | (repeat :tag "Arguments" (sexp))))) | 6263 | (repeat :tag "Arguments" (sexp))))) |
| 6278 | :group 'windows | 6264 | :group 'windows |
| 6279 | :group 'frames) | 6265 | :group 'frames) |
| 6280 | ;; (make-obsolete-variable | ||
| 6281 | ;; 'special-display-buffer-names | ||
| 6282 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6283 | 6266 | ||
| 6284 | ;;;###autoload | 6267 | ;;;###autoload |
| 6285 | (put 'special-display-buffer-names 'risky-local-variable t) | 6268 | (put 'special-display-buffer-names 'risky-local-variable t) |
| @@ -6348,9 +6331,6 @@ See also `special-display-buffer-names'." | |||
| 6348 | (repeat :tag "Arguments" (sexp))))) | 6331 | (repeat :tag "Arguments" (sexp))))) |
| 6349 | :group 'windows | 6332 | :group 'windows |
| 6350 | :group 'frames) | 6333 | :group 'frames) |
| 6351 | ;; (make-obsolete-variable | ||
| 6352 | ;; 'special-display-regexps | ||
| 6353 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6354 | 6334 | ||
| 6355 | (defun special-display-p (buffer-name) | 6335 | (defun special-display-p (buffer-name) |
| 6356 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. | 6336 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. |
| @@ -6378,9 +6358,6 @@ entry." | |||
| 6378 | ((and (consp regexp) (stringp (car regexp)) | 6358 | ((and (consp regexp) (stringp (car regexp)) |
| 6379 | (string-match-p (car regexp) buffer-name)) | 6359 | (string-match-p (car regexp) buffer-name)) |
| 6380 | (throw 'found (cdr regexp)))))))))) | 6360 | (throw 'found (cdr regexp)))))))))) |
| 6381 | ;; (make-obsolete | ||
| 6382 | ;; 'special-display-p | ||
| 6383 | ;; "pass argument to buffer display function instead." "24.1") | ||
| 6384 | 6361 | ||
| 6385 | (defcustom pop-up-frame-alist nil | 6362 | (defcustom pop-up-frame-alist nil |
| 6386 | "Alist of parameters for automatically generated new frames. | 6363 | "Alist of parameters for automatically generated new frames. |
| @@ -6400,9 +6377,6 @@ affected by this variable." | |||
| 6400 | (symbol :tag "Parameter") | 6377 | (symbol :tag "Parameter") |
| 6401 | (sexp :tag "Value"))) | 6378 | (sexp :tag "Value"))) |
| 6402 | :group 'frames) | 6379 | :group 'frames) |
| 6403 | ;; (make-obsolete-variable | ||
| 6404 | ;; 'pop-up-frame-alist | ||
| 6405 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6406 | 6380 | ||
| 6407 | (defcustom pop-up-frame-function | 6381 | (defcustom pop-up-frame-function |
| 6408 | (lambda () (make-frame pop-up-frame-alist)) | 6382 | (lambda () (make-frame pop-up-frame-alist)) |
| @@ -6412,9 +6386,6 @@ frame. The default value calls `make-frame' with the argument | |||
| 6412 | `pop-up-frame-alist'." | 6386 | `pop-up-frame-alist'." |
| 6413 | :type 'function | 6387 | :type 'function |
| 6414 | :group 'frames) | 6388 | :group 'frames) |
| 6415 | ;; (make-obsolete-variable | ||
| 6416 | ;; 'pop-up-frame-function | ||
| 6417 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6418 | 6389 | ||
| 6419 | (defcustom pop-up-frames nil | 6390 | (defcustom pop-up-frames nil |
| 6420 | "Whether `display-buffer' should make a separate frame. | 6391 | "Whether `display-buffer' should make a separate frame. |
| @@ -6428,9 +6399,6 @@ Any other non-nil value means always make a separate frame." | |||
| 6428 | (const :tag "Always" t)) | 6399 | (const :tag "Always" t)) |
| 6429 | :group 'windows | 6400 | :group 'windows |
| 6430 | :group 'frames) | 6401 | :group 'frames) |
| 6431 | ;; (make-obsolete-variable | ||
| 6432 | ;; 'pop-up-frames | ||
| 6433 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6434 | 6402 | ||
| 6435 | (defcustom display-buffer-reuse-frames nil | 6403 | (defcustom display-buffer-reuse-frames nil |
| 6436 | "Set and non-nil means `display-buffer' should reuse frames. | 6404 | "Set and non-nil means `display-buffer' should reuse frames. |
| @@ -6440,17 +6408,11 @@ that frame." | |||
| 6440 | :version "21.1" | 6408 | :version "21.1" |
| 6441 | :group 'windows | 6409 | :group 'windows |
| 6442 | :group 'frames) | 6410 | :group 'frames) |
| 6443 | ;; (make-obsolete-variable | ||
| 6444 | ;; 'display-buffer-reuse-frames | ||
| 6445 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6446 | 6411 | ||
| 6447 | (defcustom pop-up-windows t | 6412 | (defcustom pop-up-windows t |
| 6448 | "Non-nil means `display-buffer' should make a new window." | 6413 | "Non-nil means `display-buffer' should make a new window." |
| 6449 | :type 'boolean | 6414 | :type 'boolean |
| 6450 | :group 'windows) | 6415 | :group 'windows) |
| 6451 | ;; (make-obsolete-variable | ||
| 6452 | ;; 'pop-up-windows | ||
| 6453 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6454 | 6416 | ||
| 6455 | (defcustom split-window-preferred-function 'split-window-sensibly | 6417 | (defcustom split-window-preferred-function 'split-window-sensibly |
| 6456 | "Function called by `display-buffer' to split a window. | 6418 | "Function called by `display-buffer' to split a window. |
| @@ -6477,9 +6439,6 @@ not want to split the selected window." | |||
| 6477 | :type 'function | 6439 | :type 'function |
| 6478 | :version "23.1" | 6440 | :version "23.1" |
| 6479 | :group 'windows) | 6441 | :group 'windows) |
| 6480 | ;; (make-obsolete-variable | ||
| 6481 | ;; 'split-window-preferred-function | ||
| 6482 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6483 | 6442 | ||
| 6484 | (defcustom split-height-threshold 80 | 6443 | (defcustom split-height-threshold 80 |
| 6485 | "Minimum height for splitting a window to display a buffer. | 6444 | "Minimum height for splitting a window to display a buffer. |
| @@ -6491,9 +6450,6 @@ split it vertically disregarding the value of this variable." | |||
| 6491 | :type '(choice (const nil) (integer :tag "lines")) | 6450 | :type '(choice (const nil) (integer :tag "lines")) |
| 6492 | :version "23.1" | 6451 | :version "23.1" |
| 6493 | :group 'windows) | 6452 | :group 'windows) |
| 6494 | ;; (make-obsolete-variable | ||
| 6495 | ;; 'split-height-threshold | ||
| 6496 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6497 | 6453 | ||
| 6498 | (defcustom split-width-threshold 160 | 6454 | (defcustom split-width-threshold 160 |
| 6499 | "Minimum width for splitting a window to display a buffer. | 6455 | "Minimum width for splitting a window to display a buffer. |
| @@ -6503,9 +6459,6 @@ is nil, `display-buffer' cannot split windows horizontally." | |||
| 6503 | :type '(choice (const nil) (integer :tag "columns")) | 6459 | :type '(choice (const nil) (integer :tag "columns")) |
| 6504 | :version "23.1" | 6460 | :version "23.1" |
| 6505 | :group 'windows) | 6461 | :group 'windows) |
| 6506 | ;; (make-obsolete-variable | ||
| 6507 | ;; 'split-width-threshold | ||
| 6508 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6509 | 6462 | ||
| 6510 | (defcustom even-window-heights t | 6463 | (defcustom even-window-heights t |
| 6511 | "If non-nil `display-buffer' will try to even window heights. | 6464 | "If non-nil `display-buffer' will try to even window heights. |
| @@ -6514,17 +6467,11 @@ alone. Heights are evened only when `display-buffer' chooses a | |||
| 6514 | window that appears above or below the selected window." | 6467 | window that appears above or below the selected window." |
| 6515 | :type 'boolean | 6468 | :type 'boolean |
| 6516 | :group 'windows) | 6469 | :group 'windows) |
| 6517 | ;; (make-obsolete-variable | ||
| 6518 | ;; 'even-window-heights | ||
| 6519 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6520 | 6470 | ||
| 6521 | (defvar display-buffer-mark-dedicated nil | 6471 | (defvar display-buffer-mark-dedicated nil |
| 6522 | "Non-nil means `display-buffer' marks the windows it creates as dedicated. | 6472 | "Non-nil means `display-buffer' marks the windows it creates as dedicated. |
| 6523 | The actual non-nil value of this variable will be copied to the | 6473 | The actual non-nil value of this variable will be copied to the |
| 6524 | `window-dedicated-p' flag.") | 6474 | `window-dedicated-p' flag.") |
| 6525 | ;; (make-obsolete-variable | ||
| 6526 | ;; 'display-buffer-mark-dedicated | ||
| 6527 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6528 | 6475 | ||
| 6529 | (defun window-splittable-p (window &optional horizontal) | 6476 | (defun window-splittable-p (window &optional horizontal) |
| 6530 | "Return non-nil if `split-window-sensibly' may split WINDOW. | 6477 | "Return non-nil if `split-window-sensibly' may split WINDOW. |
| @@ -6575,8 +6522,6 @@ hold: | |||
| 6575 | (max split-height-threshold | 6522 | (max split-height-threshold |
| 6576 | (* 2 (max window-min-height | 6523 | (* 2 (max window-min-height |
| 6577 | (if mode-line-format 2 1)))))))))) | 6524 | (if mode-line-format 2 1)))))))))) |
| 6578 | ;; (make-obsolete | ||
| 6579 | ;; 'window-splittable-p "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6580 | 6525 | ||
| 6581 | (defun split-window-sensibly (window) | 6526 | (defun split-window-sensibly (window) |
| 6582 | "Split WINDOW in a way suitable for `display-buffer'. | 6527 | "Split WINDOW in a way suitable for `display-buffer'. |
| @@ -6626,8 +6571,6 @@ split." | |||
| 6626 | (when (with-no-warnings (window-splittable-p window)) | 6571 | (when (with-no-warnings (window-splittable-p window)) |
| 6627 | (with-selected-window window | 6572 | (with-selected-window window |
| 6628 | (split-window-vertically))))))) | 6573 | (split-window-vertically))))))) |
| 6629 | ;; (make-obsolete | ||
| 6630 | ;; 'split-window-sensibly "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6631 | 6574 | ||
| 6632 | ;; Functions for converting Emacs 23 buffer display options to buffer | 6575 | ;; Functions for converting Emacs 23 buffer display options to buffer |
| 6633 | ;; display specifiers. | 6576 | ;; display specifiers. |
| @@ -7531,6 +7474,8 @@ Otherwise, consult the value of `truncate-partial-width-windows' | |||
| 7531 | (< (window-width window) t-p-w-w) | 7474 | (< (window-width window) t-p-w-w) |
| 7532 | t-p-w-w)))) | 7475 | t-p-w-w)))) |
| 7533 | 7476 | ||
| 7477 | ;; Some of these are in tutorial--default-keys, so update that if you | ||
| 7478 | ;; change these. | ||
| 7534 | (define-key ctl-x-map "0" 'delete-window) | 7479 | (define-key ctl-x-map "0" 'delete-window) |
| 7535 | (define-key ctl-x-map "1" 'delete-other-windows) | 7480 | (define-key ctl-x-map "1" 'delete-other-windows) |
| 7536 | (define-key ctl-x-map "2" 'split-window-above-each-other) | 7481 | (define-key ctl-x-map "2" 'split-window-above-each-other) |
diff --git a/src/ChangeLog b/src/ChangeLog index 5b4e0023ac6..a3c7c2f09d2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,41 @@ | |||
| 3 | * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a | 3 | * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a |
| 4 | extra slot even if the purpose is char-code-property-table. | 4 | extra slot even if the purpose is char-code-property-table. |
| 5 | 5 | ||
| 6 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * xdisp.c (redisplay_window): When computing centering_position, | ||
| 9 | account for the height of the header line. (Bug#8874) | ||
| 10 | |||
| 11 | * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos | ||
| 12 | instead of CHAR_TO_BYTE. Fixes a crash when a completion | ||
| 13 | candidate is selected by the mouse, and that candidate has a | ||
| 14 | composed character under the mouse. | ||
| 15 | |||
| 16 | * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel | ||
| 17 | coordinates reported by pos-visible-in-window-p for a composed | ||
| 18 | character in column zero. | ||
| 19 | |||
| 20 | 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 21 | |||
| 22 | * cmds.c (Fself_insert_command): Mention post-self-insert-hook. | ||
| 23 | |||
| 24 | 2011-08-22 Eli Zaretskii <eliz@gnu.org> | ||
| 25 | |||
| 26 | * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, | ||
| 27 | consider it a hit if to_charpos is anywhere in the range of the | ||
| 28 | composed buffer positions. | ||
| 29 | |||
| 30 | 2011-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 31 | |||
| 32 | * image.c (gif_load): Don't assume that each subimage has the same | ||
| 33 | dimensions as the base image. Handle disposal method that is | ||
| 34 | "undefined" by the gif spec (Bug#9335). | ||
| 35 | |||
| 36 | 2011-08-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 37 | |||
| 38 | * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). | ||
| 39 | (Fcondition_case): Document `debug' symbol in error handler. | ||
| 40 | |||
| 6 | 2011-08-19 Eli Zaretskii <eliz@gnu.org> | 41 | 2011-08-19 Eli Zaretskii <eliz@gnu.org> |
| 7 | 42 | ||
| 8 | * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of | 43 | * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of |
| @@ -33,8 +68,8 @@ | |||
| 33 | 2011-08-17 Chong Yidong <cyd@stupidchicken.com> | 68 | 2011-08-17 Chong Yidong <cyd@stupidchicken.com> |
| 34 | 69 | ||
| 35 | * eval.c (internal_condition_case, internal_condition_case_1) | 70 | * eval.c (internal_condition_case, internal_condition_case_1) |
| 36 | (internal_condition_case_2, internal_condition_case_n): Remove | 71 | (internal_condition_case_2, internal_condition_case_n): |
| 37 | unnecessary aborts (Bug#9081). | 72 | Remove unnecessary aborts (Bug#9081). |
| 38 | 73 | ||
| 39 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> | 74 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> |
| 40 | 75 | ||
| @@ -57,8 +92,8 @@ | |||
| 57 | * unexcw.c ( __malloc_initialized): Declare external variable. | 92 | * unexcw.c ( __malloc_initialized): Declare external variable. |
| 58 | (fixup_executable): Force the dumped emacs to reinitialize malloc. | 93 | (fixup_executable): Force the dumped emacs to reinitialize malloc. |
| 59 | 94 | ||
| 60 | * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New | 95 | * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): |
| 61 | variables. | 96 | New variables. |
| 62 | (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the | 97 | (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the |
| 63 | dumped emacs. | 98 | dumped emacs. |
| 64 | (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage | 99 | (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage |
| @@ -160,8 +195,8 @@ | |||
| 160 | * xdisp.c (iterate_out_of_display_property): xassert that | 195 | * xdisp.c (iterate_out_of_display_property): xassert that |
| 161 | IT->position is set to within IT->object's boundaries. Break from | 196 | IT->position is set to within IT->object's boundaries. Break from |
| 162 | the loop as soon as EOB is reached; avoids infloops in redisplay | 197 | the loop as soon as EOB is reached; avoids infloops in redisplay |
| 163 | when IT->position is set up wrongly due to some bug. Set | 198 | when IT->position is set up wrongly due to some bug. |
| 164 | IT->current to match the bidi iterator unconditionally. | 199 | Set IT->current to match the bidi iterator unconditionally. |
| 165 | (push_display_prop): Allow GET_FROM_STRING as IT->method on | 200 | (push_display_prop): Allow GET_FROM_STRING as IT->method on |
| 166 | entry. Force push_it to save on the stack the current | 201 | entry. Force push_it to save on the stack the current |
| 167 | buffer/string position, to be restored by pop_it. Fix flags in | 202 | buffer/string position, to be restored by pop_it. Fix flags in |
| @@ -184,8 +219,8 @@ | |||
| 184 | 2011-08-08 Eli Zaretskii <eliz@gnu.org> | 219 | 2011-08-08 Eli Zaretskii <eliz@gnu.org> |
| 185 | 220 | ||
| 186 | * xdisp.c (forward_to_next_line_start): Allow to use the | 221 | * xdisp.c (forward_to_next_line_start): Allow to use the |
| 187 | no-display-properties-and-no-overlays under bidi display. Set | 222 | no-display-properties-and-no-overlays under bidi display. |
| 188 | disp_pos in the bidi iterator to avoid searches for display | 223 | Set disp_pos in the bidi iterator to avoid searches for display |
| 189 | properties and overlays. | 224 | properties and overlays. |
| 190 | 225 | ||
| 191 | 2011-08-08 Chong Yidong <cyd@stupidchicken.com> | 226 | 2011-08-08 Chong Yidong <cyd@stupidchicken.com> |
| @@ -223,7 +258,7 @@ | |||
| 223 | * bidi.c <bidi_cache_total_alloc>: Now static. | 258 | * bidi.c <bidi_cache_total_alloc>: Now static. |
| 224 | (bidi_initialize): Initialize bidi_cache_total_alloc. | 259 | (bidi_initialize): Initialize bidi_cache_total_alloc. |
| 225 | 260 | ||
| 226 | *xdisp.c (display_line): Release buffer allocated for shelved bidi | 261 | * xdisp.c (display_line): Release buffer allocated for shelved bidi |
| 227 | cache. (Bug#9221) | 262 | cache. (Bug#9221) |
| 228 | 263 | ||
| 229 | * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total | 264 | * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total |
diff --git a/src/cmds.c b/src/cmds.c index f49cfc221be..c079ad7168f 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -271,7 +271,8 @@ Whichever character you type to run this command is inserted. | |||
| 271 | Before insertion, `expand-abbrev' is executed if the inserted character does | 271 | Before insertion, `expand-abbrev' is executed if the inserted character does |
| 272 | not have word syntax and the previous character in the buffer does. | 272 | not have word syntax and the previous character in the buffer does. |
| 273 | After insertion, the value of `auto-fill-function' is called if the | 273 | After insertion, the value of `auto-fill-function' is called if the |
| 274 | `auto-fill-chars' table has a non-nil value for the inserted character. */) | 274 | `auto-fill-chars' table has a non-nil value for the inserted character. |
| 275 | At the end, it runs `post-self-insert-hook'. */) | ||
| 275 | (Lisp_Object n) | 276 | (Lisp_Object n) |
| 276 | { | 277 | { |
| 277 | int remove_boundary = 1; | 278 | int remove_boundary = 1; |
diff --git a/src/dispnew.c b/src/dispnew.c index fadfbb26603..e2bcf5d7090 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5307,7 +5307,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5307 | if (STRINGP (it.string)) | 5307 | if (STRINGP (it.string)) |
| 5308 | BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); | 5308 | BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); |
| 5309 | else | 5309 | else |
| 5310 | BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos)); | 5310 | BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer), |
| 5311 | CHARPOS (pos->pos)); | ||
| 5311 | } | 5312 | } |
| 5312 | 5313 | ||
| 5313 | #ifdef HAVE_WINDOW_SYSTEM | 5314 | #ifdef HAVE_WINDOW_SYSTEM |
diff --git a/src/eval.c b/src/eval.c index e37425020c9..372e9954620 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1357,8 +1357,12 @@ A handler is applicable to an error | |||
| 1357 | if CONDITION-NAME is one of the error's condition names. | 1357 | if CONDITION-NAME is one of the error's condition names. |
| 1358 | If an error happens, the first applicable handler is run. | 1358 | If an error happens, the first applicable handler is run. |
| 1359 | 1359 | ||
| 1360 | The car of a handler may be a list of condition names | 1360 | The car of a handler may be a list of condition names instead of a |
| 1361 | instead of a single condition name. Then it handles all of them. | 1361 | single condition name; then it handles all of them. If the special |
| 1362 | condition name `debug' is present in this list, it allows another | ||
| 1363 | condition in the list to run the debugger if `debug-on-error' and the | ||
| 1364 | other usual mechanisms says it should (otherwise, `condition-case' | ||
| 1365 | suppresses the debugger). | ||
| 1362 | 1366 | ||
| 1363 | When a handler handles an error, control returns to the `condition-case' | 1367 | When a handler handles an error, control returns to the `condition-case' |
| 1364 | and it executes the handler's BODY... | 1368 | and it executes the handler's BODY... |
| @@ -1699,6 +1703,10 @@ See also the function `condition-case'. */) | |||
| 1699 | && (!NILP (Vdebug_on_signal) | 1703 | && (!NILP (Vdebug_on_signal) |
| 1700 | /* If no handler is present now, try to run the debugger. */ | 1704 | /* If no handler is present now, try to run the debugger. */ |
| 1701 | || NILP (clause) | 1705 | || NILP (clause) |
| 1706 | /* A `debug' symbol in the handler list disables the normal | ||
| 1707 | suppression of the debugger. */ | ||
| 1708 | || (CONSP (clause) && CONSP (XCAR (clause)) | ||
| 1709 | && !NILP (Fmemq (Qdebug, XCAR (clause)))) | ||
| 1702 | /* Special handler that means "print a message and run debugger | 1710 | /* Special handler that means "print a message and run debugger |
| 1703 | if requested". */ | 1711 | if requested". */ |
| 1704 | || EQ (h->handler, Qerror))) | 1712 | || EQ (h->handler, Qerror))) |
diff --git a/src/image.c b/src/image.c index d1091aec6f3..65be22b087a 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7139,7 +7139,6 @@ gif_load (struct frame *f, struct image *img) | |||
| 7139 | ColorMapObject *gif_color_map; | 7139 | ColorMapObject *gif_color_map; |
| 7140 | unsigned long pixel_colors[256]; | 7140 | unsigned long pixel_colors[256]; |
| 7141 | GifFileType *gif; | 7141 | GifFileType *gif; |
| 7142 | int image_height, image_width; | ||
| 7143 | gif_memory_source memsrc; | 7142 | gif_memory_source memsrc; |
| 7144 | Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); | 7143 | Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); |
| 7145 | Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL); | 7144 | Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL); |
| @@ -7216,19 +7215,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 7216 | } | 7215 | } |
| 7217 | } | 7216 | } |
| 7218 | 7217 | ||
| 7219 | img->corners[TOP_CORNER] = gif->SavedImages[idx].ImageDesc.Top; | 7218 | width = img->width = gif->SWidth; |
| 7220 | img->corners[LEFT_CORNER] = gif->SavedImages[idx].ImageDesc.Left; | 7219 | height = img->height = gif->SHeight; |
| 7221 | image_height = gif->SavedImages[idx].ImageDesc.Height; | ||
| 7222 | img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + image_height; | ||
| 7223 | image_width = gif->SavedImages[idx].ImageDesc.Width; | ||
| 7224 | img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + image_width; | ||
| 7225 | 7220 | ||
| 7226 | width = img->width = max (gif->SWidth, | 7221 | img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; |
| 7227 | max (gif->Image.Left + gif->Image.Width, | 7222 | img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; |
| 7228 | img->corners[RIGHT_CORNER])); | 7223 | img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; |
| 7229 | height = img->height = max (gif->SHeight, | 7224 | img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; |
| 7230 | max (gif->Image.Top + gif->Image.Height, | ||
| 7231 | img->corners[BOT_CORNER])); | ||
| 7232 | 7225 | ||
| 7233 | if (!check_image_size (f, width, height)) | 7226 | if (!check_image_size (f, width, height)) |
| 7234 | { | 7227 | { |
| @@ -7283,6 +7276,10 @@ gif_load (struct frame *f, struct image *img) | |||
| 7283 | unsigned char *raster = (unsigned char *) subimage->RasterBits; | 7276 | unsigned char *raster = (unsigned char *) subimage->RasterBits; |
| 7284 | int transparency_color_index = -1; | 7277 | int transparency_color_index = -1; |
| 7285 | int disposal = 0; | 7278 | int disposal = 0; |
| 7279 | int subimg_width = subimage->ImageDesc.Width; | ||
| 7280 | int subimg_height = subimage->ImageDesc.Height; | ||
| 7281 | int subimg_top = subimage->ImageDesc.Top; | ||
| 7282 | int subimg_left = subimage->ImageDesc.Left; | ||
| 7286 | 7283 | ||
| 7287 | /* Find the Graphic Control Extension block for this sub-image. | 7284 | /* Find the Graphic Control Extension block for this sub-image. |
| 7288 | Extract the disposal method and transparency color. */ | 7285 | Extract the disposal method and transparency color. */ |
| @@ -7306,6 +7303,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 7306 | if (j == 0) | 7303 | if (j == 0) |
| 7307 | disposal = 2; | 7304 | disposal = 2; |
| 7308 | 7305 | ||
| 7306 | /* For disposal == 0, the spec says "No disposal specified. The | ||
| 7307 | decoder is not required to take any action." In practice, it | ||
| 7308 | seems we need to treat this like "keep in place", see e.g. | ||
| 7309 | http://upload.wikimedia.org/wikipedia/commons/3/37/Clock.gif */ | ||
| 7310 | if (disposal == 0) | ||
| 7311 | disposal = 1; | ||
| 7312 | |||
| 7309 | /* Allocate subimage colors. */ | 7313 | /* Allocate subimage colors. */ |
| 7310 | memset (pixel_colors, 0, sizeof pixel_colors); | 7314 | memset (pixel_colors, 0, sizeof pixel_colors); |
| 7311 | gif_color_map = subimage->ImageDesc.ColorMap; | 7315 | gif_color_map = subimage->ImageDesc.ColorMap; |
| @@ -7333,34 +7337,34 @@ gif_load (struct frame *f, struct image *img) | |||
| 7333 | int row, pass; | 7337 | int row, pass; |
| 7334 | 7338 | ||
| 7335 | for (y = 0, row = interlace_start[0], pass = 0; | 7339 | for (y = 0, row = interlace_start[0], pass = 0; |
| 7336 | y < image_height; | 7340 | y < subimg_height; |
| 7337 | y++, row += interlace_increment[pass]) | 7341 | y++, row += interlace_increment[pass]) |
| 7338 | { | 7342 | { |
| 7339 | if (row >= image_height) | 7343 | if (row >= subimg_height) |
| 7340 | { | 7344 | { |
| 7341 | row = interlace_start[++pass]; | 7345 | row = interlace_start[++pass]; |
| 7342 | while (row >= image_height) | 7346 | while (row >= subimg_height) |
| 7343 | row = interlace_start[++pass]; | 7347 | row = interlace_start[++pass]; |
| 7344 | } | 7348 | } |
| 7345 | 7349 | ||
| 7346 | for (x = 0; x < image_width; x++) | 7350 | for (x = 0; x < subimg_width; x++) |
| 7347 | { | 7351 | { |
| 7348 | int c = raster[y * image_width + x]; | 7352 | int c = raster[y * subimg_width + x]; |
| 7349 | if (transparency_color_index != c || disposal != 1) | 7353 | if (transparency_color_index != c || disposal != 1) |
| 7350 | XPutPixel (ximg, x + img->corners[LEFT_CORNER], | 7354 | XPutPixel (ximg, x + subimg_left, row + subimg_top, |
| 7351 | row + img->corners[TOP_CORNER], pixel_colors[c]); | 7355 | pixel_colors[c]); |
| 7352 | } | 7356 | } |
| 7353 | } | 7357 | } |
| 7354 | } | 7358 | } |
| 7355 | else | 7359 | else |
| 7356 | { | 7360 | { |
| 7357 | for (y = 0; y < image_height; ++y) | 7361 | for (y = 0; y < subimg_height; ++y) |
| 7358 | for (x = 0; x < image_width; ++x) | 7362 | for (x = 0; x < subimg_width; ++x) |
| 7359 | { | 7363 | { |
| 7360 | int c = raster[y * image_width + x]; | 7364 | int c = raster[y * subimg_width + x]; |
| 7361 | if (transparency_color_index != c || disposal != 1) | 7365 | if (transparency_color_index != c || disposal != 1) |
| 7362 | XPutPixel (ximg, x + img->corners[LEFT_CORNER], | 7366 | XPutPixel (ximg, x + subimg_left, y + subimg_top, |
| 7363 | y + img->corners[TOP_CORNER], pixel_colors[c]); | 7367 | pixel_colors[c]); |
| 7364 | } | 7368 | } |
| 7365 | } | 7369 | } |
| 7366 | } | 7370 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index e773830800e..6a11628f858 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7699,7 +7699,12 @@ move_it_in_display_line_to (struct it *it, | |||
| 7699 | ((op & MOVE_TO_POS) != 0 \ | 7699 | ((op & MOVE_TO_POS) != 0 \ |
| 7700 | && BUFFERP (it->object) \ | 7700 | && BUFFERP (it->object) \ |
| 7701 | && (IT_CHARPOS (*it) == to_charpos \ | 7701 | && (IT_CHARPOS (*it) == to_charpos \ |
| 7702 | || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos)) \ | 7702 | || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ |
| 7703 | || (it->what == IT_COMPOSITION \ | ||
| 7704 | && ((IT_CHARPOS (*it) > to_charpos \ | ||
| 7705 | && to_charpos >= it->cmp_it.charpos) \ | ||
| 7706 | || (IT_CHARPOS (*it) < to_charpos \ | ||
| 7707 | && to_charpos <= it->cmp_it.charpos)))) \ | ||
| 7703 | && (it->method == GET_FROM_BUFFER \ | 7708 | && (it->method == GET_FROM_BUFFER \ |
| 7704 | || (it->method == GET_FROM_DISPLAY_VECTOR \ | 7709 | || (it->method == GET_FROM_DISPLAY_VECTOR \ |
| 7705 | && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) | 7710 | && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) |
| @@ -15239,7 +15244,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15239 | if (pt_offset) | 15244 | if (pt_offset) |
| 15240 | centering_position -= pt_offset; | 15245 | centering_position -= pt_offset; |
| 15241 | centering_position -= | 15246 | centering_position -= |
| 15242 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)); | 15247 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)) |
| 15248 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 15243 | /* Don't let point enter the scroll margin near top of | 15249 | /* Don't let point enter the scroll margin near top of |
| 15244 | the window. */ | 15250 | the window. */ |
| 15245 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) | 15251 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) |
| @@ -24059,6 +24065,8 @@ x_produce_glyphs (struct it *it) | |||
| 24059 | Lisp_Object gstring; | 24065 | Lisp_Object gstring; |
| 24060 | struct font_metrics metrics; | 24066 | struct font_metrics metrics; |
| 24061 | 24067 | ||
| 24068 | it->nglyphs = 1; | ||
| 24069 | |||
| 24062 | gstring = composition_gstring_from_id (it->cmp_it.id); | 24070 | gstring = composition_gstring_from_id (it->cmp_it.id); |
| 24063 | it->pixel_width | 24071 | it->pixel_width |
| 24064 | = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, | 24072 | = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, |