1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

152305 commits

Author SHA1 Message Date
Stefan Monnier
5869bf55b2 * lisp/emacs-lisp/cl-macs.el (natnum): Define it as a type 2021-12-03 08:56:52 -05:00
Michael Albinus
d3eb3918d4 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-12-03 14:24:49 +01:00
Michael Albinus
7609924011 Adapt directory summary line handling in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not add or modify summary line when `dired-free-space' is bound.
2021-12-03 14:24:43 +01:00
Eli Zaretskii
1431fce67f Revert "Support display of non-ASCII characters with aligned columns"
This reverts commit 608267c71e.
2021-12-03 10:02:46 +02:00
Po Lu
ba063f8141 Send scroll stop events to xwidgets when built with XInput 2
* src/xwidget.c (xwidget_scroll): Set xg_event->scroll.is_stop
when appropriate.
2021-12-03 14:31:20 +08:00
Po Lu
1afa295aed Improve velocity calculation in momentum scrolling
* lisp/pixel-scroll.el
(pixel-scroll-precision-momentum-factor): Remove option.
(pixel-scroll-precision-initial-velocity-factor)
(pixel-scroll-precision-momentum-min-velocity): New user
options.
(pixel-scroll-accumulate-velocity): Clear velocity ring
if sign is different.
(pixel-scroll-calculate-velocity): Use current time.
(pixel-scroll-start-momentum): Use better algorithm.
2021-12-03 14:04:04 +08:00
Stefan Kangas
c66eb52453 Merge from origin/emacs-28
9c222b9c1a Port to C compilers that lack size-0 arrays
fed35a8951 Port emacsclient to Solaris 10
f35d6a9c73 * CONTRIBUTE: Improve commit message instructions
e0ee1d003a Work around IBM XL C compiler bug
6b99b6eb8b * admin/make-tarball.txt: Various clarifications.
bbf4140091 * admin/diff-tar-files: Don't assume .tar.gz.
0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
2021-12-03 06:30:26 +01:00
Paul Eggert
9c222b9c1a Port to C compilers that lack size-0 arrays
The C standard does not allow size-zero arrays, so redo struct
Lisp_Subr to not use size-zero arrays when native compilation is
not being used.  Formerly, the code was using size-zero arrays (a
GNU C extension) to avoid using memory unnecessarily when
HAVE_NATIVE_COMP is not defined.  Replace this hack with the
more-traditional hack of putting the relevant members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/alloc.c (cleanup_vector, mark_object):
* src/comp.c (make_subr):
* src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit):
* src/eval.c (init_eval_once, funcall_lambda):
* src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP)
(SUBR_TYPE):
* src/lread.c (Fload):
Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of
with ‘if (NATIVE_COMP_FLAG)’.  Redo members like native_comp_u[0]
to be plain native_comp_u.  Put all uses of these members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/lisp.h (struct Lisp_Subr): Members native_comp_u,
native_c_name, lambda_list, type are now all ifdeffed out if
HAVE_NATIVE_COMP is not defined, instead of being size-zero
arrays.  All uses changed.
* src/pdumper.c (dump_subr, dump_cold_native_subr)
(dump_do_dump_relocation):
* src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
2021-12-02 19:03:14 -08:00
Paul Eggert
fed35a8951 Port emacsclient to Solaris 10
Without this patch, the build fails on Solaris 10 with the diagnostic
“Undefined symbol acl_trivial first referenced in file
../lib/libgnu.a(file-has-acl.o)”.
* lib-src/Makefile.in (LIB_HAS_ACL): New macro.
(emacsclient${EXEEXT}): Link with $(LIB_HAS_ACL).
2021-12-02 18:45:05 -08:00
Karl Fogel
f35d6a9c73 * CONTRIBUTE: Improve commit message instructions 2021-12-02 20:38:25 -06:00
Paul Eggert
e0ee1d003a Work around IBM XL C compiler bug
* src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL
C for AIX, V12.1 (5765-J02, 5725-C72).  Without this patch, the
compiler incorrectly complains “Initialization between types "int"
and "struct timespec" is not allowed” and “Initialization between
types "long" and "struct timespec" is not allowed”.
2021-12-02 18:20:05 -08:00
Po Lu
67191f7eee Make momentum scrolling much nicer
* lisp/pixel-scroll.el (pixel-scroll-precision-momentum-tick):
Set default value to 0.01.
(pixel-scroll-precision-momentum-seconds): New user option.
(pixel-scroll-start-momentum): Improvements to momentum
algorithm.
2021-12-03 10:12:29 +08:00
Po Lu
ef2c386829 * lisp/pixel-scroll.el (pixel-scroll-start-momentum): Fix algorithm. 2021-12-03 08:59:24 +08:00
Stefan Kangas
6b99b6eb8b * admin/make-tarball.txt: Various clarifications. 2021-12-03 00:13:00 +01:00
Stefan Kangas
bbf4140091 * admin/diff-tar-files: Don't assume .tar.gz. 2021-12-02 23:54:01 +01:00
Michael Albinus
f5f5297a92 * etc/NEWS: Mention change in `insert-directory' derivates. Fix typos. 2021-12-02 19:31:43 +01:00
Juri Linkov
0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
* test/lisp/tab-bar-tests.el: New file.
(tab-bar-tests-close-other-tabs-with-arg): Test for regression
that closed the selected tab after selecting it.
2021-12-02 20:12:05 +02:00
Eli Zaretskii
8203c2cd30 ; * src/xdisp.c (syms_of_xdisp) <align-columns-display>: Doc fix. 2021-12-02 19:46:26 +02:00
Eli Zaretskii
608267c71e Support display of non-ASCII characters with aligned columns
* src/xdisp.c (get_normal_width): New function.
(gui_produce_glyphs): Use 'get_normal_width' to widen on display
characters whose width is not an integral multiple of the
"standard" width.
(syms_of_xdisp) <align-columns-display>: New boolean variable.
2021-12-02 19:44:46 +02:00
Stefan Kangas
a8bfdf2efc update_autogen: Improve error handling slightly
* admin/update_autogen: Check exit status of cd.  Use single
quoting for trap condition.
2021-12-02 18:32:54 +01:00
Stefan Kangas
db56f2c264 update_autogen: Remove unused -H flag
We now update ChangeLog files only when preparing a new release, so
this flag is never used.  Keeping it risks confusing more than it
helps.
* admin/update_autogen: Remove the -H flag as it is no longer used.
2021-12-02 18:21:21 +01:00
Stefan Kangas
cf49f6ef65 ; update_autogen: Remove -I flag handling completely
* admin/update_autogen: Fix my previous commit to now completely
remove any trace of the -I flag.
2021-12-02 18:18:25 +01:00
Stefan Kangas
48d1e6e9d9 Merge from origin/emacs-28
f38dfa56a0 ; Update loaddefs files.
b3d4b18507 ; make change-history-commit
334ff0232e * lisp/repeat.el: Use same logic for repeat-check-key and ...
8230a47ecc * lisp/help.el (help--analyze-key): Prefer posn-set-point ...

# Conflicts:
#	lisp/ldefs-boot.el
2021-12-02 17:34:10 +01:00
Stefan Kangas
8ff1a9d00b ; Merge from origin/emacs-28
The following commit was skipped:

740ae2818f Bump Emacs version to 28.0.90
2021-12-02 17:34:10 +01:00
Stefan Kangas
fa2e812894 Merge from origin/emacs-28
aa1d7dd867 ; * etc/AUTHORS: Update.
6294e60205 ; * admin/authors.el (authors-aliases): More fixes.
40fc31ea28 ; * ChangeLog.3: Update.
2be090d5d3 ; * ChangeLog.3: Minor fixes.
9963b11bf7 ; * admin/authors.el (authors-aliases): Further updates.
50b40e1d4f ; * lisp/org/ob-julia.el: Fix Author header for authors.el.
84166ea2e6 CC Mode: Recognise "struct foo {" as introducing a type de...
2021-12-02 17:34:10 +01:00
Lars Ingebrigtsen
a97fce7a89 Fix characters.el build issue
* lisp/international/characters.el
(glyphless--bidi-control-characters): Don't use names here,
because it's too early (bug#52240).
2021-12-02 17:33:00 +01:00
Lars Ingebrigtsen
4c7faf3377 Fix previous macroexp--warn-wrap change
* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): Don't call
byte-compile-warning-enabled-p with zero parameters.
2021-12-02 16:47:49 +01:00
Filipp Gunbin
c469efbd83 * lisp/gnus/gnus-art.el (gnus--variable-pitch-p): Don't error out if face nil 2021-12-02 16:15:32 +03:00
Lars Ingebrigtsen
9ea5a915bd Make `C-c C-w' copy the executable bits to the new file
* lisp/files.el (write-file): When visiting an executable file,
make the new file executable, too (bug#18915).
2021-12-02 13:21:53 +01:00
Lars Ingebrigtsen
a516ab79c3 Add a new variable 'process-error-pause-time'
* doc/lispref/processes.texi (Asynchronous Processes): Document it.
* lisp/cus-start.el (standard): Customize.

* src/process.c (read_process_output_error_handler)
(exec_sentinel_error_handler): Use it.
(syms_of_process): New variable process-error-pause-time (bug#19457).
2021-12-02 13:21:53 +01:00
Po Lu
d45e72fe5a Improve momentum scrolling algorithm
* lisp/pixel-scroll.el (pixel-scroll-precision-momentum-tick):
(pixel-scroll-precision-momentum-factor): New user options.

(pixel-scroll-kinetic-state, pixel-scroll-accumulate-velocity):
Set scroll momentum ring size to 10.

(pixel-scroll-start-momentum): Improve algorithm.
2021-12-02 19:36:33 +08:00
Eli Zaretskii
aa6a05c146 Fix display of free disk space in Dired
* lisp/dired.el (dired--insert-disk-space): Fix 'first' display on
MS-Windows.
(dired-free-space): Clarify the meaning of 'first'.
2021-12-02 13:04:45 +02:00
Eli Zaretskii
e2494bdaee ; * lisp/dired-x.el (dired-virtual): Doc fix. (Bug#20992) 2021-12-02 12:43:51 +02:00
Eli Zaretskii
dfc7338828 ; * lisp/international/characters.el: Fix a typo in last change. 2021-12-02 12:34:37 +02:00
Eli Zaretskii
6927841ecb Fix recent changes related to 'glyphless-display-mode'
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Fix
spelling of "bidirectional".
* lisp/international/characters.el (char-acronym-table): Fix
acronyms for LRI and RLI: use their accepted shorthands.
(glyphless-char-display-control): Fix spelling of doc string.

* doc/lispref/display.texi (Glyphless Chars): Fix spelling and add
a cross-reference.
2021-12-02 12:32:17 +02:00
Lars Ingebrigtsen
3f98188b86 Make dired-virtual doc string less confusing
* lisp/dired-x.el (dired-virtual): Make the doc string less
confusing (bug#20992).
2021-12-02 10:47:18 +01:00
Lars Ingebrigtsen
7ca865dc52 Add `cl-constantly' function
* lisp/emacs-lisp/cl-lib.el (cl-constantly): Add Common Lisp
function missing (bug#21584).
2021-12-02 10:19:10 +01:00
Jim Porter
5db380abad Ensure there are no duplicate separators when creating a context menu
Previously, if there were three or more consecutive menu separators,
not all of them would be removed.

* lisp/mouse.el (context-menu-map): Ensure no duplicate separators
(bug#52237).
2021-12-02 09:23:06 +01:00
Daniel Fleischer
d353c08d2b browse-url-button-regexp: Recognize gemini: links
Gemini is a relatively new text-based web protocol, similar to
gopher. There's the "elpher" package to browse gopher and gemini
pages. Adding it to the regexp will make Emacs be aware of gemini links,
e.g. in ERC.

* lisp/net/browse-url.el (browse-url-button-regexp): Add support
for the gemini: URL type.
2021-12-02 09:11:21 +01:00
Michael Levine
20ab7e07af Fix usage of deprecated syntax in some cedet tests
* test/lisp/cedet/srecode/fields-tests.el
(srecode-field-utest-impl): Fix deprecated syntax.
2021-12-02 09:06:19 +01:00
Lars Ingebrigtsen
35075267a6 Add a bidi-control target for `glyphless-char-display-control'
* doc/lispref/display.texi (Glyphless Chars): Document bidi-control.

* lisp/international/characters.el (char-acronym-table): Add the
ISOLATE characters.
(update-glyphless-char-display): Implement bidi-control, and mark
all Cf characters we don't know about as UNK.
(glyphless--bidi-control-characters): New variable.
(glyphless-char-display-control): Add a new type -- bidi-control.

* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Add a
new type -- bidi-control.
2021-12-02 08:31:37 +01:00
Stefan Monnier
aaf0e62048 * lisp/cedet/semantic/bovine/c.el (semantic-tag-protection): Silence warning
We used to get

    cedet/semantic/bovine/c.el:1462:25: Warning: value returned from
    (string= s "static") is unused

* lisp/cedet/semantic/bovine/c.el (semantic-tag-protection): Merge two
`when` into an `if` and set `prot` instead of throwing away a result.
Use `pcase` while we're at it.
2021-12-01 22:59:35 -05:00
Stefan Monnier
c6dd8dd223 * lisp/emacs-lisp/macroexp.el: Improve last change
Don't burp when `byte-compile-warning-enabled-p` is not yet defined.
And use the call that we had already instead of adding a new one.

(macroexp--warn-wrap): Allow `category`
to be a list to pass to `byte-compile-warning-enabled-p`.
(macroexp-macroexpand): Simplify accordingly.
2021-12-01 22:51:55 -05:00
Po Lu
603bdc8d38 Add some primitive momentum-based precision scrolling
The algorithm used to scroll the display kinetically is very
simple and needs improvement.  Someone should work on that
eventually.

* lisp/pixel-scroll.el (pixel-scroll-precision-use-momentum):
New user option.
(pixel-scroll-precision-mode-map): Add
`pixel-scroll-start-momentum'.
(pixel-scroll-kinetic-state):
(pixel-scroll-accumulate-velocity):
(pixel-scroll-calculate-velocity): New functions.
(pixel-scroll-start-momentum): New command.

* src/xterm.c (handle_one_xevent): Fix touch-end event
generation.
2021-12-02 11:01:59 +08:00
Po Lu
5001f4f91b Add `touch-end' event type
* etc/NEWS:
* doc/lispref/commands.texi (Misc Events): Document new
`touch-end' event type.

* lisp/bindings.el: Ignore touch-end events by default.

* src/keyboard.c (make_lispy_event): Add support for
TOUCH_END_EVENT events.
(syms_of_keyboard): New symbol `touch-end'.

* src/termhooks.h (enum event_kind): New member
`TOUCH_END_EVENT'.

* src/xterm.c (handle_one_xevent): Send touch-end events when
appropriate.
2021-12-02 10:27:24 +08:00
Po Lu
a4ff841154 Fix precision scrolling when there is a scroll margin
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down)
(pixel-scroll-precision-scroll-up): Take scroll margin into
accout.
2021-12-02 09:56:52 +08:00
Po Lu
01a6c0b409 Get rid of vmotion loop in `pixel-scroll-precision-scroll-up'
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up): Use
posn-at-x-y for cursor motion.
2021-12-02 09:15:43 +08:00
Lars Ingebrigtsen
1914d946d6 Change how Dired displays available space
* doc/emacs/dired.texi (Misc Dired Features): Document it (bug#23812).
* lisp/dired.el (dired-free-space): New user option.
(dired-insert-directory): Use it from here.
(dired--insert-disk-space): New function that uses the user option.

* lisp/files.el (insert-directory): Don't transform "total" here.
* lisp/ls-lisp.el (ls-lisp--insert-directory): Or here.  Instead
just leave the "total <num>" bit alone, and let Dired transform it.

* test/lisp/files-tests.el (files-tests): Move "available" tests
to dired-tests.
* test/lisp/dired-tests.el (data-dir): Moved here.
2021-12-01 23:27:19 +01:00
Lars Ingebrigtsen
ed7591c905 Fix "SEE ALSO" buttons in some man pages
* lisp/man.el (Man-highlight-references0): Don't include "and" in
the links (bug#52229).
2021-12-01 23:27:19 +01:00
Andrea Corallo
fd86829e66 Make use of `comp-cstr-shallow-copy'
* lisp/emacs-lisp/comp.el (comp-mvar-propagate): Remove.
(comp-fwprop-call, comp-fwprop-insn): Use `comp-cstr-shallow-copy'.

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range)
(comp-cstr-union-1-no-mem, comp-cstr-union-1)
(comp-cstr-intersection-no-mem, comp-cstr-intersection)
(comp-cstr-negation): Use `comp-cstr-shallow-copy'.
2021-12-01 22:21:04 +01:00