changeset 30651:61c2f9fcb8f6

* emacs-lisp/cl-indent.el (toplevel): Indent `defclass', `defconst', `define-condition', `with-slots'. * font-lock.el (lisp-font-lock-keywords-2): Added `with-' and `do-'.
author Sam Steingold <sds@gnu.org>
date Mon, 07 Aug 2000 16:51:57 +0000
parents db7dfd959c19
children 4ed1978642cb
files lisp/ChangeLog lisp/emacs-lisp/cl-indent.el lisp/font-lock.el
diffstat 3 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Aug 07 15:43:46 2000 +0000
+++ b/lisp/ChangeLog	Mon Aug 07 16:51:57 2000 +0000
@@ -1,3 +1,9 @@
+2000-08-07  Sam Steingold  <sds@gnu.org>
+
+	* emacs-lisp/cl-indent.el (toplevel): Indent `defclass',
+	`defconst', `define-condition', `with-slots'.
+	* font-lock.el (lisp-font-lock-keywords-2): Added `with-' and `do-'.
+
 2000-08-03  Miles Bader  <miles@gnu.org>
 
 	* comint.el (comint-use-prompt-regexp-instead-of-fields):
--- a/lisp/emacs-lisp/cl-indent.el	Mon Aug 07 15:43:46 2000 +0000
+++ b/lisp/emacs-lisp/cl-indent.el	Mon Aug 07 16:51:57 2000 +0000
@@ -382,13 +382,13 @@
            (catch 1)
            (cond        (&rest (&whole 2 &rest 1)))
            (defvar      (4 2 2))
-           (defclass    ((&whole 4 &rest (&whole 2 &rest 1))
-                         &rest (&whole 2 &rest 1)))
+           (defclass    (6 4 (&whole 2 &rest 1) (&whole 2 &rest 1)))
            (defconstant . defvar)
            (defcustom   (4 2 2 2))
            (defparameter . defvar)
-           (define-modify-macro
-                        (4 &body))
+           (defconst     . defcustom)
+           (define-condition  . defclass)
+           (define-modify-macro (4 &body))
            (defsetf     (4 &lambda 4 &body))
            (defun       (4 &lambda &body))
            (define-setf-method . defun)
@@ -421,10 +421,8 @@
            (handler-bind . let) (restart-bind . let)
            (locally 1)
            ;(loop ...)
-           (multiple-value-bind
-                        ((&whole 6 &rest 1) 4 &body))
-           (multiple-value-call
-                        (4 &body))
+           (multiple-value-bind ((&whole 6 &rest 1) 4 &body))
+           (multiple-value-call (4 &body))
            (multiple-value-prog1 1)
            (multiple-value-setq (4 2))
            (multiple-value-setf . multiple-value-setq)
@@ -446,6 +444,7 @@
            (unwind-protect (5 &body))
            (when 1)
            (with-output-to-string (4 2))
+           (with-slots . multiple-value-bind)
            (with-standard-io-syntax (2)))))
   (while l
     (put (caar l) 'common-lisp-indent-function
--- a/lisp/font-lock.el	Mon Aug 07 15:43:46 2000 +0000
+++ b/lisp/font-lock.el	Mon Aug 07 16:51:57 2000 +0000
@@ -186,7 +186,7 @@
 ;; doesn't work.  Or maybe it allows you to think less and drift off to sleep.
 ;;
 ;; So, here are my opinions/advice/guidelines:
-;; 
+;;
 ;; - Highlight conceptual objects, such as function and variable names, and
 ;;   different objects types differently, i.e., (a) and (b) above, highlight
 ;;   function names differently to variable names.
@@ -1113,7 +1113,7 @@
 	;;   `fontified' text props around since jit-lock-mode is also off.
 	;; - font-lock-default-fontify-buffer fails: this is not run
 	;;   any more anyway.   -sm
-	;; 
+	;;
 	;; (jit-lock-mode
 	;;  (jit-lock-after-unfontify-buffer))
 	(lazy-lock-mode
@@ -2177,6 +2177,9 @@
       ;;
       ;; ELisp and CLisp `&' keywords as types.
       '("\\&\\sw+\\>" . font-lock-type-face)
+      ;;
+      ;; CL `with-' and `do-' constructs
+      '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face)
       )))
   "Gaudy level highlighting for Lisp modes.")