branch: externals/objed
commit b683880eca0e31ff824e486e0cd7e631a7c8cac3
Author: Clemens Radermacher <[email protected]>
Commit: Clemens Radermacher <[email protected]>
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