Merge from origin/emacs-27
9939c435c1
Return the correct suffix in eww-make-unique-file-name17fa17be3d
Save bookmarks by using `write-file' (bug#12507)2cdf1fd261
Fix filing messages when 'rmail-output-reset-deleted-flag'...a72db8ab8b
Make file copying in tramp-gvfs more robustf31cacd1ff
Revert "Fix incorrect handling of module runtime and envir...cdc632fbe6
Fix incorrect handling of module runtime and environment p...c9160bda78
CC Mode: Fix error in cache handling. This fixes bug #43481
This commit is contained in:
commit
6c6d06c3ee
5 changed files with 46 additions and 12 deletions
|
@ -1483,7 +1483,32 @@ for a file, defaulting to the file defined by variable
|
|||
((eq 'nospecial bookmark-version-control) version-control)
|
||||
(t t))))
|
||||
(condition-case nil
|
||||
(write-region (point-min) (point-max) file)
|
||||
;; There was a stretch of time (about 15 years) when we
|
||||
;; used `write-region' below instead of `write-file',
|
||||
;; before going back to `write-file' again. So if you're
|
||||
;; considering changing it to `write-region', please see
|
||||
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=12507.
|
||||
;; That bug tells the story of how we first started using
|
||||
;; `write-region' in 2005...
|
||||
;;
|
||||
;; commit a506054af7cd86a63fda996056c09310966f32ef
|
||||
;; Author: Karl Fogel <kfogel@red-bean.com>
|
||||
;; AuthorDate: Sat Nov 12 20:30:22 2005 +0000
|
||||
;;
|
||||
;; (bookmark-write-file): Don't visit the
|
||||
;; destination file, just write the data to it
|
||||
;; using write-region. This is similar to
|
||||
;; 2005-05-29T08:36:26Z!rms@gnu.org of saveplace.el,
|
||||
;; but with an additional change to avoid visiting
|
||||
;; the file in the first place.
|
||||
;;
|
||||
;; ...and of how further inquiry led us to investigate (in
|
||||
;; 2012 and then again in 2020) and eventually decide that
|
||||
;; matching the saveplace.el change doesn't make sense for
|
||||
;; bookmark.el. Therefore we reverted to `write-file',
|
||||
;; which means numbered backups may now be created,
|
||||
;; depending on `bookmark-version-control' as per above.
|
||||
(write-file file)
|
||||
(file-error (message "Can't write %s" file)))
|
||||
(setq bookmark-file-coding-system coding-system-for-write)
|
||||
(kill-buffer (current-buffer))
|
||||
|
|
|
@ -579,7 +579,7 @@ from a non-Rmail buffer. In this case, COUNT is ignored."
|
|||
(progn
|
||||
(if rmail-delete-after-output
|
||||
(rmail-delete-message))
|
||||
(if (> count 0)
|
||||
(if (>= count 0)
|
||||
(let ((msgnum rmail-current-message))
|
||||
(rmail-next-message 1)
|
||||
(eq rmail-current-message (1+ msgnum)))))
|
||||
|
|
|
@ -1832,7 +1832,7 @@ Use link at point if there is one, else the current page's URL."
|
|||
(suffix ""))
|
||||
(when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
|
||||
(setq stem (match-string 1 file)
|
||||
suffix (match-string 2)))
|
||||
suffix (match-string 2 file)))
|
||||
(while (file-exists-p (expand-file-name file directory))
|
||||
(setq file (format "%s(%d)%s" stem count suffix))
|
||||
(setq count (1+ count)))
|
||||
|
|
|
@ -1020,14 +1020,23 @@ file names."
|
|||
(with-tramp-progress-reporter
|
||||
v 0 (format "%s %s to %s" msg-operation filename newname)
|
||||
(unless
|
||||
(apply
|
||||
#'tramp-gvfs-send-command v gvfs-operation
|
||||
(append
|
||||
(and (eq op 'copy) (or keep-date preserve-uid-gid)
|
||||
'("--preserve"))
|
||||
(list
|
||||
(tramp-gvfs-url-file-name filename)
|
||||
(tramp-gvfs-url-file-name newname))))
|
||||
(and (apply
|
||||
#'tramp-gvfs-send-command v gvfs-operation
|
||||
(append
|
||||
(and (eq op 'copy) (or keep-date preserve-uid-gid)
|
||||
'("--preserve"))
|
||||
(list
|
||||
(tramp-gvfs-url-file-name filename)
|
||||
(tramp-gvfs-url-file-name newname))))
|
||||
;; Some backends do not return a proper error
|
||||
;; code in case of direct copy/move. Apply sanity checks.
|
||||
(or (not equal-remote)
|
||||
(tramp-gvfs-send-command
|
||||
v "gvfs-info" (tramp-gvfs-url-file-name newname))
|
||||
(eq op 'copy)
|
||||
(not (tramp-gvfs-send-command
|
||||
v "gvfs-info"
|
||||
(tramp-gvfs-url-file-name filename)))))
|
||||
|
||||
(if (or (not equal-remote)
|
||||
(and equal-remote
|
||||
|
|
|
@ -3148,7 +3148,7 @@ comment at the start of cc-engine.el for more info."
|
|||
((nth 7 s) 'c++)
|
||||
(t 'c)))
|
||||
(setq start (nth 8 s))
|
||||
(unless end
|
||||
(unless (and end (>= end here))
|
||||
(setq s1 (parse-partial-sexp here (point-max)
|
||||
nil ; TARGETDEPTH
|
||||
nil ; STOPBEFORE
|
||||
|
|
Loading…
Reference in a new issue