Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b67f0ae

Browse files
committed
Update Emacs settings, from Andrew Dunstan
1 parent 6d9ee7e commit b67f0ae

File tree

2 files changed

+39
-25
lines changed

2 files changed

+39
-25
lines changed

doc/FAQ_DEV

Lines changed: 19 additions & 12 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: Tue Feb 18 20:38:29 EST 2003
4+
Last updated: Mon Jun 2 00:34:39 EDT 2003
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -226,22 +226,29 @@
226226
less -x4
227227
emacs:
228228
M-x set-variable tab-width
229+
229230
or
230-
; Cmd to set tab stops & indenting for working with PostgreSQL code
231-
(c-add-style "pgsql"
232-
'("bsd"
233-
(indent-tabs-mode . t)
234-
(c-basic-offset . 4)
235-
(tab-width . 4)
236-
(c-offsets-alist .
237-
((case-label . +))))
238-
t) ; t = set this mode on
231+
232+
(c-add-style "pgsql"
233+
'("bsd"
234+
(indent-tabs-mode . t)
235+
(c-basic-offset . 4)
236+
(tab-width . 4)
237+
(c-offsets-alist .
238+
((case-label . +)))
239+
)
240+
nil ) ; t = set this style, nil = don't
241+
242+
(defun pgsql-c-mode ()
243+
(c-mode)
244+
(c-set-style "pgsql")
245+
)
239246

240247
and add this to your autoload list (modify file path in macro):
241248

242249
(setq auto-mode-alist
243-
(cons '("\\`/usr/local/src/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
244-
auto-mode-alist))
250+
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
251+
auto-mode-alist))
245252
or
246253
/*
247254
* Local variables:

doc/src/FAQ/FAQ_DEV.html

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

15-
<P>Last updated: Tue Feb 18 20:38:29 EST 2003</P>
15+
<P>Last updated: Mon Jun 2 00:34:39 EDT 2003</P>
1616

1717
<P>Current maintainer: Bruce Momjian (<A href=
1818
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
@@ -281,22 +281,29 @@ <H3><A name="1.5">1.5</A>) What tools are available for
281281
less -x4
282282
emacs:
283283
M-x set-variable tab-width
284+
284285
or
285-
; Cmd to set tab stops &amp; indenting for working with PostgreSQL code
286-
(c-add-style "pgsql"
287-
'("bsd"
288-
(indent-tabs-mode . t)
289-
(c-basic-offset . 4)
290-
(tab-width . 4)
291-
(c-offsets-alist .
292-
((case-label . +))))
293-
t) ; t = set this mode on
286+
287+
(c-add-style "pgsql"
288+
'("bsd"
289+
(indent-tabs-mode . t)
290+
(c-basic-offset . 4)
291+
(tab-width . 4)
292+
(c-offsets-alist .
293+
((case-label . +)))
294+
)
295+
nil ) ; t = set this style, nil = don't
296+
297+
(defun pgsql-c-mode ()
298+
(c-mode)
299+
(c-set-style "pgsql")
300+
)
294301

295302
and add this to your autoload list (modify file path in macro):
296303

297-
(setq auto-mode-alist
298-
(cons '("\\`/usr/local/src/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
299-
auto-mode-alist))
304+
(setq auto-mode-alist
305+
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
306+
auto-mode-alist))
300307
or
301308
/*
302309
* Local variables:

0 commit comments

Comments
 (0)