aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/bookmark.el27
-rw-r--r--lisp/mail/rmailout.el2
-rw-r--r--lisp/net/eww.el2
-rw-r--r--lisp/net/tramp-gvfs.el25
-rw-r--r--lisp/progmodes/cc-engine.el2
5 files changed, 46 insertions, 12 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index d703458aa11..b9bdbe86d69 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1483,7 +1483,32 @@ for a file, defaulting to the file defined by variable
1483 ((eq 'nospecial bookmark-version-control) version-control) 1483 ((eq 'nospecial bookmark-version-control) version-control)
1484 (t t)))) 1484 (t t))))
1485 (condition-case nil 1485 (condition-case nil
1486 (write-region (point-min) (point-max) file) 1486 ;; There was a stretch of time (about 15 years) when we
1487 ;; used `write-region' below instead of `write-file',
1488 ;; before going back to `write-file' again. So if you're
1489 ;; considering changing it to `write-region', please see
1490 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=12507.
1491 ;; That bug tells the story of how we first started using
1492 ;; `write-region' in 2005...
1493 ;;
1494 ;; commit a506054af7cd86a63fda996056c09310966f32ef
1495 ;; Author: Karl Fogel <kfogel@red-bean.com>
1496 ;; AuthorDate: Sat Nov 12 20:30:22 2005 +0000
1497 ;;
1498 ;; (bookmark-write-file): Don't visit the
1499 ;; destination file, just write the data to it
1500 ;; using write-region. This is similar to
1501 ;; 2005-05-29T08:36:26Z!rms@gnu.org of saveplace.el,
1502 ;; but with an additional change to avoid visiting
1503 ;; the file in the first place.
1504 ;;
1505 ;; ...and of how further inquiry led us to investigate (in
1506 ;; 2012 and then again in 2020) and eventually decide that
1507 ;; matching the saveplace.el change doesn't make sense for
1508 ;; bookmark.el. Therefore we reverted to `write-file',
1509 ;; which means numbered backups may now be created,
1510 ;; depending on `bookmark-version-control' as per above.
1511 (write-file file)
1487 (file-error (message "Can't write %s" file))) 1512 (file-error (message "Can't write %s" file)))
1488 (setq bookmark-file-coding-system coding-system-for-write) 1513 (setq bookmark-file-coding-system coding-system-for-write)
1489 (kill-buffer (current-buffer)) 1514 (kill-buffer (current-buffer))
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 49531eab91e..cfde335b54f 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -579,7 +579,7 @@ from a non-Rmail buffer. In this case, COUNT is ignored."
579 (progn 579 (progn
580 (if rmail-delete-after-output 580 (if rmail-delete-after-output
581 (rmail-delete-message)) 581 (rmail-delete-message))
582 (if (> count 0) 582 (if (>= count 0)
583 (let ((msgnum rmail-current-message)) 583 (let ((msgnum rmail-current-message))
584 (rmail-next-message 1) 584 (rmail-next-message 1)
585 (eq rmail-current-message (1+ msgnum))))) 585 (eq rmail-current-message (1+ msgnum)))))
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 0c43fc609a2..ce49e32601b 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1832,7 +1832,7 @@ Use link at point if there is one, else the current page's URL."
1832 (suffix "")) 1832 (suffix ""))
1833 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) 1833 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
1834 (setq stem (match-string 1 file) 1834 (setq stem (match-string 1 file)
1835 suffix (match-string 2))) 1835 suffix (match-string 2 file)))
1836 (while (file-exists-p (expand-file-name file directory)) 1836 (while (file-exists-p (expand-file-name file directory))
1837 (setq file (format "%s(%d)%s" stem count suffix)) 1837 (setq file (format "%s(%d)%s" stem count suffix))
1838 (setq count (1+ count))) 1838 (setq count (1+ count)))
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 40a7cbbce19..7970488b40d 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1020,14 +1020,23 @@ file names."
1020 (with-tramp-progress-reporter 1020 (with-tramp-progress-reporter
1021 v 0 (format "%s %s to %s" msg-operation filename newname) 1021 v 0 (format "%s %s to %s" msg-operation filename newname)
1022 (unless 1022 (unless
1023 (apply 1023 (and (apply
1024 #'tramp-gvfs-send-command v gvfs-operation 1024 #'tramp-gvfs-send-command v gvfs-operation
1025 (append 1025 (append
1026 (and (eq op 'copy) (or keep-date preserve-uid-gid) 1026 (and (eq op 'copy) (or keep-date preserve-uid-gid)
1027 '("--preserve")) 1027 '("--preserve"))
1028 (list 1028 (list
1029 (tramp-gvfs-url-file-name filename) 1029 (tramp-gvfs-url-file-name filename)
1030 (tramp-gvfs-url-file-name newname)))) 1030 (tramp-gvfs-url-file-name newname))))
1031 ;; Some backends do not return a proper error
1032 ;; code in case of direct copy/move. Apply sanity checks.
1033 (or (not equal-remote)
1034 (tramp-gvfs-send-command
1035 v "gvfs-info" (tramp-gvfs-url-file-name newname))
1036 (eq op 'copy)
1037 (not (tramp-gvfs-send-command
1038 v "gvfs-info"
1039 (tramp-gvfs-url-file-name filename)))))
1031 1040
1032 (if (or (not equal-remote) 1041 (if (or (not equal-remote)
1033 (and equal-remote 1042 (and equal-remote
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 252eec138c1..5e2ce71f536 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -3148,7 +3148,7 @@ comment at the start of cc-engine.el for more info."
3148 ((nth 7 s) 'c++) 3148 ((nth 7 s) 'c++)
3149 (t 'c))) 3149 (t 'c)))
3150 (setq start (nth 8 s)) 3150 (setq start (nth 8 s))
3151 (unless end 3151 (unless (and end (>= end here))
3152 (setq s1 (parse-partial-sexp here (point-max) 3152 (setq s1 (parse-partial-sexp here (point-max)
3153 nil ; TARGETDEPTH 3153 nil ; TARGETDEPTH
3154 nil ; STOPBEFORE 3154 nil ; STOPBEFORE