[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el
From: |
Martin Stjernholm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el |
Date: |
Sun, 16 Nov 2003 11:55:08 -0500 |
Index: emacs/lisp/progmodes/cc-align.el
diff -c emacs/lisp/progmodes/cc-align.el:1.22
emacs/lisp/progmodes/cc-align.el:1.23
*** emacs/lisp/progmodes/cc-align.el:1.22 Mon Sep 1 11:45:34 2003
--- emacs/lisp/progmodes/cc-align.el Sun Nov 16 11:55:07 2003
***************
*** 1121,1155 ****
'(before after)))))
(defun c-gnu-impose-minimum ()
! "Imposes a minimum indentation for lines inside a top-level construct.
The variable `c-label-minimum-indentation' specifies the minimum
indentation amount."
! ;; Don't adjust macro or comment-only lines.
! (unless (or (assq 'cpp-macro c-syntactic-context)
! (assq 'comment-intro c-syntactic-context))
!
! (let ((paren-state (save-excursion
! ;; Get the parenthesis state, but skip past
! ;; an initial closing paren on the line since
! ;; the close brace of a block shouldn't be
! ;; considered to be inside the block.
! (back-to-indentation)
! (when (looking-at "\\s\)")
! (forward-char))
! (c-parse-state))))
!
! ;; Search for an enclosing brace on paren-state.
! (while (and paren-state
! (not (and (integer-or-marker-p (car paren-state))
! (eq (char-after (car paren-state)) ?{))))
! (setq paren-state (cdr paren-state)))
!
! (when paren-state
! (save-excursion
! (back-to-indentation)
! (if (zerop (current-column))
! (insert-char ?\ c-label-minimum-indentation t)))))))
;; Useful for c-hanging-semi&comma-criteria
--- 1121,1140 ----
'(before after)))))
(defun c-gnu-impose-minimum ()
! "Imposes a minimum indentation for lines inside code blocks.
The variable `c-label-minimum-indentation' specifies the minimum
indentation amount."
! (when (and (not
! ;; Don't adjust macro or comment-only lines.
! (or (assq 'cpp-macro c-syntactic-context)
! (assq 'comment-intro c-syntactic-context)))
! (c-intersect-lists c-inside-block-syms c-syntactic-context)
! (save-excursion
! (back-to-indentation)
! (< (current-column) c-label-minimum-indentation)))
! (c-shift-line-indentation (- c-label-minimum-indentation
! (current-indentation)))))
;; Useful for c-hanging-semi&comma-criteria
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el,
Martin Stjernholm <=