]> code.delx.au - gnu-emacs/blobdiff - lisp/ibuf-ext.el
Fix the prefix action of shr-copy-url
[gnu-emacs] / lisp / ibuf-ext.el
index aa3ccbd40f7b9805411090b73ca7650a2d0774b4..0baab6b2f2588750eae90945b2b7627bdc5a751f 100644 (file)
@@ -347,10 +347,14 @@ the mode if ARG is omitted or nil."
    :modifier-p nil)
   (shell-command (concat command " "
                         (shell-quote-argument
-                         (if buffer-file-name
-                             buffer-file-name
-                           (make-temp-file
-                            (substring (buffer-name) 0 (min 10 (length (buffer-name))))))))))
+                         (or buffer-file-name
+                             (let ((file
+                                    (make-temp-file
+                                     (substring
+                                      (buffer-name) 0
+                                      (min 10 (length (buffer-name)))))))
+                               (write-region nil nil file nil 0)
+                               file))))))
 
 ;;;###autoload (autoload 'ibuffer-do-eval "ibuf-ext")
 (define-ibuffer-op eval (form)
@@ -1403,7 +1407,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
   (if (zerop (ibuffer-count-marked-lines))
       (message "No buffers marked; use 'm' to mark a buffer")
     (let ((ibuffer-copy-filename-as-kill-result "")
-         (type (cond ((zerop arg)
+         (type (cond ((or (null arg) (zerop arg))
                       'full)
                      ((= arg 4)
                       'relative)