Mercurial > emacs
changeset 100278:4d303931bf58
(auto-insert): Use expand-file-name instead of concat.
Suggested by Eric Hanchrow <eric.hanchrow@gmail.com>.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 08 Dec 2008 16:30:43 +0000 |
parents | 8e5380a0e38c |
children | bba637a77ca1 |
files | lisp/ChangeLog lisp/ChangeLog.12 lisp/autoinsert.el |
diffstat | 3 files changed, 53 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Dec 08 16:22:40 2008 +0000 +++ b/lisp/ChangeLog Mon Dec 08 16:30:43 2008 +0000 @@ -1,3 +1,8 @@ +2008-12-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * autoinsert.el (auto-insert): Use expand-file-name instead of concat. + Suggested by Eric Hanchrow <eric.hanchrow@gmail.com>. + 2008-12-06 Chong Yidong <cyd@stupidchicken.com> * term/xterm.el (terminal-init-xterm): Discard pending input @@ -24,7 +29,7 @@ 2008-12-04 Sam Steingold <sds@gnu.org> - * progmodes/compile.el (compilation-read-command): Extracted from + * progmodes/compile.el (compilation-read-command): Extract from compile. (compile): Use it. (recompile): Accept an optional argument to enable editing the @@ -34,8 +39,8 @@ * net/tramp.el (top): Write a message, when loading Tramp. - * net/tramp-cache.el (tramp-dump-connection-properties): Polish - the check, whether to dump the data. + * net/tramp-cache.el (tramp-dump-connection-properties): + Polish the check, whether to dump the data. 2008-12-04 Lute Kamstra <lute@gnu.org> @@ -269,8 +274,8 @@ * wdired.el (wdired-finish-edit): If displaying a single file, change dired-directory if that file was renamed. - * emacs-lisp/byte-run.el (macro-declaration-function): Disallow - declare specs with lengths of 3 or more. + * emacs-lisp/byte-run.el (macro-declaration-function): + Disallow declare specs with lengths of 3 or more. * dirtrack.el (dirtrack): Fix error message. @@ -303,11 +308,11 @@ 2008-11-29 Chong Yidong <cyd@stupidchicken.com> - * complete.el (PC-do-complete-and-exit): Use - minibuffer-confirm-exit-commands. - - * minibuffer.el (minibuffer-confirm-exit-commands): Add - PC-complete and PC-complete-word to the list. + * complete.el (PC-do-complete-and-exit): + Use minibuffer-confirm-exit-commands. + + * minibuffer.el (minibuffer-confirm-exit-commands): + Add PC-complete and PC-complete-word to the list. 2008-11-29 Juanma Barranquero <lekktu@gmail.com> @@ -376,15 +381,14 @@ * international/characters.el: Set category 'C' to characters #x20000..#x2AFFF, #x2F800..#x2FFFF. - * loadup.el: Set inhibit-load-charset-map to t while preloading - files. + * loadup.el: Set inhibit-load-charset-map to t while preloading files. 2008-11-27 Chong Yidong <cyd@stupidchicken.com> * tool-bar.el (tool-bar-find-image-cache): Var deleted. (tool-bar-find-image): Function deleted. - (tool-bar-local-item, tool-bar-local-item-from-menu): Use - find-image instead of tool-bar-find-image. + (tool-bar-local-item, tool-bar-local-item-from-menu): + Use find-image instead of tool-bar-find-image. (tool-bar-keymap-cache): New hash table. (tool-bar-make-keymap): Use it. (tool-bar-make-keymap-1): Move body of tool-bar-make-keymap here. @@ -493,11 +497,9 @@ 2008-11-24 Ulf Jasper <ulf@web.de> - * net/newst-treeview.el (newsticker--treeview-current-feed): Doc - string. - (newsticker--treeview-item-show): Renamed arg FEED to - FEED-NAME-SYMBOL. - (newsticker--treeview-tree-update-tag): Removed dead code. + * net/newst-treeview.el (newsticker--treeview-current-feed): Docstring. + (newsticker--treeview-item-show): Rename arg FEED to FEED-NAME-SYMBOL. + (newsticker--treeview-tree-update-tag): Remove dead code. (newsticker-treeview-update): Don't update cache. (newsticker-treeview-quit): Don't save cache. (newsticker-treeview-save): Don't save cache. Use `newsticker-dir'. @@ -512,9 +514,9 @@ (newsticker-stop): Use `newsticker--cache-save'. (newsticker--sentinel-work): Use `newsticker--cache-save-feed'. (newsticker--images-dir): New. - (newsticker--image-get, newsticker--image-sentinel): Use - `newsticker--images-dir'. - (newsticker--cache-save-version1): Backuped version of + (newsticker--image-get, newsticker--image-sentinel): + Use `newsticker--images-dir'. + (newsticker--cache-save-version1): Backup version of `newsticker--cache-save'. (newsticker--cache-update): Create newsticker-dir if necessary. (newsticker--cache-dir): New. @@ -524,24 +526,23 @@ cache data.. (newsticker--cache-read, newsticker--cache-do-read): New. - * net/newst-reader.el (newsticker--image-read): Use - `newsticker--images-dir'. + * net/newst-reader.el (newsticker--image-read): + Use `newsticker--images-dir'. 2008-11-24 Chong Yidong <cyd@stupidchicken.com> - * files.el (confirm-nonexistent-file-or-buffer): Allow - `after-completion' value to request confirm only after TAB. + * files.el (confirm-nonexistent-file-or-buffer): + Allow `after-completion' value to request confirm only after TAB. (confirm-nonexistent-file-or-buffer): New function. (read-buffer-to-switch, find-file, find-file-other-window) (find-file-other-frame, find-file-read-only) (find-file-read-only-other-window) (find-file-read-only-other-frame): Use it. - (switch-to-buffer-other-window, switch-to-buffer-other-frame): Doc - fix. + (switch-to-buffer-other-window, switch-to-buffer-other-frame): Doc fix. Thanks to Alan Mackenzie for suggesting the new behavior. - * minibuffer.el (minibuffer-complete-and-exit): Change - `confirm-only' value of minibuffer-completion-confirm to + * minibuffer.el (minibuffer-complete-and-exit): + Change `confirm-only' value of minibuffer-completion-confirm to `confirm', and handle a `confirm-after-completion' value. 2008-11-24 Juanma Barranquero <lekktu@gmail.com>
--- a/lisp/ChangeLog.12 Mon Dec 08 16:22:40 2008 +0000 +++ b/lisp/ChangeLog.12 Mon Dec 08 16:30:43 2008 +0000 @@ -2109,13 +2109,13 @@ 2007-02-02 Ulf Jasper <ulf.jasper@web.de> - * net/newsticker.el (newsticker-version): Changed to "1.10". + * net/newsticker.el (newsticker-version): Change to "1.10". (newsticker--set-customvar): Doc string. (newsticker-new-item-face): Doc string. (newsticker-mode): Initialize `invisibility-spec' with t. - (newsticker-mode-map): Added - `newsticker-mark-all-items-at-point-as-read'. - (newsticker-menu): Added narrow-to-item and narrow-to-feed. + (newsticker-mode-map): + Add `newsticker-mark-all-items-at-point-as-read'. + (newsticker-menu): Add narrow-to-item and narrow-to-feed. (newsticker-w3m-show-inline-images): Do not call `w3m-remove-image'. (newsticker--buffer-after-w3m-insert-image): New advice for @@ -2130,8 +2130,7 @@ `newsticker-mark-item-at-point-as-read'. (newsticker-hide-entry): Use (t) instead of t for invisibility. (newsticker--sentinel): Yet another xml-parser workaround. - (newsticker--decode-iso8601-date): Bugfix for datestrings without - days. + (newsticker--decode-iso8601-date): Bugfix for datestrings without days. (newsticker--buffer-do-insert-text): Fix. (newsticker--buffer-insert-enclosure): Fix. Length might be missing. (newsticker--buffer-make-item-completely-visible): @@ -2361,13 +2360,13 @@ 2007-01-27 Ben North <ben@redfrontdoor.org> - * outline.el (outline-promote, outline-demote): Doc fix. Rename - the arg CHILDREN -> WHICH. + * outline.el (outline-promote, outline-demote): Doc fix. + Rename the arg CHILDREN -> WHICH. 2007-01-27 Michael Albinus <michael.albinus@gmx.de> - * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set - default-directory to a sane value when calling start-process. + * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): + Set default-directory to a sane value when calling start-process. 2007-01-27 Eli Zaretskii <eliz@gnu.org> @@ -2532,13 +2531,12 @@ 2007-01-20 Eric Hanchrow <offby1@blarg.net> (tiny change) * progmodes/cperl-mode.el (cperl-electric-keywords): Document in - the doc string how to use personal abbrevs without electric - keywords. + the doc string how to use personal abbrevs without electric keywords. 2007-01-20 Alin C. Soare <alinsoar@voila.fr> (tiny change) * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - Fixed cursor position when toggle abbreviated display. + Fix cursor position when toggle abbreviated display. 2007-01-20 Nick Roberts <nickrob@snap.net.nz> @@ -2567,8 +2565,7 @@ 2007-01-18 Bruno Haible <bruno@clisp.org> (tiny change) - * info.el (Info-default-dirs): Change default info dir to - share/info. + * info.el (Info-default-dirs): Change default info dir to share/info. * paths.el (Info-default-directory-list): Ditto.
--- a/lisp/autoinsert.el Mon Dec 08 16:22:40 2008 +0000 +++ b/lisp/autoinsert.el Mon Dec 08 16:30:43 2008 +0000 @@ -343,19 +343,19 @@ ;; Now, if we found something, do it (and action - (if (stringp action) - (file-readable-p (concat auto-insert-directory action)) - t) - (if auto-insert-query - (or (if (eq auto-insert-query 'function) - (eq this-command 'auto-insert)) - (y-or-n-p (format auto-insert-prompt desc))) - t) + (or (not (stringp action)) + (file-readable-p (expand-file-name + action auto-insert-directory))) + (or (not auto-insert-query) + (if (eq auto-insert-query 'function) + (eq this-command 'auto-insert)) + (y-or-n-p (format auto-insert-prompt desc))) (mapc (lambda (action) (if (stringp action) (if (file-readable-p - (setq action (concat auto-insert-directory action))) + (setq action (expand-file-name + action auto-insert-directory))) (insert-file-contents action)) (save-window-excursion ;; make buffer visible before skeleton or function @@ -393,8 +393,7 @@ (vector action (cdr elt))))) (if after (nconc auto-insert-alist (list (cons condition action))) - (setq auto-insert-alist (cons (cons condition action) - auto-insert-alist)))))) + (push (cons condition action) auto-insert-alist))))) ;;;###autoload (define-minor-mode auto-insert-mode