* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Make use of
byte-to-native-lambdas-h and update for 'byte-to-native-func-def'.
(comp-spill-lap-function): Rework logic to retrive LAP using
'byte-to-native-lambdas-h'.
(comp-emit-for-top-level): Update for 'byte-to-native-function'.
* lisp/emacs-lisp/bytecomp.el: Add commentary on new spill LAP
mechanism.
(byte-to-native-lambda, byte-to-native-func-def): New structures.
(byte-to-native-top-level): Indent.
(byte-to-native-lambdas-h): Update doc.
(byte-compile-lapcode): Add a 'byte-to-native-lambda' instance
into byte-to-native-lambdas-h instead of just LAP.
(byte-compile-file-form-defmumble): Store into
'byte-to-native-func-def' only the byte compiled function, the LAP
will be retrived through 'byte-to-native-lambdas-h'.
(byte-compile-lambda): Return the byte compiled function.
The only effect of this change is to get rid of some unnecessary
"assignment to free variable" warnings.
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New
function.
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): No need anymore
to have `byte-native-compiling' bound to free-func.
(comp-spill-lap-function): Make use of `byte-to-native-lap-h' and
clean-up.
(comp-spill-lap-function): Likewise.
* lisp/emacs-lisp/bytecomp.el (byte-to-native-function): Add lap slot.
(byte-to-native-lap): Rename into byte-to-native-lap-h.
(byte-compile-lapcode): Spill lap after having int assembled and
store it into `byte-to-native-lap-h'.
(byte-compile-not-top-level): Remove.
(byte-compile-file-form-defmumble): Fill directly lap slot.
(byte-compile-lambda): Remove `byte-compile-not-top-level'.
(byte-compile-out-toplevel): Restore original code.
(byte-compile-form): Remove `byte-compile-not-top-level'.
(byte-compile-function-form): Likewise.
(byte-compile-flush-pending): No need anymore to set
`byte-compile-current-form' so restore orignal code.
Stash the major version of the compiling Emacs such that the loading
Emacs can later detect when loading a file compiled by a too-new Emacs.
(byte-compile-fix-header): Remove.
(byte-compile-from-buffer): Don't call it any more.
(byte-compile-insert-header): Stash the emacs-major-version in it.
Don't leave space for `byte-compile-fix-header`.
The 'substring' byte op was not emitted, apparently by mistake. Fix.
Suggested by Mark Oteiza <mvoteiza@udel.edu>.
* lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add '1-3' clause.
(byte-compile-one-to-three-args): New.
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops):
Add 'byte-substring'.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Test 'substring'.
This avoids some race conditions (Bug#39683). E.g., if some other
program changes a file to a symlink between the time Emacs creates
the file and the time it changes the file’s permissions, using the
new flag prevents Emacs from inadvertently changing the
permissions of a victim in some completely unrelated directory.
* admin/merge-gnulib (GNULIB_MODULES): Add fchmodat.
* doc/lispref/files.texi (Testing Accessibility, Changing Files):
* doc/lispref/os.texi (File Notifications):
* etc/NEWS:
Adjust documentation accordingly.
* lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4:
* m4/lchmod.m4: New files, copied from Gnulib.
* lib/gnulib.mk.in: Regenerate.
* lisp/dired-aux.el (dired-do-chmod):
* lisp/doc-view.el (doc-view-make-safe-dir):
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/eshell/em-pred.el (eshell-pred-file-mode):
* lisp/files.el (backup-buffer-copy, copy-directory):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/gnus/mm-decode.el (mm-display-external):
* lisp/gnus/nnmail.el (nnmail-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region):
* lisp/net/tramp.el (tramp-handle-write-region)
(tramp-make-tramp-temp-file):
* lisp/server.el (server-ensure-safe-dir):
* lisp/url/url-util.el (url-make-private-file):
When getting or setting file modes, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lisp/doc-view.el (doc-view-make-safe-dir):
Omit no-longer-needed separate symlink test.
* lisp/gnus/gnus-util.el (gnus-set-file-modes):
* lisp/net/tramp.el (tramp-handle-file-modes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
* src/fileio.c (symlink_nofollow_flag): New function.
(Ffile_modes, Fset_file_modes):
Support an optional FLAG arg. All C callers changed.
* lisp/net/ange-ftp.el (ange-ftp-set-file-modes):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* m4/gnulib-comp.m4: Regenerate.
During boo-strap we produce both the .eln and the .elc together.
Because the make target is the later this has to be produced as last
to be resilient to build interruptions.
According to the GNU coding standards (info "(standards) Errors"):
> If you want to mention the column number, use one of these formats:
> SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE
> SOURCE-FILE-NAME:LINENO.COLUMN: MESSAGE
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Add space
before message in byte compiler warnings to comply with the GNU coding
standards. (Bug#18969)
They have not been generated by the byte-compiler since Emacs 25.
* lisp/emacs-lisp/bytecomp.el (byte-catch, byte-condition-case):
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Mark as obsolete (since Emacs 25; they were still generated in 24.4).
186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3
4cd143aded Fix copyright years by hand
365e01cc9f Update copyright year to 2020
cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac...
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex