1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-01 11:14:55 +00:00
Commit Graph

133747 Commits

Author SHA1 Message Date
Phil Sainty
1bcf5d02da * lisp/vc/diff.el (diff-buffer-with-file): Support indirect buffers.
(Bug#32195)
2018-07-29 00:30:01 +12:00
João Távora
177deaf9a1 Fix @include directive in Flymake doc again
Problem was reintroduced by commit titled:
"Mention use of C-h . (display-local-help) in Flymake manual"

* doc/misc/flymake.texi: Don't @include a relative path.
2018-07-28 08:41:10 +01:00
Martin Rudalics
c0809ff23d Fix problem with 'scroll-bar-adjust-thumb-portion' nil (Bug#32002)
* lisp/scroll-bar.el (scroll-bar-drag-1): Do not scroll window
when its buffer is fully visible and
'scroll-bar-adjust-thumb-portion' is nil (Bug#32002).
2018-07-28 09:08:30 +02:00
Paul Eggert
506ed5fd5e ; Merge from gnulib. 2018-07-27 14:48:39 -07:00
Ken Brown
81d6418e6b Fix file-name-case-insensitive-p on non-existent files
* src/fileio.c (Ffile_name_case_insensitive_p): If the file
doesn't exist, move up the filesystem tree until an existing
directory is found.  Then test that directory for
case-insensitivity.  (Bug#32246)
2018-07-27 17:22:23 -04:00
Stefan Monnier
8c8bf7db62 * lisp/simple.el (event-apply-modifier): Map control+[ to C-[ 2018-07-27 16:45:03 -04:00
Michael Albinus
22f549e305 ; More instrumentation for shadowfile-tests.el 2018-07-27 15:49:31 +02:00
Alan Mackenzie
99a93dae24 Correctly indent C++ brace lists in member init lists.
* lisp/progmodes/cc-engine.el (c-guess-basic-syntax; CASE 9B, CASE 9C): Set a
limit for a backward search to the ":" introducing the member init list, when
there is one, rather than the enclosing "{" or nil.
2018-07-26 19:55:47 +00:00
Michael Albinus
a8f2d97b12 ; More instrumentation for shadowfile-tests.el 2018-07-26 16:12:15 +02:00
Paul Eggert
e4d6ebee21 * src/editfns.c (syms_of_editfns): Fix typo in previous change. 2018-07-26 01:15:01 -07:00
Paul Eggert
4a56ca5bbf %o and %x can now format signed integers
Optionally treat integers as signed numbers with %o
and %x format specifiers, instead of treating them as
a machine-dependent two’s complement representation.
This option is more machine-independent, allows formats
like "#x%x" to be useful for reading later, and is
better-insulated for future changes involving bignums.
Setting the new variable ‘binary-as-unsigned’ to nil
enables the new behavior (Bug#32252).
This is a simplified version of the change proposed in:
https://lists.gnu.org/r/emacs-devel/2018-07/msg00763.html
I simplified that proposal by omitting bitwidth modifiers, as
I could not find an any example uses in the Emacs source code
that needed them and doing them correctly would have been
quite a bit more work for apparently little benefit.
* doc/lispref/strings.texi (Formatting Strings):
Document that %x and %o format negative integers in a
platform-dependent way.  Also, document how to format
numbers so that the same values can be read back in.
* etc/NEWS: Document the change.
* src/editfns.c (styled_format): Treat integers as signed
numbers even with %o and %x, if binary-as-unsigned is nil.
Support the + and space flags with %o and %x, since they’re
about signs.
(syms_of_editfns): New variable binary-as-unsigned.
* test/src/editfns-tests.el (read-large-integer):
Test that maximal integers can be read after printing
with all integer formats, if binary-as-unsigned is nil.
2018-07-26 00:39:17 -07:00
Lucas Werkmeister
19f5f7b19b Notify systemd in daemon-initialized and kill-emacs (Bug#31498)
With --[bg-]daemon and Type=forking, systemd will only consider the
daemon to have fully started up once the original process exits, and
will wait until then to start units depending on the Emacs service.  To
get the same functionality with --fg-daemon, use Type=notify instead of
Type=simple and explicitly send a readiness notification to systemd at
the point where the forked process would in --bg-daemon mode notify its
parent process and cause it to exit.  Similarly, notify systemd at the
beginning of the shutdown process as well.  (Both of these calls are
successful no-ops if emacs was not started by systemd.)
* etc/emacs.service: Update Type.
* src/emacs.c (daemon-initialized) [HAVE_LIBSYSTEMD]:
* src/emacs.c (kill-emacs) [HAVE_LIBSYSTEMD]: Call sd_notify().
2018-07-25 21:07:03 -04:00
Michael Albinus
244b682725 ; More instrumentation for shadowfile-tests.el 2018-07-25 22:04:34 +02:00
Eric Abrahamsen
a3b32a8be1 Fix docstring of gnus-dependencies-add-header
* lisp/gnus/gnus-sum.el (gnus-dependencies-add-header): Code is
  correct, but docs had logic of `gnus-summary-ignore-duplicates'
  backwards: if it's t, the Message-IDs will not be renamed.
2018-07-25 12:13:36 -07:00
Michael Albinus
7d96ed541c ; More instrumentation for shadowfile-tests.el 2018-07-25 20:48:10 +02:00
Michael Albinus
c67407e752 Instrument shadowfile{-tests} for error hunting on hydra.
* lisp/shadowfile.el (shadow-make-fullname): Use changed
`tramp-make-tramp-file-name' from Tramp 2.4.

* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo):
Instrument test.  Suppress errors in cleanup.
(shadow-test09-shadow-copy-files): Suppress errors in cleanup.
2018-07-25 13:18:46 +02:00
Paul Eggert
200195e824 Move proper-list-p to C
Since C code can use it and it’s simple, we might as well use C.
* lisp/subr.el (proper-list-p): Move to C code.
* src/eval.c (signal_error): Simplify by using Fproper_list_p.
* src/fns.c (Fproper_list_p): New function, moved here from Lisp.

Simplify signal_error
* src/eval.c (signal_error): Simplify by using FOR_EACH_TAIL_SAFE.
2018-07-24 16:08:09 -07:00
Paul Eggert
0ed21b7b3e * etc/NEWS: Omit bug# when not needed. 2018-07-24 10:01:16 -07:00
Glenn Morris
64f94785c7 Merge from origin/emacs-26
f64c277 (origin/emacs-26) Let bookmark-jump override window-point (Bu...
1208aaa Omit keymap from subword-mode docstring (Bug#32212)
2b70b54 Prevent line-mode term from showing user passwords
5de4441 Check for special filenames in eshell (Bug#30724)
1b4b965 Fix indent-sexp of #s(...) (Bug#31984)
59e8533 Add save-match-data to abbreviate-file-name (Bug#32201)
47f75b1 Fix last change in editfns.c
671dc5a Fix calls to buffer modification hooks from replace-buffer-co...
cc4ceed ; etc/NEWS: Remove unnecessary reference to a bug number.
e0f33ea Fix Bug#32226
7308fa0 Improve doc strings of several variables in keyboard.c
2018-07-24 06:40:58 -07:00
Michael Albinus
8c6a50230e Fix typo in `find-alternate-file'
* lisp/files.el (find-alternate-file): Add missing arguments to
`find-file-noselect' call.
2018-07-24 10:16:22 +02:00
Noam Postavsky
f64c2774e9 Let bookmark-jump override window-point (Bug#31751)
* lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
instead of switch-to-buffer, the latter obeys
switch-to-buffer-preserve-window-point and so loses the bookmark's
point.
2018-07-23 22:07:14 -04:00
Paul Eggert
90256285e1 (format "%#x" 0) yields "0", not "0x0"
* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat): Document this.
2018-07-23 10:24:24 -07:00
Noam Postavsky
1208aaa989 Omit keymap from subword-mode docstring (Bug#32212)
* lisp/progmodes/subword.el (subword-mode): Remove listing of
subword-mode-map bindings, since it is empty as of 2014-03-23 "Merge
capitalized-words-mode and subword-mode".
2018-07-23 08:20:07 -04:00
Tino Calancha
2b70b54739 Prevent line-mode term from showing user passwords
For buffers whose mode derive from comint-mode, the user password is
read from the minibuffer and it's hidden.  A buffer in term-mode and
line submode, instead shows the passwords.  Make buffers in line
term-mode to hide passwords too (Bug#30190).

* lisp/term.el (term-send-invisible): Prefer the more robust
`read-passwd' instead of `term-read-noecho'.
(term-watch-for-password-prompt): New function.
(term-emulate-terminal): Call it each time we receive non-escape
sequence output.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
2018-07-23 08:20:07 -04:00
Paul Eggert
57c4bc146b 0x%x → %#x in elisp formats
* lisp/emacs-lisp/cl-print.el (cl-print-object):
* lisp/profiler.el (profiler-format-entry):
* lisp/progmodes/hideif.el (hif-evaluate-macro):
Prefer %#x to 0x%x in elisp formats when formatting arbitrary
integers, as it’ll produce more-readable output with negative args
should we change how negative values are printed with %x.
2018-07-23 01:10:07 -07:00
Paul Eggert
109cb1520c positive → nonnegative doc fixes
* doc/lispref/numbers.texi (Bitwise Operations)
(Math Functions):
* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat):
Correct “positive” with “nonnegative” in some documentation.
2018-07-23 00:07:02 -07:00
Lars Ingebrigtsen
216b9b2dbf Revert "Make nnimap support IMAP namespaces"
This reverts commit 7b5b3ddb2d.

Insufficiently tested before committing -- bugs out several places
when not using namespaces.
2018-07-23 09:01:24 +02:00
Arash Esbati
8f3bca3ad5 Add \eqref to RefTeX's reference styles (Bug#32203)
* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add entry
for \eqref provided by amsmath.sty and bind it to "e" key.
2018-07-22 10:53:50 -04:00
Noam Postavsky
8217998b0d Preserve nonblank whitespace when indenting (Bug#32200)
* lisp/indent.el (indent-line-to): Remove only spaces and tabs, not
any whitespace syntax characters.
2018-07-22 10:52:48 -04:00
Lars Ingebrigtsen
6e697bced0 Add further clarifications to gnus-blocked-images
* lisp/gnus/gnus-art.el (gnus-blocked-images): Add further
clarifications.
2018-07-22 15:57:49 +02:00
Nikolaus Rath
7b5b3ddb2d Make nnimap support IMAP namespaces
* lisp/gnus/nnimap.el (nnimap-use-namespaces): Introduc new
server variable.
(nnimap-group-to-imap, nnimap-get-groups): Transform IMAP group
names to Gnus group name by stripping / prefixing personal
namespace prefix.
(nnimap-open-connection-1): Ask server for namespaces and store them.

* lisp/gnus/nnimap.el (nnimap-request-group-scan)
(nnimap-request-create-group, nnimap-request-delete-group)
(nnimap-request-rename-group, nnimap-request-move-article)
(nnimap-process-expiry-targets)
(nnimap-request-update-group-status)
(nnimap-request-accept-article, nnimap-request-list)
(nnimap-retrieve-group-data-early, nnimap-change-group)
(nnimap-split-incoming-mail): Use nnimap-group-to-imap.
(nnimap-group-to-imap): New function to map Gnus group names to
IMAP folder names.
2018-07-22 15:33:38 +02:00
Lars Ingebrigtsen
92ba34d89a Make async :family 'local failures fail correctly again
* src/fileio.c (get_file_errno_data): Refactor out into its own
function so that we can reuse the error handling from an async
context (bug#31901).

* src/process.c (connect_network_socket): When an async :family
'local client fails (with a file error, for instance), mark the
process as failed.
2018-07-22 13:39:10 +02:00
Michael Albinus
e23727978d thread-join returns the result of finished thread
* doc/lispref/threads.texi (Basic Thread Functions):
* etc/NEWS: Document return value of `thread-join'.

* src/thread.c (invoke_thread_function, Fmake_thread)
(init_main_thread): Set result.
(Fthread_join): Propagate signals, and return result.
(Vmain_thread): New defvar.

* src/thread.h (struct thread_state): Add `result' field.

* test/src/thread-tests.el (threads-join): Test also return value.
(threads-join-error): New test.
(threads-mutex-signal): Check for propagation of `quit' signal.
2018-07-22 11:53:24 +02:00
John Shahid
b7ca3d5d93 Avoid destroying match data in 'setenv' (Bug#32201)
* lisp/env.el (setenv,setenv-internal): Replace string-match with
string-match-p.
2018-07-21 21:10:20 -04:00
Jonathan Kyle Mitchell
5de444112c Check for special filenames in eshell (Bug#30724)
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Check for "~"
in lisp commands with the eshell-filename-arguments property
(Bug#30724).

* lisp/eshell/em-dirs.el (eshell/cd, eshell/pushd, eshell/popd):
* lisp/eshell/em-ls.el (eshell/ls):
* lisp/eshell/em-unix.el (eshell/rm, eshell/mkdir, eshell/rmdir)
(eshell/mv, eshell/cp, eshell/ln, eshell/cat, eshell/du, eshell/diff):
* lisp/eshell/esh-ext.el (eshell/addpath): Add
eshell-filename-arguments to symbol plist.
2018-07-21 21:07:07 -04:00
Noam Postavsky
1b4b96597c Fix indent-sexp of #s(...) (Bug#31984)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
ends after the current line.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.
2018-07-21 21:07:07 -04:00
Noam Postavsky
59e8533286 Add save-match-data to abbreviate-file-name (Bug#32201)
* lisp/files.el (abbreviate-file-name): Save match-data around
expand-file-name; it is not guaranteed to preserve match-data, and may
well do so depending on what file handlers and hooks are in effect.
2018-07-21 21:07:07 -04:00
Eli Zaretskii
47f75b1ba0 Fix last change in editfns.c
* src/editfns.c (Freplace_buffer_contents): Fix last change: always
call buffer modification hooks, even if nothing was deleted/inserted.
(bug#32237)
2018-07-21 22:27:33 +03:00
Eli Zaretskii
671dc5a51e Fix calls to buffer modification hooks from replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Don't call buffer
modification hooks if nothing was deleted/inserted.  (Bug#32237)
2018-07-21 21:05:52 +03:00
Eli Zaretskii
cc4ceed18d ; etc/NEWS: Remove unnecessary reference to a bug number. 2018-07-21 19:44:38 +03:00
Ken Brown
f3f67cf0b9 Pacify GCC 7 with -Wformat-overflow
* src/w32term.c (x_draw_glyphless_glyph_string_foreground):
Force sprintf to write at most 6 bytes, excluding the
terminating null byte.
2018-07-21 12:18:45 -04:00
Eli Zaretskii
d12215324b Minor rewording of last change
* lisp/vc/add-log.el (add-log-dont-create-changelog-file)
(add-log--pseudo-changelog-buffer-name)
(add-log--changelog-buffer-p, add-change-log-entry): Doc fixes.

* etc/NEWS: Improve wording of last change.

* doc/emacs/maintaining.texi (Change Log Commands): Improve
wording of last change.
2018-07-21 19:11:32 +03:00
João Távora
f96fe57fb7 New option to make 'C-x 4 a' use file-less ChangeLog buffers
* doc/emacs/maintaining.texi (Change Log Commands): Document
add-log-dont-create-changelog-file.

* etc/NEWS (Change Logs Mode): Mention
add-log-dont-create-changelog-file.

* lisp/vc/add-log.el (add-log-file-name): Add comment.
(add-log-dont-create-changelog-file): New variable.
(add-log--pseudo-changelog-buffer-name)
(add-log--changelog-buffer-p): New helpers.
(add-log-find-changelog-buffer): New function.
(add-log--pseudo-changelog-buffer-name): Respect
add-log-dont-create-changelog-file.

* lisp/vc/log-edit.el (log-edit-changelog-entries): Use
add-log-find-changelog-buffer.
2018-07-21 16:02:57 +01:00
Bozhidar Batsov
6eac401c23 Make ielm accept an optional buffer name param
The ielm buffer name was hardcoded which made it hard for programs to
interactively create ielm buffers with different names and switch to
them (e.g. perhaps you want to have one ielm buffer for each of the
Elisp projects you're working on).
2018-07-21 14:00:11 +03:00
Michael Albinus
e0f33ea394 Fix Bug#32226
* lisp/shadowfile.el (shadow-site-name, shadow-name-site):
Use "[-.[:word:]]+" as hostname regexp.  (Bug#32226)

* test/lisp/shadowfile-tests.el (shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Skip if needed.
2018-07-21 12:29:06 +02:00
Eli Zaretskii
7308fa0e2b Improve doc strings of several variables in keyboard.c
* src/keyboard.c (syms_of_keyboard) <debug-on-event>
<attempt-stack-overflow-recovery>
<attempt-orderly-shutdown-on-fatal-signal>: Make sure the first
sentence of the doc string fits on a single line.
2018-07-21 12:28:11 +03:00
Eli Zaretskii
03e3440dbb Fix recording keyboard macros when input method is active
* lisp/international/quail.el (quail-start-translation)
(quail-start-conversion): Bind inhibit--record-char to t for
the first character of a translated sequence.

* src/keyboard.c (record_char): Don't record events from
macros to dribble file, per documentation.
(Fopen_dribble_file): Doc fix.
(syms_of_keyboard) <inhibit--record-char>: New variable.
(record_char): Don't record input event if
inhibit--record-char is non-nil.  (Bug#32108)
2018-07-21 12:10:20 +03:00
Paul Eggert
1780502da6 Report base of out-of-range input fixnums
* src/lread.c (string_to_number): Report the base of an
out-of-range fixnum.  Problem reported by Andy Moreton in:
https://lists.gnu.org/r/emacs-devel/2018-07/msg00696.html
2018-07-21 00:26:10 -07:00
Paul Eggert
2c242cb1a2 * src/fns.c (Feql, Fequal): Improve floating-point doc. 2018-07-20 13:56:00 -07:00
Glenn Morris
de66bfd0f2 ; Merge from origin/emacs-26
The following commit was skipped:

61de292 (origin/emacs-26) Fix (Bug#32218).  Do not merge with master
2018-07-20 10:00:32 -07:00