Function: artist-key-set-point-common

artist-key-set-point-common is a byte-compiled function defined in artist.el.gz.

Signature

(artist-key-set-point-common ARG)

Documentation

Common routine for setting point in current shape.

With non-nil ARG, set the last point.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-key-set-point-common (arg)
  "Common routine for setting point in current shape.
With non-nil ARG, set the last point."
  (let ((draw-how    (artist-go-get-draw-how-from-symbol artist-curr-go))
	(col         (artist-current-column))
	(row         (artist-current-line))
	(was-drawing artist-key-is-drawing))

    ;; First, if we are about to draw, then reset the draw-region
    (if (not artist-key-is-drawing)
	(artist-draw-region-reset))

    ;; Depending on what we are currently drawing, call other routines
    ;; that knows how to do the job
    ;;
    (cond ((eq draw-how 'artist-do-continously)
	   (artist-key-set-point-continously col row)
	   ;; Do this now, otherwise nothing will happen until we move.
	   (artist-key-do-continously-continously col row))
	  ((eq draw-how 'artist-do-poly)
	   (artist-key-set-point-poly col row arg))
	  ((and (numberp draw-how) (= draw-how 1))
	   (artist-key-set-point-1point col row))
	  ((and (numberp draw-how) (= draw-how 2))
	   (artist-key-set-point-2points col row))
	  (t (message "Drawing \"%s\"s is not yet implemented" draw-how)))

    ;; Maybe trim line endings
    (if (and artist-trim-line-endings
	     was-drawing
	     (not artist-key-is-drawing))
	(artist-draw-region-trim-line-endings artist-draw-region-min-y
					      artist-draw-region-max-y))

    ;; Now restore the old position
    ;;
    (artist-move-to-xy col row)
    (artist-mode-line-show-curr-operation artist-key-is-drawing)))