From: pjb@... (Pascal J. Bourguignon) Date: 2009-08-31T18:20:11+09:00 Subject: Re: What is the ruby conventions to name private method? Fabian Streitel writes: >> 2) Don't have extra empty lines for no reason. >> > > I count better readability as a good reason. If you need to improve readability by separating sections of a method with empty lines, then it's a sure sign that you should have split that method! >> 3) Use 2 spaces per indent. >> > > I like 4 better Do not store indentation in files. Have your editor automatically re-indent when opening the file. (defun pjb-indent-meat () ;; If pjb-indent-meat is not in last position, ;; then move it over to last position. (let ((p (position (function pjb-indent-meat) find-file-hook))) (when (and p (< (1+ p) (length find-file-hook))) (setf find-file-hook (append (remove (function pjb-indent-meat) find-file-hook) (list (function pjb-indent-meat)))))) ;; Work only on some modes: (when (member major-mode '(lisp-mode common-lisp-mode emacs-lisp-mode perl-mode shell-script-mode ruby-mode scheme-mode c-mode c++-mode objective-c-mode)) (if buffer-read-only (unwind-protect (progn (toggle-read-only) (indent-region (point-min) (point-max)) (pop-mark)) (toggle-read-only)) (progn (indent-region (point-min) (point-max)) (pop-mark))) (set-buffer-modified-p nil))) (setf find-file-hook (append (remove (function pjb-indent-meat) find-file-hook) (list (function pjb-indent-meat)))) -- __Pascal Bourguignon__