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 12:35:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> 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?
>
> Ah, right, that's the one.  Sorry for the typo.
>
>> Spoke too soon.
>> caps-lock mode isn't buffer local.
>
> Indeed.
>
> You can make it buffer-local with the patch below.
>
> If someone wants to submit a patch which adds buffer-local variant, that
> could be included in the GNU ELPA package.
>
>
>         Stefan
>
>
> diff --git a/packages/caps-lock/caps-lock.el b/packages/caps-lock/caps-lock.el
> index 24729a4..5787ef8 100644
> --- a/packages/caps-lock/caps-lock.el
> +++ b/packages/caps-lock/caps-lock.el
> @@ -29,10 +29,10 @@
>  ;;;###autoload
>  (define-minor-mode caps-lock-mode
>    "Make self-inserting keys invert the capitalization."
> -  :global t
> +  ;; :global t

This change gives me an error.

Debugger entered--Lisp error: (void-variable caps-lock-mode)
  (if caps-lock-mode (add-hook (quote pre-command-hook) (function
  caps-lock--pch)
  nil t) (remove-hook (quote pre-command-hook) (function caps-lock--pch) t))
  (defvar caps-lock-mode 

Without that change, the buffer local issue is fixed.

-- 
Dan Espen


reply via email to

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