;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:45:30 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/macros.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; 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 "`/gd/gnu/emacs/19.0/lisp/macros.el' was compiled for Emacs 19")) #@238 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. (defalias 'name-last-kbd-macro #[(symbol) "!\f! \fK; \fK! \f\"\fM" [last-kbd-macro error "No keyboard macro defined" fboundp symbol vectorp "Function %s is already defined and not a keyboard macro."] 3 (#$ . 482) "SName for last kbd macro: "]) #@584 Insert in buffer the definition of kbd macro NAME, as Lisp code. Optional second arg 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. (defalias 'insert-kbd-macro #[(macroname &optional keys) " !Ę c Kc p\"c ;J`\n p\" \n b`\nWFg UU``T|cB Wl``T| \\B U~``T|cB W``T| \\B WuB U``T|cB U``T|cB HU``T|cB W``T| ZB W``T| ZB HU``T|cB W3``T| ZB UB``T|c):*g !b G '('(W['Umnc 'H 'T' ! W p\"Z UcZ W \\Z UcZ W \\Z W Z UcZ UcZ HU cZ W ZZ W- ZZ HU<cZ WN ZZ UZcZc+g p\"c9 \"9c9@p\"c p\"c9A9y))" [nil definition symbol-name macroname "" last-kbd-macro "(setq " "(fset '" prin1 "\n " end beg point-marker char 0 "\\C-@" 27 "\\C-" 96 28 "\\C-\\\\" 32 64 127 1 "\\C-?" 128 "\\M-\\C-@" "" "\\M-\\C-\\\\" 155 "\\M-\\C-" 160 "" "\\M-\\\\" 255 "\\M-" "\\M-\\C-?" vectorp i len 91 wholenump 256 "?\\C-@" "?\\C-" "?\\C-\\\\" 63 "?\\C-?" "?\\M-\\C-@" "?\\M-\\C-\\\\" "?\\M-\\C-" "?\\M-\\\\" "?\\M-" "?\\M-\\C-?" 93 ")\n" keys where-is-internal (keymap) "(global-set-key " " '"] 4 (#$ . 990) "CInsert kbd macro (name): \nP"]) #@596 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. (defalias 'kbd-macro-query #[(flag) "\f \f!\fʼn *??!\n  ʼn\n! *!\"=V =e =t =!=ʼn *== ݐ!! q )*&*" [executing-macro defining-kbd-macro error "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-event 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." standard-output help-mode] 5 (#$ . 2844) "P"]) #@1314 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.  (defalias 'apply-macro-to-region-lines #[(top bottom &optional macro) " \f! \fby  \nbn'y  WOby`Ǔ)I !)+ 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 (#$ . 4494) "r"])