help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using emerge on windows? Funky errors with Temp files


From: Kevin Rodgers
Subject: Re: Using emerge on windows? Funky errors with Temp files
Date: Thu, 24 Mar 2011 21:55:54 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 3/23/11 1:23 AM, David Kastrup wrote:
Kevin Rodgers<kevin.d.rodgers@gmail.com>  writes:
...
I have this in my ~/.emacs to run ediff-files.  I think you just need to add
file-c in the obvious way to call ediff3 instead:

(defun diff-command-line-args (switch)
   "Run `ediff-files' on the following 2 command line arguments (after SWITCH)."
   ;; (prog1 ...) == (pop command-line-args-left):
   (let ((file-a (prog1 (car command-line-args-left)
                  (setq command-line-args-left
                        (cdr command-line-args-left))))
         (file-b (prog1 (car command-line-args-left)
                  (setq command-line-args-left
                        (cdr command-line-args-left)))))
     (ediff-files file-a file-b)))

(setq command-switch-alist
       (cons '("--diff" . diff-command-line-args) command-switch-alist))

There is more to it than that, like exit status.  And IIRC, ediff-files
returned more or less immediately, basically just starting the ediff.

OK, you bit on my bait, so I'll reciprocate:

What exit status should be returned to the caller under what circumstances?

Once that's understood, just call kill-emacs:

,----
| kill-emacs is an interactive built-in function in `C source code'.
|
| (kill-emacs &optional ARG)
|
| Exit the Emacs job and kill it.
| If ARG is an integer, return ARG as the exit program code.
| If ARG is a string, stuff it as keyboard input.
|
| The value of `kill-emacs-hook', if not void,
| is a list of functions (of no args),
| all of which are called before Emacs is actually killed.
|
| [back]
`----

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]