Skip to content

Commit c84db61

Browse files
committed
Update emacs info for FAQ_DEV.
Andrew Dunstan
1 parent a8db61f commit c84db61

File tree

2 files changed

+15
-74
lines changed

2 files changed

+15
-74
lines changed

doc/FAQ_DEV

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated: Wed Sep 6 18:02:57 EDT 2006
4+
Last updated: Wed Sep 6 20:08:24 EDT 2006
55

66
Current maintainer: Bruce Momjian (bruce@momjian.us)
77

@@ -277,50 +277,20 @@ General Questions
277277
applied to the distribution. This produces context diffs, which is our
278278
preferred format.
279279

280-
Our standard format is to indent each code level with one tab, where
281-
each tab is four spaces. You will need to set your editor to display
282-
tabs as four spaces:
280+
Our standard format BSD style, with each level of code indented one
281+
tab, where each tab is four spaces. You will need to set your editor
282+
or file viewer to display tabs as four spaces:
283283
vi in ~/.exrc:
284284
set tabstop=4
285285
set sw=4
286286
more:
287287
more -x4
288288
less:
289289
less -x4
290-
emacs:
291-
M-x set-variable tab-width
292-
293-
or
294-
295-
(c-add-style "pgsql"
296-
'("bsd"
297-
(indent-tabs-mode . t)
298-
(c-basic-offset . 4)
299-
(tab-width . 4)
300-
(c-offsets-alist .
301-
((case-label . +)))
302-
)
303-
nil ) ; t = set this style, nil = don't
304-
305-
(defun pgsql-c-mode ()
306-
(c-mode)
307-
(c-set-style "pgsql")
308-
)
309-
310-
and add this to your autoload list (modify file path in macro):
311-
312-
(setq auto-mode-alist
313-
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
314-
auto-mode-alist))
315-
or
316-
/*
317-
* Local variables:
318-
* tab-width: 4
319-
* c-indent-level: 4
320-
* c-basic-offset: 4
321-
* End:
322-
*/
323290

291+
The tools directory of the latest sources contains sample settings
292+
that can be used with the emacs, xemacs and vim editors, that assist
293+
in keeping to PostgreSQL coding standards.
324294
pgindent will the format code by specifying flags to your operating
325295
system's utility indent. This article describes the value of a
326296
consistent coding style.

doc/src/FAQ/FAQ_DEV.html

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<H1>Developer's Frequently Asked Questions (FAQ) for
1414
PostgreSQL</H1>
1515

16-
<P>Last updated: Wed Sep 6 18:02:57 EDT 2006</P>
16+
<P>Last updated: Wed Sep 6 20:08:24 EDT 2006</P>
1717

1818
<P>Current maintainer: Bruce Momjian (<A href=
1919
"mailto:bruce@momjian.us">bruce@momjian.us</A>)<BR>
@@ -357,9 +357,9 @@ <H3 id="item1.9">1.9) What tools are available for
357357
can be applied to the distribution. This produces context diffs,
358358
which is our preferred format.</P>
359359

360-
<P>Our standard format is to indent each code level with one tab,
361-
where each tab is four spaces. You will need to set your editor to
362-
display tabs as four spaces:<BR>
360+
<P>Our standard format <I>BSD</I> style, with each level of code indented
361+
one tab, where each tab is four spaces. You will need to set your editor
362+
or file viewer to display tabs as four spaces:<BR>
363363
</P>
364364
<PRE>
365365
vi in ~/.exrc:
@@ -369,40 +369,11 @@ <H3 id="item1.9">1.9) What tools are available for
369369
more -x4
370370
less:
371371
less -x4
372-
emacs:
373-
M-x set-variable tab-width
374-
375-
or
376-
377-
(c-add-style "pgsql"
378-
'("bsd"
379-
(indent-tabs-mode . t)
380-
(c-basic-offset . 4)
381-
(tab-width . 4)
382-
(c-offsets-alist .
383-
((case-label . +)))
384-
)
385-
nil ) ; t = set this style, nil = don't
386-
387-
(defun pgsql-c-mode ()
388-
(c-mode)
389-
(c-set-style "pgsql")
390-
)
391-
392-
and add this to your autoload list (modify file path in macro):
393-
394-
(setq auto-mode-alist
395-
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
396-
auto-mode-alist))
397-
or
398-
/*
399-
* Local variables:
400-
* tab-width: 4
401-
* c-indent-level: 4
402-
* c-basic-offset: 4
403-
* End:
404-
*/
405372
</PRE>
373+
<P>The <I>tools</I> directory of the latest sources contains sample
374+
settings that can be used with the <I>emacs, xemacs</I> and <I>vim</I>
375+
editors, that assist in keeping to PostgreSQL coding standards.
376+
</P>
406377
<BR>
407378
<I>pgindent</I> will the format code by specifying flags to your
408379
operating system's utility <I>indent.</I> This <A href=

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy