all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Richard Stallman <rms@gnu.org>,
	emacs-devel@gnu.org, rutt+news@cis.ohio-state.edu
Subject: Re: [rutt+news@cis.ohio-state.edu: [patch] factor out comment-or-uncomment feature from comment-dwim]
Date: 10 Apr 2002 23:39:51 +0200	[thread overview]
Message-ID: <5xk7rfp714.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <5xpu17p7on.fsf@kfs2.cua.dk>

storm@cua.dk (Kim F. Storm) writes:

> What about this modification to set-mark-command which simply turns on
> transient-mark-command (temporarily) if you repeat C-SPC immediately.
> If you move the mark with another C-SPC, transient-mark-mode is
> turned off again (enter another C-SPC to reenable it):
> 
> (defun set-mark-command (arg)
>   (interactive "P")
>   (if (null arg)
>       (if (eq this-command last-command)
>           (setq transient-mark-mode 'lambda)
>         (setq transient-mark-mode nil)
> 	(push-mark nil nil t))
>     (if (null (mark t))
> 	(error "No mark set in this buffer")
>       (goto-char (mark t))
>       (pop-mark))))
> 

This will disturb users who does use transient-mark-mode.
A proper definition would be:

(defun set-mark-command (arg)
  (interactive "P")
  (if (null arg)
      (if (eq this-command last-command)
          (if (not transient-mark-mode)
              (setq transient-mark-mode 'lambda))
        (if (eq transient-mark-mode 'lambda)
            (setq transient-mark-mode nil))
        (push-mark nil nil t))
    (if (null (mark t))
        (error "No mark set in this buffer")
      (goto-char (mark t))
      (pop-mark))))

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

      parent reply	other threads:[~2002-04-10 21:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200204072343.g37NhcO20159@aztec.santafe.edu>
2002-04-08 22:13 ` [rutt+news@cis.ohio-state.edu: [patch] factor out comment-or-uncomment feature from comment-dwim] Stefan Monnier
2002-04-09  0:18   ` Benjamin Rutt
2002-04-09  9:33   ` Kai Großjohann
2002-04-10 14:23   ` Richard Stallman
2002-04-10 16:36     ` Stefan Monnier
2002-04-10 21:25       ` Kim F. Storm
2002-04-10 20:39         ` Stefan Monnier
2002-04-10 21:18         ` Kai Großjohann
2002-04-11  9:37           ` Kim F. Storm
2002-04-11  9:48             ` Francesco Potorti`
2002-04-11 11:49               ` Kim F. Storm
2002-04-11 13:05             ` Stefan Monnier
2002-04-12  3:12             ` Richard Stallman
2002-04-12  9:45               ` Kim F. Storm
2002-04-12 18:46                 ` Stefan Monnier
2002-04-13 19:06                 ` Richard Stallman
2002-04-14 21:32                   ` Kim F. Storm
2002-04-16 20:18                     ` Richard Stallman
2002-04-10 21:39         ` Kim F. Storm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xk7rfp714.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=rutt+news@cis.ohio-state.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.