Subject: bug#4737: 23.1.50; C-j in *scratch* after a hash table constant errors with void-function

From: Chong Yidong <[email-masked]>
Date: Sat, 17 Oct 2009 23:43:46 -0400

> In *scratch*:
>
> (progn
>   (setq print-length nil)
>   (make-hash-table))
> => #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ())
>
> #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data
>  ())
> =>
> Debugger entered--Lisp error: (void-function hash-table)
>   (hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data nil)
>   eval((hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data nil))
>   eval-last-sexp-1(t)
>   eval-last-sexp(t)
>   eval-print-last-sexp()
>   call-interactively(eval-print-last-sexp nil nil)

> However, this succeeds:

> (car (list
>       #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ())))
> => #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ())

> XEmacs handles the problem in #'forward-sexp

I think it's safer to handle it in preceding-sexp.  Could you test the
patch below?

*** emacs/lisp/emacs-lisp/lisp-mode.el.~1.247.~	2009-09-27 18:51:01.000000000 -0400
--- emacs/lisp/emacs-lisp/lisp-mode.el	2009-10-17 23:41:53.000000000 -0400
***************
*** 673,678 ****
--- 673,682 ----
  	  (when (eq (preceding-char) ??)
  	    (forward-char -1)))
  
+ 	;; Skip over hash table read syntax
+ 	(when (looking-back "#s")
+ 	  (forward-char -2))
+ 
  	;; Skip over `#N='s.
  	(when (eq (preceding-char) ?=)
  	  (let (labeled-p)