;ELC   
;;; Compiled by rms@psilocin.gnu.ai.mit.edu on Sun Feb  9 19:11:36 1997
;;; from file /home/fsf/rms/e19/lisp/edmacro.el
;;; in Emacs version 19.34.92.6
;;; with bytecomp version 2.25
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`edmacro.el' was compiled for Emacs 19.29 or later"))


#@134 *Non-nil if edit-kbd-macro should leave 8-bit characters intact.
Default nil means to write characters above \177 in octal notation.
(defvar edmacro-eight-bits nil (#$ . -542))
(byte-code "! B	  	#	#BBB" [boundp edmacro-mode-map nil current-load-list make-sparse-keymap define-key "" edmacro-finish-edit "" edmacro-insert-key edmacro-store-hook edmacro-finish-hook edmacro-original-buffer] 4)
#@325 Edit a keyboard macro.
At the prompt, type any key sequence which is bound to a keyboard macro.
Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit
the last 100 keystrokes as a keyboard macro, or `M-x' to edit a macro by
its command name.
With a prefix argument, format the macro in a more concise way.
(defalias 'edit-kbd-macro #[(keys &optional prefix finish-hook store-hook) "\\! !    =, ȝF 	: !:  	@  =` !͘Z !K =n   | !\" 9 K \f! !\"!p\f!\" ?\"!!$!$! )!*,.!L!2L!L 1!\f\"-0A@\"c)@ c!)A B !\f=SC !D E !." [keys arrayp key-binding nil mac cmd store-hook call-last-kbd-macro ("" [return]) last-kbd-macro y-or-n-p "No keyboard macro defined.  Create one? " keyboard-quit "" execute-extended-command read-command "Name of keyboard macro to edit: " error "No command name given" view-lossage recent-keys "Key sequence %s is not defined" key-description "Key sequence %s is not a keyboard macro" message "Formatting keyboard macro..." oldbuf edmacro-fix-menu-commands mmac edmacro-format-keys 1 fmt prefix fmtv get-buffer-create "*Edit Macro*" buf "Formatting keyboard macro...done" switch-to-buffer kill-all-local-variables use-local-map edmacro-mode-map buffer-read-only edmacro-mode major-mode "Edit Macro" mode-name make-local-variable edmacro-original-buffer edmacro-finish-hook finish-hook edmacro-store-hook erase-buffer ";; Keyboard Macro Editor.  Press C-c C-c to finish; " "press C-x k RET to cancel.\n" ";; Original keys: " "\n" "\nCommand: " symbol-name "none" where-is-internal (keymap) "Key: " "Key: none\n" "\nMacro:\n\n" recenter (4) set-buffer-modified-p run-hooks edmacro-format-hook] 5 (#$ . 978) "kKeyboard macro to edit (C-x e, M-x, C-h l, or keys): \nP"])
#@48 Edit the most recently defined keyboard macro.
(defalias 'edit-last-kbd-macro #[(&optional prefix) "\n\"" [edit-kbd-macro call-last-kbd-macro prefix] 3 (#$ . 2914) "P"])
#@77 Edit a keyboard macro which has been given a name by `name-last-kbd-macro'.
(defalias 'edit-named-kbd-macro #[(&optional prefix) "\n\"" [edit-kbd-macro execute-extended-command prefix] 3 (#$ . 3093) "P"])
#@595 Read the region as a keyboard macro definition.
The region is interpreted as spelled-out keystrokes, e.g., "M-x abc RET".
See documentation for `edmacro-mode' for details.
Leading/trailing "C-x (" and "C-x )" in the text are allowed and ignored.
The resulting macro is installed as the "current" keyboard macro.

In Lisp, may also be called with a single STRING argument in which case
the result is returned rather than being installed as the current macro.
The result will be a string if possible, otherwise an event vector.
Second argument NEED-VECTOR means to return an event vector always.
(defalias 'read-kbd-macro #[(start &optional end) ";\n \n\"\n{!" [start edmacro-parse-keys end last-kbd-macro] 3 (#$ . 3308) "r"])
#@301 Return the keyboard macro MACRO as a human-readable string.
This string is suitable for passing to `read-kbd-macro'.
Second argument VERBOSE means to put one command per line with comments.
If VERBOSE is `1', put everything on one line.  If VERBOSE is omitted
or nil, use a compact 80-column format.
(defalias 'format-kbd-macro #[(&optional macro verbose) "\f 9\f K \n\"" [macro edmacro-format-keys last-kbd-macro verbose] 3 (#$ . 4050)])
(defalias 'edmacro-finish-edit #[nil "=\n !!Ɖe	\nb! !r 6 !єѕ{Ӛn Ԛ?O !\n\n!n \nK!n \n#!n  ) !  !єѕ{! Ӛ  Ԛ   	B	 !# #! #! #! #K!  \"#!  )) ! b m ! y! `)p*d{ ,-./0\n4	4/4Ӛ4!,.!D.q!!5!/`/5!\n=v5GVq57\n\n5GU\n!\n5M\n\n\"; ;:;@  !;A;*	5GU	= =:=@  !=A=*	> >:>@  \n5\">A>*)@ *!.!1A .!090 .\n" [major-mode edmacro-mode error "This command is valid only in buffers created by `edit-kbd-macro'" run-hooks edmacro-finish-hook nil top no-keys keys cmd case-fold-search looking-at "[ 	]*\\($\\|;;\\|REM[ 	\n]\\)" "Command:[ 	]*\\([^ 	\n]*\\)[ 	]*$" edmacro-store-hook "\"Command\" line not allowed in this context" 1 str "" "none" intern fboundp arrayp y-or-n-p format "Command %s is already defined; %s" "proceed? " keyboard-quit "Key:\\(.*\\)$" "\"Key\" line not allowed in this context" edmacro-parse-keys key t key-binding b commandp "Key %s is already defined; %s" edmacro-format-keys "Macro:[ 	\n]*" 0 "Expected a `Macro:' line" buf buffer-modified-p modp edmacro-original-buffer obuf store-hook finish-hook "No command name or keys specified" buffer-name message "Compiling keyboard macro..." mac "Compiling keyboard macro...done" last-kbd-macro fmakunbound where-is-internal (keymap) #1=#:G76300 global-unset-key #2=#:G76301 #3=#:G76302 global-set-key kill-buffer switch-to-buffer] 7 nil nil])
#@49 Insert the written name of a key in the buffer.
(defalias 'edmacro-insert-key #[(key) "n\f 	\"ñ	!ı" [edmacro-format-keys key t "\n" " "] 3 (#$ . 6141) "kKey to insert: "])
#@3091 \<edmacro-mode-map>Keyboard Macro Editing mode.  Press
\[edmacro-finish-edit] to save and exit.
To abort the edit, just kill this buffer with \[kill-buffer] RET.

Press \[edmacro-insert-key] to insert the name of any key by typing the key.

The editing buffer contains a "Command:" line and any number of
"Key:" lines at the top.  These are followed by a "Macro:" line
and the macro itself as spelled-out keystrokes: `C-x C-f foo RET'.

The "Command:" line specifies the command name to which the macro
is bound, or "none" for no command name.  Write "last-kbd-macro"
to refer to the current keyboard macro (as used by \[call-last-kbd-macro]).

The "Key:" lines specify key sequences to which the macro is bound,
or "none" for no key bindings.

You can edit these lines to change the places where the new macro
is stored.


Format of keyboard macros during editing:

Text is divided into "words" separated by whitespace.  Except for
the words described below, the characters of each word go directly
as characters of the macro.  The whitespace that separates words
is ignored.  Whitespace in the macro must be written explicitly,
as in "foo SPC bar RET".

 * The special words RET, SPC, TAB, DEL, LFD, ESC, and NUL represent
   special control characters.  The words must be written in uppercase.

 * A word in angle brackets, e.g., <return>, <down>, or <f1>, represents
   a function key.  (Note that in the standard configuration, the
   function key <return> and the control key RET are synonymous.)
   You can use angle brackets on the words RET, SPC, etc., but they
   are not required there.

 * Keys can be written by their ASCII code, using a backslash followed
   by up to six octal digits.  This is the only way to represent keys
   with codes above \377.

 * One or more prefixes M- (meta), C- (control), S- (shift), A- (alt),
   H- (hyper), and s- (super) may precede a character or key notation.
   For function keys, the prefixes may go inside or outside of the
   brackets:  C-<down> = <C-down>.  The prefixes may be written in
   any order:  M-C-x = C-M-x.

   Prefixes are not allowed on multi-key words, e.g., C-abc, except
   that the Meta prefix is allowed on a sequence of digits and optional
   minus sign:  M--123 = M-- M-1 M-2 M-3.

 * The `^' notation for control characters also works:  ^M = C-m.

 * Double angle brackets enclose command names:  <<next-line>> is
   shorthand for M-x next-line RET.

 * Finally, REM or ;; causes the rest of the line to be ignored as a
   comment.

Any word may be prefixed by a multiplier in the form of a decimal
number and `*':  3*<right> = <right> <right> <right>, and
10*foo = foofoofoofoofoofoofoofoofoofoo.

Multiple text keys can normally be strung together to form a word,
but you may need to add whitespace if the word would look like one
of the above notations:  `; ; ;' is a keyboard macro with three
semicolons, but `;;;' is a comment.  Likewise, `\ 1 2 3' is four
keys but `\123' is a single key written in octal, and `< right >'
is seven keys but `<right>' is a single function key.  When in
doubt, use whitespace.
(defalias 'edmacro-mode #[nil "!" [error "This mode can be enabled only by `edit-kbd-macro'"] 2 (#$ . 6331) nil])
(put 'edmacro-mode 'mode-class 'special)
(defalias 'edmacro-format-keys #[(macro &optional verbose) "	!    C C#\n' ̂( 	\"=I 	; 	GW~ HYt H\\I\\W *H=bH H\n> #!> H\nA> T H>? #Q\")H=<!=<H=T H>?8*+*S*Y-+P++*\")H=!=H=_TH>qT_H>?#Q\")034563:3@44\"556B63A36,#88#9:;<=45?@=: =@449\"5?5@?? =A=@-A\"::;;#<A<\":B45CDB:B@44:\"55;8<95DωCBAB]C:ςD-E9HF8GGHGW+HH+HI V+HW+HJ U+K H!!L =+GM ZV!H\\H=!HM \\H=+\\+NOE;<EEL =0NVFFI VFXFJ UNP VP NN#OQ R O\"M NO؁M OOQ S O\"Q T O\"OU K O#OV W EN#EN8TEX =CN8VCNHY >C8N#OZ [ O!!CZ [ O!!0OEV \\ O\"ONT8TU ] :P9#O0`0OPOQ O\"8^_` 8^8^\\&_T_^8\\^q_VV a _O#O8__8*8\"֚b POPEE;E9c d OGe Z]f \"g E;	Eh E!R]OG\\M \\i V<<j PN֚NPTOPOG\\.\n .\n" [edmacro-fix-menu-commands macro append current-minor-mode-maps current-local-map current-global-map maps (end-macro 48 49 50 51 52 53 54 55 56 57 45 21 -134217683 -134217680 -134217679 -134217678 -134217677 -134217676 -134217675 -134217674 -134217673 -134217672 -134217671) pkeys 13 mdigs edmacro-eight-bits 255 127 maxkey nil case-fold-search ("NUL" "TAB" "LFD" "RET" "ESC" "SPC" "DEL" "REM") res-words vconcat [end-macro] rest-mac "" res 0 len verbose 1 one-line i #1=#:G76303 128 134217600 end-macro key-binding edmacro-subseq (digit-argument negative-argument) "M-" " " 21 [21] universal-argument #2=#:G76305 #3=#:G76306 "C-u " [21] 45 (48 49 50 51 52 53 54 55 56 57) prefix apply max #4=#:G76309 map b #5=#:G76310 lookup-key bind-len key fkey tlen tkey #6=#:G76311 t #7=#:G76312 #8=#:G76313 function-key-map #9=#:G76314 #10=#:G76315 #11=#:G76316 bind first #12=#:G76317 ch 32 92 char-to-string self-insert-command 2 text desc 30 string-match "^[ACHMsS]-." "^;;\\|^<.*>$\\|^\\\\[0-9]+$\\|^[0-9]+\\*." "^\\^.$" mapconcat format "%s * %d" execute-extended-command (return 13) commandp intern-soft "<<%s>>" #[(ch) " 	\fT\nGWK \n\fH:K @		\"UC \"PA .\"S\"X =j Ղ =u ׂ = ق = ۂ = ݂ = ނ X Ⴏ \\\" U  %X ! \")P9 \"\"" [ch "ACHMsS" #13=#:G76329 -1 #14=#:G76330 nil pf (4194304 67108864 16777216 -134217728 8388608 33554432) #15=#:G76331 bit "" #16=#:G76332 logand 0 format "%c-" lsh 1 18 ch2 32 "NUL" 9 "TAB" 10 "LFD" 13 "RET" 27 "ESC" "SPC" "C-%c" 26 96 64 127 "DEL" maxkey char-to-string "\\%o" "<%s>" error "Unrecognized item in macro: %s"] 7] pos times edmacro-mismatch "%d*%s" "\n" make-string 3 8 9 ";; " symbol-name 72 "\n "] 9])
#@206 Compare SEQ1 with SEQ2, return index of first mismatching element.
Return nil if the sequences match.  If one sequence is a prefix of the
other, the return value indicates the end of the shorted sequence.
(defalias 'edmacro-mismatch #[(cl-seq1 cl-seq2 cl-start1 cl-end1 cl-start2 cl-end2) " G G	 	W \nW \fa \f\n@ \nS!E S\nT \nS!Z S\"?= \no \nS!t S \n \nS! S\n \nS! S \n \nS! S\n \nS! S= SS 	W \nWxSx< 	<\n\f	Wf\nWf\fv\f\n6\n\f-\f@2	H!F\fA\f@F	H\n_\nV@[\nH!oj@o\nH\"?=L\n\n\f\f@	H!\f\f@	H\n\n\f\f@	H!\f\f@	H\n\n@\nH!@\nHL\n\n\f	\f@	H!\"\f\f@\"	H\n;\n2@7\nH!KF@K\nH=f\fA\fA	T	\nT\n		Wu\nWw	*," [nil cl-from-end cl-key cl-test-not cl-test cl-end1 cl-seq1 cl-end2 cl-seq2 cl-start1 cl-start2 cl-p2 cl-p1] 5 (#$ . 12844)])
#@165 Return the subsequence of SEQ from START to END.
If END is omitted, it defaults to the length of the sequence.
If START or END is negative, it counts from the end.
(defalias 'edmacro-subseq #[(seq start &optional end) ";\n 	\nO\n \nW \nG\\	W. 	\f, G\\<g 	V= 	\na \nS	YZ A@BD ) ! \nr \fq G\n	Z]\"		\nW 		HI	T		T *)" [seq start end nil len 0 res copy-sequence make-vector i] 5 (#$ . 13971)])
(defalias 'edmacro-fix-menu-commands #[(macro) "	!I 	GWH 	H:A \fA@A@ƚ< 	#\f@\"	T\"#TA \"T *	" [vectorp macro 0 nil ev i (menu-bar) vconcat edmacro-subseq vector menu-bar error "Macros with mouse clicks are not %s" "supported by this command"] 7])
(defalias 'edmacro-parse-keys #[(string &optional need-vector) "\fGW\"\f#\"O\n\f\f\"D \fɕO!\n\fɕTO\f\f\"m !=Y Ԃa !@a \fO# \f\" \fɔɕO\f۔ەOP\f\f\" \f!C \fޚ \f\" \f# \f!\"#\f\" !\fHA\\!\"\\\"\fO\f \f\" !\\!\"T\"\fO\f\f\"*	*A\f)\f\"W\f,./02.T.,GWP,.H/2?H0_/\\\\02\"0!\f-!Ue\f!U\f;\f\"\f89:;9T98GW89H:!\\;B;;,\fGU#\"O\f#!\"U\f;\f\"!\fH@ \"\\A \\C!\fH\\C+\nBBSBY\"	)+ GC YaHD =aHE =aGZHD =aGZHF =aG #HIJ/KJTJIGWIJH//L \"MYMN X)KrK,OP/QPTPOGWOPH//\"U//R \\QBQQ,+" [nil 0 [] res pos case-fold-search string string-match "[^ 	\n\f]+" 1 times key word "\\([0-9]+\\)\\*." string-to-int "^<<.+>>$" vconcat key-binding [-134217608] execute-extended-command [-134217608] where-is-internal [-134217608] 2 -2 "" "^\\(\\([ACHMsS]-\\)*\\)<\\(.+\\)>$" 3 "\\<\\(NUL\\|RET\\|LFD\\|ESC\\|SPC\\|DEL\\)$" intern "REM" "^;;" "$" bits prefix orig-word "^[ACHMsS]-." ((65 . 4194304) (67 . 67108864) (72 . 16777216) (77 . -134217728) (115 . 8388608) (83 . 33554432)) "^\\^.$" 67108864 assoc (("NUL" . " ") ("RET" . "") ("LFD" . "\n") ("TAB" . "	") ("ESC" . "") ("SPC" . " ") ("DEL" . "")) found "^\\\\[0-7]+$" #1=#:G76336 -1 #2=#:G76337 ch n t #3=#:G76338 8 -48 vector -134217728 "^-?[0-9]+$" #4=#:G76339 #5=#:G76340 x #6=#:G76341 error "%s must prefix a single character, not %s" logand "[@-_a-z]" 31 -67108864 #7=#:G76342 4 24 40 41 edmacro-subseq need-vector #8=#:G76343 #9=#:G76344 #10=#:G76345 134217727 ch2 127 #11=#:G76346 #12=#:G76347 #13=#:G76348 128] 6])
(provide 'edmacro)
