Commit e97b68ce authored by David Byers's avatar David Byers
Browse files

Bug fix:

    Allow characterp data as argument to %c formatting directive
    (This affects XEmacs only)

    Compatibility defun for int-to-char.
parent 127d034f
1999-06-15 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-format-aux-help): Handle actual character
arguments for ?c.
* compatibility.el (int-to-char): Provide compatibility for
int-to-char.
1999-06-14 David Byers <davby@ida.liu.se>
* lyskom-buttons.el (lyskom-default-button): Handle uconf-stats.
......
......@@ -175,6 +175,9 @@ KEYS should be a string in the format used for saving keyboard macros
(lyskom-provide-function characterp (obj)
(integerp obj))
(lyskom-provide-function int-to-char (obj)
obj)
(lyskom-compatibility-forms (fboundp 'frame-width)
(fset 'frame-width 'screen-width))
......
......@@ -1115,11 +1115,11 @@ Note that it is not allowed to use deferred insertions in the text."
;; it into the result list
;;
((= format-letter ?c)
(setq result (if (integerp arg)
(char-to-string arg)
(signal 'lyskom-internal-error
(list 'lyskom-format
": argument error")))))
(setq result (cond ((integerp arg) (char-to-string (int-to-char arg)))
((characterp arg) (char-to-string arg))
(t (signal 'lyskom-internal-error
(list 'lyskom-format
": argument error"))))))
;;
;; Format a literal percent character by inserting a string
;; containing it into the result list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment