diff options
| author | Kenichi Handa | 2010-05-28 15:45:43 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-05-28 15:45:43 +0900 |
| commit | 0ad1627dbeb2c525a78252de500cb92ac367d8e2 (patch) | |
| tree | 9f66c2446d818199288ec6424ecc88c51418bca7 /src | |
| parent | 7d56b2ddfe092d1c25b6faf3f5688bb85fb46549 (diff) | |
| parent | 3d338b4613c47aecc773093f92cf48f279ed95d1 (diff) | |
| download | emacs-0ad1627dbeb2c525a78252de500cb92ac367d8e2.tar.gz emacs-0ad1627dbeb2c525a78252de500cb92ac367d8e2.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 22 | ||||
| -rw-r--r-- | src/ChangeLog.10 | 4 | ||||
| -rw-r--r-- | src/ChangeLog.8 | 3 | ||||
| -rw-r--r-- | src/Makefile.in | 2 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/callproc.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 41 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
9 files changed, 56 insertions, 34 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2d8948f6a31..eeee6540e68 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -5,6 +5,28 @@ | |||
| 5 | (font_list_entities): Call font_delete_unmatched if | 5 | (font_list_entities): Call font_delete_unmatched if |
| 6 | Vface_ignored_fonts is non-nil. | 6 | Vface_ignored_fonts is non-nil. |
| 7 | 7 | ||
| 8 | 2010-05-28 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * Makefile.in (LIBES): Remove $LOADLIBES, it is never set. | ||
| 11 | |||
| 12 | 2010-05-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 13 | |||
| 14 | * fileio.c (Fdelete_file): Change meaning of optional arg to mean | ||
| 15 | whether to trash. | ||
| 16 | (internal_delete_file, Frename_file): Callers changed. | ||
| 17 | (delete_by_moving_to_trash): Doc fix. | ||
| 18 | (Fdelete_directory_internal): Don't move to trash. | ||
| 19 | |||
| 20 | * callproc.c (delete_temp_file): | ||
| 21 | * buffer.c (Fkill_buffer): Callers changed. | ||
| 22 | |||
| 23 | * lisp.h: Update prototype. | ||
| 24 | |||
| 25 | 2010-05-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 26 | |||
| 27 | * xdisp.c (redisplay_window): After redisplay, check if point is | ||
| 28 | still valid before setting it (Bug#6177). | ||
| 29 | |||
| 8 | 2010-05-27 Glenn Morris <rgm@gnu.org> | 30 | 2010-05-27 Glenn Morris <rgm@gnu.org> |
| 9 | 31 | ||
| 10 | * Makefile.in, autodeps.mk, deps.mk, ns.mk: | 32 | * Makefile.in, autodeps.mk, deps.mk, ns.mk: |
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 39b70d9b199..24818e6770f 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -4645,10 +4645,6 @@ | |||
| 4645 | * image.c: Include "charset.h" and "coding.h". | 4645 | * image.c: Include "charset.h" and "coding.h". |
| 4646 | (x_find_image_file): Return an encoded file name. | 4646 | (x_find_image_file): Return an encoded file name. |
| 4647 | 4647 | ||
| 4648 | 2006-04-01 Eli Zaretskii <eliz@gnu.org> | ||
| 4649 | |||
| 4650 | * configure: Regenerated. | ||
| 4651 | |||
| 4652 | 2006-03-31 Kenichi Handa <handa@m17n.org> | 4648 | 2006-03-31 Kenichi Handa <handa@m17n.org> |
| 4653 | 4649 | ||
| 4654 | * xfns.c (xg_set_icon): Delete superfluous UNGCPRO. | 4650 | * xfns.c (xg_set_icon): Delete superfluous UNGCPRO. |
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 6da7b6862a5..4dd3d0dd071 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 | |||
| @@ -4629,9 +4629,6 @@ | |||
| 4629 | 4629 | ||
| 4630 | * Makefile.in (LIBGIF): Use libungif. | 4630 | * Makefile.in (LIBGIF): Use libungif. |
| 4631 | 4631 | ||
| 4632 | * configure.in (HAVE_GIF): Use libungif instead of libgif | ||
| 4633 | because the former doesn't contain patented compression code. | ||
| 4634 | |||
| 4635 | * xdisp.c (compute_window_start_on_continuation_line): Don't | 4632 | * xdisp.c (compute_window_start_on_continuation_line): Don't |
| 4636 | do it if line start is too far away from window start. | 4633 | do it if line start is too far away from window start. |
| 4637 | 4634 | ||
diff --git a/src/Makefile.in b/src/Makefile.in index 0b23606a921..336980f4285 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -581,7 +581,7 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \ | |||
| 581 | ## Note that SunOS needs -lm to come before -lc; otherwise, you get | 581 | ## Note that SunOS needs -lm to come before -lc; otherwise, you get |
| 582 | ## duplicated symbols. If the standard libraries were compiled | 582 | ## duplicated symbols. If the standard libraries were compiled |
| 583 | ## with GCC, we might need LIB_GCC again after them. | 583 | ## with GCC, we might need LIB_GCC again after them. |
| 584 | LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ | 584 | LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ |
| 585 | $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ | 585 | $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ |
| 586 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ | 586 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ |
| 587 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ | 587 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ |
diff --git a/src/buffer.c b/src/buffer.c index 339bc99dcb1..b19286c6ea9 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1547,7 +1547,7 @@ with SIGHUP. */) | |||
| 1547 | Lisp_Object tem; | 1547 | Lisp_Object tem; |
| 1548 | tem = Fsymbol_value (intern ("delete-auto-save-files")); | 1548 | tem = Fsymbol_value (intern ("delete-auto-save-files")); |
| 1549 | if (! NILP (tem)) | 1549 | if (! NILP (tem)) |
| 1550 | internal_delete_file (b->auto_save_file_name, Qt); | 1550 | internal_delete_file (b->auto_save_file_name); |
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | if (b->base_buffer) | 1553 | if (b->base_buffer) |
diff --git a/src/callproc.c b/src/callproc.c index 44dd6ed7764..f922433eb42 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -856,7 +856,7 @@ delete_temp_file (name) | |||
| 856 | /* Suppress jka-compr handling, etc. */ | 856 | /* Suppress jka-compr handling, etc. */ |
| 857 | int count = SPECPDL_INDEX (); | 857 | int count = SPECPDL_INDEX (); |
| 858 | specbind (intern ("file-name-handler-alist"), Qnil); | 858 | specbind (intern ("file-name-handler-alist"), Qnil); |
| 859 | internal_delete_file (name, Qt); | 859 | internal_delete_file (name); |
| 860 | unbind_to (count, Qnil); | 860 | unbind_to (count, Qnil); |
| 861 | return Qnil; | 861 | return Qnil; |
| 862 | } | 862 | } |
diff --git a/src/fileio.c b/src/fileio.c index de32bfecd34..d3aea0f1e91 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2180,12 +2180,7 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal, | |||
| 2180 | 2180 | ||
| 2181 | CHECK_STRING (directory); | 2181 | CHECK_STRING (directory); |
| 2182 | directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil)); | 2182 | directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil)); |
| 2183 | |||
| 2184 | if (delete_by_moving_to_trash) | ||
| 2185 | return call1 (Qmove_file_to_trash, directory); | ||
| 2186 | |||
| 2187 | encoded_dir = ENCODE_FILE (directory); | 2183 | encoded_dir = ENCODE_FILE (directory); |
| 2188 | |||
| 2189 | dir = SDATA (encoded_dir); | 2184 | dir = SDATA (encoded_dir); |
| 2190 | 2185 | ||
| 2191 | if (rmdir (dir) != 0) | 2186 | if (rmdir (dir) != 0) |
| @@ -2195,19 +2190,21 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal, | |||
| 2195 | } | 2190 | } |
| 2196 | 2191 | ||
| 2197 | DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2, | 2192 | DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2, |
| 2198 | "(list (read-file-name \"Delete file: \" nil default-directory \ | 2193 | "(list (read-file-name \ |
| 2199 | (confirm-nonexistent-file-or-buffer)) \ | 2194 | (if (and delete-by-moving-to-trash (null current-prefix-arg)) \ |
| 2200 | current-prefix-arg)", | 2195 | \"Move file to trash: \" \"Delete file: \") \ |
| 2196 | nil default-directory (confirm-nonexistent-file-or-buffer)) \ | ||
| 2197 | (null current-prefix-arg))", | ||
| 2201 | doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink. | 2198 | doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink. |
| 2202 | If file has multiple names, it continues to exist with the other names. | 2199 | If file has multiple names, it continues to exist with the other names. |
| 2200 | TRASH non-nil means to trash the file instead of deleting, provided | ||
| 2201 | `delete-by-moving-to-trash' is non-nil. | ||
| 2203 | 2202 | ||
| 2204 | If optional arg FORCE is non-nil, really delete the file regardless of | 2203 | When called interactively, TRASH is t if no prefix argument is given. |
| 2205 | `delete-by-moving-to-trash'. Otherwise, \"deleting\" actually moves | 2204 | With a prefix argument, TRASH is nil. */) |
| 2206 | it to the system's trash can if `delete-by-moving-to-trash' is non-nil. | 2205 | (filename, trash) |
| 2207 | Interactively, FORCE is non-nil if called with a prefix arg. */) | ||
| 2208 | (filename, force) | ||
| 2209 | Lisp_Object filename; | 2206 | Lisp_Object filename; |
| 2210 | Lisp_Object force; | 2207 | Lisp_Object trash; |
| 2211 | { | 2208 | { |
| 2212 | Lisp_Object handler; | 2209 | Lisp_Object handler; |
| 2213 | Lisp_Object encoded_file; | 2210 | Lisp_Object encoded_file; |
| @@ -2226,7 +2223,7 @@ Interactively, FORCE is non-nil if called with a prefix arg. */) | |||
| 2226 | if (!NILP (handler)) | 2223 | if (!NILP (handler)) |
| 2227 | return call2 (handler, Qdelete_file, filename); | 2224 | return call2 (handler, Qdelete_file, filename); |
| 2228 | 2225 | ||
| 2229 | if (delete_by_moving_to_trash && NILP (force)) | 2226 | if (delete_by_moving_to_trash && !NILP (trash)) |
| 2230 | return call1 (Qmove_file_to_trash, filename); | 2227 | return call1 (Qmove_file_to_trash, filename); |
| 2231 | 2228 | ||
| 2232 | encoded_file = ENCODE_FILE (filename); | 2229 | encoded_file = ENCODE_FILE (filename); |
| @@ -2244,14 +2241,14 @@ internal_delete_file_1 (ignore) | |||
| 2244 | } | 2241 | } |
| 2245 | 2242 | ||
| 2246 | /* Delete file FILENAME, returning 1 if successful and 0 if failed. | 2243 | /* Delete file FILENAME, returning 1 if successful and 0 if failed. |
| 2247 | FORCE means to ignore `delete-by-moving-to-trash'. */ | 2244 | This ignores `delete-by-moving-to-trash'. */ |
| 2248 | 2245 | ||
| 2249 | int | 2246 | int |
| 2250 | internal_delete_file (Lisp_Object filename, Lisp_Object force) | 2247 | internal_delete_file (Lisp_Object filename) |
| 2251 | { | 2248 | { |
| 2252 | Lisp_Object tem; | 2249 | Lisp_Object tem; |
| 2253 | 2250 | ||
| 2254 | tem = internal_condition_case_2 (Fdelete_file, filename, force, | 2251 | tem = internal_condition_case_2 (Fdelete_file, filename, Qnil, |
| 2255 | Qt, internal_delete_file_1); | 2252 | Qt, internal_delete_file_1); |
| 2256 | return NILP (tem); | 2253 | return NILP (tem); |
| 2257 | } | 2254 | } |
| @@ -2345,7 +2342,7 @@ This is what happens in interactive use with M-x. */) | |||
| 2345 | ) | 2342 | ) |
| 2346 | call2 (Qdelete_directory, file, Qt); | 2343 | call2 (Qdelete_directory, file, Qt); |
| 2347 | else | 2344 | else |
| 2348 | Fdelete_file (file, Qt); | 2345 | Fdelete_file (file, Qnil); |
| 2349 | unbind_to (count, Qnil); | 2346 | unbind_to (count, Qnil); |
| 2350 | } | 2347 | } |
| 2351 | else | 2348 | else |
| @@ -5917,8 +5914,10 @@ A non-nil value may result in data loss! */); | |||
| 5917 | 5914 | ||
| 5918 | DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash, | 5915 | DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash, |
| 5919 | doc: /* Specifies whether to use the system's trash can. | 5916 | doc: /* Specifies whether to use the system's trash can. |
| 5920 | When non-nil, the function `move-file-to-trash' will be used by | 5917 | When non-nil, certain file deletion commands use the function |
| 5921 | `delete-file' and `delete-directory'. */); | 5918 | `move-file-to-trash' instead of deleting files outright. |
| 5919 | This includes interactive calls to `delete-file' and | ||
| 5920 | `delete-directory' and the Dired deletion commands. */); | ||
| 5922 | delete_by_moving_to_trash = 0; | 5921 | delete_by_moving_to_trash = 0; |
| 5923 | Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); | 5922 | Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); |
| 5924 | Qmove_file_to_trash = intern_c_string ("move-file-to-trash"); | 5923 | Qmove_file_to_trash = intern_c_string ("move-file-to-trash"); |
diff --git a/src/lisp.h b/src/lisp.h index b4ff446b064..e17931ca366 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3060,7 +3060,7 @@ EXFUN (Fread_file_name, 6); | |||
| 3060 | extern Lisp_Object close_file_unwind P_ ((Lisp_Object)); | 3060 | extern Lisp_Object close_file_unwind P_ ((Lisp_Object)); |
| 3061 | extern Lisp_Object restore_point_unwind P_ ((Lisp_Object)); | 3061 | extern Lisp_Object restore_point_unwind P_ ((Lisp_Object)); |
| 3062 | extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN; | 3062 | extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN; |
| 3063 | extern int internal_delete_file P_ ((Lisp_Object, Lisp_Object)); | 3063 | extern int internal_delete_file P_ ((Lisp_Object)); |
| 3064 | extern void syms_of_fileio P_ ((void)); | 3064 | extern void syms_of_fileio P_ ((void)); |
| 3065 | extern Lisp_Object make_temp_name P_ ((Lisp_Object, int)); | 3065 | extern Lisp_Object make_temp_name P_ ((Lisp_Object, int)); |
| 3066 | EXFUN (Fmake_symbolic_link, 3); | 3066 | EXFUN (Fmake_symbolic_link, 3); |
diff --git a/src/xdisp.c b/src/xdisp.c index 699f375e2f4..31fa5f39d5f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14788,8 +14788,16 @@ redisplay_window (window, just_this_one_p) | |||
| 14788 | (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w); | 14788 | (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w); |
| 14789 | } | 14789 | } |
| 14790 | 14790 | ||
| 14791 | /* Restore current_buffer and value of point in it. */ | 14791 | /* Restore current_buffer and value of point in it. The window |
| 14792 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); | 14792 | update may have changed the buffer, so first make sure `opoint' |
| 14793 | is still valid (Bug#6177). */ | ||
| 14794 | if (CHARPOS (opoint) < BEGV) | ||
| 14795 | TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); | ||
| 14796 | else if (CHARPOS (opoint) > ZV) | ||
| 14797 | TEMP_SET_PT_BOTH (Z, Z_BYTE); | ||
| 14798 | else | ||
| 14799 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); | ||
| 14800 | |||
| 14793 | set_buffer_internal_1 (old); | 14801 | set_buffer_internal_1 (old); |
| 14794 | /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become | 14802 | /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become |
| 14795 | shorter. This can be caused by log truncation in *Messages*. */ | 14803 | shorter. This can be caused by log truncation in *Messages*. */ |