emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101749: * lisp/textmodes/artist.el (


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101749: * lisp/textmodes/artist.el (artist-replace-char): Drop Emacs 20 code.
Date: Sat, 02 Oct 2010 19:22:40 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101749
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2010-10-02 19:22:40 -0700
message:
  * lisp/textmodes/artist.el (artist-replace-char): Drop Emacs 20 code.
modified:
  lisp/ChangeLog
  lisp/textmodes/artist.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-03 02:17:47 +0000
+++ b/lisp/ChangeLog    2010-10-03 02:22:40 +0000
@@ -1,5 +1,7 @@
 2010-10-03  Glenn Morris  <address@hidden>
 
+       * textmodes/artist.el (artist-replace-char): Drop Emacs 20 code.
+
        * printing.el: Drop Emacs 20 code.
 
        * calendar/appt.el (appt-delete): Don't autoload it (you can't use it

=== modified file 'lisp/textmodes/artist.el'
--- a/lisp/textmodes/artist.el  2010-09-19 09:49:21 +0000
+++ b/lisp/textmodes/artist.el  2010-10-03 02:22:40 +0000
@@ -1,7 +1,7 @@
 ;;; artist.el --- draw ascii graphics with your mouse
 
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010  Free Software Foundation, Inc.
 
 ;; Author:       Tomas Abrahamsson <address@hidden>
 ;; Maintainer:   Tomas Abrahamsson <address@hidden>
@@ -1957,24 +1957,11 @@
 
 (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))
-          (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.
-      (progn
-       (artist-move-to-xy (1+ (artist-current-column))
-                          (artist-current-line))
-       (delete-char -1)
-       (insert (artist-get-replacement-char new-char)))
-    ;; In emacs-19, the self-insert-command works better and faster
-    (let ((overwrite-mode 'overwrite-mode-textual)
-         (fill-column 32765)           ; Large :-)
-         (blink-matching-paren nil))
-      (setq last-command-event (artist-get-replacement-char new-char))
-      (self-insert-command 1))))
+  (let ((overwrite-mode 'overwrite-mode-textual)
+       (fill-column 32765)             ; Large :-)
+       (blink-matching-paren nil))
+    (setq last-command-event (artist-get-replacement-char new-char))
+    (self-insert-command 1)))
 
 (defun artist-replace-chars (new-char count)
   "Replace characters at point with NEW-CHAR.  COUNT chars are replaced."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]