Fix byte-compilation warnings

* lisp/calc/calc-graph.el (calc-gnuplot-check-for-errors):
* lisp/calendar/holidays.el (list-holidays):
Dodge 'save-excursion+set-buffer' warnings that appeared after
the progn flattening was introduced.
This commit is contained in:
Mattias Engdegård 2021-09-11 17:13:14 +02:00
parent 09ae3f9f65
commit d5c6f701a6
2 changed files with 7 additions and 9 deletions

View file

@ -1403,14 +1403,12 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
(or calc-graph-no-auto-view (sit-for 0))))
(defun calc-gnuplot-check-for-errors ()
(if (save-excursion
(prog2
(progn
(set-buffer calc-gnuplot-buffer)
(goto-char calc-gnuplot-last-error-pos))
(re-search-forward "^[ \t]+\\^$" nil t)
(goto-char (point-max))
(setq calc-gnuplot-last-error-pos (point-max))))
(if (with-current-buffer calc-gnuplot-buffer
(goto-char calc-gnuplot-last-error-pos)
(prog1
(re-search-forward "^[ \t]+\\^$" nil t)
(goto-char (point-max))
(setq calc-gnuplot-last-error-pos (point-max))))
(calc-graph-view-trail)))
(defun calc-gnuplot-command (&rest args)

View file

@ -482,7 +482,7 @@ The optional LABEL is used to label the buffer created."
(calendar-increment-month displayed-month displayed-year 3)
(setq s (calendar-absolute-from-gregorian
(list displayed-month 1 displayed-year))))
(save-excursion
(save-current-buffer
(calendar-in-read-only-buffer holiday-buffer
(calendar-set-mode-line
(if (= y1 y2)