Posts

Showing posts from March 1, 2009

How To Implement Keyword Completion in Emacs

Image
Perm url: http://xahlee.org/emacs/elisp_keyword_completion.htmlHow To Implement Keyword Completion in EmacsXah Lee, 2009-03-06This page shows you how to implement computer language keyword completion in emacs. You should know the basics of writing a major mode. If not, see: How To Write A Emacs Major Mode For Syntax Coloring. The ProblemYou are writing a emacs major mode for your own language. You want to have a keyword completion feature, so that user can press a key and have the word under cursor automatically expanded to the possible keywords of the language.Keyword completion in emacs. SolutionThe basic concept of keyword completion is pretty simple. You begin with a list of keywords, and you are given a string that you want to complete. You match the string against the keywords, find the maximal match, then replace the current word with tha max match. However, you will also need to popup a list of possible completions for the user to choose, and allow user some user interface con…

What Is Your Favorite Lisp

Perm url: http://xahlee.org/UnixResource_dir/writ/whats_your_fav_lisp.htmlWhat Is Your Favorite LispXah Lee, 2009-03-04Javier wrote: “What open source implementation of Lisp do you prefer and why?”My fav is Emacs Lisp.Because it is practical. More or less the most widely used lisp today.Considered as a tool, it has probably some 10 times more users than either Common Lisp or Scheme Lisp.For example, i consider emacs lisp, more powerful than Perl, as a text processing language, for 2 major reasons: (1) It has buffer datatype and associated datatypes such as point, marker, region, etc.. Which is more powerful than treating text as inert chars and lines, which Perl, Python, Ruby, etc do. (2) elisp's integrated nature with emacs. This means, for odd text manipulation jobs that happen daily in every software coding, i can write text processing programs that interact with me while i edit. (See also: Text Processing: Elisp vs Perl.)The above paragraph, details why i love emacs lisp. Howe…

Emacs xlsl-mode for Linden Scripting Language

A new version: Emacs xlsl-mode for Linden Scripting Language. This version suppports keyword completion. (computing)