Stefan Kangas [Sun, 9 Jun 2019 02:27:09 +0000 (04:27 +0200)]
Make toolbar show keyboard equivalents in its tooltips
* src/keyboard.c (parse_tool_bar_item): Add equivalent key binding to
the tooltip string of toolbar buttons.
* etc/NEWS: Announce it.
* etc/TODO: Remove its entry. (Bug#36156)
Eli Zaretskii [Sat, 22 Jun 2019 08:59:16 +0000 (11:59 +0300)]
Fix an off-by-one error in assertion
* src/fileio.c (Fexpand_file_name): Fix off-by-one error in an
assertion. This avoids assertion violations when the home
directory is an empty string for some reason. (Bug#36363)
Eli Zaretskii [Sat, 22 Jun 2019 08:51:50 +0000 (11:51 +0300)]
Correct and update the mapping of LaTeX encodings
* lisp/international/latexenc.el
(latex-inputenc-coding-alist): Fix the association of latin5.
(Bug#36253) Uncomment latin10 and map it to iso-8859-16.
Eli Zaretskii [Sat, 22 Jun 2019 08:34:23 +0000 (11:34 +0300)]
Avoid using string-make-unibyte in select.el
* lisp/select.el (selection-coding-system): Doc fix.
(xselect--encode-string): For C_STRING, if the text is not
already unibyte, use encode-coding-string instead of
string-make-multibyte to make it unibyte.
Paul Eggert [Fri, 21 Jun 2019 21:45:35 +0000 (14:45 -0700)]
Remove src/macuvs.h from Git repository
It can be generated automatically and easily during a normal
bootstrap, so there’s no need to keep it in the repository.
* admin/unidata/Makefile.in (maintainer-clean):
Behave like extraclean and remove macuvs.h etc.
* src/macuvs.h: Remove.
Stefan Monnier [Fri, 21 Jun 2019 05:16:54 +0000 (01:16 -0400)]
* lisp/vc/ediff-*.el: Use lexical-binding, plus misc cleanup
Re-enable lexical-binding in ediff. For that, change ediff-find-file
so as not to rely on dynamic scoping in its calling convention.
* lisp/vc/ediff-diff.el: Move `provide` to the end.
Remove redundant :group.
(ediff-exec-process): Disregard current directory.
(ediff-forward-word-function): Use defvar-local.
* lisp/vc/ediff-help.el (ediff-set-help-message): Use functionp.
* lisp/vc/ediff-hook.el (menu-bar-ediff-misc-menu): Make a toggle, as
in the XEmacs menu.
* lisp/vc/ediff-mult.el: Move `provide` to the end.
Remove redundant :groups.
(ediff-dir-diffs-buffer-map):
Move initialization into declaration.
(ediff-meta-mode): Use define-derived-mode.
(ediff-intersect-directories): Remove `comparison-func`, unused.
(ediff-prepare-meta-buffer): Fix use of `startup-hooks`.
* lisp/vc/ediff-ptch.el: Move `provide` to the end.
* lisp/vc/ediff-util.el (ediff-add-to-history): Use add-to-history instead.
* lisp/vc/ediff-vers.el (ediff-vc-internal, ediff-vc-merge-internal):
Use push and closures.
* lisp/vc/ediff.el: Move `provide` to the end.
Remove redundant :groups.
(ediff--magic-file-name, ediff--startup-hook): New vars.
(ediff-find-file): Change calling convention so as not to use
symbols as value cells.
(ediff--buffer-file-name): New function.
(ediff-files-internal): Adjust to new calling convention of ediff-find-file.
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-internal): Use push and closures.
Paul Eggert [Thu, 20 Jun 2019 18:18:14 +0000 (11:18 -0700)]
Fix extraclean in a different way for info+lib/sys
* Makefile.in (extraclean):
* lib/Makefile.in (extraclean): Use rmdir but suppress any
error indication. That way, ‘make extraclean’ will remove the
directory if it’s empty, and successfully do nothing otherwise.
Paul Eggert [Thu, 20 Jun 2019 15:56:22 +0000 (08:56 -0700)]
Simplify lib-src version printing
* lib-src/Makefile.in (etags_cflags): Remove.
All uses replaced by a simple ‘-o $@’.
(ebrowse${EXEEXT}, emacsclient${EXEEXT}, emacsclientw${EXEEXT}):
Omit -DVERSION= option.
* lib-src/ebrowse.c (VERSION):
* lib-src/emacsclient.c (VERSION):
* lib-src/etags.c (EMACS_NAME, VERSION): Remove.
All uses replaced by PACKAGE_NAME and PACKAGE_VERSION.
* lib-src/ebrowse.c (version):
* lib-src/etags.c (print_version):
Use fputs to output the version info, since that’s fputs_unlocked.
* lib-src/etags.c (PROGRAM_NAME): New macro.
(print_version): Use it.
Make extraclean return tree to pristine state by deleting more
* src/Makefile.in (extraclean): Remove TAGS and config.in.
* Makefile.in (extraclean): Remove info, configure and
emacsver.texi in extraclean.
* admin/unidata/Makefile.in (extraclean): Make it depend on
distclean to remove .elc files.
* leim/Makefile.in (extraclean): Depend on bootstrap-clean to
remove generated .el files.
* lib/Makefile.in (extraclean): Added target to remove sys
directory and run distclean.
* lisp/Makefile.in (extraclean): Also remove loaddefs*.el~ files.
Don't define *, ** and ** in ielm as real variables
* lisp/ielm.el: (*, **, ***): Change defvars into compiler
directives instead of real variable definitions to avoid polluting
the global Emacs namespace.
(*1, *2, *3): Ditto.
* lisp/eshell/esh-mode.el (eshell-mode): Remove special binding
for M-. in eshell buffers: The comment indicates that this is
outdated code.
(eshell-find-tag): Make obsolete.
* lisp/mail/binhex.el (binhex-insert-char): Remove XEmacs compat
code and made into a function instead of a defalias.
(binhex-decode-region-internal): Remove XEmacs compat code.
Paul Eggert [Thu, 20 Jun 2019 07:35:41 +0000 (00:35 -0700)]
Remove no-longer-needed fflushes of stderr
* src/gmalloc.c (mabort) [GC_MCHECK && !__GNU_LIBRARY__]:
* src/term.c (vfatal): Remove fflush (stderr) when it is now a
no-op because newline automatically flushes stderr.
Change font_put_extra value for property removal from Qnil to Qunbound
* font.c (font_put_extra): If VAL is Qunbound, delete the slot for PROP from
the list of extra properties. Previous value Qnil is valid as boolean.
(font_clear_prop): Changed argument of font_put_extra for property removal.
Juri Linkov [Wed, 19 Jun 2019 21:55:07 +0000 (00:55 +0300)]
Add file sorting options to find-dired and grep-find (bug#36110)
* lisp/find-dired.el (find-ls-option-default-ls)
(find-ls-option-default-exec, find-ls-option-default-xargs):
New variables for values used for options of 'find-ls-option'.
(find-ls-option): Use these variables for default values and options.
(find-dired-refine-function): Refine :type.
* lisp/progmodes/grep.el (grep-find-use-xargs): Use defcustom
instead of defvar. Add new value 'gnu-sort'.
(grep-compute-defaults): Handle new 'gnu-sort' option of
'grep-find-use-xargs'.
* lisp/emacs-lisp/eieio.el (object-print):
* lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string):
Move the defgeneric before the defmethod, because that makes more
sense.
Fix previous change to erc (where commands like /me wouldn't be sent)
* lisp/erc/erc-ring.el (erc-add-to-input-ring):
* lisp/erc/erc-goodies.el (erc-send-distinguish-noncommands): Pass
in a erc-input structure instead of a simple string.
* lisp/erc/erc.el (erc-pre-send-functions): Document the new
argument to the filter functions.
(erc-send-input): Use the new structure to allow the filter
functions to alter all three things: The string, whether to insert
the string, and whether to send the string.
Stefan Monnier [Wed, 19 Jun 2019 14:47:55 +0000 (10:47 -0400)]
(with-suppressed-warnings): Make it apply to macro-expansion as well
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Change with-suppressed-warnings so it also affects the macro-expansion of
the body.
Rename function in completion.el to use completion- prefixes
* lisp/completion.el (locate-completion-entry)
(completion-locate-entry, locate-completion-entry-retry)
(completion-locate-entry-retry, locate-completion-db-error):
Rename to use a completion- prefix and make the old names obsolete
aliases.
(add-completion-to-head, delete-completion): Use the new function
names.
Stefan Monnier [Wed, 19 Jun 2019 13:53:06 +0000 (09:53 -0400)]
* lisp/textmodes/page-ext.el: Further cleanup
(pages--ctl-x-ctl-p-map): Rename from ctl-x-ctl-p-map.
Move initialization into declaration.
(pages-ctl-x-ctl-p-prefix): Rename from ctl-x-ctl-p-prefix.
(sort-subr): Remove redundant autoload.
(pages-set-delimiter): Use explicit `interactively` arg instead of
`called-interactively`. Use `setq-local`.
(pages-directory-for-addresses): Use `setq-local`.
* lisp/pcmpl-gnu.el (pcomplete/tar): Remove binding of
pcomplete-suffix-list, because it's not consulted in any of the
functions called here, and has had no effect since 2011. If we
want to support not inserting a space after the = sign, we have to
implement that, but it's not currently done.
* lisp/textmodes/page-ext.el (previous-page)
(search-pages)
(sort-pages-in-region)
(sort-pages-buffer)
(pages-sort-buffer)
(pages-set-delimiter): Rename to have pages- prefixes and make the
previous name into aliases for the new names.
(ctl-x-ctl-p-map): Use the new command names.
* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-ari)
(skkdic-convert-postfix, skkdic-convert-prefix)
(skkdic-collect-okuri-nasi): Use INFO progress reporting.
(skkdic-set-okuri-nasi): Use the progress reporter instead of a
per-1000 output.
* lisp/cedet/semantic/grammar.el
(semantic-grammar-expected-conflicts): New function.
(semantic-grammar-insert-defconst-with-eval): New function.
(semantic-grammar-create-package): Output the number of expected
shift/reduce conflicts.
* lisp/cedet/semantic/wisent/comp.el (wisent-total-conflicts):
Don't output the warning if the number of shift/reduce conflicts
is expected.
(wisent-expected-conflicts): Made obsolete.
Compile any subsequence of `cond' clauses to switch (bug#36139)
A single `cond' form can how be compiled to any number of switch ops,
optionally interspersed with non-switch conditions.
Previously, switch ops would only be used for whole `cond' forms
containing no other tests.
* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-vars):
Rename from `byte-compile-cond-vars'.
(byte-compile--default-val): Remove.
(byte-compile--cond-switch-prefix):
Replace `byte-compile-cond-jump-table-info'; now also returns
trailing non-switch clauses.
(byte-compile-cond-jump-table): New arguments; no longer compiles
the default case.
(byte-compile-cond): Look for and compile switches at any place in the
list of clauses.
* test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data):
Add test expression.
Compile cond with heterogeneous tests into switch (bug#36139)
Allow any mixture of `eq', `eql' and `equal', `memq', `memql' and
`member' in a switch-like `cond' to be compiled into a single switch.
* lisp/emacs-lisp/bytecomp.el (byte-compile--common-test): New.
(byte-compile-cond-jump-table-info): Use most specific common test.
* test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data):
Add test cases for multi-value clause cond forms.
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-*.