diff options
| author | Miles Bader <miles@gnu.org> | 2000-12-18 01:18:43 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2000-12-18 01:18:43 +0000 |
| commit | 5a04700221cb704ec8ebdce2ddf76c1f14ec3faa (patch) | |
| tree | 9a5918b10b41aa9633319b4aaca8ba09fc0656ac | |
| parent | dd97db06184ed309989a6c8d876cde653707e705 (diff) | |
| download | emacs-5a04700221cb704ec8ebdce2ddf76c1f14ec3faa.tar.gz | |
(artist-replace-chars, artist-replace-char):
Check that emacs-major-version is `=' to 20, not `>='.
(artist-replace-chars): Use `make-string' instead of a loop.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b2fb3a1bb8..b537260d74f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2000-12-18 Miles Bader <miles@gnu.org> + + * textmodes/artist.el (artist-replace-chars, artist-replace-char): + Check that emacs-major-version is `=' to 20, not `>='. + (artist-replace-chars): Use `make-string' instead of a loop. + 2000-12-16 Eli Zaretskii <eliz@is.elta.co.il> * textmodes/ispell.el (check-ispell-version): If diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index c6da8051f24..918cdffadf8 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1899,7 +1899,7 @@ Also updates the variables `artist-draw-min-y' and `artist-draw-max-y'." (defun artist-replace-char (new-char) "Replace the character at point with NEW-CHAR." ;; Check that the variable exists first. The doc says it was added in 19.23. - (if (and (and (boundp 'emacs-major-version) (>= emacs-major-version 20)) + (if (and (and (boundp 'emacs-major-version) (= emacs-major-version 20)) (and (boundp 'emacs-minor-version) (<= emacs-minor-version 3))) ;; This is a bug workaround for Emacs 20, versions up to 20.3: ;; The self-insert-command doesn't care about the overwrite-mode, @@ -1920,17 +1920,14 @@ Also updates the variables `artist-draw-min-y' and `artist-draw-max-y'." (defun artist-replace-chars (new-char count) "Replace characters at point with NEW-CHAR. COUNT chars are replaced." ;; Check that the variable exists first. The doc says it was added in 19.23. - (if (and (and (boundp 'emacs-major-version) (>= emacs-major-version 20)) + (if (and (and (boundp 'emacs-major-version) (= emacs-major-version 20)) (and (boundp 'emacs-minor-version) (<= emacs-minor-version 3))) ;; This is a bug workaround for Emacs 20, versions up to 20.3: ;; The self-insert-command doesn't care about the overwrite-mode, ;; so the insertion is done in the same way as in picture mode. ;; This seems to be a little bit slower. (let* ((replaced-c (aref artist-replacement-table new-char)) - (replaced-s (let ((tmp-s "") (i count)) - (while (> i 0) - (setq i (1- i)) - (setq tmp-s (concat tmp-s replaced-c)))))) + (replaced-s (make-string count replaced-c))) (artist-move-to-xy (+ (artist-current-column) count) (artist-current-line)) (delete-char (- count)) |
