(defalias 'jimb-line-dashes (read-kbd-macro "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RET")) (defalias 'jimb-d2u (read-kbd-macro " M-x replace- string RET C-q C-m 2*RET M-x replace- string RET C-q C-z 2*RET ")) ;;(fset 'jimb-u2d ;; [?\M-x ?r ?e ?p ?l ?a ?c ?e ?- ?s ?t ?r tab return ?\C-q ?\C-j return ?\C-q ?\C-m ?\C-q ?\C-j return]) (defalias 'jimb-u2d (read-kbd-macro " M-x replace- string RET C-q C-j RET C-q C-m C-q C-j RET")) (defalias 'jimb-comment (read-kbd-macro "RET TAB /* RET TAB SPC * RET TAB SPC */ SPC")) (defalias 'jimb-comment2 (read-kbd-macro "RET 2*TAB /* RET 2*TAB SPC * RET 2*TAB SPC */ SPC")) (defalias 'jimb-comment3 (read-kbd-macro "RET 3*TAB /* RET 3*TAB SPC * RET 3*TAB SPC */ SPC")) (defalias 'jimb-c-head-comment (read-kbd-macro "/********************** *********************** *********************** ********* RET SPC * RET SPC *********************** *********************** *********************** ********/ C-a C-e SPC")) ;; Works when the cursor is over the middle, not the first char. (defalias 'jimb-mprefix (read-kbd-macro " m SPC SPC 2* M-u 2* DEL DEL")) (defalias 'jimb-camel (read-kbd-macro "C-s _ DEL SPC SPC 2* M-u 2* DEL DEL")) ;;---------------------------- ;;OLD-STYLE BASED ON 3 SPACES: ;; ;;(defalias 'jimb-comment (read-kbd-macro ;;"2*SPC /* RET 3*SPC * RET 3*SPC */ RET 2* 4* SPC")) ;; ;;(defalias 'jimb-c-body-comment (read-kbd-macro ;;"4*SPC /********************** *********************** *********************** ***** RET 5*SPC * RET 5*SPC *********************** *********************** *********************** ****/ RET 2* 7* SPC")) ;; ;;(defalias 'jimb-c++-comment (read-kbd-macro ;;"RET 3*SPC // SPC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RET 3*SPC // RET 3*SPC // SPC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SPC")) ;; ;;(defalias 'jimb-c++-function (read-kbd-macro ;;"RET void SPC ( SPC void SPC ) RET { RET M-x jimb- c++- comment RET C-a 2* RET } RET 2* RET 3*SPC")) ;;---------------------------- ;; C skeleton. (fset 'jimb-c-skeleton [?# ?i ?n ?c ?l ?u ?d ?e ? ?< ?s ?t ?d ?l ?i ?b ?. ?h ?> return ?# ?i ?n ?c ?l ?u ?d ?e ? ?< ?s ?t ?d ?i ?o ?. ?h ?> return return ?i ?n ?t return ?m ?a ?i ?n ?( ? ?i ?n ?t ? ?a ?r ?g ?c ?, ? ?c ?h ?a ?r ?* ?* ? ?a ?r ?g ?v ? ?) return ?{ return ?} return]) ;; C++ skeleton. (fset 'jimb-c++-skeleton [?# ?i ?n ?c ?l ?u ?d ?e ? ?< ?i ?o ?s ?t ?r ?e ?a ?m ?> return ?u ?s ?i ?n ?g ? ?n ?a ?m ?e ?s ?p ?a ?c ?e ? ?s ?t ?d ?\; return return ?i ?n ?t ? ?m ?a ?i ?n ?( ? ?i ?n ?t ? ?a ?r ?g ?c ?, ? ?c ?h ?a ?r ?* ?* ? ?a ?r ?g ?v ? ?) return ?{ return ?} return])