]> code.delx.au - gnu-emacs/blobdiff - lisp/term.el
(calc-mode): Add font-lock-defontify to change-major-mode-hook.
[gnu-emacs] / lisp / term.el
index fb2539327046d8eda25e5e68c756539087a3bcd8..eecd2abdf6e05ef86bdd8b69b9ce4f20be5cc18e 100644 (file)
@@ -2829,9 +2829,9 @@ See `term-prompt-regexp'."
                           ((eq char ?\032)
                            (let ((end (string-match "\r?$" str i)))
                              (if end
-                                 (progn (funcall term-command-hook
-                                                 (substring str (1+ i) end))
-                                        (setq i (match-end 0)))
+                                 (funcall term-command-hook
+                                          (prog1 (substring str (1+ i) end)
+                                            (setq i (match-end 0))))
                                (setq term-terminal-parameter
                                      (substring str i))
                                (setq term-terminal-state 4)