X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9d5aa01d306750665de06d30f99dcff05fa6c53b..1d9b46d4ccbf41f347e8595aa75d55c52731ed60:/lisp/calc/calc.el diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 08ae7b1011..55ac412b43 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -434,13 +434,13 @@ by displaying the sub-formula in `calc-selected-face'." :group 'calc :type 'boolean) -(defcustom calc-logunits-field-reference +(defcustom calc-lu-field-reference "20 uPa" "The default reference level for logarithmic units (field)." :group 'calc :type '(string)) -(defcustom calc-logunits-power-reference +(defcustom calc-lu-power-reference "mW" "The default reference level for logarithmic units (power)." :group 'calc @@ -1293,19 +1293,20 @@ the trail buffer." (if (not info-list) (progn (setq calc-buffer-list (delete cb calc-buffer-list)) - (with-current-buffer calc-trail-buffer - (if (eq cb calc-main-buffer) - ;; If there are other Calc stacks, make another one - ;; the calc-main-buffer ... - (if calc-buffer-list - (setq calc-main-buffer (car calc-buffer-list)) - ;; ... otherwise kill the trail and its windows. - (let ((wl (get-buffer-window-list calc-trail-buffer))) - (while wl - (delete-window (car wl)) - (setq wl (cdr wl)))) - (kill-buffer calc-trail-buffer) - (setq calc-trail-buffer nil)))) + (if (buffer-live-p calc-trail-buffer) + (with-current-buffer calc-trail-buffer + (if (eq cb calc-main-buffer) + ;; If there are other Calc stacks, make another one + ;; the calc-main-buffer ... + (if calc-buffer-list + (setq calc-main-buffer (car calc-buffer-list)) + ;; ... otherwise kill the trail and its windows. + (let ((wl (get-buffer-window-list calc-trail-buffer))) + (while wl + (delete-window (car wl)) + (setq wl (cdr wl)))) + (kill-buffer calc-trail-buffer))))) + (setq calc-trail-buffer nil) t)))) (defun calc-mode ()