[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,v
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el,v |
Date: |
Mon, 01 Jan 2007 22:11:28 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Alan Mackenzie <acmacm> 07/01/01 22:11:28
Index: cc-align.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-align.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- cc-align.el 3 Dec 2006 00:56:29 -0000 1.33
+++ cc-align.el 1 Jan 2007 22:11:27 -0000 1.34
@@ -90,6 +90,29 @@
(c-after-special-operator-id))))
c-basic-offset)))
+(defun c-lineup-gnu-DEFUN-intro-cont (langelem)
+ "Line up the continuation lines of a DEFUN macro in the Emacs C source.
+These lines are indented as though they were `knr-argdecl-intro' lines.
+Return nil when we're not in such a construct.
+
+This function is for historical compatibility with how previous CC Modes (5.28
+and earlier) indented such lines.
+
+Here is an example:
+
+DEFUN (\"forward-char\", Fforward_char, Sforward_char, 0, 1, \"p\",
+ doc: /* Move point right N characters (left if N is negative).
+On reaching end of buffer, stop and signal error. */)
+ (n) <- c-lineup-gnu-DEFUN-into-cont
+ Lisp_Object n; <- c-lineup-gnu-DEFUN-into-cont
+
+Works with: topmost-intro-cont."
+ (save-excursion
+ (let (case-fold-search)
+ (goto-char (c-langelem-pos langelem))
+ (if (looking-at "\\<DEFUN\\>")
+ (c-calc-offset '(knr-argdecl-intro))))))
+
(defun c-block-in-arglist-dwim (arglist-start)
;; This function implements the DWIM to avoid far indentation of
;; brace block constructs in arguments in `c-lineup-arglist' etc.
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-align.el,v,
Alan Mackenzie <=