Commit Graph

15 Commits

Author SHA1 Message Date
Noah Misch 472e1e4cf6 Make Emacs perl-mode indent more like perltidy.
This especially helps braces that surround code blocks.  Back-patch to
v11, where commit 56fb890ace first
appeared; before that, settings were even more distant from perltidy.

Reviewed by Andrew Dunstan.

Discussion: https://postgr.es/m/20190103055355.GB267595@gust.leadboat.com
2019-01-13 11:32:31 -08:00
Peter Eisentraut 333224c99e Update documentation editor setup instructions
Now that the documentation sources are in XML rather than SGML, some of
the documentation about the editor, or more specifically Emacs, setup
needs updating.  The updated instructions recommend using nxml-mode,
which works mostly out of the box, with some small tweaks in
emacs.samples and .dir-locals.el.

Also remove some obsolete stuff in .dir-locals.el.  I did, however,
leave the sgml-mode settings in there so that someone using Emacs
without emacs.samples gets those settings when editing a *.sgml file.
2018-07-13 21:23:41 +02:00
Peter Eisentraut 56fb890ace Make Emacs settings match perltidy configuration
Set Emacs's perl-continued-statement-offset to match perltidy's
--continuation-indentation, which is 2 (not overridden in PostgreSQL's
profile) rather than the 4 that Emacs uses by default.
2018-04-23 11:44:31 -04:00
Peter Eisentraut 442663f133 emacs: Set indent-tabs-mode in perl-mode
This matches existing practice, but makes the setup complete and
consistent with the C code setup.
2015-04-12 23:53:23 -04:00
Noah Misch 81300ea444 emacs.samples: Reliably override ".dir-locals.el".
Back-patch to 9.4, where .dir-locals.el was introduced.
2014-06-13 19:57:18 -04:00
Peter Eisentraut 5e3e8e4daa Update Emacs configuration
Update emacs.samples with new configuration snippets that match pgindent
et al. formatting more accurately and follow Emacs Lisp best practices
better.

Add .dir-locals.el with a subset of that configuration for casual
editing and viewing.

Reviewed-by: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Reviewed-by: Noah Misch <noah@leadboat.com>
2013-08-13 20:08:44 -04:00
Bruce Momjian 5fcb58baca Add Perl emacs formatting macros to src/tools/editors/emacs.samples.
Peter Eisentraut
2012-08-30 21:40:31 -04:00
Peter Eisentraut 78e7e20afe Small update to emacs example configuration
Since both tarballs and git now result in a "postgresql" directory
rather than a "pgsql" directory, adjust the example configuration to
look for the former.
2011-04-23 00:47:01 +03:00
Peter Eisentraut 415f5e1259 Add fill-column setting to emacs example configurations
This matches the maximum line length that pgindent uses.
2011-04-23 00:47:00 +03:00
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Peter Eisentraut 3f11971916 Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
2010-08-19 05:57:36 +00:00
Peter Eisentraut f7ad9cab30 Add a further customization to the SGML Emacs mode to prevent the use of
tabs in the documentation source.
2009-07-21 19:07:24 +00:00
Peter Eisentraut 65ffbbf1a5 Fix sgml-mode example. thanks Andrew Dunstan 2009-05-20 23:51:24 +00:00
Peter Eisentraut 939a40b0af Add some instructions on how to customize emacs for working on the SGML
sources.
2009-05-18 12:47:44 +00:00
Bruce Momjian 8dc8f44f58 Update Emacs/vim editor info. 2006-09-07 00:10:46 +00:00