aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-05-16 15:49:27 +0000
committerKaroly Lorentey2005-05-16 15:49:27 +0000
commit35bc5d82600f330082298823f09f53259a90ea81 (patch)
tree328e8f1df7bcd3cb68f4dfa7de371543da885c89 /src
parent133fe4c8a2d944324dc2c9a42b01ab1d258ad49d (diff)
parentcc211a0ff8145e0814413e237bb5674d615968b7 (diff)
downloademacs-35bc5d82600f330082298823f09f53259a90ea81.tar.gz
emacs-35bc5d82600f330082298823f09f53259a90ea81.zip
Merged from miles@gnu.org--gnu-2005 (patch 307-312)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-307 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-308 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-309 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-310 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-311 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-312 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-346
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog22
-rw-r--r--src/alloc.c7
-rw-r--r--src/emacs.c20
-rw-r--r--src/fileio.c51
-rw-r--r--src/process.c7
-rw-r--r--src/xdisp.c10
6 files changed, 96 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a86f78e5b96..fd11243cbb0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,25 @@
12005-05-14 Richard M. Stallman <rms@gnu.org>
2
3 * xdisp.c (message3): Call cancel_echoing.
4
5 * alloc.c (Fmemory_full_p): New function.
6 (syms_of_alloc): defsubr it.
7
8 * process.c (send_process_trap): Unblock SIGPIPE.
9 (send_process): Reset SIGPIPE handler before reporting error.
10
112005-05-14 Nick Roberts <nickrob@snap.net.nz>
12
13 * emacs.c (syms_of_emacs): Fix doc string for system-type.
14
152005-05-13 Richard M. Stallman <rms@gnu.org>
16
17 * fileio.c (Ffind_file_name_handler): Handle lambda-exp as handler.
18 (Finsert_file_contents): If we read 0 bytes from a special file,
19 unlock the visited file if we locked it.
20 (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes.
21 (Ffile_exists_p, Ffile_symlink_p): Doc fixes.
22
12005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 232005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 24
3 * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init. 25 * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init.
diff --git a/src/alloc.c b/src/alloc.c
index 43db28e08a0..35ce8a5cfa1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -535,6 +535,12 @@ memory_full ()
535 Fsignal (Qnil, Vmemory_signal_data); 535 Fsignal (Qnil, Vmemory_signal_data);
536} 536}
537 537
538DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
539 doc: /* t if memory is nearly full, nil otherwise. */)
540 ()
541{
542 return (spare_memory ? Qnil : Qt);
543}
538 544
539/* Called if we can't allocate relocatable space for a buffer. */ 545/* Called if we can't allocate relocatable space for a buffer. */
540 546
@@ -6080,6 +6086,7 @@ The time is in seconds as a floating point value. */);
6080 DEFVAR_INT ("gcs-done", &gcs_done, 6086 DEFVAR_INT ("gcs-done", &gcs_done,
6081 doc: /* Accumulated number of garbage collections done. */); 6087 doc: /* Accumulated number of garbage collections done. */);
6082 6088
6089 defsubr (&Smemory_full_p);
6083 defsubr (&Scons); 6090 defsubr (&Scons);
6084 defsubr (&Slist); 6091 defsubr (&Slist);
6085 defsubr (&Svector); 6092 defsubr (&Svector);
diff --git a/src/emacs.c b/src/emacs.c
index a1805c6497a..f435a3959a3 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2441,16 +2441,16 @@ syms_of_emacs ()
2441Many arguments are deleted from the list as they are processed. */); 2441Many arguments are deleted from the list as they are processed. */);
2442 2442
2443 DEFVAR_LISP ("system-type", &Vsystem_type, 2443 DEFVAR_LISP ("system-type", &Vsystem_type,
2444+ doc: /* Value is symbol indicating type of operating system you are using. 2444 doc: /* Value is symbol indicating type of operating system you are using.
2445+Special values: 2445Special values:
2446+ `gnu/linux' compiled for a GNU/Linux system. 2446 `gnu/linux' compiled for a GNU/Linux system.
2447+ `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...). 2447 `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...).
2448+ `macos' compiled for Mac OS 9. 2448 `macos' compiled for Mac OS 9.
2449+ `ms-dos' compiled as an MS-DOS application. 2449 `ms-dos' compiled as an MS-DOS application.
2450+ `windows-nt' compiled as a native W32 application. 2450 `windows-nt' compiled as a native W32 application.
2451+ `cygwin' compiled using the Cygwin library. 2451 `cygwin' compiled using the Cygwin library.
2452+ `vax-vms' or `axp-vms': compiled for a (Open)VMS system. 2452 `vax-vms' or `axp-vms': compiled for a (Open)VMS system.
2453+Anything else indicates some sort of Unix system. */); 2453Anything else indicates some sort of Unix system. */);
2454 Vsystem_type = intern (SYSTEM_TYPE); 2454 Vsystem_type = intern (SYSTEM_TYPE);
2455 2455
2456 DEFVAR_LISP ("system-configuration", &Vsystem_configuration, 2456 DEFVAR_LISP ("system-configuration", &Vsystem_configuration,
diff --git a/src/fileio.c b/src/fileio.c
index b62dac5b3d7..eaa2d184f1d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -375,7 +375,10 @@ use the standard functions without calling themselves recursively. */)
375 Lisp_Object string = XCAR (elt); 375 Lisp_Object string = XCAR (elt);
376 int match_pos; 376 int match_pos;
377 Lisp_Object handler = XCDR (elt); 377 Lisp_Object handler = XCDR (elt);
378 Lisp_Object operations = Fget (handler, Qoperations); 378 Lisp_Object operations = Qnil;
379
380 if (SYMBOLP (handler))
381 operations = Fget (handler, Qoperations);
379 382
380 if (STRINGP (string) 383 if (STRINGP (string)
381 && (match_pos = fast_string_match (string, filename)) > pos 384 && (match_pos = fast_string_match (string, filename)) > pos
@@ -2864,7 +2867,8 @@ This is what happens in interactive use with M-x. */)
2864#ifdef S_IFLNK 2867#ifdef S_IFLNK
2865DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, 2868DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", 2869 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args must be strings. 2870 doc: /* Make a symbolic link to FILENAME, named LINKNAME.
2871Both args must be strings.
2868Signals a `file-already-exists' error if a file LINKNAME already exists 2872Signals a `file-already-exists' error if a file LINKNAME already exists
2869unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2873unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2870A number as third arg means request confirmation if LINKNAME already exists. 2874A number as third arg means request confirmation if LINKNAME already exists.
@@ -3062,8 +3066,10 @@ check_writable (filename)
3062} 3066}
3063 3067
3064DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, 3068DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0,
3065 doc: /* Return t if file FILENAME exists. (This does not mean you can read it.) 3069 doc: /* Return t if file FILENAME exists (whether or not you can read it.)
3066See also `file-readable-p' and `file-attributes'. */) 3070See also `file-readable-p' and `file-attributes'.
3071This returns nil for a symlink to a nonexistent file.
3072Use `file-symlink-p' to test for such links. */)
3067 (filename) 3073 (filename)
3068 Lisp_Object filename; 3074 Lisp_Object filename;
3069{ 3075{
@@ -3240,7 +3246,10 @@ If there is no error, returns nil. */)
3240DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, 3246DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0,
3241 doc: /* Return non-nil if file FILENAME is the name of a symbolic link. 3247 doc: /* Return non-nil if file FILENAME is the name of a symbolic link.
3242The value is the link target, as a string. 3248The value is the link target, as a string.
3243Otherwise returns nil. */) 3249Otherwise it returns nil.
3250
3251This function returns t when given the name of a symlink that
3252points to a nonexistent file. */)
3244 (filename) 3253 (filename)
3245 Lisp_Object filename; 3254 Lisp_Object filename;
3246{ 3255{
@@ -3730,6 +3739,8 @@ actually used. */)
3730 int set_coding_system = 0; 3739 int set_coding_system = 0;
3731 int coding_system_decided = 0; 3740 int coding_system_decided = 0;
3732 int read_quit = 0; 3741 int read_quit = 0;
3742 int old_Vdeactivate_mark = Vdeactivate_mark;
3743 int we_locked_file = 0;
3733 3744
3734 if (current_buffer->base_buffer && ! NILP (visit)) 3745 if (current_buffer->base_buffer && ! NILP (visit))
3735 error ("Cannot do file visiting in an indirect buffer"); 3746 error ("Cannot do file visiting in an indirect buffer");
@@ -4402,8 +4413,17 @@ actually used. */)
4402 /* For a special file, all we can do is guess. */ 4413 /* For a special file, all we can do is guess. */
4403 total = READ_BUF_SIZE; 4414 total = READ_BUF_SIZE;
4404 4415
4405 if (NILP (visit) && total > 0) 4416 if (NILP (visit) && inserted > 0)
4406 prepare_to_modify_buffer (PT, PT, NULL); 4417 {
4418#ifdef CLASH_DETECTION
4419 if (!NILP (current_buffer->file_truename)
4420 /* Make binding buffer-file-name to nil effective. */
4421 && !NILP (current_buffer->filename)
4422 && SAVE_MODIFF >= MODIFF)
4423 we_locked_file = 1;
4424#endif /* CLASH_DETECTION */
4425 prepare_to_modify_buffer (GPT, GPT, NULL);
4426 }
4407 4427
4408 move_gap (PT); 4428 move_gap (PT);
4409 if (GAP_SIZE < total) 4429 if (GAP_SIZE < total)
@@ -4493,6 +4513,18 @@ actually used. */)
4493 } 4513 }
4494 } 4514 }
4495 4515
4516 /* Now we have read all the file data into the gap.
4517 If it was empty, undo marking the buffer modified. */
4518
4519 if (inserted == 0)
4520 {
4521#ifdef CLASH_DETECTION
4522 if (we_locked_file)
4523 unlock_file (current_buffer->file_truename);
4524#endif
4525 Vdeactivate_mark = old_Vdeactivate_mark;
4526 }
4527
4496 /* Make the text read part of the buffer. */ 4528 /* Make the text read part of the buffer. */
4497 GAP_SIZE -= inserted; 4529 GAP_SIZE -= inserted;
4498 GPT += inserted; 4530 GPT += inserted;
@@ -6038,7 +6070,10 @@ DEFUN ("clear-buffer-auto-save-failure", Fclear_buffer_auto_save_failure,
6038 6070
6039DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p, 6071DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p,
6040 0, 0, 0, 6072 0, 0, 0,
6041 doc: /* Return t if current buffer has been auto-saved since last read in or saved. */) 6073 doc: /* Return t if current buffer has been auto-saved recently.
6074More precisely, if it has been auto-saved since last read from or saved
6075in the visited file. If the buffer has no visited file,
6076then any auto-save counts as "recent". */)
6042 () 6077 ()
6043{ 6078{
6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; 6079 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
diff --git a/src/process.c b/src/process.c
index c6a9b255243..a557ee30c27 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5108,6 +5108,7 @@ send_process_trap ()
5108 sigrelse (SIGPIPE); 5108 sigrelse (SIGPIPE);
5109 sigrelse (SIGALRM); 5109 sigrelse (SIGALRM);
5110#endif /* BSD4_1 */ 5110#endif /* BSD4_1 */
5111 sigunblock (sigmask (SIGPIPE));
5111 longjmp (send_process_frame, 1); 5112 longjmp (send_process_frame, 1);
5112} 5113}
5113 5114
@@ -5299,7 +5300,11 @@ send_process (proc, buf, len, object)
5299 0, datagram_address[outfd].sa, 5300 0, datagram_address[outfd].sa,
5300 datagram_address[outfd].len); 5301 datagram_address[outfd].len);
5301 if (rv < 0 && errno == EMSGSIZE) 5302 if (rv < 0 && errno == EMSGSIZE)
5302 report_file_error ("sending datagram", Fcons (proc, Qnil)); 5303 {
5304 signal (SIGPIPE, old_sigpipe);
5305 report_file_error ("sending datagram",
5306 Fcons (proc, Qnil));
5307 }
5303 } 5308 }
5304 else 5309 else
5305#endif 5310#endif
diff --git a/src/xdisp.c b/src/xdisp.c
index 92e85dd8786..7d4ac6916fa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6909,7 +6909,9 @@ message2_nolog (m, nbytes, multibyte)
6909/* Display an echo area message M with a specified length of NBYTES 6909/* Display an echo area message M with a specified length of NBYTES
6910 bytes. The string may include null characters. If M is not a 6910 bytes. The string may include null characters. If M is not a
6911 string, clear out any existing message, and let the mini-buffer 6911 string, clear out any existing message, and let the mini-buffer
6912 text show through. */ 6912 text show through.
6913
6914 This function cancels echoing. */
6913 6915
6914void 6916void
6915message3 (m, nbytes, multibyte) 6917message3 (m, nbytes, multibyte)
@@ -6921,6 +6923,7 @@ message3 (m, nbytes, multibyte)
6921 6923
6922 GCPRO1 (m); 6924 GCPRO1 (m);
6923 clear_message (1,1); 6925 clear_message (1,1);
6926 cancel_echoing ();
6924 6927
6925 /* First flush out any partial line written with print. */ 6928 /* First flush out any partial line written with print. */
6926 message_log_maybe_newline (); 6929 message_log_maybe_newline ();
@@ -6932,7 +6935,10 @@ message3 (m, nbytes, multibyte)
6932} 6935}
6933 6936
6934 6937
6935/* The non-logging version of message3. */ 6938/* The non-logging version of message3.
6939 This does not cancel echoing, because it is used for echoing.
6940 Perhaps we need to make a separate function for echoing
6941 and make this cancel echoing. */
6936 6942
6937void 6943void
6938message3_nolog (m, nbytes, multibyte) 6944message3_nolog (m, nbytes, multibyte)