1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

136367 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
ab263a7980 (gui-get-selection): Avoid using `string-to-multibyte'
* lisp/select.el (gui-get-selection): Avoid using
`string-to-multibyte' -- instead encode as `eight-bit' if the
string is unibyte.
2019-05-17 05:42:12 +02:00
Lars Ingebrigtsen
54f5d678dc Declare two w32 functions to avoid byte compilation warnings
* lisp/w32-fns.el (w32-version, w32-read-registry): Declare these
functions to avoid byte compilation warnings.  The functions
should be loaded when `w32--os-description' is called, as far as I
can tell.
2019-05-17 05:18:12 +02:00
Lars Ingebrigtsen
92b1edb1f8 Remove obsolete epg functions
* lisp/epg.el (epg-start-sign-keys, epg-sign-keys): Remove
functions declared obsolete since Emacs 23.1.
2019-05-17 04:47:31 +02:00
Lars Ingebrigtsen
cad2bbbe25 Declare rectangle functions in mouse.el to avoid warnings
* lisp/mouse.el (rectangle-dimensions)
(rectangle-position-as-coordinates, rectangle-intersect-p):
Declare these functions from rect.el to avoid compilation warnings.
2019-05-17 04:23:20 +02:00
Stefan Monnier
2e8f6ad287 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix docstring of accessors. 2019-05-16 22:00:57 -04:00
Stefan Monnier
5f6c08ef2c * lisp/gnus/nnheader.el (mail-header-*): Define via cl-defstruct
This also has the side effect that the accessors are now defined as proper
functions rather than as macros, so they can be passed to `mapcar` etc..

* lisp/gnus/nnheader.el (mail-header-number, mail-header-subject)
(mail-header-from, mail-header-date, mail-header-id)
(mail-header-references, mail-header-chars, mail-header-lines)
(mail-header-xref, mail-header-extra): Define via cl-defstruct.
(mail-header-set-number, mail-header-set-subject)
(mail-header-set-from, mail-header-set-date, mail-header-set-id)
(mail-header-set-message-id, mail-header-set-references)
(mail-header-set-chars, mail-header-set-lines, mail-header-set-xref)
(mail-header-set-extra): Remove, use `setf` instead.  All callers adjusted.

* lisp/gnus/gnus-sum.el (gnus-select-newsgroup)
(gnus-summary-pop-limit, gnus-summary-limit-mark-excluded-as-read)
(gnus-summary-find-matching, gnus-find-matching-articles):
* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal, gnus-execute):
* lisp/gnus/gnus-score.el (gnus-score-adaptive):
Eta-reduce, now that mail-header-FIELD are functions.
2019-05-16 21:50:16 -04:00
Katsumi Yamaoka
ca3c59146b Fix ffap behavior in the Gnus group buffer (bug#35693)
* lisp/ffap.el (ffap-file-exists-string, ffap-file-at-point):
Don't recognize "" as a path or a file name (bug#35693).
2019-05-17 01:34:47 +00:00
Stefan Monnier
802dcafb5e * mule.el (set-buffer-file-coding-system): Don't burp on iso-2022-7bit 2019-05-16 20:49:06 -04:00
Paul Pogonyshev
8d3fff6bd6 Make `package' not "uninhibit" messages (Bug#34037)
* lisp/emacs-lisp/package.el: Don't let-bind inhibit-message to a
different value if it was non-nil.
2019-05-16 20:08:27 -04:00
Basil L. Contovounesios
9408e36b84 Fix gnus-summary-expand-window placement of point
* lisp/gnus/gnus-win.el (gnus-configure-frame): Replace
switch-to-buffer with pop-to-buffer-same-window to avoid messing
with point. (bug#35613)
2019-05-17 00:55:58 +01:00
Basil L. Contovounesios
b2c0eb63dd Add docstring to project--read-file-cpd-relative
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00460.html
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Describe arglist as promised by user option
project-read-file-name-function.
2019-05-16 23:26:27 +01:00
Stefan Monnier
9ed0b55848 * cl-macs-tests.el (cl-macs-test--symbol-macrolet): New test 2019-05-16 17:16:36 -04:00
Eric Abrahamsen
c89b0add51 Fix stray call to make-vector
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-group-1): This is meant to
  be a hash table.
2019-05-16 12:47:18 -07:00
Stefan Monnier
37c41c6ef0 * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand) <setq>: Rewrite
The previous code had 2 problems:
- It converted `setq` to `setf` in unrelated cases such as
  (cl-symbol-macrolet ((x 1)) (setq (car foo) bar))
- It macroexpanded places before `setf` had a chance to see if they
  have a gv-expander.
2019-05-16 15:29:36 -04:00
Paul Eggert
4ac234ad57 Distribute test cases in tarballs by default
* INSTALL, INSTALL.REPO, admin/make-tarball.txt:
Mention ‘make check’.
* configure.ac: Update comment.
* etc/NEWS: Say that tarballs have a test directory.
* make-dist (with_tests): Default to "yes".
Add an option --no-tests to make it "no".
2019-05-16 10:51:27 -07:00
Lars Ingebrigtsen
bc0adf112d Make shr-rescale-image respect get-buffer-window again
* lisp/net/shr.el (shr-rescale-image): Partially revert previous
change -- ressurrect the check for `get-buffer-window'.
2019-05-16 13:38:11 +02:00
Ivan Shmakov
63a71535a8 Improve user convenience of the rcirc debug buffer
* lisp/net/rcirc.el (rcirc-debug): Ignore rcirc-debug-buffer read-only
status.  Restore point after insertion unless it was at the end.
Ensure a newline before each [lead].  Replace %Y-%m-%d with the
equivalent %F in format-time-string; remove useless concat.  (Bug#32470)
2019-05-16 06:54:54 -04:00
Noam Postavsky
04e9938350 Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491)
* lisp/thingatpt.el (word-at-point, sentence-at-point): Accept and
pass NO-PROPERTIES to thing-at-point.
* etc/NEWS: Announce change.
2019-05-16 06:53:05 -04:00
Michael Albinus
88cc910abe * lisp/net/tramp.el (tramp-yesno-prompt-regexp): Extend. 2019-05-16 08:36:33 +02:00
Stefan Monnier
9a74e5666b * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typo
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New corresponding test.
2019-05-15 22:21:36 -04:00
Noam Postavsky
e7e92dc5d2 Fix merge of sgml-syntax-propertize-rules
During the merge of emacs-26, the sgml-syntax-propertize-rules part of
2019-01-17 "* lisp/textmodes/sgml-mode.el: Try and fix bug#33887." got
lost in the conflict against 2019-05-09 "Recognize single quote
attribute values in nxml and sgml (Bug#35381)".
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Reapply
the 2019-01-17 change to speed up sgml-syntax-propertize-rules, taking
into account the 2019-05-09 which means we have to handle single
quotes as well.
2019-05-15 19:04:14 -04:00
Anders Lindgren
520aca2d89 Fix diff-mode face problem when used in terminals (Bug#35695)
In a terminal supporting 256 colors, both diff-added and diff-removed
was mapped to the same greyish color.

* lisp/vc/diff-mode.el: Modify the colors of diff-removed,
  diff-added, diff-refine-removed, and diff-refine-added when
  used in a 256 color environment.
2019-05-15 21:00:49 +02:00
Stefan Monnier
c3e8381668 * lisp/gnus/gnus-sum.el: Use lexical-binding
(gnus-summary-make-menu-bar, gnus-summary-display-make-predicate)
(gnus-summary-refer-thread, gnus-summary-find-matching)
(gnus-summary-edit-article, gnus-summary-sort):
Replace backquoted lambda with closure.
(gnus-summary-article-header): Use define-inline rather than defmacro,
so it's also a function.
(gnus-save-hidden-threads, gnus-summary-iterate, gnus-with-article):
Use `declare`.
(gnus-thread-sort-by-random): Simplify.
(gnus-summary-display-article, gnus-summary-limit-to-address):
Hoist common code outside of `if`.
2019-05-15 13:53:13 -04:00
Paul Eggert
d4868b2bee Tune reading of radix integers
This improves the performance of (read "%xFF") by about 25%
on my platform.
* src/lread.c: Include <vla.h>, so that we can better document
buffer sizes of arguments.
(invalid_radix_integer_format, stackbufsize): New constants.
(free_contents): Remove.  All uses removed.
(invalid_radix_integer): New function.
(read_integer): New arg STACKBUF.  Assume radix is in range.
All uses changed.  Use STACKBUF to avoid calling malloc in the
usual case.  Use grow_read_buffer to simplify.
(read1): Tune.  Improve quality of diagnostic when
MOST_POSITIVE_FIXNUM < radix <= EMACS_INT_MAX.
2019-05-15 10:27:55 -07:00
Stefan Monnier
32b01c02b4 * lisp/mail/footnote.el (footnote-prefix): Docstring typo. 2019-05-15 13:01:09 -04:00
Mattias Engdegård
26f735ff19 Add standard unmatchable regexp
Add `regexp-unmatchable' as a standard unmatchable regexp, defined as
"\\`a\\`".  Use it where such a regexp is needed, replacing slower
expressions in several places.
From a suggestion by Philippe Schnoebelen.

