thoni56 / c-xrefactory

A refactoring tool for C/Yacc and Emacs. The first tool to cross Refactory Rubicon. Initial work, and released under GPL in 2009, by Marián Vittek.
https://thoni56.github.io/c-xrefactory/
GNU General Public License v2.0
23 stars 4 forks source link

Incremental completion does not work in Emacs 25 #32

Closed thoni56 closed 6 years ago

thoni56 commented 6 years ago

Position cursor on a partial identifier and press F8 to start completion. If that was an ambiguous partial string you get a completion list. if you press a letter it should incrementally narrow the search.

In emacs 25 (maybe also emacs 24, I remember seeing this before) you get an emacs error:

Symbol’s value as variable is void: last-command-char

A backtrace on that error reveals

Debugger entered--Lisp error: (void-variable last-command-char)
    (format "%s%c" os last-command-char)
    (setq ns (format "%s%c" os last-command-char))
    (let ((ns) (os) (nns)) (setq os (car c-xref-completion-auto-search-list)) (setq ns (format "%s%c" os last-command-char)) (beginning-of-line) (c-xref-auto-search-search ns) (setq nns (car c-xref-completion-auto-search-list)) (c-xref-completion-source-mod))
    c-xref-completion-auto-search()
    funcall-interactively(c-xref-completion-auto-search)
    call-interactively(c-xref-completion-auto-search nil nil)
    command-execute(c-xref-completion-auto-search)