emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste 81d3f9b 038/298: Namespace wrapper for save-mark-


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste 81d3f9b 038/298: Namespace wrapper for save-mark-and-excursion
Date: Thu, 9 Dec 2021 18:59:40 -0500 (EST)

branch: elpa/webpaste
commit 81d3f9bb3e1cd08f087a9019a3d84257af1b584b
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Namespace wrapper for save-mark-and-excursion
---
 webpaste.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/webpaste.el b/webpaste.el
index 8493f0c..0983c36 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -178,17 +178,17 @@ When we run out of providers to try, it will restart since
   "Paste current buffer to some paste service."
   (interactive)
 
-  (save-mark-and-excursion
+  (webpaste-save-mark-and-excursion
    (set-mark (point-min))               ; Set mark on point-min
    (goto-char (point-max))              ; Go to point-max
    (webpaste-paste-region)))            ; Paste region
 
 
-;; Define macro for emacs <25 compability
-(eval-when-compile
-  (when (< emacs-major-version 25)
-    (defmacro save-mark-and-excursion (&rest body)
-      `(save-excursion ,@body))))
+;; Define wrapper for save-excursion / save-mark-and-excursion
+(defmacro webpaste-save-mark-and-excursion (&rest body)
+  (if (< emacs-major-version 25)
+      `(save-excursion ,@body)
+    `(save-mark-and-excursion ,@body)))
 
 
 (provide 'webpaste)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]