/[emacs]/emacs/lisp/textmodes/artist.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/artist.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by pj, Mon Jul 16 12:22:59 2001 UTC revision 1.6.4.1 by gerd, Fri Oct 26 09:52:09 2001 UTC
# Line 1  Line 1 
1  ;;; artist.el --- draw ascii graphics with your mouse  ;;; artist.el --- draw ascii graphics with your mouse
2    
3  ;; Copyright (C) 2000 Free Software Foundation, Inc.  ;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
4    
5  ;; Author:       Tomas Abrahamsson <tab@lysator.liu.se>  ;; Author:       Tomas Abrahamsson <tab@lysator.liu.se>
6  ;; Maintainer:   Tomas Abrahamsson <tab@lysator.liu.se>  ;; Maintainer:   Tomas Abrahamsson <tab@lysator.liu.se>
7  ;; Keywords:     mouse  ;; Keywords:     mouse
8  ;; Version:      1.2.2  ;; Version:      1.2.4
9  ;; Release-date: 22-Oct-2000  ;; Release-date: 25-Oct-2001
10  ;; Location:     http://www.lysator.liu.se/~tab/artist/  ;; Location:     http://www.lysator.liu.se/~tab/artist/
11    
12  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
# Line 136  Line 136 
136    
137  ;;; ChangeLog:  ;;; ChangeLog:
138    
139    ;; 1.2.4        25-Oct-2001
140    ;; Bugfix:      Some operations (the edit menu) got hidden
141    ;; Bugfix:      The first arrow for poly-lines was always pointing
142    ;;              to the right
143    ;; Changed:     Updated with changes made for Emacs 21.1
144    ;;
145    ;; 1.2.3        20-Nov-2000
146    ;; Bugfix:      Autoload cookie corrected
147    ;;
148  ;; 1.2.2        19-Nov-2000  ;; 1.2.2        19-Nov-2000
149  ;; Changed:     More documentation fixes.  ;; Changed:     More documentation fixes.
150  ;; Bugfix:      The arrow characters (`artist-arrows'), which  ;; Bugfix:      The arrow characters (`artist-arrows'), which
# Line 178  Line 187 
187    
188  ;; Variables  ;; Variables
189    
190  (defconst artist-version "1.2.2")  (defconst artist-version "1.2.4")
191  (defconst artist-maintainer-address "tab@lysator.liu.se")  (defconst artist-maintainer-address "tab@lysator.liu.se")
192    
193    
# Line 701  The fill char is used instead, if it is Line 710  The fill char is used instead, if it is
710                   2                   2
711                   artist-draw-square                   artist-draw-square
712                   (artist-undraw-square                   (artist-undraw-square
713                    artist-t artist-cut-square)))))                    artist-t artist-cut-square))))))
714    
715         (graphics-operation         (graphics-operation
716          ("Copy" (("copy rectangle" copy-r "copy-r"          ("Copy" (("copy rectangle" copy-r "copy-r"
# Line 717  The fill char is used instead, if it is Line 726  The fill char is used instead, if it is
726                    2                    2
727                    artist-draw-square                    artist-draw-square
728                    (artist-undraw-square                    (artist-undraw-square
729                     artist-t artist-copy-square)))))                     artist-t artist-copy-square))))))
730    
731         (graphics-operation         (graphics-operation
732          ("Paste" (("paste" paste "paste"          ("Paste" (("paste" paste "paste"
# Line 745  The fill char is used instead, if it is Line 754  The fill char is used instead, if it is
754                          nil nil nil                          nil nil nil
755                          1                          1
756                          artist-flood-fill                          artist-flood-fill
757                          nil)))))))))                          nil)))))))
758    
759      (menu      (menu
760       ("Settings"       ("Settings"
# Line 1675  info-variant-part." Line 1684  info-variant-part."
1684    "Call function FN with ARGS iff FN is not nil."    "Call function FN with ARGS iff FN is not nil."
1685    (list 'if fn (cons 'funcall (cons fn args))))    (list 'if fn (cons 'funcall (cons fn args))))
1686    
1687    (defvar artist-butlast-fn 'artist-butlast
1688      "The butlast function")
1689    
1690    (if (fboundp 'butlast)
1691        (setq artist-butlast-fn 'butlast)
1692      (setq artist-butlast-fn 'artist-butlast))
1693    
1694    (defun artist-butlast (l)
1695      "Return the list L with all elements but the last."
1696      (cond ((null l) nil)
1697            ((null (cdr l)) nil)
1698            (t (cons (car l) (artist-butlast (cdr l))))))
1699    
1700    
1701  (defun artist-last (seq &optional n)  (defun artist-last (seq &optional n)
1702    "Return the last link in the list SEQ.    "Return the last link in the list SEQ.
1703  With optional argument N, returns Nth-to-last link (default 1)."  With optional argument N, returns Nth-to-last link (default 1)."
# Line 3341  The POINT-LIST is expected to cover the Line 3364  The POINT-LIST is expected to cover the
3364                                         (t c)))))                                         (t c)))))
3365             ;; The cdr and butlast below is so we don't draw the middle top             ;; The cdr and butlast below is so we don't draw the middle top
3366             ;; and middle bottom char twice.             ;; and middle bottom char twice.
3367             (butlast (cdr (reverse right-half)))))             (funcall artist-butlast-fn (cdr (reverse right-half)))))
3368      (append right-half left-half)))      (append right-half left-half)))
3369    
3370    
# Line 4952  The event, EV, is the mouse event." Line 4975  The event, EV, is the mouse event."
4975           (y2           y1-last)           (y2           y1-last)
4976           (is-down      t)           (is-down      t)
4977           (shape        nil)           (shape        nil)
4978           (point-list   (list (artist-make-endpoint x1-last y1-last)))           (point-list   nil)
4979           (done         nil))           (done         nil))
4980      (select-window (posn-window ev-start))      (select-window (posn-window ev-start))
4981      (artist-funcall init-fn x1-last y1-last)      (artist-funcall init-fn x1-last y1-last)
# Line 5125  The event, EV, is the mouse event." Line 5148  The event, EV, is the mouse event."
5148          (artist-funcall fill-fn point-list))          (artist-funcall fill-fn point-list))
5149    
5150      ;; Maybe set arrow points      ;; Maybe set arrow points
5151      (if (artist-funcall arrow-pred)      (if (and point-list (artist-funcall arrow-pred))
5152          (artist-funcall arrow-set-fn point-list)          (artist-funcall arrow-set-fn point-list)
5153        (artist-clear-arrow-points))        (artist-clear-arrow-points))
5154    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26