/[emacs]/emacs/lisp/progmodes/cc-cmds.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/cc-cmds.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29.2.2 by miles, Tue Oct 14 23:30:15 2003 UTC revision 1.29.2.3 by miles, Fri Nov 21 00:35:50 2003 UTC
# Line 54  Line 54 
54    
55  (defvar c-fix-backslashes t)  (defvar c-fix-backslashes t)
56    
 (defun c-shift-line-indentation (shift-amt)  
   ;; This function does not do any hidden buffer changes.  
   (let ((pos (- (point-max) (point)))  
         (c-macro-start c-macro-start)  
         tmp-char-inserted)  
     (if (zerop shift-amt)  
         nil  
       (when (and (c-query-and-set-macro-start)  
                  (looking-at "[ \t]*\\\\$")  
                  (save-excursion  
                    (skip-chars-backward " \t")  
                    (bolp)))  
         (insert ?x)  
         (backward-char)  
         (setq tmp-char-inserted t))  
       (unwind-protect  
           (let ((col (current-indentation)))  
             (delete-region (c-point 'bol) (c-point 'boi))  
             (beginning-of-line)  
             (indent-to (+ col shift-amt)))  
         (when tmp-char-inserted  
           (delete-char 1))))  
     ;; If initial point was within line's indentation and we're not on  
     ;; a line with a line continuation in a macro, position after the  
     ;; indentation.  Else stay at same point in text.  
     (if (and (< (point) (c-point 'boi))  
              (not tmp-char-inserted))  
         (back-to-indentation)  
       (if (> (- (point-max) pos) (point))  
           (goto-char (- (point-max) pos))))))  
   
57  (defun c-indent-line (&optional syntax quiet ignore-point-pos)  (defun c-indent-line (&optional syntax quiet ignore-point-pos)
58    "Indent the current line according to the syntactic context,    "Indent the current line according to the syntactic context,
59  if `c-syntactic-indentation' is non-nil.  Optional SYNTAX is the  if `c-syntactic-indentation' is non-nil.  Optional SYNTAX is the

Legend:
Removed from v.1.29.2.2  
changed lines
  Added in v.1.29.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26