home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / emacs / help / 5515 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.8 KB

  1. Path: sparky!uunet!opl.com!hri.com!spool.mu.edu!darwin.sura.net!gatech!ukma!cs.widener.edu!dsinc!ub!csn!news.den.mmc.com!b52!kevin
  2. From: kevin@b52.den.mmc.com (Kevin Rodgers)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: debugging .emacs
  5. Message-ID: <1993Jan26.174310.16842@den.mmc.com>
  6. Date: 26 Jan 93 17:43:10 GMT
  7. References: <PSHANNON.93Jan20220406@iapetus.cv.nrao.edu> <NICKEL.93Jan22201627@tempest.cs.tu-berlin.de> <LEVITTE.93Jan23174528@elin.e.kth.se>
  8. Sender: news@den.mmc.com (News)
  9. Organization: Martin Marietta Western Internal Systems, Technical Operations
  10. Lines: 37
  11. Nntp-Posting-Host: b52.den.mmc.com
  12.  
  13. In article <LEVITTE.93Jan23174528@elin.e.kth.se> LEVITTE@e.kth.se (Richard Levitte) writes:
  14. >It is possible to make that error message a little more descriptive
  15. >with the following patch on startup.el:
  16. >
  17. >*** ed:[orig.lisp]startup.el
  18. >--- ed:[new.lisp]startup.el
  19. >**************
  20. >*** 124,130
  21. >               ;; Don't you dare turn this off for anyone
  22. >               ;; except yourself.
  23. >               (load "default" t t)))))
  24. >!       (error (message "Error in init file")))
  25. >      (if (get-buffer "*scratch*")
  26. >      (save-excursion
  27. >        (set-buffer "*scratch*")
  28. >--- 124,130 -----
  29. >               ;; Don't you dare turn this off for anyone
  30. >               ;; except yourself.
  31. >               (load "default" t t)))))
  32. >!       (error (message (format "Error in init file: %s" error))))
  33. >      (if (get-buffer "*scratch*")
  34. >      (save-excursion
  35. >        (set-buffer "*scratch*")
  36. >
  37. >
  38. >The message can be a little cryptic, but it helps to get the message:
  39. >"Error in init file: (void-variable foo)"
  40.  
  41. Very nice idea!  But note that message takes format directives, so you
  42. don't need to call format:
  43.  
  44.     (error (message "Error in init file: %s" error))
  45. -- 
  46. Kevin Rodgers                kevin@traffic.den.mmc.com
  47. Martin Marietta MS A16401        (303) 790-3971
  48. 116 Inverness Dr. East
  49. Englewood CO 80112 USA            GO BUFFS!
  50.