;ELC ;;; compiled by jwz@thalidomide on Thu Oct 28 22:04:47 1993 ;;; from file /th/jwz/emacs19/lisp/prim/macros.el ;;; emacs version 19.9 Lucid. ;;; bytecomp version 2.20; 20-oct-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (fset 'name-last-kbd-macro #[(symbol) "!! ! K; K!! \" M" [last-kbd-macro error gettext "No keyboard macro defined" fboundp symbol vectorp "Function %s is already defined and not a keyboard macro."] 3 "\ Assign a name to the last keyboard macro defined. Argument SYMBOL is the name to define. The symbol's function definition becomes the keyboard macro string. Such a \"function\" cannot be called from Lisp, but it is a valid editor command." "SName for last kbd macro: "]) (fset 'insert-kbd-macro-pretty-string #[(string) "``} p\"eTbm?gUc!mgUc!_gUc!QgUc!CgUc!5gUc!'gVcgZc!ugWcg\\c!uu)" [prin1 string 0 "\\C-@" delete-char 1 10 "\\n" 13 "\\r" 9 "\\t" 27 "\\e" 127 "\\C-?" "\\M-" 128 -1 32 "\\C-" 96] 3]) (fset 'insert-kbd-macro #[(macroname &optional keys) " !Ę c Kc p\"c \" ; ! p\")c \"c@p\"c p\"cAc))" [nil definition symbol-name macroname "" last-kbd-macro "(setq " "(fset '" prin1 "\n " events-to-keys t string insert-kbd-macro-pretty-string ")\n" keys where-is-internal "(global-set-key " " '"] 4 "\ Insert in buffer the definition of kbd macro NAME, as Lisp code. Optional second argument KEYS means also record the keys it is on (this is the prefix argument, when calling interactively.) This Lisp code will, when executed, define the kbd macro with the same definition it has now. If you say to record the keys, the Lisp code will also rebind those keys to the macro. Only global key bindings are recorded since executing this Lisp code always makes global bindings. To save a kbd macro, visit a file of Lisp code such as your `~/.emacs', use this command, and then save the file." "CInsert kbd macro (name): \nP"]) (fset 'kbd-macro-query #[(flag) " !! Ɖ *??!!   Ɖ ! *!\"= = = =!=Ɖ *== !!!*'*" [executing-macro defining-kbd-macro error gettext "Not defining or executing kbd macro" flag nil recursive-edit t substitute-command-keys "Proceed with macro?\\ (\\[act], \\[skip], \\[exit], \\[recenter], \\[edit]) " msg loop message read-char def key vector lookup-key query-replace-map act skip "" exit recenter edit quit quit-flag help ding "*Help*" princ "Specify how to proceed with keyboard macro execution.\nPossibilities: \\\n\\[act] Finish this iteration normally and continue with the next.\n\\[skip] Skip the rest of this iteration, and start the next.\n\\[exit] Stop the macro entirely right now.\n\\[recenter] Redisplay the screen, then ask again.\n\\[edit] Enter recursive edit; ask again when you exit from that."] 5 "\ Query user during kbd macro execution. With prefix argument, enters recursive edit, reading keyboard commands even within a kbd macro. You can give different commands each time the macro executes. Without prefix argument, asks whether to continue running the macro. Your options are: \\ \\[act] Finish this iteration normally and continue with the next. \\[skip] Skip the rest of this iteration, and start the next. \\[exit] Stop the macro entirely right now. \\[recenter] Redisplay the screen, then ask again. \\[edit] Enter recursive edit; ask again when you exit from that." "P"]) (fset 'apply-macro-to-region-lines #[(top bottom &optional macro) " !  by  \nbny  Wby`Ǔ) !)_ ljlj+" [macro last-kbd-macro error "No keyboard macro has been defined." bottom 0 point-marker nil next-line-marker end-marker top 1 execute-kbd-macro] 3 "\ For each complete line between point and mark, move to the beginning of the line, and run the last keyboard macro. When called from lisp, this function takes two arguments TOP and BOTTOM, describing the current region. TOP must be before BOTTOM. The optional third argument MACRO specifies a keyboard macro to execute. This is useful for quoting or unquoting included text, adding and removing comments, or producing tables where the entries are regular. For example, in Usenet articles, sections of text quoted from another author are indented, or have each line start with `>'. To quote a section of text, define a keyboard macro which inserts `>', put point and mark at opposite ends of the quoted section, and use `\\[apply-macro-to-region-lines]' to mark the entire section. Suppose you wanted to build a keyword table in C where each entry looked like this: { \"foo\", foo_data, foo_function }, { \"bar\", bar_data, bar_function }, { \"baz\", baz_data, baz_function }, You could enter the names in this format: foo bar baz and write a macro to massage a word into a table entry: \\C-x ( \\M-d { \"\\C-y\", \\C-y_data, \\C-y_function }, \\C-x ) and then select the region of un-tablified names and use `\\[apply-macro-to-region-lines]' to build the table from the names. " "r"])