aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2000-06-20 15:01:59 +0000
committerSam Steingold2000-06-20 15:01:59 +0000
commit5d80cc9cbc2ffd18c4fc5ca2c9c04e76ae7f8c30 (patch)
tree46c3c8124f3eefdf43e12277299cf370cd29d271
parentf85c008a0cda0a0297a2e28647d71385f2d4e584 (diff)
downloademacs-5d80cc9cbc2ffd18c4fc5ca2c9c04e76ae7f8c30.tar.gz
emacs-5d80cc9cbc2ffd18c4fc5ca2c9c04e76ae7f8c30.zip
handle print-unreadable-object
-rw-r--r--lisp/ChangeLog25
-rw-r--r--lisp/emacs-lisp/cl-indent.el186
2 files changed, 108 insertions, 103 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9bd12c46cf..7077ccfed05 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12000-06-20 Sam Steingold <sds@gnu.org>
2
3 * emacs-lisp/cl-indent.el (toplevel): Indent
4 `print-unreadable-object' properly. Untabify.
5
12000-06-14 Carsten Dominik <dominik@strw.leidenuniv.nl> 62000-06-14 Carsten Dominik <dominik@strw.leidenuniv.nl>
2 7
3 * textmodes/reftex.el (reftex-find-citation-regexp-format): 8 * textmodes/reftex.el (reftex-find-citation-regexp-format):
@@ -109,7 +114,7 @@
1092000-06-16 Gerd Moellmann <gerd@gnu.org> 1142000-06-16 Gerd Moellmann <gerd@gnu.org>
110 115
111 * Makefile.in (distclean): New target. 116 * Makefile.in (distclean): New target.
112 117
1132000-06-16 Stefan Monnier <monnier@cs.yale.edu> 1182000-06-16 Stefan Monnier <monnier@cs.yale.edu>
114 119
115 * Makefile.in (srcdir): Define for update-subdirs. 120 * Makefile.in (srcdir): Define for update-subdirs.
@@ -146,9 +151,9 @@
146 151
1472000-06-15 Gerd Moellmann <gerd@gnu.org> 1522000-06-15 Gerd Moellmann <gerd@gnu.org>
148 153
149 * info.el (Info-find-in-tag-table-1, Info-find-in-tag-table) 154 * info.el (Info-find-in-tag-table-1, Info-find-in-tag-table)
150 (Info-find-node-in-buffer-1, Info-find-node-in-buffer): New 155 (Info-find-node-in-buffer-1, Info-find-node-in-buffer): New
151 functions. 156 functions.
152 (Info-find-node-2): Try a case-sensitive search first, then 157 (Info-find-node-2): Try a case-sensitive search first, then
153 do a case-insensitive search. 158 do a case-insensitive search.
154 159
@@ -215,7 +220,7 @@
215 * image.el (insert-image): Default STRING to a space. 220 * image.el (insert-image): Default STRING to a space.
216 221
217 * info.el Doc fixes. 222 * info.el Doc fixes.
218 (Info-build-node-completions): Match Ref tags. 223 (Info-build-node-completions): Match Ref tags.
219 224
2202000-06-13 Eli Zaretskii <eliz@is.elta.co.il> 2252000-06-13 Eli Zaretskii <eliz@is.elta.co.il>
221 226
@@ -253,9 +258,9 @@
253 * thingatpt.el (toplevel symbol-properties): 258 * thingatpt.el (toplevel symbol-properties):
254 * textmodes/makeinfo.el (makeinfo-compile): 259 * textmodes/makeinfo.el (makeinfo-compile):
255 * progmodes/make-mode.el (makefile-pickup-filenames-as-targets): 260 * progmodes/make-mode.el (makefile-pickup-filenames-as-targets):
256 * progmodes/hideif.el (hif-compress-define-list) 261 * progmodes/hideif.el (hif-compress-define-list)
257 (hide-ifdef-use-define-alist): 262 (hide-ifdef-use-define-alist):
258 * net/ange-ftp.el (ange-ftp-vms-delete-file-entry) 263 * net/ange-ftp.el (ange-ftp-vms-delete-file-entry)
259 (ange-ftp-vms-add-file-entry): 264 (ange-ftp-vms-add-file-entry):
260 * menu-bar.el (menu-bar-update-buffers, menu-bar-update-buffers): 265 * menu-bar.el (menu-bar-update-buffers, menu-bar-update-buffers):
261 * man.el (Man-build-man-command): 266 * man.el (Man-build-man-command):
@@ -263,8 +268,8 @@
263 * info.el (Info-insert-dir): 268 * info.el (Info-insert-dir):
264 * emulation/mlconvert.el (backward-word, forward-word, setq): 269 * emulation/mlconvert.el (backward-word, forward-word, setq):
265 * emacs-lisp/gulp.el (gulp-send-requests): 270 * emacs-lisp/gulp.el (gulp-send-requests):
266 * emacs-lisp/byte-opt.el (byte-compile-log-lap-1) 271 * emacs-lisp/byte-opt.el (byte-compile-log-lap-1)
267 (byte-optimize-inline-handler, byte-optimize-form-code-walker) 272 (byte-optimize-inline-handler, byte-optimize-form-code-walker)
268 (byte-optimize-apply, end of file): 273 (byte-optimize-apply, end of file):
269 * emacs-lisp/advice.el (ad-advice-class-completion-table) 274 * emacs-lisp/advice.el (ad-advice-class-completion-table)
270 (ad-make-freeze-definition): 275 (ad-make-freeze-definition):
@@ -356,7 +361,7 @@
3562000-06-10 Kenichi Handa <handa@etl.go.jp> 3612000-06-10 Kenichi Handa <handa@etl.go.jp>
357 362
358 * international/mule.el (set-buffer-file-coding-system): If one of 363 * international/mule.el (set-buffer-file-coding-system): If one of
359 undecided-XXX is specified, change only EOL conversion. 364 undecided-XXX is specified, change only EOL conversion.
360 365
361 * international/mule-conf.el (unix): New alias for the coding 366 * international/mule-conf.el (unix): New alias for the coding
362 system undecided-unix. 367 system undecided-unix.
@@ -3147,7 +3152,7 @@
3147 3152
31482000-02-25 Sam Steingold <sds@goems.com> 31532000-02-25 Sam Steingold <sds@goems.com>
3149 3154
3150 * emacs-lisp/cl-indent.el (toplvel): Indent `pprint-logical-block' 3155 * emacs-lisp/cl-indent.el (toplevel): Indent `pprint-logical-block'
3151 properly. 3156 properly.
3152 3157
31532000-02-25 Richard M. Stallman <rms@caffeine.ai.mit.edu> 31582000-02-25 Richard M. Stallman <rms@caffeine.ai.mit.edu>
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 85c3e626cee..295a85b7aed 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -164,11 +164,11 @@ by `lisp-body-indent'."
164 (not (eq (char-after (- containing-sexp 2)) ?\#))) 164 (not (eq (char-after (- containing-sexp 2)) ?\#)))
165 ;; No indentation for "'(...)" elements 165 ;; No indentation for "'(...)" elements
166 (setq calculated (1+ sexp-column))) 166 (setq calculated (1+ sexp-column)))
167 ((or (eq (char-after (1- containing-sexp)) ?\,) 167 ((or (eq (char-after (1- containing-sexp)) ?\,)
168 (and (eq (char-after (1- containing-sexp)) ?\@) 168 (and (eq (char-after (1- containing-sexp)) ?\@)
169 (eq (char-after (- containing-sexp 2)) ?\,))) 169 (eq (char-after (- containing-sexp 2)) ?\,)))
170 ;; ",(...)" or ",@(...)" 170 ;; ",(...)" or ",@(...)"
171 (setq calculated normal-indent)) 171 (setq calculated normal-indent))
172 ((eq (char-after (1- containing-sexp)) ?\#) 172 ((eq (char-after (1- containing-sexp)) ?\#)
173 ;; "#(...)" 173 ;; "#(...)"
174 (setq calculated (1+ sexp-column))) 174 (setq calculated (1+ sexp-column)))
@@ -192,15 +192,15 @@ by `lisp-body-indent'."
192 ;; other body form 192 ;; other body form
193 normal-indent)))) 193 normal-indent))))
194 ((symbolp method) 194 ((symbolp method)
195 (let ((lisp-indent-error-function function)) 195 (let ((lisp-indent-error-function function))
196 (setq calculated (funcall method 196 (setq calculated (funcall method
197 path state indent-point 197 path state indent-point
198 sexp-column normal-indent)))) 198 sexp-column normal-indent))))
199 (t 199 (t
200 (let ((lisp-indent-error-function function)) 200 (let ((lisp-indent-error-function function))
201 (setq calculated (lisp-indent-259 201 (setq calculated (lisp-indent-259
202 method path state indent-point 202 method path state indent-point
203 sexp-column normal-indent)))))) 203 sexp-column normal-indent))))))
204 (goto-char containing-sexp) 204 (goto-char containing-sexp)
205 (setq last-point containing-sexp) 205 (setq last-point containing-sexp)
206 (unless calculated 206 (unless calculated
@@ -241,16 +241,16 @@ by `lisp-body-indent'."
241 (setq tem (car method)) 241 (setq tem (car method))
242 242
243 (or (eq tem 'nil) ;default indentation 243 (or (eq tem 'nil) ;default indentation
244 (eq tem '&lambda) ;lambda list 244 (eq tem '&lambda) ;lambda list
245 (and (eq tem '&body) (null (cdr method))) 245 (and (eq tem '&body) (null (cdr method)))
246 (and (eq tem '&rest) 246 (and (eq tem '&rest)
247 (consp (cdr method)) 247 (consp (cdr method))
248 (null (cddr method))) 248 (null (cddr method)))
249 (integerp tem) ;explicit indentation specified 249 (integerp tem) ;explicit indentation specified
250 (and (consp tem) ;destructuring 250 (and (consp tem) ;destructuring
251 (eq (car tem) '&whole) 251 (eq (car tem) '&whole)
252 (or (symbolp (cadr tem)) 252 (or (symbolp (cadr tem))
253 (integerp (cadr tem)))) 253 (integerp (cadr tem))))
254 (and (symbolp tem) ;a function to call to do the work. 254 (and (symbolp tem) ;a function to call to do the work.
255 (null (cdr method))) 255 (null (cdr method)))
256 (lisp-indent-report-bad-format method)) 256 (lisp-indent-report-bad-format method))
@@ -346,14 +346,14 @@ by `lisp-body-indent'."
346 (if (>= (car path) 3) 346 (if (>= (car path) 3)
347 (let ((lisp-tag-body-indentation lisp-body-indent)) 347 (let ((lisp-tag-body-indentation lisp-body-indent))
348 (funcall (function lisp-indent-tagbody) 348 (funcall (function lisp-indent-tagbody)
349 path state indent-point sexp-column normal-indent)) 349 path state indent-point sexp-column normal-indent))
350 (funcall (function lisp-indent-259) 350 (funcall (function lisp-indent-259)
351 '((&whole nil &rest 351 '((&whole nil &rest
352 ;; the following causes weird indentation 352 ;; the following causes weird indentation
353 ;;(&whole 1 1 2 nil) 353 ;;(&whole 1 1 2 nil)
354 ) 354 )
355 (&whole nil &rest 1)) 355 (&whole nil &rest 1))
356 path state indent-point sexp-column normal-indent))) 356 path state indent-point sexp-column normal-indent)))
357 357
358(defun lisp-indent-function-lambda-hack (path state indent-point 358(defun lisp-indent-function-lambda-hack (path state indent-point
359 sexp-column normal-indent) 359 sexp-column normal-indent)
@@ -375,83 +375,83 @@ by `lisp-body-indent'."
375 375
376 376
377(let ((l '((block 1) 377(let ((l '((block 1)
378 (case (4 &rest (&whole 2 &rest 1))) 378 (case (4 &rest (&whole 2 &rest 1)))
379 (ccase . case) (ecase . case) 379 (ccase . case) (ecase . case)
380 (condition-case ((1 4) (&whole 2 ((0 1) (1 3) (2 &body))))) 380 (condition-case ((1 4) (&whole 2 ((0 1) (1 3) (2 &body)))))
381 (typecase . case) (etypecase . case) (ctypecase . case) 381 (typecase . case) (etypecase . case) (ctypecase . case)
382 (catch 1) 382 (catch 1)
383 (cond (&rest (&whole 2 &rest 1))) 383 (cond (&rest (&whole 2 &rest 1)))
384 (defvar (4 2 2)) 384 (defvar (4 2 2))
385 (defclass ((&whole 4 &rest (&whole 2 &rest 1)) 385 (defclass ((&whole 4 &rest (&whole 2 &rest 1))
386 &rest (&whole 2 &rest 1))) 386 &rest (&whole 2 &rest 1)))
387 (defconstant . defvar) 387 (defconstant . defvar)
388 (defcustom (4 2 2 2)) 388 (defcustom (4 2 2 2))
389 (defparameter . defvar) 389 (defparameter . defvar)
390 (define-modify-macro 390 (define-modify-macro
391 (4 &body)) 391 (4 &body))
392 (defsetf (4 &lambda 4 &body)) 392 (defsetf (4 &lambda 4 &body))
393 (defun (4 &lambda &body)) 393 (defun (4 &lambda &body))
394 (define-setf-method . defun) 394 (define-setf-method . defun)
395 (define-setf-expander . defun) 395 (define-setf-expander . defun)
396 (defmacro . defun) (defsubst . defun) (deftype . defun) 396 (defmacro . defun) (defsubst . defun) (deftype . defun)
397 (defmethod (4 4 (&whole 4 &rest 1) &body)) 397 (defmethod (4 4 (&whole 4 &rest 1) &body))
398 (defpackage (4 2)) 398 (defpackage (4 2))
399 (defstruct ((&whole 4 &rest (&whole 2 &rest 1)) 399 (defstruct ((&whole 4 &rest (&whole 2 &rest 1))
400 &rest (&whole 2 &rest 1))) 400 &rest (&whole 2 &rest 1)))
401 (destructuring-bind 401 (destructuring-bind
402 ((&whole 6 &rest 1) 4 &body)) 402 ((&whole 6 &rest 1) 4 &body))
403 (do lisp-indent-do) 403 (do lisp-indent-do)
404 (do* . do) 404 (do* . do)
405 (dolist ((&whole 4 2 1) &body)) 405 (dolist ((&whole 4 2 1) &body))
406 (dotimes . dolist) 406 (dotimes . dolist)
407 (eval-when 1) 407 (eval-when 1)
408 (flet ((&whole 4 &rest (&whole 1 &lambda &body)) &body)) 408 (flet ((&whole 4 &rest (&whole 1 &lambda &body)) &body))
409 (labels . flet) 409 (labels . flet)
410 (macrolet . flet) 410 (macrolet . flet)
411 (handler-case (4 &rest (&whole 2 &lambda &body))) 411 (handler-case (4 &rest (&whole 2 &lambda &body)))
412 (restart-case . handler-case) 412 (restart-case . handler-case)
413 ;; `else-body' style 413 ;; `else-body' style
414 (if (nil nil &body)) 414 (if (nil nil &body))
415 ;; single-else style (then and else equally indented) 415 ;; single-else style (then and else equally indented)
416 (if (&rest nil)) 416 (if (&rest nil))
417 (lambda (&lambda &rest lisp-indent-function-lambda-hack)) 417 (lambda (&lambda &rest lisp-indent-function-lambda-hack))
418 (let ((&whole 4 &rest (&whole 1 1 2)) &body)) 418 (let ((&whole 4 &rest (&whole 1 1 2)) &body))
419 (let* . let) 419 (let* . let)
420 (compiler-let . let) ;barf 420 (compiler-let . let) ;barf
421 (handler-bind . let) (restart-bind . let) 421 (handler-bind . let) (restart-bind . let)
422 (locally 1) 422 (locally 1)
423 ;(loop ...) 423 ;(loop ...)
424 (multiple-value-bind 424 (multiple-value-bind
425 ((&whole 6 &rest 1) 4 &body)) 425 ((&whole 6 &rest 1) 4 &body))
426 (multiple-value-call 426 (multiple-value-call
427 (4 &body)) 427 (4 &body))
428 (multiple-value-prog1 1) 428 (multiple-value-prog1 1)
429 (multiple-value-setq 429 (multiple-value-setq (4 2))
430 (4 2)) 430 (multiple-value-setf . multiple-value-setq)
431 (multiple-value-setf . multiple-value-setq)
432 (pprint-logical-block (4 2)) 431 (pprint-logical-block (4 2))
433 ;; Combines the worst features of BLOCK, LET and TAGBODY 432 (print-unreadable-object ((&whole 4 1 &rest 1) &body))
434 (prog (&lambda &rest lisp-indent-tagbody)) 433 ;; Combines the worst features of BLOCK, LET and TAGBODY
435 (prog* . prog) 434 (prog (&lambda &rest lisp-indent-tagbody))
436 (prog1 1) 435 (prog* . prog)
437 (prog2 2) 436 (prog1 1)
438 (progn 0) 437 (prog2 2)
439 (progv (4 4 &body)) 438 (progn 0)
440 (return 0) 439 (progv (4 4 &body))
441 (return-from (nil &body)) 440 (return 0)
442 (symbol-macrolet . multiple-value-bind) 441 (return-from (nil &body))
443 (tagbody lisp-indent-tagbody) 442 (symbol-macrolet . multiple-value-bind)
444 (throw 1) 443 (tagbody lisp-indent-tagbody)
445 (unless 1) 444 (throw 1)
446 (unwind-protect (5 &body)) 445 (unless 1)
446 (unwind-protect (5 &body))
447 (when 1) 447 (when 1)
448 (with-output-to-string (4 2)) 448 (with-output-to-string (4 2))
449 (with-standard-io-syntax (2))))) 449 (with-standard-io-syntax (2)))))
450 (while l 450 (while l
451 (put (caar l) 'common-lisp-indent-function 451 (put (caar l) 'common-lisp-indent-function
452 (if (symbolp (cdar l)) 452 (if (symbolp (cdar l))
453 (get (cdar l) 'common-lisp-indent-function) 453 (get (cdar l) 'common-lisp-indent-function)
454 (car (cdar l)))) 454 (car (cdar l))))
455 (setq l (cdr l)))) 455 (setq l (cdr l))))
456 456
457 457
@@ -482,7 +482,7 @@ by `lisp-body-indent'."
482; (t 482; (t
483; (lose 483; (lose
484; 3)))))) 484; 3))))))
485 485
486 486
487;(put 'while 'common-lisp-indent-function 1) 487;(put 'while 'common-lisp-indent-function 1)
488;(put 'defwrapper'common-lisp-indent-function ...) 488;(put 'defwrapper'common-lisp-indent-function ...)