summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2002-11-11 11:42:22 +0000
committerJuanma Barranquero <lekktu@gmail.com>2002-11-11 11:42:22 +0000
commitfd23ef2422d89d5dc5f668296428c04cbdee8f9c (patch)
tree4a2f405e57df2f85dd9500f76037dca0dd106a98 /lisp
parente4524aeec70be959693783555f22801a05405b6a (diff)
downloademacs-fd23ef2422d89d5dc5f668296428c04cbdee8f9c.tar.gz
(dired-show-file-type): Format filename with "%s" to escape any format-like
sequences it could contain.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/dired-aux.el12
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4657e2b87a5..d3923e77630 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-11 Fabrice Bauzac <fabrice.bauzac@wanadoo.fr> (tiny change)
+
+ * dired-aux.el (dired-show-file-type): Format filename with "%s" to
+ escape any format-like sequences it could contain.
+
2002-11-03 Andre Spiegel <spiegel@gnu.org>
* vc.el (vc-dired-mode): Adapt dired-move-to-filename-regexp to its
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 5a01ebcc3e5..e6fc296f9e1 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -102,7 +102,7 @@ With prefix arg, prompt for argument SWITCHES which is options for `diff'."
(setq failures
(dired-bunch-files 10000
(function dired-check-process)
- (append
+ (append
(list operation program new-attribute)
(if (string-match "gnu" system-configuration)
'("--") nil))
@@ -560,7 +560,7 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
(setq suffix (car suffixes) suffixes nil))
(setq suffixes (cdr suffixes))))
;; If so, compute desired new name.
- (if suffix
+ (if suffix
(setq newname (concat (substring file 0 (match-beginning 0))
(nth 1 suffix))))
(cond (handler
@@ -852,7 +852,7 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
;; It inserts the file's absolute name, rather than
;; the relative one. That may be hard to fix since it
;; is probably controlled by something in ftp.
- (goto-char opoint)
+ (goto-char opoint)
(let ((inserted-name (dired-get-filename 'verbatim)))
(if (file-name-directory inserted-name)
(progn
@@ -2014,15 +2014,15 @@ with the command \\[tags-loop-continue]."
(defun dired-show-file-type (file &optional deref-symlinks)
"Print the type of FILE, according to the `file' command.
If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is
-true then the type of the file linked to by FILE is printed instead."
+true then the type of the file linked to by FILE is printed instead."
(interactive (list (dired-get-filename t) current-prefix-arg))
- (with-temp-buffer
+ (with-temp-buffer
(if deref-symlinks
(call-process "file" nil t t "-L" file)
(call-process "file" nil t t file))
(when (bolp)
(backward-delete-char 1))
- (message (buffer-string))))
+ (message "%s" (buffer-string))))
(provide 'dired-aux)