help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DWIM region


From: Emanuel Berg
Subject: Re: DWIM region
Date: Sat, 06 Jan 2018 21:29:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I'm starting to think this method in general
has a positive impact not only on the hybrid
interface but also on the function body...

Here is another function, one I suspect is
somewhere in vanilla Gnus as well, but what the
heck.

Anyway don't be confused by the word "mark"
here where we previously have been talking
about `mark' and regions - here, "mark" is in
the `gnus-summary-mark-article' sense...

BTW In Australian Survivor S4 there was an
ex-elite soldier named Mark. He is also
completely unrelated :)

(defun gnus-summary-mark (char start stop)
  (interactive
   (let ((c (read-char "mark: ")))
     (if (use-region-p)
         (list c (region-beginning) (region-end))
       (let*((strt (point))
             (stp  (1+ strt)) )
         (list c strt stp) ))))
  (goto-char start)
  (beginning-of-line)
  (while (< (point) stop)
    (gnus-summary-mark-article (gnus-summary-article-number) char)
    (gnus-summary-find-next) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]