Variable: expand-sample-perl-mode-expand-list
expand-sample-perl-mode-expand-list is a variable defined in
expand.el.gz.
Value
(("sub"
"#----------------------------------------------------------------------\nsub {\n # DESCRIPTION\n # \n # \n # INPUT\n # \n # \n # RETURN\n # \n\n local( $f ) = \"$lib.\";\n local() = @_;\n \n \n}\n"
(77 88 120 146 159 176))
("for" "for ( )\n{\n\n}" (7 12)) ("whi" "while ( )\n{\n\n}" (9 15))
("iff" "if ( )\n{\n\n}" (6 12)) ("loc" "local( $ );" (9))
("my" "my( $ );" (6))
("ope" "open(,\"\") || die \"$f: Can't open [$]\";" (6 8 36))
("clo" "close ;" 7) ("def" "defined " (9)) ("und" "undef ;" (7))
("pr" "print " 7) ("pf" "printf " 8) ("gre" "grep( //, );" (8 11))
("pus" "push( , );" (7 9)) ("joi" "join( '', );" (7 11))
("rtu" "return ;" (8)))
Documentation
Expansions for Perl mode. See expand-add-abbrevs.
Source Code
;; Defined in /usr/src/emacs/lisp/expand.el.gz
;; perl example from Jari Aalto <jaalto@tre.tele.nokia.fi>
(defconst expand-sample-perl-mode-expand-list
(list
(list
;; This is default perl4 subroutine template
;;
"sub"
(concat
"#" (make-string 70 ?-) "\n"
"sub {\n"
" # DESCRIPTION\n"
" # \n"
" # \n"
" # INPUT\n"
" # \n"
" # \n"
" # RETURN\n"
" # \n"
"\n"
" local( $f ) = \"$lib.\";\n" ;; Function name AFTER period
" local() = @_;\n" ;; func arguments here
" \n"
" \n}\n"
)
(list 77 88 120 146 159 176))
(list
"for" ; foreach
(concat
"for ( )\n"
"{\n\n}"
)
(list 7 12))
(list
"whi" ; foreach
(concat
"while ( )\n"
"{\n\n}"
)
(list 9 15))
;; The normal "if" can be used like
;; print $F "xxxxxx" if defined @arr;
;;
(list
"iff"
(concat
"if ( )\n"
"{\n\n}"
)
(list 6 12))
(list "loc" "local( $ );" (list 9))
(list "my" "my( $ );" (list 6))
(list "ope" "open(,\"\")\t|| die \"$f: Can't open [$]\";" (list 6 8 36))
(list "clo" "close ;" 7)
(list "def" "defined " (list 9))
(list "und" "undef ;" (list 7))
;; There is no ending colon, because they can be in statement
;; defined $REXP_NOT_NEW && (print "xxxxx" );
;;
(list "pr" "print " 7)
(list "pf" "printf " 8)
(list "gre" "grep( //, );" (list 8 11))
(list "pus" "push( , );" (list 7 9))
(list "joi" "join( '', );" (list 7 11))
(list "rtu" "return ;" (list 8))
)
"Expansions for Perl mode. See `expand-add-abbrevs'.")