;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\"\207" [require cl-lib add-to-list customize-package-emacs-version-alist (so-long ("1.0" . "27.1"))] 3) (defconst so-long--latest-version "1.0") #@70 Internal use. Non-nil when any so-long functionality has been used. (defvar so-long-enabled nil (#$ . 591)) #@51 Non-nil when `so-long' mitigations are in effect. (defvar so-long--active nil (#$ . 706)) (make-variable-buffer-local 'so-long--active) #@45 Non-nil while `set-auto-mode' is executing. (defvar so-long--set-auto-mode nil (#$ . 848)) #@71 Non-nil to prevent `hack-local-variables' applying a `mode' variable. (defvar so-long--hack-local-variables-no-mode nil (#$ . 945)) #@75 When non-nil, prevents the `set-auto-mode' advice from calling `so-long'. (defvar so-long--inhibited nil (#$ . 1083)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local so-long--inhibited put permanent-local t] 4) #@59 Non-nil while `so-long' or `so-long-revert' is executing. (defvar so-long--calling nil (#$ . 1328)) #@72 Non-nil if `so-long' has been invoked (even if subsequently reverted). (defvar so-long-detected-p nil (#$ . 1434)) (byte-code "\300\301!\210\302\301\303\304#\210\305\306\307\310\311\312\313\314&\210\315\316\317\320\321DD\322\323\324\325\326&\210\315\327\317\320\330DD\331\323\332\325\333&\210\315\334\317\320\335DD\336\323\337\325\340&\210\315\341\317\320\342DD\343\323\344\325\345&\210\315\346\317\320\347DD\350\323\351\325\352&\210\315\353\317\320\354DD\355\323\356\325\357&\207" [make-variable-buffer-local so-long-detected-p put permanent-local t custom-declare-group so-long nil "Prevent unacceptable performance degradation with very long lines." :prefix "so-long" :group convenience custom-declare-variable so-long-threshold funcall function #[0 "\300\207" [250] 1] "Maximum line length permitted before invoking `so-long-function'.\n\nSee `so-long-detected-long-line-p' for details." :type integer :package-version (so-long . "1.0") so-long-max-lines #[0 "\300\207" [5] 1] "Number of non-blank, non-comment lines to test for excessive length.\n\nIf nil then all lines will be tested, until either a long line is detected,\nor the end of the buffer is reached.\n\nIf `so-long-skip-leading-comments' is nil then comments and blank lines will\nbe counted.\n\nSee `so-long-detected-long-line-p' for details." (choice (integer :tag "Limit") (const :tag "Unlimited" nil)) (so-long . "1.0") so-long-skip-leading-comments #[0 "\300\207" [t] 1] "Non-nil to ignore all leading comments and whitespace.\n\nIf the file begins with a shebang (#!), this option also causes that line to be\nignored even if it doesn't match the buffer's comment syntax, to ensure that\ncomments following the shebang will be ignored.\n\nSee `so-long-detected-long-line-p' for details." boolean (so-long . "1.0") so-long-target-modes #[0 "\300\207" [(prog-mode css-mode sgml-mode nxml-mode)] 1] "`so-long' affects only these modes and their derivatives.\n\nOur primary use-case is minified programming code, so `prog-mode' covers\nmost cases, but there are some exceptions to this.\n\nIf t, then all modes are targeted. Note that this is only useful with a\ncustom `so-long-predicate', as many file types (archives and binary files,\nfor example) can safely contain long lines, and invoking `so-long' on such\nfiles would prevent Emacs from handling them correctly." (choice (repeat :tag "Specified modes" symbol) (const :tag "All modes" t)) (so-long . "1.0") so-long-invisible-buffer-function #[0 "\300\207" [so-long-deferred] 1] "Function called in place of `so-long' when the buffer is not displayed.\n\nThis affects the behaviour of `global-so-long-mode'.\n\nWe treat invisible buffers differently from displayed buffers because, in\ncases where a library is using a buffer for behind-the-scenes processing,\nit might be surprising if that buffer were unexpectedly manipulated by\n`so-long' (which might in turn lead to confusing errors for the user).\nInvisible buffers are less likely to cause performance issues related to\nlong lines, so this differentiation is generally satisfactory.\n\nThe default value `so-long-deferred' prevents `global-so-long-mode' from\ntriggering `so-long' for any given buffer until such time as the buffer is\ndisplayed in a window.\n\n(Note that buffers are normally invisible at this point -- when `find-file'\nis used, the buffer is not displayed in a window until a short time after\n`global-so-long-mode' has seen it.)\n\nThe value nil or `so-long' means that `so-long' will be called directly; in\nwhich case it may be problematic for `so-long-variable-overrides' to enable\n`buffer-read-only', or for `so-long-action' to be set to `so-long-mode'.\nThis is because the buffer may not be intended to be displayed at all, and\nthe mentioned options might interfere with some intended processing." (radio (const so-long-deferred) (const :tag "nil: Call so-long as normal" nil) (function :tag "Custom function")) (so-long . "1.0") so-long-predicate #[0 "\300\207" [so-long-detected-long-line-p] 1] "Function, called after `set-auto-mode' to decide whether action is needed.\n\nOnly called if the major mode is a member of `so-long-target-modes'.\n\nThe specified function will be called with no arguments. If it returns non-nil\nthen `so-long' will be invoked.\n\nDefaults to `so-long-detected-long-line-p'." (radio (const so-long-detected-long-line-p) (function :tag "Custom function")) (so-long . "1.0")] 8) #@72 Generate a :type for `so-long-action' based on `so-long-action-alist'. (defalias 'so-long--action-type #[0 "\301\302\303\304\305\306\"\"\307\"B\207" [so-long-action-alist radio append mapcar #[257 "\300\301A@@F\207" [const :tag] 5 "\n\n(fn X)"] assq-delete-all nil ((const :tag "Do nothing" nil))] 7 (#$ . 5873)]) #@76 The customize :set function for `so-long-action-alist'. (fn OPTION VALUE) (defalias 'so-long--action-alist-setter #[514 "\300\"\210\301\302\303\304 #\207" [set-default put so-long-action custom-type so-long--action-type] 6 (#$ . 6196)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \210\314\301\315\316#\210\300\317\302\303\320DD\321\306\322 \312\323&\207" [custom-declare-variable so-long-action-alist funcall function #[0 "\300\207" [((so-long-mode "Change major mode to so-long-mode" so-long-mode so-long-mode-revert) (so-long-minor-mode "Enable so-long-minor-mode" turn-on-so-long-minor-mode turn-off-so-long-minor-mode) (longlines-mode "Enable longlines-mode" so-long-function-longlines-mode so-long-revert-function-longlines-mode))] 1] "Options for `so-long-action'.\n\nEach element is a list comprising (KEY LABEL ACTION REVERT)\n\nKEY is a symbol which is a valid value for `so-long-action', and LABEL is a\nstring which describes and represents the key in that option's customize\ninterface, and in the \"So Long\" menu. ACTION and REVERT are functions:\n\nACTION will be the `so-long-function' value when `so-long' is called, and\nREVERT will be the `so-long-revert-function' value, if `so-long-revert' is\nsubsequently called." :type (alist :key-type (symbol :tag "Key" :value ) :value-type (list (string :tag "Label" :value "") (function :tag "Action") (function :tag "Revert"))) :set so-long--action-alist-setter :package-version (so-long . "1.0") put risky-local-variable t so-long-action #[0 "\300\207" [so-long-mode] 1] "The action taken by `so-long' when long lines are detected.\n\n(Long lines are determined by `so-long-predicate' after `set-auto-mode'.)\n\nThe value is a key to one of the options defined by `so-long-action-alist'.\n\nThe default action is to replace the original major mode with `so-long-mode'.\nAlternatively, the `so-long-minor-mode' action retains the original major mode\nwhile still disabling minor modes and overriding variables. These are the only\nstandard values for which `so-long-minor-modes' and `so-long-variable-overrides'\nwill be automatically processed; but custom actions can also do these things.\n\nThe value `longlines-mode' causes that minor mode to be enabled. See\nlonglines.el for more details.\n\nEach action likewise determines the behaviour of `so-long-revert'.\n\nIf the value is nil, or not defined in `so-long-action-alist', then no action\nwill be taken." so-long--action-type (so-long . "1.0")] 10) #@270 The function called by `so-long'. This should be set in conjunction with `so-long-revert-function'. This usually happens automatically, based on the value of `so-long-action'. The specified function will be called with no arguments, after which `so-long-hook' runs. (defvar so-long-function nil (#$ . 8721)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local so-long-function put permanent-local t] 4) #@277 The function called by `so-long-revert'. This should be set in conjunction with `so-long-function'. This usually happens automatically, based on the value of `so-long-action'. The specified function will be called with no arguments, after which `so-long-revert-hook' runs. (defvar so-long-revert-function nil (#$ . 9158)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local so-long-revert-function put permanent-local t] 4) #@165 The value of `so-long-function', else derive from `so-long-action'. If ACTION-ARG is provided, it is used in place of `so-long-action'. (fn &optional ACTION-ARG) (defalias 'so-long-function #[256 "\206\211\204 \211\262\205\211\n\236\3038\262\207" [so-long-function so-long-action so-long-action-alist 2] 4 (#$ . 9616)]) #@172 The value of `so-long-revert-function', else derive from `so-long-action'. If ACTION-ARG is provided, it is used in place of `so-long-action'. (fn &optional ACTION-ARG) (defalias 'so-long-revert-function #[256 "\206\211\204 \211\262\205\211\n\236\3038\262\207" [so-long-revert-function so-long-action so-long-action-alist 3] 4 (#$ . 9955)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\312\301!\210\313\314!\204\315\314\316\"\210\300\207" [custom-declare-variable so-long-file-local-mode-function funcall function #[0 "\300\207" [so-long-mode-downgrade] 1] "Function to call during `set-auto-mode' when a file-local mode is set.\n\nThe specified function will be called with a single argument, being the\nfile-local mode which was established.\n\nThis happens before `so-long' is called, and so this function can modify the\nsubsequent action.\n\nThe value `so-long-mode-downgrade' means `so-long-minor-mode' will be used in\nplace of `so-long-mode' -- therefore respecting the file-local mode value, yet\nstill overriding minor modes and variables (as if `so-long-action' had been set\nto `so-long-minor-mode').\n\nThe value `so-long-inhibit' means that so-long will not take any action at all\nfor this file.\n\nIf nil, then do not treat files with file-local modes any differently to other\nfiles.\n\nNote that this function is called if a file-local mode is set even if `so-long'\nwill not be called, and also if the file-local mode is `so-long-mode'. Custom\nfunctions may need to test for these cases -- see `so-long-mode-downgrade' for\nan example." :type (radio (const so-long-mode-downgrade) (const so-long-inhibit) (const :tag "nil: Use so-long-function as normal" nil) (function :tag "Custom function")) :package-version (so-long . "1.0") make-variable-buffer-local fboundp provided-mode-derived-p defalias #[385 ">\204\300N\211\262\204\207" [derived-mode-parent] 4 "Non-nil if MODE is derived from one of MODES.\nUses the `derived-mode-parent' property of the symbol to trace backwards.\nIf you just want to check `major-mode', use `derived-mode-p'.\n\n(fn MODE &rest MODES)"]] 8) #@166 Wrapper for calling `so-long-file-local-mode-function'. The function is called with one argument, MODE, being the file-local mode which was established. (fn MODE) (defalias 'so-long-handle-file-local-mode #[257 "\302\303\"\203 \304 \205 !\207" [so-long--inhibited so-long-file-local-mode-function provided-mode-derived-p so-long-mode t] 4 (#$ . 12095)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\316\317\310\320& \210\300\321\302\303\322DD\323\306\324\310\325&\210\300\326\302\303\327DD\330\306\324\310\331&\210\300\332\302\303\333DD\334\306\335\310\336&\210\337\340\341\342\310\343%\210\337\344\345\346\310\347%\207" [custom-declare-variable so-long-minor-modes funcall function #[0 "\300\207" [(font-lock-mode display-line-numbers-mode flymake-mode flyspell-mode goto-address-mode goto-address-prog-mode hi-lock-mode highlight-changes-mode hl-line-mode linum-mode nlinum-mode prettify-symbols-mode visual-line-mode whitespace-mode diff-hl-amend-mode diff-hl-flydiff-mode diff-hl-mode dtrt-indent-mode flycheck-mode hl-sexp-mode idle-highlight-mode rainbow-delimiters-mode)] 1] "List of buffer-local minor modes to explicitly disable.\n\nThe ones which were originally enabled in the buffer are disabled by calling\nthem with the numeric argument 0. Unknown modes, and modes which were not\nenabled, are ignored.\n\nThis happens after any globalized minor modes have acted, so that buffer-local\nmodes controlled by globalized modes can also be targeted.\n\nBy default this happens if `so-long-action' is set to either `so-long-mode'\nor `so-long-minor-mode'. If `so-long-revert' is subsequently invoked, then the\ndisabled modes are re-enabled by calling them with the numeric argument 1.\n\n`so-long-hook' can be used where more custom behaviour is desired.\n\nPlease submit bug reports to recommend additional modes for this list, whether\nthey are in Emacs core, GNU ELPA, or elsewhere." :type (repeat symbol) :package-version (so-long . "1.0") so-long-variable-overrides #[0 "\300\207" [((bidi-inhibit-bpa . t) (bidi-paragraph-direction . left-to-right) (buffer-read-only . t) (global-hl-line-mode) (line-move-visual . t) (show-paren-mode) (truncate-lines) (which-func-mode))] 1] "Variables to override, and the values to override them with.\n\nThe variables are given buffer-local values. By default this happens if\n`so-long-action' is set to either `so-long-mode' or `so-long-minor-mode'.\n\nIf `so-long-revert' is subsequently invoked, then the variables are restored\nto their original states.\n\nThe combination of `line-move-visual' (enabled) and `truncate-lines' (disabled)\nis important for maximising responsiveness when moving vertically within an\nextremely long line, as otherwise the full length of the line may need to be\nscanned to find the next position.\n\nBidirectional text display -- especially handling the large quantities of\nnested parentheses which are liable to occur in minified programming code --\ncan be very expensive for extremely long lines, and so this support is disabled\nby default (insofar as is supported; in particular `bidi-inhibit-bpa' is not\navailable in Emacs versions < 27). For more information refer to info node\n`(emacs) Bidirectional Editing' and info node `(elisp) Bidirectional Display'.\n\nBuffers are made read-only by default to prevent potentially-slow editing from\noccurring inadvertantly, as buffers with excessively long lines are likely not\nintended to be edited manually." (alist :key-type (variable :tag "Variable") :value-type (sexp :tag "Value")) :options ((bidi-inhibit-bpa boolean) (bidi-paragraph-direction (choice (const left-to-right) (const right-to-left) (const nil))) (buffer-read-only boolean) (global-hl-line-mode boolean) (line-move-visual boolean) (show-paren-mode boolean) (truncate-lines boolean) (which-func-mode boolean)) (so-long . "1.0") so-long-hook #[0 "\300\207" [nil] 1] "List of functions to call after `so-long' is called.\n\nSee also `so-long-revert-hook'." hook (so-long . "1.0") so-long-revert-hook #[0 "\300\207" [nil] 1] "List of functions to call after `so-long-revert' is called.\n\nSee also `so-long-hook'." (so-long . "1.0") so-long-mode-line-label #[0 "\300\207" [#1="So Long"] 1 #1#] "Text label of `so-long-mode-line-info' when long lines are detected.\n\nIf nil, no mode line indicator will be displayed." (choice (string :tag "String") (const :tag "None" nil)) (so-long . "1.0") custom-declare-face so-long-mode-line-active ((t :inherit mode-line-emphasis)) "Face for `so-long-mode-line-info' when mitigations are active." (so-long . "1.0") so-long-mode-line-inactive ((t :inherit mode-line-inactive)) "Face for `so-long-mode-line-info' when mitigations have been reverted." (so-long . "1.0")] 10) #@409 Alist holding the buffer's original `major-mode' value, and other data. Any values to be restored by `so-long-revert' can be stored here by the `so-long-function' or during `so-long-hook'. `so-long' itself stores the original states for `so-long-variable-overrides' and `so-long-minor-modes', so these values are available to custom actions by default. See also `so-long-remember' and `so-long-original'. (defvar so-long-original-values nil (#$ . 16881)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local so-long-original-values put permanent-local t] 4) #@302 Return the current value for KEY in `so-long-original-values'. If you need to differentiate between a stored value of nil and no stored value at all, make EXISTS non-nil. This then returns the result of `assq' directly: nil if no value was set, and a cons cell otherwise. (fn KEY &optional EXISTS) (defalias 'so-long-original #[513 "\211\203\236\207\236A@\207" [so-long-original-values] 4 (#$ . 17472)]) #@166 Store the value of VARIABLE in `so-long-original-values'. We additionally store a boolean value which indicates whether that value was buffer-local. (fn VARIABLE) (defalias 'so-long-remember #[257 "\301!\205\302\"\211J\303!EB\211\207" [so-long-original-values boundp assq-delete-all local-variable-p] 5 (#$ . 17892)]) #@471 Remember the current variable and minor mode values. Stores the existing value for each entry in `so-long-variable-overrides'. Stores the name of each enabled mode from the list `so-long-minor-modes'. The lists themselves are also remembered, so that major mode hooks can provide buffer-local modifications which are still accessible after changing to `so-long-mode'. If RESET is non-nil, remove any existing values before storing the new ones. (fn &optional RESET) (defalias 'so-long-remember-all #[256 "\211\203\303\304\301!\210\304\302!\210 \211\203!\211@\304@!\210A\266\202\202\210\n\211\205>\211@\305!\2037\211\2037\304!\210A\266\202\202#\207" [so-long-original-values so-long-variable-overrides so-long-minor-modes nil so-long-remember boundp] 5 (#$ . 18229)]) #@42 Dynamically generate the "So Long" menu. (defalias 'so-long-menu #[0 "\302\303!\302\304!\305\306\307#\210\305\310\311#\210 \211\203\206\211@\211\211G\312U\203+\211A\262\242\2022\313\314\315GD\"\211A\262\242\211A\262\242@\305\316!\317\320\321!\322\323\324\325\326\316!\327\"\330\315\331&\332#\210\211\262\333\334\335\336\337\340 D\341BB\337\340 D\342BBFD\257#\266A\266\202\202\210\305\343\344#\210\305\345\317\304E#\210\305\346\347#\210\305\350\351#\210)\211\207" [help-map so-long-action-alist make-sparse-keymap "So Long" "Help" define-key-after [so-long-revert] (menu-item "Revert to normal" so-long-revert :enable (and so-long-revert-function so-long--active)) [so-long-actions-separator] (menu-item "--") 4 signal wrong-number-of-arguments nil vector menu-item make-symbol "so-long-menu-item-replace-action" defalias make-byte-code 0 "\301\300!\207" vconcat [so-long] 2 "@" "Revert the current action and invoke the chosen replacement.\n\nThis command calls `so-long' with the selected action as an argument." :enable not and so-long--active eq quote (so-long-function) (so-long-revert-function) [so-long-help-separator] (menu-item "--") [so-long-help] [so-long-commentary] (menu-item "Commentary" so-long-commentary) [so-long-customize] (menu-item "Customize" so-long-customize)] 23 (#$ . 19021)]) #@51 View the so-long documentation in `outline-mode'. (defalias 'so-long-commentary #[0 "\302\303\304!!\203 \305!\210\306\307!\210\310K\311\312\313\314\315!\316\"\317$\216\310\320M\210\321\322!\210)\210\323\324\325!\2038\326\327!\210\202>\330c\210\331y\210\212\332\333\334\335#\203N\326\336!\210\202?*\337!\210\340 \210\341\331!\210\342 \343\344\345#\210\343\346\345#\210\343\347\350#\210\343\351\352#\210\353\354 \"\210\355!\266\356 \210\334\357 )\207" [inhibit-read-only so-long-action "*So Long: Commentary*" buffer-live-p get-buffer kill-buffer require finder finder-summary make-byte-code 0 "\301\300M\207" vconcat vector [finder-summary] 2 ignore finder-commentary "so-long" t looking-at "^Commentary:\n\n" replace-match "so-long.el\n\n" "so-long.el\n" 1 re-search-forward "^-+$" nil :noerror "" rename-buffer outline-mode view-mode make-sparse-keymap define-key " " outline-toggle-children [M-tab] [134217838] outline-next-visible-heading [134217840] outline-previous-visible-heading set-keymap-parent current-local-map use-local-map so-long--ensure-enabled so-long] 8 (#$ . 20367) nil]) #@37 Open the so-long `customize' group. (defalias 'so-long-customize #[0 "\300\301!\207" [customize-group so-long] 2 (#$ . 21482) nil]) #@424 Mode line construct displayed when `so-long' has been triggered. Displayed as part of `mode-line-misc-info'. `so-long-mode-line-label' defines the text to be displayed (if any). Face `so-long-mode-line-active' is used while mitigations are active, and `so-long-mode-line-inactive' is used if `so-long-revert' is called. Not displayed when `so-long-mode' is enabled, as the major mode construct serves the same purpose. (defvar so-long-mode-line-info nil (#$ . 21621)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local so-long-mode-line-info put risky-local-variable t] 4) #@71 Return the mode line construct for variable `so-long-mode-line-info'. (defalias 'so-long-mode-line-info #[0 "\300 \301\302\303\304\305\306\307\257#\210\310\304\311\312\310\313\314\315\316 D\317BBBBBBD\320BBD\207" [make-sparse-keymap define-key [mode-line down-mouse-1] menu-item "" nil :filter #[257 "\300 \207" [so-long-menu] 2 "\n\n(fn CMD)"] so-long-mode-line-label :eval propertize 'mouse-face 'highlight 'keymap quote ('help-echo t 'face (if so-long--active 'so-long-mode-line-active 'so-long-mode-line-inactive)) (" ")] 11 (#$ . 22229)]) #@596 Determine whether the current buffer contains long lines. Following any initial comments and blank lines, the next N lines of the buffer will be tested for excessive length (where "excessive" means above `so-long-threshold', and N is `so-long-max-lines'). Returns non-nil if any such excessive-length line is detected. If `so-long-skip-leading-comments' is nil then the N lines will be counted starting from the first line of the buffer. In this instance you will likely want to increase `so-long-max-lines' to allow for possible comments. This is the default value of `so-long-predicate'. (defalias 'so-long-detected-long-line-p #[0 "\306\307\212eb\210\203N \204\n\203N \203N\310\311!\203\312y\210`\262\214\211`\f\\d^}\210\211b\210\313\312!\206@m\205@~\210\211b\210\313\312!`\262)\204\"m\204N\306y\210\3142\220m?\205\217 \203a W\205\217`\262\214\211\315\312\f#d^}\210\312y\210)n\204\210m\203\203`Z\fX\204\210\316\314\317\"\210T\262\202R0)\207" [so-long-skip-leading-comments comment-use-syntax comment-start-skip comment-end-skip so-long-threshold so-long-max-lines 0 nil looking-at "#!" 1 comment-forward excessive + throw t] 7 (#$ . 22783)]) #@37 Enable minor mode `longlines-mode'. (defalias 'so-long-function-longlines-mode #[0 "\300\301!\210\302\303!\210\303\304!\207" [require longlines so-long-remember longlines-mode 1] 2 (#$ . 23967)]) #@45 Restore original state of `longlines-mode'. (defalias 'so-long-revert-function-longlines-mode #[0 "\301\302!\210\303\300\304\"\211\203%\211A@\232?\205(\300A@\203 \305\202!\306!\202(\300\306!\207" [longlines-mode require longlines so-long-original :exists 1 0] 3 (#$ . 24169)]) #@41 Enable minor mode `so-long-minor-mode'. (defalias 'turn-on-so-long-minor-mode #[0 "\300\301!\207" [so-long-minor-mode 1] 2 (#$ . 24459)]) #@42 Disable minor mode `so-long-minor-mode'. (defalias 'turn-off-so-long-minor-mode #[0 "\300\301!\207" [so-long-minor-mode 0] 2 (#$ . 24603)]) #@105 Non-nil if So-Long minor mode is enabled. Use the command `so-long-minor-mode' to change this variable. (defvar so-long-minor-mode nil (#$ . 24750)) (make-variable-buffer-local 'so-long-minor-mode) #@322 This is the minor mode equivalent of `so-long-mode'. Any active minor modes listed in `so-long-minor-modes' are disabled for the current buffer, and buffer-local values are assigned to variables in accordance with `so-long-variable-overrides'. This minor mode is a standard `so-long-action' option. (fn &optional ARG) (defalias 'so-long-minor-mode #[256 "\306 \307=\203 ?\202\310!\311V\211\203A \2048\n\2048\312 \210\313\211\314\315\316\317!\210\320\321!\2048\322 \323 \210\324 \210\202] \204W\f\314=\203M\325\320\321!\204W\322 \326 \210\327 \210\330\331\203g\332\202h\333\"\210\334\335!\203\214\306 \203|\211\306 \232\203\214\336\337\340\203\207\341\202\210\342#\266\210\343 \210\207" [so-long-minor-mode so-long--calling so-long--active so-long-detected-p so-long-function so-long-revert-function current-message toggle prefix-numeric-value 0 so-long--ensure-enabled t turn-on-so-long-minor-mode turn-off-so-long-minor-mode so-long-remember-all :reset derived-mode-p so-long-mode so-long-mode-line-info so-long-disable-minor-modes so-long-override-variables nil so-long-restore-minor-modes so-long-restore-variables run-hooks so-long-minor-mode-hook so-long-minor-mode-on-hook so-long-minor-mode-off-hook called-interactively-p any " in current buffer" message "So-Long minor mode %sabled%s" "en" "dis" force-mode-line-update] 8 (#$ . 24955) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar so-long-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\211%\207" [so-long-minor-mode-map so-long-minor-mode-hook variable-documentation put "Hook run after entering or leaving `so-long-minor-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 so-long-minor-mode nil boundp] 6) #@48 Major mode keymap and menu for `so-long-mode'. (defvar so-long-mode-map (byte-code "\300 \301\302\303#\210\301\304\305\306\307\310\307\311\312\257#\210\211\207" [make-sparse-keymap define-key "" so-long-revert [menu-bar so-long] menu-item "" nil :visible :filter #[257 "\300 \207" [so-long-menu] 2 "\n\n(fn CMD)"]] 11) (#$ . 26846)) (defvar so-long-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [so-long-mode-hook variable-documentation put "Hook run after entering So Long mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp so-long-mode-map definition-name so-long-mode] 4) (defvar so-long-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\317#\207" [so-long-mode-abbrev-table so-long-mode-map variable-documentation put purecopy "Keymap for `so-long-mode'." boundp so-long-mode-syntax-table definition-name so-long-mode (lambda (#1=#:def-tmp-var) (defvar so-long-mode-syntax-table #1#)) make-syntax-table "Syntax table for `so-long-mode'." (lambda (#1#) (defvar so-long-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `so-long-mode'." derived-mode-parent] 5) #@1254 This major mode is the default `so-long-action' option. The normal reason for this mode being active is that `global-so-long-mode' is enabled, and `so-long-predicate' has detected that the file contains long lines. Many Emacs modes struggle with buffers which contain excessively long lines, and may consequently cause unacceptable performance issues. This is commonly on account of "minified" code (i.e. code that has been compacted into the smallest file size possible, which often entails removing newlines should they not be strictly necessary). These kinds of files are typically not intended to be edited, so not providing the usual editing mode in these cases will rarely be an issue. This major mode disables any active minor modes listed in `so-long-minor-modes' for the current buffer, and buffer-local values are assigned to variables in accordance with `so-long-variable-overrides'. To restore the original major mode (along with the minor modes and variable values), despite potential performance issues, type \[so-long-revert]. Use \[so-long-commentary] for more information. Use \[so-long-customize] to configure the behaviour. This mode runs the hook `so-long-mode-hook', as the final or penultimate step during initialization. (defalias 'so-long-mode #[0 "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \"#\204,\315 \210\307\211$%\311&\316'\317\320\321\322\323$\210\324 \210\325()\204k*\204k\326\327+\330=\206W+9\205W\331+\311\"?\205\\\332\333Q \334\301!\206f\335\336\337!$\210)\340\341!\207" [delay-mode-hooks major-mode mode-name so-long-mode-map so-long-mode-syntax-table so-long-mode-abbrev-table make-local-variable t kill-all-local-variables so-long-mode "So Long" use-local-map set-syntax-table so-long--ensure-enabled so-long-mode-revert add-hook after-change-major-mode-hook so-long-after-change-major-mode :append :local so-long-override-variables nil message "Changed to %s (from %s)" so-long provided-mode-derived-p " on account of line length" ". %s to revert." so-long-original "" substitute-command-keys "\\[so-long-revert]" run-mode-hooks so-long-mode-hook local-abbrev-table so-long--calling so-long--active so-long-detected-p so-long-function so-long-revert-function so-long-mode-line-info so-long--inhibited so-long--set-auto-mode this-command] 7 (#$ . 28335) nil]) #@139 Ensure that `so-long-mode' knows the original `major-mode'. This advice acts before `so-long-mode', with the previous mode still active. (defalias 'so-long--change-major-mode #[0 "\301\302!?\205\204\303\304!\210\305\306!\207" [so-long--calling derived-mode-p so-long-mode so-long-remember-all :reset so-long-remember major-mode] 2 (#$ . 30694)]) (advice-add 'so-long-mode :before 'so-long--change-major-mode) #@129 Run by `so-long-mode' in `after-change-major-mode-hook'. Calls `so-long-disable-minor-modes' and `so-long-override-variables'. (defalias 'so-long-after-change-major-mode #[0 "\300 \210\301 \207" [so-long-disable-minor-modes so-long-override-variables] 1 (#$ . 31116)]) #@65 Disable any active minor modes listed in `so-long-minor-modes'. (defalias 'so-long-disable-minor-modes #[0 "\300\301!\211\205\211@\302!\203\211\203\211\303!\210A\266\202\202\207" [so-long-original so-long-minor-modes boundp 0] 4 (#$ . 31392)]) #@122 Restore the minor modes which were disabled. The modes are enabled in accordance with what was remembered in `so-long'. (defalias 'so-long-restore-minor-modes #[0 "\211\205#\211@\301!\203\302!\203\211J\204\211\303!\210A\266\202\202\207" [so-long-minor-modes so-long-original boundp 1] 4 (#$ . 31653)]) #@70 Set the buffer-local values defined by `so-long-variable-overrides'. (defalias 'so-long-override-variables #[0 "\300\301!\211\205\211@\302@!AL\210A\266\202\202\207" [so-long-original so-long-variable-overrides make-local-variable] 4 (#$ . 31975)]) #@137 Restore the remembered values for the overridden variables. The variables are set in accordance with what was remembered in `so-long'. (defalias 'so-long-restore-variables #[0 "\211\205\211@\301@!\210A\266\202\202\207" [so-long-variable-overrides so-long-restore-variable] 4 (#$ . 32237)]) #@68 Restore the remembered value (if any) for VARIABLE. (fn VARIABLE) (defalias 'so-long-restore-variable #[257 "\300\301\"\3028\211\203\303!A@L\202\304!\207" [so-long-original :exists 2 make-local-variable kill-local-variable] 5 (#$ . 32541)]) #@215 Call the `major-mode' which was selected before `so-long-mode' replaced it. Re-process local variables, and restore overridden variables and minor modes. This is the `so-long-revert-function' for `so-long-mode'. (defalias 'so-long-mode-revert #[0 "\303\304!\211\204 \305\306!\210\211 \210\307W\203\310\311 \210)\312 \210\313 \210\314\315!?\205+\302 \211\207" [emacs-major-version so-long--hack-local-variables-no-mode so-long-mode-line-info so-long-original major-mode error "Original mode unknown." 26 t hack-local-variables so-long-restore-minor-modes so-long-restore-variables derived-mode-p so-long-mode] 3 (#$ . 32799) nil]) #@696 The default value for `so-long-file-local-mode-function'. A buffer-local "downgrade" from `so-long-mode' to `so-long-minor-mode'. When `so-long-function' is set to `so-long-mode', then we change it to `turn-on-so-long-minor-mode' instead -- retaining the file-local major mode, but still doing everything else that `so-long-mode' would have done. `so-long-revert-function' is likewise updated. If `so-long-function' has any value other than `so-long-mode', we do nothing, as if `so-long-file-local-mode-function' was nil. We also do nothing if MODE (the file-local mode) has the value `so-long-mode', because we do not want to downgrade the major mode in that scenario. (fn &optional MODE) (defalias 'so-long-mode-downgrade #[256 "\302\303\"?\205\300 9\205\302\300 \303\"\205\304\305\211\207" [so-long-function so-long-revert-function provided-mode-derived-p so-long-mode turn-on-so-long-minor-mode turn-off-so-long-minor-mode] 4 (#$ . 33445)]) #@123 Prevent so-long from having any effect at all. This is a `so-long-file-local-mode-function' option. (fn &optional MODE) (defalias 'so-long-inhibit #[256 "\301\211\207" [so-long--inhibited t] 3 (#$ . 34411)]) #@670 Handle the header-comments processing in `set-auto-mode'. `set-auto-mode' has some special-case code to handle the `mode' pseudo-variable when set in the header comment. This runs outside of `hack-local-variables' and cannot be conveniently intercepted, so we are forced to replicate it here. This special-case code will ultimately be removed from Emacs, as it exists to deal with a deprecated feature; but until then we need to replicate it in order to inhibit our own behaviour in the presence of a header comment `mode' declaration. If a file-local mode is detected in the header comment, then we call the function defined by `so-long-file-local-mode-function'. (defalias 'so-long--check-header-modes #[0 "\302 ?\303\211\211\211\212eb\210\304\303w\210\203v\203v\305 \211\262\203v\212\306\307\310#)\203j\310\311\312!\2037\313\225b\206<\314\315\310#)\203v\316\303w\210`\306\317\310#\203T\320u\210\202Wb\210\316\303x\210\321`{\227\322P!B\266\202\202)\321`{\227\322P!B\262)\211\205\201\323\324!@!\207" [enable-local-variables case-fold-search inhibit-local-variables-p nil " \n" set-auto-mode-1 search-forward ":" t looking-at "mode:" 0 re-search-forward "[ ;]mode:" " " ";" -1 intern "-mode" so-long-handle-file-local-mode last] 10 (#$ . 34629)]) #@474 Ensure that `so-long' defers to file-local mode declarations if necessary. If a file-local mode is detected, then we call the function defined by `so-long-file-local-mode-function'. This advice acts after the HANDLE-MODE:t call to `hack-local-variables'. (MODE-ONLY in Emacs versions < 26). File-local header comments are currently an exception, and are processed by `so-long--check-header-modes' (see which for details). (fn ORIG-FUN &optional HANDLE-MODE &rest ARGS) (defalias 'so-long--hack-local-variables #[641 "\300#\301=\203\211\203\302!\210\211\207" [apply t so-long-handle-file-local-mode] 7 (#$ . 35916)]) #@450 Maybe call `so-long' for files with very long lines. This advice acts after `set-auto-mode' has set the buffer's major mode. We can't act before this point, because some major modes must be exempt (binary file modes, for example). Instead, we act only when the selected major mode is a member (or derivative of a member) of `so-long-target-modes'. `so-long-predicate' then determines whether the mode change is needed. (fn ORIG-FUN &rest ARGS) (defalias 'so-long--set-auto-mode #[385 "\306 \203 \307 \210\310\311\"\210) \205F?\205F ?\205F\f\310=\204,\311\312\f\"\205F \211 \205F\313p\310\"\204@\204C\314 \207 \207" [so-long--inhibited so-long-enabled so-long--set-auto-mode so-long--calling so-long-target-modes so-long-predicate nil so-long--check-header-modes t apply derived-mode-p get-buffer-window so-long so-long-detected-p so-long-invisible-buffer-function] 5 (#$ . 36552)]) #@1131 Prevent the original major mode being restored after `so-long-mode'. This advice is needed and enabled only for Emacs versions < 26.1. If the local `mode' pseudo-variable is used, `set-auto-mode-0' will call it firstly, and subsequently `hack-one-local-variable' may call it again. Usually `hack-one-local-variable' tries to avoid processing that second call, by testing the value against `major-mode'; but as we may have changed the major mode to `so-long-mode' by this point, that protection is insufficient and so we need to perform our own test. We likewise need to support an equivalent of the `no-mode' behaviour in 26.1+ to ensure that `so-long-mode-revert' will not restore a file-local mode again after it has already reverted to the original mode. The changes to `normal-mode' in Emacs 26.1 modified the execution order, and makes this advice unnecessary. The relevant NEWS entry is: ** File local and directory local variables are now initialized each time the major mode is set, not just when the file is first visited. These local variables will thus not vanish on setting a major mode. (fn ORIG-FUN VAR VAL) (defalias 'so-long--hack-one-local-variable #[771 "\301=\203+\302\303!\227\304P!\206\"\305\306!\211\205 \307!\307!=\262?\205*\"\207\"\207" [so-long--hack-local-variables-no-mode mode intern symbol-name "-mode" so-long-original major-mode indirect-function] 8 (#$ . 37467)]) #@75 Arrange to call `so-long' if the current buffer is displayed in a window. (defalias 'so-long-deferred #[0 "\300\301\302\303\304$\207" [add-hook window-configuration-change-hook so-long nil :local] 5 (#$ . 38893)]) #@478 Invoke `so-long-action' and run `so-long-hook'. This command is called automatically when long lines are detected, when `global-so-long-mode' is enabled. The effects of the action can be undone by calling `so-long-revert'. If ACTION is provided, it is used instead of `so-long-action'. With a prefix argument, select the action to use interactively. If an action was already active in the buffer, it will be reverted before invoking the new action. (fn &optional ACTION) (defalias 'so-long #[256 "\306\307\310\311#\210?\205N \203\312 \210\313\314 \210\211\203\315\211\313\n\204)\302! \2041\303!\316\317!\210\n\203>\n \210\313\320\321!\204G\305 \313\322\323!*\207" [so-long--calling so-long--active so-long-function so-long-revert-function so-long-detected-p so-long-mode-line-info remove-hook window-configuration-change-hook so-long :local so-long-revert t so-long--ensure-enabled nil so-long-remember-all :reset derived-mode-p so-long-mode run-hooks so-long-hook inhibit-read-only] 6 (#$ . 39114) (byte-code "\205\302\303\304\305\306 \"\307\310$!C\207" [current-prefix-arg so-long-action-alist intern completing-read "Action (none): " mapcar car nil :require-match] 6)]) #@348 Revert the active `so-long-action' and run `so-long-revert-hook'. This undoes the effects of the `so-long' command (which is normally called automatically by `global-so-long-mode'). For the default action, reverting will restore the original major mode, and restore the minor modes and settings which were overridden when `so-long' was invoked. (defalias 'so-long-revert #[0 "?\205\304 \203 \210\305\304\306\307!*\207" [so-long--calling so-long-revert-function so-long--active inhibit-read-only t nil run-hooks so-long-revert-hook] 2 (#$ . 40325) "@"]) #@92 Enable the so-long library's functionality. Equivalent to calling (global-so-long-mode 1) (defalias 'so-long-enable #[0 "\300\301!\207" [global-so-long-mode 1] 2 (#$ . 40895) nil]) #@93 Disable the so-long library's functionality. Equivalent to calling (global-so-long-mode 0) (defalias 'so-long-disable #[0 "\300\301!\207" [global-so-long-mode 0] 2 (#$ . 41083) nil]) (byte-code "\300\301\302\303#\210\300\304\302\303#\210\305\302\306\307\310DD\311\312\313\314\315\316\317\320\321& \207" [make-obsolete so-long-enable global-so-long-mode "so-long 1.0" so-long-disable custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "Non-nil if Global So-Long mode is enabled.\nSee the `global-so-long-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 `global-so-long-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group so-long :type boolean] 12) #@681 Toggle automated performance mitigations for files with long lines. Many Emacs modes struggle with buffers which contain excessively long lines, and may consequently cause unacceptable performance issues. This is commonly on account of "minified" code (i.e. code that has been compacted into the smallest file size possible, which often entails removing newlines should they not be strictly necessary). When such files are detected by `so-long-predicate', we invoke the selected `so-long-action' to mitigate potential performance problems in the buffer. Use \[so-long-commentary] for more information. Use \[so-long-customize] to configure the behaviour. (fn &optional ARG) (defalias 'global-so-long-mode #[256 "\302 \303\300\304=\203\305\300!?\202\306!\307V\"\210\203:\310 \210\311\312\313\314#\210\311\315\313\316#\210 \317W\203R\311\320\313\321#\210\202R\322 \210\323\312\314\"\210\323\315\316\"\210 \317W\203R\323\320\321\"\210\324\325\305\300!\203^\326\202_\327\"\210\330\331!\203\211\332\300!\210\302 \203w\211\302 \232\203\211\333\334\335\305\300!\203\204\336\202\205\337#\266\210\340 \210\305\300!\207" [global-so-long-mode emacs-major-version current-message set-default toggle default-value prefix-numeric-value 0 so-long--enable advice-add hack-local-variables :around so-long--hack-local-variables set-auto-mode so-long--set-auto-mode 26 hack-one-local-variable so-long--hack-one-local-variable so-long--disable advice-remove run-hooks global-so-long-mode-hook global-so-long-mode-on-hook global-so-long-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Global So-Long mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 41922) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar global-so-long-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\211%\210\303\306\302\311#\207" [global-so-long-mode-map global-so-long-mode-hook variable-documentation put "Hook run after entering or leaving `global-so-long-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 global-so-long-mode nil boundp "Non-nil if the so-long library's automated functionality is enabled.\n\nUse \\[so-long-commentary] for more information.\n\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `global-so-long-mode'."] 6) #@57 Enable essential functionality, if not already enabled. (defalias 'so-long--ensure-enabled #[0 "?\205\301 \207" [so-long-enabled so-long--enable] 1 (#$ . 44440)]) #@56 Enable functionality other than `global-so-long-mode'. (defalias 'so-long--enable #[0 "\301\302\303\"\210\304\305 \306\307\310\311\312\313\314\315\257#\210\316\211\207" [so-long-enabled add-to-list mode-line-misc-info ("" so-long-mode-line-info) define-key-after current-global-map [menu-bar so-long] menu-item "So Long" nil :visible (or so-long--active so-long-detected-p (derived-mode-p 'so-long-mode)) :filter #[257 "\300 \207" [so-long-menu] 2 "\n\n(fn CMD)"] t] 10 (#$ . 44612)]) #@57 Disable functionality other than `global-so-long-mode'. (defalias 'so-long--disable #[0 "\302\303\"\304\305 \306\307#\210\307\211\207" [mode-line-misc-info so-long-enabled delete ("" so-long-mode-line-info) define-key current-global-map [menu-bar so-long] nil] 4 (#$ . 45105)]) #@31 Handler for `unload-feature'. (defalias 'so-long-unload-function #[0 "\3021K\303\304!\210\305 \211\203/\211@r\211q\210\306\307\310\311#\210\312\300!\203'\203'\313 \210)A\266\202\202\n\210\314\211\203G\211@\315!\210\316 \"A\266\202\2021\210\3170\207\320\321@A#\210\322\207" [so-long--active unload-function-defs-list (error) global-so-long-mode 0 buffer-list remove-hook window-configuration-change-hook so-long :local boundp so-long-revert (so-long--active so-long--inhibited so-long-detected-p so-long-file-local-mode-function so-long-function so-long-minor-mode so-long-mode-abbrev-table so-long-mode-line-info so-long-mode-syntax-table so-long-original-values so-long-revert-function) makunbound delq nil message "Error unloading so-long: %S %S" t] 6 (#$ . 45392)]) (byte-code "\300\301\211\203!\211@\302@\303\304A\"#\210\305@\306\307#\210A\266\202\202\210\207" [#[0 "\300\207" [nil] 1] ((so-long-inhibit-whitespace-mode . so-long-hook) (so-long-make-buffer-read-only . so-long-hook) (so-long-revert-buffer-read-only . so-long-revert-hook) (so-long-inhibit-global-hl-line-mode . so-long-mode-hook)) defalias format "Obsolete function. It now does nothing.\n\nIf it appears in `%s', you should remove it." make-obsolete nil "so-long.el version 1.0"] 9) #@35 The loaded version of so-long.el. (defvar so-long-version (byte-code "\301\302!\203\303\207\207" [so-long--latest-version boundp so-long-mode-enabled "0.5"] 2) (#$ . 46677)) (byte-code "\305 \"\203\205\305\306\"\203\203\307\310\311\"\210\312\313!\210\314\315\316\317N\236A\236\203,\320\316\315\314#\210\321\316!\210\322\323\324\317N\236A\236\203A\320\324\323\322#\210\321\324!\210\325\302!\203M\326\n\327\330#\210\331\211\203_\211@\332!\210A\266\202\202N\210\333\211\203r\211@\334!\210A\266\202\202a\210 \203\f\204\304\335!\210\332\303!\210 \336\337!\207" [so-long-version so-long--latest-version so-long-mode-map so-long-mode-enabled global-so-long-mode version< "1.0" remove-hook change-major-mode-hook so-long-change-major-mode require advice so-long--file-local-mode after hack-local-variables ad-advice-info ad-remove-advice ad-activate so-long--set-auto-mode around set-auto-mode boundp define-key [remap so-long-mode-revert] so-long-revert (so-long-mode--inhibited so-long-original-mode) makunbound (so-long-change-major-mode so-long-check-header-modes so-long-line-detected-p) fmakunbound 1 provide so-long] 4)