;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@31 Keymap for lexbind minor mode (defvar lexbind-mode-keymap (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\207" [make-sparse-keymap define-key [3 134217844] lexbind-insert-lexical-binding-t [3 134217836] lexbind-toggle-lexical-binding [3 134217843] lexbind-lexscratch] 5) (#$ . 87)) #@296 Toggle the variable `lexical-binding' on and off. Interactive. When called with a numeric argument, set `lexical-binding' to t if the argument is positive, nil otherwise. Optional argument ARG if nil toggles `lexical-binding', positive enables it, non-positive disables it. (fn &optional ARG) (defalias 'lexbind-toggle-lexical-binding #[256 "\211\203\301!\211\302V\262\202?\211\303\304!\203&\305\306\203#\307\202$\310\"\210\207" [lexical-binding prefix-numeric-value 0 called-interactively-p any message "Lexical-binding %s" "enabled" "disabled"] 5 (#$ . 400) nil]) #@61 Make a lexical scratch buffer. (fn &optional OTHER-WINDOW) (defalias 'lexbind-lexscratch #[256 "\302\303!\211\204\304\303!\262r\211q\210\305 \210\306 c\210)\203!\307!\207\310!\207" [lexical-binding initial-scratch-message get-buffer "*lexscratch*" get-buffer-create lisp-interaction-mode t switch-to-buffer-other-window switch-to-buffer] 4 (#$ . 986) "P"]) #@44 Narrow to the first line. (fn &rest BODY) (defalias 'lexbind-with-first-line '(macro . #[128 "\300\301\302\303\304\305\306BBBBBBD\207" [save-excursion save-restriction (widen) (goto-char 1) (forward-line 1) (narrow-to-region 1 (point)) (goto-char (point-min))] 9 (#$ . 1358)])) #@66 Indicate if the first line of the current buffer is a prop-line. (defalias 'lexbind-prop-line-p #[0 "\212\214~\210\300b\210\300y\210\300`}\210eb\210\301\302\303\304#*\207" [1 re-search-forward "-\\*-.+-\\*-" nil t] 4 (#$ . 1645)]) #@98 Attempt to set `lexical-binding' to t in the current buffer's prop-line. (fn &optional VERBOSE) (defalias 'lexbind-insert-lexical-binding-t #[256 "\300\301 \203\213\302 \303\236\304\"\210\203\207\211\203H\211A\204D\305\"\210\212\214~\210\306b\210\306y\210\306`}\210eb\210\307\310\311\312#\205B\313\314\311\211#\210\312*\207\315\316!\207\317\"\210\212\214~\210\306b\210\306y\210\306`}\210eb\210\307\320\311\312#\205\205\313\321\322!G\211\323V\262\203w\324\202x\325\311\211\211\326%\210\313\327\311\211\211\330%*\207\315\331!\207\211\332\"\210\212\306b\210\333c\210\334`!\210\306b\210\335`\336 \")\207" [#[385 "\205\300\301\"\207" [apply message] 5 "\n\n(fn &rest ARGS)"] lexbind-prop-line-p hack-local-variables-prop-line lexical-binding "prop-line found" "need to substitute prop-line" 1 re-search-forward "\\blexical-binding: *nil\\b" nil t replace-match "lexical-binding: t" message "lexical-binding is already non-nil" "need to append lexical-binding: t" "\\(-\\*- +\\)\\(.*?\\)\\(;*\\)\\( +-\\*-\\)" match-string 2 0 "; " "" 3 "lexical-binding: t\\4" 4 "Malformed prop line" "no prop-line found" "-*- lexical-binding: t -*-\n" set-mark comment-region mark] 10 (#$ . 1882) nil]) #@188 Generate mode line content to indicate the value of `lexical-binding'. Optional argument ARGS if provided, the first argument is taken as the value of `lexical-binding'. (fn &rest ARGS) (defalias 'lexbind-modeline-content #[128 "\211G\211\301V\262\203\211@\202\302\203 \303\304\305\306\307\310\"#\202(\303\311\305\306\307\312\"#P\207" [lexical-binding 0 " " propertize "(LEX)" help-echo format "Emacs Lisp lexical-binding is %s" "enabled" "(DYN)" "disabled"] 9 (#$ . 3094)]) #@93 Non-nil if Lexbind mode is enabled. Use the command `lexbind-mode' to change this variable. (defvar lexbind-mode nil (#$ . 3585)) (make-variable-buffer-local 'lexbind-mode) #@1004 Toggle Lexbind mode. Interactively with no argument, this command toggles the mode. A positive prefix argument enables the mode, any other prefix argument disables it. From Lisp, argument omitted or nil enables the mode, `toggle' toggles the state. This is a minor mode. If called interactively, toggle the `Lexbind mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `lexbind-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. When lexbind mode is enabled, the mode line of a window will contain the string (LEX) for lexical binding, (DYN) for dynamic binding, to indicate the state of the lexical-binding variable in that buffer. (fn &optional ARG) (defalias 'lexbind-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [lexbind-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks lexbind-mode-hook lexbind-mode-on-hook lexbind-mode-off-hook called-interactively-p any message "Lexbind mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 3766) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lexbind-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\207" [lexbind-mode-keymap lexbind-mode-hook variable-documentation put "Hook run after entering or leaving `lexbind-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode lexbind-mode (:eval (lexbind-modeline-content))] 6) #@14 lexbind-mode (defvar lexbind-mode-menu nil (#$ . 5921)) (byte-code "\301\302\303\304$\210\305\306!\207" [lexbind-mode-keymap easy-menu-do-define lexbind-mode-menu "lexbind-mode" ("Lexbind" ["Insert lexical-binding local var" (call-interactively 'lexbind-insert-lexical-binding-t)] ["Toggle lexical-binding" (call-interactively 'lexbind-toggle-lexical-binding)] ["Lexical scratch buffer" (call-interactively 'lexbind-lexscratch)] ["Turn Off minor mode" (progn (lexbind-mode -1) (message "Lexbind mode disabled"))] ["Help for minor mode" (describe-function 'lexbind-mode)]) provide lexbind-mode] 5)