Search code examples
emacscommand

Emacs doesn't evaluate all expressions at neither init.el nor .emacs, and emacs doesn't seem to record changes in .emacs either init.el


All the time, when I try to C-backspace, it returning message: command-execute: Wrong type argument: commandp, hixac/backward-kill-word

(defun hixac/backward-kill-word ()
  "Remove all whitespace if the character behind the cursor is whitespace, otherwise remove a word."
  (interactive)
  (if (looking-back "[ \n]")
      ;; delete horizontal space before us and then check to see if we
      ;; are looking at a newline
      (progn (delete-horizontal-space 't)
             (while (looking-back "[ \n]")
               (backward-delete-char 1)))
    ;; otherwise, just do the normal kill word.
    (backward-kill-word 1)))

(global-set-key (kbd "C-<backspace>") 'hixac/backward-kill-word)

I have no idea how to deal with it.

I tried to change various keybindings I tried [C-backspace] and (kbd "C-\d") and others.. Something has been worked but after restarting emacs returns to it previous state with above error.


Solution

  • I fixed error. Emacs actually didn't evaluate ".emacs" either "init.el" file it's actually evaluated ".emacs.elc" the file of compiled version of old ".emacs".

    It is very confuse behavior and I spent at fixing it a lot of time.

    And afterall I can say that ".emacs.elc" has a higher priority unlike ".emacs" for god's sake.