home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / packages / dmacro-2.0 / dm-elisp.el < prev    next >
Encoding:
Text File  |  1991-11-15  |  1.9 KB  |  76 lines

  1. ;;; Copyright (c) 1991 Wayne Mesard.  May be redistributed only under the
  2. ;;; terms of the GNU Emacs General Public License.
  3.  
  4. ;;; TP-ELISP  :  Dmacros for Emacs-Lisp mode
  5.  
  6. ;; This file tries to load "dmacro.elc".
  7. ;; The "load-path" variable, as set in your Emacs init file, should include
  8. ;; a directory containing the file "dmacro.elc".
  9.  
  10. ;;; HISTORY
  11. ;;    2.0 wmesard - Oct 23, 1991: Created.
  12.  
  13. ;;; NOTES
  14. ;;    This is just the very beginning of a useful set of dmacros for
  15. ;;    Emacs Lisp.  If someone makes this real, please send it to me so I
  16. ;;    can include it in future releases.  (Of course I'll give you credit).
  17.  
  18. ;;    Users can hit Esc-Tab to complete a symbol name when typing at 
  19. ;;    a prompt in the minibuffer.
  20.  
  21. ;;;
  22. ;;; REQUIREMENTS
  23. ;;;
  24.  
  25. (require 'dmacro)
  26.  
  27.  
  28. ;;; 
  29. ;;; USER PARAMETERS
  30. ;;; 
  31.  
  32. (setq auto-dmacro-alist (cons '("\\.el$" . masthead) auto-dmacro-alist))
  33.  
  34.  
  35. ;;; 
  36. ;;; EMACS-LISP-MODE DMACROS
  37. ;;; 
  38.  
  39. (add-dmacros 'lisp-mode-abbrev-table '(
  40.  ("car" "(car ~(@))" dmacro-expand "car")
  41.  ("defun" "(defun ~(@) (~(mark))
  42.  
  43.   )" dmacro-indent "defun")
  44.  ("lcdr" "(while ~(prompt variable nil tp-elisp-read-sexp)
  45.   ~(@)
  46.   (setq ~(prompt) (cdr ~(prompt))))" dmacro-indent "cdr down a list")
  47.  ("let" "(let ((~(@)))
  48.       ~(mark))" dmacro-indent "let clause")
  49.  ("prepend" " (setq ~(prompt variable) (cons ~(@) ~(prompt)))" 
  50.   dmacro-indent "cons an item onto a list")
  51.  ("progn" "    (progn
  52.       ~(@))" dmacro-indent "progn clause")
  53.  ("history"    ";;   ~@ ~(user-id) - ~mon ~date, ~year: ~(mark)"
  54.   nil "new entry for the HISTORY section of the masthead")
  55.  ("masthead"
  56. ";;; Copyright (c) ~(year) ~(user-name).  May be redistributed only under the
  57. ;;; terms of the GNU Emacs General Public License.
  58.  
  59. ;;; ~((file-name) :up)  : ~@
  60.  
  61. ;;; COMMANDS
  62. ;;    
  63.  
  64. ;;; PUBLIC VARIABLES
  65. ;;    
  66.  
  67. ;;; PUBLIC FUNCTIONS
  68. ;;    
  69.  
  70. ;;; HISTORY
  71. ~(dmacro history)Created.
  72.  
  73. " nil "boilerplate info for elisp files.")
  74. ))
  75.  
  76.