]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMerge remote-tracking branch 'origin/master' into feature/pkg
Gerd Möllmann [Tue, 25 Oct 2022 08:31:23 +0000 (10:31 +0200)]
Merge remote-tracking branch 'origin/master' into feature/pkg

2 years agoFix byte-compiler warning in do-symbols
Gerd Möllmann [Tue, 25 Oct 2022 07:55:56 +0000 (09:55 +0200)]
Fix byte-compiler warning in do-symbols

* lisp/emacs-lisp/pkg.el (do-symbols): Make VAR used when evaluating
RESULT-FORM.

2 years agoFix warnings in pkg.el
Gerd Möllmann [Tue, 25 Oct 2022 07:31:58 +0000 (09:31 +0200)]
Fix warnings in pkg.el

2 years agoReset symbol home packages
Gerd Möllmann [Tue, 25 Oct 2022 06:50:11 +0000 (08:50 +0200)]
Reset symbol home packages

* lisp/emacs-lisp/pkg.el (delete-package): Set the package of
symbols whose home package is the deleted package to nil.
* test/src/pkg-tests.el (pkg-tests-delete-package):
(pkg-tests-use-package): Modify because we don't have export yet.

2 years agolkjlkj
Gerd Möllmann [Tue, 25 Oct 2022 06:48:21 +0000 (08:48 +0200)]
lkjlkj

* src/pkg.c (pkg_find_symbol): Simplify.
(Fpackage_percent_set_name): Prevent changing the name of standard
packages.
(Fpackage_percent_set_symbol_package): Allow nil for packages.

2 years agoPrint symbols habing a deleted home package
Gerd Möllmann [Tue, 25 Oct 2022 06:44:58 +0000 (08:44 +0200)]
Print symbols habing a deleted home package

This can't happen in normal circumstances, but it might while
working on the package implementation itself.

* src/print.c (print_symbol): Handle symbol-packages that are
deleted, that is have a nil home package.
* src/lisp.h (PACKAGE_USE_LIST): New macro.

2 years ago* lisp/progmodes/compile.el (compilation-mode-line-errors): Use `defvar`
Stefan Monnier [Mon, 24 Oct 2022 18:25:02 +0000 (14:25 -0400)]
* lisp/progmodes/compile.el (compilation-mode-line-errors): Use `defvar`

This is not really a constant, e.g. it's modified in `grep.el`.

2 years agoFix error with ImageMagick
Gerd Möllmann [Mon, 24 Oct 2022 16:37:37 +0000 (18:37 +0200)]
Fix error with ImageMagick

* src/image.c (imagemagick_filename_hint): Don't assume QCformat
is available.

2 years ago; * doc/lispref/searching.texi (Rx Constructs): Copy-edit.
Mattias Engdegård [Mon, 24 Oct 2022 13:57:39 +0000 (15:57 +0200)]
; * doc/lispref/searching.texi (Rx Constructs): Copy-edit.

2 years agoUnbreak the build broken by tab-bar.el changes
Eli Zaretskii [Mon, 24 Oct 2022 13:43:47 +0000 (16:43 +0300)]
Unbreak the build broken by tab-bar.el changes

