;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311%\210\312\313\314\315\316DD\317\320\321%\210\312\322\314\315\323DD\324\320\325%\210\326\327\330\"\210\326\331\332\"\210\326\333\334\"\207" [require cl-generic cl-lib pcase custom-declare-group valign nil "Visually align text tables on GUI." :group text custom-declare-variable valign-lighter funcall function #[0 "\300\207" [#1=" valign"] 1 #1#] "The lighter string used by function `valign-mode'." :type string valign-fancy-bar #[0 "\300\207" [nil] 1] "Non-nil means to render bar as a full-height line.\nYou need to restart valign mode for this setting to take effect." (choice (const :tag "Enable fancy bar" t) (const :tag "Disable fancy bar" nil)) define-error valign-not-gui "Valign only works in GUI environment" valign-not-on-table "Valign is asked to align a table, but the point is not on one" valign-parse-error "Valign cannot parse the table"] 6) #@203 An alist of (NAME . CHARSET). A charset tells ftable how to parse the table. I.e., what are the box drawing characters to use. Don’t forget the first newline. NAME is the mnemonic for that charset. (defvar valign-box-charset-alist '((ascii . "\n+-++\n| ||\n+-++\n+-++") (unicode . "\n┌─┬┐\n│ ││\n├─┼┤\n└─┴┘")) (#$ . 1342)) #@438 Return a specific box drawing character in CHARSET. Return a string. CHARSET should be like `ftable-box-char-set'. Mapping between CODE and position: ┌┬┐ 123 ├┼┤ <-> 456 └┴┘ 789 ┌─┐ 1 H 3 H: horizontal │ │ <-> V V V: vertical └─┘ 7 H 9 Examples: (ftable-box-char 'h charset) => "─" (ftable-box-char 2 charset) => "┬" (fn CODE CHARSET) (defalias 'valign-box-char #[514 "\300=\203\n\301\202)\302=\203\303\202)\304=\203\305\202)\306=\203(\307\202)\310\3118H!\207" [h 10 v 11 n 12 s 13 char-to-string (nil 1 3 4 11 13 14 16 18 19 2 6 0 7)] 7 (#$ . 1706)]) #@176 Return how is current cell aligned. Return 'left if aligned left, 'right if aligned right. Assumes point is after the left bar (“|”). Doesn’t check if we are in a cell. (defalias 'valign--cell-alignment #[0 "\212\300\301!\203 \302\202.\303\304\305\306#\204\307\310\311\312`\"C\"\202.\313\314`\315Ze]\"\203-\316\202.\302)\207" [looking-at " [^ ]" left search-forward "|" nil t signal valign-parse-error format "Missing the right bar (|) around %s" looking-back "[^ ] |" 3 right] 5 (#$ . 2384)]) #@687 Return (CELL-BEG CONTENT-BEG CONTENT-END CELL-END). CELL-BEG is after the left bar, CELL-END is before the right bar. CELL-CONTENT contains the actual non-white-space content, possibly with a single white space padding on the either side, if there are more than one white space on that side. If the cell is empty, CONTENT-BEG is (min (CELL-BEG + 1) CELL-END) CONTENT-END is (max (CELL-END - 1) CELL-BEG) BAR-CHAR is the separator character (“|”). It is actually a string. Defaults to the normal bar: “|”, but you can provide a Unicode one for Unicode tables. Assumes point is after the left bar (“|”). Assumes there is a right bar. (fn &optional BAR-CHAR) (defalias 'valign--cell-content-config #[256 "\212\211\206\301`\212\302\303 \304#\204\305\306\307\310\303 \"C\"\210\311\224)\312\211\212\313\312w\210\304\314!)\262)\203A\211T^S]F\202\213\313\312w\210`\262b\210\313\312x\210`\262U\203l\211U\203l\305\306\315\316ST\"D\"\210Z\317X\203y\202{SZ\317X\203\207\202\211TF\266\205)\207" [inhibit-changing-match-data "|" search-forward line-end-position t signal valign-parse-error format "Missing the right bar (|) around %d" 0 nil " " looking-at "The cell should contain at least one space" buffer-substring-no-properties 1] 12 (#$ . 2898)]) #@81 Return non-nil if cell is empty. Assumes point is after the left bar (“|”). (defalias 'valign--cell-empty-p #[0 "\212\300\301w\205\n\302\303!)\207" [" " nil looking-at "|"] 2 (#$ . 4215)]) #@190 Return the pixel width of the cell at point. Assumes point is after the left bar (“|”). Return nil if not in a cell. BAR-CHAR is the bar character (“|”). (fn &optional BAR-CHAR) (defalias 'valign--cell-content-width #[256 "\300!\211@A\211@A\211@A\211@A\n\301\"\266\204\207" [valign--cell-content-config valign--pixel-width-from-to] 17 (#$ . 4416)]) #@187 Return the pixel width of the cell at point. If the cell is empty, return 0. Otherwise return cell content’s width. BAR-CHAR is the bar character (“|”). (fn &optional BAR-CHAR) (defalias 'valign--cell-nonempty-width #[256 "\300 \203\301\207\302!\207" [valign--cell-empty-p 0 valign--cell-content-width] 3 (#$ . 4795)]) #@254 Return the width of the glyphs from FROM (inclusive) to TO (exclusive). The buffer has to be in a live window. FROM has to be less than TO and they should be on the same line. Valign display properties must be cleaned before using this. (fn FROM TO) (defalias 'valign--pixel-width-from-to #[514 "\300\301\302 #@\300\301\302 #@\302 =\203\303\304!\202\305\\Z\207" [window-text-pixel-size nil line-beginning-position line-number-display-width pixel 0] 7 (#$ . 5133)]) #@51 Return the x pixel position of POINT. (fn POINT) (defalias 'valign--pixel-x #[257 "\300\301\302 #@\303\304!Z\207" [window-text-pixel-size nil line-beginning-position line-number-display-width pixel] 5 (#$ . 5614)]) #@140 If the current cell is actually a separator. POINT should be after the left bar (“|”), default to current point. (fn &optional POINT) (defalias 'valign--separator-p #[256 "\211f\300=\206 \211f\301=\207" [58 45] 3 (#$ . 5838)]) #@162 Return the alignment of this column. Assumes point is after the left bar (“|”) of a separator cell. We don’t distinguish between left and center aligned. (defalias 'valign--alignment-from-seperator #[0 "\212\300f\301=\203\f\302\202\303\300w\210\300f\301=\203\304\202\302)\207" [nil 58 left "-" right] 2 (#$ . 6078)]) #@224 Go to each row’s beginning and evaluate BODY. At each row, stop at the beginning of the line. Start from point and stop at LIMIT. ROW-IDX-SYM is bound to each row’s index (0-based). (fn ROW-IDX-SYM LIMIT &rest BODY) (defalias 'valign--do-row '(macro . #[642 "\300\301\302BB\303\304\305\306\307BBE\310\311\312\313 DD\"BBBE\207" [progn setq (0) while < (point) min ((point-max)) (beginning-of-line) append (forward-line) cl-incf] 13 (#$ . 6416)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put valign--do-row edebug-form-spec (sexp form &rest form) function-put lisp-indent-function 2] 4) #@293 Go to each column in the row and evaluate BODY. Start from point and stop at the end of the line. Stop after the cell bar (“|”) in each iteration. BAR-CHAR is "|" for the most case. COLUMN-IDX-SYM is bound to the index of the column (0-based). (fn COLUMN-IDX-SYM BAR-CHAR &rest BODY) (defalias 'valign--do-column '(macro . #[642 "\300\301\302BB\303\304\305\306BB\307\310\311\312\313 DEDBB\314 DFF\207" [progn setq (0) (beginning-of-line) while search-forward ((line-end-position) t) unless looking-at format "[^%s]*\n" regexp-quote cl-incf] 14 (#$ . 7042)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put valign--do-column edebug-form-spec (sexp &rest form) function-put lisp-indent-function 2] 4) #@32 Transpose MATRIX. (fn MATRIX) (defalias 'valign--transpose #[257 "\300@GS\301X\2035\301\211:\203&@\2628B\262A\262\202\211\237\266\203B\262T\262\202\211\237\207" [0 nil] 9 (#$ . 7780)]) #@176 Check that the dimension of MATRIX is correct. Correct dimension means each row has the same number of columns. Return t if the dimension is correct, nil if not. (fn MATRIX) (defalias 'valign---check-dimension #[257 "\211@GA\300\301\300:\203-@\262G=\204\"\300\262\300\211\262\202#\301\203-A\262\202\2035\301\2026\211\266\204\207" [nil t] 8 (#$ . 7996)]) #@245 Return t if this line is a separator line. If the table is a table.el table, you need to specify CHARSET. If the table is not a table.el table, DON’T specify CHARSET. Assumes the point is at the beginning of the line. (fn &optional CHARSET) (defalias 'valign--separator-line-p #[256 "\212\301\302w\210\211\203'\211\206@A\303\302f!\304\305\"\304\306\"\304\307\"E\235\262\2022\302f\310=\2052\311`T!)\207" [valign-box-charset-alist " " nil char-to-string valign-box-char 1 4 7 124 valign--separator-p] 8 (#$ . 8377)]) #@220 Return a list of column widths. Each column width is the largest cell width of the column. Start from point, stop at LIMIT. If the table is a table.el table, you need to specify CHARSET. (fn LIMIT &optional CHARSET) (defalias 'valign--calculate-cell-width #[513 "\211\203 \300\301\"\202\f\302\303\211\211\211\212\304\262`d^W\203d\305 \210\306!\204Z\303\262\304\262\305 \210\307\310 \311#\203S\312\313\314\315!\"!\204L\316!B\262T\262\2020\317!B\262\303y\210T\262\202)\320!\204p\321\322\323\"\210\324\317!!\262\325\326\"\207" [valign-box-char v "|" nil 0 beginning-of-line valign--separator-line-p search-forward line-end-position t looking-at format "[^%s]*\n" regexp-quote valign--cell-nonempty-width reverse valign---check-dimension signal valign-parse-error ("The number of columns for each row don’t match, maybe a bar (|) is missing?") valign--transpose mapcar #[257 "\300\301\"\302\\\207" [apply max 8] 4 "\n\n(fn COL)"]] 12 (#$ . 8913)]) (byte-code "\300\301\302\303\302\304%\210\300\301\302\305\302\306%\207" [cl-generic-define-method valign--calculate-alignment nil ((type (eql markdown)) limit) #[514 "\300\211\211\211\212\301\262`d^W\203Q\302 \210\303 \203G\300\262\301\262\302 \210\304\305\306 \307#\203@\310\311\312\305\"!\2049\313 B\262T\262\202!\314!B\262\300y\210T\262\202)\315!\204]\316\317\320\"\210\321\314!!\262\203o\322\323\"\202\217\206t\301\301\211W\203\211\211\324B\262\210\211T\262\202u\211\262\266\202\207" [nil 0 beginning-of-line valign--separator-line-p search-forward "|" line-end-position t looking-at format #1="[^%s]*\n" valign--alignment-from-seperator reverse valign---check-dimension signal valign-parse-error ("The number of columns for each row don’t match, maybe a bar (|) is missing?") valign--transpose mapcar car left] 11 "Return a list of alignments ('left or 'right) for each column.\nTYPE must be 'markdown. Start at point, stop at LIMIT.\n\n(fn TYPE LIMIT)"] ((type (eql org)) limit) #[514 "\300\211\211\211\212\301\262`d^W\203Q\302 \210\303 \204G\300\262\301\262\302 \210\304\305\306 \307#\203@\310\311\312\305\"!\2049\313 B\262T\262\202!\314!B\262\300y\210T\262\202\315!\204\\\316\317\320\"\210\321\314!!\262\322\323\")\207" [nil 0 beginning-of-line valign--separator-line-p search-forward "|" line-end-position t looking-at format #1# valign--cell-alignment reverse valign---check-dimension signal valign-parse-error ("The number of columns for each row don’t match, maybe a bar (|) is missing?") valign--transpose mapcar #[257 "\300\301\"\300\302\"V\203\301\202\302\207" [cl-count left right] 5 "\n\n(fn COL)"]] 10 "Return a list of alignments ('left or 'right) for each column.\nTYPE must be 'org. Start at point, stop at LIMIT.\n\n(fn TYPE LIMIT)"]] 6) #@40 Return non-nil if point is in a table. (defalias 'valign--at-table-p #[0 "\212\301 \210\302\303w\210\304\303f!`Tf\211\205\304!\262\305\232\206\261\303\211\306\303:\203\251@\262A\262\307\310\"\232\204\224\307\311\"\232\203X\307\312\"\307\313\"\307\314\"E\235\204\224\307\315\"\232\203v\307\316\"\307\317\"\307\314\"E\235\204\224\307\320\"\232\203\236\307\321\"\307\322\"\307\314\"E\235\203\236\306\262\303\211\262\202\237\306\203\251A\262\202#?\205\257\211\266\205\266\202)\207" [valign-box-charset-alist beginning-of-line " " nil char-to-string "|" t valign-box-char v 1 2 3 h 4 5 6 7 8 9] 13 (#$ . 11741)]) #@55 Return non-nil if we should align the table at point. (defalias 'valign--align-p #[0 "\212\300 \210\301\302`!\303\"\211:\205\211\304\232\206\301\305\"\306\232?\262)\207" [beginning-of-line plist-get text-properties-at face (org-block) :inherit (org-block)] 4 (#$ . 12415)]) #@82 Go backward to the beginning of the table at point. Assumes point is on a table. (defalias 'valign--beginning-of-table #[0 "\300 \203\301 \210e`W\203\300 \203\302y\210\202\300 ?\205!\303y\207" [valign--at-table-p beginning-of-line -1 1] 2 (#$ . 12701)]) #@75 Go forward to the end of the table at point. Assumes point is on a table. (defalias 'valign--end-of-table #[0 "`\300 \203 \301 \210`dW\203\300 \203\302y\210\202 `X\204$\303\304x\210`W\205-\305\306!\207" [valign--at-table-p beginning-of-line 1 "\n" nil error "End of table goes backwards"] 3 (#$ . 12970)]) #@98 Put overlay between BEG and END. PROPS contains properties and values. (fn BEG END &rest PROPS) (defalias 'valign--put-overlay #[642 "\300\301\302\301%\303\304\302#\210\303\305\302#\210\205*\303\211A\262\242\211A\262\242#\210\202\207" [make-overlay nil t overlay-put valign evaporate] 9 (#$ . 13292)]) #@104 Put text property between BEG and END. PROPS contains properties and values. (fn BEG END &rest PROPS) (defalias 'valign--put-text-prop #[642 "\303 \304\211\304\305\306\307\310\311!\312\"\313$\216\314#\210\315\316\304$,\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 add-text-properties put-text-property valign] 11 (#$ . 13615)]) #@59 Return a display property that aligns to XPOS. (fn XPOS) (defalias 'valign--space #[257 "\300\301CE\207" [space :align-to] 4 (#$ . 14095)]) (put 'valign--space 'byte-optimizer 'byte-compile-inline-expand) #@103 Make the character at POINT a full height bar. But only if `valign-fancy-bar' is non-nil. (fn POINT) (defalias 'valign--maybe-render-bar #[257 "\205\301!\207" [valign-fancy-bar valign--render-bar] 3 (#$ . 14309)]) #@377 Run when point enters or left a fancy bar. Because the bar is so thin, the cursor disappears in it. We expands the bar so the cursor is visible. 'cursor-intangible doesn’t work because it prohibits you to put the cursor at BOL. WINDOW is just window, PREV-POS is the previous point of cursor before event, ACTION is either 'entered or 'left. (fn WINDOW PREV-POS ACTION) (defalias 'valign--fancy-bar-cursor-fn #[771 "\304 \305\211\305\306\307\310\311\312!\313\"\314$\216\315\316=\203`\202*\317=\203)\202*\320!\211\211\205f\211@\321\322\"\203_\323\324\316=\203Q \325=\203M\326\202]\327\202]\317=\203\\\330\202]\320#\210A\266\202\202,\262\262,\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks cursor-type buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 overlays-at entered left nil overlay-get valign-bar overlay-put display bar (space :width (3)) " " (space :width (1))] 13 (#$ . 14535)]) #@60 Make the character at POINT a full-height bar. (fn POINT) (defalias 'valign--render-bar #[257 "\303 \304\211\304\305\306\307\310\311!\312\"\313$\216\314\211T\315\316$\210\317\211T\320\321\322\323\324\304&,\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 put-text-property cursor-sensor-functions (valign--fancy-bar-cursor-fn) valign--put-overlay face (:inverse-video t) display (space :width (1)) valign-bar] 12 (#$ . 15548)]) #@71 Clean up the display text property between BEG and END. (fn BEG END) (defalias 'valign--clean-text-property #[514 "\303 \304\211\304\305\306\307\310\311!\312\"\313$\216\314\315\316$\210,\210\317\"\211\211\203:\211@\320\321\"\2033\322!\210A\266\202\202\"\266\316\323=?\205\213\324\325!\321\"\203|\326\321\316$\262\303 \304\211\304\305\306\307\310\311!\327\"\313$\216\314\330\316$\210\314\321\316$\210,\210\262\326\321\316$\262\202?\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 put-text-property cursor-sensor-functions nil overlays-in overlay-get valign delete-overlay -1 plist-get text-properties-at next-single-char-property-change [restore-buffer-modified-p nil] display] 13 (#$ . 16122)]) #@102 Return the pixel width of STRING with font at POINT. STRING should have length 1. (fn STRING POINT) (defalias 'valign--glyph-width-of #[514 "\300\301!\302\303$\302H\304H\207" [font-get-glyphs font-at 0 1 4] 7 (#$ . 16998)]) #@226 Add overlay to a separator row’s “cell”. Cell ranges from BEG to END, the pixel position RIGHT-POS marks the position for the right bar (“|”). Assumes point is on the right bar or plus sign. (fn BEG END RIGHT-POS) (defalias 'valign--separator-row-add-overlay #[771 "\203 \301!\210\202$f\302=\203$\303\211T\"\304\305\306#\210\304\307\310#\266f\311=\203/T\262\2064`Sf\311=\203HS\262\211\312S\"Z\262\313\305\314\315CE\262\316\317&\207" [valign-fancy-bar valign--render-bar 43 make-overlay overlay-put display "|" valign t 58 valign--pixel-width-from-to valign--put-overlay space :align-to face (:strike-through t)] 11 (#$ . 17232)]) #@137 Align the separator row in multi column style. COLUMN-WIDTH-LIST is returned by `valign--calculate-cell-width'. (fn COLUMN-WIDTH-LIST) (defalias 'valign--align-separator-row #[257 "\300\301`\"\300\302`\"`\303\304`!\305`S!\210\306\307\310 \311#\205E\305`S!\2108\312`S\313\n##\210`\262\313$\262T\262\210\202\207" [valign--glyph-width-of "|" " " 0 valign--pixel-x valign--maybe-render-bar re-search-forward "[|\\+]" line-end-position t valign--separator-row-add-overlay +] 14 (#$ . 17908)]) #@34 Return either 'org or 'markdown. (defalias 'valign--guess-table-type #[0 "\302\303\304\"\203 \305\207\302\306!\203\307\207\310\311!\312\313\314#)\266\203\203%\305\207\315\311!\312\313\314#)\266\203\2039\307\207\305\207" [major-mode inhibit-changing-match-data derived-mode-p org-mode org-agenda-mode org markdown-mode markdown "org" symbol-name nil t string-match "markdown"] 7 (#$ . 18423)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable valign-not-align-after-list funcall function #[0 "\300\207" [(self-insert-command org-self-insert-command markdown-outdent-or-delete org-delete-backward-char backward-kill-word delete-char kill-word)] 1] "Valign doesn’t align table after these commands." :type (list symbol) :group valign] 8) #@125 When non-nil and ‘debug-on-error’, signal parse error. If ‘debug-on-error’ is also non-nil, drop into the debugger. (defvar valign-signal-parse-error nil (#$ . 19220)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\312\313\314\315\310\311%\207" [custom-declare-variable valign-max-table-size funcall function #[0 "\300\207" [4000] 1] "Valign doesn't align tables of size larger than this value.\nValign puts `valign-table-fallback' face onto these tables. If the\nvalue is zero, valign doesn't check for table sizes." :type integer :group valign custom-declare-face valign-table-fallback ((t :inherit fixed-pitch)) "Fallback face for tables whose size exceeds `valign-max-table-size'."] 8) #@159 Visually align the table at point. If FORCE non-nil, force align. If GO-TO-END non-nil, leave point at the end of the table. (fn &optional FORCE GO-TO-END) (defalias 'valign-table-maybe #[512 "\3061c\307 \205a\310 \205a\311 \205a\204\"\206 \n>?\205a\212\312 \210`\212\313 \210`) \314=\204;\211Z X\203L\315 \203F\316 \210\202X\317 \210\202X\320\"\210\321\322\323$\210\266)\211\205a\313 0\207\320\212\312 \210`)\212\313 \210`)\"\210\211@\324=\205\215\f\205\215 \203\207\325\324!\202\215\326\327\330!\"\207" [this-command last-command valign-not-align-after-list valign-max-table-size valign-signal-parse-error debug-on-error (valign-parse-error error) display-graphic-p valign--at-table-p valign--align-p valign--beginning-of-table valign--end-of-table 0 valign--guess-charset valign--table-2 valign-table-1 valign--clean-text-property valign--put-overlay face valign-table-fallback valign-parse-error debug message "%s" error-message-string] 9 (#$ . 19940)]) #@36 Visually align the table at point. (defalias 'valign-table-1 #[0 "\300 \210\301\302`\"\301\303`\"`\212\304 \210`)\305\"\306!\307\310 \"\311\211\211\312\262`d^W\205\310\313 \210\314\303\315 \316#\204B\317\320\321\322`\"C\"\210\323 \203N\324!\210\202\276\325`!\262\312\262\313 \210\314\303\315 \316#\203\271\326\321\327\303\"!\204\262\212\330`S!\21088\331 \332 \211@A\211@A\211@A\211@A\n\333\n\"& \266\334$\266\204)T\262\202Y\330`S!\210\311y\210T\262\202$\207" [valign--beginning-of-table valign--glyph-width-of " " "|" valign--end-of-table valign--clean-text-property valign--calculate-cell-width valign--calculate-alignment valign--guess-table-type nil 0 beginning-of-line search-forward line-end-position t signal valign-parse-error format "Missing the right bar (|) around %s" valign--separator-p valign--align-separator-row valign--pixel-x looking-at "[^%s]*\n" valign--maybe-render-bar valign--cell-content-width valign--cell-content-config valign--cell +] 36 (#$ . 20933)]) #@785 Align the cell at point. For an example cell: | content content | ↑ ↑ ↑ ↑ 1 2 3 4 <------5------> <--------6----------> COL-WIDTH (6) Pixel width of the column ALIGNMENT 'left or 'right CELL-WIDTH (5) Pixel width of the cell content CELL-BEG (1) Beginning of the cell CONTENT-BEG (2) Beginning of the cell content[1] CONTENT-END (3) End of the cell content[1] CELL-END (4) End of the cell COLUMN-START (1) Pixel x-position of the beginning of the cell SPACE-WIDTH Pixel width of a space character Assumes point is at (2). [1] This is not completely true, see `valign--cell-content-config'. (fn COL-WIDTH ALIGNMENT CELL-WIDTH CELL-BEG CONTENT-BEG CONTENT-END CELL-END COLUMN-START SPACE-WIDTH) (defalias 'valign--cell #[2313 "\300\301\262U\203\211\302##\202_\303 \2031\211\302##\202_\304=\203G\211\302##\202_\305=\203^\211 \fZ\\#\202_\300\207" [nil #[771 "\300\301\302\303CE\262$\207" [valign--put-overlay display space :align-to] 11 "\n\n(fn BEG END XPOS)"] + valign--cell-empty-p left right] 17 (#$ . 21976)]) #@45 Visually align the table.el table at point. (defalias 'valign--table-2 #[0 "\304 \210\305 \306\307\"`\212\310 \210`)\311\"\312 \313\211\313\314\315\316\317\320!\321\"\322$\216\323\324\"c\210\325`S`\"\326\327!\210,\262\330\314\331\332\317\320!\333\"\334\335%\336 \"\"\315\211\211`W\205\n\212\337\340w\210\341\340f!\323\342\f\"\232\204\221\343\344\n\n\"\203z\345\202\210\346\n\n\"\203\207\347\202\210\350\f$\210\202\377\351`!\262\315\262\352\323\342\f\"\353 \313#\203\377\354`S`\355\323\342\"$\210\356\357!\204\2318\360\323\342 \"!\211@A\211@A\211@A\211@A\n\354\355\361#\362\363CE\262$\210T\262\361#\266\217\202\231)T\262\340y\210\202R\207" [valign-box-charset-alist buffer-undo-list inhibit-read-only inhibit-modification-hooks valign--beginning-of-table valign--guess-charset alist-get unicode valign--end-of-table valign--clean-text-property buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 valign-box-char h valign--pixel-width-from-to backward-delete-char 1 mapcar 257 "\300\301Z\300\245T_\207" [8] 4 "\n\n(fn X)" valign--calculate-cell-width " " nil char-to-string v valign--align-separator-row-full valign--first-line-p (1 2 3) valign--last-line-p (7 8 9) (4 5 6) valign--pixel-x search-forward line-end-position valign--put-text-prop display looking-at "\n" valign--cell-content-config + space :align-to] 33 (#$ . 23140)]) #@79 Return t if the point is in the first line between BEG and END. (fn BEG END) (defalias 'valign--first-line-p #[514 "\212\300\301\302#)?\207" [search-backward "\n" t] 6 (#$ . 24615)]) #@78 Return t if the point is in the last line between BEG and END. (fn BEG END) (defalias 'valign--last-line-p #[514 "\212\300\301\302#)?\207" [search-forward "\n" t] 6 (#$ . 24806)]) #@473 Align separator row for a full table (table.el table). COLUMN-WIDTH-LIST is a list of column widths. CODESET is a list of codes that corresponds to the left, middle and right box drawing character codes to pass to `valign-box-char'. It can be (1 2 3), (4 5 6), or (7 8 9). CHARSET is the same as in `valign-box-charset-alist'. CHAR-WIDTH is the pixel width of a character. Assumes point before the first character. (fn COLUMN-WIDTH-LIST CODESET CHARSET CHAR-WIDTH) (defalias 'valign--align-separator-row-full #[1028 "\301A@\"\301\3028\"\303\304\"\301@\"\301A@\"\301\302 8\"\301\305\"\306 \307\310``T\311 $\210`Tb\210\312\313\314  E!\315#\205\215\316\317!\203Y\310`S`\311$\210\202b\310`S`\311$\210\212`S8b\210\301\305\"\320x\210\310`\311\321\245\n\307H\"$\266)\211T\262\2028\207" [valign-box-charset-alist valign-box-char 2 alist-get unicode h line-end-position 0 valign--put-text-prop display re-search-forward rx-to-string or t looking-at "\n" nil make-string] 23 (#$ . 24995)]) #@93 Return the charset used by the table at point. Assumes point at the beginning of the table. (defalias 'valign--guess-charset #[0 "\301\302\"\303\304\303:\2031@\262\305\303f!\306\307\"\232\203&\262\303\211\262\202'\304\2031A\262\202?\2057\211\207" [valign-box-charset-alist mapcar cdr nil t char-to-string valign-box-char 1] 8 (#$ . 26027)]) #@126 Align tables between BEG and END. Supposed to be called from jit-lock. Force align if FORCE non-nil. (fn &optional BEG END) (defalias 'valign-region #[512 "\206e\206\nd\211\301\302\211\211:\203,@\262A\262\303\304\"B\262A\262\202\211\237\266\204B\305\306B!\307\310\302\311 \"!\203n\212b\210`W\203m\312\313#\203m\3141^\315\302\313\"0\202f\316\317\320!\"\262\210`\262\202D)\321]BB\207" [valign-box-charset-alist "|" nil valign-box-char 1 rx-to-string or window-live-p get-buffer-window selected-frame re-search-forward t (error) valign-table-maybe message "Error when aligning table: %s" error-message-string jit-lock-bounds] 13 (#$ . 26393)]) #@37 Realign whole buffer. (fn &rest _) (defalias 'valign--buffer-advice #[128 "\205\301 \207" [valign-mode valign-region] 2 (#$ . 27077)]) #@50 Re-align after org-indent is done. (fn &rest _) (defalias 'valign--org-indent-advice #[128 "?\205\301 \207" [org-indent-agentized-buffers valign--buffer-advice] 2 (#$ . 27222)]) #@126 Valign hook, realign table between BEG and END. FLAG is the same as in ‘org-flag-region’. (fn BEG END FLAG &optional _) (defalias 'valign--flag-region-advice #[1027 "\205)?\205)\304 \305\211\305\306\307\310\311\312!\313\"\314$\216\315\316]\317\320$,\262\207" [valign-mode buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 put-text-property 1 fontified nil] 12 (#$ . 27411)]) #@66 Force realign after tab so user can force realign. (fn &rest _) (defalias 'valign--tab-advice #[128 "\205\301 \205\302 \205\303 \207" [valign-mode valign--at-table-p valign--align-p valign-table] 2 (#$ . 27934)]) #@33 Remove alignment in the buffer. (defalias 'valign-reset-buffer #[0 "\303 \304\211\304\305\306\307\310\311!\312\"\313$\216\314ed\"\210\315 ,\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 valign--clean-text-property jit-lock-refontify] 8 (#$ . 28161)]) #@33 Remove advices added by valign. (defalias 'valign-remove-advice #[0 "\300\211\203\211@\301\302\"\210A\266\202\202\210\303\211\203'\211@\301\304\"\210A\266\202\202\210\305\211\203;\211@\301\306\"\210A\266\202\202)\210\307\310!\205F\301\311\312\"\207" [(org-cycle org-table-blank-field markdown-cycle) advice-remove valign--tab-advice (text-scale-increase text-scale-decrease org-toggle-inline-images) valign--buffer-advice (org-flag-region outline-flag-region) valign--flag-region-advice featurep org-indent org-indent-initialize-agent valign--org-indent-advice] 5 (#$ . 28557) nil]) #@97 Remove advices if there is no buffer with valign-mode enabled. This runs in `kill-buffer-hook'. (defalias 'valign--maybe-clean-advice #[0 "\300\301\302 \"\303=\205\f\304 \207" [cl-count-if #[257 "\300\301\"\207" [buffer-local-value valign-mode] 4 "\n\n(fn BUF)"] buffer-list 1 valign-remove-advice] 3 (#$ . 29162)]) #@36 Visually align the table at point. (defalias 'valign-table #[0 "\300\301!\207" [valign-table-maybe t] 2 (#$ . 29486) nil]) #@91 Non-nil if Valign mode is enabled. Use the command `valign-mode' to change this variable. (defvar valign-mode nil (#$ . 29615)) (make-variable-buffer-local 'valign-mode) #@48 Visually align Org tables. (fn &optional ARG) (defalias 'valign-mode #[256 "\302 \303=\203 ?\202\304!\305V\306 \204#\203\252\307\310!\210\202\252\203\224\311\312\313\314\315$\210\316\211\203B\211@\317\320\321#\210A\266\202\202/\210\322\211\203W\211@\317\320\323#\210A\266\202\202D\210\324\211\203l\211@\317\320\325#\210A\266\202\202Y\210\326\327!\203y\317\330\320\331#\210\311\332\323\305\315$\210\311\333\334\305\315$\210 \203\216\335 \210\336 \210\202\252\337\312\313\315#\210\337\333\334\315#\210\340 \210\335\341!\210\334 \210\342\343\203\264\344\202\265\345\"\210\346\347!\203\331\302 \203\311\211\302 \232\203\331\350\307\351\203\324\352\202\325\353#\266\210\354 \210\207" [valign-mode valign-fancy-bar current-message toggle prefix-numeric-value 0 display-graphic-p message "Valign mode has no effect in non-graphical display" add-hook jit-lock-functions valign-region 98 t (org-cycle org-table-blank-field markdown-cycle) advice-add :after valign--tab-advice (text-scale-increase text-scale-decrease org-toggle-inline-images) valign--buffer-advice (org-flag-region outline-flag-region) valign--flag-region-advice featurep org-indent org-indent-initialize-agent valign--org-indent-advice org-indent-mode-hook kill-buffer-hook valign--maybe-clean-advice cursor-sensor-mode jit-lock-refontify remove-hook valign-reset-buffer -1 run-hooks valign-mode-hook valign-mode-on-hook valign-mode-off-hook called-interactively-p any " in current buffer" "Valign mode %sabled%s" "en" "dis" force-mode-line-update] 8 (#$ . 29791) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar valign-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\311\211%\210\312\313!\207" [valign-mode-map valign-mode-hook variable-documentation put "Hook run after entering or leaving `valign-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 valign-mode valign-lighter boundp nil provide valign] 6)