mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-17 c4001ccd1864293b64aa37d83a9d9457eb875e70
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301\302\303\304\305%\210\306\307\302\310\311\312\304\301\313\314&    \207" [custom-declare-group clean-aindent nil "Settings for 'clean-aindent-mode'" :group indent custom-declare-variable clean-aindent-is-simple-indent "Determines if indentation should use the smart language mode or simple mode" :tag "Clean auto indent is in simple mode" :type boolean] 10)
16 #@65 Computes the length of the line at 'clean-aindent--last-indent.
17 (defalias 'clean-aindent--get-indent-len #[nil "\302\212    b\210\303\210`\304 \210`Z*\207" [eol-pos clean-aindent--last-indent 0 nil beginning-of-line] 2 (#$ . 782)])
18 #@122 Checks if last auto-indent position was abandoned.
19 Verifies if cursor moved away and that the indent was left
20 unaltered.
21 (defalias 'clean-aindent--abandonedp #[nil "\205`U?\205    \302 U\205\303\207" [clean-aindent--last-indent clean-aindent--last-indent-len clean-aindent--get-indent-len t] 2 (#$ . 1022)])
22 #@54 Deletes the whitespaces inserted at last indentation
23 (defalias 'clean-aindent--trim-last-point #[nil "\212b\210\303\211\304 \210`\305\210`\306\n    \"\210\305\210\307\310    `Z\"+\207" [clean-aindent--last-indent e s 0 beginning-of-line nil delete-trailing-whitespace message "auto trimmed %d chars"] 4 (#$ . 1341)])
24 #@64 Checks if last pos of auto-indent was abandoned and deletes it
25 (defalias 'clean-aindent--check-last-point #[nil "\301 \203\302 \210\205`U?\205\303\211\207" [clean-aindent--last-indent clean-aindent--abandonedp clean-aindent--trim-last-point nil] 2 (#$ . 1665)])
26 #@75 Searches lines backward, finds first non-blank. Returns
27 indentation value
28 (defalias 'clean-aindent--find-indent #[nil "\212\300 \210\301 )\207" [clean-aindent--prev-line current-indentation] 1 (#$ . 1942)])
29 #@110 Simple auto indent. Indentation is based only on previous line
30 indentation, regardless of language settings.
31 (defalias 'clean-aindent--simple-newline-and-indent #[nil "\212\302\211\303 \210`\304\210`\305    \"\210\304\210+\306 \210\307\310 \302\"\207" [e s 0 beginning-of-line nil delete-trailing-whitespace newline indent-to clean-aindent--find-indent] 3 (#$ . 2156)])
32 (ad-add-advice 'newline-and-indent '(clean-aindent nil t (advice lambda nil "Advice for newline-and-indent(), implements clean auto-indent.\nRemoves unneeded whitespaces by keeping track of the place of the\nlast indentation so that they can be deleted in case the indentation was\nabandoned." (clean-aindent--check-last-point) (if clean-aindent-is-simple-indent (clean-aindent--simple-newline-and-indent) (progn ad-do-it)) (setq clean-aindent--last-indent nil) (make-local-variable 'clean-aindent--last-indent) (setq clean-aindent--last-indent (point)) (setq clean-aindent--last-indent-len (clean-aindent--get-indent-len)) (make-local-variable 'clean-aindent--last-indent-len))) 'around nil)
33 #@33 Computes length of current line
34 (defalias 'clean-aindent--get-line-len #[nil "\212\301\302!\210`\302\210`Z*\207" [pos beginning-of-line nil] 2 (#$ . 3229)])
35 #@25 Checks if line is empty
36 (defalias 'clean-aindent--line-emptyp #[nil "\212\300\301!\210`\302U?\205\303 \304U)\207" [beginning-of-line nil 1 clean-aindent--get-line-len 0] 2 (#$ . 3395)])
37 #@48 Move cursor to previous line, skip empty lines
38 (defalias 'clean-aindent--prev-line #[nil "`\301y\302U\203\303 \204`U)?\207" [c -1 0 clean-aindent--line-emptyp] 2 (#$ . 3589)])
39 #@89 Searches lines backward, finds the one that is indented less
40 than certain indentation t
41 (defalias 'clean-aindent--find-u-indent #[(start) "\212\302\303 \211\203\304V\203    X\203\305 \204*\207" [c start nil current-indentation 0 clean-aindent--prev-line] 2 (#$ . 3777)])
42 #@92 Returns true if cursor is in the leading whitespace or first
43 non-blank character of a line
44 (defalias 'clean-aindent--inside-indentp #[nil "\212`\301\302!\210\303\302w\210`X\205\304*\207" [pos beginning-of-line nil "     " t] 2 (#$ . 4064)])
45 #@50 Get (point) at the beginning of the current line
46 (defalias 'clean-aindent--line-point #[nil "\212\300 \210`)\207" [beginning-of-line] 1 (#$ . 4312)])
47 #@112 Moves the cursor to a certain column position.
48 Column position is different from char position because of TABs
49 (defalias 'clean-aindent--goto-column #[(col) "\301\302!\210iW\205\303 \210\202\207" [col beginning-of-line nil right-char] 2 (#$ . 4469)])
50 #@185 Unindents.
51 Bound to `M-backspace' key. Searches lines backward, finds the one that
52 is indented less than the current one. Unindents current line to
53 align with that smaller indentation
54 (defalias 'clean-aindent--bsunindent #[(arg) "\305 \204\n\306[!\207\307 \310 \311\n!     \\\211\nU?\205(\312\n!\210\313\n Z!,\207" [arg ln c n s clean-aindent--inside-indentp kill-word clean-aindent--line-point current-indentation clean-aindent--find-u-indent clean-aindent--goto-column backward-delete-char-untabify] 4 (#$ . 4732) "p"])
55 (defvar clean-aindent--last-indent nil)
56 (defvar clean-aindent--last-indent-len 0)
57 #@28 clean-aindent-mode keymap.
58 (defvar clean-aindent-mode--keymap (make-keymap) (#$ . 5346))
59 (byte-code "\301\302\303#\210\304\305\306\307\310\311\312\313\314\315\316\317& \207" [clean-aindent-mode--keymap define-key [remap backward-kill-word] clean-aindent--bsunindent custom-declare-variable clean-aindent-mode nil "Non-nil if Clean-Aindent mode is enabled.\nSee the `clean-aindent-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `clean-aindent-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group clean-aindent :type boolean] 12)
60 #@704 Activates clean auto indent for function 'newline-and-indent' and
61 back-space unindent for M-DEL (meta-backspace).
62
63 clean-aindent mode is a global minor mode.
64
65 1. Extension of 'newline-and-indent' that keeps track of the last
66 auto-indent operation and, if it is abandoned, would take care to
67 trim down the unused white space characters.
68
69 2. Simple indent, if activated, where cursor is aligned with
70 indent of the lines above.
71
72 3. Backspace Unindent. Extension of M-backspace. When cursor is
73 in the indentation space of a line, or at the first character and
74 you press M-backspace it will move the entire line to be aligned
75 to the line above or any other that is with indentation smaller
76 than the current.
77 (defalias 'clean-aindent-mode #[(&optional arg) "\304 \305\302    \306=\203\307\302!?\202\310    !\311V\"\210\n\203/\312\313\314\315#\210\316\313!\210\317\320\321\"\210\202>\322\313\314\315#\210\316\313!\210\323\320\321\"\210\324\325\307\302!\203J\326\202K\327\"\210\330\331!\203v\332\302!\210\304 \203c\304 \232\203v\333\334\335\307\302!\203q\336\202r\337 #\210))\340 \210\307\302!\207" [#1=#:last-message arg clean-aindent-mode local current-message set-default toggle default-value prefix-numeric-value 0 ad-enable-advice newline-and-indent around clean-aindent ad-activate add-hook post-command-hook clean-aindent--check-last-point ad-disable-advice remove-hook run-hooks clean-aindent-mode-hook clean-aindent-mode-on-hook clean-aindent-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Clean-Aindent mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 6053) (list (or current-prefix-arg 'toggle))])
78 (defvar clean-aindent-mode-hook nil)
79 (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\307\211%\210\310\306!\207" [clean-aindent-mode--keymap clean-aindent-mode-hook variable-documentation put "Hook run after entering or leaving `clean-aindent-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" add-minor-mode clean-aindent-mode nil provide] 6)