From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Subject: [trentbuck@gmail.com: RFE sql-mode sql-product variable]
Date: Mon, 09 Jul 2007 13:22:04 -0400 [thread overview]
Message-ID: <E1I7ww0-00080f-Br@fencepost.gnu.org> (raw)
Would it be useful to install something like this?
------- Start of forwarded message -------
X-Spam-Status: No, score=0.6 required=5.0 tests=NO_REAL_NAME,
UNPARSEABLE_RELAY autolearn=no version=3.1.0
Date: Mon, 09 Jul 2007 20:56:41 +1000
To: emacs-pretest-bug@gnu.org
From: trentbuck@gmail.com
Cc: trentbuck@gmail.com
Subject: RFE sql-mode sql-product variable
I have the following handy settings in my .emacs; they might usefully
be included in Emacs.
(put 'sql-product 'safe-local-variable 'symbolp)
(eval-after-load "sql"
'(define-key sql-mode-map (kbd "C-c C-z")
(lambda ()
(interactive)
(let ((f (intern-soft (concat "sql-" (symbol-name sql-product)))))
(if (and f (commandp f))
(call-interactively f)
(error (format "Can't connect to %s databases." sql-product)))))))
Briefly, they allow you to put
-*- sql-product: postgres -*- (for arbitrary values of "postgres")
at the top of your foo.sql file, and sql-mode will use the appropriate
dialect, and also allow you to type C-c C-z to start the appropriate
listener.
- --
Trent Buck
_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
next reply other threads:[~2007-07-09 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 17:22 Richard Stallman [this message]
2007-07-10 4:26 ` [trentbuck@gmail.com: RFE sql-mode sql-product variable] tomas
2007-07-10 22:01 ` Richard Stallman
2007-07-10 17:29 ` Michael Mauger
2007-07-11 3:05 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1I7ww0-00080f-Br@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).