[Top][All Lists]

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

Re: [AUCTeX-devel] LaTeX-math-mode + isearch

From: Antoine Levitt
Subject: Re: [AUCTeX-devel] LaTeX-math-mode + isearch
Date: Fri, 25 Jan 2019 16:40:45 +0100

Dear Jorge,

> Hi, Antoine. You probably want to add the whole LaTeX-math-keymap to ` in the isearch-mode-map:

> #+BEGIN_SRC emacs-lisp
> (define-key isearch-mode-map (LaTeX-math-abbrev-prefix) LaTeX-math-keymap)

> Although I am not sure with isearch if this will work as it has a rather complicated mode-map. Also probably you might want to do that only if the isearch is coming from LaTeX file.

Unfortunately that doesn't work: as you said, isearch has a pretty complicated behavior: LaTeX-math-keymap calls (insert), which inserts in the buffer, instead of the isearch minibuffer. I got away with:

(when (eq (buffer-local-value 'major-mode (current-buffer)) 'latex-mode)
    (set (make-local-variable 'LaTeX-math-insert-function) (lambda (s) (isearch-process-search-string (concat "\\" s) (concat "\\" s)))))

in isearch-mode-hook. Thanks!

reply via email to

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