|
(defconst running-gnu-emacs t)
(defconst running-xemacs nil)
(defconst windozep (equal window-system 'w32))
(require 'cl)
(random t)
(if (locate-library "popup-menu")
(progn
(menu-bar-mode -1)
(if window-system
(progn
(require 'popup-menu)
(global-set-key [S-down-mouse-3] 'my-x-popup-menu))))
(menu-bar-mode (if window-system 1 -1)))
(setq visible-bell t) (column-number-mode 1) (setq display-time-string-forms '(day "/" month "/" (substring year -2)
" [FR " 24-hours ":" minutes "]"
"[CND " (number-to-string
(let ((h (- (string-to-number 24-hours) 6)))
(if (wholenump h)
h
(- 12 h))))
":" minutes "]"
(if mail " Mail" "")))
(display-time) (pc-selection-mode) (fset 'yes-or-no-p 'y-or-n-p)
(if window-system
(progn
(set-background-color "darkslategray")
(set-foreground-color "wheat")))
(if window-system
(progn
(setq font-lock-maximum-decoration t)
(defvar info-font-lock-keywords
(list
'("^\\* [^:]+:+" . font-lock-function-name-face)
'("\\*[Nn]ote\\b[^:]+:+" . font-lock-reference-face)
'(" \\(Next\\|Prev\\|Up\\):" . font-lock-reference-face))
"Additional expressions to highlight in Info mode.")
(add-hook 'Info-mode-hook
(lambda ()
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(info-font-lock-keywords nil t))))
(add-hook 'after-init-hook
(global-font-lock-mode t))))
(auto-compression-mode 1) (if windozep (setq archive-zip-extract '("c:/progra~1/pkzip/pkzip" "-extract")))
(if window-system
(setq frame-title-format (list "GNU Emacs " emacs-version " running on " (getenv "HOSTNAME"))
icon-title-format "Emacs"))
(if window-system
(progn
(defconst *default-font*
(if windozep
"-*-Fixedsys-normal-r-*-*-12-90-96-96-c-*-iso8859-1" "-adobe-courier-bold-*-*-*-20-*-*-*-*-*-*-*")) (defun reset-font-to-default ()
"Reset the font to the default, as defined in *default-font*"
(interactive)
(set-default-font *default-font*))
(reset-font-to-default)))
(defun turn-to-unix ()
(interactive)
(set-buffer-file-coding-system 'iso-8859-1-unix))
(global-set-key [delete] `backward-delete-char)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(global-set-key "\C-a" 'select-all)
(global-set-key "\C-c\C-o" 'comment-region)
(global-set-key [f1] 'describe-function)
(global-set-key [M-f1] 'describe-variable)
(global-set-key [f2] 'eval-buffer)
(global-set-key [f3] 'bookmark-jump)
(global-set-key [f4] 'fontify-buffer-with-mode-change)
(global-set-key [f5] 'undo)
(global-set-key [M-f5] 'turn-to-unix)
(global-set-key [f6] 'call-last-kbd-macro)
(global-set-key [f7] 'dired-at-point)
(global-set-key [f8] 'browse-url-at-point)
(global-set-key [f9] 'run-scheme)
(global-set-key [f10] 'insert-time)
(global-set-key [f11] 'gnus)
(global-set-key [f12] 'mail-to-address-at-point)
(global-set-key [C-M-f12] 'zone)
(global-set-key [S-M-f12] 'dissociated-press)
(global-set-key "\C-x\C-c" 'no-way)
(global-set-key "\M-z" 'call-last-kbd-macro)
(global-set-key "\C-xF" 'find-remote-file)
(ignore-errors (load-library "mlsetup"))
(defun no-way ()
(interactive)
(message "NO, I'm sticking here! To kill emacs for real, use \'M-x kill-emacs\'."))
(defun kill-all-newlines-from-buffer ()
(interactive)
(goto-char (point-min))
(while (re-search-forward "^[ \t]*$")
(beginning-of-line)
(kill-line)))
(if windozep
(setq siod-location "c:/progra~1/siod/siod.exe"
siod-args " -ic:/progra~1/siod/r4rs.scm"
scheme-program-name (concat siod-location siod-args)
siod-help-file "c:/progra~1/siod/siod-help.txt"
scheme-mit-dialect nil)
(setq siod-location "/usr/local/bin/siod"
siod-args " -i/usr/local/lib/siod/r4rs.scm"
scheme-program-name (concat siod-location siod-args)
siod-help-file "/usr/share/siod/siod-help.txt"
scheme-mit-dialect nil))
(autoload 'siod-help "siod-help" "siod-help" t)
(add-hook 'scheme-mode-hook
'(lambda ()
(define-key scheme-mode-map [f1] 'siod-help)))
(add-hook 'scheme-mode-hook
'(lambda ()
(define-key scheme-mode-map [f2] 'find-tag)))
(add-hook 'inferior-scheme-mode-hook
'(lambda ()
(define-key inferior-scheme-mode-map [f1] 'siod-help)))
(add-hook 'scheme-mode-hook
'(lambda () (imenu-add-to-menubar "Browser")))
(defun siod-header ()
(interactive)
(insert "#!/usr/local/bin/siod -v0,-m3 -*- Scheme -*-"))
(setq tags-file-name "/usr/local/lib/siod/TAGS")
(defvar remote-servers
'(("cam" "ftp.cam.org" "yesod" "/home/yesod")
("oeil" "ftp.oeil.qc.ca" "yesod" "/home/yesod")
("mercere" "ftp.oeil.qc.ca" "yesod" "/home/mercere")
("trisome" "trisome.com" "trisome" "/home/trisome")
("nextron" "easysite.oda.fr" "jphil" "/data/oda/hdoc")
("easysite" "easysite.oda.fr" "jphil" "/opt/home/jphil")
("mnex01" "mnex01.oda.fr" "jphil" "/opt/home/jphil")))
(defun find-remote-file (name)
(interactive (list (completing-read "Profile : " remote-servers)))
(let ((server (assoc name remote-servers)))
(if server
(find-file (concat "/" (caddr server) "@" (cadr server) ":" (cadddr server)))
(message (concat name " not found")))))
(defun select-all ()
(interactive)
(set-mark (point-min))
(goto-char (point-max)))
(defun dilbert ()
(interactive)
(load-library "getcomics")
(if windozep
(setq comics-viewer "C:/Program Files/Netscape/Communicator/Program/netscape.exe"))
(get-comic "dilbert"))
(if (ignore-errors (require 'backups))
(progn
(move-backups t)
(setq backup-directory "~/backup")))
(ignore-errors (require 'dired-external))
(defun ascii-table ()
"Print the ascii table - based on a defun by Alex Schroeder <asc@bsiag.com>"
(interactive)
(switch-to-buffer "*ASCII*")
(erase-buffer)
(insert (format "ASCII characters up to number %d.\n" 254))
(let ((i 0))
(while (< i 254)
(setq i (+ i 1))
(insert (format "%4d %c\n" i i))))
(beginning-of-buffer))
(let ((abbrevf "~/.abbrev"))
(if (file-exists-p abbrevf)
(progn
(setq-default abbrev-mode t)
(read-abbrev-file abbrevf)
(setq save-abbrevs t))))
(defconst remote-file-regexp "^/[^/:]*:"
"Regexp to match for remote filename.")
(defun is-remote-file (filename)
"Return t if FILENAME is a valid remote file name for ange-ftp."
(cond ((and filename
(string-match remote-file-regexp filename)) t)))
(defun is-ange-ftp ()
(interactive)
(if (is-remote-file (buffer-file-name))
(message "File is remote")
(message "File is local")))
(defconst email-regexp "[-a-zA-Z]+@[-a-zA-Z]+\.[-.a-zA-Z]+"
"Simple regexp to match email address.")
(defun mail-to-address-at-point ()
"*Edit a new mail message to the address at point."
(interactive)
(let ((url-at-point (substring (thing-at-point 'url) 7)))
(if (string-match email-regexp url-at-point)
(mail nil url-at-point)
(message "Bad email address"))))
(defun open-new-line (arg)
(interactive "*p")
(save-excursion
(forward-line)
(newline arg)))
(global-set-key "\M-'" 'open-new-line)
(defun insert-time ()
(interactive)
(insert (format-time-string "%d/%m/%Y")))
(if windozep
(progn
(setq telnet-program "c:/progra~1/telnet/telnet.exe")
(require 'telnet)
(require 'win-telnet)))
(if (locate-library "recentf")
(progn
(require 'recentf)
(setq recentf-max-menu-items 21)
(setq recentf-exclude '("^c:/tmp"))))
(autoload 'zone "zone" nil t)
(autoload 'turn-on-eldoc-mode "eldoc" nil t)
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
(autoload 'babel "babel" nil t)
(if windozep
(progn
(require 'gnuserv)
(gnuserv-start)
(setq gnuserv-frame (selected-frame))))
(if (ignore-errors (require 'protbuf))
(protect-buffer-from-kill-mode 1 "*scratch*"))
(cd (getenv "HOME"))
(setq user-full-name "J-P Theberge"
user-mail-address "jphil@act.oda.fr")
(require 'tnt)
(if (not (boundp 'tnt-is-alive))
(progn
(tnt-open "tris00me" "triso21")
(setq tnt-is-alive t)))
(setq mark-holidays-in-calendar t
calendar-holiday-marker 'diary-face)
|
|
|
All content copyright by the contributors. |
Website maintained with
Emacs ,
wsmake and
html-helper-mode |
Emacs community logo by Daniel Lundin |
Last updated on Sat Jan 22 14:49:24 2005
by Ingo Koch |
|
|
|
|