emacs/lisp/calc
Jacob S. Gordon 5bd9fa084d calc: Allow strings with character codes above Latin-1
The current behavior of the functions 'calc-display-strings',
'strings', and 'bstrings' is to skip any vector containing
integers outside the Latin-1 range (0x00-0xFF).  We introduce a
custom variable 'calc-string-maximum-character' to replace this
hard-coded maximum, and to allow vectors containing higher
character codes to be displayed as strings.  The default value
of 0xFF preserves the existing behavior.

* lisp/calc/calc.el (calc-string-maximum-character): Add custom
variable 'calc-string-maximum-character'.
* lisp/calc/calccomp.el (math-vector-is-string): Replace hard-coded
maximum with 'calc-string-maximum-character', and the 'natnump'
assertion with 'characterp'.  The latter guards against the
maximum being larger than '(max-char)', but not on invalid types of
the maximum such as strings.

* test/lisp/calc/calc-tests.el (calc-math-vector-is-string): Add
tests for 'math-vector-is-string' using different values of
'calc-string-maximum-character'.

* doc/misc/calc.texi (Quick Calculator, Strings, Customizing Calc):
Add variable definition for 'calc-string-maximum-character' and
reference thereof when discussing 'calc-display-strings'.
Generalize a comment about string display and availability of 8-bit
fonts.
(Bug#78528)
2025-06-14 17:07:19 +03:00
..
calc-aent.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-alg.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-arith.el Prefer '(evenp A)' to '(= 0 (logand A 1))' 2025-02-17 19:30:44 +01:00
calc-bin.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-comb.el Prefer '(evenp A)' to '(= 0 (% A 2))' 2025-02-17 05:37:10 +01:00
calc-cplx.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-embed.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-ext.el Prefer oddp/evenp to cl-oddp/cl-evenp 2025-02-17 05:37:10 +01:00
calc-fin.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-forms.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-frac.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-funcs.el Prefer '(oddp A)' to '(= 1 (% A 2))' 2025-02-17 05:37:10 +01:00
calc-graph.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-help.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-incom.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-keypd.el lisp/calc/calc-keypd.el (calc-keypad-vector-menu): Don't quote lambda 2025-04-04 16:45:25 -04:00
calc-lang.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-macs.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-map.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-math.el Prefer '(evenp A)' to '(= 0 (% A 2))' 2025-02-17 05:37:10 +01:00
calc-menu.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-misc.el Prefer '(evenp A)' to '(= 0 (% A 2))' 2025-02-17 05:37:10 +01:00
calc-mode.el Don't warn about lexbind cookies when loading calc settings 2025-04-15 12:18:27 +03:00
calc-mtx.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-nlfit.el Delete redundant lambdas around unary functions 2025-02-11 19:04:00 +01:00
calc-poly.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-prog.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-rewr.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-rules.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-sel.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-stat.el Prefer '(evenp A)' to '(= 0 (% A 2))' 2025-02-17 05:37:10 +01:00
calc-store.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-stuff.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-trail.el Fix deleting the first line of calc trail 2025-04-15 11:56:44 +03:00
calc-undo.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-units.el Avoid ln(10) expression in calc units definition 2025-02-03 14:01:11 +01:00
calc-vec.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc-yank.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc.el calc: Allow strings with character codes above Latin-1 2025-06-14 17:07:19 +03:00
calcalg2.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calcalg3.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calccomp.el calc: Allow strings with character codes above Latin-1 2025-06-14 17:07:19 +03:00
calcsel2.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00