]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-29
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Aug 2023 16:18:30 +0000 (18:18 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Aug 2023 16:18:30 +0000 (18:18 +0200)
f2b2c752a59 Fix documentation of saveplace facilities for Dired
4ed9d61c89a ; * lisp/tab-bar.el: Autoload cl--set-substring, as that ...
30976ecd8d8 ; * lisp/bindings.el (mode-line-modes): Fix typo (bug#650...
8574ef314c4 Fix loaddef generation with ";;;foo-autoload" cookies in ...
8cbd4a02a2b Delete comment saying that project.el is experimental

1  2 
lisp/bindings.el
lisp/dired.el
lisp/progmodes/project.el
lisp/saveplace.el
lisp/tab-bar.el

Simple merge
diff --cc lisp/dired.el
Simple merge
Simple merge
index 18d296ba2d9a6f345c2958091b1bbea077bb24d1,71cd8b9bc0ea39f988266f6c7b23358aa5e0af81..a28de6f63a84439c2e4a3282eb8ba74e1be88c47
@@@ -399,27 -377,28 +410,28 @@@ It runs the hook `save-place-after-find
  (declare-function dired-goto-file "dired" (file))
  
  (defun save-place-dired-hook ()
-   "Position the point in a Dired buffer."
+   "Position point in a Dired buffer according to its saved place.
+ This is run via `dired-initial-position-hook', which see."
    (or save-place-loaded (save-place-load-alist-from-file))
 -  (let* ((directory (and (derived-mode-p 'dired-mode)
 -                         (boundp 'dired-subdir-alist)
 -                       dired-subdir-alist
 -                       (dired-current-directory)))
 -       (cell (assoc (and directory
 -                         (expand-file-name (if (consp directory)
 -                                               (car directory)
 -                                             directory)))
 -                    save-place-alist)))
 -    (if cell
 -        (progn
 -          (or revert-buffer-in-progress-p
 -              (cond
 -             ((integerp (cdr cell))
 -              (goto-char (cdr cell)))
 -             ((and (listp (cdr cell)) (assq 'dired-filename (cdr cell)))
 -              (dired-goto-file (cdr (assq 'dired-filename (cdr cell)))))))
 -          ;; and make sure it will be saved again for later
 -          (setq save-place-mode t)))))
 +  (when-let ((directory (and (derived-mode-p 'dired-mode)
 +                             (boundp 'dired-subdir-alist)
 +                           dired-subdir-alist
 +                           (dired-current-directory)))
 +             (item (expand-file-name (if (consp directory)
 +                                       (car directory)
 +                                     directory)))
 +           (cell (assoc (if save-place-abbreviate-file-names
 +                              (abbreviate-file-name item) item)
 +                        save-place-alist)))
 +    (or revert-buffer-in-progress-p
 +        (cond
 +       ((integerp (cdr cell))
 +        (goto-char (cdr cell)))
 +       ((listp (cdr cell))
 +          (when-let ((elt (assq 'dired-filename (cdr cell))))
 +            (dired-goto-file (expand-file-name (cdr elt)))))))
 +    ;; and make sure it will be saved again for later
 +    (setq save-place-mode t)))
  
  (defun save-place-kill-emacs-hook ()
    ;; First update the alist.  This loads the old save-place-file if nec.
diff --cc lisp/tab-bar.el
Simple merge