Gnus development mailing list
 help / color / mirror / Atom feed
* Wrapper for setting process marks
@ 2001-02-04  9:05 Christoph Conrad
  2001-02-04 11:14 ` Christoph Conrad
  2001-02-05  4:45 ` ShengHuo ZHU
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Conrad @ 2001-02-04  9:05 UTC (permalink / 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...!



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

end of thread, other threads:[~2001-02-05  4:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-04  9:05 Wrapper for setting process marks Christoph Conrad
2001-02-04 11:14 ` Christoph Conrad
2001-02-05  4:45 ` ShengHuo ZHU

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).