Download
(setenv "LANG" "C")
(message "setting require-final-newline to 't...")
(setq-default require-final-newline t)
(message "done.")
(setq-default indent-tabs-mode nil)
(defun mstorti()
(interactive)
(or
(and (boundp 'mstorti-flag) mstorti-flag)
(string= (user-real-login-name) "mstorti")))
(defun root()
(interactive)
(string= (user-real-login-name) "root"))
(defun spider()
(interactive)
(string= (getenv "HOSTNAME") "spider"))
(defun host-itc()
(string= (getenv "HOSTNAME") "ITC-CC-02"))
(defun geronimo()
(interactive)
(string= (getenv "HOSTNAME") "node1.beowulf.gtm"))
(defun minerva()
(interactive)
(string= (getenv "HOSTNAME") "minerva"))
(defun aquiles()
(interactive)
(string= (getenv "HOSTNAME") "aquiles"))
(defun in-host(host)
(string= (getenv "HOSTNAME") host))
(abbrev-mode 1) (root)
(setq load-path
(let ((home (cond ((and
(or (spider) (host-itc) (aquiles) (in-host "prandtl"))
(mstorti))
(getenv "HOME"))
(t "/u/mstorti"))))
(append (list (concat home "/CONFIG") (concat home "/EMACS"))
load-path)))
(setq message-log-max 5000)
(setq compile-command "make -C $HOME/PETSC/petscfem/")
(defalias 'single-quote-balanced (read-kbd-macro
" C-q ` ESC C-s [ SPC C-q TAB C-q LFD ] RET <left> ' "))
(defalias 'single-quote-balanced-pos2 (read-kbd-macro
(concat "<left> C-SPC ESC C-r [ SPC C-q LFD C-q "
"TAB ] RET <right> ` C-x C-x <right> '")))
(defun single-quote-balanced-pos3()
(interactive)
(save-excursion
(forward-word -1)
(insert "`")
(forward-word +1)
(insert "'")))
(defun single-quote-balanced-pos()
(interactive)
(let ((white-space-re "\\(\\s-\\|\n\\)")
(end-pos))
(save-excursion
(cond ((re-search-forward white-space-re nil t)
(forward-char -1))
(t (goto-char (point-max))))
(insert "'")
(setq end-pos (point))
(forward-char -1)
(cond ((re-search-backward white-space-re nil t)
(forward-char +1))
(t (goto-char (point-min))))
(insert "`"))
(goto-char end-pos)
(forward-char +1)))
(fset 'fix-list
[?\C- end ?\M-x ?u ?n ?t ?a ?b ?i ?f ?y return ?\M-x
?\M-p ?\M-p return ?\M-p ?\M-p ?\M-p ?\M-n ?\C-k ?[ ?^ ? ?] ?@ ?[ ?^ ? ?\\ ?n ?] return ?< ?\\ ?1 delete ?& ?> return])
(setq w3-default-homepage "http://minerva.unl.edu.ar/~mstorti/pack_send.cgi")
(setq url-automatic-caching t)
(setq w3-keep-old-buffers nil)
(setq next-line-add-newlines nil)
(defun my-diary ()
(interactive)
(local-set-key "\C-ck" 'diary-ok))
(setq enable-local-eval t)
(setq mouse-yank-at-point t)
(setq mh-new-draft-cleaned-headers "^Date:\\|^Received:\\|^Message-Id:\\|^Sender:\\|^Errors-To:\\|^Delivery-Date:\\|^Return-Path:")
(defun my-mhlmh()
(interactive)
(auto-fill-mode 1)
(abbrev-mode 1)
(setq comment-start "> ")
(setq version-control 'never)
(local-set-key "\C-cw" 'mh-snip)
(local-set-key (kbd "C-c C-a") 'mh-insert-alias)
(local-set-key "\C-c\C-s" 'mh-insert-signature)
)
(defun mh-snip()
(interactive)
(kill-region (min (point) (mark)) (max (point) (mark)))
(beginning-'of-line)
(insert ".\n................ < MANY LINES SNIPPED HERE > ...............\n.\n")
)
(defun space-snip()
(interactive)
(kill-region (min (point) (mark)) (max (point) (mark)))
(beginning-of-line)
(insert "> ................. < LINES SNIPPED HERE TO SAVE SPACE > ..............\n")
)
(add-hook 'text-mode-hook
'(lambda ()
(auto-fill-mode 1)
(local-set-key "\C-cP" 'spread)
(local-set-key (kbd "<f12>") 'crypt-rotate-buffer)))
(defun rh-80()
(or (string= (getenv "HOSTNAME") "spider")
(string= (getenv "HOSTNAME") "minerva")))
(setq dont-use-special-keys
(let ((env-val (getenv "DONT_USE_SPECIAL_KEYS")))
(cond ((not env-val) nil)
((string= env-val "0") nil)
(t t))))
(global-set-key (cond (dont-use-special-keys (kbd "C-c '"))
(t [?\C-'])) 'single-quote-balanced-pos)
(cond (dont-use-special-keys
(defun hyper-key(char)
(read-kbd-macro (concat "C-c ESC " char))))
((or (spider) (minerva) (in-host "prandtl"))
(defun hyper-key(char) (read-kbd-macro (concat "s-" char))))
((or (geronimo) (aquiles))
(defun hyper-key(char) (read-kbd-macro (concat "H-s-" char))))
(t
(defun hyper-key(char) (read-kbd-macro (concat "H-" char)))))
(require 'comint)
(setq comint-input-ring-size 256)
(defun my-comint-cd-saved-dir(s)
"In a shell, cd to last saved dir with `my-copy-current-dir'."
(interactive "P")
(comint-next-prompt 1)
(end-of-line)
(cond ((not s)
(comint-kill-input)
(insert "cd " last-current-dir))
(t
(insert last-current-dir))))
(defun history-copy-line()
"Copy current history line to shell command line"
(interactive)
(let ((line (substring (thing-at-point 'line) 7)))
(comint-next-prompt 1)
(end-of-line)
(comint-kill-input)
(comint-delete-output)
(insert line)
(delete-char -1)))
(add-hook 'shell-mode-hook
'(lambda ()
(local-set-key "\C-cs" 'send-invisible)
(local-set-key (hyper-key "p")
'comint-previous-matching-input-from-input)
(local-set-key "\C-cc" 'comint-truncate-buffer)
(local-set-key (hyper-key "r") 'rotate-dir-stack)
(local-set-key (hyper-key "b") 'rotate-dir-stack-back)
(local-set-key (read-kbd-macro "C-c t") 'my-comint-cd-saved-dir)
(local-set-key (read-kbd-macro "C-c f") 'history-copy-line)
(local-set-key (kbd "C-c r") 'rename-uniquely-with-prefix)
(setq comint-prompt-regexp
"^\\((gdb) \\|[^#$%>\n]*[#$%>] *\\)")))
(add-hook 'mh-letter-mode-hook 'my-mhlmh)
(setq mh-inc-folder-hook '((lambda ())))
(add-hook 'fortran-mode-hook '(lambda ()
(abbrev-mode 1)
(set-variable 'comment-start "c-> ")
))
(make-local-variable 'outline-regexp)
(add-hook 'outline-mode-hook '(lambda () (hide-sublevels 1)))
(standard-display-european 1)
(setq dired-listing-switches
(cond ((host-itc) "-l")
(t "-lh")))
(setq find-ls-option '("-exec ls -lhd {} \\;" . "-lhd"))
(setq delete-old-versions t)
(setq last-current-dir "~/")
(setq last-current-file diary-file)
(defun my-copy-current-dir2 ()
"Copies default directory of current buffer to
global variable \"last-current-dir\""
(interactive)
(setq last-current-dir (cond ((buffer-file-name) buffer-file-name)
(t default-directory)))
(message (concat "Path: \"" last-current-dir "\" yanked.")))
(defun my-copy-current-dir ()
"Copies default directory of current buffer to
global variable \"last-current-dir\""
(interactive)
(setq last-current-dir default-directory)
(message (concat "Path: \"" last-current-dir "\" yanked."))
(cond (buffer-file-name
(setq last-current-file buffer-file-name))))
(global-set-key (hyper-key "c") 'my-copy-current-dir)
(defun my-yank-current-dir (arg)
"Yanks \"last-current-dir\" in this position"
(interactive "P")
(insert (cond (arg last-current-file)
(t last-current-dir))))
(global-set-key (hyper-key "g") 'my-yank-current-dir)
(setq mail-self-blind t)
(setq rmail-file-name "~/CORREO/RMAIL")
(setq rmail-delete-after-output t)
(defun rmail()
(interactive)
(message "Tenes que usar mh-rmail"))
(global-set-key "\C-xm" 'gnus-group-mail)
(defun fiddle-quoted-printable ()
(interactive)
(require 'mh-comp)
(if (or (string-equal (mh-get-header-field "content-transfer-encoding:")
"quoted-printable")
(string-equal (mh-get-header-field "content-transfer-encoding:")
"QUOTED-PRINTABLE"))
(let ((modified (buffer-modified-p)))
(progn
(or (fboundp 'hexl-hex-string-to-integer)
(load "hexl")
)
(mh-goto-header-end 1)
(while (re-search-forward "=\\([0-9a-fA-F][0-9a-fA-F]\\)" nil t)
(replace-match (char-to-string
(hexl-hex-string-to-integer
(buffer-substring
(match-beginning 1) (match-end 1))))))
(goto-char (point-min-marker))
(mh-goto-header-end 1)
(while (re-search-forward "=$" nil t)
(forward-char -1)
(delete-char 2)
)
(set-buffer-modified-p modified))))
(mh-goto-header-field "Date:")
(recenter 0)
)
(add-hook 'mh-show-mode-hook 'fiddle-quoted-printable)
(provide 'mh-qp)
(fset 're-send
"\C-a\C-k\C-k\C-k\C-k\C-k\C-k\C-[OB\C-k\C-k\C-k\C-k\C-k\C-k\C-@\C-[OB\C-[
OB\C-w\C-[OA\C-y\C-[<")
(defun mail-line-comment()
(interactive)
(beginning-of-line)
(let ((beg (point)))
(forward-line 1)
(copy-region-as-kill beg (point))
(other-window 1)
(insert "> ")
(yank))
(other-window 1)
)
(global-set-key "\C-t" 'mail-line-comment)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(global-set-key "\C-x " 'set-mark-command)
(global-set-key [kp-f8] 'call-last-kbd-macro)
(global-set-key [f8] 'call-last-kbd-macro)
(global-set-key [kp-f1] 'overwrite-mode)
(global-set-key [f1] 'overwrite-mode)
(global-set-key "\C-xvo" 'fortran-split-line)
(global-set-key "\C-xvw" 'overwrite-mode)
(global-set-key "\M-k" 'delete-backward-char)
(global-set-key (hyper-key "q") 'query-replace-identifier)
(global-set-key "\C-cC" 'comment-region)
(global-set-key "\C-cb" 'bury-buffer)
(defun rename-uniquely-aux(&optional arg)
(interactive "P")
(cond (arg (rename-uniquely-with-prefix))
(t (toggle-read-only))))
(global-set-key "\C-cr" 'rename-uniquely-aux)
(setq fortran-continuation-string "*")
(setq version-control t)
(setq kept-old-versions 0)
(setq kept-new-versions 5)
(line-number-mode 10000)
(display-time)
(cond ((mstorti)
(read-abbrev-file "~/.abbrev_defs" t)))
(setq current-pos-regexp "^ *[^ ][^ ][^ ] Current line ===========")
(defun goto-current-pos()
(interactive)
(forward-line 1)
(beginning-of-line)
(goto-char (+ (point) 1))
(if (not (re-search-forward current-pos-regexp
(point-max-marker) t))
(progn
(goto-char (point-min-marker))
(re-search-forward current-pos-regexp
(point-max-marker) t)))
(recenter -1)
(forward-line -1)
(beginning-of-line))
(global-set-key (hyper-key "o") 'goto-current-pos)
(cond ((mstorti) (add-hook 'diary-hook 'appt-make-list)
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'list-diary-entries-hook 'sort-diary-entries)
(setq diary-file "~/CONFIG/diary")
(setq view-diary-entries-initially 1)
(setq today-visible-calendar-hook 'calendar-star-date)))
(load-library "arholidays.el")
(global-set-key ";" 'self-insert-command)
(add-hook 'latex-mode-hook 'my-tex-mode-hook)
(make-local-variable 'latex-occur-section-regexp)
(defun latex-occur-section()
(interactive)
(occur latex-occur-section-regexp)
(other-window 1)
(end-of-buffer))
(defun my-tex-mode-hook()
(interactive)
(abbrev-mode 1)
(setq comment-start "%")
(make-local-variable 'comment-start)
(setq comment-string "%%")
(local-set-key (hyper-key "o") 'goto-current-pos)
(local-set-key "\C-c\C-n" 'tex-search-next-section)
(local-set-key "\C-ci" 'tex-acute-i)
(local-set-key "\C-co" 'latex-occur-section)
(local-set-key "\C-c\C-b" 'tex-bibtex-file)
(local-set-key "\C-cf" 'flyspell-mode)
(setq indent-tabs-mode nil)
(local-set-key (hyper-key "i") 'make-index-entry)
(local-set-key (hyper-key "v") 'make-index-entry-from-variable)
(setq tex-command "make_latex")
(setq local-abbrev-table latex-mode-abbrev-table)
(setq latex-occur-section-regexp
"^\\\\\\(chapter\\|section\\|subsection\\|subsubsection\\|paragraph\\)")
)
(setq tex-run-command "bash ~/bin/mtex *")
(setq tex-dvi-print-command "~/bin/mydvips *")
(setq tex-dvi-view-command
"xdvi -density 5 -s 3 -expert -sidemargin 4cm \
-topmargin 0.5cm -copy -nopostscript -geometry 829x741 *")
(setq tex-alt-dvi-print-command
'(format "%s" (read-string "Use printer: " "~/bin/mydvips -o -c 1")))
(make-variable-buffer-local 'tex-main-file)
(load-library "my-octave.el")
(load-library "specchar.el")
(load-library "msutils.el")
(defun copy-char-from-last-dabbrev()
(interactive)
(exchange-point-and-mark)
(let ((beg (point)))
(forward-char 1)
(copy-region-as-kill beg (point))
)
(let ((beg (point)))
(exchange-point-and-mark)
(yank)
(exchange-point-and-mark)
(goto-char beg)
)
(exchange-point-and-mark))
(defun dired-flag-backup-files-for-delete (&optional unflag-p)
"Flag all backup files (names ending with `~') for deletion.
With prefix argument, unflag these files."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\040 ?*)))
(dired-mark-if
(and (save-excursion (end-of-line)
(or
(eq (preceding-char) ?~)
(if (eq (preceding-char) ?*)
(progn
(forward-char -1)
(eq (preceding-char) ?~)))))
(not (looking-at dired-re-dir))
(let ((fn (dired-get-filename t t)))
(if fn (backup-file-name-p fn))))
"backup file")))
(add-hook 'dired-mode-hook '(lambda ()
(local-set-key [?~] 'dired-flag-backup-files-for-delete)))
(add-hook 'dired-mode-hook 'turn-on-font-lock)
(setq auto-mode-alist (cons '("\\.mail$" . message-mode) auto-mode-alist))
(defun approve()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "approve"))
(defun sacar-basura()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "sed -f ~/CORREO/toascii.sed"))
(cond ((not (geronimo))
(setq auto-mode-alist
(cons '("\\.pl$" . perl-mode) auto-mode-alist))))
(add-to-list 'vc-handled-backends 'GIT)
(autoload 'sc-cite-original "supercite" "Supercite 3.1" t)
(autoload 'sc-submit-bug-report "supercite" "Supercite 3.1" t)
(add-hook 'mail-citation-hook 'sc-cite-original)
(setq sc-preferred-header-style 2)
(setq sc-citation-leader "")
(setq sc-nested-citation-p t)
(setq sc-auto-fill-region-p nil)
(defun sc-my-header-on-said ()
"\"On <date>, <from> said:\" unless:
1. the \"from\" field cannot be found, in which case nothing is inserted;
2. the \"date\" field is missing in which case only the from part is printed."
(let ((sc-mumble "")
(whofrom (sc-whofrom)))
(if whofrom
(insert sc-reference-tag-string
(sc-hdr "On " (sc-mail-field "date") ", \n")
sc-reference-tag-string
" " whofrom " said:\n"))))
(defun sc-header-on-said-spanish ()
"Same as \"sc-header-on-said\" but in spanish"
(let ((sc-mumble "")
(whofrom (sc-whofrom)))
(if whofrom
(insert sc-reference-tag-string
(sc-hdr "El dia " (sc-mail-field "date") ", ")
whofrom " escribio:\n"))))
(defun sc-header-who-date ()
"Simple header for Supercite"
(let ((sc-mumble "")
(whofrom (sc-whofrom)))
(if whofrom
(insert sc-reference-tag-string
(sc-mail-field "date") whofrom " \n"))))
(add-hook 'sc-load-hook
'(lambda () (setq sc-electric-references-p t)))
(add-hook 'sc-load-hook
'(lambda () (setq sc-rewrite-header-list
(cons '(sc-header-on-said-spanish) sc-rewrite-header-list))))
(add-hook 'sc-load-hook
'(lambda () (setq sc-rewrite-header-list
(cons '(sc-header-who-date) sc-rewrite-header-list))))
(add-hook 'sc-load-hook
'(lambda () (setq sc-rewrite-header-list
(cons '(sc-my-header-on-said) sc-rewrite-header-list))))
(setq kill-whole-line t)
(setq auto-mode-alist (cons '("\\.txt$" . text-mode) auto-mode-alist))
(autoload 'etalk "etalk" "Invocar etalk: Emacs version of talk" t)
(defun macro()
(interactive)
(find-file "~/ADMINISTRACION/macro")
(goto-current-pos)
(toggle-read-only 1)
(local-set-key "e" 'eval-macro))
(defun dia()
(interactive)
(find-file diary-file)
(goto-current-pos)
(recenter))
(global-set-key (hyper-key "d") 'dia)
(defun trunc()
(interactive)
(setq truncate-lines t))
(defun no-trunc()
(interactive)
(setq truncate-lines nil))
(defalias 'make-nanew (read-kbd-macro
"ESC C-s \\ .[A-z DEL Z][a-z] 2*<left> ESC d C-y C-a RET <up> [ \\
nanew(rf, C-y ,)] C-a"))
(defalias 'make-index-entry
(read-kbd-macro "M-w C-a RET <up> \\ index{ C-y }"))
(defalias 'make-index-entry-from-variable
(read-kbd-macro "M-w C-a RET <up> \\ index{ C-y @ \\ verb + C-y + }"))
(fset 'tex-comment-line
"%\C-[OB\C-a")
(defun fix-list()
(interactive)
(untabify (point-min-marker) (point-max-marker))
(goto-char (point-min-marker))
(replace-regexp "[^ ]*@[^ \n]*" "<\\&>" nil)
)
(defalias 'fix-list (read-kbd-macro
"C-x SPC ESC > M-x untabify RET M-x query-replace-regexp RET [^ SPC ]@[^ SPC \\n] RET <\\&> RET"))
(defun fill-paragraph-and-right-justify ()
(interactive)
(fill-paragraph 1))
(set-language-environment "Latin-1")
(setq ispell-program-name "aspell")
(require 'ispell)
(global-set-key "\C-\M-i" 'ispell-complete-word)
(setq ispell-dictionary-alist
(cons
'("espanol" "[A-ZÁÉÍÑÓÚÜa-záéíñóúü]" "[^A-ZÁÉÍÑÓÚÜa-záéíñóúü]" "[-]" nil
("-B" "-d" "es.multi")
"~tex" iso-8859-1)
ispell-dictionary-alist))
(global-set-key "\C-cQ" 'fill-paragraph-and-right-justify)
(defalias 'format-line-paragraph-macro
(read-kbd-macro
"C-SPC <down> C-x C-x M-\\ M-q C-x C-x"))
(defun format-line-paragraph()
(interactive)
(let ((mark0 (point-marker))
(mark1 nil)
(mark2 nil))
(beginning-of-line)
(forward-char 1)
(cond ((char-equal (char-after (point)) ?\ )
(just-one-space)))
(beginning-of-line)
(next-line 1)
(insert "\n")
(setq mark1 (point-marker))
(goto-char mark0)
(fill-paragraph t)
(goto-char mark1)
(forward-char -1)
(setq mark1 (point-marker))
(cond ((re-search-forward "[^ \t\n]")
(forward-char -1)
(setq mark2 (point-marker))
(delete-region mark1 mark2)
(goto-char mark2)
(insert "\n")))))
(global-set-key "\C-cF" 'format-line-paragraph)
(defun next-working-day(targedate)
(interactive)
(let ((adate (calendar-absolute-from-gregorian date))
(atargetdate (calendar-absolute-from-gregorian targetdate))
(dayname (calendar-day-of-week date))
)
(or (and (= adate atargetdate)
(memq dayname '(1 2 3 4 5))
)
(and (= adate (+ atargetdate 1))
(= dayname 1)
)
(and (= adate (+ atargetdate 2))
(= dayname 1)
)
)
))
(defalias 'bb 'bury-buffer)
(defun eval-macro()
(interactive)
(end-of-line)
(eval-last-sexp nil)
(bury-buffer))
(defun macro-mode()
(interactive)
(vc-toggle-read-only)
(local-set-key "e" 'eval-macro))
(defun scroll-up-by-line()
(interactive)
(scroll-up 1)
(next-line 1))
(defun scroll-down-by-line()
(interactive)
(scroll-up -1)
(next-line -1))
(defun scroll-by-lines()
(global-set-key "\C-v" 'scroll-up-by-line)
(global-set-key "\M-v" 'scroll-down-by-line))
(defun scroll-by-screens()
(global-set-key "\C-v" 'scroll-up)
(global-set-key "\M-v" 'scroll-down))
(defun named-vc-snapshot()
(interactive)
(shell-command "date +y%Ym%Md%d-h%Hm%Ms%S" 1))
(fset 'copf
"\C-s$\C-[OD\C-@\C-s\C-s\C-s\C-[w\C-xo\C-y")
(fset 'cope
"\C-s\\nanew\C-m\C-@\C-s)\C-m\C-[w\C-u\C-@\C-u\C-@\C-u\C-@\C-u\C-@(\\naold\C-y)")
(fset 'texf
"\C-r$$\C-@\C-s\C-s\C-s\C-m\C-c\C-r")
(autoload 'calc-dispatch "calc" "Calculator Options" t)
(autoload 'full-calc "calc" "Full-screen Calculator" t)
(autoload 'full-calc-keypad "calc" "Full-screen X Calculator" t)
(autoload 'calc-eval "calc" "Use Calculator from Lisp")
(autoload 'defmath "calc" nil t t)
(autoload 'calc "calc" "Calculator Mode" t)
(autoload 'quick-calc "calc" "Quick Calculator" t)
(autoload 'calc-keypad "calc" "X windows Calculator" t)
(autoload 'calc-embedded "calc" "Use Calc inside any buffer" t)
(autoload 'calc-embedded-activate "calc" "Activate =>'s in buffer" t)
(autoload 'calc-grab-region "calc" "Grab region of Calc data" t)
(autoload 'calc-grab-rectangle "calc" "Grab rectangle of data" t)
(setq load-path (append load-path (list "/x/usr/lib/calc-2.02d")))
(global-set-key "\e#" 'calc-dispatch)
(defun rebote()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "rebote.pl")
(rmail-delete-forward))
(defun my-rmail-mode-hook()
(interactive)
(local-set-key "R" 'rebote))
(add-hook 'rmail-mode-hook 'my-rmail-mode-hook)
(defalias 'put-nanew-ref (read-kbd-macro
"\\ eqno C-q ( \\ na(new, C-r \\ eqno( \\ na(new C-r RET C-s , RET NUL 3*C-s
<left> ESC w C-s ESC p RET <right> C-y ,)) SPC $$ C-r , RET"))
(defun m4ren()
(interactive)
(let
((current-line (count-lines 1 (point))))
(shell-command-on-region (point-min-marker)
(point-max-marker) "m4rene" 1)
(goto-line current-line)
))
(defun ren(arg)
(interactive "P")
(let
((current-line (count-lines 1 (point))))
(if arg
(shell-command-on-region (point-min-marker)
(point-max-marker) "rene.pl -c" 1)
(shell-command-on-region (point-min-marker)
(point-max-marker) "rene.pl " 1)
)
(goto-line current-line)
)
)
(defun Buffer-menu-switch-other-window ()
"Make the other window select this line's buffer.
The current window remains selected."
(interactive)
(display-buffer (Buffer-menu-buffer t))
(next-line 1))
(defun tab()
(interactive)
(beginning-of-line)
(insert "#.......10........20........30........40........50........60........70\n")
(insert "# | | | | | | | | | | | | | |\n")
)
(defun spdate()
(interactive)
(shell-command "spdate" 1))
(defun date()
(interactive)
(insert (format-time-string "%Y-%m-%d %H:%M:%S" (current-time))))
(defun date2()
(interactive)
(shell-command "date +\"%Y/%M/%d-%H:%M:%S\"" 1))
(defun udate()
(interactive)
(shell-command "date -u" 1))
(load-library "jka-compr.elc")
(cond ((rh-80) (auto-compression-mode)))
(transient-mark-mode 1)
(defalias 'fortran-insert-comment
(read-kbd-macro "C-a RET <up> c-- RET c RET c <up> TAB"))
(defun spread()
(interactive)
(let
((current-line (count-lines 1 (point))))
(shell-command-on-region (point-min-marker)
(point-max-marker) "prepro" 1)
(goto-line current-line)))
(defun newmes()
(interactive)
(shell-command "newmes.pl" 1)
)
(defun texsort()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "texsort" 1)
)
(defun toc()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "toc.pl" 1)
)
(defun nanew()
(interactive)
(shell-command-on-region (point-min-marker)
(point-max-marker) "perl ~/bin/nanew.pl" 1)
)
(set-variable 'shell-dirstack-query "dirs")
(defun tex-search-next-section()
(interactive)
(if (re-search-forward "\\\\TT*itle{"
(point-max-marker) t)
()
(goto-char (point-min-marker))
(re-search-forward "\\\\TT*itle{"
(point-max-marker) t)
)
(recenter 0)
)
(add-hook 'perl-mode-hook
(lambda ()
(abbrev-mode)
(hs-minor-mode 1)))
(server-start)
(add-hook 'mh-folder-mode-hook
'(lambda () (local-set-key "s" 'mh-sort-folder)))
(load-library "enclose.el")
(global-font-lock-mode t)
(fset 'cont-dyn-abbrev [? escape ?/])
(global-set-key "\C-cg" 'goto-line)
(add-hook 'comint-output-filter-functions
'comint-strip-ctrl-m)
(defun diary-ok()
(interactive)
(progn
(let ((start nil)
(end nil)
(chunk nil))
(beginning-of-line)
(while
(progn
(let ((line (thing-at-point 'line)))
(cond ((string= (substring line 0 6) " ")
(forward-line -1) t)
(t nil)))))
(setq start (point-marker))
(forward-line 1)
(while
(progn
(let ((line (thing-at-point 'line)))
(cond ((string-match "^ *\n$" line) nil)
((string= (substring line 0 6) " ")
(forward-line 1) t)
(t nil)))))
(setq end (point-marker))
(setq chunk (buffer-substring-no-properties start end))
(delete-region start end)
(forward-line -1)
(while
(progn
(let ((line (thing-at-point 'line)))
(cond ((string= (substring line 0 7) " OK ") nil)
((string= (substring line 0 4) " ")
(forward-line -1) t)
(t nil)))))
(forward-line 1)
(while
(progn
(let ((line (thing-at-point 'line)))
(cond ((< (length line) 6) nil)
((string= (substring line 0 6) " ")
(forward-line 1) t)
(t nil)))))
(insert " OK " (substring chunk 4))
(goto-char end))))
(defun calcme()
(interactive)
(comint-run "calcme")
(setq comint-prompt-regexp "> ")
)
(fset 'tex-acute-i "\\'\\i{}")
(defun mupad()
(interactive)
(comint-run "~/bin/mupad")
(setq comint-prompt-regexp ">> "))
(add-hook 'dired-load-hook
(function (lambda ()
(load "dired-x")
(setq dired-x-hands-off-my-keys nil)
(dired-x-bind-find-file))))
(defalias 'initialize-log
(read-kbd-macro
"<end> ESC C-r ^ === RET C-x C-x C-w <home> H-s-o <up> C-y"))
(add-hook 'find-file-hooks 'auto-insert)
(setq auto-insert-directory "~/EMACS/auto-insert/")
(load-library "autoinsert")
(setq dired-guess-shell-alist-user
(list (list "\\.tar.gz$" "tar -xzvf" "tar -cvf /dev/fd0")
(list "\\.tgz$" "tar -xzvf" "tar -cvf /dev/fd0")
(list "\\.gz$" "tar -cvf /dev/fd0")
(list "\\.obj$" "tgif * &" "tgif -print -ps *")
(list "^ls_lr\\.gz$" "zgrep -i" "tgif -print -ps *")
(list "\\.octave$" "reminf")
(list "\\.pdf$" "gv * &" "acroread * &" "xpdf * &")
(list "\\.ps$" "gv * &")
(list "\\.doc$" "~/OpenOffice.org1.0.1/soffice * &")
(list "\\.sxw$" "~/OpenOffice.org1.0.1/soffice * &")
(list "\\.gnumeric$" "gnumeric * &")))
(setq auto-insert-alist-system auto-insert-alist)
(setq auto-insert-alist-user
'(
(("\\.m\\'" . "Octave file")
nil
(if (string-equal (completing-read "Type: " '(("script")
("function")
)) "script")
'(concat "###key "
(file-name-nondirectory (buffer-file-name))
"\n### $I" "d: $\n\n\n")
'(concat "## usage: \nfunction [...]= "
(substring (file-name-nondirectory (buffer-file-name)) 0 -2)
" (...)\n\n"
" ## $I" "d: $\n\n"
"endfunction")
)
)
(("\\.tex\\'" . "TeX file")
.
(lambda () (insert-file-contents
(concat auto-insert-directory
(completing-read "Type [<TAB> to see options]: "
'(("generic")
("report")
("letter")
("memo")
("fax")
("latex")
)) ".tex")))
)
(("\\.h\\'" . "C / C++ header")
. (lambda ()
(let ((header-ident
(concat "PETSCFEM_"
(upcase (concat
(file-name-nondirectory
(substring buffer-file-name 0
(match-beginning 0)))
"_H")))))
(insert (concat "// -*- mode: c++ -*-\n"
"//__INSERT_LICENSE__\n"
"// $Id" "$\n"
"#ifndef " header-ident "\n"
"#define " header-ident "\n"
"\n\n\n#endif\n"
)))))
(("\\.\\([Cc]\\|cc\\|cpp\\)\\'" . "C / C++ program")
nil "//__INSERT_LICENSE__\n// $Id" "$\n")))
(setq auto-insert-alist
(append auto-insert-alist-user auto-insert-alist-system))
(defun locvar()
(interactive)
(insert "\; Local"
" Variables: *
\; mode:lisp *
\; comment-column:0 *
\; comment-start: \"\;\;\; \" *
\; End: *
"))
(add-hook 'makefile-mode-hook
'(lambda ()
(setq indent-tabs-mode t)
(abbrev-mode 1)))
(defun byte-compile-this-file ()
(write-region (point-min) (point-max) buffer-file-name nil 't)
(byte-compile-file buffer-file-name) nil
)
(defun wordnet1()
(interactive)
(shell-command (concat "/usr/local/wordnet1.6/bin/wn "
(buffer-substring
(+ (re-search-backward "[^a-zA-Z]") 1)
(+ (re-search-forward "[^a-zA-Z]"
(point-max-marker) t 2) -1))
" -over")))
(defun wordnet()
(interactive)
(shell-command (concat "/usr/local/wordnet1.6/bin/wn "
(thing-at-point 'word) " -over")))
(global-set-key "\C-cd" 'wordnet)
(global-set-key (hyper-key "f") 'font-lock-fontify-buffer)
(defalias 'mail-comment (read-kbd-macro
"C-a > SPC <down> C-a"))
(global-set-key [f9] 'mark-this-line)
(make-local-variable 'notes-version-file)
(setq-default notes-version-file nil)
(defun notes()
(interactive)
(find-file "~/CONFIG/notas.txt")
(goto-current-pos))
(defun chomp(s &optional add)
(let ((rslt nil)
(n (length s)))
(while (and (> n 0)
(= (elt s (- n 1)) ?\n))
(setq n (- n 1)))
(setq rslt (substring s 0 n))
(cond (add (concat rslt "\n"))
(t rslt))))
(defun notes-insert-date()
(interactive)
(insert (concat "%=== "
(current-time-string)
" "
(getenv "USER") "@" (getenv "HOSTNAME")
"\n"
))
(notes-insert-time))
(defun notes-insert-date-old()
(interactive)
(insert (concat "%=== "
(current-time-string)
" "
(getenv "USER") "@" (getenv "HOSTNAME")
" "))
(let ((notes-version-file-do
(lambda (file)
(forward-char (cadr (insert-file-contents file))))))
(cond ((and notes-version-file
(file-exists-p notes-version-file))
(funcall notes-version-file-do notes-version-file))
((file-exists-p "./VERSION")
(funcall notes-version-file-do "./VERSION"))))
(insert "\n")
(notes-insert-time))
(defun notes-insert-time()
(interactive)
(insert "%\n%-- "
(substring (current-time-string) 11 19)
" -- "
(chomp (shell-command-to-string "git describe"))
" -----\n"))
(global-set-key "\C-cc" 'compile)
(global-set-key "\C-ck" 'kill-compilation)
(setq compile-command "make -C $HOME/PETSC/petscfem/")
(setq auto-mode-alist (cons '("\\.cpp$" . c++-mode) auto-mode-alist))
(add-hook 'c++-mode-hook
(function (lambda ()
(hs-minor-mode 1)
(abbrev-mode 1)
(local-set-key "\C-ct" 'c++-insert-trace)
(local-set-key "\C-cc" 'compile)
(local-set-key [f10] 'fastmat2-print)
(set-fill-column 60)
(cond ((string-match "\.cppi$" (buffer-file-name))
(message "detected cppi file")
(font-lock-mode 0))))))
(setq font-lock-maximum-size '((t . 50000)))
(setq compile-command "make")
(defalias 'fastmat2-print-in-gud (read-kbd-macro
".print(\"\") RET"))
(add-hook 'gdb-mode-hook
'(lambda ()
(local-set-key [f10] 'fastmat2-print-in-gud)
)
)
(setq c-macro-preprocessor "bash ~/PETSC/petscfem/tools/pfcpp")
(global-set-key "%" 'match-paren)
(show-paren-mode)
(defun match-paren (arg)
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
(defun fastmat2-print()
(interactive)
(let ((ident (buffer-substring
(+ (re-search-backward "[^0-9a-zA-Z_]") 1)
(+ (re-search-forward
"[^0-9a-zA-Z_]" (point-max-marker) t 2) -1)
)))
(switch-to-buffer "*gud*")
(insert "p " ident ".print(\"\"),1")
(comint-send-input)
)
)
(defalias 'c++-insert-trace (read-kbd-macro
"C-a RET <up> TAB TRACE( , __FILE__ , __LINE__) ; <down> C-a"))
(setq identifier-syntax '("\\([^a-zA-Z_]\\)" . "\\([^a-zA-Z_0-9]\\)"))
(setq lisp-identifier-syntax '("\\(\\S_\\)" . "\\(\\S_\\)"))
(defun query-replace-identifier()
(interactive)
(query-replace-regexp
(concat (car identifier-syntax)
(read-from-minibuffer "replace identifier: ")
(cdr identifier-syntax))
(concat "\\1" (read-from-minibuffer "with: ")
"\\2")))
(add-hook 'pascal-mode-hook '(lambda () (abbrev-mode 1)))
(fset 'mark-this-line [?\C-a ?> ? down ?\C-a])
(setq shell-pushd-regexp "\\(ud\\|pushd\\)")
(setq shell-popd-regexp "\\(od\\|popd\\)")
(add-to-list 'auto-mode-alist '("\\.doc\\'" . no-word))
(defun no-word ()
"Run antiword on the entire buffer."
(shell-command-on-region (point-min) (point-max)
"antiword - " (get-buffer-create "*antiword*") t))
(setq my-face-foreground-color
(cond
(t "White")))
(setq other-host (not (or (spider) (minerva) (geronimo) (aquiles))))
(setq my-background-color "white")
(defun set-color(frame)
(cond ((x-display-list)
(select-frame frame)
(set-background-color my-background-color)
(set-face-background 'default my-background-color))))
(cond ((not (mstorti))
(setq my-background-color "papaya whip")))
(cond ((geronimo)
(setq my-background-color "#ffffff")))
(cond ((aquiles)
(setq my-background-color "#dfffdf")))
(cond ((and (aquiles) (root))
(setq my-background-color "#ffffdf")))
(cond ((in-host "prandtl")
(setq my-background-color "lavender")))
(cond (other-host
(setq my-background-color "#c0e0e0")))
(cond ((and (not (mstorti)) other-host)
(setq my-background-color "lavender")))
(cond (dont-use-special-keys
(setq my-background-color "white")))
(setq after-make-frame-functions (cons 'set-color nil))
(defun my-Info-other-buffer ()
"Open this info node in other buffer."
(interactive)
(rename-uniquely)
(Info-set-mode-line)
(let ((node (concat "(" Info-current-file ")" Info-current-node)))
(set-buffer (get-buffer-create "*info*"))
(Info-goto-node node)))
(add-hook 'Info-mode-hook
'(lambda ()
(local-set-key "\C-cn" 'my-Info-other-buffer)
(defun Info-set-mode-line ()
(setq mode-line-buffer-identification
(concat
" " (buffer-name) " ("
(if Info-current-file
(file-name-nondirectory Info-current-file)
"")
")"
(or Info-current-node ""))))))
(setq put-buffers-list '("adv" "str" "mmv"))
(defun read-string-vector(prompt)
(interactive)
(let ((arg-list nil)
(prefix "")
(aux (lambda ()
(setq prefix
(read-string
(cond ((zerop (length arg-list))
(format "%s > " prompt))
(t (format "%s (so far %s) > " prompt arg-list)))))
(cond ((> (length prefix) 0)
(setq arg-list (cons prefix arg-list))
(funcall aux))
(t
(reverse arg-list))))))
(funcall aux)))
(defun put-buffers(&optional args)
(interactive "P")
(cond (args (setq put-buffers-list (read-string-vector "Enter prefix"))))
(cond ((zerop (length put-buffers-list))
(error (format "prefix list is empty!! %s" put-buffers-list))))
(cond ((> (length put-buffers-list) 5)
(error (format "prefix list too long!! %s" put-buffers-list))))
(delete-other-windows)
(let ((nlines (- (/ (- (frame-height) 2) (length put-buffers-list)) 1)))
(mapcar
(lambda (prefix)
(let* ((buffer-name (format "*shell*<%s>" prefix))
(buffer (get-buffer buffer-name)))
(cond ((not buffer)
(message (format "making buffer %s" prefix))
(shell)
(rename-buffer buffer-name)))
(switch-to-buffer buffer-name)
(cond ((> (window-height) (+ nlines 4))
(split-window-vertically nlines)))
(comint-show-maximum-output)
(other-window 1)))
put-buffers-list)))
(global-set-key (hyper-key "a") 'put-buffers)
(cond ((not (or (spider) (minerva)))
(global-set-key [C-end] 'end-of-buffer)
(global-set-key [end] 'end-of-line)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [home] 'beginning-of-line)))
(load-library "my-skel.el")
(cond
(nil
(progn
(defvar hyperb:dir "/usr/share/emacs/site-lisp/hyperbole/"
"Directory where the Hyperbole executable code is kept.
It must end with a directory separator character.")
(load (expand-file-name "hversion" hyperb:dir))
(load (expand-file-name "hyperbole" hyperb:dir))
(require 'hsite))))
(load-library "emacs.el")
(defun yank-forw()
(interactive)
(yank-pop -1))
(global-set-key (hyper-key "y") 'yank-forw)
(add-hook 'perldb-mode-hook
'(lambda ()
(local-set-key (hyper-key "p")
'comint-previous-matching-input-from-input)))
(let ((petscfem-dir (getenv "PETSCFEM_DIR")))
(if petscfem-dir
(cond ((rh-80)
(load-file (concat petscfem-dir "/tools/petscfem.el"))
(load-file (concat petscfem-dir "/tools/petscfem-init.el")))
(t
(setq auto-mode-alist
(cons (cons "\\.\\(\\|d\\)epl$" 'shell-script-mode)
auto-mode-alist))))))
(autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t)
(autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme buffer." t)
(setq quack-fontify-threesemi-p
(cond ((x-display-list) t)
(t nil)))
(require 'quack)
(setq scheme-program-name "guile")
(setq quack-default-program "guile")
(setq quack-pltish-keywords-to-fontify
(append '("let-keywords") quack-pltish-keywords-to-fontify))
(setq guile-info-file "(/usr/local/info/guile.info)Procedure Index")
(defun info-goto-guile-proc-index()
(interactive)
(info guile-info-file))
(add-hook 'scheme-mode-hook
(lambda()
(hs-minor-mode 1)
(local-set-key (kbd "C-c C-q m")
'info-goto-guile-proc-index)
(setq comint-get-old-input
(quote comint-get-old-input-default))
))
(setq auto-mode-alist (cons '("\\.sp$" . spread-mode)
auto-mode-alist))
(autoload 'spread-mode "spread" "Simple Lisp spread-sheet" t)
(autoload 'progv "cl")
(defun host-part(host-name)
(let ((start (string-match "\\." host-name)))
(cond (start (substring host-name 0 start))
(t host-name))))
(setq frame-title-user-host (concat "[" (user-real-login-name) "@"
(host-part (getenv "HOSTNAME")) "]"))
(setq frame-title-format (list "%b" frame-title-user-host))
(setq icon-title-format frame-title-format)
(defun my-desktop-save()
(interactive)
(message "Saving desktop in ~")
(desktop-save "~"))
(add-hook 'buffer-menu-mode-hook
(lambda() (local-set-key "S" 'my-desktop-save)))
(defun my-notes-mode()
(interactive)
(local-set-key "\C-cD" (quote notes-insert-date))
(local-set-key "\C-ct" (quote notes-insert-time))
(setq paragraph-separate "[ \t\f%]*$")
(setq paragraph-start "[ \t\n\f%]") )
(defun diary-block-year(month day year)
(diary-block month day year month day (+ year 1)))
(defun diary-block-n(month day year n)
(let ((offset (- (calendar-absolute-from-gregorian date)
(calendar-absolute-from-gregorian (list month day year)))))
(and (>= offset 0) (< offset n))))
(setq mark-holidays-in-calendar t)
(setq calendar-holiday-marker 'holiday-face)
(setq mark-diary-entries-in-calendar t)
(setq diary-entry-marker ">")
(cond((minerva)
(load-file "/u/mstorti/CONFIG/mailutils.el")))
(setq inferior-lisp-program "clisp")
(defun load-desktop()
(interactive)
(load "desktop")
(desktop-load-default)
(desktop-read)
(setq desktop-globals-to-save
(cons 'compile-history desktop-globals-to-save)))
(setq smtpmail-default-smtp-server "intec.ceride.gov.ar"
smtpmail-local-domain "ceride.gov.ar")
(load-library "smtpmail")
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-auth-credentials
'(("intec.ceride.gov.ar" 25 "mstorti" "edqmqpGL")))
(autoload 'org-mode "org" "Org mode" t)
(autoload 'org-diary "org" "Diary entries from Org mode")
(autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
(autoload 'org-store-link "org" "Store a link to the current location" t)
(autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
(autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(add-hook 'org-mode-hook
(lambda ()
(local-set-key (kbd "<H-s-tab>") 'org-shifttab)))
(setq diff-switches "-u")
(setq vc-cvs-diff-switches diff-switches)
(autoload 'longlines-mode
"longlines.el"
"Minor mode for automatically wrapping long lines." t)
(setq longlines-show-hard-newlines t)
(autoload 'wikipedia-mode "wikipedia-mode.el"
"Major mode for editing documents in Wikipedia markup." t)
(add-to-list 'auto-mode-alist
'("\\.wiki\\'" . wikipedia-mode))
(require 'shell)
(setq aquiles-ssh-tunnel-process nil)
(setq aquilesnuevo-ssh-tunnel-process nil)
(setq proxy-host "200.9.237.240")
(setq proxy-host-ptlc "aquiles")
(defun start-ssh-tunnel()
(interactive)
(cond ((string= (getenv "PRANDTL_PROFILE") "casa")
(start-ssh-tunnel-host "minerva")
(start-ssh-tunnel-host "aquiles")
)
((string= (getenv "PRANDTL_PROFILE") "ptlc")
(start-ssh-tunnel-host "aquilesp")
(start-ssh-tunnel-host "minervap")))
)
(setq ssh-tunnel-conf-alist
`(("aquiles" "localhost" ,proxy-host 8022 nullproc)
("minerva" "minerva" ,proxy-host 8023 nullproc)
("spider" "192.168.0.2" "192.168.0.2" 8024 nullproc)
("minervap" "minerva" ,proxy-host-ptlc 8023 nullproc)
("aquilesp" "localhost" ,proxy-host-ptlc 8022 nullproc)
("venus" "venus" ,proxy-host 8024 nullproc)))
(defun start-ssh-tunnel-host(ident)
(let ((entry (assoc ident ssh-tunnel-conf-alist)))
(cond ((not entry)
(error "can't find entry for host %s" ident)))
(let* ((host (nth 1 entry))
(proxy (nth 2 entry))
(port (nth 3 entry))
(buffer-name (format "*ssh-tunnel-%s*" ident))
(buffer (get-buffer buffer-name))
(args (list (format "ssh-tunnel-%s" ident)
(format "*ssh-tunnel-%s*" ident)
"/usr/bin/ssh" "-N" "-L"
(format "%d:%s:22" port host)
proxy)))
(cond (buffer (kill-buffer buffer)))
(setcar (nthcdr 4 entry)
(cond (t (apply 'start-process args))
(t (message "%s\n" args)))))))
(defun start-ssh-tunnel2()
(interactive)
(setq aquiles-ssh-tunnel-process
(start-process "ssh-tunnel-minerva" "*ssh-tunnel-minerva*"
"/usr/bin/ssh" "-N" "-L" "8023:minerva:22"
proxy-host))
)
(defun start-ssh-tunnel-other()
(interactive)
(while (not
(zerop (call-process "/usr/bin/ssh" nil "*try*" t
"-p" "8022" "localhost" "date")))
(message "waiting for aquiles tunnel, %s" (current-time-string))
(sleep-for 2))
(message "launched ok process aquiles-ssh-tunnel-process")
(setq aquilesnuevo-ssh-tunnel-process
(start-process "ssh-tunnel-aquilesnuevo" "*ssh-tunnel-aquilesnuevo*"
"/usr/bin/ssh" "-p" "8022" "-N" "-L"
"8023:aquilesnuevo:22" "localhost"))
(while (not (zerop (call-process "/usr/bin/ssh" nil "*try*" t
"-p" "8023" "localhost" "date")))
(message "waiting for aquilesnuevo tunnel, %s" (current-time-string))
(sleep-for 1))
(message "launched ok process aquilesnuevo-ssh-tunnel-process"))
(defun check-ssh-tunnel()
(interactive)
(while (not
(zerop (call-process "/usr/bin/ssh" nil "*try*" t
"-p" "8022" "localhost" "date")))
(message "waiting for aquiles tunnel, %s" (current-time-string))
(sleep-for 1))
(message "process aquiles-ssh-tunnel-process ok")
(while (not (zerop (call-process "/usr/bin/ssh" nil "*try*" t
"-p" "8023" "localhost" "date")))
(message "waiting for aquilesnuevo tunnel, %s" (current-time-string))
(sleep-for 1))
(message "process aquilesnuevo-ssh-tunnel-process ok"))
(setq auto-mode-alist (cons '("^mozex\\.textarea\\..*\\.txt$"
. longlines-mode) auto-mode-alist))
(setq *PI* (* 2.0 (asin 1.0)))
(set-variable 'grep-command "grep -nie ")
(setq ange-ftp-ftp-program-name "nftp.pl")
(load-library "hideshow")
(load-library "hs-modif")
(require 'hypj)
(cond ((mstorti)
(calendar)
(mark-diary-entries)
(load-desktop)
(make-frame)
(setq visible-bell t)
(cond ((minerva)
(gnus)
(require 'w3m-load)
(dia)))
(cond ((in-host "prandtl")
(start-ssh-tunnel)
(dia)))
(cond ((spider)
(require 'w3m-load)
(start-ssh-tunnel)
(dia)))))
(progn
(setq ps-paper-type 'a4)
(setq ps-top-margin -30)
(setq ps-bottom-margin 130)
(setq ps-left-margin 130)
(setq ps-right-margin -30))
(setq selection-coding-system "iso-8859-1")
(message "setting require-final-newline to 't...")
(setq-default require-final-newline t)
(message "done.")