Since I use Emacs 24, I always get error when I try to find where a symbol
occurs with semantic-symref-symbol. The details are:
- I push some key to call
semantic-symref-symbolwhen the cursor is on some symbol of my source file, then I get a list that describes where the symbol occurs in*Symrefbuffer. On a entry of the list, I push
SPACEorRETURNkey, it jump to the right place, but at the same time, Emacs popup*Backtrace*buffer in other window. Its content is as below:Debugger entered--Lisp error: (void-variable last-command-char) semantic-symref-rb-goto-match(#<overlay from 97 to 126 in *Symref stateStack>) push-button(97) call-interactively(push-button nil nil)Then I follow the
semantic-symref-rb-goto-matchfunction, which is defined in semantic-symref-list.el. The elisp function is defined as below:(defun semantic-symref-rb-goto-match (&optional button) "Go to the file specified in the symref results buffer. BUTTON is the button that was clicked." (interactive) (let* ((tag (button-get button 'tag)) (line (button-get button 'line)) (buff (semantic-tag-buffer tag)) (win (selected-window)) ) (switch-to-buffer-other-window buff) (goto-line line) (pulse-momentary-highlight-one-line (point)) (when (eq last-command-char ? ) (select-window win)) ) )I found the
last-command-charin the function, but I don't understand why Emacs complain that(void-variable last-command-char). It should be the key code ofspaceorreturn.
I want to know the reason and to fix this issue.
last-command-charwas removed from Emacs 24.3. It is still defined in Emacs 24.2. It is mentioned in the 24.3 NEWS:In Emacs 24.2,
C-h v last-command-charsays that it has been obsolete since at least Emacs 19.34.Please report a bug to the owner of the code.