Suppress warnings for obsolete display-comint-buffer-action (bug#69983)

* lisp/cmuscheme.el (run-scheme, switch-to-scheme):
* lisp/shell.el (shell):
* lisp/eshell/eshell.el (eshell):
* lisp/progmodes/inf-lisp.el (inferior-lisp):
* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/textmodes/tex-mode.el (tex-display-shell)
(tex-recenter-output-buffer): Add 'with-suppressed-warnings'
to suppress warnings for obsolete options
'display-comint-buffer-action' and 'display-tex-shell-buffer-action'.
This commit is contained in:
Juri Linkov 2024-04-25 20:34:28 +03:00
parent 98649236f5
commit 598505c4fa
6 changed files with 16 additions and 8 deletions

View file

@ -238,7 +238,8 @@ is run).
(inferior-scheme-mode)))
(setq scheme-program-name cmd)
(setq scheme-buffer "*scheme*")
(pop-to-buffer "*scheme*" display-comint-buffer-action))
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer "*scheme*" display-comint-buffer-action)))
(defun scheme-start-file (prog)
"Return the name of the start file corresponding to PROG.
@ -358,7 +359,8 @@ With argument, position cursor at end of buffer."
(interactive "P")
(if (or (and scheme-buffer (get-buffer scheme-buffer))
(scheme-interactively-start-process))
(pop-to-buffer scheme-buffer display-comint-buffer-action)
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer scheme-buffer display-comint-buffer-action))
(error "No current process buffer. See variable `scheme-buffer'"))
(when eob-p
(push-mark)

View file

@ -250,7 +250,8 @@ information on Eshell, see Info node `(eshell)Top'."
(t
(get-buffer-create eshell-buffer-name)))))
(cl-assert (and buf (buffer-live-p buf)))
(pop-to-buffer buf display-comint-buffer-action)
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer buf display-comint-buffer-action))
(unless (derived-mode-p 'eshell-mode)
(eshell-mode))
buf))

View file

@ -308,7 +308,8 @@ quoted using shell quote syntax.
"inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
(inferior-lisp-mode)))
(setq inferior-lisp-buffer "*inferior-lisp*")
(pop-to-buffer "*inferior-lisp*" display-comint-buffer-action))
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)))
;;;###autoload
(defalias 'run-lisp 'inferior-lisp)

View file

@ -1435,7 +1435,8 @@ If FORCE is non-nil and no process found, create one."
(defun sh-show-shell ()
"Pop the shell interaction buffer."
(interactive)
(pop-to-buffer (process-buffer (sh-shell-process t)) display-comint-buffer-action))
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer (process-buffer (sh-shell-process t)) display-comint-buffer-action)))
(defun sh-send-text (text)
"Send TEXT to `sh-shell-process'."

View file

@ -923,7 +923,8 @@ Make the shell buffer the current buffer, and return it.
(current-buffer)))
;; The buffer's window must be correctly set when we call comint
;; (so that comint sets the COLUMNS env var properly).
(pop-to-buffer buffer display-comint-buffer-action)
(with-suppressed-warnings ((obsolete display-comint-buffer-action))
(pop-to-buffer buffer display-comint-buffer-action))
(with-connection-local-variables
(when file-name

View file

@ -2035,7 +2035,8 @@ In the tex shell buffer this command behaves like `comint-send-input'."
(defun tex-display-shell ()
"Make the TeX shell buffer visible in a window."
(display-buffer (tex-shell-buf) display-tex-shell-buffer-action)
(with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
(display-buffer (tex-shell-buf) display-tex-shell-buffer-action))
(tex-recenter-output-buffer nil))
(defun tex-shell-sentinel (proc _msg)
@ -2692,7 +2693,8 @@ line LINE of the window, or centered if LINE is nil."
(if (null tex-shell)
(message "No TeX output buffer")
(when-let ((window
(display-buffer tex-shell display-tex-shell-buffer-action)))
(with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
(display-buffer tex-shell display-tex-shell-buffer-action))))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))