Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!hubcap!ncrcae!ece-csc!ncsuvx!mcnc!rti!xyzzy!biesack From: biesack@xyzzy.UUCP (Dave Biesack) Newsgroups: comp.emacs Subject: call-interactively crashes emacs Message-ID: <1456@xyzzy.UUCP> Date: 12 Oct 88 19:59:22 GMT Reply-To: biesack@dg-rtp.UUCP () Organization: Data General Corporation, Research Triangle Park, NC Lines: 44 A couple weeks ago, John Sturdy (jcgs@harlqn.UUCP) posted some elisp for doing completion based on a tags file. I tried it and it crashed my emacs: (emacs-version) GNU Emacs 18.51.2 of Tue Jun 7 1988 on godel (berkeley-unix) (running under X11, but I doubt that matters) I traced it down to the following expression: (call-interactively (symbol-function 'visit-tags-table))) which causes emacs to crash when (symbol-function 'visit-tags-table) is '(autoload "tags" 184745 t nil) The big question is: why does this crash emacs? Is this a bug? I can understand this being an error because an autoload form is not really a function, but the error should be caught. The quick fix is to load tags first: (cond ((null tags-file-name) (load-library "tags") ; this defines visit-tags-table (call-interactively (symbol-function 'visit-tags-table)))) Another problem I encountered was an apparent byte-trashing due to a DEL character in the posting. The copy I received contained a line in the make-tags-name-list function: (while (search-forward "" (point-max) t) Of course, the test always fails so the loop is void. The string should really contain a DEL (^?, 0xff) character. Change this to: (while (search-forward del-string (point-max) t) where del-string is defined: (defconst del-string (char-to-string 127) "String containing DEL character") After these fixes, things work well. Sorry they're not 'diff' format. djb -- David J. Biesack (919) 248-5989 Data General, Research Triangle Park, NC {ihnp4, seismo, ...}!mcnc!rti!dg-rtp!biesack biesack@dg-rtp.dg.com