;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*-
-;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2014 Free
+;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2015 Free
;; Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;;
(if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\))
(eq (get-text-property (point) 'face) 'tex-verbatim)
- ;; Discover if a preceding occurance of `tex-open-quote'
+ ;; Discover if a preceding occurrence of `tex-open-quote'
;; should be morphed to a normal double quote.
;;
(and (>= (point) (+ (point-min) (length tex-open-quote)))
;;
(self-insert-command (prefix-numeric-value arg))
;; We'll be inserting fancy TeX quotes, but consider and imitate
- ;; `electric-pair-mode''s two behaviours: pair-insertion and
+ ;; `electric-pair-mode''s two behaviors: pair-insertion and
;; region wrapping.
;;
(if (and electric-pair-mode (use-region-p))
;; A better way to handle this, \( .. \) etc, is probably to
;; temporarily change the syntax of the \ in \( to punctuation.
((and latex-handle-escaped-parens
- (looking-back "\\\\[])}]"))
+ (looking-back "\\\\[])}]" (- (point) 2)))
(signal 'scan-error
(list "Containing expression ends prematurely"
(- (point) 2) (prog1 (point)
(goto-char pos)))))
((and latex-handle-escaped-parens
- (looking-back "\\\\\\([({[]\\)"))
+ (looking-back "\\\\\\([({[]\\)" (- (point) 2)))
(tex-next-unmatched-eparen (match-string 1)))
(t (goto-char newpos))))))