--- Begin Message ---
Subject: |
Re: codesearch.el 1.0 --- Search for code via Google Code Search |
Date: |
Fri, 29 Jun 2007 11:03:10 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> (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
((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))
(error "Don't know how to guess the language name for %s" mode))))))
-- Stefan
--- End Message ---
--- Begin Message ---
Subject: |
confirm 3a1afe9b96daa6307f0f958309029be07d694388 |
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message. Do this if the message is
spam. If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list. The Approved: header can also appear in the first line
of the body of the reply.
--- End Message ---