GNU bug report logs -
#7737
23.2.91; interactive code "r" error
Previous Next
Full log
Message #10 received at 7737 <at> debbugs.gnu.org (full text, mbox):
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
> the interactive code "r" return an annoying error when the mark have not
> been set at least one time in current-buffer.
>
> ,----
> | The mark is not set now, so there is no region
> `----
>
> To reproduce use a code similar to this, use a new buffer where you
> didn't set the mark (mark and unmark don't count)
>
> (defun tv-delete-char (beg end arg)
> (interactive "r\np") ; [1]
> (if (and transient-mark-mode mark-active (/= (mark t) (point)))
> (delete-region beg end)
> (delete-char arg)))
> ;;==> The mark is not set now, so there is no region
>
> When the mark have been set/unset at least one time, the code above work
> as expected.
(I'm going through old bug reports that unfortunately got no response at
the time.)
I'm not sure I understand this bug report. If no mark has been set,
there is no region, so of course a command like this should signal an
error. Is the request that there should be a variant of "r" that
doesn't signal an error, but just leaves the parameters as nil?
If so, I'm not sure that's really all that useful. Anybody got any
opinions here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.