mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Update Emacs settings, from Andrew Dunstan
This commit is contained in:
parent
6d9ee7e7ca
commit
b67f0ae36e
31
doc/FAQ_DEV
31
doc/FAQ_DEV
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
||||||
|
|
||||||
Last updated: Tue Feb 18 20:38:29 EST 2003
|
Last updated: Mon Jun 2 00:34:39 EDT 2003
|
||||||
|
|
||||||
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
||||||
|
|
||||||
@ -226,22 +226,29 @@
|
|||||||
less -x4
|
less -x4
|
||||||
emacs:
|
emacs:
|
||||||
M-x set-variable tab-width
|
M-x set-variable tab-width
|
||||||
|
|
||||||
or
|
or
|
||||||
; Cmd to set tab stops & indenting for working with PostgreSQL code
|
|
||||||
(c-add-style "pgsql"
|
(c-add-style "pgsql"
|
||||||
'("bsd"
|
'("bsd"
|
||||||
(indent-tabs-mode . t)
|
(indent-tabs-mode . t)
|
||||||
(c-basic-offset . 4)
|
(c-basic-offset . 4)
|
||||||
(tab-width . 4)
|
(tab-width . 4)
|
||||||
(c-offsets-alist .
|
(c-offsets-alist .
|
||||||
((case-label . +))))
|
((case-label . +)))
|
||||||
t) ; t = set this mode on
|
)
|
||||||
|
nil ) ; t = set this style, nil = don't
|
||||||
|
|
||||||
|
(defun pgsql-c-mode ()
|
||||||
|
(c-mode)
|
||||||
|
(c-set-style "pgsql")
|
||||||
|
)
|
||||||
|
|
||||||
and add this to your autoload list (modify file path in macro):
|
and add this to your autoload list (modify file path in macro):
|
||||||
|
|
||||||
(setq auto-mode-alist
|
(setq auto-mode-alist
|
||||||
(cons '("\\`/usr/local/src/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
||||||
auto-mode-alist))
|
auto-mode-alist))
|
||||||
or
|
or
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<H1>Developer's Frequently Asked Questions (FAQ) for
|
<H1>Developer's Frequently Asked Questions (FAQ) for
|
||||||
PostgreSQL</H1>
|
PostgreSQL</H1>
|
||||||
|
|
||||||
<P>Last updated: Tue Feb 18 20:38:29 EST 2003</P>
|
<P>Last updated: Mon Jun 2 00:34:39 EDT 2003</P>
|
||||||
|
|
||||||
<P>Current maintainer: Bruce Momjian (<A href=
|
<P>Current maintainer: Bruce Momjian (<A href=
|
||||||
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
|
||||||
@ -281,22 +281,29 @@
|
|||||||
less -x4
|
less -x4
|
||||||
emacs:
|
emacs:
|
||||||
M-x set-variable tab-width
|
M-x set-variable tab-width
|
||||||
|
|
||||||
or
|
or
|
||||||
; Cmd to set tab stops & indenting for working with PostgreSQL code
|
|
||||||
(c-add-style "pgsql"
|
(c-add-style "pgsql"
|
||||||
'("bsd"
|
'("bsd"
|
||||||
(indent-tabs-mode . t)
|
(indent-tabs-mode . t)
|
||||||
(c-basic-offset . 4)
|
(c-basic-offset . 4)
|
||||||
(tab-width . 4)
|
(tab-width . 4)
|
||||||
(c-offsets-alist .
|
(c-offsets-alist .
|
||||||
((case-label . +))))
|
((case-label . +)))
|
||||||
t) ; t = set this mode on
|
)
|
||||||
|
nil ) ; t = set this style, nil = don't
|
||||||
|
|
||||||
|
(defun pgsql-c-mode ()
|
||||||
|
(c-mode)
|
||||||
|
(c-set-style "pgsql")
|
||||||
|
)
|
||||||
|
|
||||||
and add this to your autoload list (modify file path in macro):
|
and add this to your autoload list (modify file path in macro):
|
||||||
|
|
||||||
(setq auto-mode-alist
|
(setq auto-mode-alist
|
||||||
(cons '("\\`/usr/local/src/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
||||||
auto-mode-alist))
|
auto-mode-alist))
|
||||||
or
|
or
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user