* lisp/subr.el (regexp-unmatchable): New defconst.
* etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'.
* doc/lispref/searching.texi (Regexp Functions): Document it.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt)
* lisp/progmodes/cc-defs.el (cc-conditional-require-after-load)
(c-make-keywords-re)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
(c-looking-at-decl-block)
* lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
(c-doc-bright-comment-start-re)
* lisp/progmodes/cc-langs.el (c-populate-syntax-table)
(c-assignment-op-regexp)
(c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
(c-block-comment-start-regexp, c-line-comment-start-regexp)
(c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
(c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
(c-pre-id-bracelist-key, c-enum-clause-introduction-re)
(c-nonlabel-token-2-key)
* lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-noise-macro-name-re, c-make-noise-macro-regexps)
* lisp/progmodes/octave.el (octave-help-mode)
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table)
* lisp/vc/vc-git.el (vc-git-log-view-mode)
* lisp/vc/vc-hg.el (vc-hg-log-view-mode)
* lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
Use `regexp-unmatchable'.
* lisp/textmodes/ispell.el (ispell-non-empty-string):
Use `regexp-unmatchable', fixing a broken never-match regexp.
2019-05-15 18:55:27 +02:00
John Shahid
d0ebc389eb Avoid infinitly looping in tramp-interrupt-process (bug#35506)
* lisp/net/tramp.el (tramp-interrupt-process): Remove with-timeout.
Instead pass a timeout to tramp-accept-process-output.
tramp-accept-process-output stops timers from running which makes the
with-timeout ineffective.
2019-05-15 16:29:58 +02:00
Alan Mackenzie
356fb18a1f CC Mode: fix indentation in switch statement after "case a(1):".
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Enhance the
analysis of case labels to handle parenthesised expressions (e.g. macros).

* lisp/progmodes/cc-langs.el (c-nonlabel-nonparen-token-key): New lang const
and lang var.
2019-05-15 08:58:31 +00:00
Lars Ingebrigtsen
8f544c6104 Describe error data in url-retrieve better
* lisp/url/url.el (url-retrieve): Describe the error data more in
depth (bug#25735).
2019-05-15 09:45:08 +02:00
Lars Ingebrigtsen
ceed3d7557 Don't have url-basic-auth bug out when called with an URL string
* lisp/url/url-auth.el (url-basic-auth): Pass the parsed URL
object to the prompting function instead of the parameter that's
possibly a string (bug#26708).  Passing url-basic-auth with a
string parameter would fail if passed a non-parsed URL.
2019-05-15 07:34:35 +02:00
Lars Ingebrigtsen
4f1df40db3 Fix obscure HTTP chunked parsing problem
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Ensure that we
parse the entire initial chunked header as the length (bug#35658).
2019-05-15 07:12:26 +02:00
Lars Ingebrigtsen
15bd081ce6 Indent url-http-chunked-encoding-after-change-function 2019-05-15 06:59:12 +02:00
Thomas Fitzsimmons
4fa6029f7e Fix url-auth prompts when realm is empty
* lisp/url/url-auth.el (url-get-authentication): When realm is
empty, use the entire URL in the prompt (bug#35688).
2019-05-15 06:14:21 +02:00
Lars Ingebrigtsen
e3fbe04cbc Make image scaling work without imagemagick support in eww
* lisp/net/shr.el (shr-rescale-image): Emacs has native image
scaling now, so images can be rescaled without imagemagick
support.
2019-05-15 02:53:56 +02:00
Glenn Morris
4b2c9f638a ; Merge from origin/emacs-26
The following commits were skipped:

cf54577 (origin/emacs-26) Backport: fix broken build on m68k
202ff53 Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
2019-05-14 17:18:19 -07:00
Glenn Morris
5fe9375a51 Merge from origin/emacs-26
02bee78 Let dir locals for more specific modes override those from less
b1235f9 Improve documentation of Hexl mode
32d1813 Fix description of (move-to-column <n> t) when column <n> is ...
0397b7c ; Fix smtpmail-stream-type docstring
7dab3ee Recognize single quote attribute values in nxml and sgml (Bug...
e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897)
ca14dd1 Fix nxml-get-inside (Bug#32003)
e7ab351 Fix positioning client buffer as instructed by emacsclient

# Conflicts:
#	lisp/files.el
#	lisp/textmodes/sgml-mode.el
2019-05-14 17:18:18 -07:00
Glenn Morris
0f63e17663 ; Merge from origin/emacs-26
The following commit was skipped:

916510b * etc/package-keyring.gpg: Add the 2019 key (backport)
2019-05-14 17:10:28 -07:00
Juri Linkov
c11c990356 * lisp/progmodes/project.el (project-read-file-name-function): Fix type. 2019-05-14 23:40:31 +03:00
Paul Eggert
cf5457764c Backport: fix broken build on m68k
The GCC + valgrind fix caused the m68k build to fail (Bug#35711).
Simplify string allocation a bit to make similar problems less
likely in the future.
* src/alloc.c (sdata, SDATA_NBYTES, SDATA_DATA) [GC_CHECK_STRING_BYTES]:
Use the same implementation as with !GC_CHECK_STRING_BYTES,
as the special case is no longer needed.
(SDATA_ALIGN): New constant.
(SDATA_SIZE): Remove this macro, replacing with ...
(sdata_size): ... this new function.  All uses changed.
Properly account for sizes and alignments even in the m68k case,
and even if GC_CHECK_STRING_BYTES is not defined.
2019-05-14 11:10:02 -07:00
Stefan Monnier
624a232a8d * lisp/savehist.el: Use lexical-binding
Remove redundant :group args.
(savehist-no-conversion): Remove constant.
(savehist-save): Use savehist-coding-system instead since it's no slower.
2019-05-14 14:00:58 -04:00
Paul Eggert
d2dea70415 Default to disabling ImageMagick (Bug#33587)
ImageMagick has continuing stability and security problems, suggesting
that 'configure' should disable it by default.  See Glenn Morris's notes
at: https://lists.gnu.org/r/emacs-devel/2018-12/msg00036.html
* INSTALL, etc/NEWS, nt/INSTALL.W64: Mention this.
* configure.ac (imagemagick): Default to off.
2019-05-13 23:07:05 -07:00
Dmitry Gutov
e0ee41d155 Allow customizing the display of project file names when reading
To hopefully resolve a long-running discussion
(https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00162.html).

* lisp/progmodes/project.el (project-read-file-name-function):
New variable.
(project--read-file-absolute, project--read-file-cpd-relative):
New functions, possible values for the above.
(project-find-file-in): Use the introduced variable.
(project--completing-read-strict): Retain just the logic that fits
the name.
2019-05-14 05:11:18 +03:00
YAMAMOTO Mitsuharu
9b28a5083e Avoid artifacts in ftx and ftcr font backend drivers
* src/ftcrfont.c (ftcrfont_open):
* src/ftfont.c (ftfont_open2): Make font->height equal to sum of font->ascent
and font->descent.  Respect :minspace property.
(ftfont_open2): Remove redundant assignment.
(syms_of_ftfont) <QCminspace>: New DEFSYM.
2019-05-14 10:17:16 +09:00
Basil L. Contovounesios
2f7e97ef48 Fix mail-header-separator font lock in message.el
* lisp/gnus/message.el (message-font-lock-keywords): Dynamically
font lock mail-header-separator, in case it changes. (bug#34898)
2019-05-14 02:15:37 +01:00
Kévin Le Gouguec
417c52b0b7 Extract common code for adding text properties
* lisp/font-lock.el (font-lock--add-text-property):
New function.
(font-lock-prepend-text-property)
(font-lock-append-text-property): Use it.

(Bug#35476)
2019-05-13 20:41:02 -04:00
Kévin Le Gouguec
59ad303e8f Stop splicing anonymous faces in font-lock-append-text-property
This is the same fix as 2019-04-29 "Refrain from splicing anonymous
faces in text properties", which was only applied to
font-lock-prepend-text-property.

* lisp/font-lock.el (font-lock-append-text-property): Distinguish list
of faces from property list.
* test/lisp/font-lock-tests.el: New test suite.

(Bug#35476)
2019-05-13 20:41:02 -04:00
Noam Postavsky
202ff53da2 Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
Don't merge to master, this has already been fixed there by 2019-01-15
"Fix unlikely races with GnuTLS, datagrams".
* src/gnutls.c (emacs_gnutls_read): Similar to emacs_gnutls_write,
when gnutls_record_recv returns GNUTLS_E_AGAIN set errno to EGAIN.
2019-05-13 20:15:31 -04:00
Basil L. Contovounesios
364d4e156d Do not hard-code message-mode keys in docstring
* lisp/gnus/message.el (message-mode): Replace hard-coded bindings
in docstring with summary of message-mode-map. (bug#31388)
2019-05-13 23:58:45 +01:00
Basil L. Contovounesios
f4c1d95bef Fix last change to message-signature :type
* lisp/gnus/message.el (message-signature): List more specific :type
alternatives before more general ones, as per "(elisp) Composite
Types".
2019-05-13 23:23:06 +01:00
Robert Pluim
2ecb7c5c0b Document nil value of message-signature and mail-signature
* lisp/gnus/message.el (message-signature): Allow nil as a
customizable value, and describe its effect.
* lisp/mail/sendmail.el (mail-signature): Describe effect of nil
value (bug#32680).
2019-05-13 16:46:27 -04:00