Changes between Version 11 and Version 12 of Emacs
- Timestamp:
- Feb 7, 2010, 10:34:32 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Emacs
v11 v12 64 64 = Yasnippet = 65 65 66 If you are using [http://code.google.com/p/yasnippet/ Yasnippet], you can make quick the definition of basic classes for the administration site with the following yasnippet recipe: 66 If you are using [http://code.google.com/p/yasnippet/ Yasnippet], you can get the [https://edge.launchpad.net/django-mode django-mode] with many useful snippets. 67 To get, run on a shell: 67 68 {{{ 68 # -*- coding: utf-8 -*- 69 # name: classadmin 70 # -- 71 class ${1:ClassName}Admin (admin.ModelAdmin): 72 pass 73 admin.site.register($1, $1Admin) 74 69 bzr branch lp:django-mode 75 70 }}} 76 77 It will produce code like this: 71 And append something like that: 78 72 {{{ 79 class ExpenseAdmin(admin.ModelAdmin): 80 pass 81 admin.site.register(Expense, ExpenseAdmin) 73 (load "~/Dropbox/django-mode/django-mode.el") 74 (yas/load-directory "~/Dropbox/django-mode/snippets") 82 75 }}} 76 to your .emacs.