The Developer FAQ is slightly awry for emacs settings, or at least it was for my setup. 

Here's what I ended up getting to work 

;;-----------------
(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")
)

(setq auto-mode-alist
              (cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
            auto-mode-alist))
;;--------------------------

(and if this doesn't show that despite my pushing for a W32 port I'm a Unix guy at heart, nothing will :-) 

andrew






The Developer FAQ is slightly awry for emacs 
settings, or at least it was for my setup. 
 
Here's what I ended up getting to work 

 
;;-----------------
(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"))
 
(setq 
auto-mode-alist              
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" 
. 
pgsql-c-mode)            
auto-mode-alist))
;;--------------------------
 
(and if this doesn't show that despite my pushing 
for a W32 port I'm a Unix guy at heart, nothing will :-) 
 
andrew
Fri, 9 May 2003 17:41:37 -0400
"Andrew Dunstan" <andrew@dunslane.net>
Dev FAQ emacs settings

FAQ_DEV updated.  Thanks.

---------------------------------------------------------------------------

Andrew Dunstan wrote:
> The Developer FAQ is slightly awry for emacs settings, or at least it was for my setup. 
> 
> Here's what I ended up getting to work 
> 
> ;;-----------------
> (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")
> )
> 
> (setq auto-mode-alist
>               (cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
>             auto-mode-alist))
> ;;--------------------------
> 
> (and if this doesn't show that despite my pushing for a W32 port I'm a Unix guy at heart, nothing will :-) 
> 
> andrew

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 2 Jun 2003 00:35:09 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Dev FAQ emacs settings