annotate lisp/ilisp/ilisp-ind.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children b82b59fe008d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; -*- Mode: Emacs-Lisp -*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;; ilisp-ind.el --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; This file is part of ILISP.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;;; Version: 5.7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; 1993, 1994 Ivan Vasquez
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;; 1994, 1995 Marco Antoniotti and Rick Busdiecker
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;; Other authors' names for which this Copyright notice also holds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; may appear later in this file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;; mailing list were bugs and improvements are discussed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;; ILISP is freely redistributable under the terms found in the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; COPYING.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; ILISP indentation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;;%Indentation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (defun indent-line-ilisp (&optional whole-exp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 "Indent current line as Lisp code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 With argument, indent any additional lines of the same expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 rigidly along with this one. This is restricted to the current buffer input."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (if (memq major-mode ilisp-modes)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (narrow-to-region (save-excursion (lisp-input-start)) (point-max)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (lisp-indent-line whole-exp)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (defun indent-sexp-ilisp ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 "Indent each line of the list starting just after point."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (if (memq major-mode ilisp-modes)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (narrow-to-region (save-excursion (lisp-input-start)) (point-max)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (indent-sexp)))