Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!enea!liuida!gorry From: gorry@liuida.UUCP Newsgroups: comp.emacs Subject: Some customization Message-ID: <583@tragicomix.liu.se> Date: Sat, 13-Jun-87 20:02:32 EDT Article-I.D.: tragicom.583 Posted: Sat Jun 13 20:02:32 1987 Date-Received: Sun, 14-Jun-87 21:57:10 EDT Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 41 References: Hi there! The following init file source will set the compile window to the size specified in the variable compile-window-height. \C-x\C-e initiates compile-command \C-x\C-r initiates a separate command in the compile window ;; compilation (defvar compile-window-height 12) (global-set-key "\C-x\C-e" 'special-compile) (setq compile-command "cc foo.c") ;; execution (global-set-key "\C-x\C-r" 'special-exec) (defvar run-command "a.out") (load "compile") (defun special-compile (command) "Compile the program including the current buffer. Default: run make. The compile window is set to the variable compile-window-height" (interactive (list (read-string "Compile command: " compile-command))) (setq compile-command command) (compile1 compile-command "No more errors") (enlarge-window (- (- (screen-height) (window-height)) compile-window-height) nil)) (defun special-exec (command) "Execute a command, in the compile window" (interactive (list (read-string "Run command: " run-command))) (setq run-command command) (compile1 run-command "No more errors") (enlarge-window (- (- (screen-height) (window-height)) compile-window-height) nil)) An improvement would be to emulate the actions taken by Emacs when ESC-x compile is invoked - compile is loaded if not present. gorr\/ gorry@majestix.liu.se / -- An editor with less than 2503217 commands has no self respect!