On Fri, Jun 29, 2007 at 11:03:10AM -0400, Stefan Monnier wrote: > > (defun codesearch-mode-to-lang (mode) > > "map emacs mode to variable in Code Search querystring (list is > > far from complete)." > [...] > > How 'bout something like: > > (require 'cl) > > (defun codesearch-mode-to-lang (mode) > "Map Emacs mode to variable in Code Search querystring. > \(list is far from complete)." > (case
missing mode expression? > ((emacs-lisp-mode lisp-interaction-mode) "lisp") > (objc-mode "objectivec") > (sh-mode "shell") > (t > (let ((mode-name (symbol-name mode))) > (if (string-match "-mode\\'" mode-name) > (substring mode 0 (match-beginning 0)) Thanks! > (error "Don't know how to guess the language name for %s" mode)))))) > I prefer to map this case to "unspecified language". Jürgen _______________________________________________ gnu-emacs-sources mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
