1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 12:20:39 -08:00
Commit graph

138416 commits

Author SHA1 Message Date
Paul Eggert
de3daf0639 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.
2019-09-15 20:12:33 -07:00
Glenn Morris
a625ca5c26 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
2019-09-15 16:38:23 -07:00
Glenn Morris
211dc01a7b ; Merge from origin/emacs-26
The following commit was skipped:

7e527af Fix non-deterministic process test
2019-09-15 16:38:23 -07:00
Glenn Morris
8297df9d4b Merge from origin/emacs-26
8e420c0 Clarify the use of left/right-margin-width in determining cur...
2019-09-15 16:38:20 -07:00
Glenn Morris
7582cde427 ; Merge from origin/emacs-26
The following commit was skipped:

0c3fc71 ; Bump Emacs version to 26.3.50
2019-09-15 16:38:20 -07:00
Glenn Morris
84c7d4bccc * admin/upload-manuals: Move a basic check earlier. 2019-09-15 16:36:06 -07:00
Juanma Barranquero
b3e4b50578 * lisp/subr.el (major-mode-suspend): Doc fix 2019-09-15 20:37:26 +02:00
Michael Albinus
6d3cb263f9 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'.
2019-09-15 16:52:22 +02:00
Mauro Aranda
24e0546bc1 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).
2019-09-15 15:21:08 +02:00
Wolfgang Scherer
12b1cce925 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).
2019-09-15 15:14:44 +02:00
Wolfgang Scherer
f144c87f92 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).
2019-09-15 15:03:33 +02:00
Wolfgang Scherer
c99c9ec28c 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).
2019-09-15 15:00:20 +02:00
Lars Ingebrigtsen
f198a5c514 Revert "emacsclient: ignore --eval parameters when starting alternate editor"
This reverts commit 6fe661342a.

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.
2019-09-15 14:11:14 +02:00
Paul Eggert
dbc57b5573 file_name_case_insensitive_p int->long fix
* src/fileio.c (file_name_case_insensitive_p):
Don’t assume ‘long int’ fits in ‘int’.
2019-09-14 22:00:42 -07:00
Paul Eggert
52172d2340 Fix gc-elapsed rounding bug
* src/alloc.c (garbage_collect): Don’t accumulate rounding
errors when computing gc-elapsed.
2019-09-14 10:56:12 -07:00
Paul Eggert
1acc0cc9aa Improve doc of GC thresholds
* doc/lispref/internals.texi (Garbage Collection), etc/NEWS:
Warn that control over GC is only approximate.
2019-09-14 10:56:12 -07:00
Bruno Félix Rezende Ribeiro
3f43adac49 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
2019-09-14 17:00:40 +02:00
Basil L. Contovounesios
c6d8143453 Fix fileless eww form submission
* lisp/net/eww.el (eww-submit): Ignore file inputs with no
associated file name (bug#36520).
2019-09-14 16:55:24 +02:00
Lars Ingebrigtsen
5a0ab88cc9 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.
2019-09-14 16:48:21 +02:00
Lars Ingebrigtsen
568f1488a6 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.
2019-09-14 16:10:23 +02:00
Eli Zaretskii
49a4b86925 * src/print.c (PRINT_CIRCLE_CANDIDATE_P): Fix a thinko. (Bug#36566) 2019-09-14 17:04:30 +03:00
Tobias Zawada
5f7531f9e9 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
2019-09-14 14:20:03 +02:00
Eli Zaretskii
53a1a29bec ; * etc/NEWS: Fix last change. 2019-09-14 11:21:40 +03:00
Federico Tedin
36bf5534bf 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.
2019-09-14 11:20:32 +03:00
Paul Eggert
bac66302e9 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.
2019-09-14 00:37:26 -07:00
Paul Eggert
e4fb98b542 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.
2019-09-13 16:10:54 -07:00
Gemini Lasswell
0dba340da5 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.
2019-09-13 13:43:07 -07:00
Gemini Lasswell
3bd6ef40b5 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.
2019-09-13 13:43:07 -07:00
Gemini Lasswell
6eaf39d21b 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.
2019-09-13 13:43:07 -07:00
Gemini Lasswell
5c40c21a47 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.
2019-09-13 13:43:07 -07:00
Gemini Lasswell
2093395dbf 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.
2019-09-13 13:43:07 -07:00
Stefan Kangas
224534ab8d * lisp/help-mode.el (help-mode-menu): Fix typo. (Bug#36485) 2019-09-13 20:51:06 +02:00
Stefan Kangas
9ad3f5d1d2 * doc/misc/efaq.texi: Update ancient formats. (Bug#37143) 2019-09-13 20:28:15 +02:00
Stefan Kangas
45b01f2d7f 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.
2019-09-13 18:37:15 +02:00
Stefan Kangas
897540069f Change gui--selection-value-internal comment into doc string
* lisp/select.el (gui--selection-value-internal): Change comment into
doc string.  (Bug#25528)
2019-09-13 14:57:23 +02:00
Michael Albinus
8af6b3ef42 ; Fix a typo by last commit 2019-09-13 14:33:06 +02:00
Michael Albinus
89a63c9186 ; Add traces in shadowfile.el 2019-09-13 14:25:56 +02:00
Michael Albinus
8806c196ab 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".
2019-09-13 12:08:34 +02:00
Michael Albinus
d8c7bf6683 Make recent Tramp patch work for tramp-archive.el
* lisp/net/tramp.el (tramp-connectable-p): Make it work also for
tramp-archive.el.
2019-09-13 12:08:02 +02:00
Eli Zaretskii
5940ac6330 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)
2019-09-13 10:47:28 +03:00
Jack Coughlin
a4c471c984 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
2019-09-12 20:25:30 -04:00
Noam Postavsky
cbb8a8ad97 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.
2019-09-12 20:25:30 -04:00
Stefan Monnier
421084d2cb * lisp/progmodes/sh-script.el (sh--assignment-collect): Only after =! 2019-09-12 15:43:50 -04:00
Stefan Monnier
7fbabaf96a * 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.
2019-09-12 14:26:40 -04:00
Karl Fogel
bbadc6e05f 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.
2019-09-12 12:42:13 -05:00
Michael Albinus
5e8d477d63 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.
2019-09-12 16:38:48 +02:00
Stefan Monnier
997415504c * 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`.
2019-09-12 08:25:36 -04:00
Paul Eggert
c19f5dcd47 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.
2019-09-12 00:27:38 -07:00
Paul Eggert
ffa870fc80 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.
2019-09-11 23:46:58 -07:00
Paul Eggert
f7228a6479 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.
2019-09-11 23:23:22 -07:00