all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70384: [PATCH] 30.0.50; save-mark-and-excursion breaks with tmm disabled
@ 2024-04-14 15:52 Paul Nelson
  2024-04-18 11:04 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Nelson @ 2024-04-14 15:52 UTC (permalink / raw)
  To: 70384

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hello,

Steps to reproduce:

- Disable transient-mark-mode.
- Set the mark somewhere (C-SPC), move the point somewhere else.
- M-: (save-mark-and-excursion (activate-mark))

This activates the region, but should not.

Attaching a patch with the simple fix.

Thanks, best,

Paul

[-- Attachment #2: 0001-Fix-save-mark-and-excursion-with-tmm-disabled.patch --]
[-- Type: application/octet-stream, Size: 830 bytes --]

From 06b6f0a70eb7f59fe9a2a0d82697f509290993f0 Mon Sep 17 00:00:00 2001
From: Paul Nelson <ultrono@gmail.com>
Date: Sun, 14 Apr 2024 17:49:45 +0200
Subject: [PATCH] Fix save-mark-and-excursion with tmm disabled

* lisp/simple.el (save-mark-and-excursion--save):
Use (region-active-p) instead of mark-active.
---
 lisp/simple.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 0645f18cc78..249fadae6a9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6981,7 +6981,7 @@ save-mark-and-excursion--save
   (cons
    (let ((mark (mark-marker)))
      (and (marker-position mark) (copy-marker mark)))
-   mark-active))
+   (region-active-p)))
 
 (defun save-mark-and-excursion--restore (saved-mark-info)
   (let ((saved-mark (car saved-mark-info))
-- 
2.39.3 (Apple Git-145)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-18 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-14 15:52 bug#70384: [PATCH] 30.0.50; save-mark-and-excursion breaks with tmm disabled Paul Nelson
2024-04-18 11:04 ` Eli Zaretskii
2024-04-18 13:26   ` Paul Nelson
2024-04-18 13:55   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-18 14:20     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.