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: Fri, 05 Jan 2018 00:36:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier wrote:

> `mark-active` is a normal variable and you're
> perfectly allowed to use it (and modify it if
> you want). But in order to decide whether to
> use the region or not, `use-region-p` is the
> canonical way to test it (and it uses
> `mark-active` internally).
>
> It'd be very difficult for the byte-compiler
> to distinguish those uses of `mark-active`
> which would be better replaced by
> `use-region-p`.

OK!

But ironically, the new and improved function
fails on the intitial use case - which did work
when the region check was scornfully "performed
... in the body of the function"

%% how many books? (count-regexp-hits "@book")

@book{fiberglass-boat-repair-manual,
  author     = {Allan Vaitses},
  ISBN       = {0-07-156914-6},
  publisher  = {International Marine},
  title      = {The Fiberglass Boat Repair Manual},
  year       = 1988
}

@book{savage-sword-of-conan-22,
  author     = {Roy Thomas},
  ISBN       = 1616558717,
  publisher  = {Dark Horse},
  title      = {Savage Sword of Conan 22},
  year       = 2016
}

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


reply via email to

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