+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * info/.cvsignore: New file from 21.5.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ This patch is based on Jerry James's patch and analysis.
+
+ * select.el (get-clipboard):
+ (get-selection):
+ Update docstrings.
+ (get-clipboard-foreign):
+ (get-selection-foreign):
+ New function for use as `interprogram-paste-function's.
+
+ * simple.el (interprogram-paste-function): Change default to
+ `get-clipboard-foreign'; improve docstring.
+ (interprogram-cut-function): Improve dosctring.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
(insert clip))))
(defun get-clipboard ()
- "Return text pasted to the clipboard."
+ "Return text pasted to the clipboard.
+Not suitable for `interprogram-paste-function', use `get-clipboard-foreign'."
(get-selection 'CLIPBOARD))
+(defun get-clipboard-foreign ()
+ "Return text pasted to the clipboard by another program.
+See `interprogram-paste-function' for more information."
+ (get-selection-foreign 'CLIPBOARD))
+
(define-device-method get-cutbuffer
"Return the value of one of the cut buffers.
This will do nothing under anything other than X.")
"Return the value of a window-system selection.
The argument TYPE (default `PRIMARY') says which selection,
and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
-says how to convert the data. If there is no selection an error is signalled."
+says how to convert the data. If there is no selection an error is signalled.
+Not suitable in a `interprogram-paste-function', q.v."
(or type (setq type 'PRIMARY))
(or data-type (setq data-type selected-text-type))
- (let ((text
- (if (consp data-type)
- (condition-case err
- (get-selection-internal type (car data-type))
- (selection-conversion-error
- (if (cdr data-type)
- (get-selection type (cdr data-type))
- (signal (car err) (cdr err)))))
- (get-selection-internal type data-type))))
- text))
+ (if (consp data-type)
+ (condition-case err
+ (get-selection-internal type (car data-type))
+ (selection-conversion-error
+ (if (cdr data-type)
+ (get-selection type (cdr data-type))
+ (signal (car err) (cdr err)))))
+ (get-selection-internal type data-type)))
+
+(defun get-selection-foreign (&optional type data-type)
+ "Return the value of a window-system selection, or nil if XEmacs owns it.
+The argument TYPE (default `PRIMARY') says which selection,
+and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
+says how to convert the data. If there is no selection an error is signalled.
+See `interprogram-paste-function' for more information."
+ (unless (selection-owner-p type)
+ (get-selection type data-type)))
;; FSFmacs calls this `x-set-selection', and reverses the
;; first two arguments (duh ...). This order is more logical.
The first argument, TEXT, is a string containing
the text which should be made available.
The second, PUSH, if non-nil means this is a \"new\" kill;
-nil means appending to an \"old\" kill."
+nil means appending to an \"old\" kill.
+
+One reasonable choice is `own-clipboard' (the default)."
:type '(radio (function-item :tag "Send to Clipboard"
:format "%t\n"
own-clipboard)
(function :tag "Other"))
:group 'killing)
-(defcustom interprogram-paste-function 'get-clipboard
+(defcustom interprogram-paste-function 'get-clipboard-foreign
"Function to call to get text cut from other programs.
Most window systems provide some sort of facility for cutting and
most recent string, the function should return nil. If it is
difficult to tell whether Emacs or some other program provided the
current string, it is probably good enough to return nil if the string
-is equal (according to `string=') to the last text Emacs provided."
+is equal (according to `string=') to the last text Emacs provided.
+
+Reasonable choices include `get-clipboard-foreign' (the default), and
+functions calling `get-selection-foreign' (q.v.)."
:type '(radio (function-item :tag "Get from Clipboard"
:format "%t\n"
- get-clipboard)
+ get-clipboard-foreign)
(const :tag "None" nil)
(function :tag "Other"))
:group 'killing)
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
* all: port from cygwin setup.
-%%% $Id: ChangeLog,v 1.2.2.13 2001/12/17 08:45:59 stephent Exp $
-$Revision: 1.2.2.13 $
+%%% $Id: ChangeLog,v 1.2.2.15 2002/05/09 12:02:35 stephent Exp $
+$Revision: 1.2.2.15 $
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
+2002-05-07 Nix <nix@esperi.demon.co.uk>
+
+ Supersedes 2002-04-17 patch.
+
+ * process.h (PROCESS_LIVE_P): Use the process status as
+ evidence of health, not the state of the input stream.
+ (PROCESS_READABLE_P): Say if the process is readable
+ from. (It may be dead nonetheless.)
+ (CHECK_READABLE_PROCESS): Test for that condition.
+
+ * process.c (create_process): Use PROCESS_READABLE_P.
+ (read_process_output, set_process_filter): Likewise.
+
+ * process.c (Fprocess_input_coding_system): Use CHECK_READABLE_PROCESS.
+ (Fset_process_input_coding_system, Fprocess_coding_system): Likewise.
+
+ This code is #if 0'd, this is not the time to add new functions:
+
+ * process.c (Fprocess_readable_p): Report readability status.
+ * process.c (Qprocess_readable_p): New, associated symbol...
+ * process.c (syms_of_process): ... initialize it.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
#include "systty.h"
#include "syswait.h"
-Lisp_Object Qprocessp, Qprocess_live_p;
+Lisp_Object Qprocessp, Qprocess_live_p, Qprocess_readable_p;
/* Process methods */
struct process_methods the_process_methods;
? Qt : Qnil;
}
+#if 0
+/* This is a reasonable definition for this new primitive. Kyle sez:
+
+ "The patch looks OK to me except for the creation and exporting of the
+ Fprocess_readable_p function. I don't think a new Lisp function
+ should be created until we know something actually needs it. If
+ we later want to give process-readable-p different semantics it
+ may be hard to do it and stay compatible with what we hastily
+ create today."
+
+ He's right, not yet. Let's discuss the semantics on XEmacs Design
+ before enabling this.
+*/
+DEFUN ("process-readable-p", Fprocess_readable_p, 1, 1, 0, /*
+Return t if OBJECT is a process from which input may be available.
+*/
+ (object))
+{
+ return PROCESSP (object) && PROCESS_READABLE_P (XPROCESS (object))
+ ? Qt : Qnil;
+}
+#endif
+
DEFUN ("process-list", Fprocess_list, 0, 0, 0, /*
Return a list of all processes.
*/
pid = PROCMETH (create_process, (p, argv, nargv, program, cur_dir));
p->pid = make_int (pid);
- if (PROCESS_LIVE_P (p))
+ if (PROCESS_READABLE_P (p))
event_stream_select_process (p);
}
Really, the loop in execute_internal_event() should check itself
for a process-filter change, like in status_notify(); but the
struct Lisp_Process is not exported outside of this file. */
- if (!PROCESS_LIVE_P (p))
+ if (!PROCESS_READABLE_P (p))
return -1; /* already closed */
if (!NILP (p->filter) && (p->filter_does_read))
set_process_filter (Lisp_Object process, Lisp_Object filter, int filter_does_read)
{
CHECK_PROCESS (process);
- if (PROCESS_LIVE_P (XPROCESS (process))) {
+ if (PROCESS_READABLE_P (XPROCESS (process))) {
if (EQ (filter, Qt))
event_stream_unselect_process (XPROCESS (process));
else
(process))
{
process = get_process (process);
- CHECK_LIVE_PROCESS (process);
+ CHECK_READABLE_PROCESS (process);
return decoding_stream_coding_system (XLSTREAM (XPROCESS (process)->coding_instream) );
}
(process))
{
process = get_process (process);
- CHECK_LIVE_PROCESS (process);
+ CHECK_READABLE_PROCESS (process);
return Fcons (decoding_stream_coding_system
(XLSTREAM (XPROCESS (process)->coding_instream)),
encoding_stream_coding_system
{
codesys = Fget_coding_system (codesys);
process = get_process (process);
- CHECK_LIVE_PROCESS (process);
+ CHECK_READABLE_PROCESS (process);
set_decoding_stream_coding_system
(XLSTREAM (XPROCESS (process)->coding_instream), codesys);
defsymbol (&Qprocessp, "processp");
defsymbol (&Qprocess_live_p, "process-live-p");
+#if 0
+ /* see comment at Fprocess_readable_p */
+ defsymbol (&Qprocess_readable_p, "process-readable-p");
+#endif
defsymbol (&Qrun, "run");
defsymbol (&Qstop, "stop");
defsymbol (&Qopen, "open");
DEFSUBR (Fprocessp);
DEFSUBR (Fprocess_live_p);
+#if 0
+ /* see comment at Fprocess_readable_p */
+ DEFSUBR (Fprocess_readable_p);
+#endif
DEFSUBR (Fget_process);
DEFSUBR (Fget_buffer_process);
DEFSUBR (Fdelete_process);
#define PROCESSP(x) RECORDP (x, process)
#define CHECK_PROCESS(x) CHECK_RECORD (x, process)
#define PROCESS_LIVE_P(x) (EQ ((x)->status_symbol, Qrun))
+#define PROCESS_READABLE_P(x) (!NILP ((x)->pipe_instream))
#define CHECK_LIVE_PROCESS(x) do { \
CHECK_PROCESS (x); \
dead_wrong_type_argument (Qprocess_live_p, (x)); \
} while (0)
+#define CHECK_READABLE_PROCESS(x) do { \
+ CHECK_PROCESS (x); \
+ if (! PROCESS_READABLE_P (XPROCESS (x))) \
+ dead_wrong_type_argument (Qprocess_readable_p, (x)); \
+} while (0)
+
#ifdef emacs
EXFUN (Fprocess_kill_without_query, 2);
+2002-05-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.8 "Honest Recruiter" is released.
+
2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.7 "Economic Science" is released.
emacs_is_beta=
emacs_major_version=21
emacs_minor_version=4
-emacs_beta_version=7
-emacs_kit_version=
-xemacs_codename="Economic Science"
+emacs_beta_version=8
+xemacs_codename="Honest Recruiter"
+emacs_kitname=""
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8