]> code.delx.au - gnu-emacs/commitdiff
Respect text-quoting-style in calc
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Aug 2015 13:31:54 +0000 (06:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Aug 2015 13:32:36 +0000 (06:32 -0700)
In calc, tespect text-quoting-style preference in diagnostic
formats and fix a few similar problems in docstrings.
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list)
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
Use curved quotes in diagnostic format strings.
* lisp/calc/calc-help.el (calc-describe-thing):
Format docstrings with substitute-command-keys.
* lisp/calc/calc-help.el (calc-j-prefix-help):
* lisp/calc/calc-misc.el (calc-help):
* lisp/calc/calc-ext.el (calc-shift-Z-prefix-help):
Escape a docstring "`".

14 files changed:
lisp/calc/calc-aent.el
lisp/calc/calc-embed.el
lisp/calc/calc-ext.el
lisp/calc/calc-graph.el
lisp/calc/calc-help.el
lisp/calc/calc-lang.el
lisp/calc/calc-misc.el
lisp/calc/calc-mode.el
lisp/calc/calc-prog.el
lisp/calc/calc-store.el
lisp/calc/calc-units.el
lisp/calc/calc-vec.el
lisp/calc/calc-yank.el
lisp/calc/calc.el

index cc048ebc223c856f58631d05749056c605e0ea39..2fa8f19163d340c35e829265d6404edd6ecfab04 100644 (file)
@@ -1121,7 +1121,7 @@ If the current Calc language does not use placeholders, return nil."
                                   (math-read-expr-list))))
                       (if (not (or (equal math-expr-data calc-function-close)
                                    (eq math-exp-token 'end)))
-                          (throw 'syntax "Expected `)'"))
+                          (throw 'syntax "Expected ‘)’"))
                       (math-read-token)
                       (if (and (memq calc-language
                                       calc-lang-parens-are-subscripts)
@@ -1246,7 +1246,7 @@ If the current Calc language does not use placeholders, return nil."
             (if (not (or (equal math-expr-data ")")
                          (and (equal math-expr-data "]") (eq (car-safe exp) 'intv))
                          (eq math-exp-token 'end)))
-                (throw 'syntax "Expected `)'"))
+                (throw 'syntax "Expected ‘)’"))
             (math-read-token)
             exp))
          ((eq math-exp-token 'string)
index fcb4b032096b027f4eea76813ebbd54129907275..3f6e83e0c6dd0e7616352abb6f447a74604fd55b 100644 (file)
       (if calc-embedded-firsttime-formula
           (run-hooks 'calc-embedded-new-formula-hook))
       (or (eq calc-embedded-quiet t)
-         (message "Embedded Calc mode enabled; %s to return to normal"
-                  (if calc-embedded-quiet
-                      "Type `C-x * x'"
-                    "Give this command again")))))
+         (message (concat
+                    "Embedded Calc mode enabled; "
+                    (if calc-embedded-quiet
+                        "Type ‘C-x * x’"
+                      "Give this command again")
+                    " to return to normal")))))
   (scroll-down 0))    ; fix a bug which occurs when truncate-lines is changed.
 
 
index 67d0c2701d28523c599c1a36a89ee1f5cac79b31..1c40188d2b2cb417ce0186ebe2900c792d37426f 100644 (file)
@@ -1097,10 +1097,10 @@ calc-tan calc-tanh calc-to-degrees calc-to-radians)
 
  ("calc-mode" calc-alg-simplify-mode calc-algebraic-mode
 calc-always-load-extensions calc-auto-recompute calc-auto-why
-calc-basic-simplify-mode calc-bin-simplify-mode calc-break-vectors 
-calc-center-justify calc-default-simplify-mode calc-display-raw 
-calc-eng-notation calc-ext-simplify-mode calc-fix-notation 
-calc-full-trail-vectors calc-full-vectors calc-get-modes calc-group-char 
+calc-basic-simplify-mode calc-bin-simplify-mode calc-break-vectors
+calc-center-justify calc-default-simplify-mode calc-display-raw
+calc-eng-notation calc-ext-simplify-mode calc-fix-notation
+calc-full-trail-vectors calc-full-vectors calc-get-modes calc-group-char
 calc-group-digits calc-infinite-mode calc-left-justify calc-left-label
 calc-line-breaking calc-line-numbering calc-matrix-brackets
 calc-matrix-center-justify calc-matrix-left-justify calc-matrix-mode
@@ -1177,7 +1177,7 @@ calc-trail-scroll-right calc-trail-yank)
  ("calc-undo" calc-last-args calc-redo)
 
  ("calc-units" calc-autorange-units calc-base-units
-calc-convert-temperature calc-convert-units 
+calc-convert-temperature calc-convert-units
 calc-convert-exact-units calc-define-unit
 calc-enter-units-table calc-explain-units calc-extract-units
 calc-get-unit-definition calc-permanent-units calc-quick-units
@@ -1957,7 +1957,7 @@ calc-kill calc-kill-region calc-yank))))
                  (desc
                   (if (symbolp func)
                       (if (= (logand kind 3) 0)
-                          (format "`%c' = %s" key name)
+                          (format "‘%c’ = %s" key name)
                         (if pos
                             (format "%s%c%s"
                                     (downcase (substring name 0 pos))
@@ -1988,7 +1988,7 @@ calc-kill calc-kill-region calc-yank))))
      "kbd-macros: [ (if), : (else), | (else-if), ] (end-if)"
      "kbd-macros: < > (repeat), ( ) (for), { } (loop)"
      "kbd-macros: / (break)"
-     "kbd-macros: ` (save), ' (restore)")
+     "kbd-macros: \\=` (save), ' (restore)")
    "user" ?Z))
 
 
index 20b0249ec1a15b1df26f2ca951c127db3e98f373..8378b23c0eb57210808bf8d1f6a5f6a57d7bae90 100644 (file)
@@ -958,7 +958,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
          (define-key calc-dumb-map "\C-c\C-c" 'exit-recursive-edit)))
     (use-local-map calc-dumb-map)
     (setq truncate-lines t)
-    (message "Type `q' or `C-c C-c' to return to Calc")
+    (message "Type ‘q’ or ‘C-c C-c’ to return to Calc")
     (recursive-edit)
     (bury-buffer "*Gnuplot Trail*")))
 
index 7a1a983e6b3289bdf9cd88e5d4b4e32323f5ccff..01ab49510cd55fcdfa479f6b8b69e4be86b9e939 100644 (file)
@@ -240,7 +240,7 @@ C-w  Describe how there is no warranty for Calc."
                  (if (string-match "\\` +" prompts)
                      (setq prompts (substring prompts (match-end 0))))
                  (setq msg (format
-                            "%s:  %s%s`%s'%s%s %s%s"
+                            "%s:  %s%s‘%s’%s%s %s%s"
                             (if (string-match
                                  "\\`\\(calc-[-a-zA-Z0-9]+\\) *\\(.*\\)\\'"
                                  cmd)
@@ -345,7 +345,7 @@ C-w  Describe how there is no warranty for Calc."
   (calc-describe-thing var "Variable Index"))
 
 (defun calc-describe-thing (thing where &optional target not-quoted)
-  (message "Looking for `%s' in %s..." thing where)
+  (message "Looking for ‘%s’ in %s..." thing where)
   (let ((savewin (current-window-configuration)))
     (calc-info-goto-node where)
     (or (let ((case-fold-search nil))
@@ -361,7 +361,7 @@ C-w  Describe how there is no warranty for Calc."
           (if Info-history
               (Info-last))
          (set-window-configuration savewin)
-         (error "Can't find `%s' in %s" thing where)))
+         (error "Can't find ‘%s’ in %s" thing where)))
     (let (Info-history)
       (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
     (let* ((string-target (or target thing))
@@ -380,7 +380,7 @@ C-w  Describe how there is no warranty for Calc."
                 (re-search-forward quoted nil t)
                 (search-forward string-target nil t)))))
     (beginning-of-line)
-    (message "Found `%s' in %s" thing where)))
+    (message "Found ‘%s’ in %s" thing where)))
 
 (defun calc-view-news ()
   (interactive)
@@ -400,11 +400,13 @@ C-w  Describe how there is no warranty for Calc."
     (princ "GNU Emacs Calculator.\n")
     (princ "  By Dave Gillespie.\n")
     (princ (format "  %s\n\n" emacs-copyright))
-    (princ "Type `h s' for a more detailed summary.\n")
-    (princ "Or type `h i' to read the full Calc manual on-line.\n\n")
+    (princ (format "Type ‘h s’ for a more detailed summary.\n"))
+    (princ (format "Or type ‘h i’ to read the full Calc manual on-line.\n\n"))
     (princ "Basic keys:\n")
     (let* ((calc-full-help-flag t))
-      (mapc (function (lambda (x) (princ (format "  %s\n" x))))
+      (mapc (function (lambda (x) (princ (format
+                                          "  %s\n"
+                                          (substitute-command-keys x)))))
            (nreverse (cdr (reverse (cdr (calc-help))))))
       (mapc (function (lambda (prefix)
                        (let ((msgs (condition-case err
@@ -413,18 +415,22 @@ C-w  Describe how there is no warranty for Calc."
                          (if (car msgs)
                              (princ
                               (if (eq (nth 2 msgs) ?v)
-                                  "\n`v' or `V' prefix (vector/matrix) keys: \n"
+                                   (format
+                                    "\n‘v’ or ‘V’ prefix (vector/matrix) keys: \n")
                                 (if (nth 2 msgs)
                                     (format
-                                     "\n`%c' prefix (%s) keys:\n"
+                                     "\n‘%c’ prefix (%s) keys:\n"
                                      (nth 2 msgs)
                                      (or (cdr (assq (nth 2 msgs)
                                                     calc-help-long-names))
                                          (nth 1 msgs)))
                                   (format "\n%s-modified keys:\n"
                                           (capitalize (nth 1 msgs)))))))
-                         (mapcar (function (lambda (x)
-                                   (princ (format "  %s\n" x))))
+                         (mapcar (function
+                                   (lambda (x)
+                                     (princ (format
+                                             "  %s\n"
+                                             (substitute-command-keys x)))))
                                  (car msgs)))))
            '(calc-inverse-prefix-help
              calc-hyperbolic-prefix-help
@@ -539,7 +545,7 @@ C-w  Describe how there is no warranty for Calc."
    '("Select, Additional, Once; eVal, Formula; Rewrite"
      "More, Less, 1-9, Next, Previous"
      "Unselect, Clear; Display; Enable; Breakable"
-     "' (replace), ` (edit), +, -, *, /, RET (grab), DEL"
+     "' (replace), \\=` (edit), +, -, *, /, RET (grab), DEL"
      "SHIFT + swap: Left, Right; maybe: Select, Once"
      "SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate"
      "SHIFT + Negate, & (invert); Unpack")
index 066d781cc95078d4a75cf6a0f813ecd35518a7bb..9d5020df038f90d457844ec9195619a9a2d918ad 100644 (file)
@@ -94,7 +94,7 @@
   (interactive)
   (calc-wrapper
    (calc-set-language 'c)
-   (message "`C' language mode")))
+   (message "‘C’ language mode")))
 
 (put 'c 'math-oper-table
   '( ( "u!"    calcFunc-lnot -1 1000 )
              math-exp-token 'end
              math-expr-data "\000")
        x)
-    (throw 'syntax "Unmatched closing `/'")))
+    (throw 'syntax "Unmatched closing ‘/’")))
 
 (defun math-parse-fortran-subscr (sym args)
   (setq sym (math-build-var-name sym))
 
 (defun math-parse-tex-sum (f val)
   (let (low high save)
-    (or (equal math-expr-data "_") (throw 'syntax "Expected `_'"))
+    (or (equal math-expr-data "_") (throw 'syntax "Expected ‘_’"))
     (math-read-token)
     (setq save math-exp-old-pos)
     (setq low (math-read-factor))
        (progn
          (setq math-exp-old-pos (1+ save))
          (throw 'syntax "Expected equation")))
-    (or (equal math-expr-data "^") (throw 'syntax "Expected `^'"))
+    (or (equal math-expr-data "^") (throw 'syntax "Expected ‘^’"))
     (math-read-token)
     (setq high (math-read-factor))
     (list (nth 2 f) (math-read-factor) (nth 1 low) (nth 2 low) high)))
     (while (assoc math-expr-data '(("ccol") ("lcol") ("rcol")))
       (math-read-token)
       (or (equal math-expr-data calc-function-open)
-         (throw 'syntax "Expected `{'"))
+         (throw 'syntax "Expected ‘{’"))
       (math-read-token)
       (setq vec (cons (cons 'vec (math-read-expr-list)) vec))
       (or (equal math-expr-data calc-function-close)
-         (throw 'syntax "Expected `}'"))
+         (throw 'syntax "Expected ‘}’"))
       (math-read-token))
     (or (equal math-expr-data calc-function-close)
-       (throw 'syntax "Expected `}'"))
+       (throw 'syntax "Expected ‘}’"))
     (math-read-token)
     (math-transpose (cons 'vec (nreverse vec)))))
 
                          (math-read-expr-list))))
              (if (not (or (equal math-expr-data calc-function-close)
                           (eq math-exp-token 'end)))
-                 (throw 'syntax "Expected `)'"))
+                 (throw 'syntax "Expected ‘)’"))
              (math-read-token)
              (cons (intern (format "calcFunc-%s'" (nth 1 x))) args)))
        (list 'var
   (interactive)
   (calc-wrapper
    (calc-set-language 'yacas)
-   (message "`Yacas' language mode")))
+   (message "‘Yacas’ language mode")))
 
 (put 'yacas 'math-vector-brackets "{}")
 
   (interactive)
   (calc-wrapper
    (calc-set-language 'maxima)
-   (message "`Maxima' language mode")))
+   (message "‘Maxima’ language mode")))
 
 (put 'maxima 'math-oper-table
      '(("+"    +               100  100)
   (interactive)
   (calc-wrapper
    (calc-set-language 'giac)
-   (message "`Giac' language mode")))
+   (message "‘Giac’ language mode")))
 
 (put 'giac 'math-oper-table
   '( ( "["    (math-read-giac-subscr) 250 -1 )
@@ -2237,7 +2237,7 @@ order to Calc's."
               (if (= sep ?\.)
                   (setq h (1+ h)))
               (if (= sep ?\])
-                  (math-read-big-error (1- h) v "Expected `)'"))
+                  (math-read-big-error (1- h) v "Expected ‘)’"))
               (if (= sep ?\))
                   (setq p (math-read-big-rec
                             (1+ math-rb-h1) math-rb-v1 (1- h) math-rb-v2 v))
@@ -2252,7 +2252,7 @@ order to Calc's."
                                                      0 1)
                                                  p))))
                       ((= (math-read-big-char (1- h) v) ?\])
-                       (math-read-big-error (1- h) v "Expected `)'"))
+                       (math-read-big-error (1- h) v "Expected ‘)’"))
                       ((= sep ?\,)
                        (or (and (math-realp (car p)) (math-realp (nth 1 p)))
                            (math-read-big-error
@@ -2280,7 +2280,7 @@ order to Calc's."
                        (setq h (math-read-big-balance (1+ hleft) v "["))
                        (if hright
                            (or (= h hright)
-                               (math-read-big-error hright v "Expected `]'"))
+                               (math-read-big-error hright v "Expected ‘]’"))
                          (setq hright h))
                        (setq p (cons (math-read-big-rec
                                       hleft v h (1+ v)) p))
@@ -2293,7 +2293,7 @@ order to Calc's."
                         (setq h (1+ h)))
                     (and (= (math-read-big-char h v) ?\])
                          (setq h (1+ h))))
-                  (math-read-big-error (1- h) v "Expected `]'"))
+                  (math-read-big-error (1- h) v "Expected ‘]’"))
               (if (= (math-read-big-char h vtop) ?\,)
                   (setq h (1+ h)))
               (math-read-big-emptyp math-rb-h1 (1+ v) (1- h) math-rb-v2 nil t)
@@ -2317,7 +2317,7 @@ order to Calc's."
             (setq widest (math-read-big-char (1- h) v))
             (if (or (memq widest '(?\; ?\)))
                     (and (eq widest ?\.) (cdr p)))
-                (math-read-big-error (1- h) v "Expected `]'"))
+                (math-read-big-error (1- h) v "Expected ‘]’"))
             (if (= widest ?\.)
                 (setq h (1+ h)
                       widest (math-read-big-balance h v "[")
@@ -2369,7 +2369,7 @@ order to Calc's."
                                  h widest)
                            (= (math-read-big-char (1- h) v) ?\,)))
                   (or (= (math-read-big-char (1- h) v) ?\))
-                      (math-read-big-error (1- h) v "Expected `)'"))
+                      (math-read-big-error (1- h) v "Expected ‘)’"))
                   (setq p (cons line (nreverse p))))
               (setq p (list 'var
                             (intern (math-remove-dashes p))
@@ -2432,7 +2432,8 @@ order to Calc's."
               (let ((y (math-read-big-rec h math-rb-v1 math-rb-h2
                                            math-rb-v2 baseline nil t)))
                 (or (= (math-read-big-char math-read-big-h2 baseline) ?\:)
-                    (math-read-big-error math-read-big-h2 baseline "Expected `:'"))
+                    (math-read-big-error math-read-big-h2 baseline
+                                          "Expected ‘:’"))
                 (setq p (list (nth 1 widest) p y
                               (math-read-big-rec
                                 (1+ math-read-big-h2) math-rb-v1 math-rb-h2 math-rb-v2
@@ -2507,7 +2508,7 @@ order to Calc's."
     (while (> count 0)
       (if (>= h len)
          (if what
-             (math-read-big-error nil v (format "Unmatched `%s'" what))
+             (math-read-big-error nil v (format "Unmatched ‘%s’" what))
            (setq count 0))
        (if (memq (aref line h) '(?\( ?\[))
            (setq count (1+ count))
index 5d5f4ce0c8687f7a46a97e102578af59a8d982f0..e5d4b6b0607d819f6a80a6c5f73aee0976ddd8bd 100644 (file)
@@ -225,7 +225,7 @@ Calc user interface as before (either C-x * C or C-x * K; initially C-x * C).
           "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
           "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
           "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
-          "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)"
+          "Other keys: ' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
           "Other keys: SPC/RET (enter/dup), LFD (over); < > (scroll horiz)"
           "Other keys: DEL (drop), M-DEL (drop-above); { } (scroll vert)"
           "Other keys: TAB (swap/roll-dn), M-TAB (roll-up)"
index be18dcd0349c13b7ac9e0d4ea9ecca93776f3d58..605084e3f35d686176517acbe4081dd20129b49f 100644 (file)
      (setq n (and (not (eq calc-auto-why t)) (if calc-auto-why t 1))))
    (calc-change-mode 'calc-auto-why n nil)
    (cond ((null n)
-         (message "User must press `w' to explain unsimplified results"))
+         (message "User must press ‘w’ to explain unsimplified results"))
         ((eq n t)
-         (message "Automatically doing `w' to explain unsimplified results"))
+         (message "Automatically doing ‘w’ to explain unsimplified results"))
         (t
-         (message "Automatically doing `w' only for unusual messages")))))
+         (message "Automatically doing ‘w’ only for unusual messages")))))
 
 (defun calc-group-digits (n)
   (interactive "P")
         (vals (mapcar (function (lambda (v) (symbol-value (car v))))
                       calc-mode-var-list)))
      (unless calc-settings-file
-       (error "No `calc-settings-file' specified"))
+       (error "No ‘calc-settings-file’ specified"))
      (set-buffer (find-file-noselect (substitute-in-file-name
                                      calc-settings-file)))
      (goto-char (point-min))
                           ((= n 4) 'global)
                           ((= n 5) 'save)
                           (t 'local)))
-   (message "%s" 
+   (message "%s"
            (cond ((and (eq calc-mode-save-mode 'local) calc-embedded-info)
                   "Recording mode changes with [calc-mode: ...]")
                  ((eq calc-mode-save-mode 'edit)
                     (cond ((eq arg 0) 'scalar)
                           ((< (prefix-numeric-value arg) 1)
                            (and (< (prefix-numeric-value arg) -1) 'matrix))
-                          (arg 
+                          (arg
                             (if (consp arg) 'sqmatrix
                               (prefix-numeric-value arg)))
                           ((eq calc-matrix-mode 'matrix) 'scalar)
    (calc-change-mode 'calc-auto-recompute arg nil t)
    (calc-refresh-evaltos)
    (message (if calc-auto-recompute
-               "Automatically recomputing `=>' forms when necessary"
-             "Not recomputing `=>' forms automatically"))))
+               "Automatically recomputing ‘=>’ forms when necessary"
+             "Not recomputing ‘=>’ forms automatically"))))
 
 (defun calc-working (n)
   (interactive "P")
index 27114077d1566d7981c32a4d5130cf799a3d7efc..df2eb764f3b969f202fbb2f993cff33714157f6c 100644 (file)
   (or last-kbd-macro
       (error "No keyboard macro defined"))
   (setq calc-invocation-macro last-kbd-macro)
-  (message "Use `C-x * Z' to invoke this macro"))
+  (message "Use ‘C-x * Z’ to invoke this macro"))
 
 (defun calc-user-define-edit ()
   (interactive)  ; but no calc-wrapper!
@@ -1899,7 +1899,7 @@ Redefine the corresponding command."
                          `((and
                             (,chk ,var)
                             (math-reject-arg ,var ',qual)))))
-             (error "Unknown qualifier `%s'" qual-name))))))))
+             (error "Unknown qualifier ‘%s’" qual-name))))))))
 
 (defun math-do-arg-list-check (args is-opt is-rest)
   (cond ((null args) nil)
index 91b927aad612520c9f7461b8c4ec709df121e32c..43dc602225e971e5ce6ee4e021be34db39fd9e1a 100644 (file)
         (setq calc-last-edited-variable var)
         (calc-edit-mode (list 'calc-finish-stack-edit (list 'quote var))
                         t
-                        (concat "Editing variable `" (calc-var-name var) "'. "))
+                        (format "Editing variable ‘%s’" (calc-var-name var)))
         (and value
              (insert (math-format-nice-expr value (frame-width)) "\n")))))
   (calc-show-edit-buffer))
index f3d02340fe32cb3a3da956c48527a66be96b878f..d95af9492bd184a6fc3abfb1f05763505fc83e04 100644 (file)
@@ -422,7 +422,7 @@ If EXPR is nil, return nil."
   "Put the units in EXPR in the default units table.
 If COMP or STD is non-nil, put that in the units table instead."
   (let* ((new-units (or comp std (math-get-units expr)))
-         (standard-units (math-get-standard-units 
+         (standard-units (math-get-standard-units
                           (cond
                            (comp (math-simplify-units expr))
                            (std expr)
@@ -457,9 +457,9 @@ If COMP or STD is non-nil, put that in the units table instead."
                                 (eq (math-get-standard-units expr) 1))))
        (let ((uold (or old-units
                       (progn
-                        (setq uoldname 
+                        (setq uoldname
                                (if unitscancel
-                                   (read-string 
+                                   (read-string
                                     "(The expression is unitless when simplified) Old Units: ")
                                  (read-string "Old units: ")))
                         (if (equal uoldname "")
@@ -1621,11 +1621,14 @@ If COMP or STD is non-nil, put that in the units table instead."
               (insert "   " (nth 2 u) "\n")
               (while (eq (car (car (setq uptr (cdr uptr)))) 0)))
             (insert "\n\n")
-            (insert "(**) When in TeX or LaTeX display mode, the TeX specific unit\n"
-                     "names will not use the `tex' prefix; the unit name for a\n"
-                     "TeX point will be `pt' instead of `texpt', for example.\n"
-                     "To avoid conflicts, the unit names for pint and parsec will\n"
-                     "be `pint' and `parsec' instead of `pt' and `pc'."))
+            (insert
+             (format
+              (concat
+               "(**) When in TeX or LaTeX display mode, the TeX specific unit\n"
+               "names will not use the ‘tex’ prefix; the unit name for a\n"
+               "TeX point will be ‘pt’ instead of ‘texpt’, for example.\n"
+               "To avoid conflicts, the unit names for pint and parsec will\n"
+               "be ‘pint’ and ‘parsec’ instead of ‘pt’ and ‘pc’."))))
          (view-mode)
          (message "Formatting units table...done"))
        (setq math-units-table-buffer-valid t)
index c1ef8954c3c87b6c6457f17374af244dd04a6715..c7a3e716d614ebd4cfdead75a2438f627e5c3a60 100644 (file)
       (cons 'vec (nreverse (sort (copy-sequence (cdr vec)) 'math-beforep)))
     (math-reject-arg vec 'vectorp)))
 
-;; The variable math-grade-vec is local to calcFunc-grade and 
+;; The variable math-grade-vec is local to calcFunc-grade and
 ;; calcFunc-rgrade, but is used by math-grade-beforep, which is called
 ;; by calcFunc-grade and calcFunc-rgrade.
 (defvar math-grade-vec)
                  (setq bin (math-floor bin)))
             (and (natnump bin)
                  (< bin n)
-                 (aset res bin 
+                 (aset res bin
                        (math-add (aref res bin)
                                  (if wvec (car (setq wp (cdr wp))) wts)))))
            (cons 'vec (append res nil))))
                (while (and tbds (Math-lessp (car tbds) num))
                  (setq i (1+ i))
                  (setq tbds (cdr tbds)))
-               (aset res i 
+               (aset res i
                      (math-add (aref res i)
                                (if wvec (car (setq wp (cdr wp))) wts))))
              (setq vp (cdr vp)))
@@ -1550,7 +1550,7 @@ of two matrices is a matrix."
 ;; indirectly) by math-read-brackets.
 (defvar math-rb-close)
 
-;; The next few variables are local to math-read-exprs in calc-aent.el 
+;; The next few variables are local to math-read-exprs in calc-aent.el
 ;; and math-read-expr in calc-ext.el, but are set in functions they call.
 (defvar math-exp-pos)
 (defvar math-exp-str)
@@ -1618,13 +1618,13 @@ of two matrices is a matrix."
            (if (not (or (equal math-expr-data math-rb-close)
                         (equal math-expr-data ")")
                         (eq math-exp-token 'end)))
-               (throw 'syntax "Expected `]'")))
+               (throw 'syntax "Expected ‘]’")))
        (if (equal math-expr-data ";")
            (let ((math-exp-keep-spaces space-sep))
              (setq vals (cons 'vec (math-read-matrix (list vals))))))
        (if (not (or (equal math-expr-data math-rb-close)
                     (eq math-exp-token 'end)))
-           (throw 'syntax "Expected `]'")))
+           (throw 'syntax "Expected ‘]’")))
       (or (eq math-exp-token 'end)
          (math-read-token))
       vals)))
index 923df5d577f1531d452c7f4172ab51157b78bbdd..d4be8ad832d167f1d6c19a8eb025384391cdcb86 100644 (file)
@@ -603,9 +603,9 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
     (insert (propertize
              (concat
               (or title title "Calc Edit Mode. ")
-              "Press `C-c C-c'"
+              (format "Press ‘C-c C-c’")
               (if allow-ret "" " or RET")
-              " to finish, `C-x k RET' to cancel.\n\n")
+              (format " to finish, ‘C-x k RET’ to cancel.\n\n"))
              'font-lock-face 'italic 'read-only t 'rear-nonsticky t 'front-sticky t))
     (make-local-variable 'calc-edit-top)
     (setq calc-edit-top (point))))
index 52ed5d7eb3d0fa78cfa59db541faade005b10774..b0046dcaf4b371c70cfc6c45a3005e9a55262cc0 100644 (file)
@@ -1474,7 +1474,7 @@ commands given here will actually operate on the *Calculator* stack."
          (and calc-display-trail
               (= (window-width) (frame-width))
               (calc-trail-display 1 t)))
-       (message "Welcome to the GNU Emacs Calculator!  Press `?' or `h' for help, `q' to quit")
+       (message "Welcome to the GNU Emacs Calculator!  Press ‘?’ or ‘h’ for help, ‘q’ to quit")
        (run-hooks 'calc-start-hook)
        (and (windowp full-display)
             (window-point full-display)
@@ -1622,7 +1622,7 @@ See calc-keypad for details."
                    (stringp (nth 1 err))
                    (string-match "max-specpdl-size\\|max-lisp-eval-depth"
                                  (nth 1 err)))
-              (error "Computation got stuck or ran too long.  Type `M' to increase the limit")
+              (error "Computation got stuck or ran too long.  Type ‘M’ to increase the limit")
             (setq calc-aborted-prefix nil)
             (signal (car err) (cdr err)))))
       (when calc-aborted-prefix
@@ -2303,7 +2303,7 @@ the United States."
                   (calc-delete-selection 1)
                 (calc-pop-stack nn))))))
     (if calc-context-sensitive-enter (calc-cursor-stack-index (1- num)))))
-    
+
 
 
 
@@ -3856,7 +3856,7 @@ Also looks for the equivalent TeX words, \\gets and \\evalto."
 (defun calc-user-invocation ()
   (interactive)
   (unless calc-invocation-macro
-    (error "Use `Z I' inside Calc to define a `C-x * Z' keyboard macro"))
+    (error "Use ‘Z I’ inside Calc to define a ‘C-x * Z’ keyboard macro"))
   (execute-kbd-macro calc-invocation-macro nil))
 
 ;;; User-programmability.