emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 2e9eba2: Backport: Don't compare arguments that c


From: Oscar Fuentes
Subject: [Emacs-diffs] emacs-26 2e9eba2: Backport: Don't compare arguments that can be nil (Bug#28039)
Date: Sat, 16 Dec 2017 23:49:22 -0500 (EST)

branch: emacs-26
commit 2e9eba2013521cb55dc4613733a65d3c6408c65f
Author: Oscar Fuentes <address@hidden>
Commit: Oscar Fuentes <address@hidden>

    Backport: Don't compare arguments that can be nil (Bug#28039)
    
    copy-region-as-kill can be called passing nil as `beg' and
    `end'. Magit does that, which caused an error when this advice was in
    effect.
    
    * lisp/ses.el (ses--advice-copy-region-as-kill): avoid comparison
      unless `beg' and `end' are non-nil.
---
 lisp/ses.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ses.el b/lisp/ses.el
index 4c19c70..188992c 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3051,7 +3051,7 @@ We'll assume copying front-sticky properties doesn't make 
sense, either.
 
 This advice also includes some SES-specific code because otherwise it's too
 hard to override how mouse-1 works."
-  (when (> beg end)
+  (when (and beg end (> beg end))
     (let ((temp beg))
       (setq beg end
            end temp)))



reply via email to

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