Thread: Dev FAQ emacs settings

Dev FAQ emacs settings

From
"Andrew Dunstan"
Date:
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

Re: Dev FAQ emacs settings

From
Bruce Momjian
Date:
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,
Pennsylvania19073