Commit graph

139866 commits

Author SHA1 Message Date
Phillip Lord
f10409914d Update for Emacs-28
* admin/nt/dist-build/build-dep-zips.py: Emacs major version number.
2019-12-26 21:15:32 +01:00
Lars Ingebrigtsen
ea5e33d1da Fix bogus test in body of a while loop
* lisp/gnus/nnheader.el (nnheader-find-nov-line): Fix return value
from while loop.
2019-12-26 19:46:27 +01:00
Mattias Engdegård
9b5ac5f1bc * lisp/net/ldap.el (ldap-search-internal): Add missing setq. 2019-12-26 19:44:13 +01:00
Mattias Engdegård
1ba5b64dd1 Optimise 'while' bodies for effect
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Treat all expressions in the body of 'while' as for-effect,
since their values are discarded.  This also finds some errors.
2019-12-26 19:41:21 +01:00
Mattias Engdegård
af085ef40b Use regexp type for regexps in defcustom declarations
* lisp/calendar/diary-lib.el (diary-face-attrs):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-file-match):
* lisp/cedet/srecode/document.el
(srecode-document-autocomment-common-nouns-abbrevs)
(srecode-document-autocomment-function-alist)
(srecode-document-autocomment-return-first-alist)
(srecode-document-autocomment-return-last-alist)
(srecode-document-autocomment-param-alist)
(srecode-document-autocomment-param-type-alist):
* lisp/desktop.el (desktop-clear-preserve-buffers):
* lisp/elide-head.el (elide-head-headers-to-hide):
* lisp/erc/erc-backend.el (erc-encoding-coding-alist):
* lisp/erc/erc-ezbounce.el (erc-ezb-regexp):
* lisp/files.el (auto-save-file-name-transforms):
* lisp/gnus/deuglify.el (gnus-outlook-deuglify-attrib-cut-regexp)
(gnus-outlook-deuglify-attrib-verb-regexp)
(gnus-outlook-deuglify-attrib-end-regexp):
* lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files):
* lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header):
* lisp/htmlfontify.el (hfy-src-doc-link-unstyle):
* lisp/info-look.el (info-lookup-file-name-alist):
* lisp/international/rfc1843.el (rfc1843-newsgroups-regexp):
* lisp/mail/feedmail.el (feedmail-queue-slug-suspect-regexp):
* lisp/mail/rmail-spam-filter.el (rsf-white-list, rsf-definitions-alist):
* lisp/man.el (Man-name-local-regexp):
* lisp/net/ange-ftp.el (ange-ftp-dumb-unix-host-regexp):
* lisp/net/newst-backend.el (newsticker-auto-mark-filter-list):
* lisp/net/rcirc.el (rcirc-authinfo, rcirc-coding-system-alist):
* lisp/net/tramp-adb.el (tramp-adb-prompt):
* lisp/org/org-agenda.el (org-agenda-hide-tags-regexp)
(org-agenda-category-icon-alist):
* lisp/org/org-protocol.el (org-protocol-data-separator):
* lisp/org/org-table.el (org-table-number-regexp):
* lisp/org/ox-latex.el (org-latex-known-warnings):
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp):
* lisp/progmodes/hideif.el (hide-ifdef-header-regexp):
* lisp/progmodes/idlw-help.el (idlwave-help-doclib-name)
(idlwave-help-doclib-keyword):
* lisp/progmodes/idlwave.el (idlwave-no-change-comment):
* lisp/progmodes/python.el (python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps, python-shell-prompt-regexp)
(python-shell-prompt-block-regexp, python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp, python-shell-compilation-regexp-alist)
(python-pdbtrack-stacktrace-info-regexp):
* lisp/progmodes/sql.el (sql-send-terminator, sql-ansi-statement-starters):
* lisp/speedbar.el (speedbar-directory-unshown-regexp)
(speedbar-file-unshown-regexp):
* lisp/textmodes/flyspell.el (flyspell-mark-duplications-exceptions)
(flyspell-tex-command-regexp):
* lisp/textmodes/paragraphs.el (sentence-end-base):
* lisp/textmodes/tildify.el (tildify-pattern, tildify-space-pattern):
* lisp/vc/ediff-init.el (ediff-metachars):
* lisp/vc/vc-git.el (vc-git-root-log-format):
* lisp/vc/vc-hg.el (vc-hg-root-log-format):
* lisp/whitespace.el (whitespace-indentation-regexp)
(whitespace-space-after-tab-regexp):
* lisp/woman.el (woman-manpath-man-regexp)
(woman-imenu-generic-expression):
Use 'regexp' instead of 'string' as type for values that are regexps
in defcustom declarations.
2019-12-26 16:50:58 +01:00
Philipp Stephani
c980d21ae1 Simplify an example in the modules manual
* doc/lispref/internals.texi (Module Misc): Simplify example for how
to call 'intern'.  There's no need to pass the optional argument
explicitly.
2019-12-26 10:58:55 +01:00
Philipp Stephani
719ad59387 Promote function type aliases to the public module API.
Previously module authors had to define type aliases for module
functions and finalizers themselves.  This commit adds and documents
aliases so that this is no longer necessary.

