unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `inhibit-mark-movement'
@ 2004-12-08  0:56 Paul Pogonyshev
  2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Paul Pogonyshev @ 2004-12-08  0:56 UTC (permalink / raw)


In Transient Mark mode commands that use `inhibit-mark-movement'
variable have one more desirable (to me, at least) behaviour:

    When in transient mark mode and the mark is active, don't
    move it.  If the mark is inactive, do move it.

The latter is useful because it enable popping to the position
where command was invoked.

In other words, I'd like these two scenarios be possible
simultaneously (in Transient Mark mode):

    1. Select text from point to the end of function: C-SPC C-M-e

    2. Glance at buffer beginning and go back: M-< C-u C-SPC

We could make any non-nil and non-t value activate the descrubed
behaviour.  Will a patch for this be accepted?  Maybe
`inhibit-mark-movement' should also be made customizable?

Paul

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

* Re: `inhibit-mark-movement'
  2004-12-08  0:56 `inhibit-mark-movement' Paul Pogonyshev
@ 2004-12-08  3:08 ` Stefan Monnier
  2004-12-08 15:40   ` `inhibit-mark-movement' Paul Pogonyshev
  2004-12-08  3:29 ` `inhibit-mark-movement' Juri Linkov
  2004-12-08  3:46 ` `inhibit-mark-movement' Juri Linkov
  2 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2004-12-08  3:08 UTC (permalink / raw)
  Cc: emacs-devel

> In other words, I'd like these two scenarios be possible
> simultaneously (in Transient Mark mode):

>     1. Select text from point to the end of function: C-SPC C-M-e

>     2. Glance at buffer beginning and go back: M-< C-u C-SPC

I don't understand: just turning on transient-mark-mode, I get exactly
this behavior.  No need to fiddle with inhibit-mark-movement.
What am I missing?


        Stefan

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

* Re: `inhibit-mark-movement'
  2004-12-08  0:56 `inhibit-mark-movement' Paul Pogonyshev
  2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
@ 2004-12-08  3:29 ` Juri Linkov
  2004-12-08  3:46 ` `inhibit-mark-movement' Juri Linkov
  2 siblings, 0 replies; 15+ messages in thread
From: Juri Linkov @ 2004-12-08  3:29 UTC (permalink / raw)
  Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:
> In Transient Mark mode commands that use `inhibit-mark-movement'
> variable have one more desirable (to me, at least) behaviour:
>
>     When in transient mark mode and the mark is active, don't
>     move it.  If the mark is inactive, do move it.
>
> The latter is useful because it enable popping to the position
> where command was invoked.

I already encountered the same problem some time ago.  I fixed it as
below and really like this.  It makes use of transient-mark-mode
more natural: the mark should not be changed when it is active.
If there is a need to set a new mark when the mark is already
active, it's possible to deactivates the current region with C-g,
and set a new mark.

I could install the patch if everyone agrees.

Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.669
diff -u -r1.669 simple.el
--- lisp/simple.el	3 Dec 2004 22:26:13 -0000	1.669
+++ lisp/simple.el	8 Dec 2004 03:17:27 -0000
@@ -659,8 +663,10 @@
 Don't use this command in Lisp programs!
 \(goto-char (point-min)) is faster and avoids clobbering the mark."
   (interactive "P")
-  (unless (or inhibit-mark-movement (consp arg))
-    (push-mark))
+  (or inhibit-mark-movement
+      (consp arg)
+      (and transient-mark-mode mark-active)
+      (push-mark))
   (let ((size (- (point-max) (point-min))))
     (goto-char (if (and arg (not (consp arg)))
 		   (+ (point-min)
@@ -683,8 +689,10 @@
 Don't use this command in Lisp programs!
 \(goto-char (point-max)) is faster and avoids clobbering the mark."
   (interactive "P")
-  (unless (or inhibit-mark-movement (consp arg))
-    (push-mark))
+  (or inhibit-mark-movement
+      (consp arg)
+      (and transient-mark-mode mark-active)
+      (push-mark))
   (let ((size (- (point-max) (point-min))))
     (goto-char (if (and arg (not (consp arg)))
 		   (- (point-max)

Index: lisp/emacs-lisp/lisp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp.el,v
retrieving revision 1.58
diff -u -r1.58 lisp.el
--- lisp/emacs-lisp/lisp.el	12 Oct 2004 16:05:55 -0000	1.58
+++ lisp/emacs-lisp/lisp.el	8 Dec 2004 03:22:13 -0000
@@ -191,9 +192,11 @@
 If variable `beginning-of-defun-function' is non-nil, its value
 is called as a function to find the defun's beginning."
   (interactive "p")
-  (and (eq this-command 'beginning-of-defun)
-       (or inhibit-mark-movement (eq last-command 'beginning-of-defun)
-           (push-mark)))
+  (or inhibit-mark-movement
+      (not (eq this-command 'beginning-of-defun))
+      (eq last-command 'beginning-of-defun)
+      (and transient-mark-mode mark-active)
+      (push-mark))
   (and (beginning-of-defun-raw arg)
        (progn (beginning-of-line) t)))
 
@@ -242,9 +245,11 @@
 If variable `end-of-defun-function' is non-nil, its value
 is called as a function to find the defun's end."
   (interactive "p")
-  (and (eq this-command 'end-of-defun)
-       (or inhibit-mark-movement (eq last-command 'end-of-defun)
-           (push-mark)))
+  (or inhibit-mark-movement
+      (not (eq this-command 'end-of-defun))
+      (eq last-command 'end-of-defun)
+      (and transient-mark-mode mark-active)
+      (push-mark))
   (if (or (null arg) (= arg 0)) (setq arg 1))
   (if end-of-defun-function
       (if (> arg 0)

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-08  0:56 `inhibit-mark-movement' Paul Pogonyshev
  2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
  2004-12-08  3:29 ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-08  3:46 ` Juri Linkov
  2 siblings, 0 replies; 15+ messages in thread
From: Juri Linkov @ 2004-12-08  3:46 UTC (permalink / raw)
  Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:
> I'd like these two scenarios be possible simultaneously (in
> Transient Mark mode):
>
>     1. Select text from point to the end of function: C-SPC C-M-e
>
>     2. Glance at buffer beginning and go back: M-< C-u C-SPC

You can achieve the desired result with 3 more keys:

 1. Select text from point to the end of function: C-SPC C-M-e

 2. Glance at buffer beginning and go back: C-g M-< C-u C-SPC C-x C-x
                                            ===               === ===

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
@ 2004-12-08 15:40   ` Paul Pogonyshev
  2004-12-08 16:59     ` `inhibit-mark-movement' Stefan Monnier
  2004-12-08 17:59     ` `inhibit-mark-movement' Juri Linkov
  0 siblings, 2 replies; 15+ messages in thread
From: Paul Pogonyshev @ 2004-12-08 15:40 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier wrote:
> > In other words, I'd like these two scenarios be possible
> > simultaneously (in Transient Mark mode):
> >
> >     1. Select text from point to the end of function: C-SPC C-M-e
> >
> >     2. Glance at buffer beginning and go back: M-< C-u C-SPC
>
> I don't understand: just turning on transient-mark-mode, I get exactly
> this behavior.  No need to fiddle with inhibit-mark-movement.
> What am I missing?

Sorry, the first scenario is wrong.  It should read this way:

	1. Select text from point to somewhere else: C-SPC C-M-e / C-n...
	   where C-M-e and C-n (or something similar) can be mixed.

What I'm trying to suggest is that commands should not modify active mark
in Transient Mark mode _by side effect_.  Commands like M-h are fine to
modify mark, because they _activate_ it.  If command is not meant to
activate mark and the mark is active, the command should not touch it at
all, because I activated mark exactly where I wanted it to be.  If the
mark is inactive, commands can alter it, because this is not intrusive
for Transient Mark mode users and is useful for popping to previous mark
positions.

Juri Linkov wrote:
> I already encountered the same problem some time ago.  I fixed it as
> below and really like this.  It makes use of transient-mark-mode
> more natural: the mark should not be changed when it is active.
> If there is a need to set a new mark when the mark is already
> active, it's possible to deactivates the current region with C-g,
> and set a new mark.

I didn't try your patch, but looks like it implements exactly what I'm
trying to explain.  Except that I proposed to make this behaviour
optional.  However, this behaviour seems much more natural to me, so
maybe customization is not necessary if we don't mind surprising a few
users.

Juri Linkov wrote:
> > I'd like these two scenarios be possible simultaneously (in
> > Transient Mark mode):
> >
> >     1. Select text from point to the end of function: C-SPC C-M-e
> >
> >     2. Glance at buffer beginning and go back: M-< C-u C-SPC
>
> You can achieve the desired result with 3 more keys:
>
>  1. Select text from point to the end of function: C-SPC C-M-e
>
>  2. Glance at buffer beginning and go back: C-g M-< C-u C-SPC C-x C-x
>                                             ===               === ===

Yes, you are right, but I meant "simultaneously" in that sense that
I don't want to evaluate `(setq inhibit-mark-movement ...)' before
realization of either of scenarios.

Paul

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

* Re: `inhibit-mark-movement'
  2004-12-08 15:40   ` `inhibit-mark-movement' Paul Pogonyshev
@ 2004-12-08 16:59     ` Stefan Monnier
  2004-12-08 17:59     ` `inhibit-mark-movement' Juri Linkov
  1 sibling, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2004-12-08 16:59 UTC (permalink / raw)
  Cc: Juri Linkov, emacs-devel

> What I'm trying to suggest is that commands should not modify active mark
> in Transient Mark mode _by side effect_.  Commands like M-h are fine to
> modify mark, because they _activate_ it.  If command is not meant to
> activate mark and the mark is active, the command should not touch it at
> all, because I activated mark exactly where I wanted it to be.  If the
> mark is inactive, commands can alter it, because this is not intrusive
> for Transient Mark mode users and is useful for popping to previous mark
> positions.

That sounds right.  And IIUC this change would only affect users of
transient-mark-mde, i.e. users who are likely to actually immediately *see*
when the behavior is different from what they expect.


        Stefan

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

* Re: `inhibit-mark-movement'
  2004-12-08 15:40   ` `inhibit-mark-movement' Paul Pogonyshev
  2004-12-08 16:59     ` `inhibit-mark-movement' Stefan Monnier
@ 2004-12-08 17:59     ` Juri Linkov
  2004-12-08 19:22       ` `inhibit-mark-movement' Stefan Monnier
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2004-12-08 17:59 UTC (permalink / raw)
  Cc: monnier, emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:
> What I'm trying to suggest is that commands should not modify active
> mark in Transient Mark mode _by side effect_.  Commands like M-h are
> fine to modify mark, because they _activate_ it.

Yes, such commands are fine to modify mark.  But they should not
_reset_ it.  If I have selected a few words with M-@ in
transient-mark-mode, and have adjusted the beginning of the region
with a simple point movement command, I expect that the next M-@ will
continue to extend the region at its end, not to start a new one as it
currently does if consecutive commands are not the same.

Just a few days ago I looked at mark activation commands, and fixed
them (`mark-word', `mark-sexp', `mark-paragraph', `mark-defun') to
support transient-mark-mode.  The patch is below.  It could be
installed as well.

> I didn't try your patch, but looks like it implements exactly what
> I'm trying to explain.  Except that I proposed to make this
> behaviour optional.  However, this behaviour seems much more natural
> to me, so maybe customization is not necessary if we don't mind
> surprising a few users.

Very likely this behavior is what most users of transient-mark-mode
would expect.

Index: lisp/emacs-lisp/lisp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp.el,v
retrieving revision 1.58
diff -u -r1.58 lisp.el
--- lisp/emacs-lisp/lisp.el	12 Oct 2004 16:05:55 -0000	1.58
+++ lisp/emacs-lisp/lisp.el	8 Dec 2004 17:32:50 -0000
@@ -76,7 +76,8 @@
 If this command is repeated, it marks the next ARG sexps after the ones
 already marked."
   (interactive "P")
-  (cond ((and (eq last-command this-command) (mark t))
+  (cond ((or (and (eq last-command this-command) (mark t))
+	     (and transient-mark-mode mark-active))
 	 (setq arg (if arg (prefix-numeric-value arg)
 		     (if (> (mark) (point)) 1 -1)))
 	 (set-mark
@@ -292,7 +297,8 @@
 If this command is repeated, marks more defuns after the ones
 already marked."
   (interactive)
-  (cond ((and (eq last-command this-command) (mark t))
+  (cond ((or (and (eq last-command this-command) (mark t))
+	     (and transient-mark-mode mark-active))
 	 (set-mark
 	  (save-excursion
 	    (goto-char (mark))

Index: lisp/textmodes/paragraphs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/paragraphs.el,v
retrieving revision 1.75
diff -u -r1.75 paragraphs.el
--- lisp/textmodes/paragraphs.el	9 Oct 2004 18:49:01 -0000	1.75
+++ lisp/textmodes/paragraphs.el	8 Dec 2004 17:16:52 -0000
@@ -363,7 +363,8 @@
   (unless arg (setq arg 1))
   (when (zerop arg)
     (error "Cannot mark zero paragraphs"))
-  (cond ((and (eq last-command this-command) (mark t))
+  (cond ((or (and (eq last-command this-command) (mark t))
+	     (and transient-mark-mode mark-active))
 	 (set-mark
 	  (save-excursion
 	    (goto-char (mark))

Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.669
diff -u -r1.669 simple.el
--- lisp/simple.el	3 Dec 2004 22:26:13 -0000	1.669
+++ lisp/simple.el	8 Dec 2004 17:37:26 -0000
@@ -3528,7 +3600,8 @@
 If this command is repeated, it marks the next ARG words after the ones
 already marked."
   (interactive "p")
-  (cond ((and (eq last-command this-command) (mark t))
+  (cond ((or (and (eq last-command this-command) (mark t))
+	     (and transient-mark-mode mark-active))
 	 (set-mark
 	  (save-excursion
 	    (goto-char (mark))

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-08 17:59     ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-08 19:22       ` Stefan Monnier
  2004-12-09  1:48         ` `inhibit-mark-movement' Juri Linkov
  2004-12-17 16:11         ` `inhibit-mark-movement' Juri Linkov
  0 siblings, 2 replies; 15+ messages in thread
From: Stefan Monnier @ 2004-12-08 19:22 UTC (permalink / raw)
  Cc: emacs-devel, Paul Pogonyshev

> Just a few days ago I looked at mark activation commands, and fixed
> them (`mark-word', `mark-sexp', `mark-paragraph', `mark-defun') to
> support transient-mark-mode.  The patch is below.  It could be
> installed as well.

I wouldn't call that "fix", rather "change".  It's not like the current
behavior is clearly broken and your suggested new one is The Right Way.

Maybe your new behavior is overall preferable, I don't know, but I do know
that it would surprise me (I use transient-mark-mode and M-C-SPC pretty
heavily).


        Stefan

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

* Re: `inhibit-mark-movement'
  2004-12-08 19:22       ` `inhibit-mark-movement' Stefan Monnier
@ 2004-12-09  1:48         ` Juri Linkov
  2004-12-13 19:51           ` `inhibit-mark-movement' Richard Stallman
  2004-12-17 16:11         ` `inhibit-mark-movement' Juri Linkov
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2004-12-09  1:48 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I wouldn't call that "fix", rather "change".  It's not like the current
> behavior is clearly broken and your suggested new one is The Right Way.
>
> Maybe your new behavior is overall preferable, I don't know, but I do know
> that it would surprise me (I use transient-mark-mode and M-C-SPC pretty
> heavily).

Yes, it's rather change than a fix, but I believe it is a change
for the better.

It's too bad when M-C-SPC deactivates the marked region if a previous
command is not a M-C-SPC, but some other point movement command used
to change the beginning of the marked region.

Currently M-C-SPC starts marking a new region even in the region is
active.  But to start a new region it is possible to deactivate the
current region with C-g, and start a new marking.  So it's not
a problem.  There was no release where consequent marking commands
extend the region.  So it's not too late to change this behavior.

This change also allows to do such useful things as switching the
direction of the region marking, i.e. M-C-SPC C-x C-x M-C-SPC M-C-SPC
and it continues extending the region in the reverse direction towards
the beginning of the buffer.  Another C-x C-x M-C-SPC and it continues
extending the marked region forwards again.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-09  1:48         ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-13 19:51           ` Richard Stallman
  2004-12-13 23:17             ` `inhibit-mark-movement' Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2004-12-13 19:51 UTC (permalink / raw)
  Cc: emacs-devel, monnier, pogonyshev


    Currently M-C-SPC starts marking a new region even in the region is
    active.  But to start a new region it is possible to deactivate the
    current region with C-g, and start a new marking.  So it's not
    a problem.  There was no release where consequent marking commands
    extend the region.  So it's not too late to change this behavior.

    This change also allows to do such useful things as switching the
    direction of the region marking, i.e. M-C-SPC C-x C-x M-C-SPC M-C-SPC
    and it continues extending the region in the reverse direction towards
    the beginning of the buffer.  Another C-x C-x M-C-SPC and it continues
    extending the marked region forwards again.

It sounds like a good change.  Stefan, are you convinced?

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

* Re: `inhibit-mark-movement'
  2004-12-13 19:51           ` `inhibit-mark-movement' Richard Stallman
@ 2004-12-13 23:17             ` Stefan Monnier
  2004-12-14 10:55               ` `inhibit-mark-movement' Juri Linkov
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2004-12-13 23:17 UTC (permalink / raw)
  Cc: Juri Linkov, emacs-devel, pogonyshev

>     Currently M-C-SPC starts marking a new region even in the region is
>     active.  But to start a new region it is possible to deactivate the
>     current region with C-g, and start a new marking.  So it's not
>     a problem.  There was no release where consequent marking commands
>     extend the region.  So it's not too late to change this behavior.

>     This change also allows to do such useful things as switching the
>     direction of the region marking, i.e. M-C-SPC C-x C-x M-C-SPC M-C-SPC
>     and it continues extending the region in the reverse direction towards
>     the beginning of the buffer.  Another C-x C-x M-C-SPC and it continues
>     extending the marked region forwards again.

> It sounds like a good change.  Stefan, are you convinced?

Not really, but I don't think my opinion should have any special value here.
I'm after all not the typical user and I'm biased because I've gotten used
to the current behavior.  If people like it, go for it.  I might even end up
liking it as well, who knows.


        Stefan

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

* Re: `inhibit-mark-movement'
  2004-12-13 23:17             ` `inhibit-mark-movement' Stefan Monnier
@ 2004-12-14 10:55               ` Juri Linkov
  2004-12-14 11:24                 ` `inhibit-mark-movement' Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2004-12-14 10:55 UTC (permalink / raw)
  Cc: emacs-devel, rms, pogonyshev

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> It sounds like a good change.  Stefan, are you convinced?
>
> Not really, but I don't think my opinion should have any special value here.
> I'm after all not the typical user and I'm biased because I've gotten used
> to the current behavior.  If people like it, go for it.  I might even end up
> liking it as well, who knows.

I noticed that in one half of situations I needed to start a new
region with M-C-SPC, in another half to extend the active region.
But while starting a new region is easy after C-g or C-SPC, extending
the existing region was not possible at all.  It is too inconvenient
to start from scratch when the last command was not M-C-SPC, and to
repeat a sequence of M-C-SPC to restore the previous region before
continuing to extend it further.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-14 10:55               ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-14 11:24                 ` Stefan Monnier
  0 siblings, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2004-12-14 11:24 UTC (permalink / raw)
  Cc: emacs-devel, rms, pogonyshev

> I noticed that in one half of situations I needed to start a new
> region with M-C-SPC, in another half to extend the active region.
> But while starting a new region is easy after C-g or C-SPC, extending
> the existing region was not possible at all.

Huh?  Just do C-x C-x and then C-M-f or C-M-b (instead of C-M-SPC) as needed.
E.g.:  C-M-SPC C-M-SPC M-b C-x C-x C-M-f C-M-f

I'm not claiming it's more convenient, just pointing out that it can be done
in a way that's not particularly inconvenient (e.g. I use it every once
in a while, tho it's mostly when I've hit C-M-SPC too many times and need to
step back a bit).


        Stefan

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

* Re: `inhibit-mark-movement'
  2004-12-08 19:22       ` `inhibit-mark-movement' Stefan Monnier
  2004-12-09  1:48         ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-17 16:11         ` Juri Linkov
  2004-12-20 10:56           ` `inhibit-mark-movement' Richard Stallman
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2004-12-17 16:11 UTC (permalink / raw)


There is another issue related to active marks in Transient Mark mode,
which I believe is a bug: C-u C-SPC behaves differently when the
mark ring is empty and when it is not.  With the non-empty mark ring
C-u C-SPC deactivates the mark when the mark is active.  This is good.
But when the mark ring is empty C-u C-SPC doesn't deactivate the mark.
Such behaviour is unexpected since the state of the mark ring is
irrelevant to that operation.  I propose the following fix for `pop-mark'
which deactivates the active mark regardless of the state of the
mark ring:

Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.672
diff -u -r1.672 simple.el
--- lisp/simple.el	14 Dec 2004 12:17:43 -0000	1.672
+++ lisp/simple.el	17 Dec 2004 15:50:29 -0000
@@ -2945,10 +3013,10 @@
   (when mark-ring
     (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker)))))
     (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
-    (deactivate-mark)
     (move-marker (car mark-ring) nil)
     (if (null (mark t)) (ding))
-    (setq mark-ring (cdr mark-ring))))
+    (setq mark-ring (cdr mark-ring)))
+  (deactivate-mark))
 
 (defalias 'exchange-dot-and-mark 'exchange-point-and-mark)
 (defun exchange-point-and-mark (&optional arg)

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: `inhibit-mark-movement'
  2004-12-17 16:11         ` `inhibit-mark-movement' Juri Linkov
@ 2004-12-20 10:56           ` Richard Stallman
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Stallman @ 2004-12-20 10:56 UTC (permalink / raw)
  Cc: emacs-devel

      I propose the following fix for `pop-mark'
    which deactivates the active mark regardless of the state of the
    mark ring:

It seems right to me.  Thanks.

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

end of thread, other threads:[~2004-12-20 10:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-08  0:56 `inhibit-mark-movement' Paul Pogonyshev
2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
2004-12-08 15:40   ` `inhibit-mark-movement' Paul Pogonyshev
2004-12-08 16:59     ` `inhibit-mark-movement' Stefan Monnier
2004-12-08 17:59     ` `inhibit-mark-movement' Juri Linkov
2004-12-08 19:22       ` `inhibit-mark-movement' Stefan Monnier
2004-12-09  1:48         ` `inhibit-mark-movement' Juri Linkov
2004-12-13 19:51           ` `inhibit-mark-movement' Richard Stallman
2004-12-13 23:17             ` `inhibit-mark-movement' Stefan Monnier
2004-12-14 10:55               ` `inhibit-mark-movement' Juri Linkov
2004-12-14 11:24                 ` `inhibit-mark-movement' Stefan Monnier
2004-12-17 16:11         ` `inhibit-mark-movement' Juri Linkov
2004-12-20 10:56           ` `inhibit-mark-movement' Richard Stallman
2004-12-08  3:29 ` `inhibit-mark-movement' Juri Linkov
2004-12-08  3:46 ` `inhibit-mark-movement' Juri Linkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).