Subject: (make-symbol "") issues

From: Frank <[email-masked]>
Date: Fri, 01 Oct 2010 22:19:10 -0600

;;; "GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1"

;; When I byte compile this file and load it and try to evaluate (foo)
;; Emacs will either crash or (foo) returns some odd number on my machine.

(defmacro bar (&rest body)
  (let ((v (make-symbol "")))         ; Crashes with "" as name.
    `(let ((,v (catch :eof
         ,@body)))

       (when (not (eq ,v :eof))
     ,v))))

(defun foo ()
  (bar (message "Hello World!")))

;; (disassemble 'foo)
;;
;; byte code for foo:
;;   args: nil
;; 0    constant  (message "Hello World!")
;; 1    constant  (out-of-range 2)
;; 2    catch
;; 3    dup
;; 4    varbind      #::eof
;; 5    constant  (message "Hello World!")
;; 6    eq
;; 7    not
;; 8    goto-if-nil-else-pop 1
;; 11    varref      #::eof
;; 12:1    unbind      1
;; 13    return
;;
;; Looks like there's a problem in line 4 & 11.