mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
Update emacs info for FAQ_DEV.
Andrew Dunstan
This commit is contained in:
parent
a8db61f8ef
commit
c84db61c08
44
doc/FAQ_DEV
44
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: Wed Sep 6 18:02:57 EDT 2006
|
Last updated: Wed Sep 6 20:08:24 EDT 2006
|
||||||
|
|
||||||
Current maintainer: Bruce Momjian (bruce@momjian.us)
|
Current maintainer: Bruce Momjian (bruce@momjian.us)
|
||||||
|
|
||||||
@ -277,9 +277,9 @@ General Questions
|
|||||||
applied to the distribution. This produces context diffs, which is our
|
applied to the distribution. This produces context diffs, which is our
|
||||||
preferred format.
|
preferred format.
|
||||||
|
|
||||||
Our standard format is to indent each code level with one tab, where
|
Our standard format BSD style, with each level of code indented one
|
||||||
each tab is four spaces. You will need to set your editor to display
|
tab, where each tab is four spaces. You will need to set your editor
|
||||||
tabs as four spaces:
|
or file viewer to display tabs as four spaces:
|
||||||
vi in ~/.exrc:
|
vi in ~/.exrc:
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set sw=4
|
set sw=4
|
||||||
@ -287,40 +287,10 @@ General Questions
|
|||||||
more -x4
|
more -x4
|
||||||
less:
|
less:
|
||||||
less -x4
|
less -x4
|
||||||
emacs:
|
|
||||||
M-x set-variable tab-width
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
(c-add-style "pgsql"
|
|
||||||
'("bsd"
|
|
||||||
(indent-tabs-mode . t)
|
|
||||||
(c-basic-offset . 4)
|
|
||||||
(tab-width . 4)
|
|
||||||
(c-offsets-alist .
|
|
||||||
((case-label . +)))
|
|
||||||
)
|
|
||||||
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):
|
|
||||||
|
|
||||||
(setq auto-mode-alist
|
|
||||||
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
|
||||||
auto-mode-alist))
|
|
||||||
or
|
|
||||||
/*
|
|
||||||
* Local variables:
|
|
||||||
* tab-width: 4
|
|
||||||
* c-indent-level: 4
|
|
||||||
* c-basic-offset: 4
|
|
||||||
* End:
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
The tools directory of the latest sources contains sample settings
|
||||||
|
that can be used with the emacs, xemacs and vim editors, that assist
|
||||||
|
in keeping to PostgreSQL coding standards.
|
||||||
pgindent will the format code by specifying flags to your operating
|
pgindent will the format code by specifying flags to your operating
|
||||||
system's utility indent. This article describes the value of a
|
system's utility indent. This article describes the value of a
|
||||||
consistent coding style.
|
consistent coding style.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<H1>Developer's Frequently Asked Questions (FAQ) for
|
<H1>Developer's Frequently Asked Questions (FAQ) for
|
||||||
PostgreSQL</H1>
|
PostgreSQL</H1>
|
||||||
|
|
||||||
<P>Last updated: Wed Sep 6 18:02:57 EDT 2006</P>
|
<P>Last updated: Wed Sep 6 20:08:24 EDT 2006</P>
|
||||||
|
|
||||||
<P>Current maintainer: Bruce Momjian (<A href=
|
<P>Current maintainer: Bruce Momjian (<A href=
|
||||||
"mailto:bruce@momjian.us">bruce@momjian.us</A>)<BR>
|
"mailto:bruce@momjian.us">bruce@momjian.us</A>)<BR>
|
||||||
@ -357,9 +357,9 @@
|
|||||||
can be applied to the distribution. This produces context diffs,
|
can be applied to the distribution. This produces context diffs,
|
||||||
which is our preferred format.</P>
|
which is our preferred format.</P>
|
||||||
|
|
||||||
<P>Our standard format is to indent each code level with one tab,
|
<P>Our standard format <I>BSD</I> style, with each level of code indented
|
||||||
where each tab is four spaces. You will need to set your editor to
|
one tab, where each tab is four spaces. You will need to set your editor
|
||||||
display tabs as four spaces:<BR>
|
or file viewer to display tabs as four spaces:<BR>
|
||||||
</P>
|
</P>
|
||||||
<PRE>
|
<PRE>
|
||||||
vi in ~/.exrc:
|
vi in ~/.exrc:
|
||||||
@ -369,40 +369,11 @@
|
|||||||
more -x4
|
more -x4
|
||||||
less:
|
less:
|
||||||
less -x4
|
less -x4
|
||||||
emacs:
|
|
||||||
M-x set-variable tab-width
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
(c-add-style "pgsql"
|
|
||||||
'("bsd"
|
|
||||||
(indent-tabs-mode . t)
|
|
||||||
(c-basic-offset . 4)
|
|
||||||
(tab-width . 4)
|
|
||||||
(c-offsets-alist .
|
|
||||||
((case-label . +)))
|
|
||||||
)
|
|
||||||
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):
|
|
||||||
|
|
||||||
(setq auto-mode-alist
|
|
||||||
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
|
|
||||||
auto-mode-alist))
|
|
||||||
or
|
|
||||||
/*
|
|
||||||
* Local variables:
|
|
||||||
* tab-width: 4
|
|
||||||
* c-indent-level: 4
|
|
||||||
* c-basic-offset: 4
|
|
||||||
* End:
|
|
||||||
*/
|
|
||||||
</PRE>
|
</PRE>
|
||||||
|
<P>The <I>tools</I> directory of the latest sources contains sample
|
||||||
|
settings that can be used with the <I>emacs, xemacs</I> and <I>vim</I>
|
||||||
|
editors, that assist in keeping to PostgreSQL coding standards.
|
||||||
|
</P>
|
||||||
<BR>
|
<BR>
|
||||||
<I>pgindent</I> will the format code by specifying flags to your
|
<I>pgindent</I> will the format code by specifying flags to your
|
||||||
operating system's utility <I>indent.</I> This <A href=
|
operating system's utility <I>indent.</I> This <A href=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user