%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/so-long.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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 <action>) :value-type (list (string :tag "Label" :value "<description>") (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>