Gnus development mailing list
 help / color / mirror / Atom feed
From: Christoph Conrad <christoph.conrad@gmx.de>
Subject: Wrapper for setting process marks
Date: 04 Feb 2001 10:05:44 +0100	[thread overview]
Message-ID: <m3pugy6co1.fsf@gmx.de> (raw)

Hi!

for me it's very inconvenient to have two bindings for setting process
marks, i.e.

#   `gnus-summary-mark-as-processable'
M-# `gnus-summary-unmark-as-processable'

M P g `gnus-uu-unmark-region'
M P r `gnus-uu-mark-region'

so i wrapped them with a defadvice for the simpler of the two
keybindings. Maybe this could be build into Gnus, or does anyone see
problems?

;; maybe `gnus-region-active-p' (gnus-ems.el) is sufficient here??
(defun region-active-p()
  (or (and (boundp 'zmacs-region-active-p)
           zmacs-region-active-p)
      (and (boundp 'transient-mark-mode)
           transient-mark-mode mark-active)))

(defadvice gnus-summary-mark-as-processable
  ( around gnus-summary-mark-as-processable-ad activate compile )
  (if (region-active-p)
      (gnus-uu-mark-region (region-beginning) (region-end))
    ad-do-it ))

(defadvice gnus-summary-unmark-as-processable
  ( around gnus-summary-unmark-as-processable-ad activate compile )
  (if (region-active-p)
      (gnus-uu-unmark-region (region-beginning) (region-end))
    ad-do-it ))


Best regards,
cu, -cc-
-- 
=> GNU Emacs Webring @ <http://www.gnusoftware.com/WebRing/> <=
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!



             reply	other threads:[~2001-02-04  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-04  9:05 Christoph Conrad [this message]
2001-02-04 11:14 ` Christoph Conrad
2001-02-05  4:45 ` ShengHuo ZHU

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=m3pugy6co1.fsf@gmx.de \
    --to=christoph.conrad@gmx.de \
    /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.
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 NNTP newsgroup(s).