mirrored from git://git.sv.gnu.org/emacs.git
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathNEWS
2395 lines (1882 loc) · 90.2 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
GNU Emacs NEWS -- history of user-visible changes.
Copyright (C) 2022-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to '[email protected]'.
If possible, use 'M-x report-emacs-bug'.
This file is about changes in Emacs version 31.
See file HISTORY for a list of GNU Emacs versions and release dates.
See files NEWS.30, NEWS.29, ..., NEWS.18, and NEWS.1-17 for changes
in older Emacs versions.
You can narrow news to a specific version by calling 'view-emacs-news'
with a prefix argument or by typing 'C-u C-h C-n'.
Temporary note:
+++ indicates that all relevant manuals in doc/ have been updated.
--- means no change in the manuals is needed.
When you add a new item, use the appropriate mark if you are sure it
applies, and please also update docstrings as needed.
* Installation Changes in Emacs 31.1
+++
** Unexec dumper removed.
The traditional unexec dumper, deprecated since Emacs 27, has been
removed.
---
** Emacs's old 'ctags' program is no longer built or installed.
You are encouraged to use Universal Ctags <https://ctags.io/> instead.
For now, to get the old 'ctags' behavior you can can run 'etags --ctags'
or use a shell script named 'ctags' that runs 'etags --ctags "$@"'.
---
** Changed GCC default options on 32-bit x86 systems.
When using GCC 4 or later to build Emacs on 32-bit x86 systems,
'configure' now defaults to using the GCC options '-mfpmath=sse' (if the
host system supports SSE2) or '-fno-tree-sra' (if not). These GCC
options work around GCC bug 58416, which can cause Emacs to behave
incorrectly in rare cases.
---
** New configure option '--with-systemduserunitdir'.
This allows to specify the directory where the user unit file for
systemd is installed; default is '${prefix}/usr/lib/systemd/user'.
* Startup Changes in Emacs 31.1
** In compatible terminals, 'xterm-mouse-mode' is turned on by default.
For these terminals the mouse will work by default. A compatible
terminal is one that supports Emacs setting and getting the OS selection
data (a.k.a. the clipboard) and mouse button and motion events. With
'xterm-mouse-mode' enabled, you must use Emacs keybindings to copy to the
OS selection instead of terminal-specific keybindings.
You can keep the old behavior by putting '(xterm-mouse-mode -1)' in your
init file.
* Changes in Emacs 31.1
** 'prettify-symbols-mode' attempts to ignore undisplayable characters.
Previously, such characters would be rendered as, e.g., white boxes.
+++
** 'standard-display-table' now has more extra slots.
'standard-display-table' has been extended to allow specifying glyphs
that are used for borders around child frames and menu separators on TTY
frames.
Call the function 'standard-display-unicode-special-glyphs' to set up
the 'standard-display-table's extra slots with Unicode characters.
Please see the documentation of that function to see which slots of the
display table it changes.
+++
** Child frames are now supported on TTY frames.
This supports use-cases like Posframe, Corfu, and child frames acting
like tooltips.
To enable tooltips on TTY frames, call 'tty-tip-mode'.
The presence of child frame support on TTY frames can be checked with
'(featurep 'tty-child-frames)'.
Recent versions of Posframe and Corfu are known to use child frames on
TTYs if they are supported.
+++
** Several font-lock face variables are now obsolete.
The following variables are now obsolete: 'font-lock-builtin-face',
'font-lock-comment-delimiter-face', 'font-lock-comment-face',
'font-lock-constant-face', 'font-lock-doc-face',
'font-lock-doc-markup-face', 'font-lock-function-name-face',
'font-lock-keyword-face', 'font-lock-negation-char-face',
'font-lock-preprocessor-face', 'font-lock-string-face',
'font-lock-type-face', 'font-lock-variable-name-face', and
'font-lock-warning-face'.
These variables contributed both to confusion about the relation between
faces and variables, and to inconsistency when major mode authors used
one or the other (sometimes interchangeably). We always recommended
using faces directly, and not creating variables going by the same name.
If you have customized these variables, you should now customize the
corresponding faces instead, using something like:
M-x customize-face RET font-lock-string-face RET
If you have been using these variables in Lisp code (for example, in
font-lock rules), simply quote the symbol, to use the face directly
instead of its now-obsolete variable.
** Network Security Manager (NSM) is now more strict.
*** NSM warns about TLS 1.1 by default.
It has been deprecated by RFC 8996, published in 2021.
*** NSM warns about DHE and RSA key exchange by default.
Emacs now warns about ephemeral Diffie-Hellman key exchange, and static
RSA key exchange, also when 'network-security-level' is customized to
its default 'medium' value.
** Etags
+++
*** New command-line options for handling unrecognized programming languages.
The new command-line option '--no-fallback-lang' disables attempts to
parse as Fortran or C/C++ files whose programming language 'etags' could
not determine. This allows to avoid false positives and reduces the time
required to scan directories with many such files. Another new option
'--no-empty-file-entries' disables generation of file entries in tags
tables for files in which no tags were found.
---
** find-func.el commands now have history enabled.
The 'find-function', 'find-library', 'find-face-definition', and
'find-variable' commands now allow retrieving previous input using the
usual minibuffer history commands. Each command has a separate history.
---
** New minor mode 'find-function-mode' replaces 'find-function-setup-keys'.
The new minor mode defines the keys at a higher precedence level than
the old function, one more usual for a minor mode. To restore the old
behavior, customize 'find-function-mode-lower-precedence' to non-nil.
---
** 'find-function' can now find 'cl-defmethod' invocations inside macros.
** Minibuffer and Completions
+++
*** New user option 'completion-eager-display'.
This option configures whether completion commands should display the
"*Completions*" buffer immediately. When the option is set to t, all
completion commands show "*Completions*" immediately, respectively nil
disables the eager display for all commands. The default setting auto
enables eager completion only if requested by the command.
For more fine-grained control you can also toggle this feature by
category using the symbol 'eager-display' in the user option
'completion-category-overrides'.
+++
*** New user option 'completion-pcm-leading-wildcard'.
This option configures how the partial-completion style does completion.
It defaults to nil, which preserves the existing behavior. When it is set
to t, the partial-completion style behaves more like the substring
style, in that a string being completed can match against a candidate
anywhere in the candidate string.
+++
*** 'completion-styles' now can contain lists of bindings.
In addition to being a symbol naming a completion style, an element of
'completion-styles' can now be a list of the form '(STYLE ((VARIABLE
VALUE) ...))' where STYLE is a symbol naming a completion style.
VARIABLE will be bound to VALUE (without evaluating it) while the style
is executing. This allows multiple references to the same style with
different values for completion-affecting variables like
'completion-pcm-leading-wildcard' or 'completion-ignore-case'. This also
applies for the styles configuration in 'completion-category-overrides'
and 'completion-category-defaults'.
---
*** Selected completion candidate is preserved across "*Completions*" updates.
When point is on a completion candidate in the "*Completions*" buffer
(because of 'minibuffer-next-completion' or for any other reason), point
will still be on that candidate after "*Completions*" is updated with a
new list of completions. The candidate is automatically deselected when
the "*Completions*" buffer is hidden.
---
*** "*Completions*" is now displayed faster when there are many candidates.
As before, if there are more completion candidates than can be displayed
in the current frame, only a subset of the candidates is displayed.
This process is now faster: only that subset of the candidates is
actually inserted into "*Completions*" until you run a command which
interacts with the text of the "*Completions*" buffer. This
optimization only applies when 'completions-format' is 'horizontal' or
'one-column'.
---
*** New user option 'crm-prompt' for 'completing-read-multiple'.
This option configures the prompt format of 'completing-read-multiple'.
By default, the prompt indicates to the user that the completion command
accepts a comma-separated list. The prompt format can include the
separator description and the separator string, which are both stored as
text properties of the 'crm-separator' regular expression.
---
*** New user option 'completion-preview-sort-function'.
This option controls how Completion Preview mode sorts completion
candidates. If you use this mode together with an in-buffer completion
popup interface, such as the interfaces that the GNU ELPA packages Corfu
and Company provide, you can set this option to the same sort function
that your popup interface uses for a more integrated experience.
('completion-preview-sort-function' was already present in Emacs 30.1,
but as a plain Lisp variable, not a user option.)
** Windows
+++
*** New commands to modify window layouts.
- 'C-x w t' and 'C-x w r <left>/<right>' rotate the window layout.
- 'C-x w o <left>/<right>' rotate the windows within the current layout.
- 'C-x w f <left>/<right>/<up>/<down>' flip window layouts.
By default, these commands operate on the selected frame's root window.
With a prefix argument, they operate on the selected window's parent.
+++
*** Windmove commands now move to skipped windows if invoked twice in a row.
The new user option 'windmove-allow-repeated-command-override' controls
this behavior: if it is non-nil, invoking the same windmove command twice
overrides the 'no-other-window' property, allowing navigation to windows
that would normally be skipped. The default is t; customize it to nil
if you want the old behavior.
+++
*** New hook 'window-deletable-functions'.
This abnormal hook gives its client a way to save a window from getting
deleted implicitly by functions like 'kill-buffer', 'bury-buffer' and
'quit-restore-window'.
+++
*** New user option 'quit-window-kill-buffer'.
This option specifies whether 'quit-window' should preferably kill or
bury the buffer shown by the window to quit.
+++
*** New user option 'kill-buffer-quit-windows'.
This option has 'kill-buffer' call 'quit-restore-window' to handle the
further destiny of any window showing the buffer to be killed.
+++
*** 'split-window' can optionally resurrect deleted windows.
A new argument REFER of 'split-window' makes it possible to, instead of
making a new window object, reuse an existing, deleted one. This can be
used to preserve the identity of windows when swapping or transposing
them.
+++
*** New window parameter 'quit-restore-prev'.
This parameter is set up by 'display-buffer' when it detects that the
window used already has a 'quit-restore' parameter. Its presence gives
'quit-restore-window' a way to undo a sequence of buffer display
operations more intuitively.
+++
*** 'quit-restore-window' handles new values for BURY-OR-KILL argument.
The values 'killing' and 'burying' are like 'kill' and 'bury' but assume
that the actual killing or burying of the buffer is done by the caller.
+++
*** New user option 'quit-restore-window-no-switch'.
With this option set, 'quit-restore-window' will delete its window more
aggressively rather than switching to some other buffer in it.
---
*** The user option 'display-comint-buffer-action' has been removed.
It has been obsolete since Emacs 30.1. Use '(category . comint)' instead.
Another user option 'display-tex-shell-buffer-action' has been removed too
for which you can use '(category . tex-shell)'.
+++
*** New user option 'split-window-preferred-direction'.
Users can now choose in which direction Emacs tries to split first:
vertical or horizontal. With this new setting, when the frame is in
landscape shape for instance, Emacs could split horizontally before
splitting vertically. The default setting preserves Emacs historical
behavior to try to split vertically first.
+++
*** New argument INDIRECT for 'get-buffer-window-list'.
With this argument non-nil, 'get-buffer-window-list' will include in the
return value windows whose buffers share their text with BUFFER-OR-NAME.
+++
*** New 'display-buffer' action alist entry 'reuse-indirect'.
With such an entry, 'display-buffer-reuse-window' may also choose a
window whose buffer shares text with the buffer to display.
+++
*** New variable 'window-state-normalize-buffer-name'.
When bound to non-nil, 'window-state-get' will normalize 'uniquify'
managed buffer names by removing 'uniquify' prefixes and suffixes. This
helps to restore window buffers across Emacs sessions.
** Frames
+++
*** New function 'frame-deletable-p'.
If this function returns nil, the following call to 'delete-frame' might
fail to delete its argument FRAME or might signal an error. It is
therefore advisable to use this function as part of a condition that
determines whether to call 'delete-frame'.
+++
*** New value 'force' for user option 'frame-inhibit-implied-resize'.
This will inhibit implied resizing while a new frame is made and can be
useful on tiling window managers where the initial frame size should be
specified by external means.
** Mode Line
+++
*** New user option 'mode-line-collapse-minor-modes'.
If non-nil, minor mode lighters on the mode line are collapsed into a
single button. The value could also be a list to specify minor mode
lighters to hide or show. The default value is nil, which retains the
previous behavior of showing all minor mode lighters.
*** New user option 'mode-line-modes-delimiters'.
This option allows changing or removing the delimiters shown around
the major mode and list of minor modes in the mode line. The default
retains the existing behavior of inserting parentheses.
** Tab Bars and Tab Lines
---
*** New abnormal hook 'tab-bar-auto-width-functions'.
This hook allows you to control which tab-bar tabs are auto-resized.
---
*** 'mouse-face' properties are now supported on the 'tab-bar'.
'tab-bar' tab "buttons" are now highlighted when the mouse pointer
hovers over them. You can customize the new face
'tab-bar-tab-highlight'.
---
*** New abnormal hook 'tab-bar-post-undo-close-tab-functions'.
This hook allows you to operate on a reopened tab.
This is useful when you define custom tab parameters that may need
adjustment when a tab is restored, and avoids advice.
---
*** New user option 'tab-bar-define-keys'.
This controls which key bindings tab-bar creates. Values are t, the
default, which defines all keys and is backwards compatible, 'numeric'
(tab number selection only), 'tab' ('TAB' and 'S-TAB' keys only), nil
(which defines none).
This is useful to avoid key binding conflicts, such as when folding in
outline mode using 'TAB' keys, or when a user wants to define her own
tab-bar keys without first having to remove the defaults.
---
*** New variable 'tab-bar-format-tab-help-text-function'.
This variable may be overridden with a user-provided function to
customize help text for tabs displayed on the tab-bar. Help text is
normally shown in the echo area or via tooltips. See the variable's
docstring for arguments passed to a help-text function.
** Project
---
*** New command 'project-root-find-file'.
It is equivalent to running 'project-any-command' with 'find-file'.
---
*** New command 'project-customize-dirlocals'.
It is equivalent to running 'project-any-command' with
'customize-dirlocals'.
---
*** Improved prompt for 'project-switch-project'.
The prompt now displays the chosen project on which to invoke a command.
---
*** The MAYBE-PROMPT argument of 'project-current' can be a string.
When such value is used, the 'project-prompter' is called with it as the
first argument. This is a way for the callers to indicate, for example,
the reason or the context why the project is asked for.
---
*** New command 'project-find-matching-file'.
It can be used when switching between projects with similar file trees
(such as Git worktrees of the same repository). It supports being
invoked standalone or from the 'project-switch-commands' dispatch menu.
+++
*** New user option 'project-list-exclude'.
This user option describes projects that should always be skipped by
'project-remember-project'.
---
*** New command 'project-save-some-buffers' bound to 'C-x p C-x s'.
This is like 'C-x s', but only for this project's buffers.
** Registers
*** New functions 'buffer-to-register' and 'file-to-register'.
These allow users to interactively store file and buffers in registers.
Killed buffers stored in a register using 'buffer-to-register' are
automatically converted to a file-query value if the buffer was visiting
a file.
** IDLWAVE has been moved to GNU ELPA.
The version bundled with Emacs is out-of-date, and is now marked as
obsolete. Use 'M-x list-packages' to install the 'idlwave' package from
GNU ELPA instead.
+++
** New faces 'header-line-active' and 'header-line-inactive'.
These inherit from the 'header-line' face, but the faces actually used
on the header lines are now these two: the selected window uses
'header-line-active', non-selected windows use 'header-line-inactive'.
** In 'customize-face', the "Font family" attribute now supports completion.
** 'process-adaptive-read-buffering' is now nil by default.
Setting this variable to a non-nil value reduces performance and leads
to wrong results in some cases. We believe that it is no longer useful;
please contact us if you still need it for some reason.
---
** 'byte-compile-cond-use-jump-table' is now obsolete.
---
** Modified settings for an enabled theme now apply immediately.
Evaluating a 'custom-theme-set-faces' or 'custom-theme-set-variables'
call for an enabled theme causes the settings to apply immediately,
without a need to re-load the theme.
---
** 'describe-variable' now automatically says if 'setopt' is needed.
If a user option has a defcustom ':set' function, users will normally
need to set it with 'setopt' for it to take an effect. If the docstring
doesn't already mention 'setopt', the 'describe-variable' command will
now add a note about this automatically.
+++
** New user option 'eldoc-help-at-pt' to show help at point via ElDoc.
When enabled, display the 'help-at-pt-kbd-string' via ElDoc. This
setting is an alternative to 'help-at-pt-display-when-idle'.
* Editing Changes in Emacs 31.1
** Commands for keyboard translation.
'key-translate' is now interactive. It prompts for a key to translate
from, and another to translate to, and sets 'keyboard-translate-table'.
The new command 'key-translate-remove' prompts for a key/translation
pair with 'completing-read', and removes it from the translation table.
** Internationalization
---
*** Emacs now supports Unicode version 16.0.
---
*** New input method 'greek-polytonic'.
This input method has support for polytonic and archaic Greek
characters.
---
*** New language environment and input method for Tifinagh.
The Tifinagh script is used to write the Berber languages.
---
*** New input methods for Northern Iroquoian languages.
Input methods are now implemented for Haudenosaunee languages in the
Northern Iroquoian language family: 'mohawk-postfix' (Mohawk
[Kanien’kéha / Kanyen’kéha / Onkwehonwehnéha]), 'oneida-postfix' (Oneida
[Onʌyote’a·ká· / Onyota’a:ká: / Ukwehuwehnéha]), 'cayuga-postfix'
(Cayuga [Gayogo̱ho:nǫhnéha:ˀ]), 'onondaga-postfix' (Onondaga
[Onųdaʔgegáʔ]), and 'seneca-postfix' (Seneca [Onödowá’ga:’]).
Additionally, there is a general-purpose 'haudenosaunee-postfix' input
method to facilitate writing in the orthographies of the five languages
simultaneously.
---
*** New input methods for languages based on Burmese.
These include: Burmese, Burmese (visual order), Shan, and Mon.
---
** 'visual-wrap-prefix-mode' now supports variable-pitch fonts.
When using 'visual-wrap-prefix-mode' in buffers with variable-pitch
fonts, the wrapped text will now be lined up correctly so that it is
exactly below the text after the prefix on the first line.
---
** New commands 'unix-word-rubout' and 'unix-filename-rubout'.
Unix-words are words separated by whitespace regardless of the buffer's
syntax table. In a Unix terminal or shell, 'C-w' kills by Unix-word.
The new commands 'unix-word-rubout' and 'unix-filename-rubout' allow
you to bind keys to operate more similarly to the terminal.
---
** New user option 'kill-region-dwim'.
This option, if non-nil, modifies the fall-back behavior of
'kill-region' ('C-w') if no region is active, and will kill the last word
instead of raising an error. Note that if you have disabled Transient
Mark mode you might prefer to use 'unix-word-rubout', as this feature
relies on there being an active region.
---
** New user option 'delete-pair-push-mark'.
This option, if non-nil, makes 'delete-pair' push a mark at the end of
the region enclosed by the deleted delimiters. This makes it easy to
act on that region. For example, we can highlight it using 'C-x C-x'.
+++
** Electric Pair mode can now pair multiple delimiters at once.
You can now insert or wrap text with multiple sets of parentheses and
other matching delimiters at once with Electric Pair mode, by providing
a prefix argument when inserting one of the delimiters.
+++
** You can now use 'M-~' during 'C-x s' ('save-some-buffers').
Typing 'M-~' while saving some buffers means not to save the buffer and
also to mark it as unmodified. This is an alternative way to mark a
buffer as unmodified which doesn't require switching to that buffer.
** New minor mode 'delete-selection-local-mode'.
This mode sets 'delete-selection-mode' buffer-locally. This can be
useful for enabling or disabling the features of 'delete-selection-mode'
based on the state of the buffer, such as for the different states of
modal editing packages.
** New user variable 'exchange-point-and-mark-highlight-region'.
When set to nil, this modifies 'exchange-point-and-mark' so that it doesn't
activate the mark if it is not already active.
The default value is t, which retains the old behavior.
This variable has no effect when Transient Mark mode is off.
* Changes in Specialized Modes and Packages in Emacs 31.1
** Tree-sitter
*** New user option 'treesit-auto-install-grammar'.
It controls the automatic installation of tree-sitter grammar libraries
needed for tree-sitter based modes, if these grammar libraries are not
available when such modes are turned on.
*** The file treesit-x.el defines a number of simple tree-sitter modes.
Using the new macro 'define-treesit-generic-mode', generic modes are
defined including, but not limited to, 'gitattributes-generic-ts-mode'.
Visiting a file in such mode asks for confirmation before installing
its tree-sitter grammar. Then it highlights the visited file
according to the syntax defined by the grammar.
*** New command 'treesit-cycle-sexp-type'.
It cycles the type of navigation for commands that move across sexp's
and lists, such as 'treesit-forward-sexp', 'treesit-forward-list',
'treesit-down-list', and 'treesit-up-list'. The type can be either
'list', the default, or 'sexp'.
With the default 'list' type these commands move using syntax tables for
symbols and using the thing 'list' for lists.
With the 'sexp' type these commands move across nodes defined by
the tree-sitter thing 'sexp' in 'treesit-thing-settings'.
+++
*** Indirect buffers can have their own parser list.
Before, indirect buffers share their base buffer’s parser list and
parsers. Now they can have their own parser list.
+++
*** New variable 'treesit-language-remap-alist'.
This variable allows a user to remap one language into another, such
that creating a parser for language A actually creates a parser for
language B. By extension, any font-lock rules or indentation rules for
language A will be applied to language B instead.
This is useful for reusing font-lock rules and indentation rules of
language A for language B, when language B is a strict superset of
language A.
+++
*** New accessor functions for each setting in 'treesit-font-lock-settings'.
Now users can access a setting's query, feature, enable flag, and
override flag by 'treesit-font-lock-setting-query',
'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',
and 'treesit-font-lock-setting-override'.
*** New tree-sitter thing 'list'.
Unlike the existing thing 'sexp' that defines both lists and atoms,
'list' defines only lists to be navigated by 'forward-sexp'.
The new function 'treesit-forward-sexp-list' uses 'list'
to move across lists. But to move across atoms inside the list
it uses 'forward-sexp-default-function'.
*** New tree-sitter based functions for moving by lists.
If a major mode defines 'list' in 'treesit-thing-settings',
tree-sitter setup for these modes sets 'forward-list-function' to
'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and
'down-list-function' to 'treesit-down-list'. This enables the
'forward-list', 'up-list', and 'down-list' motion commands for those
modes.
*** Tree-sitter enabled modes now properly support 'show-paren-mode'.
They do that by letting 'show-paren-mode' use the results of parsing by
the tree-sitter library. The new function 'treesit-show-paren-data' is
used to communicate the tree-sitter parsing results to 'show-paren-mode'.
*** Tree-sitter enabled modes now properly support 'hs-minor-mode'.
All commands from hideshow.el can selectively display blocks
defined by the new tree-sitter thing 'list'.
*** New tree-sitter thing 'comment'.
The new variable 'forward-comment-function' is set to the new function
'treesit-forward-comment' if a major mode defines the thing 'comment'.
+++
*** New function 'treesit-language-display-name'.
This new function returns the display name of a language given the
language symbol. For example, 'cpp' is translated to "C++". A new
variable 'treesit-language-display-name-alist' holds the translations of
language symbols where that translation is not trivial.
*** New function 'treesit-merge-font-lock-feature-list'.
This function merges two tree-sitter font-lock feature lists. It
returns a new font-lock feature list with no duplicates in the same
level. It can be used to merge font-lock feature lists in a
multi-language major mode.
*** New function 'treesit-replace-font-lock-feature-settings'.
Given two tree-sitter font-lock settings, it replaces the feature in the
second font-lock settings with the same feature in the first font-lock
settings. In a multi-language major mode it is sometimes necessary to
replace features from one of the major modes with others, that are
better suited to the new multilingual context.
*** New function 'treesit-simple-indent-modify-rules'.
Given two tree-sitter indent rules, it replaces, adds, or prepends rules
in the old rules with new ones, then returns the modified rules. In a
multi-language major mode it is sometimes necessary to modify rules from
one of the major modes to better suit the new multilingual context.
+++
*** New variable 'treesit-aggregated-simple-imenu-settings'.
This variable allows major modes to setup Imenu for multiple languages.
+++
*** New variable 'treesit-aggregated-outline-predicate'.
This variable allows major modes to setup 'outline-minor-mode'
for multiple languages.
*** New function 'treesit-simple-indent-add-rules'.
This new function makes it easier to customize indent rules for
tree-sitter modes.
*** New variable 'treesit-simple-indent-override-rules'.
Users can customize this variable to add simple custom indentation rules
for tree-sitter major modes.
+++
*** 'treesit-language-at-point-function' is now optional.
Multi-language major modes can rely on the default return value from
'treesit-language-at' that uses the new function 'treesit-parsers-at'.
+++
*** New command 'treesit-explore'.
This command replaces 'treesit-explore-mode'. It turns on
'treesit-explore-mode' if it is not on, and pops up the explorer buffer
if it is already on.
+++
*** 'treesit-explore-mode' now supports local parsers.
Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
rather than a language, and it is now possible to select a local parser
at point to explore.
** C-ts mode
+++
*** New user option 'c-ts-mode-enable-doxygen'.
By default, this is nil, and the Doxygen comment blocks in C/C++ sources
are highlighted like other comments. When non-nil, Doxygen comment
blocks are syntax-highlighted if the Doxygen grammar library is
available.
** Go-ts mode
+++
*** New unit test commands.
Three new commands are now available to run unit tests.
The 'go-ts-mode-test-function-at-point' command runs the unit test at
point. If a region is active, it runs all the unit tests under the
region. It is bound to 'C-c C-t t' in 'go-ts-mode'.
The 'go-ts-mode-test-this-file' command runs all unit tests in the current
file. It is bound to 'C-c C-t f' in 'go-ts-mode'.
The 'go-ts-mode-test-this-package' command runs all unit tests under the
package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'.
The 'go-ts-mode-build-tags' user option is available to set a list of
build tags for the test commands.
The 'go-ts-mode-test-flags' user option is available to set a list of
additional flags to pass to the go test command line.
** Java-ts mode
+++
*** New user option 'java-ts-mode-enable-doxygen'.
By default, this is nil, and the Doxygen comment blocks in Java sources
are highlighted like other comments. When non-nil, Doxygen comment
blocks are syntax-highlighted if the Doxygen grammar library is
available.
---
*** New user option 'java-ts-mode-method-chaining-indent-offset'.
Now method chaining is indented by 8 spaces rather than 4, and this
option controls how much is indented for method chaining.
** PHP-ts mode
---
*** 'php-ts-mode-run-php-webserver' can now accept a custom "php.ini" file.
You can use the new optional argument CONFIG when calling
'php-ts-mode-run-php-webserver' to pass an alternative "php.ini" file to
the built-in Web server. Interactively, when invoked with a prefix
argument, 'php-ts-mode-run-php-webserver' prompts for the config file as
well as for other connection parameters.
** Rust-ts mode
---
*** New user option 'rust-ts-mode-fontify-number-suffix-as-type'.
Rust number literals may have an optional type suffix. When this option
is non-nil, this suffix is fontified using 'font-lock-type-face'.
** EIEIO
---
*** New value 'warn' for 'eieio-backward-compatibility'.
This is the new default value and causes warnings to be emitted
at run-time for the use of the associated deprecated features.
'(setq eieio-backward-compatibility t)' can be used to recover
the previous silence.
** Text mode
---
*** New commands to convert between ASCII and full-width characters.
New commands 'fullwidth-region' and 'fullwidth-word' convert ASCII
characters in region or in the word at point to the corresponding
full-width characters, which are customarily used instead of ASCII
characters in CJK texts. For example, 'A' is converted to 'A', '1' is
converted to '1', etc. Companion commands 'halfwidth-region' and
'halfwidth-word' perform the opposite conversion.
** ASM mode
---
*** 'asm-mode-set-comment-hook' is obsolete.
You can now set 'asm-comment-char' from 'asm-mode-hook' instead.
** Ibuffer
---
*** New column 'recency' in Ibuffer display.
The user option 'ibuffer-formats' configures the Ibuffer formats. Add
'recency' to the format to display the column.
---
*** New value 'title' for the user option 'ibuffer-use-header-line'.
Display column titles in the header line if 'ibuffer-use-header-line' is
set to 'title'.
---
*** New user option 'ibuffer-human-readable-size'.
When non-nil, buffer sizes are shown in human readable format.
---
*** 'define-ibuffer-op' prompts can now be functions.
The prompts 'opstring' and 'active-opstring' can now either be strings
or functions. This is useful when your prompts can benefit from dynamic
content.
** ElDoc
---
*** New ElDoc function 'elisp-eldoc-funcall-with-docstring'.
This function includes the current function's docstring in the ElDoc
echo area and can be used as a more detailed alternative to
'elisp-eldoc-funcall'.
---
*** New user option 'elisp-eldoc-funcall-with-docstring-length'.
This user option specifies how long function docstrings must be
displayed in 'elisp-eldoc-funcall-with-docstring'. If set to 'short'
(the default), only display the first sentence of the docstring.
Otherwise, if set to 'full', display the full docstring.
---
*** New user option 'elisp-eldoc-docstring-length-limit'.
This user option controls the maximum length of docstrings in character
units that 'elisp-eldoc-funcall-with-docstring' and
'elisp-eldoc-var-docstring-with-value' will show. By default, it is set
to 1000 characters.
** Buffer Menu
---
*** New user option 'Buffer-menu-human-readable-sizes'.
When non-nil, buffer sizes are shown in human readable format. The
default is nil, which retains the old format.
** Term
*** The terminal emulator now supports auto-margins control.
Term mode now handles DECAWM escape sequences that control whether text
automatically wraps at the right margin:
- \e[?7h enables auto-margins (default)
- \e[?7l disables auto-margins
When auto-margins is disabled, characters that would go beyond the right margin
are discarded, which matches the behavior of physical terminals and other
terminal emulators. Control sequences and escape sequences are still processed
correctly regardless of margin position.
** Smerge
*** New command 'smerge-extend' extends a conflict over surrounding lines.
*** New command 'smerge-refine-exchange-point' to jump to the other side.
When used inside a refined chunk, it jumps to the matching position in
the "other" side of the refinement: if you're in the new text, it jumps
to the corresponding position in the old text and vice versa.
** Image Dired
*** 'image-dired-show-all-from-dir' takes the same first argument as 'dired'.
This allows passing a string with wildcards, or a cons cell where the
first element is a list and the rest is a list of files.
*** Bound unused letters in 'image-dired-thumbnail-mode-map'.
For a more comfortable navigation experience (as in, no modifier keys),
the keys 'f', 'b', 'n', 'p', 'a' and 'e' are now bound to the
same functions as their 'C-' counterparts.
** Browse URL
*** New user option 'browse-url-transform-alist'.
This user option is an alist that allows transforming URLs before asking
a web browser to load them. For example, it could be used like this:
(add-to-list 'browse-url-transform-alist
'("www.google.com" . "www.duckduckgo.com"))
*** New function 'browse-url-qutebrowser' for Qutebrowser.
For better integration with Qutebrowser, set
'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'.
*** New GTK-native launch mode.
For better Wayland support, the pgtk toolkit exposes a new
'x-gtk-launch-uri' browse-url handler and uses it by default when URLs
are browsed from a PGTK frame. For other frames, we fall back to the
default URL launch function. This change allows us to properly raise
browser windows under Wayland using the xdg_activation_v1 protocol.
*** Removed support for some obsolete web browsers.
Conkeror (obsolete since Emacs 28.1), gnome-moz-remote (obsolete since
Emacs 25.1), and gnudoit (obsolete since Emacs 25.1).
** CL-Lib
+++
*** Some cl-lib functions and macros are now built-in.
These functions or macros have been added to Emacs Lisp, and the old
names are now aliases for the built-in equivalents:
- 'cl-incf' renamed to 'incf'
- 'cl-decf' renamed to 'decf'
- 'cl-oddp' renamed to 'oddp'
- 'cl-evenp' renamed to 'evenp'
- 'cl-plusp' renamed to 'plusp'
- 'cl-minusp' renamed to 'minusp'
The old names are considered deprecated, and will be marked as obsolete
in some future release.
+++
*** 'cl-labels' now also accepts '(FUNC EXP)' bindings, like 'cl-flet'.
Such bindings make it possible to compute which function to bind to FUNC.
---
*** 'cl-block' names are now lexically scoped, as documented.
+++
*** 'cl-locally' is now obsolete.
It is an alias for the 'progn' special-form.
+++
*** 'cl-declare' is now obsolete; use 'defvar' instead.
+++
*** 'cl-gensym' is now obsolete; use 'gensym' instead.
+++
*** New macro 'cl-with-accessors'.
This macro is similar to 'with-slots', but uses accessor functions
instead of slot names. It is useful when slots' accessor functions are
used repeatedly, such as reading from a slot and then writing to that
slot. Symbol macros are created for the accessor functions using
'cl-symbol-macrolet', so that they can be used with 'setq' and 'setf'.
** Whitespace
---
*** 'whitespace-cleanup' now adds missing newline at end of file.
If 'whitespace-style' includes 'missing-newline-at-eof' (which is the
default), the 'whitespace-cleanup' function will now add the newline.
** Bookmark
---
*** Bookmark history now saves each bookmark only once.
Previously, the variable 'bookmark-history' accumulated duplicate
bookmark names when bookmark features were used interactively. This
made their history larger than necessary for frequent bookmark users.
Bookmark names are now saved uniquely.
---
*** New user option 'bookmark-bmenu-type-column-width'.
This user option controls the width of the type column on the bookmark
menu 'bookmark-bmenu-list'. The default value is 8 which is backwards
compatible.
** Recentf
---
*** New user option 'recentf-show-messages'.
'recentf-save-list' can print a message when saving the recentf list.
The new option, if set to nil, suppresses this message.
** Saveplace
---
*** You can now regularly auto-save places.
Customize user option 'save-place-autosave-interval' to the number of
seconds between auto saving places. For example, to save places every 5
minutes:
M-x customize-option RET save-place-autosave-interval RET 300
Or in Elisp:
(setopt save-place-autosave-interval (* 60 5))
If 'save-place-autosave-interval' is nil, auto saving is disabled; this
is the default. As before, saved places are scheduled to be saved at
Emacs exit.
** Savehist
---
*** The history file can be modified by external tools.
Emacs can now handle this case gracefully by merging the external
and internal history information.
This feature is activated only when 'savehist-additional-variables' is nil.
---
*** Savehist no longer saves additional variables more than once.
If you configured 'savehist-additional-variables' with variables that
were also dynamically accumulated in minibuffer history during
minibuffer use, they are now saved only once in the file specified by
'savehist-file'. Previously, they were saved twice.
** Rectangle Mark
---
*** New user option to control whether empty rectangle selections are shown.
The new user option 'rectangle-indicate-zero-width-rectangle' can be
used to disable the default display of empty rectangular selections.
The default is t; set it to nil to disable the indication (which causes
a horizontal shift of text on display, and thus could be annoying).