Tighter pcase or-pattern member function selection (bug#36139)
* lisp/emacs-lisp/pcase.el (pcase--u1):
Use the most specific of `memq', `memql' and `member' in or-patterns
with constant cases. This improves performance and may help the byte-code
compiler generate a switch.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member):
Add mixed-type or-pattern test cases.
Compile list member functions in cond to switch (bug#36139)
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
Expand `memq', `memql' and `member' to their corresponding
equality tests.
(byte-compile-cond-jump-table): Cases now have multiple values.
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1)
(byte-optimize-lapcode): Don't assume switch hash tables to be injective.
Paul Eggert [Wed, 19 Jun 2019 07:06:39 +0000 (00:06 -0700)]
--with-cairo is no longer experimental
Suggested by YAMAMOTO Mitsuharu in:
https://lists.gnu.org/r/emacs-devel/2019-06/msg00686.html
* configure.ac: Do not say --with-cairo is experimental.
* etc/NEWS: Say that --with-cairo is no longer experimental.
Glenn Morris [Tue, 18 Jun 2019 22:47:49 +0000 (15:47 -0700)]
Disable lexical-binding in ediff
Since it breaks the thing (bug#36157, bug#36281).
* lisp/vc/ediff-diff.el, lisp/vc/ediff-help.el, lisp/vc/ediff-hook.el:
* lisp/vc/ediff-init.el, lisp/vc/ediff-merg.el, lisp/vc/ediff-mult.el:
* lisp/vc/ediff-ptch.el, lisp/vc/ediff-vers.el, lisp/vc/ediff-wind.el:
* lisp/vc/ediff.el: Set lexical-binding to nil.
Eli Zaretskii [Tue, 18 Jun 2019 17:21:40 +0000 (20:21 +0300)]
Fix the handling of font backend supersedence on MS-Windows
* src/w32font.c (syms_of_w32font): Don't make the Uniscribe
font backend "superceded" here, ...
* src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper):
... make it "superceded" here, only if the HarfBuzz DLL was
successfully loaded. This is because Emacs compiled with
HarfBuzz support might run on a system without the DLL.
* src/w32fns.c (Fx_create_frame, w32_create_tip_frame):
Register the HarfBuzz font backend only if it is available.
Add a mechanism to specify expected shift/reduce .wy conflicts
* admin/grammars/python.wy: Set the expected number of
shift/reduce conflicts to four.
* lisp/cedet/semantic/grammar.el
(semantic-grammar-expected-conflicts): New function.
* lisp/cedet/semantic/wisent/comp.el (wisent-total-conflicts): Use
it to suppress warnings about the expected number of shift/reduce
conflicts.
Rename symbols in ind-util.el to have indian- prefixes
* lisp/language/ind-util.el (indian-ucs-to-is13194-regexp)
(indian-ucs-to-iscii-region, indian-iscii-to-ucs-region): Rename
unprefixed function to indian-*.
* lisp/finder.el (finder-compile-keywords): Instead of outputting
the directories being scanned, output progress reports on the
number of files being scanned. This makes the output more similar
to the autoload scraping.
Touch up the byte-compilation messaging in skkdic-set-okuri-nasi
* lisp/international/ja-dic-cnv.el (skkdic-set-okuri-nasi): Use
the "INFO" format for these informational messages, and be more
explicit in saying what they're doing.
* admin/grammars/js.wy: Add types to the FALSE, TRUE and QUERY tokens.
Without the types, you'd get the warning
*Warning* default value of <<no-type>> tokens changed to QUERY, was NULL_TOKEN
*Warning* default value of <<no-type>> tokens changed to TRUE, was QUERY
*Warning* default value of <<no-type>> tokens changed to FALSE, was TRUE
I think this should be harmless, and it doesn't seem to break handling
.js files.
Roland Winkler [Tue, 18 Jun 2019 05:59:11 +0000 (00:59 -0500)]
* bookmark.el: Watch bookmark file. Use lexical binding.
(bookmark-watch-bookmark-file): New user variable.
(bookmark-alist): Fix docstring.
(bookmark-bookmarks-timestamp): Renamed from bookmarks-already-loaded.
(bookmark-maybe-load-default-file, bookmark-save, bookmark-load):
Use bookmark-bookmarks-timestamp.
(bookmark-bmenu-mode-map): Define menu bar menu.
(bookmark-show-annotation, bookmark-show-all-annotations):
Make bookmarks buffer read-only.
(bookmark-bmenu-save): Use call-interactively.
* src/font.c (font_update_drivers): If argument NEW_DRIVERS is t, then don't
use superseded drivers.
(syms_of_font) <Qfont_driver_superseded_by>: New DEFSYM.
Output progress messages when scraping autoloads during bootstrap
* lisp/emacs-lisp/byte-run.el (byte-compile-info-message): New
function to outout informational messages during byte compilation.
* lisp/emacs-lisp/autoload.el (update-directory-autoloads): Use it
to report progress when scraping autoloads during bootstrap (which
may take half a minute).
Compilation work-around for obsolete eieio-object-set-name-string
* lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string):
Move the generic definition of this method to here from eieio.el
and place it after the cl-method definition. This avoids a
warning about it being obsolete when doing macro expansion.
Work around warning from macroexpanding obsolete method
* lisp/emacs-lisp/eieio.el (object-print): Move method definition
to before generic definition because the generic definition
obsoletes the method, which will then output a warning from when
macroexpanding.
Alex Branham [Fri, 14 Jun 2019 18:15:36 +0000 (13:15 -0500)]
Avoid a flyspell error if point is at beginning of buffer
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify): Check
if point is at the beginning of the buffer. This prevents an error
when e.g. 'flyspell-auto-correct-word' gets called with point at the
beginning of the buffer.
Fix use of obsolete constructor in semantic/complete.el
* lisp/cedet/semantic/complete.el (make-instance): Use
make-instance instead of the obsolete constructor method... which
didn't work, anyway. The following would bug out
Fix compilation warning by having ede-target inherit from eieio-named
* lisp/cedet/ede/base.el (ede-target): Inherit from eieio-named so
that if you're customizing objects via eieio-object-value-get, you
can set the name.
* lisp/emacs-lisp/eieio-custom.el (eieio-object-value-get): Don't
use obsolete function `eieio-object-set-name-string'.
Suppress warning in isearchb about iswitchb being obsolete
* lisp/isearchb.el (obsolete): Suppress warning about package
being obsolete. Instead, this has been reported to the bug
tracker, because it requires a rewrite of isearchb.
Make do-after-load-evaluation check whether warnings are enabled.
* lisp/subr.el (do-after-load-evaluation): Heed
`byte-compile-warning-enabled-p', if defined. This allows
suppressing the warning about packages being obsolete.
* lisp/emacs-lisp/eieio.el (cl-print-object): Suppress the warning
about object-print being obsolete, since there are no in-tree
methods like that any more.
Make with-suppressed-warnings work in cl-defmethod
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Pass the symbol
name on to `byte-compile-warning-enabled-p' to make
with-suppressed-warnings work in cl-defmethods, too.
* lisp/cedet/semantic/db.el (object-print): Remove; unused.
* lisp/cedet/semantic/db.el (semanticdb-debug-info): New method.
(object-print): Rewritten to be cl-print-object.
* lisp/emacs-lisp/eieio.el (eieio-object-name): Allow the EXTRA
argument to be a list of strings.
Eric Abrahamsen [Mon, 17 Jun 2019 02:14:25 +0000 (19:14 -0700)]
Prevent the Gnus registry from being loaded twice at startup
* lisp/gnus/gnus-registry.el (gnus-registry-load): Check if the
registry is already loaded, and don't load again unless new optional
FORCE argument is non-nil.
(gnus-registry-clear): New function to clear the registry, added as
a Gnus shutdown. Now that loading doesn't unilaterally reset the
registry, we need to make sure it is reloaded when Gnus is.
Fix up the --no-print-directory changes in src/Makefile.in
* src/Makefile.in (AM_V_NO_PD): New macro written by Andreas
Schwab that can be either --no-print-directory or "".
(%.elc): Use it instead if the if statement.
Alan Mackenzie [Sun, 16 Jun 2019 15:46:12 +0000 (15:46 +0000)]
CC Mode: Remedy recent loss in performance
* lisp/progmodes/cc-engine.el (c-back-over-member-initializers): call
c-parse-state outside of the narrowing operation.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context)
(c-font-lock-cut-off-declarators): Replace calls to c-determine-limit with
crude position calculations for speed.
Avoid "unknown slot" compilation warning in eieio-custom
* lisp/emacs-lisp/eieio-custom.el
(eieio-read-customization-group): Slot `name' may not exist in all
classes, so protect against that (and avoid a compilation warning
about it).
Alan Mackenzie [Sun, 16 Jun 2019 11:52:01 +0000 (11:52 +0000)]
Maintain c-syntax-table-hwm when changing syntax-table text properties
* lisp/progmodes/cc-defs.el: (c-syntax-table-hwm): Move the defvar to here
from cc-mode.el, since the variable is needed at compile time in
c-emacs-features.
(c-min-property-position): New macro.
(c-put-char-property, c-clear-char-property, c-clear-char-properties)
(c-clear-char-property-with-value-function)
(c-clear-char-property-with-value-on-char-function)
(c-put-char-properties-on-char): Adjust c-syntax-table-hwm appropriately when
syntax-table text properties are changed.
* lisp/progmodes/cc-engine.el (c-truncate-lit-pos-cache): Remove the now
unneeded setting of c-syntax-table-hwm, and the unneeded declaration of
c-syntax-table-hwm.
Dmitry Gutov [Sun, 16 Jun 2019 00:49:46 +0000 (03:49 +0300)]
Fix regressions in xref-find-definitions and ...-other-window
* lisp/progmodes/xref.el:
(xref--display-buffer-in-other-window)
(xref--display-buffer-in-window): New functions.
(xref--show-pos-in-buf): Use them (bug#33870)
Noam Postavsky [Wed, 12 Jun 2019 11:31:23 +0000 (07:31 -0400)]
Always try to display tree-widget with images (Bug#36147)
Checking the result of display-images-p doesn't make sense if the
display capabilities when loading the file are different from the
display used to actually look at the widget (which is easily possible
now that Emacs supports both tty and graphic frames in the same
instance).
* lisp/tree-widget.el (tree-widget-image-enable): Default to t,
always. This still shows text on displays that can't show images.
Glenn Morris [Sat, 15 Jun 2019 16:50:32 +0000 (09:50 -0700)]
Merge from origin/emacs-26
f53ce87 ; ChangeLog.3 update eca2677 Fix description of 'display-buffer-in-previous-window' again ... 7be50cd Consistently use @minus{} for negative arguments
Eli Zaretskii [Sat, 15 Jun 2019 16:28:51 +0000 (19:28 +0300)]
Improve error message when dmpstruct.h needs to be updated
* src/pdumper.c (dump_cons, dump_interval_tree, dump_string)
(dump_marker, dump_overlay, dump_finalizer)
(dump_bignum, dump_float, dump_fwd_int, dump_fwd_bool)
(dump_fwd_obj, dump_fwd_buffer_obj, dump_fwd_kboard_obj)
(dump_fwd, dump_blv, dump_symbol, dump_vectorlike_generic)
(dump_hash_table, dump_buffer, dump_bool_vector, dump_subr)
(dump_vectorlike, dump_object, dump_charset) [CHECK_STRUCTS]:
Make the error message more specific where to find the comment
to CHECK_STRUCTS.
* lisp/mail/feedmail.el (feedmail-queue-send-edit-prompt-inner):
Return the helper function (instead of the symbol `helper') so
that the caller can actually call it.
* lisp/eshell/esh-cmd.el (pcomplete--here): Declare function to
avoid byte compilation warning, which is what erc-notify.el also
does in a similar situation.