From 8dc8f44f588d683ab0af8abb130a7711221f5e21 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 7 Sep 2006 00:10:46 +0000 Subject: Update Emacs/vim editor info. --- doc/src/FAQ/FAQ_DEV.html | 2 +- doc/src/sgml/sources.sgml | 45 ++++++--------------------------------------- 2 files changed, 7 insertions(+), 40 deletions(-) (limited to 'doc/src') diff --git a/doc/src/FAQ/FAQ_DEV.html b/doc/src/FAQ/FAQ_DEV.html index 5a99a0badc4..d68bf48041f 100644 --- a/doc/src/FAQ/FAQ_DEV.html +++ b/doc/src/FAQ/FAQ_DEV.html @@ -370,7 +370,7 @@ less: less -x4 -

The tools directory of the latest sources contains sample +

The tools/editors 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.

diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 8187f05546c..58d5d5635ce 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -1,4 +1,4 @@ - + PostgreSQL Coding Conventions @@ -21,44 +21,11 @@ - For Emacs, add the following (or - something similar) to your ~/.emacs - initialization file: - - -;; check for files with a path containing "postgres" or "pgsql" -(setq auto-mode-alist - (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode) - auto-mode-alist)) -(setq auto-mode-alist - (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) - auto-mode-alist)) - -(defun pgsql-c-mode () - ;; sets up formatting for PostgreSQL C code - (interactive) - (c-mode) - (setq-default tab-width 4) - (c-set-style "bsd") ; set c-basic-offset to 4, plus other stuff - (c-set-offset 'case-label '+) ; tweak case indent to match PG custom - (setq indent-tabs-mode t)) ; make sure we keep tabs when indenting - - - - - For vi, your - ~/.vimrc or equivalent file should contain - the following: - - -set tabstop=4 - - - or equivalently from within vi, try - - -:set ts=4 - + The src/tools directory contains sample settings + files that can be used with the emacs, + xemacs or vim + editors to help ensure that they format code according to these + conventions. -- cgit v1.2.3