commit 039ada6d033a01fb98e5acdcf943d486625d940b (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Thu Oct 6 08:54:54 2022 +0200 * etc/NEWS: Document how to continue using 'linum'. (Bug#58220) diff --git a/etc/NEWS b/etc/NEWS index fc7d89719b..536c7aa319 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -457,6 +457,11 @@ performance, but the latter is closer to a drop-in replacement. ;; Alternatively, to use it only in programming modes: (add-hook 'prog-mode-hook #'nlinum-mode) +3. To continue using the obsolete package 'linum', add this line to + your Init file, in addition to any existing customizations: + + (require 'linum) + --- ** The thumbs.el library is now obsolete. We recommend using 'M-x image-dired' instead. commit e2027d60ba6c9a78ef9539234969ef2a44bf84fe Author: Po Lu Date: Thu Oct 6 10:57:43 2022 +0800 ; * src/xterm.c (x_term_init): Fix typo. diff --git a/src/xterm.c b/src/xterm.c index 37e7916486..1d58e80f00 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -29255,7 +29255,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) /* Avoid initializing input methods if the X library does not support Emacs's locale. When the current locale is not supported, decoding input method strings becomes undefined. */ - if (!XSupportsLocale ()) + if (XSupportsLocale ()) xim_initialize (dpyinfo, resource_name); #endif commit 8e8d37aa326870ebf0ff6c07b4e37ae6abcf79b6 Author: Po Lu Date: Thu Oct 6 10:55:25 2022 +0800 Minor fixes to IM locale handling * lisp/term/x-win.el (x-get-input-coding-system): Translate locales. * src/xterm.c (x_term_init): If the X library doesn't support the current locale, don't set up input methods. diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 57c6b785e7..62684f52cc 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1623,7 +1623,7 @@ found." (if (equal x-locale "C") ;; Treat the C locale specially, as it means "ascii" under X. 'ascii - (let ((locale (downcase x-locale))) + (let ((locale (locale-translate (downcase x-locale)))) (or (locale-name-match locale locale-preferred-coding-systems) (when locale (if (string-match "\\.\\([^@]+\\)" locale) diff --git a/src/xterm.c b/src/xterm.c index f3bfae457b..37e7916486 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -29252,7 +29252,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) #endif #ifdef HAVE_X_I18N - xim_initialize (dpyinfo, resource_name); + /* Avoid initializing input methods if the X library does not + support Emacs's locale. When the current locale is not + supported, decoding input method strings becomes undefined. */ + if (!XSupportsLocale ()) + xim_initialize (dpyinfo, resource_name); #endif xsettings_initialize (dpyinfo); commit c690d1f15d274d50ed21d4aa1b98a23de8d7e1e6 Author: Po Lu Date: Thu Oct 6 10:52:34 2022 +0800 Fix nsmenu crash when exiting popup dialog * src/nsmenu.m (pop_down_menu): Do not discard menu items here. (ns_popup_dialog): Call discard_menu_items after unuse_menu_items. (bug#58296) diff --git a/src/nsmenu.m b/src/nsmenu.m index ae795a0d22..b06f737bac 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1551,7 +1551,6 @@ - (NSRect) frame #ifdef NS_IMPL_COCOA [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow]; #endif - discard_menu_items (); } } @@ -1599,6 +1598,7 @@ - (NSRect) frame if (error_name) { + unbind_to (specpdl_count, Qnil); discard_menu_items (); [dialog close]; error ("%s", error_name); @@ -1608,6 +1608,9 @@ - (NSRect) frame popup_activated_flag = 1; tem = [dialog runDialogAt: p]; unbind_to (specpdl_count, Qnil); + + /* This must come *after* unuse_menu_items. */ + discard_menu_items (); return tem; } commit 9cb38135505d65c6d171da721831bb542e1074ae Author: Stefan Kangas Date: Thu Oct 6 01:32:59 2022 +0200 * etc/NEWS: Add instructions for replacing 'linum'. (Bug#58220) diff --git a/etc/NEWS b/etc/NEWS index b616c5382c..fc7d89719b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -443,6 +443,20 @@ We recommend using either the built-in 'display-line-numbers-mode', or the 'nlinum' package from GNU ELPA instead. The former has better performance, but the latter is closer to a drop-in replacement. +1. To use 'display-line-numbers-mode', add something like this to your + Init file: + + (global-display-line-numbers-mode 1) + ;; Alternatively, to use it only in programming modes: + (add-hook 'prog-mode-hook #'display-line-numbers-mode) + +2. To use 'nlinum', add this to your Init file: + + (package-install 'nlinum) + (global-nlinum-mode 1) + ;; Alternatively, to use it only in programming modes: + (add-hook 'prog-mode-hook #'nlinum-mode) + --- ** The thumbs.el library is now obsolete. We recommend using 'M-x image-dired' instead. commit 95efafb72664049f8ac825047df3645656cf76f4 Author: Juri Linkov Date: Wed Oct 5 22:47:42 2022 +0300 * lisp/repeat.el (repeat-exit): Add autoload cookie. diff --git a/lisp/repeat.el b/lisp/repeat.el index d773e44067..0ae68d6024 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -499,6 +499,7 @@ See `describe-repeat-maps' for a list of all repeatable commands." (when (and was-in-progress (not repeat-in-progress)) (repeat-exit)))) +;;;###autoload (defun repeat-exit () "Exit the repeating sequence. This function can be used to force exit of repetition while it's active." commit 63e8157b54efd077fae50d68c174f2d471b19630 Author: Juri Linkov Date: Wed Oct 5 22:43:12 2022 +0300 * etc/tutorials/TUTORIAL.uk: Fix typos. diff --git a/etc/tutorials/TUTORIAL.uk b/etc/tutorials/TUTORIAL.uk index 4ce59b75f5..16190afe3a 100644 --- a/etc/tutorials/TUTORIAL.uk +++ b/etc/tutorials/TUTORIAL.uk @@ -677,7 +677,7 @@ replace-string («замінити рядок») змінює в буфері о відповідь на який вам слід набрати назву команди — «replace-string» у цьому випадку. Просто наберіть «repl s» — і Emacs допише назву команди. ( — це клавіша Tab, яку зазвичай розміщено над клавішею -Caps Lock чи Shfift ліворуч на клавіатурі.) Підтвердьте назву команди +Caps Lock чи Shift ліворуч на клавіатурі.) Підтвердьте назву команди клавішею . Команда replace-string потребує двох аргументів: рядка, який слід @@ -779,7 +779,7 @@ M-x fundamental-mode ви вмикаєте основний режим. »» Посуньте курсор до рядка, наступного після цього. »» Наберіть C-l C-l, щоб посунути цей рядок угору екрана. »» Наберіть C-h m, щоб побачити різницю режимів Text і Fundamental. -»» Наберіть C-x, щоб вилучити документацію з екрана. +»» Наберіть C-x 1, щоб вилучити документацію з екрана. Вищі режими називаються вищими, тому що бувають і нижчі режими. Нижчі режими не заміщають вищих режимів, а трошки їх змінюють. Кожен нижчий @@ -887,7 +887,7 @@ Emacs має ту файну властивість, що ви можете пе горішньому вікні. »» Наберіть C-M-v — перегорніть нижнє вікно. - (Якщо не маєте клавіші META, наберіть + (Якщо не маєте клавіші META, наберіть C-v.) »» Наберіть C-x o (other — інше), щоб посунути курсор до нижнього вікна. Погортайте нижнє вікно за допомогою C-v та M-v. Читайте ці @@ -1080,7 +1080,7 @@ Emacs, скориставшись меню Help (Довідка) чи набра каталогів, яке спрощує керування файлами. Доповнення дає змогу набирати менше тексту. Наприклад, щоб -перемкнутись на буфер *Messages*, можете набрати C-x b *M* — і +перемкнутись на буфер *Messages*, можете набрати C-x b *M — і Emacs заповнить решту назви буфера настільки, наскільки зможе вивести з уже набраного вами тексту. Доповнення також працює з назвами команд і файлів. Підручник Emacs описує доповнення в розділі «Completion». commit d8726f574cdee5ca37f79b5890e6ecdd008ec2d1 Author: Michael Albinus Date: Wed Oct 5 17:11:33 2022 +0200 Adapt Tramp manual * doc/misc/tramp.texi (Inline methods): Method "kubernetes" does not support user names. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 395df00bf7..7de64829c0 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -925,6 +925,8 @@ Integration for containers in Kubernetes pods. The host name is a pod name returned by @samp{kubectl get pods}. The first container in a pod is used. +This method does not support user names. + @end table commit 10ec1a4d7e940bb6d67108aeb4316bc1f53403a9 Author: Stefan Kangas Date: Wed Oct 5 16:33:18 2022 +0200 New command 'world-clock-copy-time-as-kill' * lisp/time.el (world-clock-copy-time-as-kill): New command. (world-clock-mode-map): Bind above new command to "w". diff --git a/etc/NEWS b/etc/NEWS index 916abbc436..b616c5382c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2699,6 +2699,10 @@ remote host are shown. Alternatively, the user option *** 'outlineify-sticky' command is renamed to 'allout-outlinify-sticky'. The old name is still available as an obsolete function alias. +--- +*** New command 'world-clock-copy-time-as-kill' for 'M-x world-clock'. +It copies the current line into the kill ring. + --- *** 'edit-abbrevs' now uses font-locking. The new face 'abbrev-table-name' is used to display the abbrev table diff --git a/lisp/time.el b/lisp/time.el index e7066cae7a..247d715ab6 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -528,7 +528,15 @@ If the value is t instead of an alist, use the value of (defvar-keymap world-clock-mode-map "n" #'next-line - "p" #'previous-line) + "p" #'previous-line + "w" #'world-clock-copy-time-as-kill) + +(defun world-clock-copy-time-as-kill () + "Copy current line into the kill ring." + (interactive nil world-clock-mode) + (when-let ((str (buffer-substring-no-properties (pos-bol) (pos-eol)))) + (kill-new str) + (message str))) (define-derived-mode world-clock-mode special-mode "World clock" "Major mode for buffer that displays times in various time zones. commit 9449e0740cd97bbcdbaeb4713dc2dd51e65994fd Author: Stefan Kangas Date: Wed Oct 5 15:23:39 2022 +0200 Add face help-key-binding in help-char echo * src/keyboard.c (echo_add_key): Add help-key-binding face to the "?" key in 'help-char' echo. (Bug#57906) (syms_of_keyboard) : New DEFSYM. diff --git a/src/keyboard.c b/src/keyboard.c index da244904a4..8ab4a451b4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -499,27 +499,18 @@ echo_add_key (Lisp_Object c) STRING_MULTIBYTE (name), 1); } + Lisp_Object new_string = make_string (buffer, ptr - buffer); if ((NILP (echo_string) || SCHARS (echo_string) == 0) && help_char_p (c)) { - static const char text[] = " (Type ? for further options)"; - int len = sizeof text - 1; - - if (size - (ptr - buffer) < len) - { - ptrdiff_t offset = ptr - buffer; - size += len; - buffer = SAFE_ALLOCA (size); - ptr = buffer + offset; - } - - memcpy (ptr, text, len); - ptr += len; + AUTO_STRING (str, " (Type ? for further options)"); + AUTO_LIST2 (props, Qface, Qhelp_key_binding); + Fadd_text_properties (make_fixnum (7), make_fixnum (8), props, str); + new_string = concat2 (new_string, str); } - kset_echo_string - (current_kboard, - concat2 (echo_string, make_string (buffer, ptr - buffer))); + kset_echo_string (current_kboard, + concat2 (echo_string, new_string)); SAFE_FREE (); } @@ -12252,6 +12243,8 @@ syms_of_keyboard (void) DEFSYM (Qhelp_form_show, "help-form-show"); + DEFSYM (Qhelp_key_binding, "help-key-binding"); + DEFSYM (Qecho_keystrokes, "echo-keystrokes"); Fset (Qinput_method_exit_on_first_char, Qnil); commit 1720ebecc7670903129de70fee1a72c875c42d95 Author: Stefan Kangas Date: Wed Oct 5 15:08:01 2022 +0200 ; * lisp/files.el (find-file-noselect): Minor simplification. diff --git a/lisp/files.el b/lisp/files.el index 667e3325bb..43c5d7d1da 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2379,16 +2379,15 @@ the various files." 'buffer-file-name buffer))) (and file (file-exists-p file)))))))) ;; Let user know if there is a buffer with the same truename. - (if other - (progn - (or nowarn - find-file-suppress-same-file-warnings - (string-equal filename (buffer-file-name other)) - (files--message "%s and %s are the same file" - filename (buffer-file-name other))) - ;; Optionally also find that buffer. - (if (or find-file-existing-other-name find-file-visit-truename) - (setq buf other)))) + (when other + (or nowarn + find-file-suppress-same-file-warnings + (string-equal filename (buffer-file-name other)) + (files--message "%s and %s are the same file" + filename (buffer-file-name other))) + ;; Optionally also find that buffer. + (if (or find-file-existing-other-name find-file-visit-truename) + (setq buf other))) ;; Check to see if the file looks uncommonly large. (when (not (or buf nowarn)) (when (eq (abort-if-file-too-large