From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34544 Path: main.gmane.org!not-for-mail From: Christoph Conrad Newsgroups: gmane.emacs.gnus.general Subject: Wrapper for setting process marks Date: 04 Feb 2001 10:05:44 +0100 Organization: Gnus Information Center Sender: owner-ding@hpc.uh.edu Message-ID: Reply-To: Christoph Conrad NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035170451 30982 80.91.224.250 (21 Oct 2002 03:20:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:20:51 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id 14D79D049D for ; Sun, 4 Feb 2001 04:10:33 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id DAC21832; Sun, 4 Feb 2001 03:09:01 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 04 Feb 2001 03:08:14 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id DAA18267 for ; Sun, 4 Feb 2001 03:08:04 -0600 (CST) Original-Received: from quimby.gnus.org (quimby.gnus.org [195.204.10.139]) by mailhost.sclp.com (Postfix) with ESMTP id B9347D049D for ; Sun, 4 Feb 2001 04:08:31 -0500 (EST) Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id KAA06197 for ding@gnus.org; Sun, 4 Feb 2001 10:08:48 +0100 (CET) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-NNTP-Posting-Host: ab116.pppool.de Original-X-Trace: quimby.gnus.org 981277727 24627 213.6.177.22 (4 Feb 2001 09:08:47 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 4 Feb 2001 09:08:47 GMT X-Public-Key: http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x1B488DEA User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 41 Xref: main.gmane.org gmane.emacs.gnus.general:34544 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34544 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 @ <= 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...!