]> git.eshelyaron.com Git - emacs.git/commitdiff
(artist-version): 1.2.4.
authorGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 09:51:14 +0000 (09:51 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 09:51:14 +0000 (09:51 +0000)
(artist-butlast-fn): New variable.
(artist-butlast): New function.
(artist-ellipse-mirror-quadrant): Use it.
(artist-mouse-draw-poly): Use nil for `point-list'.
(artist-mouse-draw-poly): Check for point-list being nil.

lisp/ChangeLog
lisp/textmodes/artist.el

index 473a019d616d03608fc2c0e369d90423c20faff5..c61548b5a6c2f0b65b9ff8f8dcdbf847fbee7c6f 100644 (file)
@@ -1,3 +1,12 @@
+2001-10-26  Tomas Abrahamsson  <tab@lysator.liu.se>
+
+       * textmodes/artist.el (artist-version): 1.2.4.
+       (artist-butlast-fn): New variable.
+       (artist-butlast): New function.
+       (artist-ellipse-mirror-quadrant): Use it.
+       (artist-mouse-draw-poly): Use nil for `point-list'.
+       (artist-mouse-draw-poly): Check for point-list being nil.
+
 2001-10-26  Peter Kleiweg  <kleiweg@let.rug.nl>
 
        * progmodes/ps-mode.el (ps-mode-print-function): Remove quote for
index a918e720b7ff4d46099508f7498bdfe950ca21ce..3ace091f018494942a4580f4e2c3bcf2fb246871 100644 (file)
@@ -1,12 +1,12 @@
 ;;; artist.el --- draw ascii graphics with your mouse
 
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
 ;; Author:       Tomas Abrahamsson <tab@lysator.liu.se>
 ;; Maintainer:   Tomas Abrahamsson <tab@lysator.liu.se>
 ;; Keywords:     mouse
-;; Version:     1.2.2
-;; Release-date: 22-Oct-2000
+;; Version:     1.2.4
+;; Release-date: 25-Oct-2001
 ;; Location:     http://www.lysator.liu.se/~tab/artist/
 
 ;; This file is part of GNU Emacs.
 
 ;;; ChangeLog:
 
+;; 1.2.4       25-Oct-2001
+;; Bugfix:     Some operations (the edit menu) got hidden
+;; Bugfix:      The first arrow for poly-lines was always pointing
+;;              to the right
+;; Changed:    Updated with changes made for Emacs 21.1
+;;
+;; 1.2.3       20-Nov-2000
+;; Bugfix:     Autoload cookie corrected
+;;
 ;; 1.2.2       19-Nov-2000
 ;; Changed:    More documentation fixes.
 ;; Bugfix:     The arrow characters (`artist-arrows'), which 
 
 ;; Variables
 
-(defconst artist-version "1.2.2")
+(defconst artist-version "1.2.4")
 (defconst artist-maintainer-address "tab@lysator.liu.se")
 
 
@@ -701,7 +710,7 @@ The fill char is used instead, if it is set.")
                 2
                 artist-draw-square
                 (artist-undraw-square
-                 artist-t artist-cut-square)))))
+                 artist-t artist-cut-square))))))
 
        (graphics-operation
        ("Copy" (("copy rectangle" copy-r "copy-r"
@@ -717,7 +726,7 @@ The fill char is used instead, if it is set.")
                  2
                  artist-draw-square
                  (artist-undraw-square
-                  artist-t artist-copy-square)))))
+                  artist-t artist-copy-square))))))
 
        (graphics-operation
        ("Paste" (("paste" paste "paste"
@@ -745,7 +754,7 @@ The fill char is used instead, if it is set.")
                        nil nil nil
                        1
                        artist-flood-fill
-                       nil)))))))))
+                       nil)))))))
 
     (menu
      ("Settings"
@@ -1675,6 +1684,20 @@ info-variant-part."
   "Call function FN with ARGS iff FN is not nil."
   (list 'if fn (cons 'funcall (cons fn args))))
 
+(defvar artist-butlast-fn 'artist-butlast
+  "The butlast function")
+
+(if (fboundp 'butlast)
+    (setq artist-butlast-fn 'butlast)
+  (setq artist-butlast-fn 'artist-butlast))
+
+(defun artist-butlast (l)
+  "Return the list L with all elements but the last."
+  (cond ((null l) nil)
+       ((null (cdr l)) nil)
+       (t (cons (car l) (artist-butlast (cdr l))))))
+
+
 (defun artist-last (seq &optional n)
   "Return the last link in the list SEQ.
 With optional argument N, returns Nth-to-last link (default 1)."
@@ -3341,7 +3364,7 @@ The POINT-LIST is expected to cover the first quadrant."
                                       (t c)))))
           ;; The cdr and butlast below is so we don't draw the middle top
           ;; and middle bottom char twice.
-          (butlast (cdr (reverse right-half)))))
+          (funcall artist-butlast-fn (cdr (reverse right-half)))))
     (append right-half left-half)))
 
 
@@ -4952,7 +4975,7 @@ The event, EV, is the mouse event."
         (y2           y1-last)
         (is-down      t)
         (shape        nil)
-        (point-list   (list (artist-make-endpoint x1-last y1-last)))
+        (point-list   nil)
         (done         nil))
     (select-window (posn-window ev-start))
     (artist-funcall init-fn x1-last y1-last)
@@ -5125,7 +5148,7 @@ The event, EV, is the mouse event."
        (artist-funcall fill-fn point-list))
 
     ;; Maybe set arrow points
-    (if (artist-funcall arrow-pred)
+    (if (and point-list (artist-funcall arrow-pred))
        (artist-funcall arrow-set-fn point-list)
       (artist-clear-arrow-points))