One of the frustrations for me going into a PHP/MySQL Project is that there’s plenty of near-repetition involved software development; writing very similar code over and over again. Stop copying, pasting, and modifying, and start automating the process! Zachary Kessin shows how to use Emacs Lisp to generate useful and reusable database-access code for PHP. Here’s the Link: ONLamp.com — PHP Code Generation with Elisp
Also, just so you know, this is Emacs Elisp
Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors (which will be collectively referred to as Emacs in this article.) It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C (as is the Lisp interpreter itself). Users of Emacs commonly write Emacs Lisp code to customize and extend Emacs.
Emacs Lisp can also be used as a scripting language, much like the Unix Bourne shell, Python, Perl, scsh, or GNU Guile. Just as with those languages, it may be called from the command line or via an executable file. Its editing functions, such as buffers and movement commands, complement the features of Lisp and work in batch mode.
Emacs Lisp is sometimes called Elisp, at the risk of confusion with an older unrelated Lisp dialect with the same name. In terms of features, it is closely related to the Maclisp dialect, with some later influence from Common Lisp [1]. It supports imperative and functional programming methods. Richard Stallman chose Lisp as the extension language for his rewrite of Emacs (the original used TECO as its extension language) because of its powerful features, including the ability to treat functions as data. Unlike Common Lisp, Scheme existed at the time Stallman was rewriting Gosling Emacs into GNU Emacs, but it was not used because of Scheme’s then-poor performance on workstations, and he had to develop a dialect more easily optimized.[2]
The Lisp dialect used in Emacs differs substantially from Common Lisp and Scheme, dialects used for applications programming. One of the major differences is that Emacs Lisp uses dynamic rather than lexical scope by default. That is, local variables in a calling function can be referenced from a called function without passing pointers or references.
Writing Emacs Lisp is not the only method of customizing GNU Emacs. Since version 20, GNU Emacs has included a “Customize” facility which allows users to set common customization variables through a graphical interface. “Customize” works by writing Emacs Lisp code for the user, and is limited to relatively simple customizations. Not every user needs the full degree of extensibility offered by Emacs; those that do can write their own Emacs Lisp code.
downey says
http://www.blogger.com