[Top][All Lists]

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

Re: [patch] minor patch for register.el

From: Stefan Monnier
Subject: Re: [patch] minor patch for register.el
Date: Mon, 11 Mar 2013 14:01:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> But what is the benefit of moving the test?
> Moving what test?

Moving the code of the test from "inline" to separate predicate
functions (which ends up duplicating code).

> Testing jumpability outside the cond?

For example, yes.

> In both cases: to raise the right error msg.

I don't see the connection between the two.

> E.g., do this with the current code: `C-x r j w'.  The error msg you
> get is not appropriate: "Register doesn't contain a buffer position or
> configuration".

I agree that changing the message is a good idea, but rather than
duplicate (error "No such register: `%s'" ...), I'd rather add an
optional `not-empty' arg to get-register and raise the (user-)error in
there once and forall.
[ BTW, I think "register is empty" is more correct than "no such
  register".  ]

As mentioned above, I don't see how that's connected to the use of
separate predicate functions, so maybe I'm missing something.

> Do you want a patch with a change that indents the cond clauses as
> before and uses `user-error' instead of `error'?

Yes, that would be appreciated.


reply via email to

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