emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] Why are maps declared with defconst?


From: Yoni Rabkin
Subject: Re: [emms-help] Why are maps declared with defconst?
Date: Fri, 29 Dec 2017 14:27:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Pierre Neidhardt <address@hidden> writes:

> Do you mean the following?
>
>      (defvar my-mode-map nil
>        DOCSTRING)
>      (unless my-mode-map
>        (let ((map (make-sparse-keymap)))
>          (define-key map "\C-c\C-a" 'my-command)
>          ...
>          (setq my-mode-map map)))
>

yup

Personally, I can take it or leave it since it is obviously a kludge to
move the docstring closer to where it makes sense.

So moving to defvar with this or with the old style both sound fine to
me.

-- 
   "Cut your own wood and it will warm you twice"



reply via email to

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