Mercurial > emacs
comparison lisp/eshell/esh-cmd.el @ 43335:bb0835bc6023
(eshell-cmd-initialize): Do not use make-local-hook.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Sat, 16 Feb 2002 09:42:11 +0000 |
parents | a4e7fd8ad209 |
children | e23f9344f37d |
comparison
equal
deleted
inserted
replaced
43334:fcff0a75131f | 43335:bb0835bc6023 |
---|---|
293 (set (make-local-variable 'eshell-command-arguments) nil) | 293 (set (make-local-variable 'eshell-command-arguments) nil) |
294 (set (make-local-variable 'eshell-last-arguments) nil) | 294 (set (make-local-variable 'eshell-last-arguments) nil) |
295 (set (make-local-variable 'eshell-last-command-name) nil) | 295 (set (make-local-variable 'eshell-last-command-name) nil) |
296 (set (make-local-variable 'eshell-last-async-proc) nil) | 296 (set (make-local-variable 'eshell-last-async-proc) nil) |
297 | 297 |
298 (make-local-hook 'eshell-kill-hook) | |
299 (add-hook 'eshell-kill-hook 'eshell-resume-command nil t) | 298 (add-hook 'eshell-kill-hook 'eshell-resume-command nil t) |
300 | 299 |
301 ;; make sure that if a command is over, and no process is being | 300 ;; make sure that if a command is over, and no process is being |
302 ;; waited for, that `eshell-current-command' is set to nil. This | 301 ;; waited for, that `eshell-current-command' is set to nil. This |
303 ;; situation can occur, for example, if a Lisp function results in | 302 ;; situation can occur, for example, if a Lisp function results in |
304 ;; `debug' being called, and the user then types \\[top-level] | 303 ;; `debug' being called, and the user then types \\[top-level] |
305 (make-local-hook 'eshell-post-command-hook) | |
306 (add-hook 'eshell-post-command-hook | 304 (add-hook 'eshell-post-command-hook |
307 (function | 305 (function |
308 (lambda () | 306 (lambda () |
309 (setq eshell-current-command nil | 307 (setq eshell-current-command nil |
310 eshell-last-async-proc nil))) nil t) | 308 eshell-last-async-proc nil))) nil t) |
311 | 309 |
312 (make-local-hook 'eshell-parse-argument-hook) | |
313 (add-hook 'eshell-parse-argument-hook | 310 (add-hook 'eshell-parse-argument-hook |
314 'eshell-parse-subcommand-argument nil t) | 311 'eshell-parse-subcommand-argument nil t) |
315 (add-hook 'eshell-parse-argument-hook | 312 (add-hook 'eshell-parse-argument-hook |
316 'eshell-parse-lisp-argument nil t) | 313 'eshell-parse-lisp-argument nil t) |
317 | 314 |
318 (when (eshell-using-module 'eshell-cmpl) | 315 (when (eshell-using-module 'eshell-cmpl) |
319 (make-local-hook 'pcomplete-try-first-hook) | |
320 (add-hook 'pcomplete-try-first-hook | 316 (add-hook 'pcomplete-try-first-hook |
321 'eshell-complete-lisp-symbols nil t))) | 317 'eshell-complete-lisp-symbols nil t))) |
322 | 318 |
323 (eshell-deftest var last-result-var | 319 (eshell-deftest var last-result-var |
324 "\"last result\" variable" | 320 "\"last result\" variable" |