From c685165464a550120028ef9d2b643a19aa826253 Mon Sep 17 00:00:00 2001 From: David Byers Date: Sat, 2 Jun 2012 11:43:16 +0000 Subject: [PATCH] =?UTF-8?q?Hantera=20lite=20obsoleta=20funktioner=20b?= =?UTF-8?q?=C3=A4ttre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ChangeLog | 8 ++++++++ src/commands2.el | 5 +++-- src/compatibility.el | 10 ++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d90ccb8c..75a31af7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-01-06 David Byers + + Compatibility with Emacs 24: + * compatibility.el (function-obsolete-p): Count functions as + obsolete if they are undefined (for Emacs 24). + (process-kill-without-query): Handle case where + set-process-query-on-exit-flag is undefined. + 2012-05-24 Per Cederqvist Fixed typo in doc-string. diff --git a/src/commands2.el b/src/commands2.el index 783a0e81..6be558f2 100644 --- a/src/commands2.el +++ b/src/commands2.el @@ -2381,8 +2381,9 @@ This command accepts text number prefix arguments \(see (save-current-buffer (set-buffer buffer) (if (eq (process-status lyskom-proc) 'open) (initiate-get-time 'keep nil) - (lyskom-stop-keep-alive))) - (error (lyskom-stop-keep-alive)))) + (lyskom-stop-keep-alive) + (message "Terminating keep-alive"))) + (error (message "ERROR!") (lyskom-stop-keep-alive)))) (def-kom-command kom-keep-alive () "Keep the LysKOM session alive by sending a request every once in a diff --git a/src/compatibility.el b/src/compatibility.el index 312243c5..72c6cc33 100644 --- a/src/compatibility.el +++ b/src/compatibility.el @@ -677,12 +677,14 @@ Emacsen." (lyskom-function-alias function-obsolete-p (function) "Return non-nil if FUNCTION is obsolete" - (get function 'byte-obsolete-info)) + (or (not (fboundp function)) + (get function 'byte-obsolete-info))) (eval-and-compile - (if (and (lyskom-function-obsolete-p 'process-kill-without-query) - (fboundp 'set-process-query-on-exit-flag)) - (fset 'lyskom-set-process-query-on-exit-flag 'set-process-query-on-exit-flag) + (if (lyskom-function-obsolete-p 'process-kill-without-query) + (if (fboundp 'set-process-query-on-exit-flag) + (fset 'lyskom-set-process-query-on-exit-flag 'set-process-query-on-exit-flag) + (defun (lyskom-set-process-query-on-exit-flag (&rest args)))) (fset 'lyskom-set-process-query-on-exit-flag 'process-kill-without-query))) (eval-and-compile -- GitLab