-
Notifications
You must be signed in to change notification settings - Fork 0
/
column-marker.elc
76 lines (72 loc) · 6.92 KB
/
column-marker.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
;ELC
;;; Compiled by [email protected] on Fri Oct 1 12:29:40 2010
;;; from file /Users/oceanhug/.emacs.d/column-marker.el
;;; in Emacs version 22.3.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
(< (aref emacs-version (1- (length emacs-version))) ?A)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19.29")))
(error "`column-marker.el' was compiled for Emacs 19.29 or later"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@110 Face used for a column marker. Usually a background color.
Changing this directly affects only new markers.
(defvar column-marker-1-face 'column-marker-1-face (#$ . 604))
(custom-declare-face 'column-marker-1-face '((t (:background "gray"))) "Face used for a column marker. Usually a background color." :group 'faces)
#@110 Face used for a column marker. Usually a background color.
Changing this directly affects only new markers.
(defvar column-marker-2-face 'column-marker-2-face (#$ . 931))
(custom-declare-face 'column-marker-2-face '((t (:background "cyan3"))) "Face used for a column marker. Usually a background color." :group 'faces)
#@110 Face used for a column marker. Usually a background color.
Changing this directly affects only new markers.
(defvar column-marker-3-face 'column-marker-3-face (#$ . 1259))
(custom-declare-face 'column-marker-3-face '((t (:background "orchid3"))) "Face used for a column marker. Usually a background color." :group 'faces)
#@46 List of all internal column-marker variables
(defvar column-marker-vars nil (#$ . 1589))
(make-variable-buffer-local 'column-marker-vars)
#@47 Define a column marker named %%colmark%%-VAR.
(defalias 'column-marker-create '(macro . #[(var &optional face) "\206 \302\303\304 \305BB\306\307 DD\310 \311\312\313!\314\315\316\317\260\320\321\322\307 D\323BB\324\307 D\325BBE\326\327\330\307 D\331FD\332\333\334\330\307 D\335BB\336BBBD\337\330\307 D\340FD\341BBBB\257F\207" [face var column-marker-1-face progn defvar (nil "Buffer local. Used internally to store column marker spec.") make-variable-buffer-local quote defun (arg) "Highlight column with face `" symbol-name "'.\nWith no prefix argument, highlight current column.\n" "With non-negative numeric prefix arg, highlight that column number.\n" "With plain `C-u' (no number), turn off this column marker.\n" "With `C-u C-u' or negative prefix arg, turn off all column-marker highlighting." (interactive "P") unless memq (column-marker-vars) push (column-marker-vars) cond (null arg) column-marker-internal (1+ (current-column)) (consp arg) if (= 4 (car arg)) (nil) ((dolist (var column-marker-vars) (column-marker-internal var nil))) (and (integerp arg) (>= arg 0)) (1+ (prefix-numeric-value arg)) ((t (dolist (var column-marker-vars) (column-marker-internal var nil))))] 17 (#$ . 1733)]))
#@57 Creates a function to locate a character in column COL.
(defalias 'column-marker-find #[(col) "\301\302\303\304\305\306\307\310E\311BB\312\307\313E\314DE\315\316\307\317E\320BB\314DE\321\316\322\323BB\324BB\325BB\257E\207" [col lambda (end) let* ((start (point))) (when (> end (point-max)) (setq end (point-max))) unless < (current-column) ((forward-line 1)) when (current-column) move-to-column while and (current-column) ((< (point) end) (= 0 (+ (forward-line 1) (current-column)))) if = ((current-column)) ((<= (point) end) (> (point) start)) ((progn (set-match-data (list (1- (point)) (point))) t) (goto-char start) nil)] 13 (#$ . 2947)])
#@198 SYM is the symbol for holding the column marker context.
COL is the column in which a marker should be set.
FACE is the face to use for the marker.
Supplying nil or 0 for COL turns off the marker.
(defalias 'column-marker-internal #[(sym col &optional face) "\206 \303 J\203 \304\305 J\"\210 \305L\210\n<\204 \n\306W\203\"