Paul Eggert [Mon, 23 Sep 2019 18:40:51 +0000 (11:40 -0700)]
Bring back mention of NNTP gmane
Problem reported by Michael Albinus at:
https://lists.gnu.org/r/emacs-devel/2019-09/msg00519.html
* admin/notes/emba: Reintroduce mention of nttp+news.gmane.org,
since that still works.
* lisp/epa.el (epa-verify-region): Signal an error if the region
couldn't be verified (bug#14720).
(epa-verify-file): Say that the file couldn't be verified instead
of just "...done".
Make "Show Hidden Headers" in Message buffers more obvious
* lisp/gnus/message.el (message-widen-and-recenter): New command
to ensure that we show most of the headers (bug#23252).
(message-mode-field-menu): Use it.
Hong Xu [Mon, 23 Sep 2019 11:09:36 +0000 (13:09 +0200)]
Add different faces for different citation levels in Message mode
* message.el (message-font-lock-keywords)
(message-font-lock-make-cited-text-matcher): Add support for
different faces for different citation levels. The faces are
defined in the faces named `message-cited-text-N': N of the
Mth citation level will be M mod 4.
(message-cited-text-1, message-cited-text-2)
(message-cited-text-3, message-cited-text-4): Add customization
for the faces of 4 different citation level. In the future, the
number of faces may increase, as the code is flexible enough to
automatically deal with that.
(message-cite-level-function): Add a function to customize the
determination of cite levels given the prefix of the cited text
(bug#25022).
* lisp/mail/sendmail.el (mail-citation-prefix-regexp): Don't
regard "]" as a citation prefix character (bug#25150). This
allows some motion commands (like forward-sexp) to behave more as
expected in Message mode buffers.
Paul Eggert [Mon, 23 Sep 2019 06:53:39 +0000 (23:53 -0700)]
Update some URLs
This mostly changes http: to https: in URLs. It also updates
some URLs that have moved, removes some URLs that no longer
work, recommends against using procmail (procmail.org no
longer works), and removes some mentions of the
no-longer-existing Gmane, LPF and VTW.
It doesn't update all URLs, just the ones I had time for.
* GNUmakefile (help):
* admin/admin.el (manual-doctype-string):
* admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map):
* admin/charsets/mapconv:
* lisp/net/soap-client.el (soap-create-envelope):
* lisp/org/org.el (org-doi-server-url):
* lisp/textmodes/bibtex.el (bibtex-generate-url-list):
Prefer https: to http: un URLs.
Stephen Gildea [Mon, 23 Sep 2019 03:27:53 +0000 (20:27 -0700)]
Expand time-stamp unit tests to cover all formatting options
* time-stamp-tests.el: Expand unit tests to cover all formatting options.
These tests validate time-stamp-pattern formatting that has existed
since at least Emacs 22 (released in 2007). The tests cover both
documented behavior and behavior implemented to support future migrations.
* time-stamp.el (time-stamp-string): Add a second argument (TIME) to
open a testing seam. Have the unit tests call this public function.
* time-stamp.el (time-stamp-string, time-stamp-string-preprocess):
Remove the second pass through time-string--format. (Previously both
functions called it.) It was used only to handle "%", but this is now
handled by having time-stamp-string-preprocess not double it.
Not doubling the "%" in time-stamp-string-preprocess fixes the padding
of "%2%", which was discovered by the new unit tests to be wrong.
The regexp in this list used a capitalized “React” because it actually
should be capitalized like that. Otherwise, the following code would
produce a false positive match: import Thing from './react/Thing'
* lisp/progmodes/js.el (js-jsx-regexps): Update docstring.
(js-jsx--detect-and-enable): Match case-sensitively when determining
whether JSX should be enabled.
Paul Eggert [Sun, 22 Sep 2019 17:43:21 +0000 (10:43 -0700)]
Avoid crashes when casifying noncontiguous regions
This is a followon fix for Bug#37477.
* lisp/simple.el (region-extract-function):
Use setq here, since the var is now defined in C code.
* src/casefiddle.c (casify_pnc_region): New function.
(Fupcase_region, Fdowncase_region, Fcapitalize_region)
(Fupcase_initials_region): Use it.
(Fupcase_initials_region): Add region-noncontiguous-p flag
for consistency with the others. All uses changed.
(syms_of_casefiddle): Define Qbounds, Vregion_extract_function.
* src/insdel.c (prepare_to_modify_buffer_1):
* src/keyboard.c (command_loop_1):
Use Vregion_extraction_function.
* src/insdel.c (syms_of_insdel): No need to define
Qregion_extract_function.
* test/src/casefiddle-tests.el (casefiddle-oldfunc): New var.
(casefiddle-loopfunc, casefiddle-badfunc): New functions.
(casefiddle-invalid-region-extract-function): New test.
* lisp/image/exif.el (exif-parse-buffer): New function.
(exif-orientation): Ditto.
(exif-error): New error symbol, and adjust all error signalling to
only use that signal.
Eric Abrahamsen [Sun, 21 Apr 2019 18:04:20 +0000 (11:04 -0700)]
New option for making Gnus window layouts atomic
* lisp/gnus/gnus-win.el (gnus-use-atomic-windows): New boolean
customization option.
(gnus-configure-windows): When removing old window layouts, check
for and remove atomicity.
(gnus-configure-windows): When gnus-use-atomic-windows is non-nil,
make Gnus window layouts atomic.
* doc/misc/gnus.texi (Window Layout): Document.
Juri Linkov [Sat, 21 Sep 2019 23:00:01 +0000 (02:00 +0300)]
Support rectangular regions in capitalize-region and capitalize-dwim.
* lisp/simple.el (capitalize-dwim): Add arg region-noncontiguous-p
in capitalize-region call.
* src/casefiddle.c (Fcapitalize_region): Add arg region-noncontiguous-p.
If non-nil, operate on multiple chunks. (Bug#37477)
(Fdowncase_region): Use builtin symbol Qregion_extract_function
rather than calling intern.
Paul Eggert [Sat, 21 Sep 2019 18:27:46 +0000 (11:27 -0700)]
Revert too-picky file-access tests
Problem reported by Andreas Schwab (Bug#37475).
* doc/lispref/files.texi (Writing to Files)
(Testing Accessibility, Kinds of Files):
Document that accessibility and file-type predicates return nil
if there is trouble determining accessibility or type.
* etc/NEWS: Adjust, and list the affected primitives.
* src/callproc.c (init_callproc): Go back to Ffile_exists_p.
* src/fileio.c (PICKY_EACCES, file_test_errno):
Remove. All uses removed.
(Ffile_name_case_insensitive_p, Ffile_exists_p, Ffile_symlink_p)
(Ffile_directory_p, Ffile_regular_p): Document that these
functions return nil if there is trouble.
(Ffile_name_case_insensitive_p, check_file_access)
(Ffile_writable_p, Ffile_symlink_p, Ffile_directory_p)
(Ffile_accessible_directory_p, Ffile_regular_p)
* src/lread.c (Fload):
Go back to treating trouble in determining the answer as if the
file were missing.
* src/fileio.c (Ffile_newer_than_file_p): Use file_attribute_errno
not file_test_errno, since returning nil is not appropriate when
there are two files to test; e.g., in the rare cases where both
file timestamps have overflowed then neither t nor nil is correct.
* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
(gnus-registry-article-marks-to-names): The registry is an object,
not a hash table.
* lisp/help-fns.el (describe-face): Move to here from faces.el and
split up (bug#36670).
(help-fns--face-custom-version-info):
(help-fns--face-attributes): Factored out into own functions.
(help-fns-describe-face-functions): New variable.
* lisp/auth-source.el (auth-source--deobfuscate): Use more
obfuscated obfuscation (bug#37196).
(auth-source--pad, auth-source--obfuscate)
(auth-source-netrc-normalize): Use it.
(auth-source-netrc-parse): Ditto.
Stefan Kangas [Mon, 16 Sep 2019 08:45:14 +0000 (10:45 +0200)]
Recommend against SHA-1 and MD5 for security
* doc/lispref/text.texi (Checksum/Hash):
* src/fns.c (Fmd5, Fsecure_hash):
* lisp/subr.el (sha1): Doc fix to recommend against SHA-1 and MD5 for
security-related applications, since they are not collision
resistant. (Bug#37420)
Change default value of message-make-forward-subject-function
* lisp/gnus/message.el (message-make-forward-subject-function): Change
default value to be a list so it's easier for users to add
functions. Change the type so the customize interface allows selecting
multiple provided functions instead of just one (bug#37470).
Michael Albinus [Fri, 20 Sep 2019 09:27:49 +0000 (11:27 +0200)]
Some Tramp methods allow to change the remote login shell
* doc/misc/tramp.texi (Inline methods) <sshx, plink, plinkx>:
(External methods) <scpx, pscp, psftp>: Mention, that the remote
login shell could be changed.
(Remote shell setup): Remove description of properties
"remote-shell-login" and "remote-shell-args", they don't matter
here. Changing the default remote shell works only for some
methods.
(Frequently Asked Questions): Refer to alternative approach fixing
zsh problems.
* etc/NEWS: Some Tramp methods allow to change the remote login shell.
* lisp/net/tramp-sh.el (tramp-default-remote-shell): New defconst.
(tramp-methods): Use it.
(tramp-get-sh-extra-args): New defun.
(tramp-open-shell, tramp-maybe-open-connection): Use it.
Eric Abrahamsen [Thu, 19 Sep 2019 17:36:42 +0000 (10:36 -0700)]
Only use Gnus registry for formatting when registry is loaded
See bug #36903
* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
(gnus-registry-article-marks-to-names): In some circumstances it's
possible for the user's summary line format spec to include
registry-specific code, while the registry itself isn't actually
loaded. Make sure the database is actually a hashtable before
accessing it.
Eli Zaretskii [Thu, 19 Sep 2019 14:10:00 +0000 (17:10 +0300)]
Fix calls to insert-*-hooks when JIT font lock is active
* src/insdel.c (signal_after_change): Save and restore
interval_insert_behind_hooks and
interval_insert_in_front_hooks across calls to various other
hooks, to prevent their clobbering by those other hooks.
(Bug#37455)
* lisp/align.el (align-areas): When given a callback function and
JUSTIFY, pick out the correct parameters (bug#30139). Suggested
by "John Wiegley" <johnw@gnu.org>.
Paul Eggert [Thu, 19 Sep 2019 07:59:59 +0000 (00:59 -0700)]
Also prefer .emacs.d if .emacs exists
Problem reported by Katsumi Yamaoka (Bug#37456).
* lisp/startup.el (startup--xdg-or-homedot): Also
prefer .emacs.d if a traditional .emacs file exists.
Paul Eggert [Thu, 19 Sep 2019 06:53:46 +0000 (23:53 -0700)]
Omit some overenthusiastic file-truename calls
Problem reported by Tino Calancha (Bug#37445).
* src/emacs.c (init_cmdargs): Call file-truename only if
needed, i.e., if invocation-directory ends in "/i386/" on
WINDOWSNT.
* src/lread.c (readevalloop): If the sourcename is not
absolute, make it absolute. There is no need to convert
non-absolute files into truenames, since absolute files are
not converted into truenames.
(init_lread): Do not convert source-directory into a truename
at startup. There is no need to do so in a dumped Emacs since
an absolute file name suffices. The source directory might
not even exist any more, or might have been replaced by an
interloper who takes advantage of the truename calculation.
(syms_of_lread): Remove Qfile_truename; no longer needed.
Matt Bisson [Thu, 19 Sep 2019 06:48:43 +0000 (08:48 +0200)]
Fix ignored Motif scrollbar resources (Bug#37359)
* src/xterm.c (x_create_toolkit_scroll_bar): On Motif
scrollbars, "foreground" has no meaning, while "background"
means the truck and arrow colors, and "trough" means the
background of the entire widget. This fix hooks up the Emacs
scrollbar "foreground" color to the XmNbackground resource
and the "background" color to XmNtroughColor which is more in
line with how Xaw scrollbars behave.
Stephen Leake [Thu, 19 Sep 2019 00:42:30 +0000 (17:42 -0700)]
Enhance 'pcomplete/make' to complete on targets in included makefiles
* lisp/pcmpl-gnu.el (pcmpl-gnu-makefile-includes): New.
(pcmpl-gnu-make-targets): New, factored out of pcmpl-gnu-make-all-targets.
(pcmpl-gnu-make-includes): New.
(pcmpl-gnu-make-all-targets): Use new functions.
in isearch-lazy-highlight-timer to cancel it in lazy-highlight-cleanup.
(isearch-done): No need to set isearch-lazy-highlight-start to nil -
it used to reset lazy-highlight loop like isearch-lazy-highlight-window-start,
but now other packages set isearch-lazy-highlight-last-string to nil to reset
lazy-highlight loop.