Without this change, compiling tab-bar.el errors out:
In tab-bar--load-buttons:
tab-bar.el:161:18: Warning: reference to free variable `tab-bar-new'
tab-bar.el:174:6: Error: `define-icon' defined after use in
(define-icon tab-bar-close nil (cons (cons 'image
(cons "tabs/close.xpm"
(cons :margin (cons tab-bar-button-margin '(:ascent center)))))
'((text " x"))) "Icon for closing the clicked tab."
:version "29.1" :help-echo "Click to close tab")
(missing `require' of a library file?)
tab-bar.el:174:18: Warning: reference to free variable `tab-bar-close'
* lisp/tab-bar.el (eval-when-compile): Require 'icons.

2 years agoshodow
Gerd Möllmann [Mon, 24 Oct 2022 13:39:05 +0000 (15:39 +0200)]
shodow

* lisp/emacs-lisp/pkg.el (package-shadowing-symbols): Implement.
(shadow): Implement.
* src/pkg.c (Fpackage_percent_set_symbol_package): New function.
(syms_of_pkg): defsubr it.
* test/src/pkg-tests.el (pkg-tests-use-package): Fix byte compiler
warning.

2 years ago* doc/lispref/searching.texi (Rx Constructs): Elaborate intent.
Mattias Engdegård [Mon, 24 Oct 2022 12:46:24 +0000 (14:46 +0200)]
* doc/lispref/searching.texi (Rx Constructs): Elaborate intent.

Suggested by Michael Heerdegen (bug#58727).

2 years agodo-symbols, do-external-symbols, do-all-symbols
Gerd Möllmann [Mon, 24 Oct 2022 11:32:20 +0000 (13:32 +0200)]
do-symbols, do-external-symbols, do-all-symbols

* lisp/emacs-lisp/pkg.el (do-symbols): New macro.
(do-external-symbols): New macro.
(do-all-symbols): New macro.

2 years agoFix focus stealing in the Emacs server for old window managers
Po Lu [Mon, 24 Oct 2022 11:18:17 +0000 (19:18 +0800)]
Fix focus stealing in the Emacs server for old window managers

* src/xterm.c (x_focus_frame): Apply focus stealing preference
to non-EWMH focus as well.  Otherwise frames get raised but not
focused.

2 years agoClarify RX... semantics in manual (bug#58727)
Mattias Engdegård [Mon, 24 Oct 2022 10:35:47 +0000 (12:35 +0200)]
Clarify RX... semantics in manual (bug#58727)

Suggested by Michael Heerdegen.

* doc/lispref/searching.texi (Rx Constructs): Explain implicit
concatenation of `RX...`.

2 years agoRepair nXML handling of URIs with hex escapes (bug#58718)
Martin Jerabek [Mon, 24 Oct 2022 10:02:20 +0000 (12:02 +0200)]
Repair nXML handling of URIs with hex escapes (bug#58718)

Copyright-paperwork-exempt: yes

* lisp/nxml/rng-uri.el (rng-uri-file-name-1): Add missing backslashes.
(rng-uri-unescape-unibyte, rng-uri-unescape-unibyte-match):
Convert hex-encoded character to string.

2 years agoFix regexp matching with atomic strings and optimised backtracking
Mattias Engdegård [Sun, 23 Oct 2022 13:40:37 +0000 (15:40 +0200)]
Fix regexp matching with atomic strings and optimised backtracking

This bug occurs when an atomic pattern is matched at the end of
a string and the on-failure-keep-string-jump optimisation is
in effect, as in:

  (string-match "\\'\\(?:ab\\)*\\'" "a")

which succeeded but clearly should not (bug#58726).

Reported by Michael Heerdegen.

* src/regex-emacs.c (PREFETCH): Add reset parameter.
(re_match_2_internal): Use it for proper atomic pattern treatment.
* test/src/regex-emacs-tests.el (regexp-atomic-failure): New test.

2 years agoPrepare for testing find-symbol
Gerd Möllmann [Mon, 24 Oct 2022 08:59:13 +0000 (10:59 +0200)]
Prepare for testing find-symbol

* src/pkg.c (pkg_find_symbol1): Remove.
(pkg_find_symbol): Lookup symbols differently.
* lisp/emacs-lisp/pkg.el: Prepare for find-symbol tests.
* test/src/pkg-tests.el (pkg-tests-use-package): New.

2 years agoRemove erroneous @w in yank-media cross ref
Robert Pluim [Fri, 21 Oct 2022 07:48:00 +0000 (09:48 +0200)]
Remove erroneous @w in yank-media cross ref

I added this by mistake, there's actually no need to keep the cross
ref on the same line.

* doc/emacs/killing.texi (Clipboard): Remove @w around @pxref.

2 years ago* lisp/tab-bar.el: Use customizable button icons (bug#51309, bug#51648)
Juri Linkov [Mon, 24 Oct 2022 07:33:41 +0000 (10:33 +0300)]
* lisp/tab-bar.el: Use customizable button icons (bug#51309, bug#51648)

* lisp/tab-bar.el (tab-bar--load-buttons): Use 'define-icon' to
define icons for tab-bar-new, tab-bar-close, tab-bar-menu-bar.
Also set tab-bar-new-button, tab-bar-close-button, tab-bar-menu-bar-button
to the specified icon-string.
(tab-bar-history-mode): Use 'define-icon' to
define icons for tab-bar-back, tab-bar-forward.
Also set tab-bar-back-button, tab-bar-forward-button
to the specified icon-string.

* lisp/emacs-lisp/icons.el (icons--create)<image>: Allow to easy
add new image props by using 'apply' on them.  Add :margin.

2 years ago* lisp/minibuffer.el (completions-group-separator): Update :version.
Juri Linkov [Mon, 24 Oct 2022 07:22:37 +0000 (10:22 +0300)]
* lisp/minibuffer.el (completions-group-separator): Update :version.

2 years ago* lisp/outline.el: Pre-compute some frequent data for button icons (bug#57813)
Juri Linkov [Sun, 23 Oct 2022 16:54:31 +0000 (19:54 +0300)]
* lisp/outline.el: Pre-compute some frequent data for button icons (bug#57813)

(outline--button-icons): New buffer-local variable.
(outline-minor-mode): Set outline--button-icons.
Unify overlay name 'outline-margin' with 'outline-button'.
(outline--make-button-overlay, outline--make-margin-overlay)
(outline--insert-open-button, outline--insert-close-button): Remove functions.
(outline--create-button-icons, outline--insert-button): New functions
with code refactored from old functions.  Add more support for icon faces.
(outline--fix-up-all-buttons): Use outline--insert-button.
(outline--fix-buttons-after-change): Unify overlay name
'outline-margin' with 'outline-button'.

* lisp/minibuffer.el (completions-group-separator): Change face
attribute :strike-through to :underline.

2 years agoMore work on Lisp and tests
Gerd Möllmann [Sun, 23 Oct 2022 11:21:25 +0000 (13:21 +0200)]
More work on Lisp and tests

2 years agoOngoing work on the Lisp side and tests
Gerd Möllmann [Sun, 23 Oct 2022 10:21:55 +0000 (12:21 +0200)]
Ongoing work on the Lisp side and tests

2 years agoUncomment tests after fixing bug#58714
Gerd Möllmann [Sun, 23 Oct 2022 08:25:33 +0000 (10:25 +0200)]
Uncomment tests after fixing bug#58714

2 years agoFix &key parameters called without arguments (bug#58714)
Gerd Möllmann [Sun, 23 Oct 2022 08:14:10 +0000 (10:14 +0200)]
Fix &key parameters called without arguments (bug#58714)

* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.

2 years agoOne more place with ":..." in C strings
Gerd Möllmann [Sun, 23 Oct 2022 07:40:44 +0000 (09:40 +0200)]
One more place with ":..." in C strings

* src/font.c (font_unparse_fcname): Use LISP_SYMBOL_NAME.
(font_filter_properties): Use LISP_SYMBOL_NAME.

2 years agoFix error opening Gnus gmail imap connection
Gerd Möllmann [Sun, 23 Oct 2022 07:21:30 +0000 (09:21 +0200)]
Fix error opening Gnus gmail imap connection

The error is caused by comparing names of (possibly) keyword symbols
with a table of symbols names containing ":" for symbol names.

* src/process.c (set_socket_option): Use LISP_SYMBOL_NAME.

2 years agoReduce duplicate code for creating "special windows"
Po Lu [Sun, 23 Oct 2022 06:12:02 +0000 (14:12 +0800)]
Reduce duplicate code for creating "special windows"

* src/xterm.c (x_create_special_window): Define on all non-GTK
builds and all builds with XFixes.
(x_update_frame_user_time_window): Use x_create_special_window.
Also write a comment explaining what user time windows are.
* src/xterm.h: Fix style of `x_parse_color' prototype.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 23 Oct 2022 04:31:19 +0000 (06:31 +0200)]
Merge from origin/emacs-28

f1f4a0c9d2 ; * doc/lispref/display.texi (Progress): Correct typo.  (B...

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 23 Oct 2022 04:31:19 +0000 (06:31 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

ee9a9fbf0f ; cperl-mode.el: Fix one match-count in my commit 2021-09-14

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 23 Oct 2022 04:31:19 +0000 (06:31 +0200)]
Merge from origin/emacs-28

626525c29f ; Remove reference to non-existent Flymake function from m...

2 years agoImprove error reporting of EUDC plist functions
Basil L. Contovounesios [Sat, 22 Oct 2022 17:25:54 +0000 (20:25 +0300)]
Improve error reporting of EUDC plist functions

* lisp/net/eudc.el (eudc--plist-member): Signal a more
informative wrong-type-argument instead of a generic error
(bug#58531#19, bug#58720).
* test/lisp/net/eudc-tests.el (eudc--plist-member)
(eudc-plist-member, eudc-plist-get, eudc-lax-plist-get):
Update tests accordingly.

2 years ago; * doc/emacs/text.texi (Outline Mode): Fix markup and wording.
Eli Zaretskii [Sat, 22 Oct 2022 19:05:50 +0000 (22:05 +0300)]
; * doc/emacs/text.texi (Outline Mode): Fix markup and wording.

2 years ago* lisp/outline.el: Use 'outline-cycle' on buttons for 'RET' like 'TAB' uses.
Juri Linkov [Sat, 22 Oct 2022 18:57:40 +0000 (21:57 +0300)]
* lisp/outline.el: Use 'outline-cycle' on buttons for 'RET' like 'TAB' uses.

(outline--make-button-overlay, outline--make-margin-overlay):
Use overlay keymap where RET and mouse-2 are bound to outline-cycle.
(outline--insert-open-button, outline--insert-close-button):
Move overlay keymap to outline--make-button-overlay and replace
bindings outline-hide-subtree/outline-show-subtree with outline-cycle.

2 years agoUnify outline-minor-mode-use-buttons with in-margins/insert values (bug#57813)
Juri Linkov [Sat, 22 Oct 2022 18:37:56 +0000 (21:37 +0300)]
Unify outline-minor-mode-use-buttons with in-margins/insert values (bug#57813)

* doc/emacs/text.texi (Outline Mode): Remove outline-minor-mode-use-margins.
Document the values insert/in-margins of outline-minor-mode-use-buttons.

* lisp/help.el (describe-bindings):
Set outline-minor-mode-use-buttons to 'insert'.

* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Set outline-minor-mode-use-buttons to 'in-margins'.

* lisp/outline.el (outline-minor-mode-use-buttons): Change :type
from 'buffer-predicate' to choice of const values nil/in-margins/t.
(outline--use-buttons, outline-minor-mode-insert-buttons)
(outline-minor-mode-use-margins, outline--use-margins): Remove variables.
(outline-minor-mode-highlight-buffer): Change overlay name
'outline-overlay' to 'outline-highlight'.
(outline-minor-mode): Simplify to handle possible values of
'outline-minor-mode-use-buttons' instead of using many variables.
(outline--make-button-overlay): Use value 'insert' of
'outline-minor-mode-use-buttons'.
(outline--insert-open-button, outline--insert-close-button)
(outline--fix-up-all-buttons, outline--fix-buttons-after-change):
Handle values of outline-minor-mode-use-buttons instead of using
many variables.

2 years ago* lisp/info.el (Info-toc-build): Remove message not needed anymore (bug#58634)
Juri Linkov [Sat, 22 Oct 2022 17:46:10 +0000 (20:46 +0300)]
* lisp/info.el (Info-toc-build): Remove message not needed anymore (bug#58634)

2 years agoAudit some plist uses with new predicate argument
Basil L. Contovounesios [Sat, 20 Aug 2022 13:32:33 +0000 (16:32 +0300)]
Audit some plist uses with new predicate argument

* doc/lispref/lists.texi (Plist Access): Improve description of
default predicate.
* lisp/emacs-lisp/cl-extra.el (cl-getf, cl--set-getf): Assume
plist-member always returns a cons.
* lisp/emacs-lisp/gv.el (plist-get): Support new optional predicate
argument (bug#47425#91).
* lisp/emacs-lisp/map.el: Bump minor version.
(map--dispatch): Remove now that bug#58563 is fixed.  Break two
remaining uses out into corresponding cl-defmethods.
(map--plist-p): Add docstring.
(map--plist-has-predicate, map--plist-member-1, map--plist-member)
(map--plist-put-1, map--plist-put): New definitions for supporting
predicate argument backward compatibly.
(map-elt): Fix generalized variable getter under a
predicate (bug#58531).  Use predicate when given a plist.
(map-put): Avoid gratuitous warnings when called without the hidden
predicate argument.  Improve obsoletion message.
(map-put!): Use predicate when given a plist.
(map-contains-key): Ditto.  Declare forgotten
advertised-calling-convention (bug#58531#19).
(map--put): Group definition in file together with that of map-put!.
* lisp/files-x.el (connection-local-normalize-criteria): Simplify
using mapcan + plist-get.
* lisp/net/eudc.el (eudc--plist-member): New convenience function.
(eudc-plist-member, eudc-plist-get, eudc-lax-plist-get): Use it
instead of open-coding plist-member.
* src/fns.c (Fplist_get, plist_get, Fplist_put, plist_put): Pass the
plist element as the first argument to the predicate, for
consistency with assoc + alist-get.
(Fplist_member, plist_member): Move from widget to plist section.
Open-code the EQ case in plist_member, and call it from
Fplist_member in that case, rather than the other way around.

* test/lisp/apropos-tests.el (apropos-tests-format-plist): Avoid
polluting obarray.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-getf): Extend test with
generalized variables, degenerate plists, and improper lists.
* test/lisp/emacs-lisp/gv-tests.el: Byte-compile file; in the
meantime bug#24402 seems to have been fixed or worked around.
(gv-setter-edebug): Inhibit printing messages.
(gv-plist-get): Avoid modifying constant literals.  Also test with a
predicate argument.
* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Simplify
docstring.
(test-map-elt-testfn): Rename...
(test-map-elt-testfn-alist): ...to this.  Also test with a predicate
argument.
(test-map-elt-testfn-plist, test-map-elt-gv, test-map-elt-signature)
(test-map-put!-plist, test-map-put!-signature)
(test-map-contains-key-signature, test-map-plist-member)
(test-map-plist-put): New tests.
(test-map-contains-key-testfn): Also test with a predicate argument.
(test-map-setf-alist-overwrite-key, test-map-setf-plist-insert-key)
(test-map-setf-plist-overwrite-key): Avoid modifying constant
literals.
(test-hash-table-setf-insert-key)
(test-hash-table-setf-overwrite-key): Fix indentation.
(test-setf-map-with-function): Make test more precise.
* test/lisp/net/eudc-tests.el: New file.
* test/lisp/subr-tests.el (test-plistp): Extend test with circular
list.
* test/src/fns-tests.el (test-cycle-equal, test-cycle-nconc): Move
from plist section to circular list section.
(plist-put/odd-number-of-elements): Avoid modifying constant
literals.
(plist-member/improper-list): Simplify.
(test-plist): Move to plist section.  Also test with a predicate
argument.

2 years agoFix some pkg-tests
Gerd Möllmann [Sat, 22 Oct 2022 13:23:30 +0000 (15:23 +0200)]
Fix some pkg-tests

Don't define tests that consist of should nil only.  Don't assume
packages are registered by make-package.

2 years agoFixes in package functions
Gerd Möllmann [Sat, 22 Oct 2022 13:21:40 +0000 (15:21 +0200)]
Fixes in package functions

* lisp/emacs-lisp/pkg.el (pkg-stringify-names): De-duplicate names.
(delete-package): Unregister package.

2 years agoImprove Lisp interface on the C side of packages
Gerd Möllmann [Sat, 22 Oct 2022 13:20:46 +0000 (15:20 +0200)]
Improve Lisp interface on the C side of packages

* src/pkg.c (Fpackage_percent_set_name): Allow nil as name.
(Fpackage_percent_register): Return the package.

2 years agoFurther fixes to menu event processing on no-toolkit builds
Po Lu [Sat, 22 Oct 2022 12:15:22 +0000 (20:15 +0800)]
Further fixes to menu event processing on no-toolkit builds

* src/xdisp.c (note_mouse_highlight): Return if a popup is
activated under the no-toolkit build as well.
* src/xmenu.c (pop_down_menu): Clear popup_activated_flag when
not on MS-DOS.
(x_menu_show): Set popup_activated_flag under X.

2 years agoExpose package-%register to Lisp
Gerd Möllmann [Sat, 22 Oct 2022 11:06:57 +0000 (13:06 +0200)]
Expose package-%register to Lisp

* src/pkg.c (Fpackage_percent_register): New DEFUN.
(syms_of_pkg): defsubr it.

2 years agoMark module--test-assertions--call-emacs-from-gc unstable
Gerd Möllmann [Sat, 22 Oct 2022 10:50:56 +0000 (12:50 +0200)]
Mark module--test-assertions--call-emacs-from-gc unstable

This test succeeds for me with --enable-checking and fails otherwise
with a segfault.  See also comment there.

* test/src/emacs-module-tests.el
(module--test-assertions--call-emacs-from-gc): Mark unstable
if feature symbol-packages is present.

2 years agoRemove an invalid eassert
Gerd Möllmann [Sat, 22 Oct 2022 10:35:55 +0000 (12:35 +0200)]
Remove an invalid eassert

* src/pkg.c (pkg_emacs_intern): Don't assert that symbol names
can never start with a colon.

2 years ago* admin/notes/repo: Document feature and scratch branches.
Stefan Kangas [Sat, 22 Oct 2022 10:15:49 +0000 (12:15 +0200)]
* admin/notes/repo: Document feature and scratch branches.

2 years agoAdd tests for packagep and package-name
Stefan Kangas [Sat, 22 Oct 2022 09:48:20 +0000 (11:48 +0200)]
Add tests for packagep and package-name

* test/src/pkg-tests.el (pkg-tests-packagep)
(pkg-tests-package-name): New tests.
(pkg-tests-list-all-packages): Expand test.

2 years agoFix cl-intern/cl-unintern tests
Stefan Kangas [Fri, 21 Oct 2022 06:13:25 +0000 (08:13 +0200)]
Fix cl-intern/cl-unintern tests

* test/src/pkg-tests.el (pkg-tests-cl-intern)
(pkg-tests-cl-unintern): Fix tests.

2 years ago* src/lisp.h (pkg_error): Fix GCC warning in declaration.
Stefan Kangas [Fri, 21 Oct 2022 06:12:59 +0000 (08:12 +0200)]
* src/lisp.h (pkg_error): Fix GCC warning in declaration.

2 years agoFix priting of :1
Gerd Möllmann [Sat, 22 Oct 2022 07:26:07 +0000 (09:26 +0200)]
Fix priting of :1

* src/print.c (print_symbol_name, print_symbol): Don't check for
symbol names looking like a number when we have already printed a
package prefix.
* test/src/editfns-tests.el (format-%s-keywords): Test for :1.

2 years agoMake format %s for keywords compatible
Gerd Möllmann [Sat, 22 Oct 2022 06:48:02 +0000 (08:48 +0200)]
Make format %s for keywords compatible

* src/editfns.c (styled_format): Use LISP_SYMBOL_NAME.

2 years agoAdd test for format %s with keywords
Gerd Möllmann [Sat, 22 Oct 2022 06:29:48 +0000 (08:29 +0200)]
Add test for format %s with keywords

* test/src/editfns-tests.el (format-%s-keywords): New test.

2 years ago; Improve manual for Tramp kubernetes method
Filipp Gunbin [Fri, 21 Oct 2022 18:21:54 +0000 (21:21 +0300)]
; Improve manual for Tramp kubernetes method

* doc/misc/tramp.texi (Inline methods): Add note about cache reset.

2 years ago; * doc/lispref/display.texi (Progress): Correct typo. (Bug#58674)
Matt Armstrong [Fri, 21 Oct 2022 03:56:03 +0000 (20:56 -0700)]
; * doc/lispref/display.texi (Progress): Correct typo.  (Bug#58674)

2 years ago; * src/menu.c (x_popup_menu_1): Make 'cancel_hourglass' call conditional.
Eli Zaretskii [Fri, 21 Oct 2022 16:05:48 +0000 (19:05 +0300)]
; * src/menu.c (x_popup_menu_1): Make 'cancel_hourglass' call conditional.

2 years agoMake lisp/progmodes/elisp-mode-tests succeed
Gerd Möllmann [Fri, 21 Oct 2022 15:35:56 +0000 (17:35 +0200)]
Make lisp/progmodes/elisp-mode-tests succeed

Shorthands are not supported with packages.  Add :expected-result
accordingly.

* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer):
(elisp-shorthand-read-from-string):
(elisp-shorthand-load-a-file):
(elisp-shorthand-byte-compile-a-file):
(elisp-shorthand-completion-at-point):
(elisp-shorthand-escape):
(elisp-dont-shadow-punctuation-only-symbols): Expect to fail
if (featurep 'symbol-packages).

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 21 Oct 2022 15:29:05 +0000 (18:29 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * src/menu.c: Include dispextern.h (bug#58688).
Eli Zaretskii [Fri, 21 Oct 2022 15:27:30 +0000 (18:27 +0300)]
; * src/menu.c: Include dispextern.h (bug#58688).

2 years agoBindat (src, strz): Operate on vectors too
Nacho Barrientos [Thu, 20 Oct 2022 12:16:43 +0000 (14:16 +0200)]
Bindat (src, strz): Operate on vectors too

Copyright-paperwork-exempt: yes

* lisp/emacs-lisp/bindat.el (bindat--unpack-str, bindat--unpack-strz):
Fix the non-string case.
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--strz-array-unpack)
(bindat-test--str-simple-array-unpack,bindat-test--str-combined-array-unpack):
New tests.

2 years agoProvide 'symbol-packages'
Gerd Möllmann [Fri, 21 Oct 2022 15:19:12 +0000 (17:19 +0200)]
Provide 'symbol-packages'

* src/pkg.c (init_pkg_once): DEFSYM Qsymbol_packages.
(syms_of_pkg): Fprovide it.

2 years agoFixes for minibuf-tests
Gerd Möllmann [Fri, 21 Oct 2022 14:57:20 +0000 (16:57 +0200)]
Fixes for minibuf-tests

This was a remnant of a time when I made obarrays packages.

* src/minibuf.c (Ftry_completion): Handle case collection being obarray.
(Fall_completions): Same.
(Ftest_completion): And same again.

2 years agoFixes for obarray-tests
Gerd Möllmann [Fri, 21 Oct 2022 14:14:48 +0000 (16:14 +0200)]
Fixes for obarray-tests

* src/pkg.c (pkg_emacs_unintern): Take args, and return a value
consistent with traditional unintern.

2 years agoFix various menu problems
Po Lu [Fri, 21 Oct 2022 13:31:54 +0000 (21:31 +0800)]
Fix various menu problems

* src/menu.c (x_popup_menu_1): Cancel hourglass timer before
displaying popup.
* src/xterm.c (x_show_hourglass): Avoid displaying hourglass
cursor during a popup.
(handle_one_xevent): Under X Toolkit and GTK+ 2.x builds with
XInput 2, clear the mouse face upon a core LeaveNotify; these
can be generated by menu grabs.
(x_wm_set_size_hint): Fix Motif build warning.

2 years ago; * doc/emacs/programs.texi (Programming Language Doc): Fix typos.
Eli Zaretskii [Fri, 21 Oct 2022 13:17:17 +0000 (16:17 +0300)]
; * doc/emacs/programs.texi (Programming Language Doc): Fix typos.

2 years agoImprove and extend documentation of ElDoc
Eli Zaretskii [Fri, 21 Oct 2022 13:10:08 +0000 (16:10 +0300)]
Improve and extend documentation of ElDoc

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-strategy)
(eldoc-documentation-enthusiast)
(eldoc-documentation-compose-eagerly)
(eldoc-documentation-compose, eldoc-documentation-default)
(eldoc-minibuffer-message, eldoc-idle-delay)
(eldoc-print-after-edit)
(eldoc-echo-area-display-truncation-message)
(eldoc-echo-area-use-multiline-p)
(eldoc-echo-area-prefer-doc-buffer): Doc string fixes.

* doc/emacs/emacs.texi (Top):
* doc/emacs/programs.texi (Documentation, Programming Language Doc):
Rename "Lisp Doc" to "Programming Language Doc", including in
parent menus.  All references changed.
(Programming Language Doc): Formerly "Lisp Doc".  Rewrite to not
be specific to Emacs Lisp.  Improve markup and wording.  Document
more commands and variables.
* doc/emacs/maintaining.texi (Maintaining): Improve indexing.

2 years agoFix printing of empty keywords
Gerd Möllmann [Fri, 21 Oct 2022 11:55:06 +0000 (13:55 +0200)]
Fix printing of empty keywords

* src/print.c (print_symbol): Don't print ## for keywords with
empty symbol name.

2 years agoprint-tests failure for esoteric symbols
Gerd Möllmann [Fri, 21 Oct 2022 11:32:55 +0000 (13:32 +0200)]
print-tests failure for esoteric symbols

* src/print.c (print_symbol_name): Fix printing of symbols that
look like numbers.

2 years agoprint-test fixes
Gerd Möllmann [Fri, 21 Oct 2022 11:23:06 +0000 (13:23 +0200)]
print-test fixes

* src/print.c (print_symbol): Fix printing of empty symbol names
to be compatible.

2 years agoFix delivery of window manager ping events during menu
Po Lu [Fri, 21 Oct 2022 11:19:33 +0000 (19:19 +0800)]
Fix delivery of window manager ping events during menu

* oldXMenu/Activate.c (XMenuActivateSetExposeFunction)
(XMenuActivate):
* oldXMenu/XMenu.h: Remove expose functions.
* src/msdos.h (XMenuSetAEQ): Remove no longer used function.
* src/xmenu.c (x_menu_expose_event): Delete function.
(x_menu_dispatch_event): New function.
(x_menu_show): Set it as the XMenu event handler.

2 years agoFix last change in perl-mode
Mauro Aranda [Fri, 21 Oct 2022 10:45:27 +0000 (07:45 -0300)]
Fix last change in perl-mode

* lisp/progmodes/perl-mode.el (perl--syntax-exp-intro-regexp): Escape
$.  Reported by Mattias Engdegård.

2 years agoAdd the "nil" language server to eglot-server-programs
Brian Leung [Fri, 21 Oct 2022 05:47:10 +0000 (22:47 -0700)]
Add the "nil" language server to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add the "nil"
language server.  Put it before rnix-lsp since it is more featureful
and more actively updated.  (Bug#58676)
Ref: https://github.com/oxalica/nil

2 years agoAdd lua-language-server to eglot-server-programs
Brian Leung [Fri, 21 Oct 2022 05:49:08 +0000 (22:49 -0700)]
Add lua-language-server to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add
lua-language-server.  It is, at the time of writing, more actively
developed and more popular than the lua-lsp server, so prioritize
that.  (Bug#58676)

2 years agoWork on Lisp interface
Gerd Möllmann [Fri, 21 Oct 2022 04:14:52 +0000 (06:14 +0200)]
Work on Lisp interface

2 years ago; * doc/misc/eglot.texi (Top): Fix markup/typo.
Basil L. Contovounesios [Thu, 20 Oct 2022 21:40:55 +0000 (00:40 +0300)]
; * doc/misc/eglot.texi (Top): Fix markup/typo.

2 years ago; * etc/NEWS: Mention Eglot.
Eli Zaretskii [Thu, 20 Oct 2022 19:03:12 +0000 (22:03 +0300)]
; * etc/NEWS: Mention Eglot.

2 years ago; cperl-mode.el: Fix one match-count in my commit 2021-09-14
Harald Jörg [Wed, 3 Nov 2021 14:04:10 +0000 (15:04 +0100)]
; cperl-mode.el: Fix one match-count in my commit 2021-09-14

* lisp/progmodes/cperl-mode.el (cperl-init-faces): Matching group needs
to be adjusted according to the regexp change in my previous commit

(cherry picked from commit a25e91593d48a541b5940a2ed707ddfaef5c953f)

2 years agoFix ldapsearch output parsing in ldap-search-internal
Filipp Gunbin [Thu, 20 Oct 2022 17:41:00 +0000 (20:41 +0300)]
Fix ldapsearch output parsing in ldap-search-internal

* lisp/net/ldap.el (ldap-search-internal): When parsing output, make
sure that file:// matched before opening the file. (bug#58605)

2 years agoAdd Eglot to the menu bar
Eli Zaretskii [Thu, 20 Oct 2022 17:50:34 +0000 (20:50 +0300)]
Add Eglot to the menu bar

* lisp/progmodes/eglot.el (eglot): Improve the doc string.
* lisp/menu-bar.el (menu-bar-tools-menu): Add Eglot to the menu.

2 years agoMention Eglot in the Emacs user manual
Eli Zaretskii [Thu, 20 Oct 2022 17:17:45 +0000 (20:17 +0300)]
Mention Eglot in the Emacs user manual

* doc/emacs/maintaining.texi (Xref):
* doc/emacs/programs.texi (Symbol Completion, Imenu): Mention Eglot.

2 years agoHandle keywords in image specs
Gerd Möllmann [Thu, 20 Oct 2022 17:04:11 +0000 (19:04 +0200)]
Handle keywords in image specs

* src/image.c (parse_image_spec): Don't assume that keywords have
a ':' in their symbol name.

2 years agoRemove a call to pkg_break
Gerd Möllmann [Thu, 20 Oct 2022 17:03:17 +0000 (19:03 +0200)]
Remove a call to pkg_break

2 years ago; Minor copyedits to eglot.texi.
Eli Zaretskii [Thu, 20 Oct 2022 16:02:14 +0000 (19:02 +0300)]
; Minor copyedits to eglot.texi.

2 years ago; * doc/misc/eglot.texi: Fix a typo.
Eli Zaretskii [Thu, 20 Oct 2022 14:08:15 +0000 (17:08 +0300)]
; * doc/misc/eglot.texi: Fix a typo.

2 years ago; * doc/misc/eglot.texi: Undo some recent "fixes" to the Eglot manual.
Eli Zaretskii [Thu, 20 Oct 2022 14:05:01 +0000 (17:05 +0300)]
; * doc/misc/eglot.texi: Undo some recent "fixes" to the Eglot manual.

2 years agoAdd pkg_set_status and Lisp defun for it
Gerd Möllmann [Thu, 20 Oct 2022 13:38:39 +0000 (15:38 +0200)]
Add pkg_set_status and Lisp defun for it

2 years agoMerge branch 'feature/eglot2emacs'
João Távora [Thu, 20 Oct 2022 12:50:09 +0000 (13:50 +0100)]
Merge branch 'feature/eglot2emacs'

2 years ago; fix warning about order of defvaralias/defconst
João Távora [Thu, 20 Oct 2022 12:49:49 +0000 (13:49 +0100)]
; fix warning about order of defvaralias/defconst

* lisp/progmodes/eglot.el (eglot-{}): Declare alias before thing
  being aliased.

2 years agoFix completion for new symbol table layout
Gerd Möllmann [Thu, 20 Oct 2022 12:38:21 +0000 (14:38 +0200)]
Fix completion for new symbol table layout

2 years agoDe-duplicate packages for mapatoms
Gerd Möllmann [Thu, 20 Oct 2022 12:18:39 +0000 (14:18 +0200)]
De-duplicate packages for mapatoms

2 years agoMinor fixes to doc/misc/eglot.texi
João Távora [Thu, 20 Oct 2022 11:59:22 +0000 (12:59 +0100)]
Minor fixes to doc/misc/eglot.texi

* doc/misc/eglot.texi (eglot-workspace-configuration): Correct
markup of eglot-{}
(Quick Start): Fix section cross reference.

2 years ago* lisp/info-look.el (mapc): Add Eglot manual's index.
João Távora [Thu, 20 Oct 2022 11:45:31 +0000 (12:45 +0100)]
* lisp/info-look.el (mapc): Add Eglot manual's index.

2 years agoWork around problems setting input focus when a frame is in the background
Po Lu [Sun, 7 Aug 2022 05:46:52 +0000 (13:46 +0800)]
Work around problems setting input focus when a frame is in the background

* src/xterm.c (server_timestamp_predicate, x_get_server_time):
New functions.
(x_ewmh_activate_frame, x_focus_frame, syms_of_xterm): Apply
various workarounds for window manager "focus stealing
prevention".  (bug#57012)

2 years ago* etc/PROBLEMS: Document window manager focus problems.
Po Lu [Sun, 7 Aug 2022 05:49:59 +0000 (13:49 +0800)]
* etc/PROBLEMS: Document window manager focus problems.

2 years agoMerge branch 'feature/eglot-texi-manual' into feature/eglot2emacs
João Távora [Thu, 20 Oct 2022 11:30:49 +0000 (12:30 +0100)]
Merge branch 'feature/eglot-texi-manual' into feature/eglot2emacs

2 years ago; Merge from https://github.com/joaotavora/eglot
João Távora [Thu, 20 Oct 2022 11:16:19 +0000 (12:16 +0100)]
; Merge from https://github.com/joaotavora/eglot

2 years agoIntroduce PACKAGE_NAMEX
Gerd Möllmann [Thu, 20 Oct 2022 11:06:46 +0000 (13:06 +0200)]
Introduce PACKAGE_NAMEX

PACKAGE_NAME Is already taken :-(.

2 years agoSome cleanup in pkg.c and lisp.h
Gerd Möllmann [Thu, 20 Oct 2022 10:29:17 +0000 (12:29 +0200)]
Some cleanup in pkg.c and lisp.h

2 years agoRevert "eglot.texi: Make example more realistic" feature/eglot-texi-manual
João Távora [Thu, 20 Oct 2022 10:42:25 +0000 (11:42 +0100)]
Revert "eglot.texi: Make example more realistic"

This quest for realism ignores the fact that a previous example for a
hypothetical language Foo and a language server "fools" already
exists.  It also undermines the intended generality of the
instructions.

This reverts commit 16986a9cc42ef4de580456f4acc5feba682ac8b1.

2 years agoFix Eglot manual's description of eglot-workspace-configuration
João Távora [Thu, 20 Oct 2022 10:20:30 +0000 (11:20 +0100)]
Fix Eglot manual's description of eglot-workspace-configuration

* doc/misc/eglot.texi (Customizing Eglot)
(eglot-workspace-configuration): Explain that plist may be
arbitrarily complex and correctly identify nil as the Elisp
equivalent to JSON null.

2 years agoImprove HERE document detection in perl-mode
Mauro Aranda [Thu, 20 Oct 2022 10:34:38 +0000 (07:34 -0300)]
Improve HERE document detection in perl-mode

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Detect indented HERE documents when using a bare identifier.
(perl--syntax-exp-intro-keywords): Recognize HERE documents that come
after die, warn and eval.
(perl--syntax-exp-intro-regexp): Identify HERE documents when printing
to a filehandle with printf? and when they appear after a fat comma.

* test/lisp/progmodes/cperl-mode-resources/here-docs.pl: Add more tests.