Commit graph

76933 commits

Author SHA1 Message Date
Lars Ingebrigtsen
f3dbde7e6f Only skip directories in lgrep, not the other grep commands
* lisp/progmodes/grep.el (lgrep): Do the directory ignores here
(bug#23590).
(grep-compute-defaults): ... instead of here, because this would
affect all grep commands, not just lgrep.
2020-10-09 06:15:07 +02:00
Alan Mackenzie
81fe8990c0 CC Mode: Move the handling of keyword auto into type handling for C++.
This should allow auto, const, static, ... to be in any order.

* lisp/progmodes/cc-engine.el (c-forward-type): New return value 'no-id for
when auto precludes the parsing of a type identifier.  Adapt processing for
this.
(c-forward-decl-or-cast-1): Use the new facility from c-forward-type.

* lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): Insert the value
of c-no-type-kwds into the value.
(c-no-type-kwds, c-no-type-key): New lang consts/vars, basically "auto".
(c-typeless-decl-kwds, c-modifier-kwds): Remove "auto" from the C++ value.
2020-10-08 16:49:49 +00:00
Stefan Monnier
d340a979db * lisp/doc-view.el: Fix "can't resize root window" error
(doc-view-fit-window-to-page): Change approach to detect when the
frame needs to be resized.
2020-10-08 09:44:34 -04:00
Dmitry Gutov
0a5e9cf262 Mention two more functions in the commentary
* lisp/progmodes/project.el:
Mention two more functions in the commentary (bug#43595).
2020-10-08 02:41:12 +03:00
Eli Zaretskii
7be18bbfe1 Improve documentation of 'isearch-group-N' faces
* etc/NEWS:
* doc/emacs/search.texi (Search Customizations): Improve and
clarify the wording of the 'isearch-group-N' faces description.

* lisp/isearch.el (search-highlight-submatches): Doc fix.
2020-10-07 12:12:06 +03:00
Eli Zaretskii
466db12df0 Fix last change in frame.el.
* lisp/frame.el (frame-set-background-mode): Fix last change: yet
another place where FRAME was not taken into account, using the
selected frame instead.  (Bug#43837)
2020-10-07 11:35:59 +03:00
Eli Zaretskii
bc2b63876b Fix face recalculation when frame's background mode changes
* lisp/frame.el (frame-set-background-mode): Use the FRAME
argument instead of the selected frame, when calling
'face-spec-match-p'.  (Bug#43837)
2020-10-07 10:02:20 +03:00
Alex Gramiak
0ab67a65f5 Default the grep commands to skip directories
* lisp/progmodes/grep.el (grep-compute-defaults): Skip directories
(bug#23590).
2020-10-07 05:41:23 +02:00
Lars Ingebrigtsen
c842bd993f Make artist-mode work when display-line-numbers-mode is on
* lisp/textmodes/artist.el (artist--adjust-x): New function.
(artist-mouse-draw-continously, artist-mouse-draw-poly)
(artist-mouse-draw-1point, artist-mouse-draw-2points): Use it to
take `display-line-numbers-mode' widths into account.
2020-10-07 05:23:26 +02:00
Lars Ingebrigtsen
cc70a7b7a8 alist-get doc string further clarification
* lisp/subr.el (alist-get): Mention generalized variables again
for easier cross-referencing (bug#43836).
2020-10-07 04:50:52 +02:00
Mauro Aranda
7305437654 Make the State button in Custom use extended menus
* lisp/cus-edit.el (custom-actioned-widget): New variable.
Dynamically hold the widget for which to show the menu.
(custom-variable-extended-menu, custom-face-extended-menu)
(custom-group-extended-menu): Keymap menus for the State menu.  Use
custom-actioned-widget for the :enable and :selected forms.  Make
related items radio buttons.  (Bug#4787)
(custom-variable-menu, custom-face-menu, custom-group-menu): Keep for
backward compatibility, but default to nil, so we prefer the keymap
menus instead.
(custom-variable-action, custom-face-action, custom-group-action):
Pass the keymap menu to widget-choose when the simplified menus
are nil.
2020-10-07 04:35:58 +02:00
Juri Linkov
46aa145d39 Add match-data to isearch state and repeat faces to highlight group matches
* lisp/isearch.el (isearch-match-data): New variable.
(isearch-mode): Set isearch-match-data to nil.
(isearch-update): Call isearch-highlight with isearch-match-data.
(isearch--state): Add isearch-match-data.
(isearch--set-state): Restore isearch-match-data.
(with-isearch-suspended): Preserve isearch-match-data.
(isearch-search): Set isearch-match-data to integers.
(isearch-group-1): Rename from isearch-group-odd and adjust colors.
(isearch-group-2): Rename from isearch-group-even and adjust colors.
(isearch-highlight): Add optional arg 'match-data'.
Rewrite search-highlight-submatches part to recycle faces.

* doc/emacs/search.texi (Search Customizations): Amend the
documentation for isearch-group faces.

(bug#6227, bug#43702)
2020-10-06 23:14:26 +03:00
Juri Linkov
fc6decdfbc Add check for bound and true 'ido-everywhere' in multi-occur--prompt
* lisp/replace.el (multi-occur--prompt): Check if 'ido-everywhere' is
bound and true (bug#41633).
2020-10-06 21:35:53 +03:00
Juri Linkov
c30f6da0da Fix args of truncate-string-to-width in ibuffer-compile-make-substring-form
* lisp/ibuffer.el (ibuffer-compile-make-substring-form): Fix args of
truncate-string-to-width call (bug#41250)
2020-10-06 21:33:20 +03:00
Stefan Monnier
278c9d69cd * lisp/international/mule.el (define-coding-system): Revert accidental change
This was accidentally included in a9f147af71
"Use the full name of the null byte/character, not its abbreviation".
2020-10-06 11:02:00 -04:00
Stefan Monnier
bcd09e9869 * lisp/international/mule-util.el: Revert bug#41250 workaround
(truncate-string-ellipsis): Use the '…' character itself since it
should work now and is more readable.
2020-10-06 09:38:25 -04:00
Stefan Monnier
9a819568cc * lisp/international/ja-dic-cnv.el: Attempt to fix bug#41250
(skkdic-convert): Only bind `coding-system-for-read` where needed.
2020-10-06 09:34:20 -04:00
Eli Zaretskii
ff9b04fbc4 ; * lisp/international/mule-util.el (truncate-string-ellipsis): Fix comment. 2020-10-06 14:51:13 +03:00
Mattias Engdegård
bf34cf75fc Fix last change
* lisp/international/mule-util.el (truncate-string-ellipsis):
Use Unicode hex escapes instead of named escapes here, because \N{...}
is not available during bootstrapping.  (Bug#41250)
2020-10-06 13:14:19 +02:00
Eli Zaretskii
e704a6956d Fix last change
* lisp/international/mule-util.el (truncate-string-ellipsis): Add
a FIXME comment that explains the last change.  (Bug#41250)
2020-10-06 11:24:15 +03:00
Juri Linkov
809934f022 Don't use the character '…' literally in mule-util.el (bug#41250)
* lisp/international/mule-util.el (truncate-string-ellipsis):
Replace the character '…' with its Unicode name.
2020-10-06 10:50:46 +03:00
Andreas Schwab
a9f147af71 Use the full name of the null byte/character, not its abbreviation
* lisp/subr.el (inhibit-nul-byte-detection): Make it an obsolete alias.
* src/coding.c (setup_coding_system): Use original name.
(detect_coding): Rename nul_byte_found => null_byte_found.
(detect_coding_system): Use original name.
Rename nul_byte_found => null_byte_found.
(Fdefine_coding_system_internal): Use original name.
(syms_of_coding): Rename inhibit-nul-byte-detection to
inhibit-null-byte-detection.
* src/w16select.c (get_clipboard_data): Rename nul_char to null_char.
* src/json.c (check_string_without_embedded_nulls): Rename from
check_string_without_embedded_nuls.
(Fjson_parse_string): Adjust accordingly.
* src/coding.h (enum define_coding_undecided_arg_index)
(enum coding_attr_index): Rename ...nul_byte... to ...null_byte....
* lisp/info.el (info-insert-file-contents, Info-insert-dir):
* lisp/international/mule.el (define-coding-system):
* lisp/vc/vc-git.el (vc-git--call):
* doc/lispref/nonascii.texi (Lisp and Coding Systems): Use original name.
2020-10-05 20:19:59 +02:00
Jared Finder
c47479cf17 Sort items in tmm properly, and allow clicking the final item
* lisp/tmm.el (tmm-menubar-keymap): Sort the final items properly.
(tmm-menubar): Allow clicking the final menu item (bug#43756).
2020-10-05 10:20:56 +02:00
Juri Linkov
7301bf996e Use … in Gnus mode lines (when shortening them)
* lisp/gnus/gnus-sum.el (gnus-set-mode-line): Defer ellipsis
creation to `truncate-string-to-width' (bug#41250).  This uses …
by default.
2020-10-05 09:01:03 +02:00
Nathan Moreau
d494833d47 Improve support for using vc commands in indirect buffers
* lisp/vc/vc.el (vc-deduce-fileset-1): New defun.
(vc-deduce-fileset): Adapt.
(vc-maybe-buffer-sync): New defun.
(vc-diff): Adapt.
(vc-ediff): Adapt.
(vc-root-diff): Adapt.
(vc-revision-other-window): Adapt (bug#40967).
2020-10-05 08:50:16 +02:00
Eli Zaretskii
c0577d7a39 Fix the documentation parts of a recent commit
* lisp/international/mule-util.el (truncate-string-ellipsis): Doc
fix.

* doc/lispref/display.texi (Size of Displayed Text): Improve
wording and accuracy of the documentation of
'truncate-string-to-width'.  Document the function
'truncate-string-ellipsis'.

* etc/NEWS: Improve the wording of the entry for
'truncate-string-to-width'.
2020-10-05 08:37:02 +03:00
Juri Linkov
5ec21155c3 Use '…' for ellipsis in truncate-string-to-width by default (bug#41250)
* lisp/international/mule-util.el (truncate-string-ellipsis):
Change the default value to nil.
(truncate-string-ellipsis): New function.
(truncate-string-to-width): Use the value returned from the
function 'truncate-string-ellipsis'.

* lisp/tab-bar.el (tab-bar-tab-name-truncated):
* lisp/tab-line.el (tab-line-tab-name-ellipsis):
Take advantage of the improvement of the ellipsis default value
in truncate-string-to-width and truncate-string-ellipsis.

* doc/lispref/display.texi (Size of Displayed Text):
Improve description of truncate-string-ellipsis.
2020-10-04 22:41:36 +03:00
Michael Albinus
96a8e84606 Make dbus-unregister-object work for monitors
* doc/misc/dbus.texi (Monitoring Messages): Rename from
"Monitoring Events".
(Register Objects, Monitoring Messages):
Mention returned object.

* lisp/net/dbus.el (dbus-unregister-object): Adapt docstring.
(dbus-unregister-object): Delete monitor if needed.
(dbus-register-monitor): Return proper object.

* src/dbusbind.c (dbus-registered-objects-table): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus--test-signal-handler):
Adapt docstring.
(dbus-test08-register-monitor): New test.
2020-10-04 18:56:45 +02:00
Lars Ingebrigtsen
d8665e6d34 Make update-file-autoloads respect generated-autoload-file
* lisp/emacs-lisp/autoload.el (update-file-autoloads): Make
update-file-autoloads respect `generated-autoload-file', as
documented.
2020-10-04 16:32:16 +02:00
Mauro Aranda
f4305f3b53 Support extended menus in widget-choose
* doc/misc/widget.texi (Utilities): Document widget-choose.

* etc/NEWS: Document the feature (bug#4787).
* lisp/wid-edit.el (widget--simplify-menu): New function, to convert
extended menus into simplified menus when using the menu to prompt
through the minibuffer.
(widget-choose): Accept a keymap menu.  When not using x-popup-menu,
simplify the menu with widget--simplify-menu.  Document the changes in
the docstring.
2020-10-03 19:31:50 +02:00
Stefan Kangas
d6a2754348 ; Fix more typos 2020-10-03 12:53:51 +02:00
Stefan Kangas
ceae38b933 ; Fix trivial typos in ChangeLogs 2020-10-03 12:53:51 +02:00
Mattias Engdegård
0ade20f49f Calc: fix formatting and parsing Unix time (bug#43759)
The number of days from epoch to Jan 1, 1970 that was used in parsing
and formatting Unix time was incorrect.  The previous fix
(in e368697ce3) was incomplete.

Reported by Vincent Belaïche.

* lisp/calc/calc-forms.el (math-unix-epoch): New constant.
(math-format-date-part, math-parse-standard-date, calcFunc-unixtime):
Use math-unix-epoch instead of a constant that is sometimes wrong.
* test/lisp/calc/calc-tests.el (calc-unix-date): New test.
2020-10-02 22:24:54 +02:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Glenn Morris
223de5f2f5 Merge from origin/emacs-27
41dcbeccf3 Make aliases introduced in previous patch obsolete
4997032c05 Restore some public debugging functions removed in Emacs 27
2020-10-02 09:33:53 -07:00
Glenn Morris
0a769f4832 Merge from origin/emacs-27
2af6b3147d Clarification in Tramp manual
8fbaca7d41 Check Emacs version used for Tramp compilation
90e5549f02 Don't signal an error when saving files on WdebDAV volumes
6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix.
ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it.  (...
2020-10-02 09:33:53 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Stefan Monnier
053d70660b CC Mode: Convert the handling of c-special-indent-hook to standard usage
* lisp/progmodes/cc-styles.el (c-set-style): Use kill-local-variable rather
than copying the hook's global value to the local binding.
(c-make-styles-buffer-local): Remove redundant make-variable-buffer-local.
2020-10-02 10:34:37 +00:00
Robert Pluim
9b47ae2304 Don't error if no GPG signing key configured
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Partially revert
"Make mml-secure-epg-sign bug out if we can't find an identity".
It causes signing to fail for people who have not set up
mml-secure-{smime,openpgp}-sign-with-sender, which is a regression
from Emacs-26 (Bug#40118).  In such a situation gpg will use its
default key.

Do not merge to master. On master Emacs will query the user.
2020-10-02 10:47:23 +02:00
Mattias Engdegård
4cb16b6f42 Calc: fix business days calculation (bug43677)
The calculation of business days was broken in 2012 (probably
310e60d945 or thereabouts) when the date representation changed
epoch so that Jan 1, 1 AD became day number 1 instead of 0.  Repair
this, along with an unrelated bug that prevented arbitrary holiday
weekdays from working.

Reported by Aaron Zeng.

* lisp/calc/calc-forms.el (math-to-business-day)
(math-from-business-day): Correct calculation of weekdays using Calc's
current (Rata Die) chronology.  Modify loop condition to cope with odd
sets of holiday weekdays.
* test/lisp/calc/calc-tests.el (calc-business-days): New test.
2020-10-02 10:35:52 +02:00
Lars Ingebrigtsen
d037a6a2e6 Fix electric-buffer-list buffer selection
* lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
restored, which isn't always the case if
global-display-line-numbers-mode (bug#43755).  This enables
selecting buffers again.
2020-10-02 08:07:53 +02:00
Dmitry Gutov
f6277911eb Make xref work better on variables in shell-script-mode
* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Classify "/"
as punctuation so that `M-.' on $foo/bar works on the $foo part
(bug#25585).
2020-10-02 07:11:56 +02:00
Lars Ingebrigtsen
3f5f3dd604 Make `C-c C-e' in Python buffers work
* lisp/progmodes/python.el (python-shell-send-statement): Don't
send a cookie, because that leads to the naked expression not
being evaled (bug#43450).
(python-shell-send-region): Allow not sending a cookie.
(python-shell-buffer-substring): Ditto.
2020-10-02 05:30:37 +02:00
Per Starbäck
aac3effb8f python-shell-send-defun doesn't find the (whole) definition
* lisp/progmodes/python.el (python-shell-send-defun): Fix C-M-x
for definitions like @property\ndef bar(): (bug#37828).
2020-10-02 05:11:06 +02:00
Robert Pluim
acfbacefc4 Make setting verify-hostname-error not make connections fail
* lisp/net/gnutls.el (gnutls-boot-parameters): If
verify-hostname-error was set, this would make verify-error a
non-proper list (bug#38602).
2020-10-02 04:49:39 +02:00
Lars Ingebrigtsen
6f36b67e41 Stop using a dynamically bound 'generated-autoload-file' variable
* doc/lispref/loading.texi (Autoload): Document change of name
(bug#39823).

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass
the file name in.
(autoload-generated-file): Ditto.
(autoload-file-load-name): Ditto.
(generate-file-autoloads): Ditto.
(autoload--setup-output): Ditto.
(autoload-generate-file-autoloads): Ditto, and alter doc string to
reflect when `generated-autoload-file' is heeded.
(update-file-autoloads): Pass outfile in to functions.
(autoload-find-destination): Ditto.
(update-directory-autoloads): Make into an obsolete shim around
`make-directory-autoloads'.
(make-directory-autoloads): Renamed from
`update-directory-autoloads' with new semantics.
(batch-update-autoloads): Adjust caller.

* lisp/emacs-lisp/package.el (package-generate-autoloads): Adjust
caller.
2020-10-02 04:34:31 +02:00
Trevor Murphy
40b81f847f Fix check for derived modes in display-buffer-reuse-mode-window
* lisp/window.el (display-buffer-reuse-mode-window): Make the
check for derived modes actually work (bug#38677).
2020-10-02 00:30:19 +02:00
Tino Calancha
6996204dd0 Fix wdired-do-perm-changes when over Tramp
* lisp/wdired.el (wdired-do-perm-changes) Use set-file-modes
instead of external program (bug#39284).  This fixes the problem
of passing the wrong argument to the external chmod.
2020-10-01 23:34:01 +02:00
Tino Calancha
29435ecd8e Fix bug in wdired-get-filename
* lisp/wdired.el (wdired-get-filename): Acknowledge the first
argument (bug#39280).
* test/lisp/wdired-tests.el (wdired-test-bug39280): Add test.
2020-10-01 23:34:01 +02:00
Juri Linkov
306fcc59dc Use new faces isearch-group-odd and isearch-group-even (bug#43702)
* lisp/isearch.el (isearch-group-odd, isearch-group-even): New faces
instead of isearch-group-1 .. isearch-group-9.
(isearch-highlight): Use new faces.
2020-10-01 22:17:40 +03:00