1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 12:40:56 -08:00
Commit graph

92730 commits

Author SHA1 Message Date
Po Lu
c1a45041d6 Fix earlier change in subr.el
* lisp/subr.el (event-start, event-end): Don't take the car of
EVENT if it's not an event with parameters.
2023-08-17 07:27:14 +00:00
Eli Zaretskii
636fb267c4 Improve documentation of case transfer in replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches):
* src/search.c (Freplace_match):
* lisp/replace.el (query-replace, query-replace-regexp): Clarify
in the doc string and the manual how letter-case is transferred
from the replaced text to the replacement text.  (Bug#65347)
2023-08-17 10:07:48 +03:00
Spencer Baugh
f38bcf37dc (project-find-file): Allow current file name "other project"'s future history
* lisp/progmodes/project.el (project-find-file):
Allow using the relative file name of the current buffer in "other
project" as well (bug#63829).
2023-08-17 04:16:09 +03:00
Dmitry Gutov
155154f6f1 ; * lisp/progmodes/project.el (project-find-file-in): Update docstring. 2023-08-17 04:16:09 +03:00
Po Lu
4509cda5c9 Update Android port
* configure.ac (emacs_cv_tputs_lib): Only circumvent termcap if
Android windowing support is enabled.  (bug#65340)

* etc/PROBLEMS: Fix typo in section recouting problems with the
Anonymous Pro font.

* lisp/subr.el (event-start, event-end): Return the mouse
position list tied to touchscreen-begin and end events.
Reported by Stefan Monnier <monnier@iro.umontreal.ca>.

* lisp/version.el (emacs-build-system, emacs-build-time)
(emacs-repository-get-version, emacs-repository-get-branch):
Bypass Android specific code on non-GUI builds running on
Android.  (bug#65340)

* lisp/wid-edit.el (widget-event-point): Remove now redundant
code.
2023-08-17 08:45:57 +08:00
Mattias Engdegård
898edb1816 tibetan.el: compute constants at compile time, optimise regexps
* lisp/language/tibetan.el (tibetan-subjoined-transcription-alist)
(tibetan-regexp, tibetan-precomposed-regexp)
(tibetan-precomposition-rule-regexp):
Evaluate at compile time.  Use regexp-opt.
2023-08-16 21:54:50 +02:00
Stefan Kangas
d96dd127e3 Speed up dictionary--count-mode-buffers
* lisp/net/dictionary.el (dictionary--count-mode-buffers): Make
faster.  Patch by Visuwesh <visuweshm@gmail.com>.
2023-08-16 21:27:50 +02:00
Stefan Kangas
33d3e5c545 Make term-mode non-interactive
* lisp/term.el (term-mode): Mark as non-interactive.
2023-08-16 21:27:49 +02:00
Eli Zaretskii
7856d51436 Fix horizontal scrolling of images with C-f
* lisp/image-mode.el (image-forward-hscroll): Calculate the
window-width more accurately, as the number of full columns that
fits in the window's text-area.  (Bug#65187)
2023-08-16 20:42:16 +03:00
Michael Albinus
19513a654e ; Fix last change
* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Replace "echo -n"
by "printf", it isn't portable.  (Bug#65321)
2023-08-16 19:31:05 +02:00
Eli Zaretskii
8cf5659ec2 ; Fix defcustom in completion.el
* lisp/completion.el (completion-search-distance): Fix doc string
and customization type.  (Bug#65327)
2023-08-16 20:19:34 +03:00
Jim Porter
c4915678f3 Add 'compile' builtin command for Eshell
* lisp/eshell/em-unix.el (eshell-compile, eshell/compile): New
functions.
(eshell/make, eshell-grep): Use 'eshell-compile'.
(eshell/glimpse): It's no longer necessary to let-bind 'null-device';
'eshell-grep' no longer calls 'grep' (the Lisp function), which needed
'null-device' to be nil for this case.

* test/lisp/eshell/em-unix-tests.el: New file.

* doc/misc/eshell.texi (Built-ins): Document the 'compile' builtin.

* etc/NEWS: Announce this change (bug#65273).
2023-08-16 10:01:49 -07:00
Gregory Heytings
c287a0fdc7 Simplify 'with-restriction' and 'without-restriction'
* lisp/subr.el (with-restriction, without-restriction): Merge the
bodies of the 'internal--with-restriction' and
'internal--without-restriction' function into the macros.  The
result is more efficient than a funcall.
(internal--with-restriction, internal--without-restriction):
Remove.
Suggested by Mattias Engdegård.
2023-08-16 16:06:38 +00:00
Gregory Heytings
9e9e11648d Simplify 'without-restriction'
This simplification is symmetrical to 01fb898420.

* src/editfns.c: (Finternal__labeled_widen): Add a call to
'Fwiden', and rename from 'internal--unlabel-restriction'.
(unwind_labeled_narrow_to_region): Use the renamed function, and
remove the call to 'Fwiden'.
(syms_of_editfns): Rename the symbol.

* lisp/subr.el (internal--without-restriction): Use the renamed
function.
2023-08-16 16:06:34 +00:00
Gregory Heytings
d622602452 Fix combine-change-call
* lisp/subr.el (combine-change-calls-1): Rewrite and document
the part which creates the undo-list element.  Fixes bug#60467
and bug#64989.
2023-08-16 16:06:31 +00:00
Mattias Engdegård
1ad318cf2a ob-tangle.el: fix unintended range in regexp
* lisp/org/ob-tangle.el (org-babel-interpret-file-mode):
Repair parts of regexp that should only match +, - and =.
* lisp/files.el (file-modes-symbolic-to-number):
Fix the same error in a doc string; this seems to be where
the mistake originated.
2023-08-16 16:55:38 +02:00
Mattias Engdegård
ca68783929 Fix Info parser regexp mistake
* lisp/info.el (Info-split-parameter-string):
The `\sX` syntax construct isn't valid inside character alternatives;
follow the obvious intention.
2023-08-16 16:55:38 +02:00
Mattias Engdegård
5b87950133 Remedy wrong-looking \(:?...\) regexp constructs
When we see \(:?...\) in a regexp it very much looks like a typo
for a \(?:...\) construct and often is, so do something about
all of these (one of which being another mistake).
Doing so silences an optional relint check.

* lisp/comint.el (comint-replace-by-expanded-history-before-point):
* lisp/term.el (term-replace-by-expanded-history-before-point):
Move :? out from capturing group where it does not need to be,
to avoid confusion.
* lisp/emacs-lisp/cl-indent.el (common-lisp-loop-part-indentation):
A capturing group isn't needed here; turn it into simple bracketing.
* lisp/progmodes/sql.el (sql--completion-table):
Change :? into ?: which was clearly meant here.
2023-08-16 16:55:38 +02:00
Eli Zaretskii
dfe68f2a42 ; Fix byte-compiler warnings in comp.el
* lisp/emacs-lisp/comp.el: Declare functions and variables defined
in comp.c, to avoid byte-compiler warnings.  (Bug#65250)
2023-08-16 16:10:55 +03:00
Eli Zaretskii
3d7041834f Revert "Fix slow "C-h f" in Emacs built without native compilation"
This reverts commit 545f95d1a3.
It is no longer needed, as comp.el and comp-cstr.el are now
byte-compiled even if native-compilation is not built-in.
2023-08-16 16:06:20 +03:00
Eli Zaretskii
205d87cdca Fix unpacking ZIP archives on MS-Windows
* lisp/arc-mode.el (archive-zip-summarize): Decode file names as
UTF-8 when bit 11 of flags is set, even on MS-Windows.
(Bug#65305)
2023-08-16 15:34:09 +03:00
Po Lu
f2f2e6a082 Update Android port
* configure.ac: Test for getpwent using gl_CHECK_FUNCS_ANDROID.
(bug#65319)

* etc/MACHINES (Android): Mention that a non-GUI build is also
possible on Android.

* lisp/loadup.el: Provide for regular builds on Android.
(bug#65339)

* lisp/wid-edit.el (widget-event-start): Remove function, since
event-start now does the same thing.
(widget-button--check-and-call-button, widget-button-click):
Adjust correspondingly.  Reported by Stefan Monnier
<monnier@iro.umontreal.ca>.

* src/sysdep.c (close_output_streams): Apply workarounds for the
file descriptor sanitizer on all builds where __ANDROID__ is
defined, not just Android port builds.  (bug#65340)
2023-08-16 20:32:38 +08:00
Thomas Voss
3712e8bc38 ; Fix typos in lisp/keymap.el doc strings (bug#65329).
Copyright-paper-exempt: yes
2023-08-16 15:24:21 +03:00
Michael Albinus
22d031f644 Fix infloop error in Tramp
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Do not
call `tramp-get-ls-command'.  (Bug#65321)
2023-08-16 11:48:28 +02:00
Andrea Corallo
2eaf1e3efc * lisp/Makefile.in (compile-targets): Always byte compile native comp. 2023-08-16 10:22:57 +02:00
Bob Rogers
612f25c24f Don't use the too-new command 'git get-url'
* lisp/vc/vc-git.el (vc-git-repository-url):
Don't use the too-new command 'git get-url' (bug#65315).
2023-08-16 04:20:26 +03:00
F. Jason Park
98af493e0f Add line-wise movement commands for erc-fill-wrap
* lisp/erc/erc-fill.el (erc-fill-line-spacing): Revise doc string.
(erc-fill--wrap-escape-hidden-speaker): New helper function to move
point to beginning of visible text.
(erc-fill--wrap-beginning-of-line): Factor out adjustment for hidden
speakers.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Add commands
for moving to previous and next line in a manner consistent with the
value of `erc-fill--wrap-visual-keys'.
(erc-fill-wrap-mode-map): Add remap bindings for `next-line' and
`previous-line'.
(erc-fill-wrap-mode): Revise doc string.
(erc-fill-wrap-nudge): Fix vertical anchoring so that point's line
remains steadier throughout the adjustment.  (Bug#60936)
2023-08-15 17:13:52 -07:00
F. Jason Park
4b17cc3147 Deprecate erc-button-nickname-callback-function
* lisp/erc/erc-button.el (erc-button-nickname-callback-function):
Deprecate this function-valued variable, first introduced in ERC 5.6
and Emacs 30, to dissuade consumers of the old `erc-button-alist'
nickname interface from meddling with the on-click callback of
buttonized nicks.  If necessary, third parties can instead add their
own propertizing logic in something like `erc-insert-modify-hook'.
Also change default callback to a wrapper that discards all but the
first arg.  This effectively declares that `erc-data' values for
nicknames may contain more than one element in the near future.
(erc-button--perform-nick-popup): New default nick-button callback
function wrapping `erc-nick-popup' in order to adapt it to the
`erc-button-nickname-callback-function' interface.  (Bug#60933)
2023-08-15 16:47:20 -07:00
Stefan Kangas
c9fbd8950b Fix typo in pcomplete/sha512sum alias
* lisp/pcmpl-unix.el (pcomplete/sha512sum): Rename from
'pcomplete/sha521sum'.
2023-08-15 21:32:59 +02:00
Daniel Martín
26949819df ; lisp/progmodes/csharp-mode.el (treesit-query-capture): Declare (bug#65297). 2023-08-15 18:47:53 +03:00
Stefan Monnier
7ba76dc9c3 lisp/help-fns.el: Revert commit c12838c73e
* lisp/help-fns.el (help-fns--describe-function-or-command-prompt):
Don't allow specifying a non-existing function.
2023-08-15 10:21:51 -04:00
Eli Zaretskii
221ed70b90 ; Improve documentation of 'define-alternatives'
* doc/lispref/commands.texi (Generic Commands):
* lisp/simple.el (define-alternatives): Improve documentation of
'define-alternatives'.
2023-08-15 17:08:12 +03:00
Michael Albinus
5c101b1ada Some Tramp optimizations
* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Extend.  It shall return also some basic file attributes.
(tramp-bundle-read-file-names): Simplify data to be transferred.
(tramp-sh-handle-file-name-all-completions): Read additional attributes.
(tramp-sh-handle-expand-file-name): Check also "doas".
(tramp-bundle-read-file-names): Handle changed data layout.
(tramp-find-file-exists-command): Set "file-exists-p" file property.
2023-08-15 15:23:20 +02:00
Stefan Monnier
eba0f091d9 * lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159 2023-08-14 23:11:27 -04:00
Stefan Monnier
be5917c2ea cl-generic.el: Fix docstring for methods with cl-call-next-method
* lisp/emacs-lisp/cl-generic.el (cl--generic-method-info):
Fix docstring extraction for "curried" methods (bug#65270).
2023-08-14 22:38:01 -04:00
Eli Zaretskii
ef3c410018 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-08-14 18:10:00 +03:00
Eli Zaretskii
545f95d1a3 Fix slow "C-h f" in Emacs built without native compilation
* lisp/help-fns.el (help-fns--signature): Don't try calling
'comp-function-type-spec' if Emacs was built without native
compilation.  (Bug#65250)
2023-08-14 18:08:54 +03:00
Mattias Engdegård
33bcd4f2d2 Ignore ert-deftest body value
* lisp/emacs-lisp/ert.el (ert-deftest):
Since the return value of the body isn't going to be used, ignore
it explicitly so that the compiler can warn if we try to return
something anyway.  In particular, this exposes some comparisons
whose result weren't actually checked.
2023-08-14 17:03:44 +02:00
Andrea Corallo
cf3145a486 * Add missing alias to `native-comp-enable-subr-trampolines'.
* lisp/subr.el (native-comp-deferred-compilation): Alias to
native-comp-jit-compilation.
2023-08-14 15:48:53 +02:00
Andrea Corallo
922b649028 * Add missing alias to `native-comp-enable-subr-trampolines'.
* lisp/subr.el (comp-enable-subr-trampolines): Alias to
native-comp-enable-subr-trampolines.
2023-08-14 15:37:30 +02:00
Po Lu
cca14e0253 Correct touch screen event translation
* lisp/touch-screen.el (touch-screen-handle-point-up)
<mouse-drag>: Provide for situations where both the old and new
posns land on a special area of the window by comparing their
nominal row, column, and area.
2023-08-14 16:45:44 +08:00
Mattias Engdegård
dcaf424cb6 Revert "* lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Inhibit interaction"
This reverts commit bb9133f09d,
because it inadvertently made many tests fail.
2023-08-14 10:16:32 +02:00
Michael Albinus
b9b4d8689f Merge from origin/emacs-29
fdab7aaada ; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix ...
3eff53b456 Update to Org 9.6.7-13-g99cc96
2023-08-14 09:45:07 +02:00
Michael Albinus
fdab7aaada ; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix last change. 2023-08-14 09:42:43 +02:00
Kyle Meyer
3eff53b456 Update to Org 9.6.7-13-g99cc96 2023-08-13 22:11:45 -04:00
Stefan Monnier
bb9133f09d * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Inhibit interaction 2023-08-13 15:21:52 -04:00
LdBeth
14cd2a058e Fix auth-source-macos-keychain (bug#64977)
* lisp/auth-source.el (auth-source-macos-keychain-search)
(auth-source-macos-keychain-search-items): Fix handling of user
and port.

* test/lisp/auth-source-tests.el (test-macos-keychain-search): New test.
2023-08-13 18:31:47 +02:00
Michael Albinus
ba914bd9c9 Merge from origin/emacs-29
c42970d775 Handle last-coding-system-used in Tramp for all backends
ffafe38d03 Add 2 Welsh characters to iso-transl.el
2023-08-13 17:00:53 +02:00
Michael Albinus
c42970d775 Handle last-coding-system-used in Tramp for all backends
* lisp/net/tramp.el (tramp-skeleton-write-region):
Handle `last-coding-system-used'.
(tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Set `coding-system-used'.  (Bug#65022)

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
Move `last-coding-system-used' handling to
`tramp-skeleton-write-region'.
2023-08-13 16:48:00 +02:00
Stefan Kangas
6504b02662 Remove dead code in eshell/diff
* lisp/eshell/em-unix.el (eshell/diff): Adjust for diff-mode; do not
set 'compilation-finish-functions', as it is never used.  (Bug#65245)
(eshell-diff-quit): Make into an obsolete function alias for 'ignore';
the command has been a no-op for close to two decades.
(eshell-diff-window-config): Make obsolete.
2023-08-13 15:16:49 +02:00