commit 997ce9eb3d65089f4d924c7e5377f1b3bf0c2c13 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Wed May 18 14:55:23 2022 +0800 Avoid dismissing GTK+ popup menus upon wheel movement * src/xterm.c (handle_one_xevent): Don't forward XI button events for wheel buttons to GTK+ when a popup menu is active. diff --git a/src/xterm.c b/src/xterm.c index c24de0f185..b5fbb474ec 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18328,9 +18328,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, g_object_ref (copy->button.window); - if (popup_activated () - && xev->evtype == XI_ButtonRelease) - goto XI_OTHER; + if (popup_activated ()) + { + /* GTK+ popup menus don't respond to core buttons + after Button3, so don't dismiss popup menus upon + wheel movement here either. */ + if (xev->detail > 3) + *finish = X_EVENT_DROP; + + if (xev->evtype == XI_ButtonRelease) + goto XI_OTHER; + } #endif #ifdef HAVE_XINPUT2_1 commit c258528cfbc27f1f7e7604425a4c3d3dc78408bb Author: Po Lu Date: Wed May 18 04:07:31 2022 +0000 Fix race conditions when calculating Haiku frame geometry * src/haiku_support.cc (be_lock_window, be_unlock_window): New functions. * src/haiku_support.h: Update prototypes. * src/haikufns.c (frame_geometry): Lock window before asking for its dimensions and frame. diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 28c8608584..0c126dab3d 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -5163,3 +5163,20 @@ be_send_move_frame_event (void *window) msg.SendMessage (SEND_MOVE_FRAME_EVENT); } + +void +be_lock_window (void *window) +{ + BWindow *wnd = (BWindow *) window; + + if (!wnd->LockLooper ()) + gui_abort ("Failed to lock window looper"); +} + +void +be_unlock_window (void *window) +{ + BWindow *wnd = (BWindow *) window; + + wnd->UnlockLooper (); +} diff --git a/src/haiku_support.h b/src/haiku_support.h index 22f13c1ee6..14dd36e275 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -691,6 +691,8 @@ extern void be_get_window_decorator_dimensions (void *, int *, int *, int *, int extern void be_get_window_decorator_frame (void *, int *, int *, int *, int *); extern void be_send_move_frame_event (void *); +extern void be_lock_window (void *); +extern void be_unlock_window (void *); #ifdef __cplusplus } diff --git a/src/haikufns.c b/src/haikufns.c index fa47da73d2..8b6296e6ae 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -1394,17 +1394,22 @@ static Lisp_Object frame_geometry (Lisp_Object frame, Lisp_Object attribute) { struct frame *f, *parent; + void *window; int outer_x, outer_y, outer_width, outer_height; int right_off, bottom_off, top_off; int native_x, native_y; f = decode_window_system_frame (frame); parent = FRAME_PARENT_FRAME (f); + window = FRAME_HAIKU_WINDOW (f); + + be_lock_window (window); + be_get_window_decorator_frame (window, &outer_x, &outer_y, + &outer_width, &outer_height); + be_get_window_decorator_dimensions (window, NULL, &top_off, + &right_off, &bottom_off); + be_unlock_window (window); - be_get_window_decorator_frame (FRAME_HAIKU_WINDOW (f), &outer_x, - &outer_y, &outer_width, &outer_height); - be_get_window_decorator_dimensions (FRAME_HAIKU_WINDOW (f), NULL, - &top_off, &right_off, &bottom_off); native_x = FRAME_OUTPUT_DATA (f)->frame_x; native_y = FRAME_OUTPUT_DATA (f)->frame_y; commit 55198d179671739048701068fb1f40056d37c493 Author: Po Lu Date: Wed May 18 01:23:32 2022 +0000 Don't allow moving fullscreen frames on Haiku * src/haikuterm.c (haiku_set_window_size): Fix typo in comment. (haiku_set_offset): Prevent offset from changing in fullboth frames. diff --git a/src/haikuterm.c b/src/haikuterm.c index 0952392210..af20d1c11c 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1991,7 +1991,7 @@ haiku_set_window_size (struct frame *f, bool change_gravity, /* Only do this if the fullscreen status has actually been applied. */ && f->want_fullscreen == FULLSCREEN_NONE - /* And if the configury during frame completion has been + /* And if the configury during frame creation has been completed. Otherwise, there will be no valid "old size" to go back to. */ && FRAME_OUTPUT_DATA (f)->configury_done) @@ -4352,6 +4352,22 @@ void haiku_set_offset (struct frame *frame, int x, int y, int change_gravity) { + Lisp_Object lframe; + + /* Don't allow moving a fullscreen frame: the semantics of that are + unclear. */ + + XSETFRAME (lframe, frame); + if (EQ (Fframe_parameter (lframe, Qfullscreen), Qfullboth) + /* Only do this if the fullscreen status has actually been + applied. */ + && frame->want_fullscreen == FULLSCREEN_NONE + /* And if the configury during frame creation has been + completed. Otherwise, there will be no valid "old position" + to go back to. */ + && FRAME_OUTPUT_DATA (frame)->configury_done) + return; + if (change_gravity > 0) { frame->top_pos = y; commit 8b98f87b924fcb2e79740063b36db1ed0b752853 Author: Po Lu Date: Wed May 18 09:07:41 2022 +0800 Fix a crash when an X connection is dropped in some situations * src/xterm.c (x_flip_and_flush): Don't try to flush if `inhibit-redisplay' is t. diff --git a/src/xterm.c b/src/xterm.c index f81d99ca12..c24de0f185 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5618,6 +5618,12 @@ show_back_buffer (struct frame *f) static void x_flip_and_flush (struct frame *f) { + /* Flipping buffers requires a working connection to the X server, + which isn't always present if `inhibit-redisplay' is t, since + this can be called from the IO error handler. */ + if (!NILP (Vinhibit_redisplay)) + return; + block_input (); #ifdef HAVE_XDBE if (FRAME_X_NEED_BUFFER_FLIP (f)) commit 961cec0a7d0d300df4405215d0a0ece35c52b4c1 Author: Lars Ingebrigtsen Date: Wed May 18 01:22:18 2022 +0200 Fix apropos-documentation with universal argument * lisp/apropos.el (apropos-documentation-check-elc-file): Look up .elc files in the load path (and don't bug out on deleted .elc files) (bug#55492). diff --git a/lisp/apropos.el b/lisp/apropos.el index 9970667179..428aeb1541 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1055,7 +1055,10 @@ non-nil." (setq sepa (goto-char sepb))))) (defun apropos-documentation-check-elc-file (file) - (if (member file apropos-files-scanned) + (unless (file-name-absolute-p file) + (setq file (locate-library file))) + (if (or (member file apropos-files-scanned) + (not (file-exists-p file))) nil (let (symbol doc beg end this-is-a-variable) (setq apropos-files-scanned (cons file apropos-files-scanned)) commit f99980bf6cd0a707963a7ec4c796768e43b451d2 Author: Stefan Kangas Date: Wed May 18 01:10:22 2022 +0200 Recommend Wikipedia over Usenet in FAQ * doc/misc/efaq.texi (Origin of the term Emacs): Recommend Wikipedia over Usenet to find out more about TECO. diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 87a70d064e..7d92183505 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -882,10 +882,11 @@ divergent TECO command sets and key bindings at MIT, and completed by RMS. Many people have said that TECO code looks a lot like line noise; you -can read more at @uref{news:alt.lang.teco}. Someone has written a TECO -implementation in Emacs Lisp (to find it, see @ref{Packages that do not -come with Emacs}); it would be an interesting project to run the -original TECO Emacs inside of Emacs. +can read more on +@uref{https://en.wikipedia.org/wiki/TECO_(text_editor), Wikipedia}. +Someone has written a TECO implementation in Emacs Lisp (to find it, +see @ref{Packages that do not come with Emacs}); it would be an +interesting project to run the original TECO Emacs inside of Emacs. @cindex Why Emacs? For some not-so-serious alternative reasons for Emacs to have that commit 3e3ba233cfd8325cf75050b135e18eb5dfa56dc4 Author: Stefan Kangas Date: Wed May 18 00:27:52 2022 +0200 Remove some ancient Emacs compat code * lisp/cedet/mode-local.el (mode-local-describe-bindings-1): * lisp/cedet/semantic/senator.el (senator-copy-tag-to-register): * lisp/gnus/nnrss.el (nnrss-opml-export): * lisp/net/newst-backend.el (newsticker-opml-export): * lisp/textmodes/reftex.el (reftex-mode-menu): * lisp/woman.el (woman-menu): Remove some ancient Emacs compat code. diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index b1a4fe4d54..ce37a28c35 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -877,10 +877,9 @@ META-NAME is a cons (OVERLOADABLE-SYMBOL . MAJOR-MODE)." "Display mode local bindings active in BUFFER-OR-MODE. Optional argument INTERACTIVE-P is non-nil if the calling command was invoked interactively." - (when (fboundp 'help-setup-xref) - (help-setup-xref - (list 'mode-local-describe-bindings-1 buffer-or-mode) - interactive-p)) + (help-setup-xref + (list 'mode-local-describe-bindings-1 buffer-or-mode) + interactive-p) (with-output-to-temp-buffer (help-buffer) ; "*Help*" (with-current-buffer standard-output (mode-local-describe-bindings-2 buffer-or-mode)))) diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el index ebc4159a4c..1d16b024a5 100644 --- a/lisp/cedet/semantic/senator.el +++ b/lisp/cedet/semantic/senator.el @@ -735,12 +735,9 @@ yanked to." Optional argument KILL-FLAG will delete the text of the tag to the kill ring. -Interactively, reads the register using `register-read-with-preview', -if available." - (interactive (list (if (fboundp 'register-read-with-preview) - (register-read-with-preview "Tag to register: ") - (read-char "Tag to register: ")) - current-prefix-arg)) +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Tag to register: ") + current-prefix-arg)) (semantic-fetch-tags) (let ((ft (semantic-obtain-foreign-tag))) (when ft diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 4ca53f108f..f740af3b6d 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -756,8 +756,7 @@ Export subscriptions to a buffer in OPML Format." (insert " \n" "\n")) (pop-to-buffer "*OPML Export*") - (when (fboundp 'sgml-mode) - (sgml-mode))) + (sgml-mode)) (defun nnrss-generate-download-script () "Generate a download script in the current buffer. diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 113fbbaddf..7ae58884f9 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -2217,8 +2217,7 @@ Export subscriptions to a buffer in OPML Format." (newsticker--opml-insert-feed (car f) 4))) (insert " \n\n"))) (pop-to-buffer "*OPML Export*") - (when (fboundp 'sgml-mode) - (sgml-mode))) + (sgml-mode)) (defun newsticker--opml-insert-elt (elt depth) "Insert an OPML ELT with indentation level DEPTH." diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 907d50889a..e72576cdc7 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2257,8 +2257,7 @@ IGNORE-WORDS List of words which should be removed from the string." ("Customize" ["Browse RefTeX Group" reftex-customize t] "--" - ["Build Full Customize Menu" reftex-create-customize-menu - (fboundp 'customize-menu-create)]) + ["Build Full Customize Menu" reftex-create-customize-menu]) ("Documentation" ["Info" reftex-info t] ["Commentary" reftex-show-commentary t]))) diff --git a/lisp/woman.el b/lisp/woman.el index c0c8f34348..fd5fee2005 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1813,8 +1813,7 @@ Argument EVENT is the invoking mouse event." "--" ["Describe (Wo)Man Mode" describe-mode t] ["Mini Help" woman-mini-help t] - ,@(if (fboundp 'customize-group) - '(["Customize..." (customize-group 'woman) t])) + ["Customize..." (customize-group 'woman) t] "--" ("Advanced" ["View Source" (view-file woman-last-file-name) woman-last-file-name] commit 01f48477d06f5b099aa71637bd690fef61d162d8 Author: Matthias Meulien Date: Tue May 17 23:36:27 2022 +0200 Update comment about comint-osc-handlers * lisp/comint.el: Update comment about comint-osc-handlers. diff --git a/lisp/comint.el b/lisp/comint.el index 3dc80c20ac..3da61fb992 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3978,10 +3978,12 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." ;;; OSC escape sequences (Operating System Commands) ;;============================================================================ -;; Adding `comint-osc-process-output' to `comint-output-filter-functions' -;; enables the interpretation of OSC escape sequences. By default, only -;; OSC 8, for hyperlinks, is acted upon. Adding more entries to -;; `comint-osc-handlers' allows a customized treatment of further sequences. +;; Adding `comint-osc-process-output' to +;; `comint-output-filter-functions' enables the interpretation of OSC +;; escape sequences. By default, OSC 7 and 8 (for current directory +;; and hyperlinks respectively) are acted upon. Adding more entries +;; to `comint-osc-handlers' allows a customized treatment of further +;; sequences. (defvar-local comint-osc-handlers '(("7" . comint-osc-directory-tracker) ("8" . comint-osc-hyperlink-handler)) commit 092aea9a27831a378ff8d1ab94a096675fe92343 Author: Lars Ingebrigtsen Date: Tue May 17 22:07:27 2022 +0200 Allow running several commands in compilation-start * lisp/progmodes/compile.el (compilation-start): Allow not erasing the contents of the buffer (bug#28892). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fdcd4a22c0..8b70e8400b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1813,7 +1813,8 @@ If nil, don't hide anything." (unless compilation-in-progress (force-mode-line-update t))) ;;;###autoload -(defun compilation-start (command &optional mode name-function highlight-regexp) +(defun compilation-start (command &optional mode name-function highlight-regexp + continue) "Run compilation command COMMAND (low level interface). If COMMAND starts with a cd command, that becomes the `default-directory'. The rest of the arguments are optional; for them, nil means use the default. @@ -1830,6 +1831,12 @@ If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight the matching section of the visited source line; the default is to use the global value of `compilation-highlight-regexp'. +If CONTINUE is non-nil, the buffer won't be emptied before +compilation is started. This can be useful if you wish to +combine the output from several compilation commands in the same +buffer. The new output will be at the end of the buffer, and +point is not changed. + Returns the compilation buffer created." (or mode (setq mode 'compilation-mode)) (let* ((name-of-mode @@ -1893,7 +1900,12 @@ Returns the compilation buffer created." (if (= (length expanded-dir) 1) (car expanded-dir) substituted-dir))))) - (erase-buffer) + (if continue + (progn + ;; Save the point so we can restore it. + (setq continue (point)) + (goto-char (point-max))) + (erase-buffer)) ;; Select the desired mode. (if (not (eq mode t)) (progn @@ -1919,12 +1931,13 @@ Returns the compilation buffer created." (if (or compilation-auto-jump-to-first-error (eq compilation-scroll-output 'first-error)) (setq-local compilation-auto-jump-to-next t)) - ;; Output a mode setter, for saving and later reloading this buffer. - (insert "-*- mode: " name-of-mode - "; default-directory: " - (prin1-to-string (abbreviate-file-name default-directory)) - " -*-\n" - (format "%s started at %s\n\n" + (when (zerop (buffer-size)) + ;; Output a mode setter, for saving and later reloading this buffer. + (insert "-*- mode: " name-of-mode + "; default-directory: " + (prin1-to-string (abbreviate-file-name default-directory)) + " -*-\n")) + (insert (format "%s started at %s\n\n" mode-name (substring (current-time-string) 0 19)) command "\n") @@ -1947,24 +1960,26 @@ Returns the compilation buffer created." (setq-local compilation-arguments (list command mode name-function highlight-regexp)) (setq-local revert-buffer-function 'compilation-revert-buffer) - (and outwin - ;; Forcing the window-start overrides the usual redisplay - ;; feature of bringing point into view, so setting the - ;; window-start to top of the buffer risks losing the - ;; effect of moving point to EOB below, per - ;; compilation-scroll-output, if the command is long - ;; enough to push point outside of the window. This - ;; could happen, e.g., in `rgrep'. - (not compilation-scroll-output) - (set-window-start outwin (point-min))) + (when (and outwin + (not continue) + ;; Forcing the window-start overrides the usual redisplay + ;; feature of bringing point into view, so setting the + ;; window-start to top of the buffer risks losing the + ;; effect of moving point to EOB below, per + ;; compilation-scroll-output, if the command is long + ;; enough to push point outside of the window. This + ;; could happen, e.g., in `rgrep'. + (not compilation-scroll-output)) + (set-window-start outwin (point-min))) ;; Position point as the user will see it. (let ((desired-visible-point - ;; Put it at the end if `compilation-scroll-output' is set. - (if compilation-scroll-output - (point-max) - ;; Normally put it at the top. - (point-min)))) + (cond + (continue continue) + ;; Put it at the end if `compilation-scroll-output' is set. + (compilation-scroll-output (point-max)) + ;; Normally put it at the top. + (t (point-min))))) (goto-char desired-visible-point) (when (and outwin (not (eq outwin (selected-window)))) (set-window-point outwin desired-visible-point))) commit 89ca98c59c827cc7187bc2d16f55d8736e7b836c Author: Protesilaos Stavrou Date: Tue May 17 22:16:31 2022 +0300 Use better word for "buffer" in Greek TUTORIAL (bug#55332) * TUTORIAL.el_GR: Replace all instances of "αποσβεστήρας" with the more accurate "ενταμιευτής". diff --git a/etc/tutorials/TUTORIAL.el_GR b/etc/tutorials/TUTORIAL.el_GR index b34fa5403c..88d9712b8e 100644 --- a/etc/tutorials/TUTORIAL.el_GR +++ b/etc/tutorials/TUTORIAL.el_GR @@ -318,7 +318,7 @@ C-x 1 μεγιστοποιεί το παράθυρο που περιέχει τ εξαφανίζεται. Υπάρχει σειρά εντολών που ξεκινούν με το CONTROL-x· πολλές εξ αυτών -έχουν να κάνουν με παράθυρα (windows), αρχεία (files), αποσβεστήρες +έχουν να κάνουν με παράθυρα (windows), αρχεία (files), ενταμιευτές (buffers), και τα σχετικά. Αυτές οι εντολές είναι δύο, τρία ή τέσσερα γράμματα μάκρος. @@ -571,20 +571,20 @@ Emacs. Κατά πολλούς τρόπους, είναι σαν να επεξ το Emacs θα σου ζητήσει να πληκτρολογήσεις το όνομα του. Το όνομα του αρχείου που εισάγεις εμφανίζεται στο κάτω μέρος της οθόνης. Η -τελευταία γραμμή ονομάζεται μικροαποσβεστήρας (minibuffer) όταν +τελευταία γραμμή ονομάζεται μικροενταμιευτής (minibuffer) όταν χρησιμοποιείται για τέτοιους σκοπούς εισαγωγής εντολής. Μπορείς να χρησιμοποιήσεις τις κοινές εντολές του Emacs για επεξεργασία κειμένου καθώς γράφεις το όνομα του αρχείου. Ενόσω δακτυλογραφείς το όνομα του αρχείο (ή κάθε άλλο κείμενο στον -μικροαποσβεστήρα), μπορείς να ακυρώσεις την εντολή με το C-g. +μικροενταμιευτή), μπορείς να ακυρώσεις την εντολή με το C-g. >> Πληκτρολόγησε C-x C-f και μετά C-g. Αυτό ακυρώνει τον - μικροαποσβεστήρα και την εντολή C-x C-f που τον χρησιμοποιούσε. + μικροενταμιευτή και την εντολή C-x C-f που τον χρησιμοποιούσε. Συνεπώς δεν θα βρεις κανένα αρχείο. Όταν ολοκληρώσεις την εισαγωγή του ονόματος ενός αρχείου, πάτα - για να την επικυρώσεις. Ο μικροαποσβεστήρας εξαφανίζεται + για να την επικυρώσεις. Ο μικροενταμιευτής εξαφανίζεται καθώς το C-x C-f αναλαμβάνει δράση για να βρει το αρχείο που του όρισες. @@ -614,80 +614,80 @@ Emacs. Κατά πολλούς τρόπους, είναι σαν να επεξ θεώρησε πως επεξεργάζεσαι ένα υφιστάμενο αρχείο. -* ΑΠΟΣΒΕΣΤΗΡΕΣ --------------- +* ΕΝΤΑΜΙΕΥΤΕΣ +------------- Εάν βρεις δεύτερο αρχείο με το C-x C-f, το πρώτο παραμένει εντός του Emacs. Μπορείς να επανέλθεις σε αυτό αν το ξαναβρείς με το C-x C-f. Έτσι δύναται να έχεις πολλά αρχεία ανοιχτά εντός του Emacs. Το Emacs αποθηκεύει το περιεχόμενο του κάθε αρχείου σε αντικείμενο το -οποίο ονομάζεται «αποσβεστήρας» (buffer). Η εξεύρεση αρχείου -δημιουργεί νέο αποσβεστήρα εντός του Emacs. Για να δεις την λίστα με -όλους τους υφιστάμενους αποσβεστήρες, πληκτρολόγησε +οποίο ονομάζεται «ενταμιευτής» (buffer). Η εξεύρεση αρχείου +δημιουργεί νέο ενταμιευτή εντός του Emacs. Για να δεις την λίστα με +όλους τους υφιστάμενους ενταμιευτές, πληκτρολόγησε - C-x C-b Παράθεσε αποσβεστήρες + C-x C-b Παράθεσε ενταμιευτές >> Δοκίμασε το C-x C-b τώρα. -Παρατήρησε πως κάθε αποσβεστήρας έχει όνομα ενώ δύναται να έχει επίσης +Παρατήρησε πως κάθε ενταμιευτής έχει όνομα ενώ δύναται να έχει επίσης κι όνομα αρχείου του οποίο το περιεχόμενο κρατεί. ΟΤΙΔΗΠΟΤΕ βλέπεις -σε παράθυρο Emacs πάντα είναι μέρος ενός αποσβεστήρα. +σε παράθυρο Emacs πάντα είναι μέρος ενός ενταμιευτή. >> Πληκτρολόγησε C-x 1 για να εξαφανίσεις το παράθυρο που παραθέτει - τους αποσβεστήρες. + τους ενταμιευτές. -Όταν έχεις πολλούς αποσβεστήρες, μόνο ένας είναι ο «τρέχον» σε κάθε -στιγμή. Πρόκειται για τον αποσβεστήρα που επεξεργάζεσαι. Εάν θες να -επεξεργαστείς κάποιον άλλο αποσβεστήρα, πρέπει να «μεταβείς» σε αυτόν. -Αν θα μεταβείς σε αποσβεστήρας που επισκέπτεται αρχείο, μπορείς να το +Όταν έχεις πολλούς ενταμιευτές, μόνο ένας είναι ο «τρέχον» σε κάθε +στιγμή. Πρόκειται για τον ενταμιευτή που επεξεργάζεσαι. Εάν θες να +επεξεργαστείς κάποιον άλλο ενταμιευτή, πρέπει να «μεταβείς» σε αυτόν. +Αν θα μεταβείς σε ενταμιευτής που επισκέπτεται αρχείο, μπορείς να το κάνεις με το C-x C-f προσδιορίζοντας το όνομα του αρχείου. Αλλά υπάρχει ευκολότερος τρόπος: χρησιμοποίησε την εντολή C-x b. Σε αυτή -την εντολή, πρέπει να εισάγεις το όνομα του αποσβεστήρα. +την εντολή, πρέπει να εισάγεις το όνομα του ενταμιευτή. >> Δημιούργησε αρχείο ονόματι «foo»: γράψε C-x C-f foo . Μετά πληκτρολόγησε C-x b TUTORIAL.el_GR για να επιστρέψεις σε αυτό το κείμενο εκμάθησης του Emacs. -Συνήθως, το όνομα του αποσβεστήρα αντιστοιχεί σε αυτό του αρχείου +Συνήθως, το όνομα του ενταμιευτή αντιστοιχεί σε αυτό του αρχείου (χωρίς το μέρος του αρχείου που αναφέρει τον κατάλογο/φάκελο στον οποίο βρίσκεται). Ωστόσο αυτό δεν ισχύει πάντοτε. Η παράθεση -αποσβεστήρων που φτιάχνει το C-x C-b δείχνει τόσο το όνομα του -αποσβεστήρα όσο κι αυτό του αρχείου. +ενταμιευτών που φτιάχνει το C-x C-b δείχνει τόσο το όνομα του +ενταμιευτή όσο κι αυτό του αρχείου. -Κάποιοι αποσβεστήρες δεν ανταποκρίνονται σε αρχεία. Ο αποσβεστήρας +Κάποιοι ενταμιευτές δεν ανταποκρίνονται σε αρχεία. Ο ενταμιευτής ονόματι «*Buffer List*», που περιέχει τα στοιχεία του C-x C-b, δεν -έχει κάποιο υποκείμενο αρχείο. Ο αποσβεστήρας αυτού του +έχει κάποιο υποκείμενο αρχείο. Ο ενταμιευτής αυτού του TUTORIAL.el_GR αρχικά δεν είχε κάποιο αρχείο, αλλά τώρα έχει, καθώς στην προηγούμενη ενότητα χρησιμοποίησες το C-x C-s για να τον αποθηκεύσεις σε αρχείο. -Ο αποσβεστήρας με το όνομα «*Messages*» επίσης δεν έχει αρχείο. Αυτός +Ο ενταμιευτής με το όνομα «*Messages*» επίσης δεν έχει αρχείο. Αυτός περιέχει όλα τα μηνύματα που εμφανίζονται στο κάτω μέρος της οθόνης κατά την λειτουργία του Emacs. ->> Πληκτρολόγησε C-x b *Messages* για να δεις τον αποσβεστήρα +>> Πληκτρολόγησε C-x b *Messages* για να δεις τον ενταμιευτή με τα μηνύματα. Μετά πληκτρολόγησε C-x b TUTORIAL.el_GR για να επανέλθεις εδώ. Εάν κάνεις αλλαγές στο κείμενο ενός αρχείου, μετά βρεις κάποιο άλλο αρχείο, η πράξη αυτή δεν αποθηκεύει τις αλλαγές που έκανες στο πρώτο -αρχείο. Οι αλλαγές παραμένουν εντός του Emacs, στον αποσβεστήρα που +αρχείο. Οι αλλαγές παραμένουν εντός του Emacs, στον ενταμιευτή που ανταποκρίνεται σε εκείνο το αρχείο. Η δημιουργία ή επεξεργασία του δεύτερου αρχείου δεν επηρεάζει το πρώτο. Αυτό είναι πολύ χρήσιμο, ωστόσο σημαίνει πως χρειάζεσαι έναν βολικό τρόπο να αποθηκεύεις -αλλαγές σε πολλούς αποσβεστήρες. Το να πρέπει να επιστρέψεις στο +αλλαγές σε πολλούς ενταμιευτές. Το να πρέπει να επιστρέψεις στο πρώτο αρχείο απλά και μόνο για να το αποθηκεύσεις είναι ενοχλητικό. Οπότε έχουμε - C-x s Αποθήκευσε ορισμένους αποσβεστήρες στα αρχεία τους + C-x s Αποθήκευσε ορισμένους ενταμιευτές στα αρχεία τους -Το C-x s ρωτά για κάθε αποσβεστήρα που επισκέπτεται αρχείο και που +Το C-x s ρωτά για κάθε ενταμιευτή που επισκέπτεται αρχείο και που κρατά αλλαγές οι οποίες δεν έχουν αποθηκευτεί. Σε ρωτά για κάθε -αποσβεστήρα κατά πόσον να αποθηκευτούν οι αλλαγές του στο αρχείο. +ενταμιευτή κατά πόσον να αποθηκευτούν οι αλλαγές του στο αρχείο. >> Εισήγαγε μια γραμμή κειμένου και πληκτρολόγησε C-x s. - Θα σε ρωτήσει κατά πόσον θες να αποθηκεύσεις τον αποσβεστήρα με + Θα σε ρωτήσει κατά πόσον θες να αποθηκεύσεις τον ενταμιευτή με όνομα TUTORIAL.el_GR. Απάντα καταφατικά με το «y» (yes). @@ -729,10 +729,10 @@ Emacs. Στα πλείστα περιβλήματα, μπορείς να επα Υπάρχουν πολλές εντολές του τύπου C-x. Παραθέτουμε αυτές που έμαθες: C-x C-f Εξεύρεση αρχείου - C-x C-s Αποθήκευση αποσβεστήρα σε αρχείο - C-x s Αποθήκευση μερικών αποσβεστήρων στα αρχεία τους - C-x C-b Παράθεση αποσβεστήρων - C-x b Μετάβαση σε αποσβεστήρα + C-x C-s Αποθήκευση ενταμιευτή σε αρχείο + C-x s Αποθήκευση μερικών ενταμιευτών στα αρχεία τους + C-x C-b Παράθεση ενταμιευτών + C-x b Μετάβαση σε ενταμιευτή C-x C-c Έξοδος από το Emacs C-x 1 Διαγραφή όλων πλην ενός παραθύρου C-x u Αναίρεση @@ -741,7 +741,7 @@ Emacs. Στα πλείστα περιβλήματα, μπορείς να επα λιγότερη συχνότητα, ή εντολές που χρησιμοποιούνται μόνο σε συγκεκριμένες λειτουργίες. Ως παράδειγμα έχουμε την εντολή replace-string, η οποία αντικαθιστά μια σειρά (αλληλουχία) χαρακτήρων -με μια άλλη εντός του αποσβεστήρα. Όταν πληκτρολογείς M-x, το Emacs +με μια άλλη εντός του ενταμιευτή. Όταν πληκτρολογείς M-x, το Emacs σε προτρέπει στο κάτω μέρος της οθόνης για το όνομα της εντολής· «replace-string» σε αυτή την περίπτωση. Απλά να πληκτρολογήσεις το «repl s» και το Emacs θα ολοκληρώσει το όνομα. ( αναφέρεται @@ -803,11 +803,11 @@ recover-this-file . Όταν σου ζητηθεί επιβεβαίωσ Ήδη γνωρίζεις τι σημαίνει το πεδίο ονόματος του αρχείου--αναφέρει το αρχείο που έχεις επισκεφθεί. Το ΝΝ% δείχνει την τρέχουσα θέση σου -στον αποσβεστήρα του κειμένου: σημαίνει πως ΝΝ επί τις εκατό του -αποσβεστήρα βρίσκεται πέρα από το πάνω μέρος της οθόνης. Εάν το πάνω +στον ενταμιευτή του κειμένου: σημαίνει πως ΝΝ επί τις εκατό του +ενταμιευτή βρίσκεται πέρα από το πάνω μέρος της οθόνης. Εάν το πάνω μέρος περιέχει όλο το προηγούμενο κείμενο, τότε θα γράφει «Top» αντί -για «0%». Αν είναι στο κάτω μέρος του αποσβεστήρα, τότε θα αναγράφει -«Bot». Αν ο αποσβεστήρας είναι μικρός ώστε όλο το περιεχόμενο του να +για «0%». Αν είναι στο κάτω μέρος του ενταμιευτή, τότε θα αναγράφει +«Bot». Αν ο ενταμιευτής είναι μικρός ώστε όλο το περιεχόμενο του να χωράει στην οθόνη, τότε η γραμμή κατάστασης θα γράφει «All». Το L και τα ψηφία δείχνουν την θέση με άλλο τρόπο: τον αριθμό της @@ -1018,7 +1018,7 @@ CONTROL-v, διότι CONTROL--v δεν θα δουλέψει. Αυτό γ (Άν πατούσες C-x 1 στο κάτω παράθυρο, θα έκλεινες το πάνω. Φαντάσου πως αυτή η εντολή λέει «κράτα ένα παράθυρο--αυτό που έχω επιλεγμένο.») -Δεν είναι απαραίτητο να παρουσιάζεις τον ίδιο αποσβεστήρα σε πολλά +Δεν είναι απαραίτητο να παρουσιάζεις τον ίδιο ενταμιευτή σε πολλά παράθυρα. Αν χρησιμοποιήσεις το C-x C-f για να βρεις ένα αρχείο στο ένα παράθυρο, το έτερο παράθυρο δεν αλλάζει. Μπορείς να βρεις ένα αρχείο σε κάθε παράθυρο ανεξάρτητα από τα άλλα. @@ -1073,9 +1073,9 @@ CONTROL-v, διότι CONTROL--v δεν θα δουλέψει. Αυτό γ Για να βγεις από επίπεδο αναδρομικής επεξεργασίας, πληκτρολόγησε . Αυτή είναι η γενική εντολή εξόδου. Μπορείς να την χρησιμοποιήσεις για να κλείσεις όλα τα έτερα παράθυρα και για να βγεις -από τον μικροαποσβεστήρα. +από τον μικροενταμιευτή. ->> Πληκτρολόγησε M-x για να μπεις στον μικροαποσβεστήρα· κατόπιν πάτα +>> Πληκτρολόγησε M-x για να μπεις στον μικροενταμιευτή· κατόπιν πάτα για να εξέλθεις. Δεν μπορείς να χρησιμοποιήσεις C-g για να βγεις από επίπεδο @@ -1167,7 +1167,7 @@ C-h k αντί του C-h c. >> Πληκτρολόγησε C-x 1 για να κλείσεις το παράθυρο βοηθείας. C-h i Διάβασε τα εγχειρίδια (Info manuals). Αυτή η εντολή - σε βάζει σε ειδικό αποσβεστήρα που ονομάζεται «*info*» + σε βάζει σε ειδικό ενταμιευτή που ονομάζεται «*info*» όπου μπορείς να διαβάσεις εγχειρίδια για τις συσκευασίες που είναι εγκατεστημένες στο σύστημα σου. Πληκτρολόγησε m emacs για να διαβάσεις το @@ -1188,7 +1188,7 @@ C-h k αντί του C-h c. δακτυλογράφηση, και το Dired, που απλοποιεί την διαχείριση αρχείων. Η ολοκλήρωση είναι τρόπος αποφυγής αχρείαστης πληκτρολόγησης. Για -παράδειγμα, αν θες να μεταβείς στον αποσβεστήρα *Messages*, +παράδειγμα, αν θες να μεταβείς στον ενταμιευτή *Messages*, πληκτρολογείς C-x b *M και το Emacs θα συμπληρώσει το υπόλοιπο του ονόματος ως εκεί που μπορεί να κρίνει αντιστοιχία με αυτό που έχεις ήδη γράψει. Η ολοκλήρωση δουλεύει επίσης για ονόματα εντολών κι commit f719250f77cf3aa7a9cdf02011375f9d1e7a3775 Author: Lars Ingebrigtsen Date: Tue May 17 21:00:25 2022 +0200 Fix bogus future history entries for `M-x grep' * lisp/net/mailcap.el (mailcap-file-default-commands): If we have no matching MIME types, don't iterate over (nil) (bug#27236). This fixes things like: (mailcap-file-default-commands '("grep --color=auto -nH --null '' ")) => ("/usr/bin/emacs -nw") diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index b65f7c25b8..8ba7f1bec3 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -1098,11 +1098,12 @@ For instance, `image/png' will result in `png'." (mailcap-parse-mimetypes) (let* ((all-mime-type ;; All unique MIME types from file extensions - (delete-dups - (mapcar (lambda (file) - (mailcap-extension-to-mime - (file-name-extension file t))) - files))) + (delq nil + (delete-dups + (mapcar (lambda (file) + (mailcap-extension-to-mime + (file-name-extension file t))) + files)))) (all-mime-info ;; All MIME info lists (delete-dups commit 514cfbb267ee678f5b2d6aa6c9824fb32b3ac69d Author: Lars Ingebrigtsen Date: Tue May 17 20:01:11 2022 +0200 Explain more about jit-lock-mode calling conventions * lisp/jit-lock.el (jit-lock-mode): Explicitly explain ARG (bug#55451). diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 20c1202474..17969d5762 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -217,6 +217,11 @@ If the system load rises above `jit-lock-stealth-load' percent, stealth fontification is suspended. Stealth fontification intensity is controlled via the variable `jit-lock-stealth-nice'. +`jit-lock-mode' is not a regular minor mode, and it doesn't +follow the regular conventions to switch the functionality on or +off. Instead, an ARG of nil will switch it off, and non-nil will +switch it on. + If you need to debug code run from jit-lock, see `jit-lock-debug-mode'." (setq jit-lock-mode arg) (cond commit 6e61f9ec8a2c14699499f597edc6fdc7f4b1f0bd Author: Lars Ingebrigtsen Date: Tue May 17 19:45:20 2022 +0200 Fix pp-emacs-lisp-code printing of cons cells * lisp/emacs-lisp/pp.el (pp--insert-lisp): Fix printing of cons cells (bug#55478). diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index ad693fa5a6..3c849c2d01 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -250,7 +250,7 @@ Use the `pp-max-width' variable to control the desired line length." (set-marker (make-marker) (1- (point)))))) (pp--format-list sexp))) (t - (princ sexp (current-buffer))))) + (prin1 sexp (current-buffer))))) ;; Print some of the smaller integers as characters, perhaps? (integer (if (<= ?0 sexp ?z) diff --git a/test/lisp/emacs-lisp/pp-resources/code-formats.erts b/test/lisp/emacs-lisp/pp-resources/code-formats.erts index 002a5cf165..c3e3023cb1 100644 --- a/test/lisp/emacs-lisp/pp-resources/code-formats.erts +++ b/test/lisp/emacs-lisp/pp-resources/code-formats.erts @@ -128,3 +128,15 @@ Name: code-formats12 =-= (global-set-key (kbd "s-x") #'kill-region) =-=-= + +Name: code-formats13 + +=-= +'("a") +=-=-= + +Name: code-formats14 + +=-= +'("a" . "b") +=-=-= commit 45ec56f5bd0832285a7b03c2ceaa5546ba59652d Author: Robert Pluim Date: Tue May 17 17:38:18 2022 +0200 Correct cycle-spacing-actions type * lisp/simple.el (cycle-spacing-actions): Fix type for predefined action with fixed numeric arg case. diff --git a/lisp/simple.el b/lisp/simple.el index 4229a898cb..cd7a82b7ac 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1177,7 +1177,7 @@ and ARG is either (list :tag "Action with modified arg" (choice ,@actions) (choice (const :tag "Inverted prefix arg" inverted-arg) - (const :tag "Fixed numeric arg" integer) + (integer :tag "Fixed numeric arg") (const :tag "Negative arg" -))) (const :tag "Restore the original spacing" restore)))) :version "29.1") commit 731ccac82806bc0823f23d5acad7894b998905e7 Author: Robert Pluim Date: Tue May 17 17:23:03 2022 +0200 Clarify 'cycle-spacing-actions' docstring * lisp/simple.el (cycle-spacing-actions): Clarify docstring. diff --git a/lisp/simple.el b/lisp/simple.el index f352a55e16..4229a898cb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1153,7 +1153,8 @@ which accepts one argument is allowed. It receives the raw prefix arg of this cycle. In addition, an action may take the form (ACTION ARG) where -ACTION is any action except for `restore' and ARG is either +ACTION is one of the predefined actions (except for `restore') +and ARG is either - an integer with the meaning that ACTION should always use this fixed integer instead of the actual prefix arg or - the symbol `inverted-arg' with the meaning that ACTION should commit 9d38470142af43795022ec8812ce6b1a0008804b Author: Robert Pluim Date: Tue May 17 17:20:34 2022 +0200 ; * lisp/simple.el (cycle-spacing-actions): Fix typo diff --git a/lisp/simple.el b/lisp/simple.el index 71c99a442d..f352a55e16 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1169,7 +1169,7 @@ ACTION is any action except for `restore' and ARG is either (const :tag "Delete spaces after point" delete-space-after) (const :tag "Delete spaces before point" delete-space-before) (const :tag "Delete all spaces around point" delete-all-space) - (function :tag "Function receiving a numerig arg")))) + (function :tag "Function receiving a numeric arg")))) `(repeat (choice ,@actions commit 18b14916a76a1509a0d3450ced5654117cb42489 Author: Michael Albinus Date: Tue May 17 17:27:15 2022 +0200 ; Fix typos in etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 0b5c5635cb..a27470dbc4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -37,7 +37,7 @@ can be enabled by configuring Emacs with the option '--with-be-app', which will require the Haiku Application Kit development headers and a C++ compiler to be present on your system. If Emacs is not built with the option '--with-be-app', the resulting Emacs will only run in -text-mode terminals. +'text-mode' terminals. +++ ** Cairo drawing support has been enabled for Haiku builds. @@ -65,7 +65,7 @@ headers installed, Emacs will use the X Input Extension for handling input. If this causes problems, you can configure Emacs with the option '--without-xinput2' to disable this support. -(featurep 'xinput2) can be used to test for the presence of XInput 2 +'(featurep 'xinput2)' can be used to test for the presence of XInput 2 support from Lisp programs. +++ @@ -137,7 +137,7 @@ of 'user-emacs-directory'. * Incompatible changes in Emacs 29.1 --- -** Isearch in *Help* and *info* now char-folds quote characters by default. +** Isearch in "*Help*" and "*info*" now char-folds quote characters by default. This means that you can say 'C-s `foo' (GRAVE ACCENT) if the buffer contains "‘foo" (LEFT SINGLE QUOTATION MARK) and the like. These quotation characters look somewhat similar in some fonts. To switch @@ -236,28 +236,28 @@ methods instead. +++ ** New variable 'current-time-list' governing default timestamp form. -Functions like 'current-time' now yield (TICKS . HZ) timestamps if this -new variable is nil. The variable defaults to t, which means these -functions default to timestamps of the forms (HI LO US PS), (HI LO US) -or (HI LO), which are less regular and less efficient. This is part -of a long-planned change first documented in Emacs 27. Developers are -encouraged to test timestamp-related code with this variable set to -nil, as it will default to nil in a future Emacs version and will be -removed some time after that. +Functions like 'current-time' now yield '(TICKS . HZ)' timestamps if +this new variable is nil. The variable defaults to t, which means +these functions default to timestamps of the forms '(HI LO US PS)', +'(HI LO US)' or '(HI LO)', which are less regular and less efficient. +This is part of a long-planned change first documented in Emacs 27. +Developers are encouraged to test timestamp-related code with this +variable set to nil, as it will default to nil in a future Emacs +version and will be removed some time after that. +++ -** Functions which recreate the *scratch* buffer now also initialize it. +** Functions which recreate the "*scratch*" buffer now also initialize it. When functions like 'other-buffer' and 'server-execute' recreate -*scratch*, they now also insert 'initial-scratch-message' and set +"*scratch*", they now also insert 'initial-scratch-message' and set the major mode according to 'initial-major-mode', like at Emacs startup. Previously, these functions ignored -'initial-scratch-message' and left *scratch* in 'fundamental-mode'. +'initial-scratch-message' and left "*scratch*" in 'fundamental-mode'. * Changes in Emacs 29.1 +++ -*** New user option 'switch-to-prev-buffer-skip-regexp'. +** New user option 'switch-to-prev-buffer-skip-regexp'. This should be a regexp or a list of regexps; buffers whose names match those regexps will be ignored by 'switch-to-prev-buffer' and 'switch-to-next-buffer'. @@ -400,7 +400,7 @@ tooltips. The existing GTK-specific option ** Non-native tooltips are now supported on Nextstep. This means Emacs built with GNUstep or built on macOS is now able to display different faces and images inside tooltips when the -'use-system-tooltips' variable is nil. +'use-system-tooltips' user option is nil. ** Connection-local variables @@ -490,8 +490,8 @@ command also works for non-Emoji characters.) --- *** New input method 'emoji'. -This allows you to enter emoji using short strings, eg :face_palm: or -:scream:. +This allows you to enter emoji using short strings, eg ':face_palm:' +or ':scream:'. ** Help @@ -500,7 +500,7 @@ This allows you to enter emoji using short strings, eg :face_palm: or +++ *** New doc string syntax to indicate that symbols shouldn't be links. -When displaying doc strings in *Help* buffers, strings that are +When displaying doc strings in "*Help*" buffers, strings that are "`like-this'" are made into links (if they point to a bound function/variable). This can lead to false positives when talking about values that are symbols that happen to have the same names as @@ -510,19 +510,19 @@ functions/variables. To inhibit this buttonification, the new +++ *** New user option 'help-window-keep-selected'. If non-nil, commands to show the info manual and the source will reuse -the same window the *Help* buffer is shown in. +the same window the "*Help*" buffer is shown in. --- *** Commands like 'C-h f' have changed how they describe menu bindings. For instance, previously a command might be described as having the following bindings: - It is bound to , C-x C-f, . + It is bound to , C-x C-f, . This has been changed to: - It is bound to and C-x C-f. - It can also be invoked from the menu: File → Visit New File... + It is bound to and C-x C-f. + It can also be invoked from the menu: File → Visit New File... +++ *** The 'C-h .' command now accepts a prefix argument. @@ -533,7 +533,7 @@ instead. --- *** New user option 'help-enable-variable-value-editing'. -If enabled, 'e' on a value in *Help* will pop you to a new buffer +If enabled, 'e' on a value in "*Help*" will pop you to a new buffer where you can edit the value. This is not enabled by default, because it's easy to make an edit that yields an invalid result. @@ -671,7 +671,7 @@ Rcirc will use the default 'completion-at-point' mechanism. The conventional IRC behaviour of completing by cycling through the available options can be restored by enabling this option. -** imenu +** Imenu +++ *** 'imenu' is now bound to 'M-g i' globally. @@ -684,12 +684,13 @@ recreate it anew next time 'imenu' is invoked. * Editing Changes in Emacs 29.1 +++ -** M-SPC is now bound to 'cycle-spacing' (formerly it invoked 'just-one-space'). -The actions performed by 'cycle-spacing' and their order can now be -customized via the variable 'cycle-spacing-actions'. +** 'M-SPC' is now bound to 'cycle-spacing'. +Formerly it invoked 'just-one-space'. The actions performed by +'cycle-spacing' and their order can now be customized via the user +option 'cycle-spacing-actions'. --- -** 'scroll-other-window' and 'scroll-other-window-down' now respects remapping. +** 'scroll-other-window' and 'scroll-other-window-down' now respect remapping. These commands (bound to 'C-M-v' and 'C-M-V') used to scroll the other windows without looking a customizations in that other window. These functions now check whether they have been rebound in the buffer in @@ -808,14 +809,17 @@ so automatically. *** New user option 'sh-indent-statement-after-and'. This controls how statements like the following are indented: - foo && - bar + foo && + bar +** Cperl Mode --- *** New user option 'cperl-file-style'. This option determines the indentation style to be used. It can also be used as a file-local variable. +** Gud + --- *** 'gud-go' is now bound to 'C-c C-v'. If given a prefix, it will query the user for an argument to use for @@ -828,7 +832,7 @@ the run/continue command. This is bound to 'H' and toggles whether to hide or show the widget contents. -** ispell +** Ispell --- *** 'ispell-region' and 'ispell-buffer' now push the mark. @@ -836,10 +840,10 @@ These commands push onto the mark ring the location of the last misspelled word where corrections were offered, so that you can then skip back to that location with 'C-x C-x'. -** dabbrev +** Dabbrev --- -*** New function 'dabbrev-capf' for use on 'completion-at-point-functions' +*** New function 'dabbrev-capf' for use on 'completion-at-point-functions'. +++ *** New user option 'dabbrev-ignored-buffer-modes'. @@ -848,17 +852,17 @@ this includes "binary" buffers like 'archive-mode' and 'image-mode'. ** Package -+++ -*** New command 'package-update-all'. -This command allows updating all packages without any queries. - +++ *** New command 'package-update'. This command allows you to upgrade packages without using 'M-x list-packages'. +++ -*** New DWIM action on 'x'. +*** New command 'package-update-all'. +This command allows updating all packages without any queries. + ++++ +*** New DWIM action on 'x' in "*Packages*" buffer. If no packages are marked, 'x' will install the package under point if it isn't already, and remove it if it is installed. @@ -866,14 +870,14 @@ it isn't already, and remove it if it is installed. +++ *** New command 'scratch-buffer'. -This command switches to the *scratch* buffer. If *scratch* doesn't +This command switches to the "*scratch*" buffer. If "*scratch*" doesn't exist, the command creates it first. You can use this command if you -inadvertently delete the *scratch* buffer. +inadvertently delete the "*scratch*" buffer. ** Debugging *** New user option 'debug-allow-recursive-debug'. -This user option controls whether the 'e' (in a *Backtrace* +This user option controls whether the 'e' (in a "*Backtrace*" buffer or while edebugging) and 'C-x C-e' (while edebugging) commands lead to a (further) backtrace. By default, this variable is nil, which is a change in behaviour from previous Emacs versions. @@ -886,7 +890,7 @@ This can be used to make specific parts of compilation output invisible. +++ -*** The 'compilation-auto-jump-to-first-error' has been extended. +*** The 'compilation-auto-jump-to-first-error' user option has been extended. It can now have the additional values 'if-location-known' (which will only jump if the location of the first error is known), and 'first-known' (which will jump to the first known error location). @@ -913,7 +917,7 @@ This mode adds some highlighting, fixes the 'M-q' command, and has commands for doing maintenance. --- -** kmacro +** Kmacro Kmacros are now OClosures and have a new constructor 'kmacro' which uses the 'key-parse' syntax. It replaces the old 'kmacro-lambda-form' (which is now declared obsolete). @@ -1027,7 +1031,7 @@ For instance, to enable jumping to the "*Messages*" buffer with (set-register ?m '(buffer . "*Messages*")) -** pixel-fill +** Pixel-fill +++ *** This is a new package that deals with filling variable-pitch text. @@ -1046,7 +1050,7 @@ This fills the region to be no wider than a specified pixel width. This will take you to the gnu.org web server's version of the current info node. This command only works for the Emacs and Emacs Lisp manuals. -** vc +** VC +++ *** New command '%' ('vc-dir-mark-by-regexp'). @@ -1123,12 +1127,12 @@ comment parts (see RFC 5322 for definitions). In both cases, the phrase part will be automatically quoted if necessary. +++ -*** New function 'eudc-capf-complete' with message-mode integration +*** New function 'eudc-capf-complete' with 'message-mode' integration. EUDC can now contribute email addresses to 'completion-at-point' by adding the new function 'eudc-capf-complete' to -'completion-at-point-functions' in message-mode. +'completion-at-point-functions' in 'message-mode'. -** eww/shr +** EWW/SHR +++ *** New user option to automatically rename EWW buffers. @@ -1198,7 +1202,7 @@ supports the unified search syntax. --- *** 'gnus-html-image-cache-ttl' is now a seconds count. -Formerly it was a pair of numbers (A B) that represented 65536*A + B, +Formerly it was a pair of numbers '(A B)' that represented 65536*A + B, to cater to older Emacs implementations that lacked bignums. The older form still works but is undocumented. @@ -1207,7 +1211,7 @@ The older form still works but is undocumented. +++ *** 'slot-value' can now be used to access slots of 'cl-defstruct' objects. -** align +** Align --- *** Alignment in 'text-mode' has changed. @@ -1230,7 +1234,7 @@ displayed in the "*Help*" buffer will be linked to the documentation for the command they are bound to. This does not affect listings of key bindings and functions (such as 'C-h b'). -** info-look +** Info-look --- *** info-look specs can now be expanded at run time instead of a load time. @@ -1238,19 +1242,19 @@ The new ':doc-spec-function' element can be used to compute the ':doc-spec' element when the user asks for info on that particular mode (instead of at load time). -** subr-x +** Subr-x +++ *** New macro 'with-memoization' provides a very primitive form of memoization. -** ansi-color +** Ansi-color --- *** Support for ANSI 256-color and 24-bit colors. 256-color and 24-bit color codes are now handled by ANSI color filters and displayed with the specified color. -** term-mode +** Term-mode --- *** New user option 'term-bind-function-keys'. @@ -1259,7 +1263,7 @@ underlying shell instead of using the normal Emacs bindings. --- *** Support for ANSI 256-color and 24-bit colors, italic and other fonts. -Term-mode can now display 256-color and 24-bit color codes. It can +'term-mode' can now display 256-color and 24-bit color codes. It can also handle ANSI codes for faint, italic and blinking text, displaying it with new 'term-{faint,italic,slow-blink,fast-blink}' faces. @@ -1357,11 +1361,11 @@ user options that are no longer needed are now obsolete: *** Navigation and marking commands now work in image display buffer. The following new bindings have been added: - n or SPC image-dired-display-next-thumbnail-original - p or DEL image-dired-display-previous-thumbnail-original - m image-dired-mark-thumb-original-file - d image-dired-flag-thumb-original-file - u image-dired-unmark-thumb-original-file + n or SPC image-dired-display-next-thumbnail-original + p or DEL image-dired-display-previous-thumbnail-original + m image-dired-mark-thumb-original-file + d image-dired-flag-thumb-original-file + u image-dired-unmark-thumb-original-file --- *** Reduce dependency on external "exiftool" command. @@ -1835,7 +1839,7 @@ This returns non-nil if its argument its an uppercase character. *** Byte compilation will now warn about some malformed 'defcustom' types. It's very common to write 'defcustom' types on the form: - :type '(choice (const :tag "foo" 'bar)) + :type '(choice (const :tag "foo" 'bar)) I.e., double-quoting the 'bar', which is almost never the correct value. The byte compiler will now issue a warning if it encounters @@ -1849,8 +1853,8 @@ been auto-saved since the time of last modification. --- *** New minor mode 'isearch-fold-quotes-mode'. This sets up 'search-default-mode' so that quote characters are -char-folded into each other. It is used, by default, in *Help* and -*info* buffers. +char-folded into each other. It is used, by default, in "*Help*" and +"*info*" buffers. +++ ** New macro 'buffer-local-set-state'. @@ -1873,7 +1877,7 @@ available only when Emacs was built with glibc as the C library. --- ** 'x-show-tip' no longer hard-codes a timeout default. The new 'x-show-tooltip-timeout' variable allows the user to alter -this for packages that don't use 'tooltip-show', but instead calls the +this for packages that don't use 'tooltip-show', but instead call the lower level function directly. +++ @@ -2049,7 +2053,7 @@ Use 'buffer-match-p' to gather a list of buffers that match a condition. --- -** New arguments 'text-face' and 'default-face' for 'tooltip-show'. +** New optional arguments 'text-face' and 'default-face' for 'tooltip-show'. They allow changing the faces used for the tooltip text and frame colors of the resulting tooltip frame from the default 'tooltip' face. @@ -2294,7 +2298,7 @@ descriptor, which means to insert an image in that column instead of text. See the documentation string of that variable for details. +++ -** :keys in 'menu-item' can now be a function. +** ':keys' in 'menu-item' can now be a function. If so, it is called whenever the menu is computed, and can be used to calculate the keys dynamically. @@ -2431,8 +2435,8 @@ temporary transition aid for Emacs 27, has served its purpose. +++ ** 'encode-time' now also accepts a 6-element list with just time and date. -(encode-time (list SECOND MINUTE HOUR DAY MONTH YEAR)) is now short for -(encode-time (list SECOND MINUTE HOUR DAY MONTH YEAR nil -1 nil)). +'(encode-time (list SECOND MINUTE HOUR DAY MONTH YEAR))' is now short for +'(encode-time (list SECOND MINUTE HOUR DAY MONTH YEAR nil -1 nil))'. +++ ** 'date-to-time' now assumes earliest values if its argument lacks @@ -2518,12 +2522,12 @@ To disable double-buffering (e.g., if it causes display problems), set the frame parameter 'inhibit-double-buffering' to a non-nil value. You can do that either by adding - '(inhibit-double-buffering . t) + '(inhibit-double-buffering . t) to 'default-frame-alist', or by modifying the frame parameters of the selected frame by evaluating - (modify-frame-parameters nil '((inhibit-double-buffering . t))) + (modify-frame-parameters nil '((inhibit-double-buffering . t))) +++ *** Emacs now supports system dark mode. commit 1cf590065d64beea99bff5f9c4b358c94c2d14b0 Author: Eli Zaretskii Date: Tue May 17 16:21:34 2022 +0300 ; * etc/NEWS: Rewrite entries for added support of old scripts. diff --git a/etc/NEWS b/etc/NEWS index 6f9c434e81..0b5c5635cb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -777,45 +777,22 @@ Setting it to a non-nil value temporarily disables automatic composition of character sequences at point, and thus makes it easier to edit such sequences by allowing point to "enter" the sequence. -*** New language environment "Northern Thai". -This uses the Tai Tham script, whose support has been enhanced. - -*** New language environment "Brahmi". -This language environment supports Brahmi, which is a historical -script that was used in ancient South Asia. A new input method, -'brahmi', is provided to type text in this script. - -*** New language environment "Kaithi". -This language environment supports Kaithi or Kayasthi, which was -an important writing system of the past mainly used for administrative -purposes. A new input method, 'kaithi', is provided to type text in -this script. - -*** New language environment "Tirhuta". -This language environment supports Tirhuta or Mithilaakshar, which is -used to write the Maithili language. A new input method, 'tirhuta', -is provided to type text in this script. - -*** New language environment "Sharada". -This language environment supports the Sharada script. Named after the -goddess of learning, this script is used to write the Kashmiri language. -A new input method, 'sharada', is provided to type text in this script. - -*** New language environment "Siddham". -This language environment supports the Siddham script for the Sanskrit -language. Nowadays it is mostly used by the Buddhist monks in Japan for -religious writings. A new input method, 'siddham', is provided to type -text in this script. - -*** New language environment "Syloti Nagri". -This language environment supports the Syloti Nagri script for the Sylheti -language, which is spoke in parts of Bangladesh, Assam and Tripura. A new -input method, 'syloti-nagri', is provided to type text in this script. - -*** New language environment "Modi". -This language environment supports the Modi script which was used to write -the Marathi language in the past. A new input method, 'modi', is provided -to type text in this script. +*** Support for many old scripts and writing systems. +Emacs now supports and has language-environments and input methods for +several dozens of old scripts that were used in the past for various +languages in South and South-East Asia. For each such script Emacs +now has font-selection and character composition rules, a language +environment, and an input method. The newly-added scripts and the +corresponding language environments are: + +**** Tai Tham script and the Northern Thai language environment +**** Brahmi script and language environment +**** Kaithi script and language environment +**** Tirhuta script and language environment +**** Sharada script and language environment +**** Siddham script and language environment +**** Syloti Nagri script and language environment +**** Modi script and language environment --- *** New Greek translation of the Emacs tutorial. commit 5c656182ce30372873ea2e3f1ffb555f52df9d95 Author: Po Lu Date: Tue May 17 13:13:18 2022 +0000 Avoid race conditions when computing real frame positions on Haiku * src/haiku_support.cc (DispatchMessage): Accept SEND_MOVE_FRAME_EVENT. (class EmacsWindow, FrameMoved): Include decorator frame in MOVE_EVENT events. (be_send_move_frame_event): New function. * src/haiku_support.h (struct haiku_move_event): Include decorator dimensions. Update prototypes. * src/haikufns.c (haiku_update_after_decoration_change): Ask for a move frame event and don't do anything if configury is not yet complete. * src/haikuterm.c (haiku_read_socket): Adjust accordingly. diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 299b37c1cc..28c8608584 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -106,6 +106,7 @@ enum SET_FONT_INDICES = 3012, SET_PREVIEW_DIALOG = 3013, UPDATE_PREVIEW_DIALOG = 3014, + SEND_MOVE_FRAME_EVENT = 3015, }; /* X11 keysyms that we use. */ @@ -993,6 +994,8 @@ class EmacsWindow : public BWindow haiku_write (WHEEL_MOVE_EVENT, &rq); }; } + else if (msg->what == SEND_MOVE_FRAME_EVENT) + FrameMoved (Frame ().LeftTop ()); else BWindow::DispatchMessage (msg, handler); } @@ -1034,33 +1037,44 @@ class EmacsWindow : public BWindow } void - FrameMoved (BPoint newPosition) + FrameMoved (BPoint new_position) { struct haiku_move_event rq; + BRect frame, decorator_frame; + struct child_frame *f; + rq.window = this; - rq.x = std::lrint (newPosition.x); - rq.y = std::lrint (newPosition.y); + rq.x = std::lrint (new_position.x); + rq.y = std::lrint (new_position.y); + + frame = Frame (); + decorator_frame = DecoratorFrame (); + + rq.decorator_width + = std::lrint (frame.left - decorator_frame.left); + rq.decorator_height + = std::lrint (frame.top - decorator_frame.top); haiku_write (MOVE_EVENT, &rq); CHILD_FRAME_LOCK_INSIDE_LOOPER_CALLBACK { - for (struct child_frame *f = subset_windows; - f; f = f->next) + for (f = subset_windows; f; f = f->next) DoMove (f); child_frame_lock.Unlock (); - BWindow::FrameMoved (newPosition); + BWindow::FrameMoved (new_position); } } void WorkspacesChanged (uint32_t old, uint32_t n) { + struct child_frame *f; + CHILD_FRAME_LOCK_INSIDE_LOOPER_CALLBACK { - for (struct child_frame *f = subset_windows; - f; f = f->next) + for (f = subset_windows; f; f = f->next) DoUpdateWorkspace (f); child_frame_lock.Unlock (); @@ -5135,3 +5149,17 @@ be_get_window_decorator_frame (void *window, int *left, int *top, wnd->UnlockLooper (); } + +/* Request that a MOVE_EVENT be sent for WINDOW. This is so that + frame offsets can be updated after a frame parameter affecting + decorators changes. Sending an event instead of updating the + offsets directly avoids race conditions where events with older + information are received after the update happens. */ +void +be_send_move_frame_event (void *window) +{ + BWindow *wnd = (BWindow *) window; + BMessenger msg (wnd); + + msg.SendMessage (SEND_MOVE_FRAME_EVENT); +} diff --git a/src/haiku_support.h b/src/haiku_support.h index cdeb40f67c..22f13c1ee6 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -219,8 +219,9 @@ struct haiku_iconification_event struct haiku_move_event { void *window; - int x; - int y; + int x, y; + int decorator_width; + int decorator_height; }; struct haiku_wheel_move_event @@ -688,6 +689,7 @@ extern status_t be_roster_launch (const char *, const char *, char **, ptrdiff_t, void *, team_id *); extern void be_get_window_decorator_dimensions (void *, int *, int *, int *, int *); extern void be_get_window_decorator_frame (void *, int *, int *, int *, int *); +extern void be_send_move_frame_event (void *); #ifdef __cplusplus } diff --git a/src/haikufns.c b/src/haikufns.c index e8e303fd27..fa47da73d2 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -109,22 +109,15 @@ get_geometry_from_preferences (struct haiku_display_info *dpyinfo, static void haiku_update_after_decoration_change (struct frame *f) { - int x, y, width, height; - struct frame *parent; + /* Don't reset offsets during initial frame creation, since the + contents of f->left_pos and f->top_pos won't be applied to the + window until `x-create-frame' finishes, so setting them here will + overwrite the offsets that the window should be moved to. */ - be_get_window_decorator_frame (FRAME_HAIKU_WINDOW (f), - &x, &y, &width, &height); - - parent = FRAME_PARENT_FRAME (f); - - if (parent) - { - x = x - FRAME_OUTPUT_DATA (f)->frame_x; - y = y - FRAME_OUTPUT_DATA (f)->frame_x; - } + if (!FRAME_OUTPUT_DATA (f)->configury_done) + return; - f->left_pos = x; - f->top_pos = y; + be_send_move_frame_event (FRAME_HAIKU_WINDOW (f)); } void diff --git a/src/haikuterm.c b/src/haikuterm.c index d46228d02e..0952392210 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -3553,7 +3553,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) { struct haiku_move_event *b = buf; struct frame *f = haiku_window_to_frame (b->window); - int decorator_width, decorator_height, top, left; + int top, left; struct frame *p; if (!f) @@ -3565,12 +3565,8 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) if (FRAME_PARENT_FRAME (f)) haiku_coords_from_parent (f, &b->x, &b->y); - be_get_window_decorator_dimensions (b->window, &decorator_width, - &decorator_height, NULL, - NULL); - - left = b->x - decorator_width; - top = b->y - decorator_height; + left = b->x - b->decorator_width; + top = b->y - b->decorator_height; if (left != f->left_pos || top != f->top_pos) { commit 2414fa360354f4cd245c869813f131108ca1072a Author: समीर सिंह Sameer Singh Date: Tue May 17 04:33:57 2022 +0530 Add support for the Modi script * lisp/language/indian.el ("Modi"): New language environment. Add composition rules for Modi. Add sample text and input method. Add sample text to various scripts. Rename Punjabi to Gurmukhi. * lisp/international/fontset.el (script-representative-chars) (setup-default-fontset): Support Modi. * lisp/leim/quail/indian.el ("modi"): New input method. (Bug#55439) * etc/HELLO: Add a Modi greeting. Rename Hindi to Devanagari. Add a Gurmukhi greeting. Replace Odia greeting. * etc/NEWS: Announce the new language environment and its input method. diff --git a/etc/HELLO b/etc/HELLO index 16a38b59d3..ba7bd8e132 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -38,6 +38,7 @@ Comanche /kəˈmæntʃiː/ Haa marʉ́awe Cree (ᓀᐦᐃᔭᐍᐏᐣ) ᑕᓂᓯ / ᐙᒋᔮ Czech (čeština) Dobrý den Danish (dansk) Hej / Goddag / Halløj +Devanagari (देवनागरी) नमस्ते / नमस्कार Dutch (Nederlands) Hallo / Dag Efik /ˈɛfɪk/ Mɔkɔm Egyptian Hieroglyphs (𓂋𓏤𓈖𓆎𓅓‌𓏏𓊖) 𓅓𓊵𓏏𓊪, 𓇍𓇋𓂻𓍘𓇋 @@ -53,9 +54,9 @@ German (Deutsch) Guten Tag / Grüß Gott Greek (ελληνικά) Γειά σας Greek, ancient (ἑλληνική) Οὖλέ τε καὶ μέγα χαῖρε Gujarati (ગુજરાતી) નમસ્તે +Gurmukhi (ਗੁਰਮੁਖੀ) ਸਤ ਸ੍ਰੀ ਅਕਾਲ Hebrew (עִבְרִית) שָׁלוֹם Hungarian (magyar) Szép jó napot! -Hindi (हिंदी) नमस्ते / नमस्कार । Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ Italian (italiano) Ciao / Buon giorno Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ"); @@ -69,10 +70,11 @@ Malayalam (മലയാളം) നമസ്കാരം Maldivian (ދިވެހި) އައްސަލާމު ޢަލައިކުމް / ކިހިނެހް؟ Maltese (il-Malti) Bonġu / Saħħa Mathematics ∀ p ∈ world • hello p □ +Modi (𑘦𑘻𑘚𑘲) 𑘡𑘦𑘭𑘿𑘎𑘰𑘨 Mongolian (монгол хэл) Сайн байна уу? Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ) ᩈ᩠ᩅᩢᩔ᩠ᨯᩦᨣᩕᩢ᩠ᨸ Norwegian (norsk) Hei / God dag -Oriya (ଓଡ଼ିଆ) ଶୁଣିବେ +Oriya (ଓଡ଼ିଆ) ନମସ୍କାର Polish (język polski) Dzień dobry! / Cześć! Russian (русский) Здра́вствуйте! Sharada (𑆯𑆳𑆫𑆢𑆳) 𑆤𑆩𑆱𑇀𑆑𑆳𑆫 diff --git a/etc/NEWS b/etc/NEWS index 630288d431..6f9c434e81 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -807,11 +807,16 @@ language. Nowadays it is mostly used by the Buddhist monks in Japan for religious writings. A new input method, 'siddham', is provided to type text in this script. -*** New language environment "Syloti Nagri" +*** New language environment "Syloti Nagri". This language environment supports the Syloti Nagri script for the Sylheti language, which is spoke in parts of Bangladesh, Assam and Tripura. A new input method, 'syloti-nagri', is provided to type text in this script. +*** New language environment "Modi". +This language environment supports the Modi script which was used to write +the Marathi language in the past. A new input method, 'modi', is provided +to type text in this script. + --- *** New Greek translation of the Emacs tutorial. Type 'C-u C-h t' to select it in case your language setup does not do diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 0abbf2309c..40499f42d0 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -244,7 +244,7 @@ (newa #x11400) (tirhuta #x11481 #x1148F #x114D0) (siddham #x1158E #x115AF #x115D4) - (modi #x11600) + (modi #x1160E #x11630 #x11655) (takri #x11680) (dogra #x11800) (warang-citi #x118A1) @@ -782,6 +782,7 @@ sharada tirhuta siddham + modi makasar dives-akuru cuneiform diff --git a/lisp/language/indian.el b/lisp/language/indian.el index 559239b491..257ecc1617 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el @@ -45,8 +45,9 @@ (coding-system utf-8) (coding-priority utf-8) (input-method . "devanagari-aiba") + (sample-text . "Devanagari (देवनागरी) नमस्ते / नमस्कार") (documentation . "\ -Such languages using Devanagari script as Hindi and Marathi +Such languages using Devanagari script as Hindi, Marathi and Nepali are supported in this language environment.")) '("Indian")) @@ -55,16 +56,18 @@ are supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "bengali-itrans") + (sample-text . "Bengali (বাংলা) নমস্কার") (documentation . "\ Such languages using Bengali script as Bengali and Assamese are supported in this language environment.")) '("Indian")) (set-language-info-alist - "Punjabi" '((charset unicode) + "Gurmukhi" '((charset unicode) (coding-system utf-8) (coding-priority utf-8) (input-method . "punjabi-itrans") + (sample-text . "Gurmukhi (ਗੁਰਮੁਖੀ) ਸਤ ਸ੍ਰੀ ਅਕਾਲ") (documentation . "\ North Indian language Punjabi is supported in this language environment.")) '("Indian")) @@ -74,6 +77,7 @@ North Indian language Punjabi is supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "gujarati-itrans") + (sample-text . "Gujarati (ગુજરાતી) નમસ્તે") (documentation . "\ North Indian language Gujarati is supported in this language environment.")) '("Indian")) @@ -83,6 +87,7 @@ North Indian language Gujarati is supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "oriya-itrans") + (sample-text . "Oriya (ଓଡ଼ିଆ) ନମସ୍କାର") (documentation . "\ Such languages using Oriya script as Oriya, Khonti, and Santali are supported in this language environment.")) @@ -93,6 +98,7 @@ are supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "tamil-itrans") + (sample-text . "Tamil (தமிழ்) வணக்கம்") (documentation . "\ South Indian Language Tamil is supported in this language environment.")) '("Indian")) @@ -102,6 +108,7 @@ South Indian Language Tamil is supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "telugu-itrans") + (sample-text . "Telugu (తెలుగు) నమస్కారం") (documentation . "\ South Indian Language Telugu is supported in this language environment.")) '("Indian")) @@ -122,6 +129,7 @@ environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "malayalam-itrans") + (sample-text . "Malayalam (മലയാളം) നമസ്കാരം") (documentation . "\ South Indian language Malayalam is supported in this language environment.")) '("Indian")) @@ -141,7 +149,7 @@ The ancient Brahmi script is supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "kaithi") - (sample-text . "Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧") + (sample-text . "Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧") (documentation . "\ Languages such as Awadhi, Bhojpuri, Magahi and Maithili which used the Kaithi script are supported in this language environment.")) @@ -152,7 +160,7 @@ which used the Kaithi script are supported in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "tirhuta") - (sample-text . "Tirhuta (𑒞𑒱𑒩𑒯𑒳𑒞𑒰) 𑒣𑓂𑒩𑒢𑒰𑒧") + (sample-text . "Tirhuta (𑒞𑒱𑒩𑒯𑒳𑒞𑒰) 𑒣𑓂𑒩𑒢𑒰𑒧 / 𑒮𑒲𑒞𑒰𑒩𑒰𑒧") (documentation . "\ Maithili language and its script Tirhuta is supported in this language environment.")) @@ -163,7 +171,7 @@ language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "sharada") - (sample-text . "Sharada (𑆯𑆳𑆫𑆢𑆳) 𑆤𑆩𑆱𑇀𑆑𑆳𑆫") + (sample-text . "Sharada (𑆯𑆳𑆫𑆢𑆳) 𑆤𑆩𑆱𑇀𑆑𑆳𑆫") (documentation . "\ Kashmiri language and its script Sharada is supported in this language environment.")) @@ -174,7 +182,7 @@ language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "siddham") - (sample-text . "Siddham (𑖭𑖰𑖟𑖿𑖠𑖽) 𑖡𑖦𑖭𑖿𑖝𑖸") + (sample-text . "Siddham (𑖭𑖰𑖟𑖿𑖠𑖽) 𑖡𑖦𑖭𑖿𑖝𑖸") (documentation . "\ Sanskrit language and one of its script Siddham is supported in this language environment.")) @@ -185,12 +193,22 @@ in this language environment.")) (coding-system utf-8) (coding-priority utf-8) (input-method . "syloti-nagri") - (sample-text . "Syloti Nagri (ꠍꠤꠟꠐꠤ ꠘꠣꠉꠞꠤ) ꠀꠌ꠆ꠍꠣꠟꠣꠝꠥ ꠀꠟꠣꠁꠇꠥꠝ") + (sample-text . "Syloti Nagri (ꠍꠤꠟꠐꠤ ꠘꠣꠉꠞꠤ) ꠀꠌ꠆ꠍꠣꠟꠣꠝꠥ ꠀꠟꠣꠁꠇꠥꠝ / ꠘꠝꠡ꠆ꠇꠣꠞ") (documentation . "\ Sylheti language and its script Syloti Nagri is supported in this language environment.")) '("Indian")) +(set-language-info-alist + "Modi" '((charset unicode) + (coding-system utf-8) + (coding-priority utf-8) + (input-method . "modi") + (sample-text . "Modi (𑘦𑘻𑘚𑘲) 𑘡𑘦𑘭𑘿𑘎𑘰𑘨") + (documentation . "\ +Marathi language and one of its script Modi is supported +in this language environment.")) + '("Indian")) ;; Replace mnemonic characters in REGEXP according to TABLE. TABLE is ;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING). @@ -618,5 +636,27 @@ in this language environment.")) vowel "?" nasal "?") 1 'font-shape-gstring)))) +;; Modi composition rules +(let ((consonant "[\x1160E-\x1162F]") + (independent-vowel "[\x11600-\x1160D]") + (vowel "[\x11630-\x1163C]") + (nasal "\x1163D") + (visarga "\x1163E") + (virama "\x1163F") + (ardhacandra "\x11640")) + (set-char-table-range composition-function-table + '(#x11630 . #x11640) + (list (vector + ;; Consonant based syllables + (concat consonant "\\(?:" virama consonant "\\)*\\(?:" + virama "\\|" vowel "*" ardhacandra "?" nasal + "?" visarga "?\\)") + 1 'font-shape-gstring) + (vector + ;; Vowels based syllables + (concat independent-vowel virama "?" vowel "?" ardhacandra + nasal "?" visarga "?") + 1 'font-shape-gstring)))) + (provide 'indian) ;;; indian.el ends here diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index eb9d1183e5..95798a4477 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -1348,4 +1348,105 @@ Full key sequences are listed below:") ("M" ?ꠋ) ) +(quail-define-package + "modi" "Modi" "𑘦𑘻" t "Modi phonetic input method. + + `\\=`' is used to switch levels instead of Alt-Gr. +" nil t t t t nil nil nil nil nil t) + +(quail-define-rules +("``" ?₹) +("1" ?𑙑) +("`1" ?1) +("2" ?𑙒) +("`2" ?2) +("3" ?𑙓) +("`3" ?3) +("4" ?𑙔) +("`4" ?4) +("5" ?𑙕) +("`5" ?5) +("6" ?𑙖) +("`6" ?6) +("7" ?𑙗) +("`7" ?7) +("8" ?𑙘) +("`8" ?8) +("9" ?𑙙) +("`9" ?9) +("0" ?𑙐) +("`0" ?0) +("`)" ?𑙃) +("`\\" ?𑙁) +("`|" ?𑙂) +("`" ?𑘘) +("q" ?𑘘) +("Q" ?𑘙) +("`q" ?𑙄) +("w" ?𑘚) +("W" ?𑘛) +("e" ?𑘹) +("E" ?𑘺) +("`e" ?𑘊) +("`E" ?𑘋) +("r" ?𑘨) +("R" ?𑘵) +("`r" ?𑘆) +("t" ?𑘝) +("T" ?𑘞) +("y" ?𑘧) +("u" ?𑘳) +("U" ?𑘴) +("`u" ?𑘄) +("`U" ?𑘅) +("i" ?𑘱) +("I" ?𑘲) +("`i" ?𑘂) +("`I" ?𑘃) +("o" ?𑘻) +("O" ?𑘼) +("`o" ?𑘌) +("`O" ?𑘍) +("p" ?𑘢) +("P" ?𑘣) +("a" ?𑘰) +("A" ?𑘁) +("`a" ?𑘀) +("s" ?𑘭) +("S" ?𑘫) +("d" ?𑘟) +("D" ?𑘠) +("f" ?𑘿) +("F" ?𑘶) +("`f" ?𑘇) +("g" ?𑘐) +("G" ?𑘑) +("h" ?𑘮) +("H" ?𑘾) +("j" ?𑘕) +("J" ?𑘖) +("k" ?𑘎) +("K" ?𑘏) +("l" ?𑘩) +("L" ?𑘯) +("`l" ?𑘷) +("`L" ?𑘈) +("z" ?𑘗) +("Z" ?𑘒) +("`z" ?𑘸) +("`Z" ?𑘉) +("x" ?𑘬) +("X" ?𑙀) +("c" ?𑘓) +("C" ?𑘔) +("`c" #x200C) ; ZWNJ +("v" ?𑘪) +("b" ?𑘤) +("B" ?𑘥) +("n" ?𑘡) +("N" ?𑘜) +("m" ?𑘦) +("M" ?𑘽) +) + ;;; indian.el ends here commit 3ef68c2d7a3d7c314cebc27b7cbeb3016211b53e Author: Alan Mackenzie Date: Tue May 17 11:26:05 2022 +0000 CC Mode: Correct a rare error in the state cache * lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache): Do not record a position in a macro as the starting position in c-state-brace-pair-desert. Instead record the position at the beginning of that macro. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 2a9a7a8bf5..8794a527f8 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -3886,7 +3886,10 @@ initializing CC Mode. Currently (2020-06) these are `js-mode' and (cons (if (and ce (< bra ce) (> ce here)) ; {..} straddling HERE? bra (point-min)) - (min here from))))))))) + (progn + (goto-char (min here from)) + (c-beginning-of-macro) + (point)))))))))) (defsubst c-state-push-any-brace-pair (bra+1 macro-start-or-here) ;; If BRA+1 is nil, do nothing. Otherwise, BRA+1 is the buffer position commit 71249b774aa04b8cd46e4201c17470e59cd32dff Author: Alan Mackenzie Date: Tue May 17 10:30:05 2022 +0000 Correct indentation of opening brace in xdisp.c, which isn't at start of defun * xdisp.c (calc_pixel_width_or_height): indent the opening brace of a substatement correctly. It's previous position, in column 0, caused indentation errors in C Mode. diff --git a/src/xdisp.c b/src/xdisp.c index 5ff54b2884..e3e4ca9bb3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28441,7 +28441,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, /* '(NUM)': absolute number of pixels. */ if (NUMBERP (car)) -{ + { double fact; int offset = width_p && align_to && *align_to < 0 ? it->lnum_pixel_width : 0; commit 38dfe9d2f7aea4ecfe06ec54fef6f5b5fe1f72e4 Author: Po Lu Date: Tue May 17 18:18:32 2022 +0800 Fix unused function warning on X * src/xsettings.c (xg_settings_key_valid_p): Surround with HAVE_PGTK and HAVE_GSETTINGS. diff --git a/src/xsettings.c b/src/xsettings.c index 45341d8ebd..c29a844e0a 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -230,6 +230,8 @@ static cairo_font_options_t *font_options; static GSettings *gsettings_client; +#if defined HAVE_PGTK && defined HAVE_GSETTINGS + static bool xg_settings_key_valid_p (GSettings *settings, const char *key) { @@ -253,6 +255,8 @@ xg_settings_key_valid_p (GSettings *settings, const char *key) #endif } +#endif + #ifdef HAVE_PGTK /* Store an event for re-rendering of the fonts. */ static void commit 1a6a4614ceb9d868ccef023973eb7d28aae85b97 Author: Pieter van Prooijen Date: Mon May 16 15:20:27 2022 +0200 Fix font options compilation with gsettings disabled * src/xsettings.c (xsettings_get_font_options): Return a font_options even if gsettings is not enabled. diff --git a/src/xsettings.c b/src/xsettings.c index 2e33ef958a..45341d8ebd 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -206,6 +206,11 @@ struct xsettings unsigned seen; }; +#ifdef HAVE_PGTK +/* The cairo font_options as obtained using gsettings. */ +static cairo_font_options_t *font_options; +#endif + #ifdef HAVE_GSETTINGS #define GSETTINGS_SCHEMA "org.gnome.desktop.interface" #define GSETTINGS_TOOL_BAR_STYLE "toolbar-style" @@ -225,11 +230,6 @@ struct xsettings static GSettings *gsettings_client; -#ifdef HAVE_PGTK - -/* The cairo font_options as obtained using gsettings. */ -static cairo_font_options_t *font_options; - static bool xg_settings_key_valid_p (GSettings *settings, const char *key) { @@ -253,6 +253,7 @@ xg_settings_key_valid_p (GSettings *settings, const char *key) #endif } +#ifdef HAVE_PGTK /* Store an event for re-rendering of the fonts. */ static void store_font_options_changed (void) @@ -1206,7 +1207,11 @@ xsettings_get_system_normal_font (void) cairo_font_options_t * xsettings_get_font_options (void) { - return cairo_font_options_copy (font_options); + if (font_options != NULL) + return cairo_font_options_copy (font_options); + else + /* GSettings is not configured. */ + return cairo_font_options_create (); } #endif commit e9ad64ef92e7e8292ba596a97e114cbc91c6faa3 Author: Po Lu Date: Tue May 17 09:40:57 2022 +0000 Rewrite Haiku frame geometry code to handle decorator frames * doc/lispref/frames.texi (Frame Layout): Document changes to Haiku frame layout. * src/haiku_support.cc (class EmacsWindow, MoveToIncludingFrame) (EmacsMoveTo, MakeFullscreen): Move to an offset including the decorator frames. (be_get_window_decorator_dimensions): (be_get_window_decorator_frame): New functions. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_update_after_decoration_change): New function. (haiku_create_frame, haiku_set_undecorated) (haiku_set_override_redirect): Call that function. (frame_geometry): Actually calculate frame geometry based on decorator and frame sizes. * src/haikuterm.c (haiku_coords_from_parent): Use frame width instead. (haiku_read_socket): Set left and top positions based on decorator width and height. * src/haikuterm.h (struct haiku_output): New field `frame_x' and `frame_y'. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 3bbeef005b..5853c45b79 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -683,9 +683,9 @@ The position of the top left corner of the native frame specifies the indicate that position for the various builds: @itemize @w{} -@item (1) non-toolkit and terminal frames +@item (1) non-toolkit, Haiku, and terminal frames -@item (2) Lucid, Motif, MS-Windows, and Haiku frames +@item (2) Lucid, Motif, and MS-Windows frames @item (3) GTK+ and NS frames @end itemize diff --git a/src/haiku_support.cc b/src/haiku_support.cc index c883d86534..299b37c1cc 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -795,12 +795,24 @@ class EmacsWindow : public BWindow subset_windows = f; } + void + MoveToIncludingFrame (int x, int y) + { + BRect decorator, frame; + + decorator = DecoratorFrame (); + frame = Frame (); + + MoveTo (x + frame.left - decorator.left, + y + frame.top - decorator.top); + } + void DoMove (struct child_frame *f) { BRect frame = this->Frame (); - f->window->MoveTo (frame.left + f->xoff, - frame.top + f->yoff); + f->window->MoveToIncludingFrame (frame.left + f->xoff, + frame.top + f->yoff); } void @@ -1062,7 +1074,7 @@ class EmacsWindow : public BWindow gui_abort ("Failed to lock child frame state lock"); if (!this->parent) - this->MoveTo (x, y); + this->MoveToIncludingFrame (x, y); else this->parent->MoveChild (this, x, y, 0); child_frame_lock.Unlock (); @@ -1172,30 +1184,6 @@ class EmacsWindow : public BWindow BWindow::Zoom (); } - void - GetParentWidthHeight (int *width, int *height) - { - if (!child_frame_lock.Lock ()) - gui_abort ("Failed to lock child frame state lock"); - - if (parent) - { - BRect frame = parent->Frame (); - *width = BE_RECT_WIDTH (frame); - *height = BE_RECT_HEIGHT (frame); - } - else - { - BScreen s (this); - BRect frame = s.Frame (); - - *width = BE_RECT_WIDTH (frame); - *height = BE_RECT_HEIGHT (frame); - } - - child_frame_lock.Unlock (); - } - void OffsetChildRect (BRect *r, EmacsWindow *c) { @@ -1221,17 +1209,21 @@ class EmacsWindow : public BWindow MakeFullscreen (int make_fullscreen_p) { BScreen screen (this); + uint32 flags; + BRect screen_frame; if (!screen.IsValid ()) gui_abort ("Trying to make a window fullscreen without a screen"); + screen_frame = screen.Frame (); UnZoom (); if (make_fullscreen_p == fullscreen_p) return; fullscreen_p = make_fullscreen_p; - uint32 flags = Flags (); + flags = Flags (); + if (fullscreen_p) { if (zoomed_p) @@ -1240,24 +1232,18 @@ class EmacsWindow : public BWindow flags |= B_NOT_MOVABLE | B_NOT_ZOOMABLE; pre_fullscreen_rect = Frame (); - if (!child_frame_lock.Lock ()) - gui_abort ("Failed to lock child frame state lock"); - - if (parent) - parent->OffsetChildRect (&pre_fullscreen_rect, this); - - child_frame_lock.Unlock (); - - int w, h; - EmacsMoveTo (0, 0); - GetParentWidthHeight (&w, &h); - ResizeTo (w - 1, h - 1); + MoveTo (0, 0); + ResizeTo (BE_RECT_WIDTH (screen_frame) - 1, + BE_RECT_HEIGHT (screen_frame) - 1); } else { flags &= ~(B_NOT_MOVABLE | B_NOT_ZOOMABLE); - EmacsMoveTo (pre_fullscreen_rect.left, - pre_fullscreen_rect.top); + + /* Use MoveTo directly since pre_fullscreen_rect isn't + adjusted for decorator sizes. */ + MoveTo (pre_fullscreen_rect.left, + pre_fullscreen_rect.top); ResizeTo (BE_RECT_WIDTH (pre_fullscreen_rect) - 1, BE_RECT_HEIGHT (pre_fullscreen_rect) - 1); } @@ -5097,3 +5083,55 @@ be_create_pixmap_cursor (void *bitmap, int x, int y) return cursor; } + +void +be_get_window_decorator_dimensions (void *window, int *left, int *top, + int *right, int *bottom) +{ + BWindow *wnd; + BRect frame, window_frame; + + wnd = (BWindow *) window; + + if (!wnd->LockLooper ()) + gui_abort ("Failed to lock window looper frame"); + + frame = wnd->DecoratorFrame (); + window_frame = wnd->Frame (); + + if (left) + *left = window_frame.left - frame.left; + + if (top) + *top = window_frame.top - frame.top; + + if (right) + *right = frame.right - window_frame.right; + + if (bottom) + *bottom = frame.bottom - window_frame.bottom; + + wnd->UnlockLooper (); +} + +void +be_get_window_decorator_frame (void *window, int *left, int *top, + int *width, int *height) +{ + BWindow *wnd; + BRect frame; + + wnd = (BWindow *) window; + + if (!wnd->LockLooper ()) + gui_abort ("Failed to lock window looper frame"); + + frame = wnd->DecoratorFrame (); + + *left = frame.left; + *top = frame.top; + *width = BE_RECT_WIDTH (frame); + *height = BE_RECT_HEIGHT (frame); + + wnd->UnlockLooper (); +} diff --git a/src/haiku_support.h b/src/haiku_support.h index bccef2628b..cdeb40f67c 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -686,6 +686,9 @@ extern bool be_select_font (void (*) (void), bool (*) (void), extern int be_find_font_indices (struct haiku_font_pattern *, int *, int *); extern status_t be_roster_launch (const char *, const char *, char **, ptrdiff_t, void *, team_id *); +extern void be_get_window_decorator_dimensions (void *, int *, int *, int *, int *); +extern void be_get_window_decorator_frame (void *, int *, int *, int *, int *); + #ifdef __cplusplus } diff --git a/src/haikufns.c b/src/haikufns.c index d55cdac44d..e8e303fd27 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -104,6 +104,29 @@ get_geometry_from_preferences (struct haiku_display_info *dpyinfo, return parms; } +/* Update the left and top offsets of F after its decorators + change. */ +static void +haiku_update_after_decoration_change (struct frame *f) +{ + int x, y, width, height; + struct frame *parent; + + be_get_window_decorator_frame (FRAME_HAIKU_WINDOW (f), + &x, &y, &width, &height); + + parent = FRAME_PARENT_FRAME (f); + + if (parent) + { + x = x - FRAME_OUTPUT_DATA (f)->frame_x; + y = y - FRAME_OUTPUT_DATA (f)->frame_x; + } + + f->left_pos = x; + f->top_pos = y; +} + void haiku_change_tool_bar_height (struct frame *f, int height) { @@ -827,10 +850,7 @@ haiku_create_frame (Lisp_Object parms) f->terminal->reference_count++; - block_input (); - FRAME_OUTPUT_DATA (f)->window - = BWindow_new (&FRAME_OUTPUT_DATA (f)->view); - unblock_input (); + FRAME_OUTPUT_DATA (f)->window = BWindow_new (&FRAME_OUTPUT_DATA (f)->view); if (!FRAME_OUTPUT_DATA (f)->window) xsignal1 (Qerror, build_unibyte_string ("Could not create window")); @@ -842,7 +862,8 @@ haiku_create_frame (Lisp_Object parms) Vframe_list = Fcons (frame, Vframe_list); - Lisp_Object parent_frame = gui_display_get_arg (dpyinfo, parms, Qparent_frame, NULL, NULL, + Lisp_Object parent_frame = gui_display_get_arg (dpyinfo, parms, + Qparent_frame, NULL, NULL, RES_TYPE_SYMBOL); if (EQ (parent_frame, Qunbound) @@ -1315,6 +1336,8 @@ haiku_set_undecorated (struct frame *f, Lisp_Object new_value, FRAME_UNDECORATED (f) = !NILP (new_value); BWindow_change_decoration (FRAME_HAIKU_WINDOW (f), NILP (new_value)); unblock_input (); + + haiku_update_after_decoration_change (f); } static void @@ -1329,6 +1352,8 @@ haiku_set_override_redirect (struct frame *f, Lisp_Object new_value, !NILP (new_value)); FRAME_OVERRIDE_REDIRECT (f) = !NILP (new_value); unblock_input (); + + haiku_update_after_decoration_change (f); } static void @@ -1375,47 +1400,74 @@ haiku_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval static Lisp_Object frame_geometry (Lisp_Object frame, Lisp_Object attribute) { - struct frame *f = decode_live_frame (frame); - check_window_system (f); + struct frame *f, *parent; + int outer_x, outer_y, outer_width, outer_height; + int right_off, bottom_off, top_off; + int native_x, native_y; + + f = decode_window_system_frame (frame); + parent = FRAME_PARENT_FRAME (f); + + be_get_window_decorator_frame (FRAME_HAIKU_WINDOW (f), &outer_x, + &outer_y, &outer_width, &outer_height); + be_get_window_decorator_dimensions (FRAME_HAIKU_WINDOW (f), NULL, + &top_off, &right_off, &bottom_off); + native_x = FRAME_OUTPUT_DATA (f)->frame_x; + native_y = FRAME_OUTPUT_DATA (f)->frame_y; + + if (parent) + { + /* Adjust all the coordinates by the coordinates of the parent + frame. */ + outer_x -= FRAME_OUTPUT_DATA (parent)->frame_x; + outer_y -= FRAME_OUTPUT_DATA (parent)->frame_y; + native_x -= FRAME_OUTPUT_DATA (parent)->frame_x; + native_y -= FRAME_OUTPUT_DATA (parent)->frame_y; + } if (EQ (attribute, Qouter_edges)) - return list4i (f->left_pos, f->top_pos, - f->left_pos, f->top_pos); + return list4i (outer_x, outer_y, + outer_x + outer_width, + outer_y + outer_height); else if (EQ (attribute, Qnative_edges)) - return list4i (f->left_pos, f->top_pos, - f->left_pos + FRAME_PIXEL_WIDTH (f), - f->top_pos + FRAME_PIXEL_HEIGHT (f)); + return list4i (native_x, native_y, + native_x + FRAME_PIXEL_WIDTH (f), + native_y + FRAME_PIXEL_HEIGHT (f)); else if (EQ (attribute, Qinner_edges)) - return list4i (f->left_pos + FRAME_INTERNAL_BORDER_WIDTH (f), - f->top_pos + FRAME_INTERNAL_BORDER_WIDTH (f) + - FRAME_MENU_BAR_HEIGHT (f) + FRAME_TOOL_BAR_HEIGHT (f), - f->left_pos - FRAME_INTERNAL_BORDER_WIDTH (f) + - FRAME_PIXEL_WIDTH (f), - f->top_pos + FRAME_PIXEL_HEIGHT (f) - - FRAME_INTERNAL_BORDER_WIDTH (f)); + return list4i (native_x + FRAME_INTERNAL_BORDER_WIDTH (f), + native_y + FRAME_INTERNAL_BORDER_WIDTH (f) + + FRAME_MENU_BAR_HEIGHT (f) + FRAME_TOOL_BAR_HEIGHT (f), + native_x - FRAME_INTERNAL_BORDER_WIDTH (f) + + FRAME_PIXEL_WIDTH (f), + native_y + FRAME_PIXEL_HEIGHT (f) + - FRAME_INTERNAL_BORDER_WIDTH (f)); else - return - list (Fcons (Qouter_position, - Fcons (make_fixnum (f->left_pos), - make_fixnum (f->top_pos))), - Fcons (Qouter_size, - Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)), - make_fixnum (FRAME_PIXEL_HEIGHT (f)))), - Fcons (Qexternal_border_size, - Fcons (make_fixnum (0), make_fixnum (0))), - Fcons (Qtitle_bar_size, - Fcons (make_fixnum (0), make_fixnum (0))), - Fcons (Qmenu_bar_external, Qnil), - Fcons (Qmenu_bar_size, Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f) - - (FRAME_INTERNAL_BORDER_WIDTH (f) * 2)), - make_fixnum (FRAME_MENU_BAR_HEIGHT (f)))), - Fcons (Qtool_bar_external, Qnil), - Fcons (Qtool_bar_position, Qtop), - Fcons (Qtool_bar_size, Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f) - - (FRAME_INTERNAL_BORDER_WIDTH (f) * 2)), - make_fixnum (FRAME_TOOL_BAR_HEIGHT (f)))), - Fcons (Qinternal_border_width, make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (f)))); + return list (Fcons (Qouter_position, + Fcons (make_fixnum (outer_x), + make_fixnum (outer_y))), + Fcons (Qouter_size, + Fcons (make_fixnum (outer_width), + make_fixnum (outer_height))), + Fcons (Qexternal_border_size, + Fcons (make_fixnum (right_off), + make_fixnum (bottom_off))), + Fcons (Qtitle_bar_size, + Fcons (make_fixnum (outer_width), + make_fixnum (top_off))), + Fcons (Qmenu_bar_external, Qnil), + Fcons (Qmenu_bar_size, + Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f) + - (FRAME_INTERNAL_BORDER_WIDTH (f) * 2)), + make_fixnum (FRAME_MENU_BAR_HEIGHT (f)))), + Fcons (Qtool_bar_external, Qnil), + Fcons (Qtool_bar_position, Qtop), + Fcons (Qtool_bar_size, + Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f) + - (FRAME_INTERNAL_BORDER_WIDTH (f) * 2)), + make_fixnum (FRAME_TOOL_BAR_HEIGHT (f)))), + Fcons (Qinternal_border_width, + make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (f)))); } void diff --git a/src/haikuterm.c b/src/haikuterm.c index ed8040edc9..d46228d02e 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -96,14 +96,9 @@ static void haiku_coords_from_parent (struct frame *f, int *x, int *y) { struct frame *p = FRAME_PARENT_FRAME (f); - eassert (p); - for (struct frame *parent = p; parent; - parent = FRAME_PARENT_FRAME (parent)) - { - *x -= parent->left_pos; - *y -= parent->top_pos; - } + *x -= FRAME_OUTPUT_DATA (p)->frame_x; + *y -= FRAME_OUTPUT_DATA (p)->frame_y; } static void @@ -3535,7 +3530,6 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) SET_FRAME_ICONIFIED (f, 0); inev.kind = DEICONIFY_EVENT; - /* Haiku doesn't expose frames on deiconification, but if we are double-buffered, the previous screen contents should have been preserved. */ @@ -3559,30 +3553,40 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) { struct haiku_move_event *b = buf; struct frame *f = haiku_window_to_frame (b->window); + int decorator_width, decorator_height, top, left; + struct frame *p; if (!f) continue; + FRAME_OUTPUT_DATA (f)->frame_x = b->x; + FRAME_OUTPUT_DATA (f)->frame_y = b->y; + if (FRAME_PARENT_FRAME (f)) haiku_coords_from_parent (f, &b->x, &b->y); - if (b->x != f->left_pos || b->y != f->top_pos) + be_get_window_decorator_dimensions (b->window, &decorator_width, + &decorator_height, NULL, + NULL); + + left = b->x - decorator_width; + top = b->y - decorator_height; + + if (left != f->left_pos || top != f->top_pos) { inev.kind = MOVE_FRAME_EVENT; - XSETINT (inev.x, b->x); - XSETINT (inev.y, b->y); + XSETINT (inev.x, left); + XSETINT (inev.y, top); - f->left_pos = b->x; - f->top_pos = b->y; + f->left_pos = left; + f->top_pos = top; - struct frame *p; + p = FRAME_PARENT_FRAME (f); - if ((p = FRAME_PARENT_FRAME (f))) - { - void *window = FRAME_HAIKU_WINDOW (p); - EmacsWindow_move_weak_child (window, b->window, b->x, b->y); - } + if (p) + EmacsWindow_move_weak_child (FRAME_HAIKU_WINDOW (p), + b->window, left, top); XSETFRAME (inev.frame_or_window, f); } diff --git a/src/haikuterm.h b/src/haikuterm.h index 4b124a6ba3..068be82687 100644 --- a/src/haikuterm.h +++ b/src/haikuterm.h @@ -196,6 +196,11 @@ struct haiku_output They are changed only when a different background is involved. -1 means no color has been computed. */ long relief_background; + + /* The absolute position of this frame. This differs from left_pos + and top_pos in that the decorator and parent frames are not taken + into account. */ + int frame_x, frame_y; }; struct x_output commit dc239872cc248414f121e0455d447ef00f9b4cc4 Author: Lars Ingebrigtsen Date: Tue May 17 11:48:12 2022 +0200 Fix package-quickstart breakage * lisp/emacs-lisp/package.el (package-quickstart-refresh): Work around syntax-ppss now clobbering match data (but it's not clear whether that's supposed to be allowed) (bug#55447). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f356a2bf60..3a05005fb5 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4288,7 +4288,7 @@ activations need to be changed, such as when `package-load-list' is modified." (insert-file-contents file) ;; Fixup the special #$ reader form and throw away comments. (while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move) - (unless (nth 8 (syntax-ppss)) + (unless (ppss-string-terminator (save-match-data (syntax-ppss))) (replace-match (if (match-end 1) "" pfile) t t))) (unless (bolp) (insert "\n")) (insert ")\n"))) commit 608afd6e4ec46ca9b3843c05934d72e759fe1ad5 Author: Lars Ingebrigtsen Date: Tue May 17 11:06:33 2022 +0200 Improve Finternal__define_uninitialized_variable erroring * src/eval.c (Finternal__define_uninitialized_variable): Say what symbol we're bugging out on for easier debugging. diff --git a/src/eval.c b/src/eval.c index 25ac8e4529..08e2dce61e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -741,7 +741,9 @@ value. */) and where the `foo` package only gets loaded when is called, so the outer `let` incorrectly made the binding lexical because the wasn't yet declared as dynamic at that point. */ - error ("Defining as dynamic an already lexical var"); + xsignal2 (Qerror, + build_string ("Defining as dynamic an already lexical var"), + symbol); XSYMBOL (symbol)->u.s.declared_special = true; if (!NILP (doc)) commit 90dccb0f00f684f63ab117a826a88a8e939b212b Author: Lars Ingebrigtsen Date: Tue May 17 10:09:48 2022 +0200 Fix edebug-tests test failure after prin1 change * lisp/emacs-lisp/ert-x.el (ert--make-print-advice): Fix test failures in edebug-tests. diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index c42ce09a1c..6fe1ade7a0 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -338,7 +338,8 @@ unless the output is going to the echo area (when PRINTCHARFUN is t or PRINTCHARFUN is nil and `standard-output' is t). If the output is destined for the echo area, the advice function will convert it to a string and pass it to COLLECTOR first." - (lambda (func object &optional printcharfun) + ;;; FIXME: Pass on OVERRIDES. + (lambda (func object &optional printcharfun _overrides) (if (not (eq t (or printcharfun standard-output))) (funcall func object printcharfun) (funcall collector (with-output-to-string