The following .emacs
file works as expected, so long as I invoke emacs the "normal" way (ie by launching the emacs
executable directly).
(global-unset-key (kbd "C-]"))
(global-set-key (kbd "H-C-]") 'abort-recursive-edit)
(define-key local-function-key-map (kbd "C-]") 'event-apply-hyper-modifier)
But when I start emacs via emacsclient -n -c -a ""
, the value of local-function-key-map
gets overwritten somewhere along the way. I have used print statements to make sure that my .emacs
file is getting run, and that the value of local-function-key-map
gets updated. But by the time I land in the *scratch*
buffer, my binding is missing from local-function-key-map
.
Has anyone experienced this before, or knows a reason why local-function-key-map
would get clobbered when starting emacs via emacsclient
?
I am running emacs-25.1 on CentOS 7
-functions
instead of-hook
. Any idea if there is a reason for the difference? Or is it random? – nispio Mar 10 '17 at 16:58(elisp) Hooks
: "If the hook variable’s name does not end with-hook
, that indicates it is probably an “abnormal hook”. That means the hook functions are called with arguments, or their return values are used in some way. The hook’s documentation says how the functions are called. You can useadd-hook
to add a function to an abnormal hook, but you must write the function to follow the hook’s calling convention. By convention, abnormal hook names end in-functions
." – phils Mar 10 '17 at 20:33