diff options
| author | Glenn Morris | 2010-10-02 19:22:40 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-02 19:22:40 -0700 |
| commit | f88cd1141101429b2495f8246fb59d986cde0b85 (patch) | |
| tree | 19dabee7150e0bb045d20ce59d90cfbdfb39cb4a | |
| parent | 6abfe35f16d4f99bd3f3240e0a2988758f7f5c68 (diff) | |
| download | emacs-f88cd1141101429b2495f8246fb59d986cde0b85.tar.gz emacs-f88cd1141101429b2495f8246fb59d986cde0b85.zip | |
* lisp/textmodes/artist.el (artist-replace-char): Drop Emacs 20 code.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 27 |
2 files changed, 9 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 901516cfeae..2b38bac89a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-10-03 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-03 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * textmodes/artist.el (artist-replace-char): Drop Emacs 20 code. | ||
| 4 | |||
| 3 | * printing.el: Drop Emacs 20 code. | 5 | * printing.el: Drop Emacs 20 code. |
| 4 | 6 | ||
| 5 | * calendar/appt.el (appt-delete): Don't autoload it (you can't use it | 7 | * calendar/appt.el (appt-delete): Don't autoload it (you can't use it |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index bca7eed00d2..549b3b3c52a 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; artist.el --- draw ascii graphics with your mouse | 1 | ;;; artist.el --- draw ascii graphics with your mouse |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
| 4 | ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | ;; 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Tomas Abrahamsson <tab@lysator.liu.se> | 6 | ;; Author: Tomas Abrahamsson <tab@lysator.liu.se> |
| 7 | ;; Maintainer: Tomas Abrahamsson <tab@lysator.liu.se> | 7 | ;; Maintainer: Tomas Abrahamsson <tab@lysator.liu.se> |
| @@ -1957,24 +1957,11 @@ The replacement is used to convert tabs and new-lines to spaces." | |||
| 1957 | 1957 | ||
| 1958 | (defun artist-replace-char (new-char) | 1958 | (defun artist-replace-char (new-char) |
| 1959 | "Replace the character at point with NEW-CHAR." | 1959 | "Replace the character at point with NEW-CHAR." |
| 1960 | ;; Check that the variable exists first. The doc says it was added in 19.23. | 1960 | (let ((overwrite-mode 'overwrite-mode-textual) |
| 1961 | (if (and (and (boundp 'emacs-major-version) (= emacs-major-version 20)) | 1961 | (fill-column 32765) ; Large :-) |
| 1962 | (and (boundp 'emacs-minor-version) (<= emacs-minor-version 3))) | 1962 | (blink-matching-paren nil)) |
| 1963 | ;; This is a bug workaround for Emacs 20, versions up to 20.3: | 1963 | (setq last-command-event (artist-get-replacement-char new-char)) |
| 1964 | ;; The self-insert-command doesn't care about the overwrite-mode, | 1964 | (self-insert-command 1))) |
| 1965 | ;; so the insertion is done in the same way as in picture mode. | ||
| 1966 | ;; This seems to be a little bit slower. | ||
| 1967 | (progn | ||
| 1968 | (artist-move-to-xy (1+ (artist-current-column)) | ||
| 1969 | (artist-current-line)) | ||
| 1970 | (delete-char -1) | ||
| 1971 | (insert (artist-get-replacement-char new-char))) | ||
| 1972 | ;; In emacs-19, the self-insert-command works better and faster | ||
| 1973 | (let ((overwrite-mode 'overwrite-mode-textual) | ||
| 1974 | (fill-column 32765) ; Large :-) | ||
| 1975 | (blink-matching-paren nil)) | ||
| 1976 | (setq last-command-event (artist-get-replacement-char new-char)) | ||
| 1977 | (self-insert-command 1)))) | ||
| 1978 | 1965 | ||
| 1979 | (defun artist-replace-chars (new-char count) | 1966 | (defun artist-replace-chars (new-char count) |
| 1980 | "Replace characters at point with NEW-CHAR. COUNT chars are replaced." | 1967 | "Replace characters at point with NEW-CHAR. COUNT chars are replaced." |