-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge commit 'db71b31827' from emacs upstream (2018-04-14) #1558
base: master
Are you sure you want to change the base?
Conversation
harryfei
commented
Dec 28, 2019
•
edited
edited
- port b300052: Try and speed up byte<->char conversion with many markers.
- port ed962f2: Fix bug#30846, along with misc cleanups found along the way
- port d06c2e7: Add a history variable for `read-variable'
- port 6f66a43: Centralize Bug#30931 fix
* admin/nt/dist-build/build-zips.sh: Check for missing Makefile.
* admin/nt/dist-build/build-zips.sh: Limit build load.
* lisp/allout.el (allout-passphrase-verifier-string) (allout-passphrase-hint-string): * lisp/w32-vars.el (w32-list-proportional-fonts): Remove variables that are unused since Emacs 23.x.
* lisp/gnus/gnus-registry.el (gnus-registry-clean-empty) (gnus-registry-use-long-group-names) (gnus-registry-max-track-groups, gnus-registry-entry-caching) (gnus-registry-trim-articles-without-groups): Remove variables labeled as obsolete since 23.4 that do nothing.
* admin/nt/dist-build/build-zips.sh: Reduce parallelism to 8
* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): New function. Set the byte optimizer function for memq to byte-optimize-memq.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): Call byte-optimize-and only for memq forms that can be optimized, use byte-optimize-predicate to optimize the final form.
* doc/emacs/misc.texi (FFAP): Complete commands. (Amusements): Add some @cindex entries. Add "M-x butterfly".
This is sometimes convenient when writing macros, so that the empty variable case doesn't need to be handled specially. Older versions of Emacs accepted this in some cases (especially the interpreter in Emacs 25 and below was very accepting). | interpreted/compiled | | arglist | 25 & earlier | 26 | 27 | |---------------------------+--------------+-----+-----| | (&rest) | y/n | n/n | y/y | | (&rest &rest) | y/n | n/n | n/n | | (&rest &rest x) | y/n | n/n | n/n | | (&rest x &rest) | y/n | n/n | n/n | | (&rest x &rest y) | y/n | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional) | y/n | n/n | y/y | | (&optional &optional) | y/n | n/n | n/n | | (&optional x &optional) | y/n | n/n | n/n | | (&optional x &optional y) | y/y | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional &rest) | y/n | n/n | y/y | | (&optional x &rest) | y/n | n/n | y/y | | (&optional &rest y) | y/y | n/n | y/y | |---------------------------+--------------+-----+-----| | (&rest &optional) | y/n | n/n | n/n | | (&rest &optional y) | y/n | n/n | n/n | | (&rest x &optional y) | y/n | n/n | n/n | The values in the table above can be produced with the following code: (with-current-buffer (get-buffer-create "*ck-args*") (erase-buffer) (dolist (arglist '((&rest) (&rest &rest) (&rest &rest x) (&rest x &rest) (&rest x &rest y) (&optional) (&optional &optional) (&optional x &optional) (&optional x &optional y) (&optional &rest) (&optional x &rest) (&optional &rest y) (&rest &optional) (&rest &optional y) (&rest x &optional y))) (insert (format "%c/%c\n" (condition-case err (progn (funcall `(lambda ,arglist 'ok)) ?y) (error ?n)) (condition-case err (progn (byte-compile-check-lambda-list arglist) ?y) (error ?n)))) (display-buffer (current-buffer)))) * src/eval.c (funcall_lambda): * lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): Don't check for missing variables after `&rest' and `&optional'. * test/src/eval-tests.el (eval-tests--bugs-24912-and-24913) (eval-tests-accept-empty-optional-rest): Update tests accordingly. * etc/NEWS: Update announcement accordingly. * doc/lispref/functions.texi (Argument List): Update manual to indicate that variable names are optional.
* doc/emacs/basic.texi: * doc/emacs/calendar.texi: * doc/emacs/display.texi: * doc/emacs/mini.texi: * doc/emacs/misc.texi: * doc/emacs/picture-xtra.texi: * doc/misc/info.texi: Prefer <PageDown> and <PageUp> over <next> and <prior>. Add missing @kindex entries. * doc/emacs/custom.texi (Function Keys): Fix and add missing key symbols.
* lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing and numeric conversion in function in order to parse -signal and -SIGNALNAME correctly. * doc/misc/eshell.texi (kill): Update docs to reflect new function behaviour. * etc/NEWS: Mention new eshell/kill behaviour.
* src/nsterm.m (x_free_frame_resources): Clear represented_frame. (bug#30800)
* admin/nt/dist-build/build-dep-zips.py:
* lisp/net/tramp.el (tramp-handle-file-truename): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Fix problem with trailing slash. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Test also quoted directories.
…kers. When considering markers (to find a starting point for the conversion), typically one of the two bounds is nearby (coming from cached_(byte|char)pos) but the other is far (point-min or point-max), so change the exit condition so we stop as soon as *one* of the bounds is near. (BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): New constants. (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use them to try and reduce the number of markers we consider.
(package--quickstart-pkgs): New var. (package-activate-1): Obey and fill it. (package-activate-all): New function. (package-initialize): Call it. Set package-initialized before activating the packages. (package-installed-p): Make it work before package.el is initialized in the case where min-version is not specified. (package-install, package-delete): Refresh the quickstart if applicable. (package-quickstart, package-quickstart-file): New vars. (package--quickstart-maybe-refresh, package-quickstart-refresh): New functions. * lisp/startup.el (command-line): Use package-activate-all rather than package-initialize. * doc/lispref/package.texi (Packaging Basics): * doc/emacs/package.texi (Package Installation): * doc/lispref/os.texi (Startup Summary): Refer to package-activate-all.
* lisp/emacs-lisp/package.el (package-quickstart): Add missing version. * src/marker.c (verify_bytepos): Fix typo.
For the following release it is planned to make `if-let*' and `when-let*' aliases for `if-let' and `when-let'. For now we revert declaring `if-let' and `when-let' obsolete and tweak the docstrings. * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings refer to those of `if-let' and `when-let'. (if-let, when-let): De-obsolete. Rewrite documentation.
This suppresses some byte-code optimizations that were invalid in the presence of integer overflows, because they meant that .elc files assumed the runtime behavior of the compiling platform, as opposed to the runtime platform. Problem reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2018-03/msg00753.html * lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max) (byte-opt--portable-min): New constants. (byte-opt--portable-numberp, byte-opt--arith-reduce) (byte-optimize-1+, byte-optimize-1-): New functions. (byte-optimize-plus, byte-optimize-minus, byte-optimize-multiply) (byte-optimize-divide): Avoid invalid optimizations. (1+, 1-): Use new optimizers. (byte-optimize-or, byte-optimize-cond): Simplify by using remq instead of delq and copy-sequence.
(benchmark-run): Allow `repetitions` to be a variable rather than a constant.
(bytecomp-test-featurep-warnings): New.
* lisp/net/eww.el (eww-link-keymap): Only inherit the normal shr keymap. (eww-image-link-keymap): New keymap with the image bindings. (eww-tag-a): Use the appropriate one on links (bug#30148).
* simple.el (kill-new, current-kill): Non-destructively reverse list returned by interprogram-paste-function. (bug#31097)
* lisp/gnus/mm-decode.el: Do not require shr.el at the top of the file; `mm-shr' already requires shr.el in its body, and this function is the only `mm-convert-shr-links' caller (Bug#31151).
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Place entries from system-wide mailcap files after the values that are distributed with Emacs, and the ones from ~/.mailcap before. (mailcap-parse-mailcap): Take an optional `after' parameter to achieve that. (mailcap-add-mailcap-entry): Ditto.
* msdos/sed1v2.inp (lisp.mk): Fix escaping in Sed commands.
This reverts commit ef2059e. Apparently this test triggered both when signing was successful and unsuccessful (bug#26298).
* lisp/image-mode.el (image--imagemagick-wanted-p): New function (bug#29584). (image-toggle-display-image): Use it to see whether we want to use imagemagick.
* lisp/gnus/message.el (message-from-style): Make `angles' the default (bug#29309) and mark as obsolete. * lisp/mail/sendmail.el (mail-from-style): Ditto.
5a6bb01 (origin/emacs-26) Fix building etc/DOC in the MSDOS port 274c979 * lisp/select.el (gui-get-selection): Doc fix. ad731b0 ; * doc/lispref/display.texi (Temporary Displays): Fix typos. f1450e9 Complete documentation of syntax flags by adding `c' 6bdcaec Fix typos and minor wording issues in ELisp manual febac27 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 6c2e21e Avoid segfault in processes of type 'pipe' 60e10c5 Remove repetitions in documentation strings 208e752 * lisp/image.el (image-load-path): Doc fix. 92e0fd8 ; * etc/NEWS: Remove a FIXME. (Bug#31122) Conflicts: etc/NEWS
07a8a0d
to
d27f7cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the el files, but the Rust changes look great.
Need to fix the errors in tests. |
rust_src/src/buffers.rs
Outdated
// track of both bytepos and charpos at the same time). | ||
// But if there are many markers, it can take too much time to find a "good" | ||
// marker from which to start. Worse yet: if it takes a long time and we end | ||
// up finding a nearby markers, we won't add a new marker to cache this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"finding a nearby markers". This should either be "finding nearby markers" or "finding a nearby marker".
Once this tests are working this looks reasonable. |
d27f7cb
to
07a8a0d
Compare
Odd, it's complaining about not having rustfmt installed |
Yeah, rustfmt is no longer preview. I fixed this recently. This PR needs to rebase to get it. |
07a8a0d
to
204f981
Compare
There's a segfault happening:
|
Can't resolve the issue by myself. Welcome anyone to work on it. |
@@ -2134,7 +2134,7 @@ character_name_to_code (char const *name, ptrdiff_t name_len) | |||
monstrosities like "U+-0000". */ | |||
Lisp_Object code | |||
= (name[0] == 'U' && name[1] == '+' | |||
? string_to_number (name + 1, 16, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change appears out of place.
@@ -2488,7 +2488,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix) | |||
invalid_syntax (buf); | |||
} | |||
|
|||
return string_to_number (buf, radix, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
int flags = (read_integer_overflow_as_float | ||
? S2N_OVERFLOW_TO_FLOAT : 0); | ||
Lisp_Object result = string_to_number (read_buffer, 10, flags); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these flags coming from? I do not see it in the emacs-26 tree.