%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/delsel.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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@102 If non-nil, deleted region text is stored in this register. Value must be the register (key) to use. (defvar delete-selection-save-to-register nil (#$ . 409)) (byte-code "\300\301\302\"\210\303\302\304\305\306DD\307\310\311\312\313\314\315\316\317&\207" [defalias pending-delete-mode delete-selection-mode custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "Non-nil if Delete-Selection mode is enabled.\nSee the `delete-selection-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 `delete-selection-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group editing-basics :type boolean] 12) #@618 Toggle Delete Selection mode. If called interactively, enable Delete-Selection mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. When Delete Selection mode is enabled, typed text replaces the selection if the selection is active. Otherwise, typed text is just inserted at point regardless of any selection. See `delete-selection-helper' and `delete-selection-pre-hook' for information on adapting behavior of commands in Delete Selection mode. (fn &optional ARG) (defalias 'delete-selection-mode #[256 "\301 \302\300\303=\203 \304\300!?\202 \305!\306V\"\210\204$ \307\310\311\"\210\202) \312\310\311\"\210\313\314\304\300!\2035 \315\2026 \316\"\210\317\320!\203` \321\300!\210\301 \203N \211\301 \232\203` \322\323\324\304\300!\203[ \325\202\\ \326#\266\210\327 \210\304\300!\207" [delete-selection-mode current-message set-default toggle default-value prefix-numeric-value 0 remove-hook pre-command-hook delete-selection-pre-hook add-hook run-hooks delete-selection-mode-hook delete-selection-mode-on-hook delete-selection-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Delete-Selection mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 1184) (byte-code "\206 \301C\207" [current-prefix-arg toggle] 1)]) (defvar delete-selection-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\300!\205 \307\211%\207" [delete-selection-mode-map delete-selection-mode-hook variable-documentation put "Hook run after entering or leaving `delete-selection-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 delete-selection-mode nil boundp] 6) (defvar delsel--replace-text-or-position nil) #@118 Delete the active region. If KILLP in not-nil, the active region is killed instead of deleted. (fn &optional KILLP) (defalias 'delete-active-region #[256 "\211\203 \305\306`\307 \310#)\207 \203% \311 \n\310!\"\210p:\205! @B\211\207\n\312!\207" [this-command delete-selection-save-to-register region-extract-function buffer-undo-list delsel--replace-text-or-position nil kill-region mark t set-register delete-only] 5 (#$ . 3096)]) #@284 Repeat replacing text of highlighted region with typed text. Search for the next stretch of text identical to the region last replaced by typing text over it and replaces it with the same stretch of text. With ARG, repeat that many times. `C-u' means until end of buffer. (fn ARG) (defalias 'delete-selection-repeat-replace-region #[257 "\205 \304!:\203 d\202 \305 !\203* G\306V\203* \n;\2040 \307\n@!\2040 \310\311!\202\356 \n:\203\317 \n@\nA\312rq\210\214~\210\312\211\211\203\221 :\203\221 @\262A\262=\203c \312\262\202J :\203J @\250\203J A\250\203J \203\206 AU\203\206 @\262\202J @\262A\262\202J \203\267 \211\203\267 X\203\267 \313\314!U\203\267 \315\"\316\306\nG\312\n$\210\202\312 \204\306 =\203\306 \317\202\312 \310\320!\210\266*\266\211\306V\205\356 \n\205\356 \321\312\314#\205\356 \322\n\312\314#\210\211S\262\202\317 \207" [delete-selection-save-to-register current-prefix-arg delsel--replace-text-or-position buffer-undo-list get-register prefix-numeric-value 0 buffer-live-p message "No known previous replacement" nil mark t filter-buffer-substring set-text-properties "" "Cannot locate replacement text" search-forward replace-match] 14 (#$ . 3540) "P"]) #@1068 Delete selection according to TYPE: `yank' For commands which do a yank; ensures the region about to be deleted isn't immediately yanked back, which would make the command a no-op. `supersede' Delete the active region and ignore the current command, i.e. the command will just delete the region. This is for commands that normally delete small amounts of text, like a single character -- they will instead delete the whole active region. `kill' `kill-region' is used on the selection, rather than `delete-region'. (Text selected with the mouse will typically be yankable anyhow.) FUNCTION For commands which need to dynamically determine this behavior. FUNCTION should take no argument and return a value acceptable as TYPE, or nil. In the latter case, FUNCTION should itself do with the active region whatever is appropriate. Other non-nil values The normal case: delete the active region prior to executing the command which will insert replacement text. (fn TYPE) (defalias 'delete-selection-helper #[257 "\3041\237 \3051\224 \211\306\267\202g \307\310!\210\205\221 \311=\205\221 \312\311\313\n!!\210\314\211)\202\221 \315`\316 \"@\230\203E \317\320!\203E \320 \203E \321\322!\210\323\324 !\307 \210\211b\262\202\221 `\316 U\307 \210\211?\205b \314\211\262\202\221 \325!\203t \326 !\202\221 \211\205\221 \307 \210\205\221 \311=\205\221 \312\311\313\n!!\210\314\211)00\2070\327\330A@\"\210\331 \207\327\332!\210\331 \207" [overwrite-mode this-command current-prefix-arg kill-ring (text-read-only) (file-supersession) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (kill 14 yank 43 supersede 83)) delete-active-region t self-insert-command nil prefix-numeric-value ignore buffer-substring-no-properties mark fboundp mouse-region-match current-kill 1 copy-marker region-beginning functionp delete-selection-helper message "%s" ding "Text is read-only"] 5 (#$ . 4769)]) #@275 Function run before commands that delete selections are executed. Commands which will delete the selection need a `delete-selection' property on their symbol; commands which insert text but don't have this property won't delete the selection. See `delete-selection-helper'. (defalias 'delete-selection-pre-hook #[0 "\205 \303 \205 ?\205 \304\n9\205 \n\305N!\207" [delete-selection-mode buffer-read-only this-command use-region-p delete-selection-helper delete-selection] 3 (#$ . 6798)]) #@598 Return t when `delete-selection-mode' should not delete the region. The `self-insert-command' could be the current command or may be called by the current command. If this function returns nil, then `delete-selection' is allowed to delete the region. This function is intended for use as the value of the `delete-selection' property of a command, and shouldn't be used for anything else. In particular, `self-insert-command' has this function as its `delete-selection' property, so that "electric" self-insert commands that act on the region could adapt themselves to `delete-selection-mode'. (defalias 'delete-selection-uses-region-p #[0 "\300\301!?\207" [run-hook-with-args-until-success self-insert-uses-region-functions] 2 (#$ . 7298)]) (byte-code "\300\301\302\303#\210\300\304\302\305#\210\300\306\302\305#\210\300\307\302\307#\210\300\310\302\307#\210\300\311\302\305#\210\300\312\302\313#\210\300\314\302\305#\210\300\315\302\305#\210\300\316\302\305#\210\300\317\302\305#\210\300\320\302\305#\207" [put self-insert-command delete-selection delete-selection-uses-region-p insert-char t quoted-insert yank clipboard-yank insert-register delete-char supersede reindent-then-newline-and-indent newline-and-indent newline electric-newline-and-maybe-indent open-line] 4) #@157 Abort recursive edit. In Delete Selection mode, if the mark is active, just deactivate it; then it takes a second \[keyboard-quit] to abort the minibuffer. (defalias 'minibuffer-keyboard-quit #[0 "\203 \302 \203 \303\211\207\304 \207" [delete-selection-mode deactivate-mark region-active-p t abort-recursive-edit] 2 (#$ . 8583) nil]) (define-key minibuffer-local-map "" 'minibuffer-keyboard-quit) #@38 Unload the Delete Selection library. (defalias 'delsel-unload-function #[0 "\301\302\303#\210\304\211\203 \211@\305\306\307#\210A\266\202\202 \210\307\207" [minibuffer-local-map define-key "" abort-recursive-edit (self-insert-command insert-char quoted-insert yank clipboard-yank insert-register newline-and-indent reindent-then-newline-and-indent newline open-line) put delete-selection nil] 6 (#$ . 8991)]) (provide 'delsel)