annotate src/ecrt0.c @ 108806:511da81b16c5

Change delete-by-moving-to-trash so Lisp calls explicitly request trashing. * src/fileio.c (Fdelete_file): Change meaning of optional arg to mean whether to trash. (internal_delete_file, Frename_file): Callers changed. (delete_by_moving_to_trash): Doc fix. (Fdelete_directory_internal): Don't move to trash. * src/callproc.c (delete_temp_file): * src/buffer.c (Fkill_buffer): Callers changed. * src/lisp.h: Update prototype. * lisp/diff.el (diff-sentinel): * lisp/epg.el (epg--make-temp-file, epg-decrypt-string) (epg-verify-string, epg-sign-string, epg-encrypt-string): * lisp/jka-compr.el (jka-compr-partial-uncompress) (jka-compr-call-process, jka-compr-write-region): * lisp/server.el (server-sentinel): Remove optional arg from delete-file, reverting 2010-05-03 change. * lisp/dired.el (dired-delete-file): New arg TRASH. (dired-internal-do-deletions): New arg TRASH. Use progress reporter. (dired-do-flagged-delete, dired-do-delete): Use trash. * lisp/files.el (delete-directory): New arg TRASH. * lisp/speedbar.el (speedbar-item-delete): Allow trashing. * lisp/net/ange-ftp.el (ange-ftp-del-tmp-name, ange-ftp-delete-file) (ange-ftp-rename-remote-to-remote) (ange-ftp-rename-local-to-remote) (ange-ftp-rename-remote-to-local, ange-ftp-load) (ange-ftp-compress, ange-ftp-uncompress): Remove optional arg from `delete-file'. (ange-ftp-delete-directory): Add optional arg to `delete-file', to allow trashing. * lisp/net/tramp-compat.el (tramp-compat-delete-file): Rewrite to handle new TRASH arg of `delete-file'. * lisp/net/tramp-fish.el (tramp-fish-handle-delete-directory) (tramp-fish-handle-delete-file) (tramp-fish-handle-make-symbolic-link) (tramp-fish-handle-process-file): Use null TRASH arg in `tramp-compat-delete-file' call. * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Use null TRASH arg in `tramp-compat-delete-file' call. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg. (tramp-gvfs-handle-write-region): Use null TRASH arg in `tramp-compat-delete-file' call. * lisp/net/tramp-imap.el (tramp-imap-handle-delete-file): Rename arg. (tramp-imap-do-copy-or-rename-file): Use null TRASH arg in `tramp-compat-delete-file' call. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) (tramp-smb-handle-write-region): Use null TRASH arg in tramp-compat-delete-file call. (tramp-smb-handle-delete-directory): Use tramp-compat-delete-file. (tramp-smb-handle-delete-file): Rename arg. * lisp/net/tramp.el (tramp-handle-delete-file): Change FORCE arg to TRASH. (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-process-file, tramp-handle-call-process-region) (tramp-handle-shell-command, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-write-region) (tramp-delete-temp-file-function): Use null TRASH arg in tramp-compat-delete-file call.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 27 May 2010 19:30:11 -0400
parents 992e676c0285
children aec1143e8d85
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
1 /* C code startup routine.
75227
e90d04cd455a Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents: 68651
diff changeset
2 Copyright (C) 1985, 1986, 1992, 2001, 2002, 2003, 2004,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100951
diff changeset
3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
4
Dave Love <fx@gnu.org>
parents:
diff changeset
5 This file is part of GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
6
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91702
diff changeset
7 GNU Emacs is free software: you can redistribute it and/or modify
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91702
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91702
diff changeset
10 (at your option) any later version.
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
11
Dave Love <fx@gnu.org>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
Dave Love <fx@gnu.org>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
Dave Love <fx@gnu.org>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Dave Love <fx@gnu.org>
parents:
diff changeset
15 GNU General Public License for more details.
Dave Love <fx@gnu.org>
parents:
diff changeset
16
Dave Love <fx@gnu.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91702
diff changeset
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
19
Dave Love <fx@gnu.org>
parents:
diff changeset
20
Dave Love <fx@gnu.org>
parents:
diff changeset
21 /* The standard Vax 4.2 Unix crt0.c cannot be used for Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
22 because it makes `environ' an initialized variable.
Dave Love <fx@gnu.org>
parents:
diff changeset
23 It is easiest to have a special crt0.c on all machines
Dave Love <fx@gnu.org>
parents:
diff changeset
24 though I don't know whether other machines actually need it. */
Dave Love <fx@gnu.org>
parents:
diff changeset
25
Dave Love <fx@gnu.org>
parents:
diff changeset
26 /* On the vax and 68000, in BSD4.2 and USG5.2,
Dave Love <fx@gnu.org>
parents:
diff changeset
27 this is the data format on startup:
Dave Love <fx@gnu.org>
parents:
diff changeset
28 (vax) ap and fp are unpredictable as far as I know; don't use them.
Dave Love <fx@gnu.org>
parents:
diff changeset
29 sp -> word containing argc
Dave Love <fx@gnu.org>
parents:
diff changeset
30 word pointing to first arg string
Dave Love <fx@gnu.org>
parents:
diff changeset
31 [word pointing to next arg string]... 0 or more times
Dave Love <fx@gnu.org>
parents:
diff changeset
32 0
Dave Love <fx@gnu.org>
parents:
diff changeset
33 Optionally:
Dave Love <fx@gnu.org>
parents:
diff changeset
34 [word pointing to environment variable]... 1 or more times
Dave Love <fx@gnu.org>
parents:
diff changeset
35 ...
Dave Love <fx@gnu.org>
parents:
diff changeset
36 0
Dave Love <fx@gnu.org>
parents:
diff changeset
37 And always:
Dave Love <fx@gnu.org>
parents:
diff changeset
38 first arg string
Dave Love <fx@gnu.org>
parents:
diff changeset
39 [next arg string]... 0 or more times
Dave Love <fx@gnu.org>
parents:
diff changeset
40 */
Dave Love <fx@gnu.org>
parents:
diff changeset
41
Dave Love <fx@gnu.org>
parents:
diff changeset
42 #ifdef emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
43 #include <config.h>
Dave Love <fx@gnu.org>
parents:
diff changeset
44 #endif
Dave Love <fx@gnu.org>
parents:
diff changeset
45
Dave Love <fx@gnu.org>
parents:
diff changeset
46 /* ******** WARNING ********
Dave Love <fx@gnu.org>
parents:
diff changeset
47 Do not insert any data definitions before data_start!
Dave Love <fx@gnu.org>
parents:
diff changeset
48 Since this is the first file linked, the address of the following
Dave Love <fx@gnu.org>
parents:
diff changeset
49 variable should correspond to the start of initialized data space.
Dave Love <fx@gnu.org>
parents:
diff changeset
50 On some systems this is a constant that is independent of the text
Dave Love <fx@gnu.org>
parents:
diff changeset
51 size for shared executables. On others, it is a function of the
Dave Love <fx@gnu.org>
parents:
diff changeset
52 text size. In short, this seems to be the most portable way to
Dave Love <fx@gnu.org>
parents:
diff changeset
53 discover the start of initialized data space dynamically at runtime,
Dave Love <fx@gnu.org>
parents:
diff changeset
54 for either shared or unshared executables, on either swapping or
Dave Love <fx@gnu.org>
parents:
diff changeset
55 virtual systems. It only requires that the linker allocate objects
Dave Love <fx@gnu.org>
parents:
diff changeset
56 in the order encountered, a reasonable model for most Unix systems.
Dave Love <fx@gnu.org>
parents:
diff changeset
57 Similarly, note that the address of _start() should be the start
Dave Love <fx@gnu.org>
parents:
diff changeset
58 of text space. Fred Fish, UniSoft Systems Inc. */
Dave Love <fx@gnu.org>
parents:
diff changeset
59
Dave Love <fx@gnu.org>
parents:
diff changeset
60 int data_start = 0;
Dave Love <fx@gnu.org>
parents:
diff changeset
61
Dave Love <fx@gnu.org>
parents:
diff changeset
62 char **environ;
Dave Love <fx@gnu.org>
parents:
diff changeset
63
Dave Love <fx@gnu.org>
parents:
diff changeset
64 static start1 ();
Dave Love <fx@gnu.org>
parents:
diff changeset
65
Dave Love <fx@gnu.org>
parents:
diff changeset
66 /* Define symbol "start": here; some systems want that symbol. */
Dave Love <fx@gnu.org>
parents:
diff changeset
67 asm(" .text ");
Dave Love <fx@gnu.org>
parents:
diff changeset
68 asm(" .globl start ");
Dave Love <fx@gnu.org>
parents:
diff changeset
69 asm(" start: ");
Dave Love <fx@gnu.org>
parents:
diff changeset
70
Dave Love <fx@gnu.org>
parents:
diff changeset
71 _start ()
Dave Love <fx@gnu.org>
parents:
diff changeset
72 {
Dave Love <fx@gnu.org>
parents:
diff changeset
73 /* On vax, nothing is pushed here */
Dave Love <fx@gnu.org>
parents:
diff changeset
74 start1 ();
Dave Love <fx@gnu.org>
parents:
diff changeset
75 }
Dave Love <fx@gnu.org>
parents:
diff changeset
76
Dave Love <fx@gnu.org>
parents:
diff changeset
77 static
108091
992e676c0285 Simplify m/intel386.h.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 107765
diff changeset
78 start1 (bogus_fp, argc, xargv)
25844
Dave Love <fx@gnu.org>
parents:
diff changeset
79 int argc;
Dave Love <fx@gnu.org>
parents:
diff changeset
80 char *xargv;
Dave Love <fx@gnu.org>
parents:
diff changeset
81 {
Dave Love <fx@gnu.org>
parents:
diff changeset
82 register char **argv = &xargv;
Dave Love <fx@gnu.org>
parents:
diff changeset
83 environ = argv + argc + 1;
Dave Love <fx@gnu.org>
parents:
diff changeset
84
Dave Love <fx@gnu.org>
parents:
diff changeset
85 if ((char *)environ == xargv)
Dave Love <fx@gnu.org>
parents:
diff changeset
86 environ--;
Dave Love <fx@gnu.org>
parents:
diff changeset
87 exit (main (argc, argv, environ));
Dave Love <fx@gnu.org>
parents:
diff changeset
88
Dave Love <fx@gnu.org>
parents:
diff changeset
89 /* Refer to `start1' so GCC will not think it is never called
Dave Love <fx@gnu.org>
parents:
diff changeset
90 and optimize it out. */
Dave Love <fx@gnu.org>
parents:
diff changeset
91 (void) &start1;
Dave Love <fx@gnu.org>
parents:
diff changeset
92 }
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
93
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
94 /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
95 (do not change this comment) */