help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Caps-mode vs. Overwrite mode


From: Dan Espen
Subject: Re: Caps-mode vs. Overwrite mode
Date: Fri, 03 Apr 2015 11:21:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Dan Espen <address@hidden>
>> Date: Fri, 03 Apr 2015 10:47:03 -0400
>> 
>> Stefan Monnier <address@hidden> writes:
>> 
>> >> When I toggle caps-mode on, overwrite mode stops working.
>> >> That is, inserted characters insert instead of overwriting.
>> >> Any hints?
>> >
>> > The caps-mode.el that's in GNU ELPA shouldn't suffer from this
>> > problem, AFAIK.
>> 
>> My first search only turns up caps-lock.el?
>> 
>> Works better than caps-mode, but does type lower case
>> when the shift key is used.  I can live with that I think,
>> might even learn to like it.
>
> How do you even get caps-mode to work?  If I type any self-inserting
> character after turning on caps-mode, I get an error:
>
>   insert-char: Symbol's value as variable is void: last-command-char

Good question.
My copy has the same author and version number, but it uses
last-command-event:

(defun caps-mode-self-insert-command (&optional n)
  "Like `self-insert-command', but uppercase the the typed character."
  (interactive "p")
  (message "insert")
  (insert-char (upcase last-command-event) n))


Not sure if I made that change or I got my copy somewhere else.


-- 
Dan Espen


reply via email to

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