home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0223.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  11.4 KB  |  330 lines

  1. I'm trying to set up a bunch of things in my site-init.el, and when I try to
  2. build lucid, I get a bus error - core dumped.  Can anyone point me to any
  3. instructions on how to troubleshoot this?  What can be in my site-init.el,
  4. and what can't?  I'm including what I put in my site-init.el below, just in
  5. case that might help.  Sorry for the long message, but I've got a lot of
  6. stuff in there that we want for our defaults...
  7.  
  8. ----------------------  Begin site-init.el  ----------------------
  9. ;;; initial mode
  10. (setq default-major-mode 'text-mode)
  11. (setq initial-major-mode 'text-mode)
  12. (setq text-mode-hook '(lambda () (auto-fill-mode 1)))
  13. (setq default-fill-column 76)
  14. (setq blink-matching-paren-distance 10000)
  15. (setq backup-by-copying-when-mismatch t)
  16.  
  17. (x-set-screen-icon-pixmap (selected-screen)
  18.                           "/demo/gnu-emacs/current/etc/lemacs.icon")
  19.  
  20. ;;; Initialize some window stuff
  21. (setq x-mode-pointer-shape "X_cursor")
  22. (setq x-pointer-shape "top_left_arrow")
  23.  
  24. (setq-default indent-tabs-mode nil)
  25.  
  26. (setq-default case-fold-search t)
  27.  
  28. (defconst search-slow-speed 2400
  29.   "*Highest terminal speed at which to use \"slow\" style incremental search.
  30. This is the style where a one-line window is created to show the line
  31. that the search has reached.")
  32.  
  33. ;;; c mode
  34. (setq c-argdecl-indent 3)
  35. (setq c-brace-imaginary-offset 0)
  36. (setq c-brace-offset 0)
  37. (setq c-continued-statement-offset 3)
  38. (setq c-indent-level 3)
  39. (setq c-label-offset -1)
  40. (setq c-tab-always-indent t)
  41. (setq c-auto-newline t)
  42.  
  43. ;;; we want to use regions
  44. (put 'narrow-to-region 'disabled nil)
  45.  
  46. ;;; some extensions are not correctly lined up for autoloading
  47. (setq auto-mode-alist (nconc '(("\\.nroff$" . nroff-mode)) auto-mode-alist))
  48.  
  49. ;;; show just the lines that will be left after #ifdef  M-x hide-ifdef-mode.
  50. (autoload 'hide-ifdef-mode "hideif" nil t)
  51.  
  52. ;;; Last shell command used to do a compilation; default for next compilation.
  53. (setq compile-command "make")
  54.  
  55. ;;; automatically come up with display-time executed
  56. (display-time)
  57.  
  58. ;;; define where to find news and other miscellaneous gnus stuff
  59. (setq nntp-server-name "mack")
  60. (setq gnus-nntp-server "mack")
  61. (setq gnus-use-generic-from t)
  62. (setq gnus-local-organization "ROLM - A Siemens Company")
  63. (autoload 'gnus "gnus" "Read network news." t)
  64. (autoload 'gnus-post-news "gnuspost" "Post a news." t)
  65.  
  66. (setq gnus-ignored-headers
  67.   "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:\\|^Nntp-Posting-Host:")
  68.  
  69. ;;; automatically allow both space and tab to perform full completion
  70. (define-key minibuffer-local-must-match-map " " 'minibuffer-complete)
  71. (define-key minibuffer-local-completion-map " " 'minibuffer-complete)
  72.  
  73. ;; Taken directly from $EMACS/lisp/energize/energize-menus.el,
  74. ;; but modified a little bit for my personal taste.
  75. (defun setup-sparc-function-keys ()
  76.   (if (not (eq window-system 'x))
  77.       nil
  78.     (define-key global-map [f1]  'help-for-help)
  79.     (define-key global-map [f11] 'keyboard-quit)        ;;Stop
  80.     (define-key global-map '(meta f11) 'keyboard-quit)        ;;M-Stop
  81.     (define-key global-map [f12] 'repeat-complex-command)    ;;Again
  82.     (define-key global-map [f13] 'edit-options)            ;;Props
  83.     (define-key global-map [f14] 'undo)                ;;Undo
  84.     (define-key global-map [f16] 'x-copy-primary-selection)    ;;Copy
  85.     (define-key global-map [f18] 'x-yank-clipboard-selection)    ;;Paste
  86.     (define-key global-map [f19] 'isearch-forward)        ;;Find
  87.     (define-key global-map [f20] 'x-kill-primary-selection)    ;;Cut
  88.     (define-key global-map [f22] 'print-buffer)            ;;PrSc
  89.     (define-key global-map [f24] "=")                ;;(=)
  90.     (define-key global-map [f25] "/")                ;;(/)
  91.     (define-key global-map [f26] "*")                ;;(*)
  92.     (define-key global-map [f27] 'beginning-of-line)        ;;Home
  93.     (define-key global-map 'up 'previous-line)            ;;Up arrow
  94.     (define-key global-map [f29] 'scroll-down)            ;;PgUp
  95.     (define-key global-map 'left 'backward-char)        ;;left arrow
  96.     (define-key global-map [f31] 'recenter)            ;;middle
  97.     (define-key global-map 'right 'forward-char)        ;;right arrow
  98.     (define-key global-map [r13] 'end-of-line)            ;;End
  99.     (define-key global-map 'down 'next-line)            ;;down arrow
  100.     (define-key global-map [f35] 'scroll-up)            ;;PgDn
  101.     (define-key global-map '(shift left) 'backward-word)    ;;S-Left
  102.     (define-key global-map '(shift right) 'forward-word)    ;;S-Right
  103.     (define-key global-map '(shift up) 'backward-paragraph)    ;;S-Up arrow
  104.     (define-key global-map '(control left) 'backward-sentence)    ;;C-Left
  105.     (define-key global-map '(control right) 'forward-sentence)    ;;C-Right
  106.     (define-key global-map '(shift down) 'forward-paragraph)    ;;S-down arrow
  107.     (define-key global-map 'insert 'overwrite-mode)        ;;Insert
  108.     (define-key global-map '(control f27) 'beginning-of-buffer)    ;;C-Home
  109.     (define-key global-map '(control r13) 'end-of-buffer)    ;;C-End
  110.     (define-key global-map '(shift f19) 'isearch-backward)    ;;S-Find
  111.     (define-key global-map '(shift f16) ())            ;;S-Copy
  112.     (define-key global-map '(shift f18) 'yank-rectangle)    ;;S-Paste
  113.     (define-key global-map '(shift f20) 'kill-rectangle)    ;;S-Cut
  114.     (define-key global-map 'button2 'mouse-track-adjust)    ;;mid mouse
  115.  
  116.     (define-key global-map 'button3 'mouse-find-file)
  117.  
  118.     (defun extract-file-name-around-point ()
  119.       (save-excursion
  120.         (skip-chars-backward "!#-%*-9=?-{}~")
  121.         (let ((start (point)))
  122.           (skip-chars-forward "!#-%*-9=?-{}~")
  123.           (let* ((filename (buffer-substring start (point)))
  124.                  (last-char (aref filename (- (length filename) 1))))
  125.             (if (memq last-char '(?* ?@ ?. ?,))
  126.                 (substring filename 0 -1)
  127.               filename)))))
  128.  
  129.     (defun mouse-find-file () (interactive)
  130.       (mouse-set-point last-command-event)
  131.       (let ((filename (extract-file-name-around-point)))
  132.         (if (file-exists-p filename)
  133.             (switch-to-buffer (find-file-noselect filename))
  134.           (error "Cannot find file \"%s\"" filename))))
  135.  
  136.     (define-key minibuffer-local-map [f11] 'abort-recursive-edit) ;;Stop
  137.     (define-key isearch-mode-map [f19] 'isearch-repeat-forward)   ;;Find
  138.     (define-key isearch-mode-map '(shift f19) 'isearch-repeat-backward) ;;Find
  139.  
  140.     ))
  141.  
  142. (add-hook 'window-setup-hook 'setup-sparc-function-keys)
  143. (setup-sparc-function-keys)
  144.  
  145. (setq home-dir (getenv "HOME"))
  146.  
  147. (global-set-key 'backspace        'backward-delete-char-untabify)
  148. (global-set-key '(shift backspace)    'delete-char)
  149. (global-set-key 'delete            'delete-char)
  150.  
  151. ; Map esc-BS to be backward-delete-word, since I expect that backward-delete-
  152. ; char(-untabify), which is bound to BS now, to equate to backward-kill-word
  153. ; mapping to esc-BS.
  154.  
  155. (define-key esc-map 'backspace 'backward-kill-word)
  156. (define-key esc-map 'delete    'kill-word)
  157.  
  158. ; The following commands are needed so that changes to the global map to
  159. ; redefine DEL don't get overridden locally.
  160.  
  161. ; Now reset the backspace to do what DEL used to do
  162.  
  163. (define-key lisp-interaction-mode-map 'backspace 'backward-delete-char-untabify)
  164. (define-key emacs-lisp-mode-map       'backspace 'backward-delete-char-untabify)
  165. (define-key c-mode-map                'backspace 'backward-delete-char-untabify)
  166. (define-key isearch-mode-map          'backspace 'isearch-delete-char)
  167.  
  168. (define-key lisp-interaction-mode-map 'delete    'delete-char)
  169. (define-key emacs-lisp-mode-map       'delete    'delete-char)
  170. (define-key c-mode-map                'delete    'delete-char)
  171. (setq search-delete-char ?\b)
  172.  
  173. ; define mail prefix
  174. (setq mail-yank-prefix ">")
  175.  
  176. ; Set tab stops every 3 columns
  177. (setq-default tab-stop-list
  178.   '(3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72
  179.     75 78 81 84 87 90))
  180.  
  181. (setq-default tab-width 8)
  182.  
  183. (defconst phonemail-menubar
  184.   ;; this menubar modified from default-menubar in menubar.el
  185.  
  186.   '(("File "
  187.     ["Open File..."            find-file            t]
  188.     ["Open File Read Only..."     find-file-read-only        t]
  189.     ["Open Alternate File..."    find-alternate-file        t]
  190.     ["Open Directory..."        dired                t]
  191.     "-----"
  192.     ["Save Buffer"            save-buffer            t]
  193.     ["Save Buffer As..."        write-file            t]
  194.     "-----"
  195.     ["Revert Buffer"        revert-buffer            t]
  196.     ["Insert File..."        insert-file            t]
  197.     ["Insert Buffer..."        insert-buffer            t]
  198.     ["Print Buffer"            lpr-buffer            t]
  199.     "-----"
  200.     ["Kill Buffer..."        kill-buffer            t]
  201.     ["Terminate Process..."        server-edit            t]
  202.     ["Change Active Buffer..."    switch-to-buffer        t]
  203.     ["Split Buffer"            split-window-vertically        t]
  204.     ["One Buffer"            delete-other-windows        t]
  205.     "-----"
  206.     ["New Screen"            x-new-screen            t]
  207.     ["Delete Screen"        delete-screen            t]
  208.     "-----"
  209.     ["Close Emacs"            iconify-emacs            t]
  210.     ["Exit Emacs"            save-buffers-kill-emacs        t]
  211.      )
  212.  
  213.     ("Location "
  214.         ["Page Up"            scroll-down            t]
  215.     ["Page Down"            scroll-up            t]
  216.     ["Top Of Buffer"        beginning-of-buffer        t]
  217.     ["End Of Buffer"        end-of-buffer            t]
  218.     ["Cursor to Center"        recenter            t]
  219.     ["Goto Line"            goto-line            t]
  220.     ["Save Current Position..."    point-to-register        t]
  221.     ["Goto Saved Position..."    register-to-point        t]
  222.     ["Scroll Left"            scroll-left            t]
  223.     ["Scroll Right"            scroll-right            t]
  224.     ["Scroll Other Window"        scroll-other-window        t]
  225.      )
  226.  
  227.     ("Edit "
  228.     ["Undo"                advertised-undo            t]
  229.     ["Cut"                x-kill-primary-selection    t]
  230.     ["Copy"                x-copy-primary-selection    t]
  231.     ["Paste"            x-yank-clipboard-selection    t]
  232.     ["Clear"            x-delete-primary-selection    t]
  233.     ["Toggle Insert"        overwrite-mode            t]
  234.  
  235.     ("Columns... "
  236.        ["Cut Rectangle"        kill-rectangle            t]
  237.        ["Insert Rectangle"        yank-rectangle            t]
  238.        ["Create Rectangle"        open-rectangle            t]
  239.        ["Blank Rectangle"        clear-rectangle            t]
  240.      )
  241.  
  242.     ("Fill... "
  243.        ["Fill Paragraph"        fill-paragraph            t]
  244.        ["Fill Region"        fill-region            t]
  245.        ["Set Fill Column"        set-fill-column             t]
  246.        ["Set Fill Prefix"        set-fill-prefix             t]
  247.      )
  248.  
  249.     ("Spell Check... "
  250.        ["Word"            ispell-word            t]
  251.        ["Region"            ispell-region            t]
  252.        ["Buffer"            ispell-buffer            t]
  253.      )
  254.  
  255.     ("Picture Mode... "
  256.        ["Start Picture Mode"    picture-mode            t]
  257.        ["End Picture Mode"        picture-mode-exit        t]
  258.      )
  259.       )
  260.  
  261.     ("Find "
  262.     ["Incr. Search Fwd"        isearch-forward            t]
  263.     ["Incr. Search Fwd Regexp"    isearch-forward-regexp        t]
  264.     ["Incr. Search Back"        isearch-backward        t]
  265.     ["Incr. Search Back Regexp"    isearch-backward-regexp        t]
  266.     ["Repeat Search Fwd"        isearch-repeat-forward         t]
  267.     ["Repeat Search Back"        isearch-repeat-backward        t]
  268.     ["Global Replace String"    replace-string            t]
  269.     ["Query Replace String"        query-replace            t]
  270.     ["Global Replace RegExp"    replace-regexp            t]
  271.     ["Query Replace RegExp"        query-replace-regexp        t]
  272.     )
  273.  
  274.     ("Buffers"    "")
  275.  
  276.     nil        ; the partition: menus after this are flushright
  277.  
  278.     (" Goodies "
  279.     ["Compare Windows"        compare-windows            t]
  280.     ("News... "
  281.        ["Gnus"            gnus                t]
  282.        ["Rnews"            rnews                t]
  283.      )
  284.      )
  285.  
  286.     ("Help "
  287.     ["Info"                info                t]
  288.     ["Describe Mode"        describe-mode            t]
  289.     ["Command Apropos..."        command-apropos            t]
  290.     ["List Keybindings"        describe-bindings        t]
  291.     ["Describe Key..."        describe-key            t]
  292.     ["Describe Function..."        describe-function        t]
  293.     ["Describe Variable..."        describe-variable        t]
  294.     "-----"
  295.     ["Unix Manual..."        manual-entry            t]
  296.     ["Emacs Tutorial"        help-with-tutorial        t]
  297.     ["Emacs News"            view-emacs-news            t]
  298.      )
  299.     )
  300. )
  301.  
  302. (set-menubar phonemail-menubar)
  303.  
  304. (load-library "ispell")
  305.  
  306. (load-library "server")
  307.  
  308. (load-library "dos-mode")
  309.  
  310. (load-library "blink-paren")
  311.  
  312. (load-library "pending-del")
  313.  
  314. (require 'dired)
  315.  
  316. (load-library "dired-lucid")
  317.  
  318. (add-hook 'dired-load-hook
  319.       (function
  320.        (lambda ()
  321.          (require 'dired-lucid)
  322.          (require 'ange-ftp)))) ; After mouse hacks...
  323.  
  324. (require 'crypt++)
  325.  
  326. (autoload 'tar-mode "tar-mode")
  327.  
  328. -----------------------  End site-init.el  ----------------------
  329.  
  330.