diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/dired-aux.el | 37 | ||||
-rw-r--r-- | lisp/gnus/mm-encode.el | 2 | ||||
-rw-r--r-- | lisp/simple.el | 4 |
3 files changed, 22 insertions, 21 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index c49e4e91d83..7edfde08f80 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1896,22 +1896,23 @@ rename them using `vc-rename-file'." "Rename FILE to NEWNAME. Signal a `file-already-exists' error if a file NEWNAME already exists unless OK-IF-ALREADY-EXISTS is non-nil." - (dired-handle-overwrite newname) - (dired-maybe-create-dirs (file-name-directory newname)) - (if (and dired-vc-rename-file - (vc-backend file) - (ignore-errors (vc-responsible-backend newname))) - (vc-rename-file file newname) - ;; error is caught in -create-files - (rename-file file newname ok-if-already-exists)) - ;; Silently rename the visited file of any buffer visiting this file. - (and (get-file-buffer file) - (with-current-buffer (get-file-buffer file) - (set-visited-file-name newname nil t))) - (dired-remove-file file) - ;; See if it's an inserted subdir, and rename that, too. - (when (file-directory-p file) - (dired-rename-subdir file newname))) + (let ((file-is-dir-p (file-directory-p file))) + (dired-handle-overwrite newname) + (dired-maybe-create-dirs (file-name-directory newname)) + (if (and dired-vc-rename-file + (vc-backend file) + (ignore-errors (vc-responsible-backend newname))) + (vc-rename-file file newname) + ;; error is caught in -create-files + (rename-file file newname ok-if-already-exists)) + ;; Silently rename the visited file of any buffer visiting this file. + (and (get-file-buffer file) + (with-current-buffer (get-file-buffer file) + (set-visited-file-name newname nil t))) + (dired-remove-file file) + ;; See if it's an inserted subdir, and rename that, too. + (when file-is-dir-p + (dired-rename-subdir file newname)))) (defun dired-rename-subdir (from-dir to-dir) (setq from-dir (file-name-as-directory from-dir) @@ -1924,7 +1925,7 @@ unless OK-IF-ALREADY-EXISTS is non-nil." (while blist (with-current-buffer (car blist) (if (and buffer-file-name - (file-in-directory-p buffer-file-name expanded-from-dir)) + (dired-in-this-tree-p buffer-file-name expanded-from-dir)) (let ((modflag (buffer-modified-p)) (to-file (replace-regexp-in-string (concat "^" (regexp-quote from-dir)) @@ -1943,7 +1944,7 @@ unless OK-IF-ALREADY-EXISTS is non-nil." (while alist (setq elt (car alist) alist (cdr alist)) - (if (file-in-directory-p (car elt) expanded-dir) + (if (dired-in-this-tree-p (car elt) expanded-dir) ;; ELT's subdir is affected by the rename (dired-rename-subdir-2 elt dir to))) (if (equal dir default-directory) diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index ead3bae219d..39b1ad1f3b9 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -99,7 +99,7 @@ This variable should never be set directly, but bound before a call to ;;;###autoload (define-obsolete-function-alias 'mm-default-file-encoding - #'mm-default-file-type "future") ;Old bad name. + #'mm-default-file-type "28.1") ;Old bad name. ;;;###autoload (defun mm-default-file-type (file) "Return a default content type for FILE." diff --git a/lisp/simple.el b/lisp/simple.el index bbab57703de..7e964c9d1d5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -222,7 +222,7 @@ rejected, and the function returns nil." (defcustom next-error-find-buffer-function #'ignore "Function called to find a `next-error' capable buffer. -This functions takes the same three arguments as the function +This function takes the same three arguments as the function `next-error-find-buffer', and should return the buffer to be used by the subsequent invocation of the command `next-error' and `previous-error'. @@ -5289,7 +5289,7 @@ If `kill-append-merge-undo' is non-nil, remove the last undo boundary in the current buffer." (let ((cur (car kill-ring))) (kill-new (if before-p (concat string cur) (concat cur string)) - (or (string= cur "") + (or (= (length cur) 0) (null (get-text-property 0 'yank-handler cur))))) (when (and kill-append-merge-undo (not buffer-read-only)) (let ((prev buffer-undo-list) |