Mercurial > emacs
diff lisp/textmodes/tex-mode.el @ 106484:fbf8c0853c94
(latex-complete, latex-indent-or-complete): Remove.
(latex-mode): Set completion-at-point-functions instead.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 07 Dec 2009 21:15:19 +0000 |
parents | cff2b8b6d64e |
children | 1d1d5d9bd884 |
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el Mon Dec 07 20:27:40 2009 +0000 +++ b/lisp/textmodes/tex-mode.el Mon Dec 07 21:15:19 2009 +0000 @@ -1076,6 +1076,8 @@ (add-hook 'fill-nobreak-predicate 'latex-fill-nobreak-predicate nil t) (set (make-local-variable 'indent-line-function) 'latex-indent) (set (make-local-variable 'fill-indent-according-to-mode) t) + (add-hook 'completion-at-point-functions + 'latex-complete-data nil 'local) (set (make-local-variable 'outline-regexp) latex-outline-regexp) (set (make-local-variable 'outline-level) 'latex-outline-level) (set (make-local-variable 'forward-sexp-function) 'latex-forward-sexp) @@ -1509,27 +1511,6 @@ nil (list comp-beg comp-end table)))))))) -(defun latex-complete () - "Perform completion at point for LaTeX mode. -Return non-nil if we found what to complete." - (interactive) - (let ((data (latex-complete-data))) - (when data - (apply 'completion-in-region data) - t))) - -(defun latex-indent-or-complete () - "Perform completion at point or indentation, according to DWIM. -The heuristic is to try indentation, if that fails try completion, -if that fails insert a tab." - (interactive) - (let ((undo buffer-undo-list) - (pos (point))) - (indent-according-to-mode) - (or (not (and (eq pos (point)) (eq undo buffer-undo-list))) - (latex-complete) - (insert-tab)))) - ;;;; ;;;; LaTeX syntax navigation ;;;;