summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex-conf.el26
1 files changed, 22 insertions, 4 deletions
diff --git a/tex-conf.el b/tex-conf.el
index 5245c21..f1b9029 100644
--- a/tex-conf.el
+++ b/tex-conf.el
@@ -184,6 +184,8 @@
((looking-at-p "\\\\right")
(forward-char 6)
(end-exit-paren))
+ ((looking-at-p "\\\\rangle")
+ (forward-char 7))
(t (self-insert-command 1)))))
;;;###autoload
@@ -198,6 +200,13 @@
(max (- (point) 2) (point-min)))
(forward-char -2)
(setq continue t))
+ ((looking-back (regexp-quote "\\rangle")
+ (max (- (point) 7) (point-min)))
+ (forward-char -7)
+ (setq continue t))
+ ((looking-back (regexp-quote "\\right")
+ (max (- (point) 6) (point-min)))
+ (forward-char -6))
((memq ch ch-list) (backward-char) (setq continue t))
(t (self-insert-command 1)))
(cond
@@ -288,6 +297,7 @@ where the macro part is without the backslash.")
(cons "o" "circ")
(list "{" "{" "}")
(list "(" "(" ")")
+ (list "<" "langle" "rangle")
(list "b" "lvert" "rvert")))
;;;###autoload
@@ -295,15 +305,23 @@ where the macro part is without the backslash.")
"Insert a symbol associated with \"o\" key.
The list is in the variable `durand-o-things-list'"
(interactive)
- (let ((thing (minibuffer-with-setup-hook 'durand-headlong-minibuffer-setup-hook
+ (let ((thing (minibuffer-with-setup-hook
+ 'durand-headlong-minibuffer-setup-hook
(completing-read
- "Chois une chose associée à \"o\":" (mapcar 'car durand-o-things-list)
+ "Chois une chose associée à \"o\":"
+ (mapcar 'car durand-o-things-list)
nil t "^"))))
- (let ((associated (alist-get thing durand-o-things-list nil nil #'string=)))
+ (let ((associated
+ (alist-get
+ thing durand-o-things-list
+ nil nil #'string=)))
(cond
((not (consp associated))
;; length = 1
- (insert (format "\\%s" (assoc-default thing durand-o-things-list #'string=))))
+ (insert
+ (format
+ "\\%s"
+ (assoc-default thing durand-o-things-list #'string=))))
((and (null (cddr associated))
(string= (car associated) "("))
;; special treatment for the parenthesis