branch: elpa/cdlatex commit 720f9145d88b3e54b5388742c8a1a2b963d74581 Author: Carsten Dominik <carsten.domi...@gmail.com> Commit: Carsten Dominik <carsten.domi...@gmail.com>
Fix bug when "*CDLaTeX Help*" buffer was read-only Github issue #24, closed --- cdlatex.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cdlatex.el b/cdlatex.el index 4ae1c13267..3dd33bcef0 100644 --- a/cdlatex.el +++ b/cdlatex.el @@ -848,6 +848,7 @@ When pressed twice, make the sub/superscript roman." (if (and (stringp cdlatex-paired-parens) (string-match (regexp-quote paren) cdlatex-paired-parens) (string= close (char-to-string (following-char)))) + ; parens are inserted paired, and there is already a closing parenthesis (delete-char 1)) (insert "\\left" paren1 " ? \\right" close1) (cdlatex-position-cursor))) @@ -1372,6 +1373,7 @@ zZ (if (get-buffer-window " *CDLaTeX Help*") (select-window (get-buffer-window " *CDLaTeX Help*")) (switch-to-buffer-other-window " *CDLaTeX Help*")) + (if buffer-read-only (read-only-mode 'toggle)) (erase-buffer) (make-local-variable 'truncate-lines) (setq truncate-lines t)