1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

617 Commits

Author SHA1 Message Date
Stefan Kangas
967fa846fc Use ensure-list in many more places
* lisp/align.el (align-region):
* lisp/auth-source-pass.el (auth-source-pass--build-result-many):
* lisp/auth-source.el (auth-source-ensure-strings):
* lisp/calendar/appt.el (appt-disp-window):
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/cus-edit.el (custom-prompt-variable)
(custom-variable-menu-create):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eieio.el (object-add-to-list):
* lisp/emulation/cua-base.el (cua--M/H-key):
* lisp/epg.el (epg--list-keys-1):
* lisp/faces.el (read-face-name):
* lisp/format.el (format-decode):
* lisp/gnus/gnus-score.el (gnus-home-score-file)
(gnus-all-score-files):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-articles):
* lisp/gnus/message.el (message-make-forward-subject):
* lisp/gnus/nnmairix.el (nnmairix-create-search-group):
* lisp/gnus/spam.el (spam-copy-or-move-routine):
* lisp/help-fns.el (describe-face):
* lisp/ibuf-macs.el (define-ibuffer-filter):
* lisp/international/mule-cmds.el (select-safe-coding-system):
* lisp/net/imap.el (imap-send-command):
* lisp/printing.el (pr-menu-get-item):
* lisp/speedbar.el (speedbar-add-supported-extension)
(speedbar-add-ignored-directory-regexp):
* lisp/textmodes/rst.el (rst-forward-line-looking-at):
* lisp/vc/ediff-util.el (ediff-other-buffer):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/vc-dir.el (vc-dir-mark-state-files):
* lisp/wid-edit.el (widget-prompt-value):
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/woman.el (woman-expand-directory-path): Prefer ensure-list.
2023-08-27 21:45:30 +02:00
Stefan Kangas
08c5cba2e4 Add calling convention to face-attr-construct
* lisp/faces.el (face-attr-construct): Add
advertised-calling-convention declaration.
2023-08-09 03:30:56 +02:00
Po Lu
0ff70f12a5 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-21 07:58:30 +08:00
Mauro Aranda
a5a8de4099 Preserve comments when redrawing a widget (Bug#64649)
* lisp/cus-edit.el (custom-comment-preserve): New function.
(custom-redraw): Use it.
(custom-comment-create): Make sure :comment-shown is set to
t if the comment widget gets created.
(custom-face-value-create, custom-variable-value-create):
Recreate the custom-comment widget with the preserved value,
if any.
2023-07-20 18:52:30 +03:00
Mauro Aranda
bcb5bdc2e9 Pass original spec just after creating the face-widget
* lisp/cus-edit.el (custom-face-get-current-spec-unfiltered):
New function, extracted from custom-face-get-current-spec.
(custom-face-get-current-spec): Use it.
(custom-face-state-set): Take an optional argument, to decide
if we should check against a filtered or unfiltered spec.
(custom-face-value-create): Use the new optional argument.
(Bug#64347)
2023-07-20 18:45:02 +03:00
Po Lu
9032d2178d * lisp/cus-edit.el (custom-display): Add `android' display type. 2023-07-20 19:52:44 +08:00
Po Lu
7196d2d18e Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 19:52:01 +08:00
Po Lu
f9bbe3189b Merge from origin/emacs-29
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary.
3af27a4b81 Improve commentary in nsfns.m
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary.
86f2d6d62f ; * src/xdisp.c: Improve commentary.  (Bug#64596)
ac075176bf ; * admin/notes/bugtracker: Fix punctuation.
8151853447 ; * admin/notes/bugtracker: Use 'e.g.' throughout the doc...
f063f79a49 Convert NUL-containing NSString objects to Lisp strings c...
d172cd5985 ; * doc/lispref/keymaps.texi (Modifying Menus): Add cross...
927e8b470f ; * doc/lispref/keymaps.texi (Extended Menu Items): Add @...
77f489421e ; * src/xdisp.c: Minor improvements of the commentary.
ce3f9fba1a ; Improve accuracy of out-out-order message insertion
17073af84d ; Improve robustness of package-report-bug
2023-07-20 19:50:45 +08:00
Po Lu
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
* lisp/cus-edit.el (custom-display): Add missing display types.
2023-07-20 15:55:07 +08:00
Po Lu
6d823d1077 Merge remote-tracking branch 'origin/master' into feature/android 2023-01-02 21:38:37 +08:00
Po Lu
a32963e11f Update Android port
* Makefile.in (java): Depend on info.
(MAKEFILE_NAME):
(config.status): Remove unneeded changes.
* configure.ac (BUILD_DETAILS, ANDROID_STUBIFY): Don't require a
C++ compiler on Android.
* java/AndroidManifest.xml: <EmacsActivity>: Set launchMode
appropriately.  <EmacsMultitaskActivity>: New activity.
* java/Makefile.in (CROSS_BINS): Add EmacsClient.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
(onCreate): Use the window attachment manager.
* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea)
(paintTo): Implement clip masks correctly.
* java/org/gnu/emacs/EmacsDrawRectangle.java (getRect, paintTo):
Fix damage tracking rectangles.
* java/org/gnu/emacs/EmacsFontDriver.java (FontSpec, toString):
New function.
(FontMetrics, EmacsFontDriver): Fix signature of textExtents.
* java/org/gnu/emacs/EmacsMultitaskActivity.java
(EmacsMultitaskActivity): New file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
functions sendFocusIn, sendFocusOut, sendWindowAction.
* java/org/gnu/emacs/EmacsPaintQueue.java (run): Fix clipping
handling.
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Add
constructor for mutable pixmaps.
* java/org/gnu/emacs/EmacsSdk23FontDriver.java
(EmacsSdk23FontDriver): New file.
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver, Sdk7Typeface, Sdk7FontEntity, Sdk7FontObject)
(checkMatch, hasChar, encodeChar): Implement text display and
fix font metrics semantics.

* java/org/gnu/emacs/EmacsService.java (EmacsService): Remove
availableChildren.
(getLibraryDirectory, onCreate): Pass pixel density to Emacs.
(clearArea): Fix arguments.  Switch to using the window
attachment manager.
* java/org/gnu/emacs/EmacsSurfaceView.java (surfaceChanged)
(surfaceCreated): Flip buffers on surface attachment.
* java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers):
New argument FORCE.  Always swap if it is true.
(onKeyMultiple, onFocusChanged): New functions.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, destroyHandle)
(run): Switch to using the window attachment manager.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(EmacsWindowAttachmentManager): New file.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed):
* lisp/faces.el (tool-bar): Define faces correctly on Android.
* src/android.c (struct android_emacs_pixmap): Add mutable
constructor.
(struct android_emacs_drawable): New structure.
(android_write_event): Check if event queue hasn't yet been
initialized.
(android_select): Set errno to EINTR if pselect fails.
(android_close): Remove unused debugging code.
(android_get_home_directory): New function.
(Java_org_gnu_emacs_EmacsNative_setEmacsParams): Set pixel
density and compute game path.
(android_init_emacs_drawable): New function.
(Java_org_gnu_emacs_EmacsNative_sendKeyPress): New argument
`unicode_char'.  Pass it in events.
(Java_org_gnu_emacs_EmacsNative_sendKeyRelease): Likewise.
(Java_org_gnu_emacs_EmacsNative_sendFocusIn)
(Java_org_gnu_emacs_EmacsNative_sendFocusOut)
(Java_org_gnu_emacs_EmacsNative_sendWindowAction): New
functions.
(android_resolve_handle): Export function.
(android_change_gc): Clear clip rects under the right
circumstances.  Set right clip mask field.
(android_create_pixmap_from_bitmap_data): Use correct alpha
channels.
(android_create_pixmap): Create mutable pixmap and avoid
redundant color array allocation.
(android_create_bitmap_from_data, android_create_image)
(android_destroy_image, android_put_pixel, android_get_pixel)
(android_get_image, android_put_image, faccessat): New
functions.

* src/android.h: Update prototypes.

* src/androidfns.c (android_default_font_parameter): Prefer
monospace to Droid Sans Mono.
* src/androidfont.c (struct android_emacs_font_driver): New
method `draw'.
(struct android_emacs_font_spec): New field `dpi'.
(struct androidfont_info): Add font metrics cache.
(android_init_font_driver, android_init_font_spec): Adjust
accordingly.
(androidfont_from_lisp, androidfont_from_java): Handle new
fields.
(androidfont_draw): Implement function.
(androidfont_open_font): Set pixel size correctly.
(androidfont_close_font): Free metrics cache.
(androidfont_cache_text_extents)
(androidfont_check_cached_extents): New functions.
(androidfont_text_extents): Cache glyph metrics somewhere for
future use.
(androidfont_list_family): Implement function.

* src/androidgui.h (enum android_event_type): New focus and
window action events.
(enum android_modifier_mask): New masks.
(struct android_key_event): New field `unicode_char'.
(ANDROID_IS_MODIFIER_KEY): Newmacro.
(struct android_focus_event, struct
android_window_action_event): New structs.
(union android_event): Add new fields.
(enum android_image_format, struct android_image): New enums and
structs.

* src/androidterm.c (android_android_to_emacs_modifiers)
(android_emacs_to_android_modifiers, android_lower_frame)
(android_raise_frame, android_new_focus_frame)
(android_focus_changed, android_detect_focus_change): New
functions.
(handle_one_android_event): Implement focus and key event
handling.
(android_frame_rehighlight): New function.
(android_frame_raise_lower): Implement accordingly.
(android_make_frame_invisible): Clear highlight_frame if
required.
(android_free_frame_resources): Clear x_focus_event_frame if
required.
(android_draw_fringe_bitmap, android_draw_image_foreground)
(android_draw_image_foreground_1)
(android_draw_image_glyph_string): Remove unnecessary code.
(android_create_terminal, android_term_init): Set the baud rate
to something sensible.
* src/androidterm.h (struct android_bitmap_record): Make
structure the same as on X.
(struct android_display_info): New focus tracking fields.
(struct android_output): Likewise.
* src/dispextern.h (struct image): Add ximg and mask_img on
Android.

* src/emacs.c (android_emacs_init): Fix argc sorting iteration.

* src/fileio.c (user_homedir):
(get_homedir): Implement correctly on Android.

* src/font.h (PT_PER_INCH): Define correctly on Android.

* src/fringe.c (X, swap_nibble, init_fringe_bitmap): Swap fringe
bitmaps correctly on Android.

* src/image.c (GET_PIXEL, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_unget_x_image_or_dc, struct image_type)
(prepare_image_for_display, image_clear_image_1)
(image_size_in_bytes, x_check_image_size)
(x_create_x_image_and_pixmap, x_destroy_x_image)
(image_check_image_size, image_create_x_image_and_pixmap_1)
(image_destroy_x_image, gui_put_x_image, image_put_x_image)
(image_get_x_image, image_unget_x_image)
(Create_Pixmap_From_Bitmap_Data, image_pixmap_draw_cross)
(MaskForeground, image_types, syms_of_image): Implement all of
the above on Android in terms of an API very similar to X.

* src/keyboard.c (FUNCTION_KEY_OFFSET, lispy_function_keys):
Define on Android to something sensible.

* src/lread.c (build_load_history): Fix problem.
2023-01-02 21:38:19 +08:00
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals

# Conflicts:
#	etc/refcards/ru-refcard.tex
#	lib/explicit_bzero.c
#	m4/explicit_bzero.m4
2023-01-01 05:47:47 -05:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Eli Zaretskii
ae91da5233 ; Fix byte-compilation warnings
* lisp/cus-edit.el (custom-reset-standard-save-and-update): Fix
byte-compilation warnings about using 'eq'.
2022-12-19 19:34:36 +02:00
Stefan Kangas
6c540e38f4 Merge from origin/emacs-29
12e26cc0c1 ; * admin/git-bisect-start: Add mistakenly ommitted commi...
9a751e0a38 ruby-mode: Support endless singleton method definitions too
ce7b7e5af3 Remove comment-start-skip preset in tree-sitter indentati...
c1e015ae32 Fix recent change in tramp-smb.el
cf1b771864 ; * etc/NEWS: Fix typos.
50d18bb6ea Make tramp-archive autoloads robust for older Emacs versions
3941cc29df ; Improve documentation of 'setopt'
6f88de109c ruby-mode: Support endless methods (bug#54702)
91dd893e34 ; * lisp/progmodes/sql.el (sql-product-interactive): Doc ...
138d9dc4cb * lisp/cus-edit.el (setopt--set): Warn instead of rasing ...
d1e0542f33 Allow customising windmove user options with an empty prefix
c2375e7791 Improve and extend admin/git-bisect-start
7cc2313eb0 Make 'rmail-summary-by-thread' faster
88e59b16cb ; Improve documentation of installing tree-sitter and gra...
897f33bf31 Fix the MS-DOS build
660e941235 Avoid crashes in PGTK build due to signal in 'note_mouse_...
0fc5fb2d05 Fix MS-Windows build broken by recent treesit.c changes
5b2e6d04ce Fix wrong capture in typescript-ts-mode (bug#60167)
cb8ccdd267 Add rust-ts-mode (Bug#60136)
9fcf764dd7 Indentation fixes for jsx/tsx (bug#60169)
69f2c71135 Fix treesit-query-validate problem with view-mode
1fc7535546 Use cursor API in treesit-node-parent
5f0286c0af Switch to use cursor API in treesit.c
a275e436df Add treesit_assume_true and treesit_cursor_helper
a54c7a8df0 Remove file-exists-in-trash-p
3e02029642 Update to Org 9.6-49-g47d129
4a8ff671b0 Don’t assume make-directory handler returns nil
44c83b239d Fix copy-directory bug when dest dir exists
bef1edc9ca make-directory now returns t if dir already exists
8a9579ca29 Use make-directory handlers uniformly
627e7e0243 Improve documentation of 'file-exists-p'
c9015ef55f Fix resizing of mini-windows by 'set-minibuffer-message'
5a245bc786 Prevent Abort dialogs from async-compiling jobs on Windows
4d1e4a4893 Fix 'window-max-chars-per-line' when there are no fringes
d65beb820c ; Revert "; * lisp/subr.el (internal--with-narrowing): Si...
1c0b90e5f7 ruby-mode: Recognize instance or global var as first arg ...
3356c0cb16 Fix end-of-defun in ruby-mode

# Conflicts:
#	etc/NEWS
2022-12-19 04:42:19 +01:00
Philip Kaludercic
138d9dc4cb * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error
(Bug#60162)
2022-12-18 12:45:22 +01:00
Eli Zaretskii
65456668ab Bump master Emacs version to 30.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* etc/refcards/ru-refcard.tex: Bump Emacs version to 30.0.50.

* etc/NEWS.29: New file.
* etc/NEWS: Empty for Emacs 30.

* configure.ac: Add boilerplate for module-env-XX.h.

* src/emacs-module.h.in (struct emacs_env_30): Add.
* src/module-env-29.h: Remove header comment.
* src/module-env-30.h: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Set last version to 29.1.
2022-11-28 20:03:07 +02:00
Eli Zaretskii
c6cb6d8506 Cut the emacs-29 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 29.0.60.

* admin/admin.el (set-version): Fix regexp for configure.ac.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Bump last version to 28.2.
2022-11-28 19:47:35 +02:00
Stefan Kangas
3b555dc91d Prefer defvar-keymap in cus-edit.el
* lisp/cus-edit.el (custom-mode-map, custom-mode-link-map): Prefer
defvar-keymap.
2022-10-31 16:42:26 +01:00
Basil L. Contovounesios
38bcad5451 Pacify recent unused/ignored lexvar warnings
Lexvars with special names like 'ignored' or 'unused' are no longer
treated specially.

* lisp/ansi-color.el (ansi-color-process-output):
* lisp/cus-edit.el (customize-apropos-options):
* lisp/cus-theme.el (customize-create-theme):
* lisp/dired-aux.el (dired-hide-all):
* lisp/emacs-lisp/crm.el (crm--choose-completion-string):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert):
* lisp/ido.el (ido-choose-completion-string):
* lisp/international/mule-diag.el (describe-font-internal):
* lisp/mail/sendmail.el (sendmail-user-agent-compose):
* lisp/progmodes/fortran.el (fortran-uncomment-region):
* lisp/progmodes/prolog.el (prolog-inferior-guess-flavor):
* lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp):
* lisp/url/url.el (url-mm-callback):
* lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an
underscore to unused function parameter names.
* lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused
constant.
* lisp/files.el (hack-local-variables-filter): Remove unused lexvar.
2022-10-26 16:35:59 +03:00
Jim Porter
4db596d316 Under no-X builds, allow any value for 'fringe-bitmap' options
* lisp/cus-edit (fringe-bitmap): Always match under no-X.
2022-09-01 18:34:45 -07:00
Lars Ingebrigtsen
06d7161476 Fix some no-X build warnings
* lisp/cus-edit.el (fringe-bitmap-p): Autoload.

* lisp/image.el (clear-image-cache): Declare.

* lisp/mouse.el (dnd-begin-file-dram): Autoload.

* lisp/thumbs.el (image-supported-file-p): Declare (bug#57342).

* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data):
* lisp/emacs-lisp/icons.el (icons--create): Avoid warnings on no-X
builds.
2022-08-22 19:22:33 +02:00
Jim Porter
b87400c78b Make the bookmark fringe icon look like a bookmark
* src/fringe.c (large_circle_bits): New variable.
(standard_bitmaps): Add large_circle_bits.

* lisp/fringe.el (fringe-bitmaps): Add 'large-circle'.
(fringe-custom-set-bitmap): New function.

* lisp/cus-edit.el (widget-fringe-bitmap-prompt-value-history): New
variable.
(fringe-bitmap): New widget.

* lisp/bookmark.el (bookmark-set-fringe-mark): Obsolete in favor of...
(bookmark-fringe-mark): ... this.
(bookmark-fringe-mark): Rename this fringe bitmap to...
(bookmark-mark): ... and change it to look like a bookmark.
(bookmark-face): Don't set the ':background' of the face.  Instead,
set ':distant-foreground'.
(bookmark--set-fringe-mark, bookmark--remove-fringe-mark)
(bookmark-store, bookmark--jump-via): Consult the
'bookmark-fringe-mark' option.

* doc/lispref/customize.texi (Simple Types): Document 'fringe-bitmap'
type.

* doc/lispref/display.texi (Fringe Bitmaps): Mention 'large-circle'.

* etc/NEWS: Announce this change (bug#56896).
2022-08-15 21:15:42 -07:00
Lars Ingebrigtsen
95f987cbd5 Don't make a custom-save-icons section if there's nothing to save
* lisp/cus-edit.el (custom-save-icons): Only make an entry when
there's something to save (bug#56860).  Also autoload.
2022-07-31 18:17:23 +02:00
Lars Ingebrigtsen
5999dc1cd9 Comment fixes for recent icon code
* lisp/cus-edit.el (custom-icon-state): Add comment.

* lisp/emacs-lisp/icons.el: Remove comment.
2022-07-28 17:49:57 +02:00
Lars Ingebrigtsen
601737d750 Add support for user-customizable icons
* doc/emacs/custom.texi (Specific Customization): Mention it.

* doc/emacs/display.texi (Icons): New node.

* doc/lispref/display.texi (Icons): New node.

* lisp/button.el (buttonize):
(button--properties, buttonize-region): Allow not overriding faces.

* lisp/cus-edit.el (custom-save-all): Save icons.
(custom-icon): New widget.
(custom-icon-value-create, custom-toggle-hide-icon)
(custom--icons-widget-value, custom-icon-set): Helper functions
for the widget.
(customize-icon): Main command.
(custom-icon-state-set, custom-icon-state): Helper functions.
(custom-theme-set-icons): Function to be used by theme writers.
(custom-set-icons): Function to be used in .emacs.
(custom-save-icons): New function.

* lisp/custom.el (custom-push-theme): Add icons.

* lisp/emacs-lisp/icons.el: New file.

* test/lisp/emacs-lisp/icons-tests.el: Add some tests.
2022-07-28 14:39:38 +02:00
Lars Ingebrigtsen
6d8638e5e4 Give a warning if setopt has been used with an invalid value
* lisp/cus-edit.el (setopt--set): Mark the variable for checking.

* lisp/custom.el (custom-initialize-reset): Give a warning if the
type is wrong (bug#56400).

* lisp/wid-edit.el (widget-convert): Autoload.
2022-07-05 19:33:24 +02:00
Lars Ingebrigtsen
1883e532d1 Untabify doc strings before displaying in Customize
* lisp/cus-edit.el (custom-variable-documentation): Untabify the
doc string since we'll be indenting it when displaying it (which
makes the tabs not align properly).
2022-06-21 19:08:25 +02:00
Eli Zaretskii
640e52d8fa ; Fix mistakes in 'declare function' forms
* lisp/progmodes/gdb-mi.el (tooltip-show):
* lisp/vc/vc-git.el (grep-expand-template):
* lisp/cedet/semantic/imenu.el (pulse-momentary-highlight-one-line):
* lisp/mail/feedmail.el (smtpmail-via-smtp):
* lisp/mail/rmail.el (rmail-mime-entity-truncated):
* lisp/mail/rmailsum.el (rmail-cease-edit):
* lisp/progmodes/gud.el (speedbar-toggle-line-expansion)
(speedbar-edit-line):
* lisp/autoinsert.el (sgml-tag):
* lisp/comint.el (url-host, url-type, url-filename):
* lisp/progmodes/elisp-mode.el (xref-make, xref-item-location):
* lisp/vc/vc-hooks.el (vc-responsible-backend):
* lisp/cedet/semantic/complete.el (tooltip-show):
* lisp/doc-view.el (tooltip-show):
* lisp/follow.el (mwheel-scroll):
* lisp/term/pgtk-win.el (pgtk-set-resource):
* lisp/progmodes/cperl-mode.el (Info-find-node):
* lisp/lpr.el (print-region-function):
* lisp/w32-fns.el (w32-version, w32-read-registry):
* lisp/emacs-lisp/checkdoc.el (ispell-correct-p, checkdoc-dired):
* lisp/progmodes/xref.el (apropos-parse-pattern):
* lisp/cus-edit.el (apropos-parse-pattern):
* lisp/obsolete/gs.el (x-change-window-property):
* lisp/x-dnd.el (x-change-window-property):
* lisp/xwidget.el (make-xwidget):
* lisp/transient.el (info, Man-find-section, Man-next-section)
(Man-getpage-in-background):
* lisp/frame.el (x-device-class, pgtk-device-class):
* lisp/textmodes/texinfo.el (flymake--log-1):
* lisp/term/x-win.el (x-internal-focus-input-context): Fix
'declare function' errors uncovered by 'check-declare'.
2022-05-14 16:19:12 +03:00
Lars Ingebrigtsen
dcbe826783 Fix non-variable widgets in the 'H' command in Cus-mode
* lisp/cus-edit.el (custom-mode-map):
(custom-commands): Adjust.
(custom-toggle-hide-all-widgets): Rename and work for all widget
types, not just variables.
2022-05-12 02:27:22 +02:00
Eli Zaretskii
fb42001086 ; * lisp/cus-edit.el (custom-toggle-hide-all-variables): Doc fix. 2022-05-11 16:49:15 +03:00
Lars Ingebrigtsen
6e275c1bf8 Don't try to toggle untogglable widgets in custom-toggle-hide-all-variables
* lisp/cus-edit.el (custom-toggle-hide-all-variables): Only toggle
the widgets that can be toggled.
2022-05-11 13:42:02 +02:00
Lars Ingebrigtsen
fd49e3c62b Add new command to toggle hiding all widgets in a Customize buffer
* lisp/cus-edit.el (custom-commands): Add menu entry.
(custom-toggle-hide-all-variables): New command (bug#15748).
2022-05-10 17:46:55 +02:00
Robert Pluim
a86205b060 Guard against custom entries that can contain NULs
There are custom entries that contain lambda's as values by default,
which can result in them containing embedded NULs after
byte-compilation, which wreaks havoc when they are saved to .emacs and
later read in.  (Bug#52554)

* lisp/cus-edit.el (custom-save-all): Bind
print-escape-control-characters to t.
* lisp/startup.el (startup--load-user-init-file): Bind
inhibit-null-byte-detection to t.
2022-03-16 18:58:49 +01:00
Stefan Kangas
3af12cb8f2 Merge from origin/emacs-28
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
a9920473f6 Improve documentation of 'map-charset-chars'
2022-03-12 06:34:05 +01:00
Eli Zaretskii
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
* lisp/cus-edit.el (custom-prompt-customize-unsaved-options):
Don't depend on the value returned by 'customize-unsaved'.  Fix
the doc string.  Patch by Sebastian Miele <iota@whxvd.name>.
(Bug#54329)
2022-03-10 20:26:13 +02:00
Lars Ingebrigtsen
136f1cb549 Have setopt check types
* doc/lispref/variables.texi (Setting Variables): Note type checking.
* lisp/cus-edit.el (setopt--set): New function to avoid having
Customize saving values, too.
(setopt): Use it.
2022-02-17 12:31:12 +01:00
Lars Ingebrigtsen
997dd86a9f Add a new macro `setopt'
* doc/emacs/custom.texi (Examining): Mention it.
(Init Syntax): Ditto.

* doc/emacs/windows.texi (Window Choice): Adjust example.

* doc/lispref/windows.texi (Choosing Window Options): Adjust examples.

* doc/lispref/variables.texi (Setting Variables): Document setopt.

* doc/misc/eudc.texi (Emacs-only Configuration): Adjust examples.

* lisp/cus-edit.el (setopt): New macro.
2022-02-13 16:29:26 +01:00
Mauro Aranda
6278c6a94e Fix reverting the default face to standard/themed state in GUIs
* lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save)
(custom-face-save): Record the default (standard or themed) attributes
of the default face in a symbol property.
(custom-face-reset-saved, custom-face-mark-to-reset-standard): When
reverting the default face to the standard or themed state, use the
default attributes we recorded, instead of relying in the defface spec
of the default face, since that doesn't give enough information to
reset all attributes, like foreground, family, etc (bug#14635).
2022-02-06 00:38:40 +01:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Po Lu
8f5d2a3181 Merge remote-tracking branch 'origin/master' into feature/pgtk 2021-11-30 08:16:50 +08:00
Po Lu
85a078e785 Add support for the Haiku operating system and its window system
* .gitignore: Add binaries specific to Haiku.

* Makefie.in (HAVE_BE_APP): New variable.
(install-arch-dep): Install Emacs and Emacs.pdmp when
using Haiku.

* configure.ac: Detect and configure for Haiku and
various related configurations.
(be-app, be-freetype, be-cairo): New options.
(HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ)
(HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(HAIKU, HAVE_TINY_SPEED_T): New define.
(emacs_config_features): Add BE_APP.

* doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku
appendix.

* doc/emacs/emacs.texi: Add Haiku appendix to menus and
include it.

* doc/emacs/haiku.texi: New Haiku appendix.

* doc/lispref/display.texi (Defining Faces, Window Systems):
Explain meaning of `haiku' as a window system identifier.
(haiku-use-system-tooltips): Explain meaning of system
tooltips on
Haiku.

* doc/lispref/frames.texi (Multiple Terminals): Explain
meaning of haiku as a display type.
(Frame Layout): Clarify section for Haiku frames.
(Size Parameters): Explain limitations of fullwidth and
fullheight on Haiku.
(Management Parameters): Explain limitations of
inhibiting double buffering on builds with Cairo,
and the inability of frames with no-accept-focus to
receive keyboard input on Haiku.
(Font and Color Parameters): Explain the different font
backends available on Haiku.
(Raising and Lowering): Explain that lowering and
restacking frames doesn't work on Haiku.
(Child Frames): Explain oddities of child frame
visibility on Haiku.

* doc/lispref/os.texi (System Environment): Explain
meaning of haiku.
* etc/MACHINES: Add appropriate notices for Haiku.
* etc/NEWS: Document changes.
* etc/PROBLEMS: Document font spacing bug on Haiku.

* lib-src/Makefile.in: Build be-resources binary on
Haiku.
(CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS)
(HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(DONT_INSTALL): Add be-resources binary if on Haiku.
(be-resources): New target.

* lib-src/be_resources: Add helper binary for setting
resources on the Emacs application.

* lib-src/emacsclient.c (decode_options): Set
alt_display to "be" on Haiku.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-unraised, custom-button-pressed): Update
face definitions for Haiku.

* lisp/cus-start.el: Add haiku-debug-on-fatal-error and
haiku-use-system-tooltips.

* lisp/faces.el (face-valid-attribute-values): Clarify
attribute comment for Haiku.
(tool-bar): Add appropriate toolbar color for Haiku.

* lisp/frame.el (haiku-frame-geometry)
(haiku-mouse-absolute-pixel-position)
(haiku-set-mouse-absolute-pixel-position)
(haiku-frame-edges)
(haiku-frame-list-z-order): New function declarations.

(frame-geometry, frame-edges)
(mouse-absolute-pixel-position)
(set-mouse-absolute-pixel-position)
(frame-list-z-order): Call appropriate window system
functions on Haiku.

(display-mouse-p, display-graphic-p)
(display-images-p, display-pixel-height)
(display-pixel-width, display-mm-height)
(display-mm-width, display-backing-store)
(display-save-under, display-planes)
(display-color-cells, display-visual-class): Update type
tests for Haiku.

* lisp/international/mule-cmds.el
(set-coding-system-map): Also
prevent set-terminal-coding-system from appearing in the menu
bar on Haiku.

* lisp/loadup.el: Load Haiku-specific files when built
with Haiku, and don't rename newly built Emacs on Haiku as BFS
doesn't support hard links.

* lisp/menu-bar.el (menu-bar-open): Add for Haiku.

* lisp/mwheel.el (mouse-wheel-down-event): Expect
wheel-up on Haiku.
(mouse-wheel-up-event): Expect wheel-down on Haiku.
(mouse-wheel-left-event): Expect wheel-left on Haiku.
(mouse-wheel-right-event): Expect wheel-right on Haiku.

* lisp/net/browse-url.el
(browse-url--browser-defcustom-type):
Add option for WebPositive.
(browse-url-webpositive-program): New variable.
(browse-url-default-program): Search for WebPositive.
(browse-url-webpositive): New function.

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Define faces
appropriately for Haiku.

* lisp/term/haiku-win.el: New file.

* lisp/tooltip.el (menu-or-popup-active-p): New function
declaration.
(tooltip-show-help): Don't use tooltips on Haiku when a
menu is active.

* lisp/version.el (haiku-get-version-string): New
function declaration.
(emacs-version): Add Haiku version string if
appropriate.

* src/Makefile.in: Also produce binary named "Emacs"
with Haiku resources set.

(CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS)
(HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS)
(ALL_CXX_FLAGS): New variables.

(.SUFFIXES): Add .cc.
(.cc.o): New target.
(base_obj): Add Haiku C objects.
(doc_obj, obj): Split objects that should scanned for
documentation into doc_obj.
(SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects.
(all): Depend on Emacs and Emacs.pdmp on Haiku.
(LIBES): Add Haiku libraries.
(gl-stamp)
($(etc)/DOC): Scan doc_obj instead of obj
(temacs$(EXEEXT): Use C++ linker on Haiku.
(ctagsfiles3): New variable.
(TAGS): Scan C++ files.

* src/alloc.c (garbage_collect): Mark Haiku display.

* src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable
on Haiku.
(struct image): Add fields for Haiku transforms.
(RGB_PIXEL_COLOR): Define to unsigned long on Haiku as
well.
(sit_for): Also check USABLE_SIGPOLL.
(init_display_interactive): Set initial window system to
Haiku on Haiku builds.

* src/emacs.c (main): Define Haiku syms and init haiku
clipboard.
(shut_down_emacs): Quit BApplication on Haiku and
trigger debug
on aborts if haiku_debug_on_fatal_error.
(Vsystem_type): Update docstring.

* src/fileio.c (next-read-file-uses-dialog-p): Enable on
Haiku.

* src/filelock.c (WTMP_FILE): Only define if BOOT_TIME
is also defined.

* src/floatfns.c (double_integer_scale): Work around
Haiku libroot brain damage.

* src/font.c (syms_of_font): Define appropriate font
driver symbols for Haiku builds with various options.

* src/font.h: Also enable ftcrfont on Haiku builds with
Cairo.
(font_data_structures_may_be_ill_formed): Also enable on
Haiku builds that have Cairo.

* src/frame.c (Fframep): Update doc-string for Haiku
builds and return haiku if appropriate.
(syms_of_frame): New symbol `haiku'.

* src/frame.h (struct frame): Add output data for Haiku.
(FRAME_HAIKU_P): New macro.
(FRAME_WINDOW_P): Test for Haiku frames as well.

* src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG): New macros.
(ftcrfont_draw): Add haiku specific code for Haiku
builds with Cairo.

* src/ftfont.c (ftfont_open): Set face.
(ftfont_has_char, ftfont_text_extents): Work around
crash.
(syms_of_ftfont): New symbol `mono'.

* src/ftfont.h (struct font_info): Enable Cairo-specific
fields for Cairo builds on Haiku.

* src/haiku_draw_support.cc:
* src/haiku_font_support.cc:
* src/haiku_io.c:
* src/haiku_select.cc:
* src/haiku_support.cc:
* src/haiku_support.h:
* src/haikufns.c:
* src/haikufont.c:
* src/haikugui.h:
* src/haikuimage.c:
* src/haikumenu.c:
* src/haikuselect.c:
* src/haikuselect.h:
* src/haikuterm.c:
* src/haikuterm.h: Add new files for Haiku windowing
support.

* src/haiku.c: Add new files for Haiku operating system
support.

* src/image.c: Implement image transforms and native XPM
support
on Haiku.

(GET_PIXEL, PUT_PIXEL, NO_PIXMAP)
(PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG)
(BLUE16_FROM_ULONG): Define to appropriate values on
Haiku.

(image_create_bitmap_from_data): Add Haiku support.
(image_create_bitmap_from_file): Add TODO on Haiku.
(free_bitmap_record): Free bitmap on Haiku.
(image_size_in_bytes): Implement for Haiku bitmaps.
(image_set_transform): Implement on Haiku.
(image_create_x_image_and_pixmap_1): Implement on Haiku,
24-bit or 1-bit only.
(image_destroy_x_image, image_get_x_image): Use correct
img and pixmap values on Haiku.
(lookup_rgb_color): Use correct macro on Haiku.
(image_to_emacs_colors): Implement on Haiku.
(image_disable_image): Disable on Haiku.
(image_can_use_native_api): Test for translator presence
on Haiku.
(native_image_load): Use translator on Haiku.
(imagemagick_load_image): Add Haiku-specific quirks.
(Fimage_transforms_p): Allow rotate90 on Haiku.
(image_types): Enable native XPM support on Haiku.
(syms_of_image): Enable XPM images on Haiku.

* src/keyboard.c (kbd_buffer_get_event)
(handle_async_input, handle_input_available_signal)
(handle_user_signal, Fset_input_interrupt_mode)
(init_keyboard): Check for USABLE_SIGPOLL along with
USABLE_SIGIO.

* src/lisp.h (pD): Work around broken Haiku headers.
(HAVE_EXT_MENU_BAR): Define on Haiku.
(handle_input_available_signal): Enable if we just have
SIGPOLL as well.

* src/menu.c (have_boxes): Return true on Haiku.
(single_menu_item): Enable toolkit menus on Haiku.
(find_and_call_menu_selection): Also enable on Haiku.

* src/process.c (keyboard_bit_set): Enable with only
usable SIGPOLL.
(wait_reading_process_output): Test for SIGPOLL as well
as SIGIO availability.

* src/sound.c (sound_perror, vox_open)
(vox_configure, vox_close): Enable for usable SIGPOLL as
well.

* src/sysdep.c (sys_subshell): Enable for usable SIGPOLL.
(reset_sigio): Make conditional on F_SETOWN.
(request_sigio, unrequest_sigio)
(emacs_sigaction_init): Also handle SIGPOLLs.
(init_sys_modes): Disable TCXONC usage on Haiku, as it
doesn't have any ttys other than pseudo ttys, which don't
support C-s/C-q flow control, and causes compiler warnings.
(speeds): Disable high speeds if HAVE_TINY_SPEED_T.

* src/termhooks.h (enum output_method): Add output_haiku.
(struct terminal): Add Haiku display info.
(TERMINAL_FONT_CACHE): Enable for Haiku.

* src/terminal.c (Fterminal_live_p): Return `haiku' if
appropriate.
* src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging
variables.

* src/xdisp.c (redisplay_internal)
(note_mouse_highlight): Return on Haiku if a popup is activated.
(display_menu_bar): Return on Haiku if frame is a Haiku
frame.

* src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku.
(x_create_gc): Enable dummy GC code on Haiku.

* src/xfns.c (x-server-version, x-file-dialog): Add
Haiku specifics to doc strings.

* src/xterm.c (syms_of_xterm): Add Haiku information to
doc string.
2021-11-20 21:46:07 +08:00
Stefan Kangas
e0abd83b49 Merge from origin/emacs-28
e852822f3d Fix removal of fringe marks of deleted bookmarks
b418aad85a * lisp/repeat.el (repeat-echo-message): Bind message-log-m...
fe2ac7cb7c * lisp/repeat.el (describe-repeat-maps): Use help-fns--ana...
c840bfe7e1 * lisp/repeat.el: Detect changes in the minibuffer state (...
5044151486 Avoid segfaults due to freed face cache
199e2468d3 Doc fix; change recommended file name of custom-file
2021-11-16 07:18:19 +01:00
Stefan Kangas
199e2468d3 Doc fix; change recommended file name of custom-file
* lisp/cus-edit.el (custom-file): Change file name recommendation to
match Info node '(emacs) Saving Customizations'.
2021-11-15 11:00:37 +01:00
Yuuki Harano
4dd1f56f29 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-11 00:39:53 +09:00
Stefan Kangas
6640942221 Use format-prompt for many more prompts
* lisp/bookmark.el (bookmark-completing-read):
* lisp/calc/calc-prog.el (calc-user-define-formula):
* lisp/calc/calc-store.el (calc-permanent-variable):
* lisp/calc/calc-units.el (calc-convert-units)
(calc-convert-exact-units, calc-convert-temperature):
* lisp/cedet/semantic/complete.el
(semantic-complete-read-tag-engine):
* lisp/cus-edit.el (customize-read-group):
* lisp/dired-aux.el (dired-do-chxxx):
* lisp/dired-x.el (dired-mark-unmarked-files):
* lisp/emacs-lisp/debug.el (cancel-debug-on-entry)
(cancel-debug-on-variable-change):
* lisp/emacs-lisp/edebug.el (edebug-cancel-on-entry)
(edebug-remove-instrumentation):
* lisp/epa.el (epa-read-file-name, epa-export-keys):
* lisp/faces.el (read-face-name):
* lisp/format.el (format-decode-buffer, format-decode-region):
* lisp/gnus/gnus-art.el (gnus-read-save-file-name):
* lisp/gnus/gnus-util.el (gnus-completing-read):
* lisp/gnus/message.el (message-check-news-header-syntax):
* lisp/info.el (Info-follow-reference):
* lisp/international/mule-diag.el (describe-font)
(describe-fontset):
* lisp/international/quail.el (quail-show-keyboard-layout):
* lisp/language/cyril-util.el
(standard-display-cyrillic-translit):
* lisp/mail/rmailkwd.el (rmail-read-label):
* lisp/mail/rmailmm.el (rmail-mime-save):
* lisp/mail/rmailout.el (rmail-output-read-file-name):
* lisp/man.el (Man-goto-section, Man-follow-manual-reference):
* lisp/menu-bar.el (emacs-index--prompt):
* lisp/net/ange-ftp.el (ange-ftp-get-passwd):
* lisp/proced.el (proced-send-signal):
* lisp/progmodes/cpp.el (cpp-choose-face):
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
* lisp/progmodes/etags.el (visit-tags-table)
(visit-tags-table-buffer):
* lisp/progmodes/grep.el (grep-read-files):
* lisp/progmodes/hideif.el (hide-ifdef-define):
* lisp/progmodes/pascal.el (pascal-goto-defun):
* lisp/progmodes/prolog.el (prolog-read-predicate):
* lisp/progmodes/sql.el (sql-get-login-ext):
* lisp/ses.el (ses-define-local-printer):
* lisp/textmodes/artist.el (artist-figlet-choose-font):
* lisp/textmodes/tex-mode.el (tex-compile):
* lisp/vc/diff.el (diff):
* lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file):
* lisp/vc/ediff-util.el (ediff-read-file-name):
* lisp/vc/pcvs.el (cvs-mode-mark-on-state):
* lisp/vc/vc.el (vc-diff-build-argument-list-internal)
(vc-revision-other-window, vc-retrieve-tag):
* lisp/wid-edit.el: Prefer format-prompt unconditionally.

* lisp/org/org-capture.el (org-capture-fill-template):
* lisp/org/org-refile.el (org-refile-get-location):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/verilog-mode.el (verilog-surelint-off)
(verilog-goto-defun):
* lisp/progmodes/xref.el (xref--read-identifier): Prefer format-prompt
when it is fboundp.
2021-10-05 03:44:56 +02:00
Eli Zaretskii
3478e64c88 Bump Emacs version to 29.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* src/msdos.c (internal_terminal_init):
* etc/refcards/ru-refcard.tex:
* etc/NEWS: Bump Emacs version to 29.0.50.
* etc/NEWS.28: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the reference version of Emacs.
2021-09-30 20:11:43 +03:00
Eli Zaretskii
2750d97543 Cut the emacs-28 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the last released version of Emacs.
2021-09-30 20:05:09 +03:00
Stefan Kangas
aebba085cb ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00