On 2009-01-09 06:22 +0100, Reid Priedhorsky wrote: > On 01/02/09 01:24, Sven Joachim wrote: >> > The original reasoning was to make Meta-H give help rather than > Control-H. The context in my .emacs is: > > (global-set-key "\M-h" 'help-command) > (setq help-char "\M-h") > (global-set-key "\C-h" 'delete-backward-char) > > ... which I originally put in a dozen years ago, under Emacs 19. I > don't recall doing it (obviously), but even my teenage self wouldn't > have done it by trial and error; the config would have been based on > documentation somewhere.
Certainly not in the official documentation, though. The Emacs manual for version 19.34 does not mention help-char at all, and the Lisp reference manual does not contain anything that suggests the bad setq statement in your .emacs. > The only reason I hesitate about closing the bug is that the error > message is so far removed from the source of the problem and so > opaque. Ideally the setq line should fail, though I don't know how > hard that is to implement in elisp. It is really impossible to this checking in setq, given that you don't need to declare variables in Lisp and many variables can obtain reasonable values of different types. Such a safety net is now available (it wasn't at in Emacs 19) if you use customize to change variables. Changing variables through other means (i.e. with setq) expects you to read the docstring of the variable and make sure to use an adequate type yourself. > I would never connect the string > "\350" (which shows up to me as a lowercase e with an accent above it) > to the sequence "\M-h", and nothing about the error message or the > context seemed to have anything to do with the help character. > > IOW, I'd say there's a usability bug here due to the violation of the > principle of least surprise. The Emacs Lisp reference manual says in the section "Type Predicates": ,---- | The Emacs Lisp interpreter itself does not perform type checking on the | actual arguments passed to functions when they are called. It could | not do so, since function arguments in Lisp do not have declared data | types, as they do in other programming languages. It is therefore up to | the individual function to test whether each actual argument belongs to | a type that the function can use. | | All built-in functions do check the types of their actual arguments | when appropriate, and signal a `wrong-type-argument' error if an | argument is of the wrong type. `---- In your case, it is the `=' function that is called deep inside ispell-command-loop which signals the error. While doing the type checking at a higher level would have given a better error message in your case, it would also bloat the code for little gain. Cheers, Sven -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org