mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Add user option to inhibit Calc startup message (bug#79143)
* doc/misc/calc.texi (Customizing Calc): Document the new option. * etc/NEWS: Document the new option. * lisp/calc/calc.el (calc-inhibit-startup-message): New option to inhibit Calc’s startup message. (calc): Respect the option in Calc’s startup code. * test/lisp/calc/calc-tests.el (ert): Require ert-x for 'ert-with-message-capture'. (calc-inhibit-startup-message): Test the new user option.
This commit is contained in:
parent
8c71ef0f8e
commit
aa60f16e66
4 changed files with 42 additions and 7 deletions
|
|
@ -1473,6 +1473,11 @@ commands given here will actually operate on the *Calculator* stack."
|
|||
(require 'calc-ext)
|
||||
(calc-set-language calc-language calc-language-option t)))
|
||||
|
||||
(defcustom calc-inhibit-startup-message nil
|
||||
"If non-nil, inhibit the Calc startup message."
|
||||
:version "31.1"
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom calc-make-windows-dedicated nil
|
||||
"If non-nil, windows displaying Calc buffers will be marked dedicated.
|
||||
See `window-dedicated-p' for what that means."
|
||||
|
|
@ -1524,9 +1529,10 @@ See `window-dedicated-p' for what that means."
|
|||
(with-current-buffer (calc-trail-buffer)
|
||||
(and calc-display-trail
|
||||
(calc-trail-display 1 t)))
|
||||
(message (substitute-command-keys
|
||||
(concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
|
||||
"Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
|
||||
(unless calc-inhibit-startup-message
|
||||
(message (substitute-command-keys
|
||||
(concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
|
||||
"Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit"))))
|
||||
(run-hooks 'calc-start-hook)
|
||||
(and (windowp full-display)
|
||||
(window-point full-display)
|
||||
|
|
@ -1534,10 +1540,11 @@ See `window-dedicated-p' for what that means."
|
|||
(and calc-make-windows-dedicated
|
||||
(set-window-dedicated-p nil t))
|
||||
(calc-check-defines)
|
||||
(when (and calc-said-hello interactive)
|
||||
(sit-for 2)
|
||||
(message ""))
|
||||
(setq calc-said-hello t)))))
|
||||
(unless calc-inhibit-startup-message
|
||||
(when (and calc-said-hello interactive)
|
||||
(sit-for 2)
|
||||
(message ""))
|
||||
(setq calc-said-hello t))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun full-calc (&optional interactive)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue