]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoFix GC threshold typo
Paul Eggert [Tue, 13 Aug 2019 17:03:41 +0000 (10:03 -0700)]
Fix GC threshold typo

Problem reported by Eli Zaretskii (Bug#37006#25).
* src/alloc.c (garbage_collect_1): Fix typo in threshold calc.
Go back to dividing by 10 since the numerator’s a constant now.
Problem introduced in 2019-07-21T02:40:03Z!eggert@cs.ucla.edu.

5 years agoImprove documentation of 'diff-font-lock-prettify'
Eli Zaretskii [Tue, 13 Aug 2019 15:16:51 +0000 (18:16 +0300)]
Improve documentation of 'diff-font-lock-prettify'

* lisp/vc/diff-mode.el (diff-font-lock-prettify): Doc fix.

* etc/NEWS: Minor copyedits.

5 years agoFix initialization of user-defined fringe bitmaps in daemon mode
Eli Zaretskii [Tue, 13 Aug 2019 14:49:51 +0000 (17:49 +0300)]
Fix initialization of user-defined fringe bitmaps in daemon mode

* src/fringe.c (gui_init_fringe): Rename from w32_init_fringe
or x_cr_init_fringe, and make unconditionally compiled; all
callers changed.  Do nothing if the frame's
redisplay_interface doesn't implement the define_fringe_bitmap
method.  Set up any user-defined fringe bitmaps in addition to
the standard bitmaps.
Suggested by Liam Quinlan <liamkquinlan@gmail.com> in
https://lists.gnu.org/archive/html/emacs-devel/2019-08/msg00259.html.

(w32_reset_fringes) [HAVE_NTGUI]: Do nothing if the frame's
redisplay_interface doesn't implement the
destroy_fringe_bitmap method.

* src/w32fns.c (Fx_create_frame): Call gui_init_fringe when
the first GUI frame is created for this session.
* src/dispextern.h (w32_init_fringe): Rename to
gui_init_fringe and make unconditional.
(x_cr_init_fringe): Remove prototype.

5 years ago; Add commentary to recent changes
Eli Zaretskii [Mon, 12 Aug 2019 14:39:09 +0000 (17:39 +0300)]
; Add commentary to recent changes

* src/image.c (png_load_body):
* src/editfns.c (styled_format):
* src/casefiddle.c (do_casify_multibyte_string):
* src/alloc.c (free_cons): Comment why we use a signed
temporary integer variable.  (Bug#37006)

5 years ago* lisp/password-cache.el: adapt test to change in password-in-cache-p
Óscar Fuentes [Mon, 12 Aug 2019 14:22:34 +0000 (16:22 +0200)]
* lisp/password-cache.el: adapt test to change in password-in-cache-p

5 years agoQuote file names properly in Tramp
Michael Albinus [Mon, 12 Aug 2019 14:18:59 +0000 (16:18 +0200)]
Quote file names properly in Tramp

* lisp/net/tramp.el (tramp-handle-file-truename)
(tramp-handle-insert-directory):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename):
Use `tramp-compat-directory-name-p'.

* lisp/net/tramp.el (tramp-drop-volume-letter)
(tramp-handle-file-truename):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-file-truename):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename):
(tramp-sudoedit-handle-make-symbolic-link): Quote properly.

* lisp/net/tramp-compat.el (tramp-compat-file-name-quote)
(tramp-compat-file-name-unquote): Add optional argument TOP.

5 years agoHandle symbolic links properly in Tramp gfvs methods
Michael Albinus [Mon, 12 Aug 2019 14:18:17 +0000 (16:18 +0200)]
Handle symbolic links properly in Tramp gfvs methods

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-readable-p):
Handle symbolic links.

5 years agoFix caching problem in Tramp smb method
Michael Albinus [Mon, 12 Aug 2019 14:17:39 +0000 (16:17 +0200)]
Fix caching problem in Tramp smb method

* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
Add "file-entries",

5 years agoPrefer signed when testing for signed overflow
Paul Eggert [Sun, 11 Aug 2019 23:42:38 +0000 (16:42 -0700)]
Prefer signed when testing for signed overflow

* src/alloc.c (free_cons):
* src/casefiddle.c (do_casify_multibyte_string):
* src/editfns.c (styled_format):
* src/image.c (png_load_body):
Use signed arguments to INT_MULTIPLY_WRAPV etc.  This doesn’t fix
any bugs, but GCC emits better code when all args are signed.
Also, this removes the need for an if in free_cons (Bug#37006).

5 years agopassword-cache: differentiate null values from non-existent entries
Óscar Fuentes [Sun, 11 Aug 2019 23:42:16 +0000 (01:42 +0200)]
password-cache: differentiate null values from non-existent entries

* password-cache.el (password-in-cache-p, password-cache-add):
  properly detect non-existent entry.  (Bug#36834)

5 years agoFix garbage collection
Eli Zaretskii [Sun, 11 Aug 2019 16:23:23 +0000 (19:23 +0300)]
Fix garbage collection

* src/alloc.c (free_cons): Avoid false positives in
INT_ADD_WRAPV.  (Bug#37006)

5 years agoPrompt for new sieve script names in sieve management
Eric Abrahamsen [Sun, 11 Aug 2019 15:26:59 +0000 (08:26 -0700)]
Prompt for new sieve script names in sieve management

* lisp/net/sieve.el (sieve-edit-script): Otherwise the user ends up
with a script named '<new script>.sieve'.

5 years agoRetrieve start time from remote machine, use compat attrib functions
Michael Albinus [Sun, 11 Aug 2019 10:06:57 +0000 (12:06 +0200)]
Retrieve start time from remote machine, use compat attrib functions

* lisp/net/tramp-compat.el (tramp-compat-file-attribute-access-time)
(tramp-compat-file-attribute-status-change-time): New defaliases.

* test/lisp/net/tramp-tests.el (tramp--test-start-time): New defvar.
(tramp--test-file-attributes-equal-p)
(tramp-test19-directory-files-and-attributes): Use it.
(tramp-test18-file-attributes)
(tramp--test-file-attributes-equal-p, tramp-test20-file-modes)
(tramp-test22-file-times, tramp--test-check-files):
Use `tramp-compat-file-attribute-*' functions.

5 years agoSet custom :version for recently modified undo options
Glenn Morris [Sun, 11 Aug 2019 05:59:00 +0000 (22:59 -0700)]
Set custom :version for recently modified undo options

* lisp/cus-start.el (undo-limit, undo-strong-limit, undo-outer-limit):
Bump :version.

5 years ago* doc/emacs/calendar.texi (Time Intervals): Doc fix.
Stefan Kangas [Sat, 10 Aug 2019 20:30:41 +0000 (22:30 +0200)]
* doc/emacs/calendar.texi (Time Intervals): Doc fix.

5 years agoDouble undo limits
Stefan Kangas [Sat, 10 Aug 2019 13:17:33 +0000 (15:17 +0200)]
Double undo limits

* src/undo.c (syms_of_undo) <undo_limit, undo_strong_limit>
<Vundo_outer_limit>: Double undo limits.  (Bug#31104)

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 10 Aug 2019 15:44:31 +0000 (08:44 -0700)]
Merge from origin/emacs-26

0860ac0 (origin/emacs-26) Improve documentation of features that use ...
fae1ff6 Fix docstrings in pong
82a2894 Improve doc strings of 'append-to-buffer' and friends
cb0403d Fix octave-mode ElDoc support
691790b Avoid Groff hanging on MS-Windows when invoked by "M-x man"

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 10 Aug 2019 15:44:31 +0000 (08:44 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

b83f83c Ignore pending_signals when checking for quits.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 10 Aug 2019 15:44:31 +0000 (08:44 -0700)]
Merge from origin/emacs-26

e7818cb Fix nnmail-expiry-wait docs and custom :types
8b7c776 * lisp/simple.el (kill-do-not-save-duplicates): Doc fix.  (Bu...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 10 Aug 2019 15:44:31 +0000 (08:44 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

5a5ad99d Improve documentation of debugging Lisp syntax error
0148fc7 (emacs-26) ; Auto-commit of loaddefs files.

5 years agoImprove documentation of features that use the fringes
Eli Zaretskii [Sat, 10 Aug 2019 09:48:03 +0000 (12:48 +0300)]
Improve documentation of features that use the fringes

* doc/emacs/display.texi (Fringes): Add cross-reference to
where indicate-empty-lines is described.
(Useless Whitespace): Add an @anchor for a more accurate
cross-reference in "Fringes".

5 years agoUse a time offset when comparing times of local and remote machines
Michael Albinus [Sat, 10 Aug 2019 09:34:13 +0000 (11:34 +0200)]
Use a time offset when comparing times of local and remote machines

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Use a time offset in order to compensate different times on local
and remote machines.

5 years agoFix docstrings in pong
Mauro Aranda [Wed, 7 Aug 2019 14:55:54 +0000 (11:55 -0300)]
Fix docstrings in pong

* lisp/play/pong.el (pong-move-left pong-move-right): Refer to the
right bats and directions of movement.  (Bug#36959)

5 years agoFix pong collision detection
Mauro Aranda [Wed, 7 Aug 2019 00:48:41 +0000 (21:48 -0300)]
Fix pong collision detection

* lisp/play/pong.el (pong-update-game): If the ball hit the bat where
bats are positioned, draw again the bat cell in the old ball
position.  (Bug#20579).
Also, avoid changing the direction of the ball right after hitting the
bats, and improve the collision detection against the borders.

5 years agoSet up defined_color_hook for the initial frame
Alex Gramiak [Fri, 31 May 2019 20:30:31 +0000 (14:30 -0600)]
Set up defined_color_hook for the initial frame

* src/terminal.c (init_initial_terminal): Set up the
defined_color_hook.  This avoids crashes when running
in batch mode with code that manipulates colors.
(Bug#36019)

5 years agoSupport bool-vectors in cl-extra.el
Philippe Schnoebelen [Sun, 28 Jul 2019 06:59:12 +0000 (08:59 +0200)]
Support bool-vectors in cl-extra.el

* lisp/emacs-lisp/cl-extra.el (cl-coerce): Support bool-vector.

Copyright-paperwork-exempt: yes

5 years ago* lisp/frameset.el (frameset--minibufferless-last-p): Add comments (bug#36894)
Juri Linkov [Fri, 9 Aug 2019 18:08:54 +0000 (21:08 +0300)]
* lisp/frameset.el (frameset--minibufferless-last-p): Add comments (bug#36894)

5 years agoFix highlighting in man pages displayed by "M-x man"
Eli Zaretskii [Fri, 9 Aug 2019 13:51:14 +0000 (16:51 +0300)]
Fix highlighting in man pages displayed by "M-x man"

* lisp/man.el (Man-highlight-references0): Handle the case
when a section is divided between 2 or more chunks of text
received from the 'man' program.  (Bug#36927)

5 years agoImprove doc strings of 'append-to-buffer' and friends
Eli Zaretskii [Fri, 9 Aug 2019 07:31:39 +0000 (10:31 +0300)]
Improve doc strings of 'append-to-buffer' and friends

* lisp/simple.el (append-to-buffer, prepend-to-buffer)
(copy-to-buffer): Doc fixes.

5 years agoFix doc strings modified in recent changes
Eli Zaretskii [Fri, 9 Aug 2019 07:02:23 +0000 (10:02 +0300)]
Fix doc strings modified in recent changes

* src/xfns.c (Fx_change_window_property)
(Fx_delete_window_property, Fx_window_property)
(Fx_window_property_attributes): Doc fixes.

5 years agoProvide better target window consistency across x window property functions.
Noah Friedman [Fri, 9 Aug 2019 06:17:56 +0000 (23:17 -0700)]
Provide better target window consistency across x window property functions.

Use the argument name WINDOW-ID instead of SOURCE for same.
Revise docstrings to clarify semantics of FRAME and WINDOW-ID.

(Fx_change_window_property): Use `target_window' instead of `w'.
This is consistent with other related functions.
Finalize its value before blocking input.

(Fx_window_property):
(Fx_window_property_attributes): Use `window_id' instead of `source'.

(Fx_delete_window_property): New optional arg window_id.

5 years ago(Fx_change_window_property): Rename SOURCE arg to WINDOW-ID
Noah Friedman [Fri, 9 Aug 2019 04:52:37 +0000 (21:52 -0700)]
(Fx_change_window_property): Rename SOURCE arg to WINDOW-ID

5 years ago(Fx_change_window_property): Add optional arg SOURCE.
Noah Friedman [Thu, 8 Aug 2019 01:18:32 +0000 (18:18 -0700)]
(Fx_change_window_property): Add optional arg SOURCE.

This provides symmetry with Fx_window_property, so that the window
need not be an actual emacs frame.  This is useful for modifying
properties of parent windows (specified with --parent-id to emacs) or
generally assisting the window manager.

5 years agoUse "python -m pdb" when "pdb" is missing in M-x pdb
Stefan Kangas [Thu, 11 Jul 2019 03:51:18 +0000 (05:51 +0200)]
Use "python -m pdb" when "pdb" is missing in M-x pdb

* lisp/progmodes/gud.el (gud-pdb-command-name): Use "python -m pdb"
when "pdb" is missing.  (Bug#21521)

5 years agoSay how to enable event designators in the eshell manual
Noam Postavsky [Thu, 8 Aug 2019 23:35:53 +0000 (19:35 -0400)]
Say how to enable event designators in the eshell manual

* doc/misc/eshell.texi (History): Mention that event designators need
to be enabled.
* etc/NEWS: Mark corresponding entry as documented in manual.

5 years agoFix octave-mode ElDoc support
Mauro Aranda [Tue, 6 Aug 2019 15:45:28 +0000 (12:45 -0300)]
Fix octave-mode ElDoc support

* lisp/progmodes/octave.el (octave-eldoc-function-signatures): Fix the
regexp used, so no match happens when there is no defined function FN.
Also, tweak the regexp to support GNU Octave 4.2.x and newer.  (Bug#36459)

5 years agoWork on Tramp backward compatibility
Michael Albinus [Thu, 8 Aug 2019 14:47:29 +0000 (16:47 +0200)]
Work on Tramp backward compatibility

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Use `tramp-compat-directory-name-p'.

5 years agoImprove time arithmetic in tramp--test-file-attributes-equal-p
Michael Albinus [Thu, 8 Aug 2019 13:42:45 +0000 (15:42 +0200)]
Improve time arithmetic in tramp--test-file-attributes-equal-p

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Improve time arithmetic.

5 years agoSuppress false alarm in Tramp
Michael Albinus [Thu, 8 Aug 2019 13:42:06 +0000 (15:42 +0200)]
Suppress false alarm in Tramp

* lisp/net/tramp.el (tramp-dissect-file-name): Suppress false alarm.

5 years agoAvoid Groff hanging on MS-Windows when invoked by "M-x man"
Eli Zaretskii [Thu, 8 Aug 2019 13:17:51 +0000 (16:17 +0300)]
Avoid Groff hanging on MS-Windows when invoked by "M-x man"

* lisp/man.el (Man-build-man-command): On MS-Windows, redirect
stdin of 'man' to the null device, to make sure Groff exits
immediately after formatting the man page.

5 years agoSuppress interactive-only warnings in undo-tests.el (Bug#36565)
Stefan Kangas [Fri, 2 Aug 2019 14:46:08 +0000 (16:46 +0200)]
Suppress interactive-only warnings in undo-tests.el (Bug#36565)

* test/src/undo-tests.el (undo-test-region-deletion)
(undo-test-region-example, undo-test-marker-adjustment-nominal)
(undo-test-region-t-marker, undo-test-marker-adjustment-moved)
(undo-test-region-mark-adjustment): Suppress interactive-only warnings
by using funcall-interactively.

5 years agoSuppress relint errors in fortran.el
Mattias Engdegård [Tue, 6 Aug 2019 11:09:20 +0000 (13:09 +0200)]
Suppress relint errors in fortran.el

* lisp/progmodes/fortran.el (fortran-indent-to-column):
Suppress relint complaints about duplicated character in skip-set;
it's intentional and harmless.

5 years agoFix XTerm OSC 52 selection retrieval (bug#36879)
Mattias Engdegård [Sat, 3 Aug 2019 10:08:27 +0000 (12:08 +0200)]
Fix XTerm OSC 52 selection retrieval (bug#36879)

When asking XTerm for the selection via OSC 52, use ST as string
terminator in the request to get ST as terminator in the reply,
because BEL is messy to receive in many ways.

* lisp/term/xterm.el (gui-backend-get-selection):
Use ST as string terminator in request and reply.
Use a time-out when reading the reply.

5 years agoTests need to be moved when source files are
Glenn Morris [Wed, 7 Aug 2019 16:24:15 +0000 (09:24 -0700)]
Tests need to be moved when source files are

* test/lisp/obsolete/cl-tests.el: Move from test/lisp/emacs-lisp.

5 years agoIgnore pending_signals when checking for quits.
Philipp Stephani [Wed, 2 Jan 2019 21:22:18 +0000 (22:22 +0100)]
Ignore pending_signals when checking for quits.

pending_signals is often set if no quit is pending.  This results in
bugs in module code if the module returns but no quit is actually
pending.

* src/emacs-module.c (module_should_quit): Use QUITP macro to check
whether the caller should quit.

* src/eval.c: Remove obsolete comment.

5 years ago; Still working on tramp--test-file-attributes-equal-p
Michael Albinus [Wed, 7 Aug 2019 14:36:00 +0000 (16:36 +0200)]
; Still working on tramp--test-file-attributes-equal-p

5 years ago; Instrument tramp--test-file-attributes-equal-p
Michael Albinus [Wed, 7 Aug 2019 12:59:19 +0000 (14:59 +0200)]
; Instrument tramp--test-file-attributes-equal-p

5 years agoContinue to work on Bug#36940
Michael Albinus [Wed, 7 Aug 2019 12:12:14 +0000 (14:12 +0200)]
Continue to work on Bug#36940

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Make the check more precise.  (Bug#36940)

5 years agoRe-port dump_bitset_clear to -fsanitize=undefined
Paul Eggert [Wed, 7 Aug 2019 01:39:20 +0000 (18:39 -0700)]
Re-port dump_bitset_clear to -fsanitize=undefined

* src/pdumper.c (dump_bitset_clear): Skip the memset if the
size is zero, because in that case the destination might be NULL.
This fixes a bug introduced in 2019-07-26T06:17:52Zeggert@cs.ucla.edu.
Add a comment to make the bug less likely to reoccur.

5 years ago* lisp/gnus/message.el (message-sendmail-f-is-evil): Revert recent change
Stefan Monnier [Wed, 7 Aug 2019 00:42:59 +0000 (20:42 -0400)]
* lisp/gnus/message.el (message-sendmail-f-is-evil): Revert recent change

(bug#36937)

5 years agoFix Bug#36940
Michael Albinus [Tue, 6 Aug 2019 19:47:57 +0000 (21:47 +0200)]
Fix Bug#36940

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Make the check more precise.  (Bug#36940)
(tramp-test19-directory-files-and-attributes): Move some checks to
`tramp--test-file-attributes-equal-p'.

5 years agoC++ Mode: Prevent End of statement being found after {} in "count << vec{} <<"
Alan Mackenzie [Tue, 6 Aug 2019 16:49:29 +0000 (16:49 +0000)]
C++ Mode: Prevent End of statement being found after {} in "count << vec{} <<"

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Check for
operators which cannot start a statement, which may follow a closing brace.
Don't recognise an end of statement in such a case.

* lisp/progmodes/cc-langs.el (c-operator-re, c-bin-tern-operators)
(c-unary-operators, c-non-after-{}-operators, c-non-after-{}-ops-re): New lang
consts and vars.

5 years agoFix minor compilation problems on MS-Windows
Eli Zaretskii [Tue, 6 Aug 2019 14:53:03 +0000 (17:53 +0300)]
Fix minor compilation problems on MS-Windows

* src/w32fns.c (Fdefault_printer_name): Fix size of local
buffer.
* src/image.c [WINDOWSNT]: Test __MINGW_MAJOR_VERSION as well
to shut up compiler warnings.

5 years agoFix various Calc date conversions (bug#36822)
Mattias Engdegård [Tue, 30 Jul 2019 15:33:19 +0000 (17:33 +0200)]
Fix various Calc date conversions (bug#36822)

* lisp/calc/calc-forms.el (math-absolute-from-gregorian-dt):
Rewrite in a way that I understand, and that actually seems to work.
(math-absolute-from-julian-dt): Use Julian, not Gregorian, leap year
rules for counting days within a year.
(math-julian-date-beginning, math-julian-date-beginning-int):
Change constants to be consistent with their doc strings and the code:
use Rata Die epoch at Dec 31, 1 BC Gregorian proleptic, not Julian.
* doc/misc/calc.texi (Date Forms): Correct difference between Julian
Day and Rata Die.
* test/lisp/calc/calc-tests.el (calc-test-calendar): New test.

5 years agoAdd conditional operator xor to subr.el
Mattias Engdegård [Wed, 31 Jul 2019 17:45:06 +0000 (19:45 +0200)]
Add conditional operator xor to subr.el

Suggested by Oleh Krehel and implemented by Basil Contovounesios in
the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00547.html

* lisp/array.el (xor): Move unused function from here...
* lisp/subr.el: ...to here, and improve.
* lisp/gnus/spam.el (spam-xor):
* lisp/play/5x5.el (5x5-xor):
* lisp/proced.el (proced-xor):
* lisp/progmodes/idlwave.el (idlwave-xor):
* lisp/vc/diff-mode.el (diff-xor): Define as obsolete aliases of,
and replace all uses with, xor.
* lisp/jsonrpc.el: Remove unused dependency on array.el.
* lisp/org/org.el (org-xor): Move from here...
* lisp/org/org-compat.el (org-xor): ...to here, as a compatibility
shim for xor.
* lisp/progmodes/idlw-shell.el (idlwave-shell-enable-all-bp):
* lisp/simple.el (exchange-point-and-mark):
* lisp/windmove.el (windmove-display-in-direction): Use xor.
* lisp/strokes.el (strokes-xor): Remove commented-out xor
implementation.

* doc/lispref/control.texi (Control Structures): Extend menu entry
for new combining condition.
(Combining Conditions):
* etc/NEWS (Lisp Changes): Document xor.

* test/lisp/subr-tests.el (subr-test-xor): New test.

5 years agoMove cl.el to lisp/obsolete
Stefan Monnier [Tue, 6 Aug 2019 08:01:49 +0000 (04:01 -0400)]
Move cl.el to lisp/obsolete

* lisp/emacs-lisp/cl.el: Move from here...
* lisp/obsolete/cl.el: ...to here.

* lisp/subr.el (do-after-load-evaluation): Use "deprecated" in the
message when loading packages from lisp/obsolete.

5 years ago* lisp/mail/rfc2047.el (rfc2047-encodable-p): Don't require `message`.
Stefan Monnier [Tue, 6 Aug 2019 07:58:50 +0000 (03:58 -0400)]
* lisp/mail/rfc2047.el (rfc2047-encodable-p): Don't require `message`.

Use bound-and-true-p rather than requiring `message` to get
message-posting-charset (since it defaults to nil anyway).

5 years ago* lisp/mh-e: Use cl-lib
Stefan Monnier [Tue, 6 Aug 2019 07:56:51 +0000 (03:56 -0400)]
* lisp/mh-e: Use cl-lib

Also, use underscore prefixes and defvar in preparation for lexical binding

* lisp/mh-e/mh-acros.el: Require cl-lib instead of cl.
Rename all cl.el uses by adding `cl-` prefix.
(mh-require-cl): Remove.  Not needed any more.  Remove all calls.
(mh-defstruct): Remove.  Replace all uses with cl-defstruct.
(mh-dlet*): New macro.

* lisp/mh-e/mh-comp.el (mh-user-agent-compose): Fold all ignored
optional args into the &rest arg.

* lisp/mh-e/mh-e.el: Require cl-lib instead of using mh-require-cl.
(mh-variants): Don't add-to-list on a local var.

* lisp/mh-e/mh-folder.el (mh-restore-desktop-buffer): Use shorter arg
names that don't collide with global vars.

* lisp/mh-e/mh-mime.el (mh-insert-mime-button):
(mh-insert-mime-security-button): Use mh-dlet*.

* lisp/mh-e/mh-search.el (mh-swish-next-result, mh-grep-next-result)
(mh-namazu-next-result): Use `or`.

* lisp/mh-e/mh-thread.el (mh-thread-generate)
(mh-thread-prune-containers): Use underscore rather than declare+ignore.

* lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define): Use mh-dlet*.
(mh-tool-bar-define): Prefer the more precise \`...\' regexp ops.
Prefer Elisp's `eval-and-compile` over `cl-eval-when`.

* lisp/mh-e/mh-xface.el (mh-picon-get-image): Don't use
mh-funcall-if-exists for ietf-drums-parse-address.
Avoid the use of `cl-return` and hence use plain `defun`.
Replace some `cl-loop` with `dolist`.

5 years agodecode-time now returns subsec too
Paul Eggert [Tue, 6 Aug 2019 00:38:53 +0000 (17:38 -0700)]
decode-time now returns subsec too

The list that decode-time returns now contains an extra
trailing component that counts the subseconds part of the
original timestamp (Bug#36549).
This builds on a suggestion by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00734.html
* doc/lispref/os.texi (Time Conversion):
* doc/misc/emacs-mime.texi (time-date):
* etc/NEWS: Document this.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
* lisp/calendar/iso8601.el (iso8601-parse)
(iso8601-parse-time, iso8601-parse-duration)
(iso8601--decoded-time):
* lisp/calendar/parse-time.el (parse-time-string):
* lisp/calendar/time-date.el (make-decoded-time)
(decoded-time-set-defaults):
* lisp/org/org.el (org-fix-decoded-time)
(org-parse-time-string):
* src/timefns.c (Fdecode_time):
Generate subsec member for decoded time.
* lisp/calendar/time-date.el (decoded-time-add)
Add the decoded subsec too.
* lisp/simple.el (decoded-time): New subsec member.
* src/data.c (Frem): Simplify zero-check to match that of new Fmod.
(integer_mod): New function, with most of the guts of the old Fmod.
Remove redundant zero-check.
(Fmod): Use it.
* src/timefns.c (Fencode_time): Handle new subsec member
or (with the obsolescent calling convention) subsec arg.
It defaults to 0.
* test/lisp/calendar/icalendar-tests.el:
(icalendar--decode-isodatetime):
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-fractions)
(standard-test-time-of-day-beginning-of-day)
(standard-test-time-of-day-utc)
(standard-test-time-of-day-zone)
(standard-test-date-and-time-of-day, standard-test-interval):
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
* test/src/timefns-tests.el (format-time-string-with-zone)
(encode-time-dst-numeric-zone):
Adjust to match new behavior.

5 years agoNew function time-convert
Paul Eggert [Tue, 6 Aug 2019 00:38:52 +0000 (17:38 -0700)]
New function time-convert

This replaces the awkward reuse of encode-time to both convert
calendrical timestamps to Lisp timestamps, and to convert Lisp
timestamps to other forms.  Now, encode-time does just the
former and the new function does just the latter.
The new function builds on a suggestion by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00801.html
and refined by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00803.html
* doc/lispref/os.texi (Time of Day, Time Conversion):
* doc/misc/emacs-mime.texi (time-date):
* etc/NEWS: Update documentation.
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
* lisp/calendar/time-date.el (seconds-to-time, days-to-time):
* lisp/calendar/timeclock.el (timeclock-seconds-to-time):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-add-item):
* lisp/emacs-lisp/cl-extra.el (cl--random-time):
* lisp/emacs-lisp/timer.el (timer--time-setter)
(timer-next-integral-multiple-of-time):
* lisp/find-lisp.el (find-lisp-format-time):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/gnus-group.el (gnus-group-set-timestamp):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda):
* lisp/gnus/nnrss.el (nnrss-normalize-date):
* lisp/gnus/nnspool.el (nnspool-request-newgroups):
* lisp/net/ntlm.el (ntlm-compute-timestamp):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/obsolete/vc-arch.el (vc-arch-add-tagline):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-clock-in)
(org-clock-out, org-clock-sum):
* lisp/org/org-id.el (org-id-uuid, org-id-time-to-b36):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cc-cmds.el (c-progress-init)
(c-progress-update):
* lisp/progmodes/cperl-mode.el (cperl-time-fontification):
* lisp/progmodes/flymake.el (flymake--schedule-timer-maybe):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
* lisp/tar-mode.el (tar-octal-time):
* lisp/time.el (emacs-uptime):
* lisp/url/url-auth.el (url-digest-auth-make-cnonce):
* lisp/url/url-util.el (url-lazy-message):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
* lisp/xt-mouse.el (xterm-mouse-event):
* test/lisp/emacs-lisp/timer-tests.el:
(timer-next-integral-multiple-of-time-2):
Use time-convert, not encode-time.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Don’t use now-removed FORM argument for encode-time.
It wasn’t crucial anyway.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add time-convert.
* lisp/emacs-lisp/elint.el (elint-unknown-builtin-args):
Update encode-time signature to match current arg set.
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Use timer-convert with t rather than doing it by hand.
* src/timefns.c (time_hz_ticks, time_form_stamp, lisp_time_form_stamp):
Remove; no longer needed.
(decode_lisp_time): Rturn the form instead of having a *PFORM arg.
All uses changed.
(time_arith): Just return TICKS if HZ is 1.
(Fencode_time): Remove argument FORM.  All callers changed.
Do not attempt to encode time values; just encode
decoded (calendrical) times.
Unless CURRENT_TIME_LIST, just return VALUE since HZ is 1.
(Ftime_convert): New function, which does the time value
conversion that bleeding-edge encode-time formerly did.
Return TIME if it is easy to see that it is already
of the correct form.
(Fcurrent_time): Mention in doc that the form is planned to change.
* test/src/timefns-tests.el (decode-then-encode-time):
Don’t use (encode-time nil).

5 years agoFix minor Org timestamp inefficiencies
Paul Eggert [Tue, 6 Aug 2019 00:37:47 +0000 (17:37 -0700)]
Fix minor Org timestamp inefficiencies

* lisp/org/org-id.el (org-id-time-to-b36):
Remove unnecessary ‘or’.
* lisp/org/org.el (org-parse-time-string):
Remove unnecessary ‘encode-time’.

5 years ago* lisp/cus-start.el: Add :safe to display-fill-column-indicator (bug#36861)
Juri Linkov [Mon, 5 Aug 2019 21:38:58 +0000 (00:38 +0300)]
* lisp/cus-start.el: Add :safe to display-fill-column-indicator (bug#36861)

(display-fill-column-indicator)
(display-fill-column-indicator-column)
(display-fill-column-indicator-character): Add :safe predicates.

5 years ago* lisp/frameset.el (frameset--minibufferless-last-p): Fix pcase-let.
Juri Linkov [Mon, 5 Aug 2019 21:10:37 +0000 (00:10 +0300)]
* lisp/frameset.el (frameset--minibufferless-last-p): Fix pcase-let.

This makes frameset sorting stable.  (Bug#36894)

5 years ago* lisp/dired-x.el (dired-guess-shell-alist-default): Use git when possible.
Juri Linkov [Mon, 5 Aug 2019 21:04:07 +0000 (00:04 +0300)]
* lisp/dired-x.el (dired-guess-shell-alist-default): Use git when possible.

Check for Git backend and provide "git apply" for patch files (bug#36895).

5 years ago* lisp/dired.el (dired-special): Rename face from dired-socket (bug#24547).
Juri Linkov [Mon, 5 Aug 2019 20:56:36 +0000 (23:56 +0300)]
* lisp/dired.el (dired-special): Rename face from dired-socket (bug#24547).

(dired-re-special): Rename from dired-re-socket.

5 years ago* lisp/isearch.el (isearch-define-mode-toggle): Ensure isearch-mode is active.
Juri Linkov [Mon, 5 Aug 2019 20:37:32 +0000 (23:37 +0300)]
* lisp/isearch.el (isearch-define-mode-toggle): Ensure isearch-mode is active.

Call 'isearch-mode' when it's nil.  (Bug#36871)

5 years agoFix compilation with CHECK_STRUCTS
Eli Zaretskii [Mon, 5 Aug 2019 16:15:08 +0000 (19:15 +0300)]
Fix compilation with CHECK_STRUCTS

* src/pdumper.c (dump_hash_table): Update hash of
HASH_Lisp_Hash_Table.  (Bug#36929)

5 years agoRevert "Make `view-lossage' output of chars read from `read-char' more logical"
Lars Ingebrigtsen [Mon, 5 Aug 2019 13:49:28 +0000 (15:49 +0200)]
Revert "Make `view-lossage' output of chars read from `read-char' more logical"

This reverts commit 1abf76877847226daa5ab7e07000ac1d4aba3478.

This change apparently led to problems with kmacro.

5 years agoImprove Tramp's caching
Michael Albinus [Mon, 5 Aug 2019 11:09:26 +0000 (13:09 +0200)]
Improve Tramp's caching

* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory)
(tramp-adb-handle-delete-directory)
(tramp-adb-handle-delete-file, tramp-adb-handle-write-region)
(tramp-adb-handle-set-file-modes)
(tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file)
(tramp-gvfs-handle-make-directory)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-add-name-to-file)
(tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file)
(tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file)
(tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-delete-file)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-handle-rename-file, tramp-smb-handle-write-region):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file)
(tramp-sudoedit-do-copy-or-rename-file)
(tramp-sudoedit-handle-delete-directory)
(tramp-sudoedit-handle-delete-file)
(tramp-sudoedit-handle-set-file-modes)
(tramp-sudoedit-handle-set-file-times)
(tramp-sudoedit-handle-make-symbolic-link): Do not flush all file
properties of upper directory.

* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
New defun.
(tramp-flush-file-properties, tramp-flush-directory-properties):
Use it.

* test/lisp/net/tramp-tests.el (tramp-time-diff): Declare.
(tramp--test-file-attributes-equal-p): Handle also modification
and status change time.

5 years agoMake `view-lossage' output of chars read from `read-char' more logical
Lars Ingebrigtsen [Mon, 5 Aug 2019 10:43:09 +0000 (12:43 +0200)]
Make `view-lossage' output of chars read from `read-char' more logical

* lisp/help.el (view-lossage): Use the new data format to output
data from `read-char' and the like in a more understandable
fashion (bug#21867).

* src/keyboard.c (command_loop_1): Record (in recent_keys) the end
of commands.
(Frecent_keys): Don't include `end-of-command' in non-command outputs.
(syms_of_keyboard): Define `end-of-command'.

5 years agosave-some-buffers-default-predicate doc clarification
Lars Ingebrigtsen [Mon, 5 Aug 2019 10:18:40 +0000 (12:18 +0200)]
save-some-buffers-default-predicate doc clarification

* lisp/files.el (save-some-buffers-default-predicate): Clarify
calling convention.

5 years ago; * doc/lispref/searching.texi: Typo fix
Mattias Engdegård [Mon, 5 Aug 2019 08:28:17 +0000 (10:28 +0200)]
; * doc/lispref/searching.texi: Typo fix

5 years agoFix doc-strings of 'display-buffer-*' functions (Bug#19461)
Martin Rudalics [Mon, 5 Aug 2019 08:23:01 +0000 (10:23 +0200)]
Fix doc-strings of 'display-buffer-*' functions (Bug#19461)

* lisp/window.el (display-buffer-in-atom-window)
(display-buffer-in-side-window, display-buffer-record-window)
(display-buffer-use-some-frame, display-buffer-same-window)
(display-buffer-reuse-window, display-buffer-pop-up-frame)
(display-buffer-pop-up-window, display-buffer-in-child-frame)
(display-buffer-in-direction, display-buffer-below-selected)
(display-buffer-at-bottom, display-buffer-in-previous-window)
(display-buffer-use-some-window)
(display-buffer--maybe-pop-up-frame-or-window)
(display-buffer--maybe-pop-up-frame): Fix doc-strings
(Bug#19461).

5 years agoFix one more 2019-08-04 regex lint
Paul Eggert [Sun, 4 Aug 2019 22:54:17 +0000 (15:54 -0700)]
Fix one more 2019-08-04 regex lint

Problem clarified by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00087.html
* lisp/isearch.el (isearch-symbol-regexp):
Remove \s@ from regexp as it cannot match.

5 years agoSupport reverting Apropos buffers (bug#36588)
Basil L. Contovounesios [Thu, 11 Jul 2019 14:11:35 +0000 (15:11 +0100)]
Support reverting Apropos buffers (bug#36588)

* lisp/apropos.el (apropos--current): New variable akin to
help-xref-stack-item storing information for revert-buffer.
(apropos--revert-buffer): New function.
(apropos-mode): Use it as revert-buffer-function.
(apropos-command, apropos, apropos-library, apropos-value)
(apropos-local-value, apropos-documentation): Set apropos--current
in low-level commands, i.e., those which do not call other commands.

5 years agoFix 2019-08-04 regex lint
Paul Eggert [Sun, 4 Aug 2019 18:39:03 +0000 (11:39 -0700)]
Fix 2019-08-04 regex lint

Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00085.html
* lisp/calendar/diary-lib.el (diary-glob-file-regexp-prefix):
Omit unnecessary ‘\’ before ordinary char.
* lisp/cedet/inversion.el (inversion-decoders):
* lisp/org/ob-haskell.el (org-babel-haskell-export-to-lhs):
Omit unnecessary ‘?’ after nullable pattern.
* lisp/org/org-capture.el (org-capture-fill-template):
Match upper-case as well as lower-case letters.
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings):
Simplify ‘.|\r’ to ‘.’.
* lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer):
Put ‘-’ at end of bracket expression.

5 years agoTweak time arithmetic performance
Paul Eggert [Sun, 4 Aug 2019 17:04:18 +0000 (10:04 -0700)]
Tweak time arithmetic performance

* src/timefns.c (lispint_arith): New function, which
should be a bit faster if B is 0, or if A is a bignum
and B a fixnum with absolute value in unsigned long range.
(time_arith): Use it.

5 years agoImprove time function doc
Paul Eggert [Sun, 4 Aug 2019 16:57:27 +0000 (09:57 -0700)]
Improve time function doc

* doc/misc/emacs-mime.texi (time-date): Don’t give
parse-iso8601-time-string in the example, as the function is
not autoloaded.
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
No need to call encode-time or use floating point here.

5 years agoFix the MS-Windows build broken by recent changes
Eli Zaretskii [Sun, 4 Aug 2019 16:38:08 +0000 (19:38 +0300)]
Fix the MS-Windows build broken by recent changes

* src/inotify.c (syms_of_inotify) <Qignored>: Don't define here...
* src/coding.c (syms_of_coding) <Qignored>: ...define it here,
because it is needed also on platforms that don't compile
inotify.c.

5 years agoMinor fix to recent coding.c change
Paul Eggert [Sun, 4 Aug 2019 16:18:46 +0000 (09:18 -0700)]
Minor fix to recent coding.c change

* src/coding.c (get_buffer_gap_address):
Don’t assume string or buffer length fits in int.
Also, improve wording of comments.

5 years ago* .dir-locals.el: Enable `bug-reference-mode' for further major modes.
Michael Albinus [Sun, 4 Aug 2019 14:43:25 +0000 (16:43 +0200)]
* .dir-locals.el: Enable `bug-reference-mode' for further major modes.

5 years agoCapitalise a couple of node names
Lars Ingebrigtsen [Sun, 4 Aug 2019 12:50:07 +0000 (14:50 +0200)]
Capitalise a couple of node names

* doc/lispref/functions.texi (Advising Functions): Capitalise node
names (bug#17717).
(Advice Combinators, Porting Old Advice): Capitalise.

5 years agoClarify macroexp-let* doc string
Michael Heerdegen [Sun, 4 Aug 2019 12:43:43 +0000 (14:43 +0200)]
Clarify macroexp-let* doc string

* lisp/emacs-lisp/macroexp.el (macroexp-let2*): Clarify doc
string (bug#19371).

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
K. Handa [Sun, 4 Aug 2019 12:15:27 +0000 (21:15 +0900)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoAdd Unicode-safe UTF-8 converter
K. Handa [Sun, 4 Aug 2019 12:14:26 +0000 (21:14 +0900)]
Add Unicode-safe UTF-8 converter

* src/coding.c (encode_string_utf_8, decode_string_utf_8): New functions.
* src/coding.h (encode_string_utf_8, decode_string_utf_8): Extern them.

5 years agoCore Advising Primitives `interactive' clarification
Lars Ingebrigtsen [Sun, 4 Aug 2019 12:07:06 +0000 (14:07 +0200)]
Core Advising Primitives `interactive' clarification

* doc/lispref/functions.texi (Core Advising Primitives): Clarify
when the interactive spec is a function (bug#17871).

5 years agoImplement set-file-* functions for tramp-gvfs.el
Michael Albinus [Sun, 4 Aug 2019 10:47:43 +0000 (12:47 +0200)]
Implement set-file-* functions for tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
Add "gvfs-set-attribute".
(tramp-gvfs-file-name-handler-alist):
Add `tramp-gvfs-handle-set-file-modes',
`tramp-gvfs-handle-set-file-times' and
`tramp-gvfs-handle-set-file-uid-gid'.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-sh-handle-set-file-uid-gid): New defuns.

* lisp/net/tramp.el (tramp-handle-write-region): Set file modes.

* test/lisp/net/tramp-tests.el (tramp-test20-file-modes)
(tramp-test22-file-times): Do not skip for tramp-gvfs.el.

5 years agoFix two mouse drag and drop issues (Bug#28620, Bug#36269)
Martin Rudalics [Sun, 4 Aug 2019 07:21:18 +0000 (09:21 +0200)]
Fix two mouse drag and drop issues (Bug#28620, Bug#36269)

Allow 'mouse-drag-and-drop-region' to move/copy text from one
frame to another (Bug#28620).  Prevent mouse avoidance mode from
interfering with 'mouse-drag-and-drop-region' (Bug#36269).

* lisp/avoid.el (mouse-avoidance-ignore-p): Suspend avoidance
when 'track-mouse' equals 'dropping'.
* lisp/mouse.el (mouse-drag-and-drop-region): Set
'track-mouse' to 'dropping'.  Continue reading events also
when switching frames.
* src/keyboard.c (Finternal_track_mouse): Rename from
Ftrack_mouse.
(some_mouse_moved): Return NULL also when mouse is not tracked.
(show_help_echo, readable_events, kbd_buffer_get_event): Don't
check whether mouse is tracked, some_mouse_moved does it now.
(track_mouse): Rename variable from do_mouse_tracking.  Adjust
all users.  In doc-string explain meanings of special values
'dragging' and 'dropping'.
* src/nsterm.m (ns_mouse_position): During drag and drop
consider last mouse frame only when there is no currently
focused frame.
* src/w32fns.c (w32_wnd_proc): Don't set mouse capture during a
drag and drop operation.
* src/w32term.c (w32_mouse_position): Track frame under mouse
during mouse drag and drop.
(mouse_or_wdesc_frame): New function.
(w32_read_socket): Call mouse_or_wdesc_frame on mouse events.
* src/xdisp.c (define_frame_cursor1): Don't change mouse cursor
shape during mouse drag and drop.
(syms_of_xdisp): New symbol Qdropping.
* src/xterm.c (XTmouse_position): Allow mouse drag and drop move
to another frame
(mouse_or_wdesc_frame): New function.
(handle_one_xevent): Use mouse_or_wdesc_frame for mouse events.

5 years agoImproved ChangeLog generation for vc log (Bug#16301)
Noam Postavsky [Fri, 5 Jul 2019 00:32:39 +0000 (20:32 -0400)]
Improved ChangeLog generation for vc log (Bug#16301)

* lisp/vc/diff-mode.el (diff-find-source-location): Fix docstring.

* lisp/vc/add-log.el (change-log-unindented-file-names-re)
(change-log-read-entries, change-log-read-defuns)
(change-log-insert-entries):
* lisp/vc/diff-mode.el (diff-add-log-current-defuns):
* lisp/vc/log-edit.el (log-edit--insert-filled-defuns)
(log-edit-fill-entry): New functions.
(log-edit-mode): Set `log-edit-fill-entry' as
`fill-paragraph-function'.
(log-edit-generate-changelog-from-diff): New command.
(log-edit-mode-map): Bind it to C-c C-w.
* doc/emacs/maintaining.texi (Types of Log File, Log Buffer):
* CONTRIBUTE: Document it.
* etc/NEWS: Announce it.
* test/lisp/vc/log-edit-tests.el (log-edit-fill-entry)
(log-edit-fill-entry-joining): New tests.

5 years agoFix Gnus group name reference in gnus-mark-xrefs-as-read
Eric Abrahamsen [Sun, 4 Aug 2019 00:01:52 +0000 (17:01 -0700)]
Fix Gnus group name reference in gnus-mark-xrefs-as-read

* lisp/gnus/gnus-sum.el (gnus-mark-xrefs-as-read): There's already a
local binding for "group", don't need another "name". This was left
over from the obarray-to-hashtable change.

5 years agoTemporarily preserve encoded Gnus group names in Gnus files
Eric Abrahamsen [Fri, 7 Jun 2019 03:43:27 +0000 (20:43 -0700)]
Temporarily preserve encoded Gnus group names in Gnus files

Non-ascii Gnus groups should be written to files in their encoded
version until we're ready to bump Gnus' version and add an upgrade
routine.

* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format):
* lisp/gnus/gnus-agent.el (gnus-category-read):
  (gnus-category-write): Handle non-ascii group names appropriately.
* lisp/gnus/gnus-registry.el (gnus-registry--munge-group-names): New
  function to encode/decode group names.
  (gnus-registry-fixup-registry):
  (gnus-registry-save): Use function.

5 years agoRemove Gnus group name encoding/decoding
Eric Abrahamsen [Fri, 16 Nov 2018 20:53:56 +0000 (12:53 -0800)]
Remove Gnus group name encoding/decoding

This completes the process started in c1b63af445. Gnus group names are
now fully decoded inside the Gnus system.

* lisp/gnus/gnus-agent.el (gnus-agent-file-coding-system): Change
  default to utf-8-emacs.
  (gnus-agent-decoded-group-names, gnus-agent-decoded-group-name):
  Remove variable and function. Remove all usage in this file.
* lisp/gnus/gnus-cache.el (gnus-cache-decoded-group-names,
  gnus-cache-unified-group-names, gnus-cache-decoded-group-name):
  Remove these variables and function. Remove all usage in this file.
* lisp/gnus/gnus-group.el (gnus-tmp-decoded-group): Remove this
  variable, gnus-tmp-group is now decoded.
  (gnus-group-completing-read): Don't encode or decode group names
  here.
  (gnus-group-make-group): Remove ENCODED argument.
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Decode group
  names here.
* lisp/gnus/gnus-start.el (gnus-make-hashtable-from-newsrc-alist):
  check for encoded group names and decode.
  (gnus-active-to-gnus-format): Make sure incoming group names are
  decoded.
  (gnus-read-newsrc-el-file): Check for encoded group names in
  gnus-topic-alist.
* lisp/gnus/nnagent.el: Don't use a unibyte buffer.
* lisp/gnus/nnheader.el (nnheader-file-coding-system): Switch default
  from 'raw-text to 'undecided, on the assumption that 'undecided will
  probably write 'utf-8-emacs unless the user has arranged things
  otherwise.
* lisp/gnus/nnimap.el (nnimap-decode-gnus-group,
  nnimap-encode-gnus-group): Remove functions and their use.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove encoding.
  (nnmail-active-file-coding-system): Default to 'utf-8-emacs instead
  of 'raw-text.
  (nnmail-group-names-not-encoded-p): Obsolete this variable; stop
  using it.
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-cus.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus.el:
* lisp/gnus/nnml.el:
* lisp/gnus/message.el:
* lisp/gnus/nnrss.el: Stop using gnus-group-decoded-name in all these
  files.

5 years agoFix ordering of Gnus groups after yanking
Eric Abrahamsen [Sat, 3 Aug 2019 21:43:44 +0000 (14:43 -0700)]
Fix ordering of Gnus groups after yanking

* lisp/gnus/gnus-start.el (gnus-group-change-level): Fix docstring to
note that the inserted group is inserted *before* the PREVIOUS
group. Fix indexing -- shouldn't have been adding one to the index.

5 years agoRemove stale .pdmp files with ‘make clean’
Paul Eggert [Sat, 3 Aug 2019 21:12:29 +0000 (14:12 -0700)]
Remove stale .pdmp files with ‘make clean’

Problem reported by Sven Joachim (Bug#36907).
* admin/make-emacs: Simplify, now that clean does versionclean.
* src/Makefile.in ($(etc)/DOC, versionclean, extraclean):
Don’t ignore rm -f failures.
(versionclean): Also remove emacs-*.*.*[0-9].pdmp and ../etc/DOC*.
(clean): Depend on versionclean and simplify.

5 years ago* doc/lispref/display.texi (SVG Images): Remove menu.
Glenn Morris [Sat, 3 Aug 2019 20:54:25 +0000 (13:54 -0700)]
* doc/lispref/display.texi (SVG Images): Remove menu.

Not needed since SVG Path Commands was changed to not be a node.

5 years agoClarify hi-lock-file-patterns-prefix doc string
Lars Ingebrigtsen [Sat, 3 Aug 2019 20:35:17 +0000 (22:35 +0200)]
Clarify hi-lock-file-patterns-prefix doc string

* lisp/hi-lock.el (hi-lock-file-patterns-prefix): Clarify doc
string (bug#17993).

5 years agoMention `themed-value' in Variable Definitions node
Lars Ingebrigtsen [Sat, 3 Aug 2019 20:23:47 +0000 (22:23 +0200)]
Mention `themed-value' in Variable Definitions node

* doc/lispref/customize.texi (Variable Definitions): Mention
`themed-value' (bug#17996).

5 years agocalc mode line touch up
Oleh Krehel [Sat, 3 Aug 2019 20:00:40 +0000 (22:00 +0200)]
calc mode line touch up

* lisp/calc/calc.el (calc-set-mode-line): Don't put excessive
white space in mode line (bug#18079).

5 years agoFix rare undefined behaviors in replace-match
Paul Eggert [Sat, 3 Aug 2019 19:45:19 +0000 (12:45 -0700)]
Fix rare undefined behaviors in replace-match

* src/search.c (Freplace_match): Simplify by caching search_regs
components.  Fix sanity check for out-of-range subscripts;
it incorrectly allowed negative subscripts, subscripts
equal to search_regs.num_regs, and it had undefined
behavior for subscripts outside ptrdiff_t range.
Improve wording of newly-introduced replace-match diagnostic.
Rework use of opoint, to avoid setting point to an out-of-range value
in rare cases involving modification hooks.

5 years agocua-rect help: check for 'control value
Pierre-Yves Luyten [Sat, 3 Aug 2019 19:46:40 +0000 (21:46 +0200)]
cua-rect help: check for 'control value

* lisp/emulation/cua-rect.el (cua-help-for-rectangle): Check for
'control value (bug#18120).

Copyright-paperwork-exempt: yes