* src/emacs-module.h.in: Add 'emacs_function' and 'emacs_finalizer'
type aliases.

* src/emacs-module.c: Remove old 'emacs_subr' and 'emacs_finalizer'
type aliases.
(struct Lisp_Module_Function, module_make_function): Switch from
'emacs_subr' to 'emacs_function'.

* doc/lispref/internals.texi (Module Functions): Document and use
'emacs_function' type alias.
(Module Values): Document 'emacs_finalizer' type alias.

* etc/NEWS: Mention change.
2019-12-26 10:29:21 +01:00
João Távora
639fb50ed4 Don't always resort in recently introduced icomplete--sorted-completions
Doing so breaks icomplete-forward-completions and
icomplete-backward-completions.

* lisp/icomplete.el (icomplete--sorted-completions): Don't always
resort.
2019-12-25 19:18:17 +00:00
João Távora
13778aa5be Don't force completion recalculation in icomplete-fido-ret
Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.

* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.
2019-12-25 17:57:29 +00:00
João Távora
83587bb688 Correctly cache sorted completions in icomplete--sorted-completions
* lisp/icomplete.el (icomplete--sorted-completions): Use
completion--cache-all-sorted-completions.
2019-12-25 17:57:29 +00:00
Eli Zaretskii
c454fa7b48 ; * etc/NEWS: Fix a recently added entry. 2019-12-25 19:26:07 +02:00
Philipp Stephani
273b815767 * .gitignore: Ignore .dylib files (shared libraries on macOS) 2019-12-25 18:13:12 +01:00
Philipp Stephani
5f550572fe Add some documentation for support of .dylib suffix on macOS
* doc/lispref/loading.texi (Dynamic Modules):
* etc/NEWS: Document that dynamic module files on macOS can now have
the suffix .dylib.
2019-12-25 18:03:26 +01:00
Lars Ingebrigtsen
19b28abc9b Don't bind XEmacs-only variable in edebug
* lisp/emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Remove
binding of XEmacs-only variable print-readably.
2019-12-25 17:14:26 +01:00
Glenn Morris
43d97f17b8 Merge from origin/emacs-27
91c16acbe2 (origin/emacs-27) Improve doc string of 'files--message'
c3be58a8f5 (emacs-27) Improve vc--add-line, vc--remove-regexp
9ea9ac9a61 Apply the 'xref-group' property properly
2019-12-25 07:50:19 -08:00
Glenn Morris
b766a9d0a8 ; Merge from origin/emacs-27
The following commits were skipped:

