%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/cedet/srecode/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/cedet/srecode/fields.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\300\302!\207" [require eieio cl-generic] 2)
#@123 While inserting a set of fields, collect in this variable.
Once an insertion set is done, these fields will be activated.
(defvar srecode-field-archive nil (#$ . 479))
(byte-code "\300\301\302\303\304\305%\210\306\307\310\311\304\312\313\314&\210\315\316\317\320!\"\210\315\321\322\320!\"\210\315\323\321\"\210\324\323\325\326#\210\327\320\330\321#\331\320\310\332\333$\207" [custom-declare-face srecode-field-face ((((class color) (background dark)) (:underline "green")) (((class color) (background light)) (:underline "green4"))) "Face used to specify editable fields from a template." :group semantic-faces custom-declare-variable srecode-fields-exit-confirmation nil "Ask for confirmation before leaving field editing mode." srecode :type boolean defalias srecode-overlaid-p eieio-make-class-predicate srecode-overlaid srecode-overlaid--eieio-childp eieio-make-child-predicate srecode-overlaid-child-p make-obsolete "use (cl-typep ... \\='srecode-overlaid) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal ((overlay :documentation "Overlay representing this field.\nThe overlay will crossreference this object.")) (:documentation "An object that gets automatically bound to an overlay.\nHas virtual :start and :end initializers.")] 8)
#@55 Create a new object of class type `srecode-overlaid'.
(defalias 'srecode-overlaid #[(&rest slots) "\301\302\303#\207" [slots apply make-instance srecode-overlaid] 4 (#$ . 1757)])
(byte-code "\300\301\302\303#\300\207" [function-put srecode-overlaid compiler-macro srecode-overlaid--anon-cmacro] 4)
(defalias 'srecode-overlaid--anon-cmacro #[(whole &rest slots) "@;\204	\207\302\303\304@	@#	@\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5])
(byte-code "\300\301\302\303\304\305%\210\300\306\302\307\302\310%\210\300\311\302\312\302\313%\210\300\314\302\315\302\316%\210\300\317\302\320\302\321%\210\300\322\302\323\302\324%\207" [cl-generic-define-method initialize-instance nil ((olaid srecode-overlaid) &optional args) t #[(#1=#:cl--cnm olaid &optional args) "\306\211\211\211\f\203H\f@\307=\203 \fA\211@\fA\211\202	\f@\310=\2034\fA\211@\fA\211\202	\f@B\fA\211@B\fA\211\204\f\311	p\312\306%\313\n\314\312#\210\315
\316\n#\210
\237\",\207" [end start olay newargs args olaid nil :start :end make-overlay t overlay-put srecode-init-only eieio-oset overlay #1#] 7 "Initialize OLAID, being sure it archived."] srecode-overlaid-activate ((olaid srecode-overlaid)) #[(olaid) "\305\306\"\307	!\310	!\311\np\312\313%\314	!\210\315\f\316#\210\317\306\f#,\207" [olaid ola start end ol eieio-oref overlay overlay-start overlay-end make-overlay nil t delete-overlay overlay-put srecode eieio-oset] 6 "Activate the overlaid area."] srecode-delete ((olaid srecode-overlaid)) #[(olaid) "\301\302\303\"!\210\304\303\"\207" [olaid delete-overlay eieio-oref overlay slot-makeunbound] 4 "Delete the overlay from OLAID."] srecode-empty-region-p ((olaid srecode-overlaid)) #[(olaid) "\301!\302U\207" [olaid srecode-region-size 0] 2 "Return non-nil if the region covered by OLAID is of length 0."] srecode-region-size ((olaid srecode-overlaid)) #[(olaid) "\303\304\305\"!\306\304\305\"!	\nZ*\207" [olaid end start overlay-start eieio-oref overlay overlay-end] 5 "Return the length of region covered by OLAID."] srecode-point-in-region-p ((olaid srecode-overlaid)) #[(olaid) "\303\304\305\"!\306\304\305\"!`\nY\205`	X*\207" [olaid end start overlay-start eieio-oref overlay overlay-end] 5 "Return non-nil if point is in the region of OLAID."]] 6)
#@58 Return a list of overlaid fields of type CLASS at point.
(defalias 'srecode-overlaid-at-point #[(class) "\304`!\305\211\203'\306	@\307\"\211\203\310\n\"\203\nB)	A\211\204\n\237@*\207" [ret ol tmp class overlays-at nil overlay-get srecode object-of-class-p] 4 (#$ . 4112)])
(byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [cl-generic-define-method srecode-overlaid-text nil ((olaid srecode-overlaid) &optional set-to) #[(olaid &optional set-to) "\304\305\"\306	!;\204\307\n\310	!\"\202/\212\n\310	!|\210\nb\210c\210\311	\n\211G\\#\210)\312*\207" [olaid ol start set-to eieio-oref overlay overlay-start buffer-substring-no-properties overlay-end move-overlay nil] 5 "Return the text under OLAID.\nIf SET-TO is a string, then replace the text of OLAID wit SET-TO."] defalias srecode-template-inserted-region-p eieio-make-class-predicate srecode-template-inserted-region srecode-template-inserted-region--eieio-childp eieio-make-child-predicate srecode-template-inserted-region-child-p make-obsolete "use (cl-typep ... \\='srecode-template-inserted-region) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (srecode-overlaid) ((fields :documentation "A list of field overlays in this region.") (active-region :allocation :class :initform nil :documentation "The template region currently being handled.")) (:documentation "Manage a buffer region in which fields exist.")] 6)
#@71 Create a new object of class type `srecode-template-inserted-region'.
(defalias 'srecode-template-inserted-region #[(&rest slots) "\301\302\303#\207" [slots apply make-instance srecode-template-inserted-region] 4 (#$ . 5664)])
(byte-code "\300\301\302\303#\300\207" [function-put srecode-template-inserted-region compiler-macro srecode-template-inserted-region--anon-cmacro] 4)
(defalias 'srecode-template-inserted-region--anon-cmacro #[(whole &rest slots) "@;\204	\207\302\303\304@	@#	@\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5])
(byte-code "\300\301\302\303\304\305%\210\300\306\302\307\304\310%\210\300\311\302\312\304\313%\207" [cl-generic-define-method initialize-instance nil ((ir srecode-template-inserted-region) &rest args) t #[(#1=#:cl--cnm ir &rest args) "\303\304	#\210\305\n \207" [ir srecode-field-archive #1# eieio-oset fields nil] 4 "Initialize IR, capturing the active fields, and creating the overlay.\n\n(fn IR &rest ARGS)"] srecode-overlaid-activate ((ir srecode-template-inserted-region)) #[(#2=#:cl--cnm ir) "\305\306\"\307\211\203\n@\310	!\210\nA\211\204* \210\305\306\"@\311\305\f\312\"!b\210)\313\314#\210\315\316\317\320\211$\207" [ir F --dolist-tail-- #2# first eieio-oref fields nil srecode-overlaid-activate overlay-start overlay eieio-oset active-region add-hook post-command-hook srecode-field-post-command t] 6 "Activate the template area for IR."] srecode-delete ((ir srecode-template-inserted-region)) #[(#3=#:cl--cnm ir) "\302\303\304#\210\305\306\307\310\"\"\210	 \210\311\312\313\314#\207" [ir #3# eieio-oset active-region nil mapc srecode-delete eieio-oref fields remove-hook post-command-hook srecode-field-post-command t] 5 "Call into our base, but also clear out the fields."]] 6)
#@47 Return the active region for template fields.
(defalias 'srecode-active-template-region #[nil "\300\301\302\"\207" [eieio-oref-default srecode-template-inserted-region active-region] 3 (#$ . 7491)])
(put 'srecode-active-template-region 'byte-optimizer 'byte-compile-inline-expand)
#@49 Srecode field handler in the post command hook.
(defalias 'srecode-field-post-command #[nil "\301\302\303\"\211\204\304\305\306\307#\202\310!?\205\311!)\207" [ar eieio-oref-default srecode-template-inserted-region active-region remove-hook post-command-hook srecode-field-post-command t srecode-point-in-region-p srecode-delete] 5 (#$ . 7778)])
(byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias srecode-field-p eieio-make-class-predicate srecode-field srecode-field--eieio-childp eieio-make-child-predicate srecode-field-child-p make-obsolete "use (cl-typep ... \\='srecode-field) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (srecode-overlaid) ((tail :documentation "Overlay used on character just after this field.\nUsed to provide useful keybindings there.") (name :initarg :name :documentation "The name of this field.\nUsually initialized from the dictionary entry name that\nthe users needs to edit.") (prompt :initarg :prompt :documentation "A prompt string to use if this were in the minibuffer.\nDisplay when the cursor enters this field.") (read-fcn :initarg :read-fcn :documentation "A function that would be used to read a string.\nTry to use this to provide useful completion when available.")) (:documentation "Representation of one field.")] 6)
#@52 Create a new object of class type `srecode-field'.
(defalias 'srecode-field #[(&rest slots) "\301\302\303#\207" [slots apply make-instance srecode-field] 4 (#$ . 9189)])
(byte-code "\300\301\302\303#\300\207" [function-put srecode-field compiler-macro srecode-field--anon-cmacro] 4)
(defalias 'srecode-field--anon-cmacro #[(whole &rest slots) "@;\204	\207\302\303\304@	@#	@\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5])
#@35 Keymap applied to field overlays.
(defvar srecode-field-keymap (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\312#\210\302\314\315#\210)\207" [km make-sparse-keymap define-key "	" srecode-field-next "\211" srecode-field-prev "" srecode-field-end "" srecode-field-start "\355" "" srecode-field-exit-ask] 4) (#$ . 9693))
(byte-code "\300\301\302\303\304\305%\210\300\306\302\307\304\310%\210\300\311\302\312\304\313%\207" [cl-generic-define-method initialize-instance nil ((field srecode-field) &optional args) t #[(#1=#:cl--cnm field &optional args) "	\235\204\f\303	C\"\n \207" [field srecode-field-archive #1# append] 3 "Initialize FIELD, being sure it archived."] srecode-overlaid-activate ((field srecode-field)) #[(#2=#:cl--cnm field) " \210\306	\307\"\310\211\311\n\312\313#\210\311\n\314
#\210\311\n\315\316#\210\311\n\317\320#\210\311\n\321\322#\210\323\n!\324\211Tp#\311\f\325	#\210\311\f\314
#\210\311\f\312\313#\210\326	\304\f#+\207" [#2# field ol end tail srecode-field-keymap eieio-oref overlay nil overlay-put face srecode-field-face keymap modification-hooks (srecode-field-mod-hook) insert-behind-hooks (srecode-field-behind-hook) insert-in-front-hooks (srecode-field-mod-hook) overlay-end make-overlay srecode eieio-oset] 5 "Activate the FIELD area."] srecode-delete ((olaid srecode-field)) #[(#3=#:cl--cnm olaid) "\302\303\304\"!\210\305\304\"\210	 \207" [olaid #3# delete-overlay eieio-oref tail slot-makeunbound] 4 "Delete our secondary overlay."]] 6)
#@55 Maximum size of a field before canceling replication.
(defvar srecode-field-replication-max-size 100 (#$ . 11242))
#@226 Modification hook for the field overlay.
OL is the overlay.
AFTER is non-nil if it is called after the change.
START and END are the bounds of the change.
PRE-LEN is used in the after mode for the length of the changed text.
(defalias 'srecode-field-mod-hook #[(ol after start end &optional pre-len) "\205\243	?\205\243\306\n\307\"\310\211\311\312\"\205\242\313\312\"\313\314\"\f\315\316!\317\f!S#\210\315\f\317\f!S\317\f!#\210*\320!\321\322\323\"\211\205V\313\324\"\313\325\"\326\211\205\240@\211=\204\226\313\325\"\230\203\226GV\203\217\327\330!\210\202\226\320\"\210A\211\204i\326.+\207" [after undo-in-progress ol field inhibit-point-motion-hooks inhibit-modification-hooks overlay-get srecode t slot-boundp overlay eieio-oref tail move-overlay overlay-start overlay-end srecode-overlaid-text eieio-oref-default srecode-template-inserted-region active-region fields name nil message "Field size too large for replication." main new-text region allfields F --dolist-tail-- srecode-field-replication-max-size] 6 (#$ . 11364)])
#@226 Modification hook for the field overlay.
OL is the overlay.
AFTER is non-nil if it is called after the change.
START and END are the bounds of the change.
PRE-LEN is used in the after mode for the length of the changed text.
(defalias 'srecode-field-behind-hook #[(ol after start end &optional pre-len) "\205\306	\307\"\310	\311	!#\210\312	\f
%)\207" [after ol field end start pre-len overlay-get srecode move-overlay overlay-start srecode-field-mod-hook] 6 (#$ . 12468)])
(cl-generic-define-method 'srecode-field-goto nil '((field srecode-field)) nil #[(field) "\301\302\303\"!b\207" [field overlay-start eieio-oref overlay] 4 "Goto the FIELD."])
#@25 Move to the next field.
(defalias 'srecode-field-next #[nil "\303\304!\303\305!\204\306\307!\210	\204\306\310!\210\311	\302\"\211\205H\n@=\203@\nA\2036\312\nA@!\210\202>\312\311	\302\"@!\210\313\nA\211\204!\313+\207" [f tr fields srecode-overlaid-at-point srecode-field srecode-template-inserted-region error "Not in a field" "Not in a template region" eieio-oref srecode-field-goto nil] 5 (#$ . 13130) nil])
#@25 Move to the prev field.
(defalias 'srecode-field-prev #[nil "\303\304!\303\305!\204\306\307!\210	\204\306\310!\210\311\312	\302\"!\211\205J\n@=\203B\nA\2038\313\nA@!\210\202@\313\312	\302\"@!\210\314\nA\211\204#\314+\207" [f tr fields srecode-overlaid-at-point srecode-field srecode-template-inserted-region error "Not in a field" "Not in a template region" reverse eieio-oref srecode-field-goto nil] 5 (#$ . 13561) nil])
#@32 Move to the end of this field.
(defalias 'srecode-field-end #[nil "\301\302!\303\304\305\"!b)\207" [f srecode-overlaid-at-point srecode-field overlay-end eieio-oref overlay] 4 (#$ . 14005) nil])
#@32 Move to the end of this field.
(defalias 'srecode-field-start #[nil "\301\302!\303\304\305\"!b)\207" [f srecode-overlaid-at-point srecode-field overlay-start eieio-oref overlay] 4 (#$ . 14208) nil])
#@56 Ask if the user wants to exit field-editing mini-mode.
(defalias 'srecode-field-exit-ask #[nil "\203\n\301\302!\205\303\304\305\306\"!\207" [srecode-fields-exit-confirmation y-or-n-p "Exit field-editing mode? " srecode-delete eieio-oref-default srecode-template-inserted-region active-region] 4 (#$ . 14415) nil])
(provide 'srecode/fields)

Zerion Mini Shell 1.0