emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el [lexbind]
Date: Thu, 20 Nov 2003 19:36:39 -0500

Index: emacs/lisp/progmodes/cc-align.el
diff -c emacs/lisp/progmodes/cc-align.el:1.18.2.1 
emacs/lisp/progmodes/cc-align.el:1.18.2.2
*** emacs/lisp/progmodes/cc-align.el:1.18.2.1   Tue Oct 14 19:30:15 2003
--- emacs/lisp/progmodes/cc-align.el    Thu Nov 20 19:35:50 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]