comparison lisp/textmodes/picture.el @ 20959:9b831f34ff7d

Customized.
author Stephen Eglen <stephen@gnu.org>
date Sun, 22 Feb 1998 17:34:42 +0000
parents 3febbe908cc3
children 7a9b0b88448e
comparison
equal deleted inserted replaced
20958:806727604be8 20959:9b831f34ff7d
29 ;; support for rectangle operations and `etch-a-sketch' character 29 ;; support for rectangle operations and `etch-a-sketch' character
30 ;; insertion in any of eight directions. 30 ;; insertion in any of eight directions.
31 31
32 ;;; Code: 32 ;;; Code:
33 33
34 (defvar picture-rectangle-ctl ?+ 34 (defgroup picture nil
35 "*Character picture-draw-rectangle uses for top left corners.") 35 "Picture mode --- editing using quarter-plane screen model."
36 (defvar picture-rectangle-ctr ?+ 36 :prefix "picture-"
37 "*Character picture-draw-rectangle uses for top right corners.") 37 :group 'editing)
38 (defvar picture-rectangle-cbr ?+ 38
39 "*Character picture-draw-rectangle uses for bottom right corners.") 39 (defcustom picture-rectangle-ctl ?+
40 (defvar picture-rectangle-cbl ?+ 40 "*Character `picture-draw-rectangle' uses for top left corners."
41 "*Character picture-draw-rectangle uses for bottom left corners.") 41 :type 'character
42 (defvar picture-rectangle-v ?| 42 :group 'picture)
43 "*Character picture-draw-rectangle uses for vertical lines.") 43 (defcustom picture-rectangle-ctr ?+
44 (defvar picture-rectangle-h ?- 44 "*Character `picture-draw-rectangle' uses for top right corners."
45 "*Character picture-draw-rectangle uses for horizontal lines.") 45 :type 'character
46 :group 'picture)
47 (defcustom picture-rectangle-cbr ?+
48 "*Character `picture-draw-rectangle' uses for bottom right corners."
49 :type 'character
50 :group 'picture)
51 (defcustom picture-rectangle-cbl ?+
52 "*Character `picture-draw-rectangle' uses for bottom left corners."
53 :type 'character
54 :group 'picture)
55 (defcustom picture-rectangle-v ?|
56 "*Character `picture-draw-rectangle' uses for vertical lines."
57 :type 'character
58 :group 'picture)
59 (defcustom picture-rectangle-h ?-
60 "*Character `picture-draw-rectangle' uses for horizontal lines."
61 :type 'character
62 :group 'picture)
63
46 64
47 ;; Picture Movement Commands 65 ;; Picture Movement Commands
48 66
49 (defun picture-beginning-of-line (&optional arg) 67 (defun picture-beginning-of-line (&optional arg)
50 "Position point at the beginning of the line. 68 "Position point at the beginning of the line.
288 (if (< change 0) 306 (if (< change 0)
289 (insert-char ?\ (- change))))) 307 (insert-char ?\ (- change)))))
290 308
291 ;; Picture Tabs 309 ;; Picture Tabs
292 310
293 (defvar picture-tab-chars "!-~" 311 (defcustom picture-tab-chars "!-~"
294 "*A character set which controls behavior of commands 312 "*A character set which controls behavior of commands.
295 \\[picture-set-tab-stops] and \\[picture-tab-search]. It is NOT a 313 \\[picture-set-tab-stops] and \\[picture-tab-search]. It is NOT a
296 regular expression, any regexp special characters will be quoted. 314 regular expression, any regexp special characters will be quoted.
297 It defines a set of \"interesting characters\" to look for when setting 315 It defines a set of \"interesting characters\" to look for when setting
298 \(or searching for) tab stops, initially \"!-~\" (all printing characters). 316 \(or searching for) tab stops, initially \"!-~\" (all printing characters).
299 For example, suppose that you are editing a table which is formatted thus: 317 For example, suppose that you are editing a table which is formatted thus:
311 taken for indicating a range (e.g. \"-A-Z\" declares the set to be the 329 taken for indicating a range (e.g. \"-A-Z\" declares the set to be the
312 letters `A' through `Z' and the character `-'). If you want the 330 letters `A' through `Z' and the character `-'). If you want the
313 character `\\' in the set it must be preceded by itself: \"\\\\\". 331 character `\\' in the set it must be preceded by itself: \"\\\\\".
314 332
315 The command \\[picture-tab-search] is defined to move beneath (or to) a 333 The command \\[picture-tab-search] is defined to move beneath (or to) a
316 character belonging to this set independent of the tab stops list.") 334 character belonging to this set independent of the tab stops list."
335 :type 'string
336 :group 'picture)
317 337
318 (defun picture-set-tab-stops (&optional arg) 338 (defun picture-set-tab-stops (&optional arg)
319 "Set value of `tab-stop-list' according to context of this line. 339 "Set value of `tab-stop-list' according to context of this line.
320 This controls the behavior of \\[picture-tab]. A tab stop is set at 340 This controls the behavior of \\[picture-tab]. A tab stop is set at
321 every column occupied by an \"interesting character\" that is preceded 341 every column occupied by an \"interesting character\" that is preceded
559 (define-key picture-mode-map "\C-c`" 'picture-movement-nw) 579 (define-key picture-mode-map "\C-c`" 'picture-movement-nw)
560 (define-key picture-mode-map "\C-c'" 'picture-movement-ne) 580 (define-key picture-mode-map "\C-c'" 'picture-movement-ne)
561 (define-key picture-mode-map "\C-c/" 'picture-movement-sw) 581 (define-key picture-mode-map "\C-c/" 'picture-movement-sw)
562 (define-key picture-mode-map "\C-c\\" 'picture-movement-se))) 582 (define-key picture-mode-map "\C-c\\" 'picture-movement-se)))
563 583
564 (defvar picture-mode-hook nil 584 (defcustom picture-mode-hook nil
565 "If non-nil, its value is called on entry to Picture mode. 585 "If non-nil, its value is called on entry to Picture mode.
566 Picture mode is invoked by the command \\[picture-mode].") 586 Picture mode is invoked by the command \\[picture-mode]."
587 :type 'hook
588 :group 'picture)
567 589
568 (defvar picture-mode-old-local-map) 590 (defvar picture-mode-old-local-map)
569 (defvar picture-mode-old-mode-name) 591 (defvar picture-mode-old-mode-name)
570 (defvar picture-mode-old-major-mode) 592 (defvar picture-mode-old-major-mode)
571 (defvar picture-mode-old-truncate-lines) 593 (defvar picture-mode-old-truncate-lines)