summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorMiha Rihtaršič <miha@kamnitnik.top>2022-09-30 20:28:15 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-09-30 21:15:06 +0200
commitcd4208f6d8e4bcbfa326a2b70489ee3c0643e53f (patch)
treeaf7a9d836b19a896b1598ee1e0c2e20bbf81d6af /lisp/shell.el
parent90744ff0be581b69cedea1194b7e78265bdb67a4 (diff)
downloademacs-cd4208f6d8e4bcbfa326a2b70489ee3c0643e53f.tar.gz
emacs-cd4208f6d8e4bcbfa326a2b70489ee3c0643e53f.tar.bz2
emacs-cd4208f6d8e4bcbfa326a2b70489ee3c0643e53f.zip
Rename comint-fl-* to comint-fontify-input-* and mention it in NEWS
* lisp/comint.el (comint-fontify-input-mode): (comint--fontify-input-saved-jit-lock-contextually): (comint--fontify-input-on): (comint--fontify-input-off): (comint--fontify-input-ppss-flush-indirect): (comint--fontify-input-fontify-region): Replace comint-fl-* with comint-fontify-input-*. * lisp/ielm.el (ielm-fontify-input-enable): (ielm-fontify-input-enable): (ielm-indirect-setup-hook): (inferior-emacs-lisp-mode): Replace comint-fl-* with comint-fontify-input-*. * lisp/shell.el (shell-comint-fl-enable): (shell-mode): Replace comint-fl-* with comint-fontify-input-*. * etc/NEWS: Mention the new modes and how to disable or enable them (bug#58169).
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 18bb3722427..641f274045d 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -308,10 +308,11 @@ for Shell mode only."
(const :tag "on" t))
:group 'shell)
-(defcustom shell-comint-fl-enable t
+(defcustom shell-fontify-input-enable t
"Enable fontification of input in shell buffers.
This variable only has effect when the shell is started. Use the
-command `comint-fl-mode' to toggle fontification of input."
+command `comint-fontify-input-mode' to toggle fontification of
+input."
:type 'boolean
:group 'shell
:safe 'booleanp
@@ -623,8 +624,8 @@ command."
:interactive nil
:after-hook
(unless comint-use-prompt-regexp
- (if shell-comint-fl-enable
- (comint-fl-mode))
+ (if shell-fontify-input-enable
+ (comint-fontify-input-mode))
(if shell-highlight-undef-enable
(shell-highlight-undef-mode)))
@@ -1664,8 +1665,8 @@ Similar to `executable-find', but use cache stored in
(if buf (buffer-local-value 'default-directory buf)
default-directory)))
(cond
- ;; Don't highlight command output. Mostly useful if
- ;; `comint-fl-mode' is disabled.
+ ;; Don't fontify command output. Mostly useful if
+ ;; `comint-fontify-input-mode' is disabled.
((text-property-any beg (point) 'field 'output)
nil)
((member cmd shell-highlight-undef-aliases)
@@ -1696,7 +1697,7 @@ Similar to `executable-find', but use cache stored in
(define-minor-mode shell-highlight-undef-mode
"Highlight undefined shell commands and aliases.
This minor mode is mostly useful in `shell-mode' buffers and
-works better if `comint-fl-mode' is enabled."
+works better if `comint-fontify-input-mode' is enabled."
:init-value nil
(if shell--highlight-undef-indirect
(progn
@@ -1706,7 +1707,7 @@ works better if `comint-fl-mode' is enabled."
(with-current-buffer buf
(font-lock-remove-keywords nil shell-highlight-undef-keywords))))
(font-lock-remove-keywords nil shell-highlight-undef-keywords))
- (remove-hook 'comint-fl-mode-hook
+ (remove-hook 'comint-fontify-input-mode-hook
#'shell-highlight-undef-mode-restart t)
(when shell-highlight-undef-mode
@@ -1722,9 +1723,9 @@ works better if `comint-fl-mode' is enabled."
(concat
"\\("
"[;(){}`|&]"
- (if comint-fl-mode
- ;; `comint-fl-mode' already puts point-min on end of
- ;; prompt
+ (if comint-fontify-input-mode
+ ;; `comint-fontify-input-mode' already puts
+ ;; point-min on end of prompt
""
(concat "\\|" comint-prompt-regexp))
"\\|^"
@@ -1740,7 +1741,7 @@ works better if `comint-fl-mode' is enabled."
(lambda ()
(setq shell-highlight-undef-regexp regexp)
(font-lock-add-keywords nil shell-highlight-undef-keywords t))))
- (cond (comint-fl-mode
+ (cond (comint-fontify-input-mode
(setq shell--highlight-undef-indirect setup)
(if-let ((buf (comint-indirect-buffer t)))
(with-current-buffer buf
@@ -1748,7 +1749,7 @@ works better if `comint-fl-mode' is enabled."
(add-hook 'comint-indirect-setup-hook setup nil t)))
(t (funcall setup))))
- (add-hook 'comint-fl-mode-hook
+ (add-hook 'comint-fontify-input-mode-hook
#'shell-highlight-undef-mode-restart nil t))
(font-lock-flush))
@@ -1756,9 +1757,9 @@ works better if `comint-fl-mode' is enabled."
(defun shell-highlight-undef-mode-restart ()
"If `shell-highlight-undef-mode' is on, restart it.
`shell-highlight-undef-mode' performs its setup differently
-depending on `comint-fl-mode'. It's useful to call this function
-when switching `comint-fl-mode' in order to make
-`shell-highlight-undef-mode' redo its setup."
+depending on `comint-fontify-input-mode'. It's useful to call
+this function when switching `comint-fontify-input-mode' in order
+to make `shell-highlight-undef-mode' redo its setup."
(when shell-highlight-undef-mode
(shell-highlight-undef-mode 1)))