]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoDon’t round file-system-info counts
Paul Eggert [Tue, 17 Sep 2019 10:54:41 +0000 (03:54 -0700)]
Don’t round file-system-info counts

* src/fileio.c (blocks_to_bytes): Convert the byte count to an
integer, since we have bignums now.  This avoids possible rounding
errors for file systems containing more than 8 PiB or so.

5 years ago* doc/lispref/searching.texi (Rx Constructs): Fix typo.
Mattias Engdegård [Tue, 17 Sep 2019 10:01:15 +0000 (12:01 +0200)]
* doc/lispref/searching.texi (Rx Constructs): Fix typo.

5 years ago; * etc/NEWS: Minor copyedits.
Eli Zaretskii [Tue, 17 Sep 2019 09:45:04 +0000 (12:45 +0300)]
; * etc/NEWS: Minor copyedits.

5 years agoFix some file-mode races
Paul Eggert [Tue, 17 Sep 2019 00:43:56 +0000 (17:43 -0700)]
Fix some file-mode races

* lisp/emacs-lisp/autoload.el (autoload-ensure-file-writeable):
* lisp/files.el (after-find-file):
* lisp/gnus/gnus-start.el (gnus-dribble-read-file):
* lisp/htmlfontify.el (hfy-copy-and-fontify-file):
* lisp/server.el (server-ensure-safe-dir):
Avoid a race when getting file permissions.

5 years agovc-cvs-revert: fix off-by-one file mode
Paul Eggert [Tue, 17 Sep 2019 00:22:48 +0000 (17:22 -0700)]
vc-cvs-revert: fix off-by-one file mode

* lisp/vc/vc-cvs.el (vc-cvs-revert): 3950 (#o7556) is wrong as
it keeps other-write but disables other-execute permissions.
3949 (#o7555) was intended here.  Use octal notation for clarity.

5 years agoFix imenu menu when we're auto-refreshing
Lars Ingebrigtsen [Mon, 16 Sep 2019 23:39:37 +0000 (01:39 +0200)]
Fix imenu menu when we're auto-refreshing

* lisp/imenu.el (imenu--make-index-alist): Don't add a *Refresh*
item if we're auto-refreshing (bug#30449).

5 years agoAdd a new variable smtpmail-retries
Lars Ingebrigtsen [Mon, 16 Sep 2019 23:26:43 +0000 (01:26 +0200)]
Add a new variable smtpmail-retries

* doc/misc/smtpmail.texi (Server workarounds): Mention it (bug#34177).

* lisp/mail/smtpmail.el (smtpmail-retries): New variable.
(smtpmail-via-smtp): Use it.

5 years agoAllow `M-u' to work when editing fields in Customize
Michał Kondraciuk [Mon, 16 Sep 2019 23:13:08 +0000 (01:13 +0200)]
Allow `M-u' to work when editing fields in Customize

* lisp/cus-edit.el (custom-notify): Allow more editing commands to
work in the Customize buffers (bug#31205).

Copyright-paperwork-exempt: yes

5 years agoTry resending when getting a transient 4xx SMTP code
Lars Ingebrigtsen [Mon, 16 Sep 2019 21:45:34 +0000 (23:45 +0200)]
Try resending when getting a transient 4xx SMTP code

* lisp/mail/smtpmail.el (smtpmail-via-smtp): Try resending when
getting a transient error message (bug#34177).

5 years agoRemove obsolete Lint directives
Paul Eggert [Mon, 16 Sep 2019 21:04:04 +0000 (14:04 -0700)]
Remove obsolete Lint directives

Most of the directives were wrong anyway.  Apparently
traditional lint hasn’t been used to check Emacs for years.
* src/callint.c (Finteractive):
* src/cm.c (evalcost):
* src/emacs.c (main):
* src/eval.c (call1, call2, call3, call4, call5, call6, call7, call8):
* src/fns.c (concat2, concat3, nconc2):
* src/term.c (calculate_ins_del_char_costs):
Omit ARGSUSED comments.
* src/eval.c (call1): Omit VARARGS comment.

5 years agoAdd backquote tests
Tino Calancha [Mon, 16 Sep 2019 20:57:25 +0000 (22:57 +0200)]
Add backquote tests

* test/lisp/emacs-lisp/backquote-tests.el: New file (bug#37432).

5 years agodirectory-files cleanup and speed tweaking
Paul Eggert [Mon, 16 Sep 2019 20:54:57 +0000 (13:54 -0700)]
directory-files cleanup and speed tweaking

* src/dired.c (directory_files_internal):
Check ‘match’ before doing anything heavyweight.
Move decls closer to use.
Remove obsolete comments about GC.
No need to encode ‘directory’ or to call multibyte_chars_in_text.
Remove no-longer-needed bug check.
Skip finalname construction if file_attributes fails.

5 years agomm-inline-large-images-proportion doc clarification
Lars Ingebrigtsen [Mon, 16 Sep 2019 20:31:29 +0000 (22:31 +0200)]
mm-inline-large-images-proportion doc clarification

* lisp/gnus/mm-view.el (mm-inline-large-images-proportion): Doc
clarification.

5 years agoDefault to rescaling images in mm buffers
Lars Ingebrigtsen [Mon, 16 Sep 2019 20:30:04 +0000 (22:30 +0200)]
Default to rescaling images in mm buffers

* doc/misc/emacs-mime.texi (Display Customization): Document it.

* lisp/gnus/mm-decode.el (mm-inline-large-images): Change default
to `resize'.

5 years agomm-inline-large-images doc string clarification
Lars Ingebrigtsen [Mon, 16 Sep 2019 20:22:54 +0000 (22:22 +0200)]
mm-inline-large-images doc string clarification

* lisp/gnus/mm-decode.el (mm-inline-large-images): Clarify doc string.

5 years agoWith tooltip-mode disabled, don't unconditionally clear the echo area
Mauro Aranda [Mon, 16 Sep 2019 20:17:51 +0000 (22:17 +0200)]
With tooltip-mode disabled, don't unconditionally clear the echo area

* lisp/tooltip.el (tooltip-show-help-non-mode): Only clear the
echo area when the current message displayed is a tooltip message
(Bug#3192).

5 years agoMinor fix for previous maintaining.texi change
Lars Ingebrigtsen [Mon, 16 Sep 2019 20:08:57 +0000 (22:08 +0200)]
Minor fix for previous maintaining.texi change

* doc/emacs/maintaining.texi (VC Directory Commands): Use @file
for files.

5 years agoDocument vc-dir-ignore
Lars Ingebrigtsen [Mon, 16 Sep 2019 20:02:19 +0000 (22:02 +0200)]
Document vc-dir-ignore

* doc/emacs/maintaining.texi (VC Directory Commands): Document
vc-dir-ignore.

5 years agoImprove error reporting in file_accessible_directory_p
Eli Zaretskii [Mon, 16 Sep 2019 19:19:16 +0000 (22:19 +0300)]
Improve error reporting in file_accessible_directory_p

* src/w32.c (w32_accessible_directory_p): Set errno, so that
file_accessible_directory_p does on MS-Windows, to live up to
its callers' expectations.

5 years agoFix initialization of shared-game-score-directory on MS-Windows
Eli Zaretskii [Mon, 16 Sep 2019 14:51:25 +0000 (17:51 +0300)]
Fix initialization of shared-game-score-directory on MS-Windows

* src/callproc.c (init_callproc) [WINDOWSNT]: Run PATH_GAME
through w32_relocate, to expand %emacs_dir%.
[DOS_NT]: Accept EACCES as not "unusual" errno value.
Reported by Richard Copley <rcopley@gmail.com>.

5 years ago; Disable traces in shadowfile-tests
Michael Albinus [Mon, 16 Sep 2019 13:00:37 +0000 (15:00 +0200)]
; Disable traces in shadowfile-tests

5 years agoRemove NEWS entry that talks about a change that was reverted (bug#37257)
Lars Ingebrigtsen [Mon, 16 Sep 2019 12:32:17 +0000 (14:32 +0200)]
Remove NEWS entry that talks about a change that was reverted (bug#37257)

5 years agoAdd bindings for ligature oe to iso-transl-char-map
Robert Pluim [Mon, 16 Sep 2019 07:58:09 +0000 (09:58 +0200)]
Add bindings for ligature oe to iso-transl-char-map

* lisp/international/iso-transl.el (iso-transl-char-map): Add bindings
for small and capital ligature oe.  (Bug#23420)

5 years agoFix some file-name-case-insensitive glitches
Paul Eggert [Mon, 16 Sep 2019 05:15:04 +0000 (22:15 -0700)]
Fix some file-name-case-insensitive glitches

* src/fileio.c (file_name_directory): New static function,
broken out of Ffile_name_directory.
(file_name_case_insensitive_err, Ffile_writable_p, Fdo_auto_save):
Use it.
(file_name_case_insensitive_err): Rename from
file_name_case_insensitive_p.  Accept an unencoded Lisp_Object
rather than an encoded char *, so that platforms other than
Cygwin and macOS need not encode the file name.  Return an int
-1, 0, errno rather than a bool (setting errno if false),
so that the caller can distinguish an error from false.
All callers changed.
(Ffile_name_case_insensitive_p): Don’t issue system calls on
platforms other than Cygwin and macOS.  Fix bug that broke the
attempt to move up the filesystem tree (it moved up only one
level).

5 years ago; * etc/NEWS: Fix typo.
Stefan Kangas [Mon, 16 Sep 2019 04:55:02 +0000 (06:55 +0200)]
; * etc/NEWS: Fix typo.

5 years agoFix unknown-vs-nonexistent glitch for file timestamps
Paul Eggert [Mon, 16 Sep 2019 03:17:43 +0000 (20:17 -0700)]
Fix unknown-vs-nonexistent glitch for file timestamps

* src/fileio.c (time_error_value): EACCES means the file
timestamp is unknown, not that the file does not exist.

5 years agoImprove directory-access diagnostics
Paul Eggert [Mon, 16 Sep 2019 03:12:07 +0000 (20:12 -0700)]
Improve directory-access diagnostics

* src/callproc.c (init_callproc): Diagnose I/O errors,
access errors, etc. for the game directory.
* src/charset.c (init_charset): Improve quality of diagnostic
when the charsets directory has I/O errors, access errors, etc.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 15 Sep 2019 23:38:23 +0000 (16:38 -0700)]
Merge from origin/emacs-26

30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl...
c596be0 Amend the menu caption for page "Display Property" in the Eli...
13b9510 Add description of chinese-sisheng

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sun, 15 Sep 2019 23:38:23 +0000 (16:38 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

7e527af Fix non-deterministic process test

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 15 Sep 2019 23:38:20 +0000 (16:38 -0700)]
Merge from origin/emacs-26

8e420c0 Clarify the use of left/right-margin-width in determining cur...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sun, 15 Sep 2019 23:38:20 +0000 (16:38 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

0c3fc71 ; Bump Emacs version to 26.3.50

5 years ago* admin/upload-manuals: Move a basic check earlier.
Glenn Morris [Sun, 15 Sep 2019 23:36:06 +0000 (16:36 -0700)]
* admin/upload-manuals: Move a basic check earlier.

5 years ago* lisp/subr.el (major-mode-suspend): Doc fix
Juanma Barranquero [Sun, 15 Sep 2019 18:37:26 +0000 (20:37 +0200)]
* lisp/subr.el (major-mode-suspend): Doc fix

5 years agoUse also truname of temporary-file-directory in shadowfile-tests.el
Michael Albinus [Sun, 15 Sep 2019 14:52:22 +0000 (16:52 +0200)]
Use also truname of temporary-file-directory in shadowfile-tests.el

* test/lisp/shadowfile-tests.el (top): Use truename of
`temporary-file-directory' and
`shadow-test-remote-temporary-file-directory'.  (Bug#37202)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Do not bind `shadow-test-remote-temporary-file-directory'.

5 years agoMake widget-browse-at always detect an editable-field
Mauro Aranda [Sun, 15 Sep 2019 13:21:08 +0000 (15:21 +0200)]
Make widget-browse-at always detect an editable-field

* lisp/wid-browse.el (widget-browse-at): Also look for the real-field
property when detecting a field (bug#37199).

5 years agoDo not use error messages as list of ignored files in vc-svn
Wolfgang Scherer [Sun, 15 Sep 2019 13:14:44 +0000 (15:14 +0200)]
Do not use error messages as list of ignored files in vc-svn

* lisp/vc/vc-svn.el: (vc-svn-ignore-completion-table) Ignore buffer
contents, if exit status is not 0.  Split buffer by lines (bug#37214).

5 years agoFix vc-default-ignore
Wolfgang Scherer [Sun, 15 Sep 2019 13:03:33 +0000 (15:03 +0200)]
Fix vc-default-ignore

* lisp/vc/vc.el: (vc-default-ignore) Treat FILE parameter as relative
to DIRECTORY parameter.  Construct a file-path relative to directory
of ignore file.  When removing, use properly anchored regexp.  Remove
entire line, not just the match (bug#37217).

5 years agoProvide facility to ignore all marked files in vc
Wolfgang Scherer [Sun, 15 Sep 2019 13:00:20 +0000 (15:00 +0200)]
Provide facility to ignore all marked files in vc

* lisp/vc/vc-dir.el: (vc-dir-ignore) With prefix argument, ignore all
marked files (bug#37240).

5 years agoRevert "emacsclient: ignore --eval parameters when starting alternate editor"
Lars Ingebrigtsen [Sun, 15 Sep 2019 12:11:14 +0000 (14:11 +0200)]
Revert "emacsclient: ignore --eval parameters when starting alternate editor"

This reverts commit 6fe661342a24edcaea255c3ba9a37613031554da.

The alternate editor may be Emacs, which is useful when you want to eval something in an existing Emacs (if it exists), or in a new Emacs if there's no server running.

5 years agofile_name_case_insensitive_p int->long fix
Paul Eggert [Sun, 15 Sep 2019 05:00:20 +0000 (22:00 -0700)]
file_name_case_insensitive_p int->long fix

* src/fileio.c (file_name_case_insensitive_p):
Don’t assume ‘long int’ fits in ‘int’.

5 years agoFix gc-elapsed rounding bug
Paul Eggert [Sat, 14 Sep 2019 17:55:53 +0000 (10:55 -0700)]
Fix gc-elapsed rounding bug

* src/alloc.c (garbage_collect): Don’t accumulate rounding
errors when computing gc-elapsed.

5 years agoImprove doc of GC thresholds
Paul Eggert [Sat, 14 Sep 2019 17:53:24 +0000 (10:53 -0700)]
Improve doc of GC thresholds

* doc/lispref/internals.texi (Garbage Collection), etc/NEWS:
Warn that control over GC is only approximate.

5 years agoFix picon installation instructions in the Gnus manual
Bruno Félix Rezende Ribeiro [Sat, 14 Sep 2019 15:00:40 +0000 (17:00 +0200)]
Fix picon installation instructions in the Gnus manual

* doc/misc/gnus.texi (Picons): Fix instructions for installing
picons on Debian (bug#37247).

Copyright-paperwork-exempt: yes

5 years agoFix fileless eww form submission
Basil L. Contovounesios [Sat, 14 Sep 2019 14:55:24 +0000 (16:55 +0200)]
Fix fileless eww form submission

* lisp/net/eww.el (eww-submit): Ignore file inputs with no
associated file name (bug#36520).

5 years agoAdd default foreground colours to SVG images
Lars Ingebrigtsen [Sat, 14 Sep 2019 14:48:21 +0000 (16:48 +0200)]
Add default foreground colours to SVG images

* lisp/net/shr.el (svg--wrap-svg): Add a default foreground colour
to SVG images (bug#37159).  This helps with images like the ones
in https://en.wikipedia.org/wiki/Banach_fixed-point_theorem that
specify no foreground or background colours.
(shr-parse-image-data): Use it.

5 years agoMake eww more liberal when interpreting some invalid HTML
Lars Ingebrigtsen [Sat, 14 Sep 2019 14:07:34 +0000 (16:07 +0200)]
Make eww more liberal when interpreting some invalid HTML

* lisp/net/eww.el (eww--preprocess-html): New function (bug#37009)
to be more lenient with invalid HTML and translate common invalid
HTML like "a <= b" into "a &lt;= b" to be more liberal in what we
accept before parsing.
(eww-display-html): Use it.
(eww-readable): Ditto.

5 years ago* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Fix a thinko. (Bug#36566)
Eli Zaretskii [Sat, 14 Sep 2019 14:04:30 +0000 (17:04 +0300)]
* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Fix a thinko.  (Bug#36566)

5 years agoAdd a debug declaration to widget-specify-insert
Tobias Zawada [Sat, 14 Sep 2019 12:20:03 +0000 (14:20 +0200)]
Add a debug declaration to widget-specify-insert

* lisp/wid-edit.el (widget-specify-insert): Add a debug
declaration (bug#37368).

Copyright-paperwork-exempt: yes

5 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sat, 14 Sep 2019 08:21:40 +0000 (11:21 +0300)]
; * etc/NEWS: Fix last change.

5 years agoAllow gamegrid-add-score to treat lower scores as better.
Federico Tedin [Tue, 3 Sep 2019 22:18:11 +0000 (00:18 +0200)]
Allow gamegrid-add-score to treat lower scores as better.

* lisp/play/gamegrid.el (gamegrid-add-score): Add 'reverse' parameter.
(gamegrid-add-score-with-update-game-score): Add 'reverse' parameter.
(gamegrid-add-score-with-update-game-score-1): Add 'reverse'
parameter.  Pass on "-r" argument to update-game-score.
(gamegrid-add-score-insecure): Add 'reverse' parameter, reverse scores
when it's non-nil.  (Bug#36867)

* etc/NEWS: Announce the change.

5 years agoImprove gc-cons-percentage calculation
Paul Eggert [Sat, 14 Sep 2019 07:32:01 +0000 (00:32 -0700)]
Improve gc-cons-percentage calculation

The old calculation relied on a hodgpodge of partly updated GC
stats to find a number to multiply gc-cons-percentage by.
The new one counts data found by the previous GC, plus half of
the data allocated since then; this is more systematic albeit
still ad hoc.
* src/alloc.c (consing_until_gc, gc_threshold, consing_threshold):
Now EMACS_INT, not intmax_t.
(HI_THRESHOLD): New macro.
(tally_consing): New function.
(make_interval, allocate_string, allocate_string_data)
(make_float, free_cons, allocate_vectorlike, Fmake_symbol): Use it.
(allow_garbage_collection, inhibit_garbage_collection)
(consing_threshold, garbage_collect):
Use HI_THRESHOLD rather than INTMAX_MAX.
(consing_threshold): New arg SINCE_GC.  All callers changed.
(bump_consing_until_gc): Return new consing_until_gc, instead of
nil.  All callers changed.  Don’t worry about overflow since we
now saturate at HI_THRESHOLD.  Guess that half of
recently-allocated objects are still alive, instead of relying on
the previous (even less-accurate) hodgepodge.
(maybe_garbage_collect): New function.
(garbage_collect): Work even if a finalizer disables or enables
memory profiling.  Do not use malloc_probe if GC reclaimed nothing.
* src/lisp.h (maybe_gc): Call maybe_garbage_collect instead
of garbage_collect.

5 years agoSimplify GC statistics-gathering
Paul Eggert [Fri, 13 Sep 2019 23:09:48 +0000 (16:09 -0700)]
Simplify GC statistics-gathering

* src/alloc.c (make_interval, allocate_string, make_float)
(free_cons, Fcons, setup_on_free_list)
(allocate_vector_from_block, Fmake_symbol):
Do not update gcstat, since it is for statistics from the most
recent GC, not for a partially-updated hodgepodge.
(sweep_vectors): Update gcstat, since setup_on_free_list
no longer does.
(garbage_collect_1): Rename to garbage_collect and adopt its API.
Remove the old garbage_collect, which is no longer needed.
All callers changed.

5 years agoDon't build print-number-table unless it will be used
Gemini Lasswell [Sun, 4 Aug 2019 04:39:29 +0000 (21:39 -0700)]
Don't build print-number-table unless it will be used

There are only a few users of print-number-table, and none of them use
it when print-circle is nil.  A couple of them used to.  print_object
was changed in 2012-04-20 "* src/print.c (print_preprocess): Only
check print_depth if print-circle is nil".
byte-compile-output-docform which uses print-number-table binds
print-circle to t before printing unless
byte-compile-disable-print-circle is set, but that variable has been
marked obsolete since 24.1.

* src/print.c (print_preprocess): Assert Vprint_circle is non-nil.
Remove code handling the case when Vprint_circle is nil.
(print, Fprint_preprocess): Don't call print_preprocess unless
Vprint_circle is non-nil.
(print_object): Remove comment referencing removed code in
print_preprocess.

5 years agoCreate common tests for print.c and cl-print.el
Gemini Lasswell [Sun, 4 Aug 2019 22:56:12 +0000 (15:56 -0700)]
Create common tests for print.c and cl-print.el

* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print--test, cl-print-tests-1, cl-print-tests-2)
(cl-print-tests-3, cl-print-tests-4, cl-print-tests-5)
(cl-print-tests-strings, cl-print-circle, cl-print-circle-2):
Remove.
* test/src/print-tests.el (print-tests--prin1-to-string): New
alias.
(print-tests--deftest): New macro.
(print-hex-backslash, print-read-roundtrip, print-bignum): Define with
print-tests--deftest and use print-tests--prin1-to-string.
(print-tests--prints-with-charset-p): Use
print-tests--prin1-to-string.
(print-tests--print-charset-text-property-nil)
(print-tests--print-charset-text-property-t)
(print-tests--print-charset-text-property-default): Define with
print-tests--deftest.
(print-tests-print-gensym)
(print-tests-continuous-numbering, print-tests-1, print-tests-2)
(print-tests-3, print-tests-4, print-tests-5)
(print-tests-strings, print-circle, print-circle-2): New tests.
(print--test, print-tests-struct): New cl-defstructs.

5 years agoFix unnecessary hash table creation in cl-prin1 (bug#36566)
Gemini Lasswell [Sat, 3 Aug 2019 19:33:20 +0000 (12:33 -0700)]
Fix unnecessary hash table creation in cl-prin1 (bug#36566)

cl-prin1 prints all its punctuation by passing strings to prin1.  When
print-circle was set, print_preprocess was creating a new hash table
for each string, causing excessive garbage collection when printing
large Lisp objects with cl-prin1.

* src/print.c (print_number_index): Fix typo in comment above.
(PRINT_CIRCLE_CANDIDATE_P): Don't create print_number_table
for top-level strings with no properties, except when
print_continuous_numbering is on.

5 years agoImprove performance of backtrace printing (bug#36566)
Gemini Lasswell [Tue, 30 Jul 2019 18:56:51 +0000 (11:56 -0700)]
Improve performance of backtrace printing (bug#36566)

* lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Reduce
print-level and print-length more quickly when the structure being
printed is very large.

5 years agoImprove print output options commands in backtrace-mode (bug#36566)
Gemini Lasswell [Tue, 30 Jul 2019 17:00:27 +0000 (10:00 -0700)]
Improve print output options commands in backtrace-mode (bug#36566)

* lisp/emacs-lisp/backtrace.el (backtrace-view): Mention
:print-gensym in docstring.
(backtrace-mode-map): Add keyboard binding for
backtrace-toggle-print-gensym.  Add menu entries for
backtrace-toggle-print-circle and backtrace-toggle-print-gensym.
(backtrace--with-output-variables): Bind print-gensym with value
of :print-gensym found in view plist.
(backtrace-toggle-print-circle): Remove description of
implementation details from docstring.
(backtrace-toggle-print-gensym): New command.
(backtrace--toggle-feature): Add echo area message describing result
of command.

* test/lisp/emacs-lisp/backtrace-tests.el
(backtrace-tests--print-circle): New test.

* doc/lispref/debugging.texi (Backtraces): Document keyboard
binding for backtrace-toggle-print-gensym.

5 years ago* lisp/help-mode.el (help-mode-menu): Fix typo. (Bug#36485)
Stefan Kangas [Mon, 1 Jul 2019 06:45:24 +0000 (08:45 +0200)]
* lisp/help-mode.el (help-mode-menu): Fix typo.  (Bug#36485)

5 years ago* doc/misc/efaq.texi: Update ancient formats. (Bug#37143)
Stefan Kangas [Thu, 22 Aug 2019 14:11:52 +0000 (16:11 +0200)]
* doc/misc/efaq.texi: Update ancient formats. (Bug#37143)

5 years agoRemove leftover XEmacs compat code and doc fixes
Stefan Kangas [Fri, 13 Sep 2019 16:06:31 +0000 (18:06 +0200)]
Remove leftover XEmacs compat code and doc fixes

* lisp/mail/feedmail.el (top-level): Remove outdated comment.
(feedmail-run-the-queue): Remove leftover XEmacs compat code.
(feedmail-nuke-bcc): Doc fix.

* lisp/emulation/viper.el (top-level, viper-mode)
* lisp/net/rfc2104.el (top-level): Doc fix.

* lisp/textmodes/table.el (top-level): Remove obsolete todo.

5 years agoChange gui--selection-value-internal comment into doc string
Stefan Kangas [Fri, 13 Sep 2019 12:53:41 +0000 (14:53 +0200)]
Change gui--selection-value-internal comment into doc string

* lisp/select.el (gui--selection-value-internal): Change comment into
doc string.  (Bug#25528)

5 years ago; Fix a typo by last commit
Michael Albinus [Fri, 13 Sep 2019 12:33:06 +0000 (14:33 +0200)]
; Fix a typo by last commit

5 years ago; Add traces in shadowfile.el
Michael Albinus [Fri, 13 Sep 2019 12:25:56 +0000 (14:25 +0200)]
; Add traces in shadowfile.el

5 years agoFix problems in tramp-test33-environment-variables
Michael Albinus [Fri, 13 Sep 2019 10:08:34 +0000 (12:08 +0200)]
Fix problems in tramp-test33-environment-variables

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Use ${parameter:-word} construct.  Remove PS1 entry from
"printenv" output.
(tramp--test-check-files): Use "printenv".

5 years agoMake recent Tramp patch work for tramp-archive.el
Michael Albinus [Fri, 13 Sep 2019 10:08:02 +0000 (12:08 +0200)]
Make recent Tramp patch work for tramp-archive.el

* lisp/net/tramp.el (tramp-connectable-p): Make it work also for
tramp-archive.el.

5 years agoFix assertion violations due to non-ASCII text in menus
Eli Zaretskii [Fri, 13 Sep 2019 07:47:28 +0000 (10:47 +0300)]
Fix assertion violations due to non-ASCII text in menus

* src/xdisp.c (tool_bar_height, redisplay_tool_bar)
(display_menu_bar): If the Lisp string to be displayed in the
menu-bar or tool-bar window is multibyte, tell the display
engine to treat it as multibyte, instead of relying on the
initial determination by init_iterator (which is based on the
multibyteness of the current buffer).  (Bug#37385)

5 years agoFix saving user-defined calc commands with compositions (Bug#36720)
Jack Coughlin [Thu, 18 Jul 2019 15:16:50 +0000 (08:16 -0700)]
Fix saving user-defined calc commands with compositions (Bug#36720)

* lisp/calc/calc-prog.el (calc-user-define-permanent): Correctly save
the composition when the user specifies their formula by its command
name or key.

Copyright-paperwork-exempt: yes

5 years agoFix fill-paragraph in python docstrings (Bug#36056)
Noam Postavsky [Sun, 8 Sep 2019 14:42:19 +0000 (10:42 -0400)]
Fix fill-paragraph in python docstrings (Bug#36056)

* lisp/progmodes/python.el (python-do-auto-fill): New function.
(python-mode): Set it as normal-auto-fill-function, and don't set
fill-indent-according-to-mode.  Having the latter set during
fill-paragraph gives wrongs result, because python-indent-line doesn't
remove indentation added by filling.
* test/lisp/progmodes/python-tests.el (python-fill-docstring): New
test.

5 years ago* lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`!
Stefan Monnier [Thu, 12 Sep 2019 19:43:50 +0000 (15:43 -0400)]
* lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`!

5 years ago* lisp/progmodes/sh-script.el (sh-mode-map): Don't bind `=`
Stefan Monnier [Thu, 12 Sep 2019 18:26:40 +0000 (14:26 -0400)]
* lisp/progmodes/sh-script.el (sh-mode-map): Don't bind `=`

(sh-shell-initialize-variables): Use sh--assignment-collect on
post-self-insert-hook instead.
(sh--assignment-collect): New function, extracted from sh-assignment.
(sh-assignment): Use it and mark as obsolete.

5 years agoAdd `isearch-yank-until-char'
Karl Fogel [Thu, 12 Sep 2019 17:42:13 +0000 (12:42 -0500)]
Add `isearch-yank-until-char'

* lisp/isearch.el (isearch-yank-until-char): New function.
  (isearch-mode-map, isearch-menu-bar-yank-map): Add it.
  (isearch-forward): Document the new binding.

* doc/emacs/search.texi (Isearch Yanking): Document the feature.

* etc/NEWS: Mention the above.

5 years agoOptimize host name completion in Tramp
Michael Albinus [Thu, 12 Sep 2019 14:38:48 +0000 (16:38 +0200)]
Optimize host name completion in Tramp

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Throw `non-essential' at the beginning of the function.

* lisp/net/tramp.el (tramp-handle-file-exists-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p):
Run only when host is connectable.  This is due to host name
completion, which shall be optimized.

* lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat)
(tramp-smb-get-file-entries): Access connection buffer only after
sending the command.

* lisp/net/tramp.el (tramp-get-buffer, tramp-get-connection-buffer):
New argument DONT-CREATE.
(tramp-message): Use it.
(tramp-get-mutex): Check, whether host is connectable.
(tramp-file-name-handler): Set thread only when host is connectable.
(tramp-connectable-p): Allow also VEC as argument.
(tramp-completion-handle-file-name-completion): Do not expand directory.

5 years ago* src/profiler.c: Leave `key` hashslots as Qunbound (bug#37382)
Stefan Monnier [Thu, 12 Sep 2019 12:25:13 +0000 (08:25 -0400)]
* src/profiler.c: Leave `key` hashslots as Qunbound (bug#37382)

Now that "key == Qunbound" is used to determine if a hash table entry
is available, we can't stash pre-allocated vectors into the `key` slot
anymore, so use the `value` slot instead.

(make_log): Pre-fill the `value` slots i.s.o `key`.
(evict_lower_half): Stash key back into `value`, i.s.o `key`.
(record_backtrace): Get pre-allocated vector for `value` i.s.o `key`.

5 years agoFix file name encoding when open_directory signals
Paul Eggert [Thu, 12 Sep 2019 07:25:47 +0000 (00:25 -0700)]
Fix file name encoding when open_directory signals

* src/dired.c (open_directory): New arg ENCODED_DIRNAME.
All callers changed.  Signal error with original name,
not encoded name.

5 years agoImprove error reporting for DOC file problems
Paul Eggert [Thu, 12 Sep 2019 06:45:32 +0000 (23:45 -0700)]
Improve error reporting for DOC file problems

* src/doc.c (get_doc_string): Report all serious errors
when DOC cannot be opened, not just fd-exhaustion errors.

5 years agoFix directory-files-and-attributes race
Paul Eggert [Thu, 12 Sep 2019 06:22:46 +0000 (23:22 -0700)]
Fix directory-files-and-attributes race

* src/dired.c (directory_files_internal): Fix race condition:
when some other process removed a file between the readdir and
the ensuing lstat, directory-files-and-attributes would return
a list containing nil.

5 years agoOmit duplicate test of current directory
Paul Eggert [Wed, 11 Sep 2019 21:24:03 +0000 (14:24 -0700)]
Omit duplicate test of current directory

* src/callproc.c (encode_current_directory): Remove redundant
call to Ffile_accessible_directory_p.  The code checks the
encoded name with file_accessible_directory_p anyway.

5 years agoImprove checking of pdump load failures
Paul Eggert [Wed, 11 Sep 2019 18:26:07 +0000 (11:26 -0700)]
Improve checking of pdump load failures

* src/alloc.c (memory_full): Just report "memory exhausted" if
failure occurs during initialization, since fancier recovery
schemes are not likely to work when not initialized.
* src/emacs.c (dump_error_to_string): Accept int, not enum
pdumper_load_result, since the result might not fit in the
enum.  Use strerror if it was derived from errno.  This is for
better diagnostics of pdump load failures.
(load_pdump_find_executable): Return char *, not enum.  2nd
arg is now pointer to buffer size, rather than pointer to
pointer to buffer.  All callers changed.  Use Emacs allocator
since they should now be OK even during early startup.
Use check_executable instead access, to use effective rather
than real permissions.
(load_pdump): Return void since callers ignore result.
Use int where enum could be too narrow.  Use heap rather
than stack for possibly-long string.  Prefer ptrdiff_t to
size_t.
* src/fileio.c (check_executable): Now extern.
* src/pdumper.c (pdumper_load): Return int that may have
errno added to it, for better diagnostics when loads fail.

5 years agoReset dbus registered buses on dump load
Paul Eggert [Wed, 11 Sep 2019 17:19:07 +0000 (10:19 -0700)]
Reset dbus registered buses on dump load

Problem reported by Leonard Lausen (Bug#37331).
* src/dbusbind.c: Include pdumper.h.
(syms_of_dbusbind_for_pdumper):
New function, to reset the registered buses.
(syms_of_dbusbind): Use it, fixing a TODO.

5 years agoFix auto-save with user-emacs-directory
Paul Eggert [Wed, 11 Sep 2019 15:50:02 +0000 (08:50 -0700)]
Fix auto-save with user-emacs-directory

* lisp/startup.el (auto-save-list-file-prefix): Delay initialization,
since the value depends on user-emacs-directory (Bug#37354).

5 years ago* lisp/emacs-lisp/elint.el (elint-directory-skip-re): Fix doc typo.
Mattias Engdegård [Wed, 11 Sep 2019 09:18:38 +0000 (11:18 +0200)]
* lisp/emacs-lisp/elint.el (elint-directory-skip-re): Fix doc typo.

5 years agoCreate a new overlay used to mark Attachment header (bug#37370)
Katsumi Yamaoka [Wed, 11 Sep 2019 02:41:34 +0000 (02:41 +0000)]
Create a new overlay used to mark Attachment header (bug#37370)

* lisp/gnus/gnus-art.el (gnus-mime-inline-part)
(gnus-mm-display-part, gnus-mime-buttonize-attachments-in-header):
Create a new overlay used to mark Attachment header instead of
using existing overlays.

5 years agoMerge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'
Stephen Leake [Tue, 10 Sep 2019 10:37:51 +0000 (03:37 -0700)]
Merge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'

5 years agoSupport `cl-defstruct' in autoloads
Stephen Leake [Tue, 10 Sep 2019 10:36:15 +0000 (03:36 -0700)]
Support `cl-defstruct' in autoloads

* lisp/emacs-lisp/autoload.el (make-autoload): Add `cl-defstruct' to
"complex cases" list.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add :autoload-end to
limit what is declared in autoloads.el for a defstruct.

5 years agoHandle missing start-time when importing ical event (Bug#33277)
Ulf Jasper [Mon, 9 Sep 2019 16:35:02 +0000 (18:35 +0200)]
Handle missing start-time when importing ical event (Bug#33277)

* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary): Set
start time only if it is explicitly given in ical.  Do not use
start-time as default for end-time (Bug#33277).

* test/lisp/calendar/icalendar-tests.el (icalendar-import-bug-33277):
New.  Test fix for Bug#33277.

5 years agoquery-replace-regexp undo: Update next-replacement after undo
Tino Calancha [Mon, 9 Sep 2019 06:21:18 +0000 (08:21 +0200)]
query-replace-regexp undo: Update next-replacement after undo

* lisp/replace.el (perform-replace):
Rename the local binding to not shadow next-replacement.
Update next-replacement after undo (Bug#37287).

* test/lisp/replace-tests.el (query-replace-undo-bug37287): Add test.
(query-replace-undo-bug37073): Tweak this test.

5 years agoMatch Python 3 code object names in "M-x pdb"
Stefan Kangas [Mon, 9 Sep 2019 02:14:50 +0000 (04:14 +0200)]
Match Python 3 code object names in "M-x pdb"

* lisp/progmodes/gud.el (gud-pdb-marker-regexp): Match Python 3 code
object names.  (Bug#11679)

5 years ago; * lisp/ps-print.el: Doc fix.
Stefan Kangas [Sun, 8 Sep 2019 23:04:23 +0000 (01:04 +0200)]
; * lisp/ps-print.el: Doc fix.

5 years agoRemove final XEmacs compat code from dframe.el
Stefan Kangas [Sun, 8 Sep 2019 22:24:18 +0000 (00:24 +0200)]
Remove final XEmacs compat code from dframe.el

* lisp/dframe.el (top-level): Doc fix.
(dframe-frame-parameter): Redefine as an obsolete function alias for
'frame-parameter'.

5 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define setter functions.
Stefan Monnier [Sun, 8 Sep 2019 22:41:43 +0000 (18:41 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define setter functions.

When :noinline is specified one can't rely on setf expanding the
inlinable function to construct the setter.
Fixes bug#37283.

5 years agoRemove support for upgrading from old bookmark file format
Stefan Kangas [Mon, 1 Jul 2019 14:16:06 +0000 (16:16 +0200)]
Remove support for upgrading from old bookmark file format

* lisp/bookmark.el (bookmark-alist-from-buffer): Remove support for
old bookmark file format.  (Bug#37122)
(bookmark-upgrade-version-0-alist)
(bookmark-upgrade-file-format-from-0)
(bookmark-grok-file-format-version)
(bookmark-maybe-upgrade-file-format): Declare obsolete.
(bookmark-load): Don't call 'bookmark-maybe-upgrade-file-format'.
* etc/NEWS: Announce it.

5 years ago* lisp/tmm.el: Fix broken tmm-prompt (bug#34517)
Juri Linkov [Sun, 8 Sep 2019 20:27:23 +0000 (23:27 +0300)]
* lisp/tmm.el: Fix broken tmm-prompt (bug#34517)

* lisp/tmm.el (tmm-prompt): Don't duplicate items of tmm--history.
Don't reverse tmm-km-list for completion.  Don't set the initial
position of 'tmm--history.  Use reverse tmm--history as the list
of default values for M-n.
(tmm-add-prompt): Don't insert initial value to the minibuffer.

5 years agoFix untidinesses in compile.el.
Alan Mackenzie [Sun, 8 Sep 2019 10:44:27 +0000 (10:44 +0000)]
Fix untidinesses in compile.el.

* lisp/progmodes/compile.el (compilation--margin-string): Renamed from
compilation-margin-string.  Use defconst rather than defvar.  Use propertize
rather than a separate put-text-property.  Trim the doc string.

5 years agoFix Bug#36090
Michael Albinus [Sun, 8 Sep 2019 10:01:41 +0000 (12:01 +0200)]
Fix Bug#36090

* lisp/vc/vc-hg.el (vc-hg--pushpull, vc-hg-merge-branch)
(vc-hg-command): Disable pager.  (Bug#36090)

5 years agoFix Bug#37202
Michael Albinus [Sun, 8 Sep 2019 08:13:13 +0000 (10:13 +0200)]
Fix Bug#37202

* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use truename of
`shadow-test-remote-temporary-file-directory'.  (Bug#37202)

5 years agoFix bug when gc-cons-percentage is bumped to 0.8
Paul Eggert [Sun, 8 Sep 2019 01:08:12 +0000 (18:08 -0700)]
Fix bug when gc-cons-percentage is bumped to 0.8

Problem reported by Michael Heerdegen (Bug#37321).
* src/alloc.c (gc_threshold): New static var.
(bump_consing_until_gc): Change args from DIFF to THRESHOLD and
PERCENTAGE.  All uses changed.  When accounting for a changed
gc-cons-percentage, do not assume that total_bytes_of_live_objects
returns the same value now that it did the last time we were
called.

5 years agoUse derived-mode-p consistently in info.el
Stefan Kangas [Tue, 27 Aug 2019 01:36:05 +0000 (03:36 +0200)]
Use derived-mode-p consistently in info.el

* lisp/info.el (Info-hide-note-references, info-display-manual)
(info--manual-names): Use derived-mode-p.  (Bug#27583)

5 years agoLet byte-compiler recognize that local-variable-p implies boundp
Noam Postavsky [Sat, 7 Sep 2019 21:00:39 +0000 (17:00 -0400)]
Let byte-compiler recognize that local-variable-p implies boundp

* lisp/emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Add
arguments to local-variable-p to the bound list.
* lisp/image-mode.el (image-toggle-display-image): Remove no longer
needed boundp check.

5 years agoFix flymake-proc temporary file deletion bug
Joel Rosdahl [Wed, 28 Aug 2019 19:00:00 +0000 (21:00 +0200)]
Fix flymake-proc temporary file deletion bug

* list/progmodes/flymake-proc.el (flymake-proc-create-temp-inplace):
Include a time string part (hour + minute + second + nanosecond) in
the temporary name to make it unique enough.
(flymake-proc-legacy-flymake): Store temporary file names in the
process for usage in the sentinel.
(flymake-proc--process-sentinel): Bind values of temporary file names
dynamically to values stored in the process so that the cleanup
function will delete the correct temporary file(s).

Fixes bug#31981.

5 years agoAmend the menu caption for page "Display Property" in the Elisp manual.
Alan Mackenzie [Sat, 7 Sep 2019 18:15:40 +0000 (18:15 +0000)]
Amend the menu caption for page "Display Property" in the Elisp manual.

* doc/lispref/display.texi (Emacs Display): Replace a content-free menu
caption with one mentioning images, margins and text size.