diff options
| author | Stefan Monnier | 2011-01-20 17:36:12 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-01-20 17:36:12 -0500 |
| commit | 8dabbfd6325ea5b11e67fa8358625669808312dd (patch) | |
| tree | 079663dec17eea59c35ba92edaed0bbdb64f7751 | |
| parent | 642f3c5c603d61aa0b47a614981f462669eec086 (diff) | |
| download | emacs-8dabbfd6325ea5b11e67fa8358625669808312dd.tar.gz emacs-8dabbfd6325ea5b11e67fa8358625669808312dd.zip | |
Don't mess with *temp*.
* lisp/obsolete/spell.el: Move from textmodes/spell.el.
(spell-string):
* lisp/term.el (term-read-input-ring):
* lisp/startup.el (display-startup-echo-area-message):
* lisp/progmodes/antlr-mode.el (antlr-directory-dependencies):
* lisp/gnus/message.el (message-mailer-swallows-blank-line):
* lisp/comint.el (comint-read-input-ring): Use with-temp-buffer.
* lisp/international/mule.el (ctext-pre-write-conversion):
Don't hardcode point-min==1.
* lisp/gnus/mm-util.el (mm-find-buffer-file-coding-system): Don't forget to
kill the temp buffer.
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/comint.el | 59 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 28 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 13 | ||||
| -rw-r--r-- | lisp/gnus/mm-util.el | 2 | ||||
| -rw-r--r-- | lisp/international/mule.el | 2 | ||||
| -rw-r--r-- | lisp/obsolete/spell.el (renamed from lisp/textmodes/spell.el) | 32 | ||||
| -rw-r--r-- | lisp/progmodes/antlr-mode.el | 52 | ||||
| -rw-r--r-- | lisp/startup.el | 35 | ||||
| -rw-r--r-- | lisp/term.el | 37 | ||||
| -rw-r--r-- | src/ChangeLog | 8 |
11 files changed, 148 insertions, 149 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e928e5f3f26..f2559c7c5ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2011-01-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | Don't mess with *temp*. | ||
| 4 | * obsolete/spell.el: Move from textmodes/spell.el. | ||
| 5 | (spell-string): | ||
| 6 | * term.el (term-read-input-ring): | ||
| 7 | * startup.el (display-startup-echo-area-message): | ||
| 8 | * progmodes/antlr-mode.el (antlr-directory-dependencies): | ||
| 9 | * comint.el (comint-read-input-ring): Use with-temp-buffer. | ||
| 10 | * international/mule.el (ctext-pre-write-conversion): Don't hardcode | ||
| 11 | point-min==1. | ||
| 12 | |||
| 13 | |||
| 1 | 2011-01-20 Ken Manheimer <ken.manheimer@gmail.com> | 14 | 2011-01-20 Ken Manheimer <ken.manheimer@gmail.com> |
| 2 | 15 | ||
| 3 | * allout.el: Summary - migrate to defining allout mode using | 16 | * allout.el: Summary - migrate to defining allout mode using |
| @@ -8,8 +21,8 @@ | |||
| 8 | allout-mode-map is now a keymap by virtue of being a defalias to | 21 | allout-mode-map is now a keymap by virtue of being a defalias to |
| 9 | allout-mode-map-value, which contains the actual keymap structure. | 22 | allout-mode-map-value, which contains the actual keymap structure. |
| 10 | 23 | ||
| 11 | (allout-mode): Use define-minor-mode rather than defun. Remove | 24 | (allout-mode): Use define-minor-mode rather than defun. |
| 12 | now-unnecessary minor-mode setup activities from the body. | 25 | Remove now-unnecessary minor-mode setup activities from the body. |
| 13 | Specify :keymap as allout-mode-map so the minor-mode-map-alist | 26 | Specify :keymap as allout-mode-map so the minor-mode-map-alist |
| 14 | entry will be '(allout-mode . allout-mode-map) - see | 27 | entry will be '(allout-mode . allout-mode-map) - see |
| 15 | allout-mode-map-value, below. Adjust docstring to track changes. | 28 | allout-mode-map-value, below. Adjust docstring to track changes. |
| @@ -19,7 +32,7 @@ | |||
| 19 | keymap is allout-mode-map-value, via defalias. | 32 | keymap is allout-mode-map-value, via defalias. |
| 20 | (allout-mode-map-value): The variable holding the actual mode | 33 | (allout-mode-map-value): The variable holding the actual mode |
| 21 | keymap structure, by virtue of defalias from allout-mode-map. | 34 | keymap structure, by virtue of defalias from allout-mode-map. |
| 22 | (allout-compose-and-institute-keymap): Renamed from | 35 | (allout-compose-and-institute-keymap): Rename from |
| 23 | allout-bind-keys, and including the binding-composition | 36 | allout-bind-keys, and including the binding-composition |
| 24 | functionality of the former produce-allout-mode-map and | 37 | functionality of the former produce-allout-mode-map and |
| 25 | allout-setup-mode-map. | 38 | allout-setup-mode-map. |
| @@ -27,14 +40,14 @@ | |||
| 27 | allout-setup-mode-map. Reassign allout-mode-map-value value and | 40 | allout-setup-mode-map. Reassign allout-mode-map-value value and |
| 28 | update the defalias. | 41 | update the defalias. |
| 29 | (allout-command-prefix) (allout-prefixed-keybindings) | 42 | (allout-command-prefix) (allout-prefixed-keybindings) |
| 30 | (allout-unprefixed-keybindings): Use | 43 | (allout-unprefixed-keybindings): |
| 31 | allout-compose-and-institute-keymap to process the bindings. | 44 | Use allout-compose-and-institute-keymap to process the bindings. |
| 32 | (allout-unprefixed-keybindings): Remove extraneous '?' question | 45 | (allout-unprefixed-keybindings): Remove extraneous '?' question |
| 33 | marks. | 46 | marks. |
| 34 | (allout-prefixed-keybindings): Elide binding to (prefixed) \C-h - | 47 | (allout-prefixed-keybindings): Elide binding to (prefixed) \C-h - |
| 35 | user can customize if they want to use that binding. Bind | 48 | user can customize if they want to use that binding. |
| 36 | allout-copy-topic-as-kill to (prefixed) \M-k. Bind | 49 | Bind allout-copy-topic-as-kill to (prefixed) \M-k. |
| 37 | allout-up-current-level to (prefixed) \C-u. (I think i mistakenly | 50 | Bind allout-up-current-level to (prefixed) \C-u. (I think i mistakenly |
| 38 | elided that, previously, instead of the one for \C-h.) | 51 | elided that, previously, instead of the one for \C-h.) |
| 39 | (allout-hotspot-key-handler): Remove attempt to resolve the key | 52 | (allout-hotspot-key-handler): Remove attempt to resolve the key |
| 40 | through the literal key-string lookup on allout-keybindings-list. | 53 | through the literal key-string lookup on allout-keybindings-list. |
diff --git a/lisp/comint.el b/lisp/comint.el index e45c8021273..da722002c20 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -918,41 +918,36 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'." | |||
| 918 | (message "Cannot read history file %s" | 918 | (message "Cannot read history file %s" |
| 919 | comint-input-ring-file-name))) | 919 | comint-input-ring-file-name))) |
| 920 | (t | 920 | (t |
| 921 | (let* ((history-buf (get-buffer-create " *temp*")) | 921 | (let* ((file comint-input-ring-file-name) |
| 922 | (file comint-input-ring-file-name) | ||
| 923 | (count 0) | 922 | (count 0) |
| 924 | (size comint-input-ring-size) | 923 | (size comint-input-ring-size) |
| 925 | (ring (make-ring size))) | 924 | (ring (make-ring size))) |
| 926 | (unwind-protect | 925 | (with-temp-buffer |
| 927 | (with-current-buffer history-buf | 926 | (insert-file-contents file) |
| 928 | (widen) | 927 | ;; Save restriction in case file is already visited... |
| 929 | (erase-buffer) | 928 | ;; Watch for those date stamps in history files! |
| 930 | (insert-file-contents file) | 929 | (goto-char (point-max)) |
| 931 | ;; Save restriction in case file is already visited... | 930 | (let (start end history) |
| 932 | ;; Watch for those date stamps in history files! | 931 | (while (and (< count size) |
| 933 | (goto-char (point-max)) | 932 | (re-search-backward comint-input-ring-separator |
| 934 | (let (start end history) | 933 | nil t) |
| 935 | (while (and (< count size) | 934 | (setq end (match-beginning 0))) |
| 936 | (re-search-backward comint-input-ring-separator | 935 | (setq start |
| 937 | nil t) | 936 | (if (re-search-backward comint-input-ring-separator |
| 938 | (setq end (match-beginning 0))) | 937 | nil t) |
| 939 | (setq start | 938 | (match-end 0) |
| 940 | (if (re-search-backward comint-input-ring-separator | 939 | (point-min))) |
| 941 | nil t) | 940 | (setq history (buffer-substring start end)) |
| 942 | (match-end 0) | 941 | (goto-char start) |
| 943 | (point-min))) | 942 | (if (and (not (string-match comint-input-history-ignore |
| 944 | (setq history (buffer-substring start end)) | 943 | history)) |
| 945 | (goto-char start) | 944 | (or (null comint-input-ignoredups) |
| 946 | (if (and (not (string-match comint-input-history-ignore | 945 | (ring-empty-p ring) |
| 947 | history)) | 946 | (not (string-equal (ring-ref ring 0) |
| 948 | (or (null comint-input-ignoredups) | 947 | history)))) |
| 949 | (ring-empty-p ring) | 948 | (progn |
| 950 | (not (string-equal (ring-ref ring 0) | 949 | (ring-insert-at-beginning ring history) |
| 951 | history)))) | 950 | (setq count (1+ count))))))) |
| 952 | (progn | ||
| 953 | (ring-insert-at-beginning ring history) | ||
| 954 | (setq count (1+ count))))))) | ||
| 955 | (kill-buffer history-buf)) | ||
| 956 | (setq comint-input-ring ring | 951 | (setq comint-input-ring ring |
| 957 | comint-input-ring-index nil))))) | 952 | comint-input-ring-index nil))))) |
| 958 | 953 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cb6d5563e40..e2306c3ac47 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-01-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill | ||
| 4 | the temp buffer. | ||
| 5 | * message.el (message-mailer-swallows-blank-line): Use with-temp-buffer. | ||
| 6 | |||
| 1 | 2011-01-19 Katsumi Yamaoka <yamaoka@jpl.org> | 7 | 2011-01-19 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 8 | ||
| 3 | * gnus-art.el (gnus-article-highlight): Remove argument passed to | 9 | * gnus-art.el (gnus-article-highlight): Remove argument passed to |
| @@ -22,8 +28,8 @@ | |||
| 22 | 28 | ||
| 23 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | 29 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> |
| 24 | 30 | ||
| 25 | * message.el (message-tool-bar-gnome): Tweak tool-bar items. Add | 31 | * message.el (message-tool-bar-gnome): Tweak tool-bar items. |
| 26 | :vert-only tags. | 32 | Add :vert-only tags. |
| 27 | (message-mail): New arg RETURN-ACTION. | 33 | (message-mail): New arg RETURN-ACTION. |
| 28 | (message-return-action): New var. | 34 | (message-return-action): New var. |
| 29 | (message-bury): Use it. | 35 | (message-bury): Use it. |
| @@ -38,8 +44,8 @@ | |||
| 38 | * nnimap.el (nnimap-convert-partial-article): Protect against | 44 | * nnimap.el (nnimap-convert-partial-article): Protect against |
| 39 | zero-length body parts. | 45 | zero-length body parts. |
| 40 | 46 | ||
| 41 | * mm-decode.el (mm-preferred-alternative-precedence): Discourage | 47 | * mm-decode.el (mm-preferred-alternative-precedence): |
| 42 | showing empty parts. | 48 | Discourage showing empty parts. |
| 43 | 49 | ||
| 44 | * gnus-int.el (gnus-request-accept-article): Don't try to update marks | 50 | * gnus-int.el (gnus-request-accept-article): Don't try to update marks |
| 45 | and stuff if the backend didn't return the article number. This fixes | 51 | and stuff if the backend didn't return the article number. This fixes |
| @@ -295,8 +301,8 @@ | |||
| 295 | 301 | ||
| 296 | 2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | 302 | 2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 297 | 303 | ||
| 298 | * gnus-sum.el (gnus-summary-enter-digest-group): Mention | 304 | * gnus-sum.el (gnus-summary-enter-digest-group): |
| 299 | gnus-auto-select-on-ephemeral-exit. | 305 | Mention gnus-auto-select-on-ephemeral-exit. |
| 300 | 306 | ||
| 301 | * proto-stream.el (proto-stream-open-network-only): Fix the calling | 307 | * proto-stream.el (proto-stream-open-network-only): Fix the calling |
| 302 | convention of the network-only option. | 308 | convention of the network-only option. |
| @@ -535,8 +541,8 @@ | |||
| 535 | (nnir-mode): Install nnir-specific hooks for updating the registry. | 541 | (nnir-mode): Install nnir-specific hooks for updating the registry. |
| 536 | 542 | ||
| 537 | * gnus-sum.el | 543 | * gnus-sum.el |
| 538 | (gnus-article-original-subject,gnus-newsgroup-original-name): Remove | 544 | (gnus-article-original-subject,gnus-newsgroup-original-name): |
| 539 | obsolete variables. | 545 | Remove obsolete variables. |
| 540 | (gnus-summary-move-article): Remove use of obsolete variables. | 546 | (gnus-summary-move-article): Remove use of obsolete variables. |
| 541 | (gnus-summary-local-variables): Make move and delete hooks local to | 547 | (gnus-summary-local-variables): Make move and delete hooks local to |
| 542 | summary buffers. | 548 | summary buffers. |
| @@ -652,7 +658,7 @@ | |||
| 652 | 658 | ||
| 653 | * nntp.el (nntp-open-connection): Report what the connection error is. | 659 | * nntp.el (nntp-open-connection): Report what the connection error is. |
| 654 | 660 | ||
| 655 | * proto-stream.el (open-protocol-stream): Renamed from | 661 | * proto-stream.el (open-protocol-stream): Rename from |
| 656 | open-proto-stream. | 662 | open-proto-stream. |
| 657 | 663 | ||
| 658 | 2010-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org> | 664 | 2010-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| @@ -933,8 +939,8 @@ | |||
| 933 | 939 | ||
| 934 | * shr.el (shr-parse-style): Replace \n with space in style parsing. | 940 | * shr.el (shr-parse-style): Replace \n with space in style parsing. |
| 935 | 941 | ||
| 936 | * shr-color.el (shr-color-hsl-to-rgb-fractions): Use | 942 | * shr-color.el (shr-color-hsl-to-rgb-fractions): |
| 937 | shr-color-hue-to-rgb. | 943 | Use shr-color-hue-to-rgb. |
| 938 | (shr-color->hexadecimal): Call shr-color-hsl-to-rgb-fractions. | 944 | (shr-color->hexadecimal): Call shr-color-hsl-to-rgb-fractions. |
| 939 | 945 | ||
| 940 | 2010-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | 946 | 2010-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org> |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 64569cfb994..81093136d5a 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1184,14 +1184,11 @@ called and its result is inserted." | |||
| 1184 | (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" | 1184 | (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" |
| 1185 | system-configuration) | 1185 | system-configuration) |
| 1186 | (file-readable-p "/etc/sendmail.cf") | 1186 | (file-readable-p "/etc/sendmail.cf") |
| 1187 | (let ((buffer (get-buffer-create " *temp*"))) | 1187 | (with-temp-buffer |
| 1188 | (unwind-protect | 1188 | (insert-file-contents "/etc/sendmail.cf") |
| 1189 | (with-current-buffer buffer | 1189 | (goto-char (point-min)) |
| 1190 | (insert-file-contents "/etc/sendmail.cf") | 1190 | (let ((case-fold-search nil)) |
| 1191 | (goto-char (point-min)) | 1191 | (re-search-forward "^OR\\>" nil t)))) |
| 1192 | (let ((case-fold-search nil)) | ||
| 1193 | (re-search-forward "^OR\\>" nil t))) | ||
| 1194 | (kill-buffer buffer)))) | ||
| 1195 | ;; According to RFC822, "The field-name must be composed of printable | 1192 | ;; According to RFC822, "The field-name must be composed of printable |
| 1196 | ;; ASCII characters (i. e., characters that have decimal values between | 1193 | ;; ASCII characters (i. e., characters that have decimal values between |
| 1197 | ;; 33 and 126, except colon)", i. e., any chars except ctl chars, | 1194 | ;; 33 and 126, except colon)", i. e., any chars except ctl chars, |
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 99766e6446f..4012a7f5cdd 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -1604,7 +1604,7 @@ gzip, bzip2, etc. are allowed." | |||
| 1604 | (insert decomp) | 1604 | (insert decomp) |
| 1605 | (setq filename (file-name-sans-extension filename))) | 1605 | (setq filename (file-name-sans-extension filename))) |
| 1606 | (goto-char (point-min)) | 1606 | (goto-char (point-min)) |
| 1607 | (prog1 | 1607 | (unwind-protect |
| 1608 | (cond | 1608 | (cond |
| 1609 | ((boundp 'set-auto-coding-function) ;; Emacs | 1609 | ((boundp 'set-auto-coding-function) ;; Emacs |
| 1610 | (if filename | 1610 | (if filename |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 2f0063540de..086693dc662 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1611,7 +1611,7 @@ in-place." | |||
| 1611 | (set-buffer (generate-new-buffer " *temp")) | 1611 | (set-buffer (generate-new-buffer " *temp")) |
| 1612 | (set-buffer-multibyte (multibyte-string-p from)) | 1612 | (set-buffer-multibyte (multibyte-string-p from)) |
| 1613 | (insert from) | 1613 | (insert from) |
| 1614 | (setq from 1 to (point-max))) | 1614 | (setq from (point-min) to (point-max))) |
| 1615 | (save-restriction | 1615 | (save-restriction |
| 1616 | (narrow-to-region from to) | 1616 | (narrow-to-region from to) |
| 1617 | (goto-char from) | 1617 | (goto-char from) |
diff --git a/lisp/textmodes/spell.el b/lisp/obsolete/spell.el index 253ebab07fb..6ccfe5732bb 100644 --- a/lisp/textmodes/spell.el +++ b/lisp/obsolete/spell.el | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | ;; Keywords: wp, unix | 7 | ;; Keywords: wp, unix |
| 8 | ;; Obsolete-since: 23.1 | ||
| 8 | 9 | ||
| 9 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 10 | 11 | ||
| @@ -146,22 +147,21 @@ for example, \"word\"." | |||
| 146 | (defun spell-string (string) | 147 | (defun spell-string (string) |
| 147 | "Check spelling of string supplied as argument." | 148 | "Check spelling of string supplied as argument." |
| 148 | (interactive "sSpell string: ") | 149 | (interactive "sSpell string: ") |
| 149 | (let ((buf (get-buffer-create " *temp*"))) | 150 | (with-temp-buffer |
| 150 | (with-current-buffer buf | 151 | (widen) |
| 151 | (widen) | 152 | (erase-buffer) |
| 152 | (erase-buffer) | 153 | (insert string "\n") |
| 153 | (insert string "\n") | 154 | (if (string= "spell" spell-command) |
| 154 | (if (string= "spell" spell-command) | 155 | (call-process-region (point-min) (point-max) "spell" |
| 155 | (call-process-region (point-min) (point-max) "spell" | 156 | t t) |
| 156 | t t) | 157 | (call-process-region (point-min) (point-max) shell-file-name |
| 157 | (call-process-region (point-min) (point-max) shell-file-name | 158 | t t nil "-c" spell-command)) |
| 158 | t t nil "-c" spell-command)) | 159 | (if (= 0 (buffer-size)) |
| 159 | (if (= 0 (buffer-size)) | 160 | (message "%s is correct" string) |
| 160 | (message "%s is correct" string) | 161 | (goto-char (point-min)) |
| 161 | (goto-char (point-min)) | 162 | (while (search-forward "\n" nil t) |
| 162 | (while (search-forward "\n" nil t) | 163 | (replace-match " ")) |
| 163 | (replace-match " ")) | 164 | (message "%sincorrect" (buffer-substring 1 (point-max)))))) |
| 164 | (message "%sincorrect" (buffer-substring 1 (point-max))))))) | ||
| 165 | ;;;###autoload | 165 | ;;;###autoload |
| 166 | (make-obsolete 'spell-string "The `spell' package is obsolete - use `ispell'." | 166 | (make-obsolete 'spell-string "The `spell' package is obsolete - use `ispell'." |
| 167 | "23.1") | 167 | "23.1") |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index d9b036b67b4..3402282bd5d 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -2182,36 +2182,32 @@ grammar file in which CLASS is defined and EVOCAB is the name of the | |||
| 2182 | export vocabulary specified in that file." | 2182 | export vocabulary specified in that file." |
| 2183 | (let ((grammar (directory-files dirname t "\\.g\\'"))) | 2183 | (let ((grammar (directory-files dirname t "\\.g\\'"))) |
| 2184 | (when grammar | 2184 | (when grammar |
| 2185 | (let ((temp-buffer (get-buffer-create | 2185 | (let ((antlr-imenu-name nil) ; dynamic-let: no imenu |
| 2186 | (generate-new-buffer-name " *temp*"))) | 2186 | (expanded-regexp |
| 2187 | (antlr-imenu-name nil) ; dynamic-let: no imenu | 2187 | (concat (format (regexp-quote |
| 2188 | (expanded-regexp (concat (format (regexp-quote | 2188 | (cadr antlr-special-file-formats)) |
| 2189 | (cadr antlr-special-file-formats)) | 2189 | ".+") |
| 2190 | ".+") | 2190 | "\\'")) |
| 2191 | "\\'")) | ||
| 2192 | classes dependencies) | 2191 | classes dependencies) |
| 2193 | (unwind-protect | 2192 | (with-temp-buffer |
| 2194 | (with-current-buffer temp-buffer | 2193 | (dolist (file grammar) |
| 2195 | (widen) ; just in case... | 2194 | (when (and (file-regular-p file) |
| 2196 | (dolist (file grammar) | 2195 | (null (string-match expanded-regexp file))) |
| 2197 | (when (and (file-regular-p file) | 2196 | (insert-file-contents file t nil nil t) |
| 2198 | (null (string-match expanded-regexp file))) | 2197 | (normal-mode t) ; necessary for major-mode, syntax |
| 2199 | (insert-file-contents file t nil nil t) | ||
| 2200 | (normal-mode t) ; necessary for major-mode, syntax | ||
| 2201 | ; table and `antlr-language' | 2198 | ; table and `antlr-language' |
| 2202 | (when (derived-mode-p 'antlr-mode) | 2199 | (when (derived-mode-p 'antlr-mode) |
| 2203 | (let* ((file-deps (antlr-file-dependencies)) | 2200 | (let* ((file-deps (antlr-file-dependencies)) |
| 2204 | (file (car file-deps))) | 2201 | (file (car file-deps))) |
| 2205 | (when file-deps | 2202 | (when file-deps |
| 2206 | (dolist (class-def (caadr file-deps)) | 2203 | (dolist (class-def (caadr file-deps)) |
| 2207 | (let ((file-evocab (cons file (cdr class-def))) | 2204 | (let ((file-evocab (cons file (cdr class-def))) |
| 2208 | (class-spec (assoc (car class-def) classes))) | 2205 | (class-spec (assoc (car class-def) classes))) |
| 2209 | (if class-spec | 2206 | (if class-spec |
| 2210 | (nconc (cdr class-spec) (list file-evocab)) | 2207 | (nconc (cdr class-spec) (list file-evocab)) |
| 2211 | (push (list (car class-def) file-evocab) | 2208 | (push (list (car class-def) file-evocab) |
| 2212 | classes)))) | 2209 | classes)))) |
| 2213 | (push file-deps dependencies))))))) | 2210 | (push file-deps dependencies))))))) |
| 2214 | (kill-buffer temp-buffer)) | ||
| 2215 | (cons (nreverse classes) (nreverse dependencies)))))) | 2211 | (cons (nreverse classes) (nreverse dependencies)))))) |
| 2216 | 2212 | ||
| 2217 | 2213 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index 207297f3d34..e637651a7e2 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -2017,7 +2017,7 @@ Type \\[describe-distribution] for information on ")) | |||
| 2017 | 2017 | ||
| 2018 | (defun display-startup-echo-area-message () | 2018 | (defun display-startup-echo-area-message () |
| 2019 | (let ((resize-mini-windows t)) | 2019 | (let ((resize-mini-windows t)) |
| 2020 | (or noninteractive ;(input-pending-p) init-file-had-error | 2020 | (or noninteractive ;(input-pending-p) init-file-had-error |
| 2021 | ;; t if the init file says to inhibit the echo area startup message. | 2021 | ;; t if the init file says to inhibit the echo area startup message. |
| 2022 | (and inhibit-startup-echo-area-message | 2022 | (and inhibit-startup-echo-area-message |
| 2023 | user-init-file | 2023 | user-init-file |
| @@ -2027,24 +2027,21 @@ Type \\[describe-distribution] for information on ")) | |||
| 2027 | (user-login-name) | 2027 | (user-login-name) |
| 2028 | init-file-user))) | 2028 | init-file-user))) |
| 2029 | ;; Wasn't set with custom; see if .emacs has a setq. | 2029 | ;; Wasn't set with custom; see if .emacs has a setq. |
| 2030 | (let ((buffer (get-buffer-create " *temp*"))) | 2030 | (condition-case nil |
| 2031 | (prog1 | 2031 | (with-temp-buffer |
| 2032 | (condition-case nil | 2032 | (insert-file-contents user-init-file) |
| 2033 | (with-current-buffer buffer | 2033 | (re-search-forward |
| 2034 | (insert-file-contents user-init-file) | 2034 | (concat |
| 2035 | (re-search-forward | 2035 | "([ \t\n]*setq[ \t\n]+" |
| 2036 | (concat | 2036 | "inhibit-startup-echo-area-message[ \t\n]+" |
| 2037 | "([ \t\n]*setq[ \t\n]+" | 2037 | (regexp-quote |
| 2038 | "inhibit-startup-echo-area-message[ \t\n]+" | 2038 | (prin1-to-string |
| 2039 | (regexp-quote | 2039 | (if (equal init-file-user "") |
| 2040 | (prin1-to-string | 2040 | (user-login-name) |
| 2041 | (if (equal init-file-user "") | 2041 | init-file-user))) |
| 2042 | (user-login-name) | 2042 | "[ \t\n]*)") |
| 2043 | init-file-user))) | 2043 | nil t)) |
| 2044 | "[ \t\n]*)") | 2044 | (error nil)))) |
| 2045 | nil t)) | ||
| 2046 | (error nil)) | ||
| 2047 | (kill-buffer buffer))))) | ||
| 2048 | (message "%s" (startup-echo-area-message))))) | 2045 | (message "%s" (startup-echo-area-message))))) |
| 2049 | 2046 | ||
| 2050 | (defun display-startup-screen (&optional concise) | 2047 | (defun display-startup-screen (&optional concise) |
diff --git a/lisp/term.el b/lisp/term.el index 2eb999b03db..0a8b35f5b40 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1537,29 +1537,24 @@ See also `term-input-ignoredups' and `term-write-input-ring'." | |||
| 1537 | (message "Cannot read history file %s" | 1537 | (message "Cannot read history file %s" |
| 1538 | term-input-ring-file-name))) | 1538 | term-input-ring-file-name))) |
| 1539 | (t | 1539 | (t |
| 1540 | (let ((history-buf (get-buffer-create " *temp*")) | 1540 | (let ((file term-input-ring-file-name) |
| 1541 | (file term-input-ring-file-name) | ||
| 1542 | (count 0) | 1541 | (count 0) |
| 1543 | (ring (make-ring term-input-ring-size))) | 1542 | (ring (make-ring term-input-ring-size))) |
| 1544 | (unwind-protect | 1543 | (with-temp-buffer |
| 1545 | (with-current-buffer history-buf | 1544 | (insert-file-contents file) |
| 1546 | (widen) | 1545 | ;; Save restriction in case file is already visited... |
| 1547 | (erase-buffer) | 1546 | ;; Watch for those date stamps in history files! |
| 1548 | (insert-file-contents file) | 1547 | (goto-char (point-max)) |
| 1549 | ;; Save restriction in case file is already visited... | 1548 | (while (and (< count term-input-ring-size) |
| 1550 | ;; Watch for those date stamps in history files! | 1549 | (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" |
| 1551 | (goto-char (point-max)) | 1550 | nil t)) |
| 1552 | (while (and (< count term-input-ring-size) | 1551 | (let ((history (buffer-substring (match-beginning 1) |
| 1553 | (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" | 1552 | (match-end 1)))) |
| 1554 | nil t)) | 1553 | (when (or (null term-input-ignoredups) |
| 1555 | (let ((history (buffer-substring (match-beginning 1) | 1554 | (ring-empty-p ring) |
| 1556 | (match-end 1)))) | 1555 | (not (string-equal (ring-ref ring 0) history))) |
| 1557 | (when (or (null term-input-ignoredups) | 1556 | (ring-insert-at-beginning ring history))) |
| 1558 | (ring-empty-p ring) | 1557 | (setq count (1+ count)))) |
| 1559 | (not (string-equal (ring-ref ring 0) history))) | ||
| 1560 | (ring-insert-at-beginning ring history))) | ||
| 1561 | (setq count (1+ count)))) | ||
| 1562 | (kill-buffer history-buf)) | ||
| 1563 | (setq term-input-ring ring | 1558 | (setq term-input-ring ring |
| 1564 | term-input-ring-index nil))))) | 1559 | term-input-ring-index nil))))) |
| 1565 | 1560 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 44fbcc4cf7d..c0424f95477 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -667,9 +667,9 @@ | |||
| 667 | 667 | ||
| 668 | 2011-01-11 Tassilo Horn <tassilo@member.fsf.org> | 668 | 2011-01-11 Tassilo Horn <tassilo@member.fsf.org> |
| 669 | 669 | ||
| 670 | * image.c (imagemagick_load_image, Finit_image_library): Free | 670 | * image.c (imagemagick_load_image, Finit_image_library): |
| 671 | intermediate image after creating a MagickWand from it. Terminate | 671 | Free intermediate image after creating a MagickWand from it. |
| 672 | MagickWand environment after image loading. | 672 | Terminate MagickWand environment after image loading. |
| 673 | 673 | ||
| 674 | 2011-01-10 Michael Albinus <michael.albinus@gmx.de> | 674 | 2011-01-10 Michael Albinus <michael.albinus@gmx.de> |
| 675 | 675 | ||
| @@ -740,7 +740,7 @@ | |||
| 740 | 740 | ||
| 741 | 2011-01-04 Jan Moringen <jan.moringen@uni-bielefeld.de> | 741 | 2011-01-04 Jan Moringen <jan.moringen@uni-bielefeld.de> |
| 742 | 742 | ||
| 743 | * dbusbind.c (Fdbus_register_method): Added optional parameter | 743 | * dbusbind.c (Fdbus_register_method): Add optional parameter |
| 744 | dont_register_service. Updated docstring accordingly. | 744 | dont_register_service. Updated docstring accordingly. |
| 745 | 745 | ||
| 746 | 2011-01-04 Glenn Morris <rgm@gnu.org> | 746 | 2011-01-04 Glenn Morris <rgm@gnu.org> |