[gnu.emacs] dired enhancement and ksh funcs for resume

lgondor@csri.toronto.edu (Les Gondor) (11/09/88)

For those of you who would want dired mode to be consistent with
buffer menu mode in the way it handles filling the screen with the
file at the current line, add the following code to your .emacs.

;; In dired mode, make the key '1' act like '1' in buffer-menu mode
;; (i.e. fill the screen with the selected file)
(defun dired-fill-screen-with-file ()
  "In dired, fill the screen with the current file."
  (interactive)
  (let ((dired-name (dired-get-filename)))
    (delete-other-windows)
    (find-file dired-name)))

(defun dired-hook ()
  (define-key dired-mode-map "1" 'dired-fill-screen-with-file)
; (define-key dired-mode-map "z" 'dired-find-file-compressed)
)

(setq dired-mode-hook 'dired-hook)

Ksh users might want to add the following functions to their .profile
to make use of Joe Wells' resume-emacs code.

;; ksh users can use the following functions:
;;function iemacs
;;{
;;	rm -f ~/.emacs_args
;;	"emacs" $*
;;	if test -f ~/.emacs_args
;;	then
;;		alias emacs=remacs
;;	else
;;		alias emacs=iemacs
;;	fi
;;}
;;function remacs
;;{
;;	echo $PWD $* >~/.emacs_args
;;	fg %emacs
;;	if test -f ~/.emacs_args
;;	then
;;		alias emacs=remacs
;;	else
;;		alias emacs=iemacs
;;	fi
;;}
;;alias emacs=iemacs

The resume.el code must be augmented to remove the command line
arguments file upon exit (but not supension) as follows:

; in .emacs
(setq kill-emacs-hook 'delete-args-file)   ;for ksh functions L. Gondor
; in resume.el
(defun delete-args-file ()
  "This deletes the file specified by emacs-args-file."
  (if (file-exists-p emacs-args-file)
      (delete-file emacs-args-file)))
-- 
Les Gondor, Trigraph Inc.	"Why not just do it by knife?"
{uunet!ai.toronto.edu!utcsri, decvax!utzoo}!trigraph!les
DOMAIN: lgondor@csri.toronto.edu
Canada Post: 5 Lower Sherbourne St., Toronto, Ontario, CANADA, M5A 2P3
Phone: (416) 363-8841