summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-help.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc/calc-help.el')
-rw-r--r--lisp/calc/calc-help.el40
1 files changed, 18 insertions, 22 deletions
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 72cf90a7587..0b327e8d0f6 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -1,4 +1,4 @@
-;;; calc-help.el --- help display functions for Calc,
+;;; calc-help.el --- help display functions for Calc -*- lexical-binding:t -*-
;; Copyright (C) 1990-1993, 2001-2020 Free Software Foundation, Inc.
@@ -33,8 +33,8 @@
(declare-function Info-last "info" ())
-(defun calc-help-prefix (arg)
- "This key is the prefix for Calc help functions. See calc-help-for-help."
+(defun calc-help-prefix (&optional _arg)
+ "This key is the prefix for Calc help functions. See `calc-help-for-help'."
(interactive "P")
(or calc-dispatch-help (sit-for echo-keystrokes))
(let ((key (calc-read-key-sequence
@@ -79,7 +79,7 @@ C-w Describe how there is no warranty for Calc."
(message "Calc Help options: Help, Info, ... press SPC, DEL to scroll, C-g to cancel")
(memq (setq key (read-event))
'(? ?\C-h ?\C-? ?\C-v ?\M-v)))
- (condition-case err
+ (condition-case nil
(if (memq key '(? ?\C-v))
(scroll-up)
(scroll-down))
@@ -302,21 +302,19 @@ C-w Describe how there is no warranty for Calc."
(let ((entrylist '())
entry)
(require 'info nil t)
- (while indices
- (condition-case nil
- (with-temp-buffer
- (Info-mode)
- (Info-goto-node (concat "(Calc)" (car indices) " Index"))
- (goto-char (point-min))
- (while (re-search-forward "\n\\* \\(.*\\): " nil t)
- (setq entry (match-string 1))
- (if (and (not (string-match "<[1-9]+>" entry))
- (not (string-match "(.*)" entry))
- (not (string= entry "Menu")))
- (unless (assoc entry entrylist)
- (setq entrylist (cons entry entrylist))))))
- (error nil))
- (setq indices (cdr indices)))
+ (dolist (indice indices)
+ (ignore-errors
+ (with-temp-buffer
+ (Info-mode)
+ (Info-goto-node (concat "(Calc)" indice " Index"))
+ (goto-char (point-min))
+ (while (re-search-forward "\n\\* \\(.*\\): " nil t)
+ (setq entry (match-string 1))
+ (if (and (not (string-match "<[1-9]+>" entry))
+ (not (string-match "(.*)" entry))
+ (not (string= entry "Menu")))
+ (unless (assoc entry entrylist)
+ (setq entrylist (cons entry entrylist))))))))
entrylist))
(defun calc-describe-function (&optional func)
@@ -409,9 +407,7 @@ C-w Describe how there is no warranty for Calc."
(substitute-command-keys x)))))
(nreverse (cdr (reverse (cdr (calc-help))))))
(mapc (function (lambda (prefix)
- (let ((msgs (condition-case err
- (funcall prefix)
- (error nil))))
+ (let ((msgs (ignore-errors (funcall prefix))))
(if (car msgs)
(princ
(if (eq (nth 2 msgs) ?v)