emacs-devel
[Top][All Lists]
Advanced

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

RE: [patch] minor patch for register.el


From: Drew Adams
Subject: RE: [patch] minor patch for register.el
Date: Wed, 20 Feb 2013 15:15:25 -0800

> > Adds functions `register-insertable-p', 
> > `register-jumpable-p', and `register-printable-p'.
> 
> Why are these needed?  The text description of the change sounds good,
> but the corresponding code ends up duplicating a lot of 
> `cond' code with no obvious direct benefit.

General predicates usable elsewhere also.
Unified error msg if register does not satisfy the predicate.

> Using cl-assert indeed sounds wrong.  It should probably be
> a user-error instead.

And the same error msg is appropriate even for cases where `registerv-p' is not
true.

> But what is the benefit of moving the test?

Moving what test?  Doing a `get-register' test outside the cond?  Testing
jumpability outside the cond?  In both cases: to raise the right error msg.

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".
Dunno whether that msg is really appropriate for `file' or `file-query'.  But
even if it is, the real error in this case is that `w' is not a register.

Do you want a patch with a change that indents the cond clauses as before and
uses `user-error' instead of `error'?  Or do you prefer to make whatever changes
you want yourself?




reply via email to

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