1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-20 10:23:57 +00:00
Commit Graph

134002 Commits

Author SHA1 Message Date
Eli Zaretskii
414a4969b9 Avoid gettimeofday deprecation warnings with MinGW
* nt/inc/ms-w32.h (__POSIX_2008_DEPRECATED)
[__MINGW32_VERSION >= 5001000L]: Define to nothing, to avoid
deprecation warnings about gettimeofday with mingw.org's MinGW
runtime 5.1 and later.
2018-07-29 20:07:09 +03:00
Paul Eggert
d7052cf393 Merge from origin/emacs-26
39d3e8b Fix last change in 'char_width'
67679f0 Add initial tests for wdired.el
2018-07-29 09:47:10 -07:00
Paul Eggert
4e47050df4 ; Merge from origin/emacs-26
The following commit was skipped:

831a3cb Fix use of non-nil wdired-use-interactive-rename
2018-07-29 09:47:10 -07:00
Michael Albinus
c92fd4e0e0 ; Instrumentation for shadowfile.el 2018-07-29 18:35:43 +02:00
Raimon Grau
dd51434714 Fix url's thing-at-point beginning-op (Bug#32028)
* lisp/thingatpt.el (url): Fix beginning-op making.
2018-07-29 12:07:07 -04:00
Eli Zaretskii
39d3e8b6bc Fix last change in 'char_width'
* src/character.c (char_width): Make sure variable C is always
initialized.  (Bug#32276)
2018-07-29 17:42:11 +03:00
Tino Calancha
b3f7e73fb7 Prefer ?* to hide passwords
It might be argued that a hidden string is more legible when using
?* as the hidden character instead of ?.
For example, the following strings have the same length:
"......"

"******"

It's slighly easier to visually count the number of characters in the second
string (Bug#32220).

* lisp/subr.el (read-passwd): Prefer ?* as default char instead of ?.
* doc/lispref/minibuf.texi (Reading a Password): Update manual.
; * etc/NEWS (Changes in Emacs 27.1): Announce the change.
2018-07-29 21:21:40 +09:00
Stephen Berman
ea1cf0960a Handle symlinks in wdired.el when restoring filename property
* lisp/wdired.el (wdired--restore-dired-filename-prop): If the
file name is a symbolic link, only propertize the link name.  This
prevents wdired-create-parentdirs from turning the link into a
directory.
2018-07-29 13:16:48 +02:00
Stephen Berman
8a563d9762 Fix bugs in wdired.el involving dired-filename property
After every change in wdired-mode, put the dired-filename text
property on the file name.  This ensures that changing some but not
all characters in the name succeeds with non-nil
wdired-use-interactive-rename (bug#32173) and it also ensures that
changed names can be found (e.g. by dired-isearch-filenames) while
still in wdired-mode.

* lisp/wdired.el (wdired--restore-dired-filename-prop): New function.
(wdired-change-to-wdired-mode): Add it to after-change-functions.
(wdired-change-to-dired-mode): Remove it from after-change-functions.
(wdired-finish-edit): Move invocation of
wdired-change-to-dired-mode below invocation of wdired-do-renames,
so that the latter runs wdired--restore-dired-filename-prop, but
above the invocation of revert-buffer to avoid using
wdired-revert, which changes back to wdired-mode.
(wdired-search-and-rename): Wrap renaming in unwind-protect and if
user types C-g when prompted to change the file name, make sure we
return to dired-mode.
2018-07-29 01:14:41 +02:00
Stephen Berman
67679f0c08 Add initial tests for wdired.el
* test/lisp/wdired-tests.el: New file.
2018-07-29 00:22:02 +02:00
Stephen Berman
831a3cb301 Fix use of non-nil wdired-use-interactive-rename
This is a fairly minimal fix for the release branch; a more
comprehensive fix is on master, so do not merge this to master.

* lisp/wdired.el (wdired-search-and-rename): Remove dired-filename
text property in order to find new filename when it only partially
replaces old filename (bug#32173).  If user quits before renaming
succeeds, restore the dired-filename text property.
2018-07-28 23:58:15 +02:00
Michael Albinus
db80851a1f ; Instrumentation for shadowfile.el 2018-07-28 20:07:36 +02:00
Eli Zaretskii
3f0709b328 Make 'tis620-2533' character set be an alias for 'thai-iso8859-11'
* lisp/simple.el (what-cursor-position): Revert ad-hoc change
to work around tis620-2533 charset.
* lisp/w32-fns.el: Use thai-iso8859-11 instead of tis620-2533.
* lisp/international/mule-conf.el (tis620-2533): Now an alias
for thai-iso8859-11, not a separate character set.
* lisp/international/fontset.el (charset-script-alist): Add
thai-iso8859-11; fix entries for greek and hebrew.
(font-encoding-alist, font-encoding-charset-alist): Use
thai-iso8859-11 instead of tis620-2533.
* lisp/descr-text.el (describe-char): Remove the ad-hoc code
that assigns eight-bit-control characters to the eight-bit
charset.
2018-07-28 20:34:57 +03:00
Glenn Morris
4713f5d742 Merge from origin/emacs-26
bd52f37 (origin/emacs-26) ; Fix last change: only MinGW runtime 5.0.2...
024d20f Fix compilation with mingw.org's MinGW 5.x headers
38b6748 Update the list of special forms in the ELisp manual
8579105 Don't fail to indent-sexp before a full sexp (Bug#31984)
d24c5f2 Fix calls to modifications hooks in replace-buffer-contents
71a9151 * src/character.c (char_width): Support glyphs with faces.  (...
0feb673 Display raw bytes as belonging to 'eight-bit' charset
2e2f00f ; * doc/emacs/mule.texi (International Chars): Fix last change.
00561b5 Fix inaccurate text in the user manual
5cfb7a3 Copyedits in tramp.texi, improved example with bash's readline
6f8f358 Minor Tramp doc update
2585fcb File Shadowing is not available on MS Windows
39da592 ; Minor markup change in indent.texi
2f00ffe ; bookmark-jump: Add comment about last change.
2018-07-28 07:50:36 -07:00
Eli Zaretskii
bd52f37cae ; Fix last change: only MinGW runtime 5.0.2 and later needs that. 2018-07-28 17:21:53 +03:00
Eli Zaretskii
024d20f81e Fix compilation with mingw.org's MinGW 5.x headers 2018-07-28 15:34:00 +03:00
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
Eli Zaretskii
38b6748856 Update the list of special forms in the ELisp manual
* doc/lispref/eval.texi (Special Forms):
* doc/lispref/frames.texi (Mouse Tracking): 'track-mouse' is
nowadays a macro.  (Bug#32284)
2018-07-28 10:22:04 +03: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
Noam Postavsky
8579105393 Don't fail to indent-sexp before a full sexp (Bug#31984)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only signal error if the
initial forward-sexp fails.  Suppress scan-error forn any of the
forward-sexp calls after that.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-cant-go): New
test.
2018-07-27 19:41:39 -04: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
Eli Zaretskii
d24c5f26bf Fix calls to modifications hooks in replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Call the modification
hooks on the entire region where replacements could have taken
place.  The previous attempts of being more accurate just
introduced bugs.  (Bug#32278)
2018-07-27 13:04:19 +03:00
Eli Zaretskii
71a915153a * src/character.c (char_width): Support glyphs with faces. (Bug#32276) 2018-07-27 12:33:29 +03:00
Eli Zaretskii
0feb6733d4 Display raw bytes as belonging to 'eight-bit' charset
* lisp/descr-text.el (describe-char):
* lisp/simple.el (what-cursor-position): Display characters in the
range #x3FFF80..#x3FFF9F as belonging to charset 'eight-bit', not
'tis620-2533'.
* lisp/international/mule-diag.el (describe-character-set):
Improve description of :supplementary-p.
2018-07-27 09:47:37 +03:00
Eli Zaretskii
2e2f00f8a5 ; * doc/emacs/mule.texi (International Chars): Fix last change. 2018-07-27 08:54:44 +03: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
Eli Zaretskii
00561b59c4 Fix inaccurate text in the user manual
* doc/emacs/mule.texi (International Chars): Correct inaccurate
description of raw bytes display by "C-x =".
2018-07-26 21:38:09 +03:00
Michael Albinus
a8f2d97b12 ; More instrumentation for shadowfile-tests.el 2018-07-26 16:12:15 +02:00
Michael Albinus
5cfb7a39ba Copyedits in tramp.texi, improved example with bash's readline
* doc/misc/tramp.texi (all): Unify some wordings.
(Frequently Asked Questions): Update example with bash's readline.
2018-07-26 11:54:33 +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
6f8f358e73 Minor Tramp doc update
* doc/misc/tramp.texi (Frequently Asked Questions): Disable bash's
INPUTRC.
2018-07-25 20:26:22 +02:00
Michael Albinus
2585fcb1d7 File Shadowing is not available on MS Windows
* doc/emacs/files.texi (File Shadowing): File Shadowing is not
available on MS Windows.

* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test02-files)
(shadow-test03-expand-cluster-in-file-name)
(shadow-test04-contract-file-name, shadow-test05-file-match)
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Skip under MS Windows.
2018-07-25 17:34:55 +02:00
Eli Zaretskii
39da592da8 ; Minor markup change in indent.texi
* doc/emacs/indent.texi (Indentation Commands): Use
@kbd{@key{...}} for better looks.  (Bug#32248)
2018-07-25 17:22:29 +03: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
Noam Postavsky
2f00ffe5f6 ; bookmark-jump: Add comment about last change. 2018-07-24 20:13:55 -04: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