File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 12
12
13
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
14
15
+ ;;; Mode for C files to match src/tools/pgindent/pgindent formatting
16
+
15
17
;;; This set is known to work with old versions of emacs
16
18
17
19
(setq auto-mode-alist
80
82
81
83
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
82
84
85
+ ;;; Mode for Perl files to match src/tools/pgindent/perltidyrc formatting
86
+
87
+ (defun pgsql-perl-style ()
88
+ "Perl style adjusted for PostgreSQL project"
89
+ (interactive)
90
+ (setq tab-width 4)
91
+ (setq perl-indent-level 4)
92
+ (setq perl-continued-statement-offset 4)
93
+ (setq perl-continued-brace-offset 4)
94
+ (setq perl-brace-offset 0)
95
+ (setq perl-brace-imaginary-offset 0)
96
+ (setq perl-label-offset -2))
97
+
98
+ (add-hook 'perl-mode-hook
99
+ (lambda ()
100
+ (if (string-match "postgresql" buffer-file-name)
101
+ (pgsql-perl-style))))
102
+
103
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
104
+
83
105
;;; To work on the documentation, the following (or a variant, as above)
84
106
;;; can be helpful.
85
107
You can’t perform that action at this time.
0 commit comments