From d1dcf3e7793308b744671d1c69dc41c824bc610a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Dec 2006 12:38:32 +0000 Subject: [PATCH] (w32-append-code-lines): New function. --- lisp/ChangeLog | 4 ++++ lisp/w32-fns.el | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09e3736df7..86d773f52f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-12-09 Eli Zaretskii + + * w32-fns.el (w32-append-code-lines): New function. + 2006-12-09 Romain Francoise * comint.el (comint-insert-input): Delete obsolete comment. diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 072606d97d..21b7522306 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -469,5 +469,19 @@ that Emacs is unable to cope with." (expand-file-name (pop command-line-args-left)))) (batch-update-autoloads))) +(defun w32-append-code-lines (orig extra) + "Append non-empty non-comment lines in the file EXTRA to the file ORIG. + +This function saves all buffers and kills the Emacs session, without asking +for any permissions. + +This is required because the Windows build environment is not required +to include Sed, which is used by leim/Makefile.in to do the job." + (find-file orig) + (goto-char (point-max)) + (insert-file-contents extra) + (delete-matching-lines "^$\\|^;") + (save-buffers-kill-emacs t)) + ;;; arch-tag: c49b48cc-0f4f-454f-a274-c2dc34815e14 ;;; w32-fns.el ends here -- 2.20.1