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

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

[elpa] externals/objed b683880 162/166: Fix init for region object witho


From: Clemens Radermacher
Subject: [elpa] externals/objed b683880 162/166: Fix init for region object without mark
Date: Sun, 29 Dec 2019 08:21:20 -0500 (EST)

branch: externals/objed
commit b683880eca0e31ff824e486e0cd7e631a7c8cac3
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Fix init for region object without mark
---
 objed.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/objed.el b/objed.el
index 5c04526..4b16cc6 100644
--- a/objed.el
+++ b/objed.el
@@ -1425,6 +1425,11 @@ that any previous instance of this object is used."
                 ;; TODO: fallback here, too
                 (objed--switch-to-object-for-cmd sym))
                ((symbolp sym)
+                ;; for region object fallback to char
+                ;; if there is no mark in the buffer
+                (when (and (eq sym 'region)
+                           (not (mark)))
+                  (setq sym 'char))
                 (if fallback
                     (let ((obatp (objed--inside-object-p sym)))
                       (if obatp



reply via email to

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