41f0cf266e * src/pdumper.c (Fdump_emacs_portable): Reword error message.
719a6924c4 Don’t allow portable dumping in interactive mode (Bug#38453).
2019-12-25 07:50:19 -08:00
Glenn Morris
2bb7bb4abf Merge from origin/emacs-27
ca6a53d3bc Don't default to showing X-Faces externally in Gnus
dbf4b5b2d0 Fix manual typo in Special Read Syntax
a9fe6dfa90 Fix problem with emacs -nw / eww / svg
0de63092c8 Clarify base64 requirements and say what {en,de}code_codin...
6184aa003f ; * etc/NEWS: Fix boring oddities.
51ea32dd12 * src/emacs-module.h.in: Add reference to manual.
75d0cef20d Trivial docstring fixes
ee12c421b6 imagemagick-types needs to initialize ImageMagick

# Conflicts:
#	etc/NEWS
2019-12-25 07:50:19 -08:00
Glenn Morris
93d4725f9c ; Merge from origin/emacs-27
The following commit was skipped:

9eb871c8d1 Cut the emacs-27 release branch
2019-12-25 07:50:13 -08:00
Eli Zaretskii
91c16acbe2 Improve doc string of 'files--message'
* lisp/files.el (files--message): Improve the wording of doc
string.  (Bug#38737)
2019-12-25 17:00:06 +02:00
Philipp Stephani
28268e47d8 Support .dylib suffix for modules on macOS (Bug#36226).
On macOS, shared libraries typically have the suffix .dylib.  This
commit switches the module suffix to .dylib on Darwin to account for
that.  To also support the .so suffix, introduce the concept of a
secondary module suffix.

* configure.ac: Switch MODULES_SUFFIX to .dylib for Darwin, introduce
MODULES_SECONDARY_SUFFIX.

* src/lread.c (Fload, syms_of_lread): Also use
MODULES_SECONDARY_SUFFIX if defined.

* test/src/emacs-module-tests.el (module-darwin-secondary-suffix): New
unit test.
2019-12-25 15:42:20 +01:00
Wolfgang Scherer
c3be58a8f5 Improve vc--add-line, vc--remove-regexp
* lisp/vc/vc.el (vc--add-line): Create file if it does not exist.
Use existing buffer to avoid discrepancies with filesytem.  Make sure
that the file ends with a newline.
(vc--remove-line): Do not create file if it does not exist.  Use
existing buffer to avoid discrepancies with filesytem. (bug#37185)
2019-12-25 00:33:36 +02:00
Dmitry Gutov
9ea9ac9a61 Apply the 'xref-group' property properly
* lisp/progmodes/xref.el (xref--insert-xrefs):
Apply the 'xref-group' property properly (bug#36974).
2019-12-24 22:30:02 +02:00
Philipp Stephani
41f0cf266e * src/pdumper.c (Fdump_emacs_portable): Reword error message.
(cherry picked from commit ac7b260773)
2019-12-24 19:56:16 +02:00
Philipp Stephani
719a6924c4 Don’t allow portable dumping in interactive mode (Bug#38453).
* src/pdumper.c (Fdump_emacs_portable): Don’t allow dumping in
interactive mode.

(cherry picked from commit e7edba42c8)
2019-12-24 19:55:31 +02:00
Lars Ingebrigtsen
ca6a53d3bc Don't default to showing X-Faces externally in Gnus
* lisp/gnus/gnus-art.el (gnus-article-x-face-command): It's seldom
useful to display the face in an external command, so don't ever
default to that.  This also fixes the problem of Emacs running as
a server in mixed graphical/non-graphical environments.
2019-12-24 17:50:24 +01:00
Lars Ingebrigtsen
dbf4b5b2d0 Fix manual typo in Special Read Syntax
* doc/lispref/objects.texi (Special Read Syntax): Fix typo.
2019-12-24 17:42:28 +01:00
Federico Tedin
7c5d6a2afc Make goto-line keep a separate input history per buffer
* lisp/simple.el (goto-line-history): New history variable.
(goto-line): Use new (buffer-local) variable as input
history (Bug#38282).
* lisp/subr.el (read-number-history): New history variable.
(read-number): Use the new variable as default input history.
* doc/lispref/minibuf.texi (Minibuffer History): Document
read-number-history and goto-line-history variables.
* etc/NEWS: Announce changes.
2019-12-24 17:40:15 +01:00
Robert Pluim
a9fe6dfa90 Fix problem with emacs -nw / eww / svg
* lisp/net/shr.el (shr-parse-image-data): Don't bug out on
non-visual Emacs versions on SVG images (bug#38507).
2019-12-24 17:21:06 +01:00
Lars Ingebrigtsen
0de63092c8 Clarify base64 requirements and say what {en,de}code_coding_region does
* src/coding.c (Fencode_coding_region): Clarify what this does.
(Fdecode_coding_region): Ditto.

* src/fns.c (Fbase64_decode_region): Clarify that this function
returns bytes, not text (bug#38587).
(Fbase64_encode_region): Clarify that this function takes bytes,
not text.
2019-12-24 17:11:11 +01:00
João Távora
0d2a711dc9 Move flex style's minibuffer-default-aware sorting to lisp/icomplete.el
This moves the logic from the series of commits starting in the commit named:

  Improve sorting of flex completion style with non-nil minibuffer-default

to lisp/icomplete.el, so far the only confirmed beneficiary of that
functionality.

* lisp/icomplete.el (icomplete--sorted-completions): Consider
minibuffer-default here.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify.
2019-12-24 10:41:57 +00:00
Michael Albinus
6184aa003f ; * etc/NEWS: Fix boring oddities. 2019-12-24 10:45:04 +01:00
Philipp Stephani
51ea32dd12 * src/emacs-module.h.in: Add reference to manual. 2019-12-24 09:47:02 +01:00
Stefan Monnier
a6b41a817e * src/minibuf.c (read_minibuf): Use user-error 2019-12-23 23:47:54 -05:00
Juanma Barranquero
60fba710c5 Don't use `let*' with just one binding
* lisp/registry.el (registry-reindex):
* lisp/emacs-lisp/generator.el (cps--add-state):
Use `let', not `let*'.
2019-12-24 04:09:46 +01:00
Juanma Barranquero
75d0cef20d Trivial docstring fixes
* ChangeLog.3:
* lisp/emacs-lisp/cl-macs.el (cl-flet):
* lisp/filesets.el (filesets-menu-ensure-use-cached):
* lisp/progmodes/compile.el (compilation-context-lines):
* lisp/progmodes/prolog.el (prolog-paren-indent):
* lisp/progmodes/sql.el (sql-password-search-wallet-function):
Fix typos in docstrings.

* lisp/cedet/semantic/analyze.el (semantic-analyze-push-error):
Doc fix.

* lisp/emacs-lisp/map.el (map-put, map-info): Refill docstring.
(map-contains-key): Fix typo.
(map-every-p): Doc fix.
2019-12-24 02:37:08 +01:00
Dhruva Krishnamurthy
ee12c421b6 imagemagick-types needs to initialize ImageMagick
* src/image.c (imagemagick_initialize): New function,
with body taken from imagemagick_load_image.
(imagemagick_load_image, Fimagemagick_types): Use it.
Copyright-paperwork-exempt: yes
2019-12-23 17:20:47 -08:00
Philipp Stephani
5617c82b37 Prepare module header generation for Emacs 28.
* configure.ac: Substitute environment function snippet for Emacs 28.

* src/module-env-28.h: New file, with dummy contents for now.

* src/emacs-module.h.in: Provide emacs_env_28 structure.
2019-12-24 01:08:16 +01:00
Philipp Stephani
232a36f17e * src/emacs-module.h.in: Use @emacs_major_version@ for current env. 2019-12-24 01:08:15 +01:00
João Távora
ee914051fb Make fido-mode behave more like ido-mode when finding directories
Notably C-x d (M-x dired) and C-x v d (M-x vc-dir) behaved quite
differently, having regular files as the default instead of ido's
usual "./".

* lisp/icomplete.el (icomplete--sorted-completions): New helper.
(icomplete-completions): Use it.
2019-12-23 23:44:12 +00:00
João Távora
24a1f520f9 Slightly simplify lisp/icomplete.el with new icomplete--category helper
* lisp/icomplete.el (icomplete-fido-kill)
(icomplete-fido-delete-char, icomplete-fido-ret)
(icomplete-fido-backward-updir, icomplete-exhibit): Use
icomplete--category.
(icomplete--category): New helper.
2019-12-23 23:44:02 +00:00
João Távora
9c91204992 Another adjustment to flex completion style's sorting function
* lisp/minibuffer.el (completion--flex-adjust-metadata): Adjust
case when minibuffer-default is non-nil.
2019-12-23 23:44:02 +00:00
Philipp Stephani
ac7b260773 * src/pdumper.c (Fdump_emacs_portable): Reword error message. 2019-12-23 21:27:24 +01:00
Philipp Stephani
00c9949158 Remove some undefined behavior related to left shifts.
Found by UBSan.

* src/nsfns.m (ns_set_foreground_color, ns_set_background_color):
* src/nsimage.m (getPixelAtX:Y:):
* src/nsterm.m (ns_color_index_to_rgba): Add explicit casts to avoid
undefined behavior when left-shifting beyond the bounds of the int
type.

* src/macfont.m (METRICS_VALUE): Add explicit casts to avoid undefined
behavior when left-shifting a negative value.
2019-12-23 21:27:23 +01:00
Stephen Gildea
17c19817f7 Further expand coverage of unit tests for time-stamp
* test/lisp/time-stamp-tests.el (time-stamp-custom-format-tabs-expand,
time-stamp-custom-end, time-stamp-helper-string-defaults): New tests.
(time-stamp-custom-count): Test 0 case.
(time-stamp-format-non-date-conversions): Test different system values.

Development of these new tests was guided by the "testcover" library.
2019-12-23 11:52:42 -08:00
Philipp Stephani
e7edba42c8 Don’t allow portable dumping in interactive mode (Bug#38453).
* src/pdumper.c (Fdump_emacs_portable): Don’t allow dumping in
interactive mode.
2019-12-23 20:49:15 +01:00
Mario Lang
b2571eccb5 ; Fix oversights during renaming of example code
Introduced in 94fa7ceb48
2019-12-23 18:30:09 +01:00
Philipp Stephani
94fa7ceb48 Make argument names in module interface more consistent.
Previously, the names of arguments and other details were needlessly
inconsistent between the documentation, the declarations, and the
definitions, as well as between each other.  This commit makes them
more consistent, in most cases by applying the names from the
documentation everywhere.

* src/module-env-27.h:
* src/module-env-25.h:
* src/emacs-module.h.in:
* src/emacs-module.c (module_get_environment)
(module_make_global_ref, module_free_global_ref)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_make_function, module_funcall, module_type_of)
(module_is_not_nil, module_extract_integer)
(module_extract_float, module_copy_string_contents)
(module_make_string, module_vec_set, module_vec_get)
(module_vec_size, module_extract_time)
(module_assert_runtime):
* doc/lispref/internals.texi (Module Initialization)
(Module Functions, Module Values): Make argument names and some other
details consistent.  No functional changes.
2019-12-23 17:16:10 +01:00
Eli Zaretskii
64fe67beff Bump Emacs version to 28.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* src/msdos.c (internal_terminal_init):
* etc/refcards/ru-refcard.tex: Bump Emacs version to 28.0.50.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Bump up the value to 26.3.

* etc/NEWS.27: Renamed from NEWS.
* etc/NEWS: New file for Emacs 28.
2019-12-23 18:00:52 +02:00
Eli Zaretskii
9eb871c8d1 Cut the emacs-27 release branch
* lisp/cus-edit.el (customize-changed-options-previous-release):
Change the value to 26.3.

* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 27.0.60.
2019-12-23 17:41:17 +02:00
Philipp Stephani
f8e83d73a2 Document and verify that emacs_limb_t doesn’t have padding bits.
This is a useful property when doing further bit-twiddling with the
magnitude array before/after calling extract_big_integer or
make_big_integer.  For example, constructing an emacs_limb_t object
using repeated shift-and-add should work as expected, but relies on
the type not having padding bits.  Since the C standard already
guarantees that unsigned integers use a pure binary representation,
not having padding bits is enough to guarantee that the type has
unique object representations in the sense of C++’s
std::has_unique_object_representations.

* doc/lispref/internals.texi (Module Values): Document that
emacs_limb_t doesn’t have padding bits.

* src/emacs-module.c: Verify that emacs_limb_t doesn’t have padding
bits.
2019-12-23 15:37:49 +01:00