]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix fontification of keywords clobbered by the prompt.
authorWolfgang Jenkner <wjenkner@inode.at>
Fri, 17 Apr 2015 17:54:35 +0000 (19:54 +0200)
committerWolfgang Jenkner <wjenkner@inode.at>
Fri, 17 Apr 2015 17:56:41 +0000 (19:56 +0200)
* lisp/comint.el (comint-output-filter): Remove the uses of
with-silent-modifications I introduced as part of the last change.

This fixes, e.g., erratically missing highlighting when running
./configure --help; ./configure in a shell-mode buffer with
compilation-shell-minor-mode turned on.

lisp/comint.el

index 2769c8717d2878286a238e62dae842d9eab477ea..de2206197514cd5307fa2ed3b342e41ee430de66 100644 (file)
@@ -2082,19 +2082,19 @@ Make backspaces delete the previous character."
                  (add-text-properties prompt-start (point)
                                       '(read-only t front-sticky (read-only)))))
              (when comint-last-prompt
-               (with-silent-modifications
-                 (font-lock--remove-face-from-text-property
-                  (car comint-last-prompt)
-                  (cdr comint-last-prompt)
-                  'font-lock-face
-                  'comint-highlight-prompt)))
+               ;; There might be some keywords here waiting for
+               ;; fontification, so no `with-silent-modifications'.
+               (font-lock--remove-face-from-text-property
+                (car comint-last-prompt)
+                (cdr comint-last-prompt)
+                'font-lock-face
+                'comint-highlight-prompt))
              (setq comint-last-prompt
                    (cons (copy-marker prompt-start) (point-marker)))
-             (with-silent-modifications
-               (font-lock-prepend-text-property prompt-start (point)
-                                                'font-lock-face
-                                                'comint-highlight-prompt)
-               (add-text-properties prompt-start (point) '(rear-nonsticky t))))
+             (font-lock-prepend-text-property prompt-start (point)
+                                              'font-lock-face
+                                              'comint-highlight-prompt)
+             (add-text-properties prompt-start (point) '(rear-nonsticky t)))
            (goto-char saved-point)))))))
 
 (defun comint-preinput-scroll-to-bottom ()