New function set-temporary-overlay-map and macros (defvar|setq)-local.
[bpt/emacs.git] / etc / NEWS
1 GNU Emacs NEWS -- history of user-visible changes.
2
3 Copyright (C) 2010-2012 Free Software Foundation, Inc.
4 See the end of the file for license conditions.
5
6 Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
7 If possible, use M-x report-emacs-bug.
8
9 This file is about changes in Emacs version 24.
10
11 See files NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18,
12 and NEWS.1-17 for changes in older Emacs versions.
13
14 You can narrow news to a specific version by calling `view-emacs-news'
15 with a prefix argument or by typing C-u C-h C-n.
16
17 Temporary note:
18 +++ indicates that the appropriate manual has already been updated.
19 --- means no change in the manuals is called for.
20 When you add a new item, please add it without either +++ or ---
21 so we will look at it and add it to the manual.
22
23 \f
24 * Installation Changes in Emacs 24.2
25
26 ** New configure option '--enable-gcc-warnings', intended for developers.
27 If building with GCC, this enables compile-time checks that warn about
28 possibly-questionable C code. On a recent GNU system there should be
29 no warnings; on older and on non-GNU systems the generated warnings
30 may be useful.
31
32 ---
33 ** Emacs uses libtinfo in preference to libncurses, if available.
34
35 ---
36 ** On FreeBSD and NetBSD, configure no longer adds /usr/local/lib and
37 /usr/pkg/lib to the linker search path. You must add them yourself if
38 you want them.
39
40 \f
41 * Startup Changes in Emacs 24.2
42
43 ** Emacs no longer searches for `leim-list.el' files beneath the standard
44 lisp/ directory. There should not be any there anyway. If you have
45 been adding them there, put them somewhere else, eg site-lisp.
46
47 \f
48 * Changes in Emacs 24.2
49
50 ** New functions `system-users', `system-groups' return lists of the user
51 name, group names known to the system (where possible).
52
53 ** If your Emacs was built from a bzr checkout, the new variable
54 `emacs-bzr-version' contains information about which bzr revision was used.
55
56 ** ImageMagick support, if available, is automatically enabled.
57 It is no longer necessary to call `imagemagick-register-types'
58 explicitly to install ImageMagick image types; that function is called
59 automatically when setting `imagemagick-types-inhibit'.
60
61 *** Setting `imagemagick-types-inhibit' to t now disables the use of
62 ImageMagick to view images, set
63
64 ** String values for `initial-buffer-choice' also apply to emacsclient
65 frames, if emacsclient is only told to open a new frame without
66 specifying any file to visit or expression to evaluate.
67
68 \f
69 * Editing Changes in Emacs 24.2
70
71 ** M-x move-to-column, if called interactively with no prefix arg, now
72 prompts for a column number.
73
74 ** `mouse-avoidance-banish-position' can now be used to customize
75 `mouse-avoidance-mode' further.
76
77 ** `C-M-f' and `C-M-b' will now move to the path name separator
78 character when doing minibuffer filename prompts.
79
80 ** `goto-char' is now bound to `M-g c'.
81
82 \f
83 * Changes in Specialized Modes and Packages in Emacs 24.2
84
85 ** New `derived-mode' filter for Ibuffer, bound to `/ M'.
86 `/ m' is now bound to filter by used-mode, which used to be bound to `/ M'.
87
88 ** Apropos
89
90 *** The faces used by Apropos are now directly customizable.
91 These faces are named `apropos-symbol', `apropos-keybinding', and so on;
92 see the `apropos' Custom group for details.
93
94 **** The old options whose values specified faces to use were removed
95 (i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.).
96
97 ** Customize
98
99 *** `custom-reset-button-menu' now defaults to t.
100
101 *** Non-option variables are never matched in `customize-apropos' and
102 `customize-apropos-options' (i.e. the prefix argument does nothing for
103 these commands now).
104
105 ** erc will look up server/channel names via auth-source and use the
106 channel keys found, if any.
107
108 ** Follow mode
109
110 *** The obsolete variable `follow-mode-off-hook' has been removed.
111
112 *** Follow mode no longer works by using advice.
113 The option `follow-intercept-processes' has been removed.
114
115 ** The `server-auth-key' variable can be used to set a permanent
116 shared key for Emacs Server.
117
118 ** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
119 closing brackets to be aligned with the line of the opening bracket.
120
121 ** FIXME something happened to ses.el, 2012-04-17.
122
123 ** which-function-mode now applies to all applicable major modes by default.
124
125 ** D-Bus
126
127 +++
128 *** New variables `dbus-compiled-version' and `dbus-runtime-version'.
129
130 +++
131 *** The D-Bus object manager interface is implemented.
132
133 +++
134 *** Variables of type :(u)int32 and :(u)int64 accept floating points,
135 if their value does not fit into Emacs's integer range.
136
137 +++
138 *** The function `dbus-call-method' works non-blocking now, it can be
139 interrupted by C-g. `dbus-call-method-non-blocking' is obsolete.
140
141 +++
142 *** Signals can be sent also as unicast message.
143
144 +++
145 *** The argument list of `dbus-register-signal' has been extended,
146 according to the new match rule types of D-Bus. See the manual for
147 details.
148
149 +++
150 *** `dbus-init-bus' supports private connections.
151
152 +++
153 *** There is a new function `dbus-setenv'.
154
155 +++
156 ** notifications.el supports now version 1.2 of the Notifications API.
157 The function `notifications-get-capabilities' returns the supported
158 server properties.
159
160 ** Obsolete packages:
161
162 *** assoc.el
163 In most cases, assoc+member+push+delq work just as well.
164 And in any case it's just a terrible package: ugly semantics, terrible
165 inefficiency, and not namespace-clean.
166
167 *** bruce.el
168
169 *** mailpost.el
170
171 *** mouse-sel.el
172
173 *** patcomp.el
174
175 \f
176 * New Modes and Packages in Emacs 24.2
177 \f
178 * Incompatible Lisp Changes in Emacs 24.2
179
180 +++
181 ** Docstrings starting with `*' no longer indicate user options.
182 Only variables defined using `defcustom' are considered user options.
183 The function `user-variable-p' is now an obsolete alias for
184 `custom-variable-p'.
185
186 ** `face-spec-set' no longer sets frame-specific attributes when the
187 third argument is a frame (that usage was obsolete since Emacs 22.2).
188
189 +++
190 ** The arguments of `dbus-register-signal' are no longer just strings,
191 but keywords or keyword-string pairs. The old argument list will
192 still be supported for Emacs 24.x.
193
194 ** The following obsolete variables and varaliases have been removed:
195
196 *** `facemenu-unlisted-faces'
197 *** `rmail-decode-mime-charset'
198
199 \f
200 * Lisp changes in Emacs 24.2
201
202 ** New function `set-temporary-overlay-map'.
203
204 ** New macros `setq-local' and `defvar-local'.
205
206 ** New error type and new function `user-error'. Doesn't trigger the debugger.
207
208 ** Completion
209
210 *** New function `completion-table-with-quoting' to handle completion
211 in the presence of quoting, such as file completion in shell buffers.
212
213 *** New function `completion-table-subvert' to use an existing completion
214 table, but with a different prefix.
215
216 ** Time
217
218 *** `current-time-string' no longer requires that its argument's year
219 must be in the range 1000..9999. It now works with any year supported
220 by the underlying C implementation.
221
222 ** `automount-dir-prefix' is obsolete.
223 \f
224 * Changes in Emacs 24.2 on non-free operating systems
225
226 ** New configure.bat options on MS-Windows:
227
228 *** --without-libxml2 omits support for libxml2, even if its presence
229 is detected.
230
231 \f
232 * Installation Changes in Emacs 24.1
233
234 ** Emacs can be compiled with Gtk+ 3.0 if you pass --with-x-toolkit=gtk3
235 to configure. Note that other libraries used by Emacs, RSVG and GConf,
236 also depend on Gtk+. You can disable them with --without-rsvg and
237 --without-gconf.
238
239 ** Emacs can be compiled with GnuTLS support.
240 This happens by default if a suitably recent version of the library is
241 found at build time. To prevent this, use the configure option
242 `--without-gnutls'. See below for GnuTLS features.
243
244 ** Emacs can be compiled with SELinux support.
245 This happens by default if a suitably recent version of the library is
246 found at build time. To prevent this, use the configure option
247 `--without-selinux'. See below for SELinux features.
248
249 ** Emacs can be compiled with ImageMagick support.
250 This happens by default if a suitably recent version of the library is
251 found at build time. To prevent this, use the configure option
252 `--without-imagemagick'. See below for ImageMagick features.
253 This feature is not available for the Nextstep or MS ports.
254
255 ** Emacs can be compiled with libxml2 support.
256 This happens by default if a suitably recent version of the library is
257 found at build time. To prevent this, use the configure option
258 `--without-xml2'. See below for libxml2 features.
259
260 ** By default, the installed Info and man pages are compressed.
261 You can disable this by configuring --without-compress-info.
262
263 ** New configure option --with-wide-int.
264 With it, Emacs integers typically have 62 bits, even on 32-bit machines.
265 On 32-bit hosts, this raises the limit on buffer sizes from about 512 MiB
266 to about 2 GiB.
267
268 ** New configure options: --with-mmdf, --with-mail-unlink, --with-mailhost.
269 These provide no new functionality, they just remove the need to edit
270 lib-src/Makefile by hand in order to use the associated features.
271
272 ** New configure option --enable-use-lisp-union-type.
273 This is only useful for Emacs developers to debug certain types of bugs.
274 This is not a new feature; only the configure flag is new.
275
276 ** The standalone programs digest-doc and sorted-doc are removed.
277 Emacs now uses Lisp commands `doc-file-to-man' and `doc-file-to-info'.
278
279 ** The standalone program `fakemail' is removed.
280 If you need it, feedmail.el provides a superset of the functionality.
281
282 \f
283 * Startup Changes in Emacs 24.1
284
285 ** The --unibyte, --multibyte, --no-multibyte, and --no-unibyte
286 command line arguments, and the EMACS_UNIBYTE environment variable, no
287 longer have any effect. (They were declared obsolete in Emacs 23.)
288
289 ** New command line option `--no-site-lisp' removes site-lisp directories
290 from load-path. -Q now implies this. This option does not affect the
291 EMACSLOADPATH environment variable (and hence has no effect for
292 Nextstep builds).
293
294 \f
295 * Changes in Emacs 24.1
296
297 ** Completion
298
299 *** Many packages now use the `completion-at-point' command,
300 rather than implementing separate completion commands.
301
302 *** `completion-at-point' now handles tags and semantic completion.
303
304 *** Completion in a non-minibuffer now tries to detect the end of completion
305 and pops down the *Completions* buffer accordingly.
306
307 *** New option `completion-cycle-threshold' allows completion cycling.
308
309 *** New option `completion-category-overrides' for overriding the
310 default completion style in certain circumstances.
311
312 *** New completion style `substring'.
313
314 *** Completion of buffer names uses `substring' completion by default.
315
316 *** The option `widget-complete-field' has been removed.
317
318 ** Mail changes
319
320 *** The first time you try sending mail, Emacs asks for a mail method.
321 This is implemented by a new default for `send-mail-function', which
322 is `sendmail-query-once'. This offers to use the smtpmail package, or
323 to use the old defaults relying on external mail facilities
324 (`sendmail-send-it' on GNU/Linux and other Unix-like systems, and
325 `mailclient-send-it' on Windows).
326
327 *** Typing C-c m in the buffer made by M-x report-emacs-bug transfers
328 the report to your desktop's preferred mail client, if there is one.
329 This uses either the "xdg-email" utility, or Mac OS's "open" command.
330
331 *** See Changes in Specialized Modes and Packages for SMTPmail changes
332 and Mail mode changes
333
334 ** Emacs server and client changes
335
336 *** New option `server-port' specifies the port for TCP Emacs servers.
337
338 *** New emacsclient argument -q/--quiet suppresses some status messages.
339
340 *** New emacsclient argument --frame-parameters specifies the frame
341 parameters of any newly-created graphical frame.
342
343 *** If emacsclient shuts down due to Emacs signaling an error,
344 its exit status is 1.
345
346 *** New emacsclient argument --parent-id ID.
347 This opens a client frame in parent X window ID, via XEmbed, similar
348 to the --parent-id argument to Emacs.
349
350 ** Internationalization changes
351
352 *** Emacs now supports display and editing of bidirectional text.
353 Right-to-left (RTL) scripts, such as Arabic, Farsi, and Hebrew, are
354 displayed in the correct visual order as expected by users of those
355 scripts. The display reordering is a "full bidirectionality" class
356 implementation of the Unicode Bidirectional Algorithm (UBA). Buffers
357 with no RTL text should look exactly the same as before.
358
359 **** New buffer-local variable `bidi-display-reordering'.
360 To disable display reordering in a buffer, change this to nil.
361
362 **** New buffer-local variable `bidi-paragraph-direction'.
363 If nil (the default), Emacs determines the base direction of each
364 paragraph from its text, as specified by the UBA. Setting the value
365 to `right-to-left' or `left-to-right' forces a base direction on each
366 paragraph.
367
368 Paragraphs with right-to-left base direction are displayed starting at
369 the right window edge.
370
371 *** Enhanced support for characters with no glyphs in available fonts,
372 or, on text terminals, characters that cannot be encoded by the
373 terminal coding system. The new option `glyphless-char-display-control'
374 specifies how to display them: as a hexadecimal code in a box, a thin
375 1-pixel space, an empty box, etc.
376
377 *** New input methods: farsi, farsi-translit, bulgarian-alt-phonetic.
378
379 *** `nobreak-char-display' now also highlights Unicode hyphen chars
380 (U+2010 and U+2011).
381
382 *** New Hebrew translation of the Emacs Tutorial.
383 Type `C-u C-h t' to choose it in case your language setup doesn't
384 automatically select it.
385
386 ** An Emacs Lisp package manager is now included.
387 This is a convenient way to download and install additional packages,
388 from a package repository at http://elpa.gnu.org.
389
390 *** M-x list-packages shows a list of packages, which can be
391 selected for installation.
392
393 *** New command `describe-package', bound to `C-h P'.
394
395 *** By default, all installed packages are loaded automatically when
396 Emacs starts up. To disable this, set `package-enable-at-startup' to
397 nil. To specify the packages to load, customize `package-load-list'.
398
399 ** Custom theme changes
400
401 *** New command `M-x customize-themes', which provides a convenient
402 interface for enabling and disabling Custom themes.
403
404 *** New option `custom-theme-load-path' is the load path for themes.
405 Emacs no longer looks for Custom themes in `load-path'. The default
406 value of `custom-theme-load-path' says to look for themes in
407 `custom-theme-directory', followed by a subdirectory of
408 `data-directory' named "themes/", which contains a small selection of
409 built-in Custom themes.
410
411 *** New option `custom-safe-themes' records known-safe theme files.
412 If a theme is not in this list, Emacs queries before loading it, and
413 offers to save the theme to `custom-safe-themes' automatically. By
414 default, all themes included in Emacs are treated as safe.
415
416 ** Improved GTK integration
417
418 *** GTK scroll-bars are now placed on the right by default.
419 The function `set-scroll-bar-mode' can change this.
420
421 *** GTK tool bars can have just text, just images or images and text.
422 Customize `tool-bar-style' to choose the style. On a Gnome desktop,
423 the default is taken from desktop settings.
424
425 *** GTK tool bars can be placed on any edge of the frame.
426 The frame-parameter tool-bar-position controls this. It takes the
427 values top, left, right or bottom. The Options => Show/Hide menu has
428 entries for this.
429
430 *** The default colors for selected text (the `region' face) are taken
431 from the GTK theme when Emacs is built with GTK.
432
433 *** Emacs uses GTK tooltips by default if built with GTK.
434 You can disable this by changing `x-gtk-use-system-tooltips' to nil.
435
436 ** Graphical interface changes
437
438 *** On graphical displays, the mode-line no longer ends in dashes.
439 Also, the first dash (which does not indicate anything) is just
440 displayed as a space.
441
442 *** `menu-bar-select-buffer-function' lets you choose another operation
443 instead of `switch-to-buffer' when selecting an item in the Buffers menu.
444
445 *** Lucid menus and dialogs can display antialiased fonts if Emacs is
446 built with Xft. These fonts can be set via X resources, for example:
447 Emacs.pane.menubar.font: Courier-12
448
449 ** Exiting changes
450
451 *** Emacs now calls `kill-emacs' if it receives SIGTERM or SIGHUP,
452 or if it receives a SIGINT signal in batch mode.
453
454 *** `kill-emacs-hook' is now also run in batch mode.
455 Third-party code which adds to `kill-emacs-hook' should check if they
456 do the right thing in batch mode.
457
458 ** Scrolling changes
459
460 *** New scrolling commands `scroll-up-command' and `scroll-down-command'
461 (bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
462 of buffer at first key-press (instead they move to top/bottom of buffer)
463 when `scroll-error-top-bottom' is non-nil.
464
465 *** New option `scroll-error-top-bottom' (see above).
466
467 *** New scrolling commands `scroll-up-line' and `scroll-down-line'
468 scroll a line instead of full screen.
469
470 *** New property `scroll-command' should be set on a command's symbol to
471 define it as a scroll command affected by `scroll-preserve-screen-position'.
472
473 *** If you customize `scroll-conservatively' to a value greater than 100,
474 Emacs will never recenter point in the window when it scrolls due to
475 cursor motion commands or commands that move point (e.f., `M-g M-g').
476 Previously, you needed to use `most-positive-fixnum' as the value of
477 `scroll-conservatively' to achieve the same effect.
478
479 *** "Aggressive" scrolling now honors the scroll margins.
480 If you customize `scroll-up-aggressively' or
481 `scroll-down-aggressively' and move point off the window, Emacs now
482 scrolls the window so as to avoid positioning point inside the scroll
483 margin.
484
485 ** Basic SELinux support has been added.
486 This requires Emacs to be linked with libselinux at build time.
487
488 *** Emacs preserves the SELinux file context when backing up.
489 Also, the function `copy-file' has an extra optional argument for
490 preserving SELinux context, and the return value of `backup-buffer'
491 now includes the SELinux context.
492
493 *** New functions `file-selinux-context' and `set-file-selinux-context'
494 get and set the SELinux context of a file.
495
496 ** Trash changes
497
498 *** `delete-by-moving-to-trash' now only affects commands that specify
499 trashing. This avoids inadvertently trashing temporary files.
500
501 *** Calling `delete-file' or `delete-directory' with a prefix argument
502 now forces true deletion, regardless of `delete-by-moving-to-trash'.
503
504 ** File- and directory-local variable changes
505
506 *** You can stop directory local vars from applying to subdirectories.
507 Add an element (subdirs . nil) to the alist portion of any variables
508 settings to indicate that the section should not apply to
509 subdirectories.
510
511 *** Directory local variables can apply to some file-less buffers.
512 Affected modes include dired, vc-dir, and log-edit. For example,
513 adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
514 turn on `whitespace-mode' for *vc-diff* buffers. Modes should call
515 `hack-dir-local-variables-non-file-buffer' to support this.
516
517 *** Using "mode: MINOR-MODE" to enable a minor mode is deprecated.
518 Instead, use "eval: (minor-mode 1)".
519
520 *** The variable `inhibit-first-line-modes-regexps' has been renamed
521 to `inhibit-local-variables-regexps'. As the name suggests, it now
522 applies to ALL file local variables, not just -*- lines. The
523 associated `inhibit-first-line-modes-suffixes' has been renamed in the
524 corresponding way.
525
526 ** Window changes
527
528 *** The `quit-window' command now restores the last buffer displayed
529 in the quitted window.
530
531 *** Resizing an Emacs frame now preserves proportional window sizes,
532 modulo restrictions like window minimum sizes and fixed-size windows.
533
534 *** The behavior of `display-buffer' is now customizable in detail.
535
536 **** New option `display-buffer-base-action' specifies a list of
537 user-determined display "actions" (functions and optional arguments
538 for choosing the displaying window).
539
540 This takes precedence over the default display action, which is
541 specified by `display-buffer-fallback-action'.
542
543 **** New option `display-buffer-alist' maps buffer name regexps to
544 display actions, taking precedence over `display-buffer-base-action'.
545
546 *** New option `window-combination-limit'.
547 The new option `window-combination-limit' allows to return the space
548 obtained for resizing or creating a window more reliably to the window
549 from which such space was obtained.
550
551 *** New option `window-combination-resize'.
552 The new option `window-combination-resize' allows to split a window that
553 otherwise cannot be split because it's too small by stealing space from
554 other windows in the same combination. Subsequent resizing or deletion
555 of the window will resize all windows in the same combination as well.
556
557 *** New option `frame-auto-hide-function' lets you choose between
558 iconifying or deleting a frame when burying a buffer in a dedicated
559 frame, or quitting a window showing a buffer in a frame of its own.
560
561 *** New commands `maximize-window' and `minimize-window'.
562 These maximize and minimize the size of a window within its frame.
563
564 *** New commands `switch-to-prev-buffer' and `switch-to-next-buffer'.
565 These functions allow to navigate through the live buffers that have
566 been shown in a specific window.
567
568 ** Minibuffer changes
569
570 *** The inactive minibuffer has its own major mode `minibuffer-inactive-mode'.
571 This is handy for minibuffer-only frames, and is also used for the feature
572 where mouse-1 pops up *Messages*"', which can now easily be changed.
573
574 *** Minibuffers set `truncate-lines' to nil.
575 If you want to change the value to something else, you could use
576 for example `minibuffer-setup-hook'.
577
578 ** `auto-mode-case-fold' is now enabled by default.
579
580 ** `backup-by-copying-when-mismatch' now defaults to t.
581
582 ** New basic faces `error', `warning', `success'.
583 These are used to highlight text indicating failure, caution or
584 successful operation.
585
586 ** New option `list-colors-sort' defines the color sort order
587 for `list-colors-display'.
588
589 ** The variable `focus-follows-mouse' now always defaults to nil.
590
591 \f
592 * Editing Changes in Emacs 24.1
593
594 ** Search changes
595
596 *** C-y in Isearch is now bound to `isearch-yank-kill', instead of
597 `isearch-yank-line'.
598
599 *** M-y in Isearch is now bound to `isearch-yank-pop', instead of
600 `isearch-yank-kill'.
601
602 *** M-s C-e in Isearch is now bound to `isearch-yank-line'.
603
604 ** New commands `count-words-region' and `count-words'.
605
606 *** M-= is bound to `count-words-region', not `count-lines-region'.
607 The `count-words-region' command, when called interactively, reports
608 the number of lines, words, and characters in the region. It is a
609 superset of the old `count-lines-region', which is now an obsolete
610 alias for it.
611
612 ** The command `just-one-space' (M-SPC), if given a negative argument,
613 also deletes newlines around point.
614
615 ** Deletion changes
616
617 *** New option `delete-active-region'.
618 If non-nil, [delete] and DEL delete the region if it is active and no
619 prefix argument is given. If set to `kill', those commands kill
620 instead.
621
622 *** New command `delete-forward-char', bound to [delete].
623 This is meant for interactive use, and obeys `delete-active-region'.
624 The command `delete-char' does not obey `delete-active-region'.
625
626 *** `delete-backward-char' is now a Lisp function.
627 Apart from obeying `delete-active-region', its behavior is unchanged.
628 However, the byte compiler now warns if it is called from Lisp; Lisp
629 callers should use delete-char with a negative argument instead.
630
631 *** The option `mouse-region-delete-keys' has been deleted.
632
633 ** Selection changes.
634
635 The default handling of clipboard and primary selections has been
636 changed to conform with modern X applications. In short, most
637 commands for killing and yanking text now use the clipboard, while
638 mouse commands use the primary selection.
639
640 In the following, we provide a list of these changes, followed by a
641 list of steps to get the old behavior back if you prefer that.
642
643 *** `select-active-regions' now defaults to t.
644 Merely selecting text (e.g. with drag-mouse-1) no longer puts it in
645 the kill ring. The selected text is put in the primary selection, if
646 the system possesses a separate primary selection facility (e.g. X).
647
648 **** `select-active-regions' also accepts a new value, `only'.
649 This means to only set the primary selection for temporarily active
650 regions (usually made by mouse-dragging or shift-selection);
651 "ordinary" active regions, such as those made with C-SPC followed by
652 point motion, do not alter the primary selection.
653
654 **** `mouse-drag-copy-region' now defaults to nil.
655
656 *** mouse-2 is now bound to `mouse-yank-primary'.
657 This pastes from the primary selection, ignoring the kill-ring.
658 Previously, mouse-2 was bound to `mouse-yank-at-click'.
659
660 *** `x-select-enable-clipboard' now defaults to t on all platforms.
661
662 *** `x-select-enable-primary' now defaults to nil.
663 Thus, commands that kill text or copy it to the kill-ring (such as
664 M-w, C-w, and C-k) also use the clipboard---not the primary selection.
665
666 **** The "Copy", "Cut", and "Paste" items in the "Edit" menu are now
667 exactly equivalent to M-w, C-w, and C-y respectively.
668
669 **** Note that on MS-Windows, `x-select-enable-clipboard' was already
670 non-nil by default, as Windows does not support the primary selection
671 between applications.
672
673 *** To return to the previous behavior, do the following:
674
675 **** Change `select-active-regions' to nil.
676 **** Change `mouse-drag-copy-region' to t.
677 **** Change `x-select-enable-primary' to t (on X only).
678 **** Change `x-select-enable-clipboard' to nil.
679 **** Bind `mouse-yank-at-click' to mouse-2.
680
681 *** Support for X cut buffers has been removed.
682
683 *** X clipboard managers are now supported.
684 To inhibit this, change `x-select-enable-clipboard-manager' to nil.
685
686 ** New command `C-x r N' (`rectangle-number-lines') numbers the lines
687 in the current rectangle. With a prefix argument, this prompts for a
688 number to count from and for a format string.
689
690 ** `redisplay-dont-pause' now defaults to t.
691 This makes Emacs feel more responsive to editing commands that arrive
692 at high rate, e.g. if you lean on some key, because stopping redisplay
693 in the middle (when this variable is nil) forces more expensive
694 updates later on, and Emacs appears to be unable to keep up.
695
696 ** The behavior of <TAB> for active regions in Text mode has changed.
697 In Text and related modes, typing <TAB> (`indent-for-tab-command')
698 when the region is active causes Emacs to indent all the lines in the
699 region, aligning them with the line previous to the first line in the
700 region (or with the left margin if there is no previous line).
701
702 ** When `occur' is called with a prefix argument, matching strings are
703 collected into the `*Occur*' buffer without line numbers. If there
704 are parenthesized subexpressions in the specified regexp, `occur'
705 reads replacement text that may contain \\& and \\N whose convention
706 follows `replace-match'.
707
708 \f
709 * Changes in Specialized Modes and Packages in Emacs 24.1
710
711 ** Archive Mode has basic support for browsing and updating 7z archives.
712
713 ** BibTeX mode
714
715 *** BibTeX mode now supports biblatex.
716 Use the variable `bibtex-dialect' to select different BibTeX dialects.
717 `bibtex-entry-field-alist' is now an obsolete alias for
718 `bibtex-BibTeX-entry-alist'.
719
720 *** New command `bibtex-search-entries', bound to C-c C-a.
721
722 *** New `bibtex-entry-format' option `sort-fields', disabled by default.
723
724 *** New variable `bibtex-search-entry-globally'.
725
726 ** Browse-url
727
728 *** New option `browse-url-mailto-function' specifies how to handle "mailto:"s.
729
730 *** The default browser used by the package is now the "xdg-open" program,
731 on platforms that support it. This calls your desktop's preferred browser.
732
733 ** Calendar, Diary, and Appt
734
735 *** Diary entries can contain non-printing "comments".
736 See the variable `diary-comment-start'.
737
738 *** Appointments can specify their individual warning times.
739 See the variable `appt-warning-time-regexp'.
740
741 *** The function specified by `appt-disp-window-function' may be passed
742 lists of arguments if multiple appointments are due at similar times.
743 If you are using a custom function for this, you should update it.
744
745 *** New function `diary-hebrew-birthday'.
746
747 *** Elements of `calendar-day-abbrev-array' and `calendar-month-abbrev-array'
748 may no longer be nil, but must all be strings.
749
750 *** The obsolete (since Emacs 22.1) method of enabling the appt
751 package by adding `appt-make-list' to `diary-hook' has been removed.
752 Use `appt-activate' instead.
753
754 *** Some appt variables (obsolete since Emacs 22.1) have been removed:
755 appt-issue-message (use the function appt-activate)
756 appt-visible/appt-msg-window (use the variable appt-display-format)
757
758 *** Some diary function aliases (obsolete since Emacs 22.1) have been removed:
759 view-diary-entries, list-diary-entries, show-all-diary-entries
760
761 ** CC Mode
762
763 *** New feature to "guess" the style in an existing buffer.
764 The main entry point is M-x c-guess.
765
766 *** Java Mode now supports Java 5.0 (Tiger) and 6 (Mustang).
767
768 *** `c-beginning-of-defun' and `c-end-of-defun' now respect nested scopes.
769 Thus C-M-a will, by default, go to the beginning of the immediate function,
770 not the top level.
771
772 *** "Macros with semicolons" can be registered for correct indentation.
773 Where such a macro ends a line (no semicolon) the next statement is no longer
774 parsed as a statement continuation.
775
776 ** Comint and modes derived from it use the standard completion code.
777
778 ** Compilation mode
779
780 *** Compilation mode can be used without Font Lock mode.
781 `compilation-parse-errors-function' is now obsolete.
782
783 *** New variable `compilation-filter-start', which is bound while
784 `compilation-filter-hook' runs. It records the start position of the
785 text inserted by `compilation-filter'.
786
787 *** `compilation-error-screen-columns' and `compilation-first-column'
788 are obeyed in the editing buffer. So programming language modes can
789 set them, whereas previously only the value in the *Compilation*
790 buffer was used.
791
792 ** Customize
793
794 *** Customize buffers now contain a search field.
795 The search is performed using `customize-apropos'.
796 To turn off the search field, set `custom-search-field' to nil.
797
798 *** Custom options now start out hidden if at their default values.
799 Use the arrow to the left of the option name to toggle visibility.
800
801 *** custom-buffer-sort-alphabetically now defaults to t.
802
803 *** The color widget now has a "Choose" button, which allows you to
804 choose a color via `list-colors-display'.
805
806 ** D-Bus
807
808 *** It is now possible to access buses other than the default system
809 or session bus.
810
811 *** The `dbus-register-method' and `dbus-register-property' functions
812 optionally do not register names.
813
814 *** The new function `dbus-register-service' registers a known service
815 name on a D-Bus without also registering a property or a method.
816
817 ** Dired-x
818
819 *** C-x C-j (`dired-jump') and C-x 4 C-j (`dired-jump-other-window'),
820 if called with a prefix argument, read a file name from the minibuffer
821 instead of using the current buffer.
822
823 *** The "dired local variables" feature of Dired-x is obsolete.
824 The standard directory local variables feature replaces it.
825
826 ** ERC changes
827
828 *** New options `erc-autojoin-timing' and `erc-autojoin-delay',
829 controlling attempts to autojoin a channel.
830
831 *** New variable `erc-coding-system-precedence': If we use `undecided'
832 as the server coding system, this variable will then be consulted.
833 The default is to decode strings that can be decoded as utf-8 as
834 utf-8, and do the normal `undecided' decoding for the rest.
835
836 ** Eshell changes
837
838 *** The default value of `eshell-directory-name' has changed
839 to be an "eshell" directory in `user-emacs-directory'.
840 The old "~/.eshell/" directory is still used if it exists, though.
841
842 ** gdb-mi
843
844 *** The M-x gdb command now uses the GDB Machine Interface protocol.
845 It now supports multithread non-stop debugging and simultaneous
846 debugging of several threads.
847
848 ** Image mode
849
850 *** RET (`image-toggle-animation') toggles animation, if applicable.
851 Animation plays once, unless the option `image-animate-loop' is non-nil.
852
853 ** Info
854
855 *** New command M-x info-display-manual displays a named Info manual.
856 If that manual is already visited in some Info buffer, it displays
857 that buffer. (This is handy if you have many manuals in many *info*
858 buffers, and don't remember the name of the buffer visiting the manual
859 you want to consult.) Otherwise, it loads and displays the manual.
860
861 *** `e' is now bound to `end-of-buffer' rather than to `Info-edit'.
862 This is for compatibility with the stand-alone Info reader program,
863 and also because `Info-edit' is a rarely used command that is disabled
864 by default.
865
866 ** Mail mode changes (not Message mode)
867
868 *** New command M-x mail-add-attachment for adding MIME attachments
869
870 *** The command M-x mail-attach-file was renamed to M-x mail-insert-file.
871 (Its name is misleading, since it has nothing to do with MIME
872 attachments.) The old name is now an obsolete alias to the new name.
873
874 ** MH-E has been updated to MH-E version 8.3.1.
875 See MH-E-NEWS for details.
876
877 ** Modula-2 mode provides auto-indentation.
878
879 ** mpc.el: Can use pseudo tags of the form tag1|tag2 as a union of two tags.
880
881 ** nXML mode no longer binds C-RET to `nxml-complete'.
882 Completion is now performed via `completion-at-point', bound to C-M-i
883 or M-TAB. If `nxml-bind-meta-tab-to-complete-flag' is non-nil (the
884 default), this performs tag completion.
885
886 ** Org mode has been updated to version 7.8.09.
887 See ORG-NEWS for details.
888
889 ** Prolog mode has been completely revamped, with lots of additional
890 functionality such as more intelligent indentation, electricity,
891 support for more variants, including Mercury, and a lot more.
892
893 ** Rmail
894
895 *** The command `rmail-epa-decrypt' decrypts OpenPGP data
896 in the Rmail incoming message.
897
898 *** The variable `rmail-message-filter' no longer has any effect.
899 This change was made in Emacs 23.1 but was not advertised at the time.
900 Try using `rmail-show-message-hook' instead.
901
902 ** Shell mode
903
904 *** M-x shell prompts for the shell path name if the default directory
905 is a remote file name and neither the environment variable $ESHELL nor
906 the variable `explicit-shell-file-name' is set.
907
908 *** TAB is now bound to the standard `completion-at-point' command,
909 which now implements the pcomplete rules for shell command completion.
910
911 ** SMTPmail
912
913 *** SMTPmail now uses encrypted connections (via STARTTLS) by default
914 if the mail server supports them. This uses either built-in GnuTLS
915 support, or the starttls.el library. Customize `smtpmail-stream-type'
916 to change this.
917
918 *** The variable `smtpmail-auth-credentials' has been removed.
919 By default, the information is now stored in the file ~/.authinfo.
920 This was the default value of smtpmail-auth-credentials. If you had
921 customized smtpmail-auth-credentials to a list of user names and
922 passwords, those settings are not used. During your first connection
923 to the smtp server, Emacs will prompt for the user name and password,
924 and offer to save them to ~/.authinfo. Or you can manually copy the
925 credentials to ~/.authinfo. For example, if you had
926
927 (setq smtpmail-auth-credentials
928 '(("mail.example.org" 25 "jim" "s!cret")))
929
930 then the equivalent line in ~/.authinfo would be
931
932 machine mail.example.org port 25 login jim password s!cret
933
934 See the auth-source manual for more information, e.g. on encrypting
935 the credentials file.
936
937 *** The variable `smtpmail-starttls-credentials' has been removed.
938 If you had that set, you need to put
939
940 machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"
941
942 in your ~/.authinfo file instead.
943
944 ** SQL mode
945
946 *** New options `sql-port', `sql-connection-alist', `sql-send-terminator',
947 and `sql-oracle-scan-on'.
948
949 *** New options controlling prompting for login parameters.
950 Each supported product has a custom variable `sql-*-login-params',
951 which is a list of the parameters to be prompted for before a
952 connection is established.
953
954 *** The command `sql-product-interactive' now takes a prefix argument,
955 which causes it to prompt for an SQL product.
956
957 *** Product-specific SQL interactive commands now take prefix arguments.
958 These commands (`sql-sqlite', `sql-postgres', `sql-mysql', etc.),
959 given a prefix argument, prompt for a name for the SQL interactive
960 buffer. This reduces the need for calling `sql-rename-buffer'.
961
962 *** SQL interactive modes suppress command continuation prompts, and
963 replace tabs with spaces. The first change impacts multiple line SQL
964 statements entered with C-j between each line, statements yanked into
965 the buffer and statements sent with `sql-send-*' functions. The
966 second prevents the MySQL and Postgres interpreters from listing
967 object name completions when sent text via `sql-send-*' functions.
968
969 *** New command `sql-connect' starts a predefined SQLi session,
970 using the login parameters from `sql-connection-alist'.
971
972 *** New "Save Connection" menu item in SQLi buffers.
973 This gathers the login params specified for the SQLi session, if it
974 was not started by a connection, and saves them as a new connection.
975
976 *** New commands for listing database objects and details:
977 sql-list-all and sql-list-table.
978
979 *** An API for manipulating SQL product definitions has been added.
980
981 ** TeX modes
982
983 *** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
984
985 ** Tramp
986
987 *** New inline access method "ksu" (kerberized su).
988
989 *** The following access methods are discontinued: "ssh1_old",
990 "ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish".
991
992 *** The user option `remote-file-name-inhibit-cache' controls whether
993 remote file attributes are cached for better performance.
994
995 *** The option `ange-ftp-binary-file-name-regexp' has changed its
996 default value to "".
997
998 *** Handlers for `file-selinux-context' and `set-file-selinux-context'
999 for remote machines which support SELinux.
1000
1001 ** New function `url-queue-retrieve', which behaves like url-retrieve,
1002 but with limits (`url-queue-parallel-processes', `url-queue-timeout') on
1003 the degree of parallelism.
1004
1005 ** VC and related modes
1006
1007 *** Support for pulling on distributed version control systems.
1008 The command C-x v + (`vc-pull') runs a "pull" operation, if it is
1009 supported (currently with Bzr, Git, and Mercurial), to update the
1010 current branch and working tree. A prefix argument means to prompt
1011 the user for specifics, e.g. a pull location.
1012
1013 *** `vc-update' is now an alias for `vc-pull'.
1014
1015 *** Support for merging on distributed version control systems.
1016 The command C-x v m (`vc-merge') now runs a "merge" operation, if it
1017 is supported (currently with Bzr, Git, and Mercurial), to merge
1018 changes from another branch into the current one. It prompts for
1019 specifics, e.g. a merge source.
1020
1021 *** New option `vc-revert-show-diff' controls whether `vc-revert'
1022 shows a diff while querying the user. It defaults to t.
1023
1024 *** Log entries in some Log View buffers can be toggled to display a
1025 longer description by typing RET (log-view-toggle-entry-display).
1026 This is currently supported for Bzr, Git, and Mercurial (to support
1027 another backend, define a `log-view-expanded-log-entry-function').
1028 In the Log View buffers made by C-x v L (`vc-print-root-log'), you can
1029 use this to display the full log entry for the revision at point.
1030
1031 *** New command `vc-ediff' allows visual comparison of two revisions
1032 of a file similar to `vc-diff', but using ediff backend.
1033
1034 *** The option `vc-initial-comment' was removed in Emacs 23.2, but
1035 this was not advertised at the time.
1036
1037 *** `vc-toggle-read-only' is an obsolete alias for `toggle-read-only'.
1038 Since Emacs 23, it has done the same thing as `toggle-read-only', but
1039 this was not advertised at the time.
1040
1041 ** Obsolete modes
1042
1043 *** abbrevlist.el
1044
1045 *** erc-hecomplete.el (use erc-pcomplete.el instead)
1046
1047 *** partial-completion-mode (complete.el) is obsolete.
1048 You can get a comparable behavior with:
1049 (setq completion-styles '(partial-completion initials))
1050 (setq completion-pcm-complete-word-inserts-delimiters t)
1051
1052 *** pc-mode.el is obsolete (CUA mode is much more comprehensive).
1053
1054 *** pgg is obsolete (use EasyPG instead).
1055
1056 *** sregex.el is obsolete, since rx.el is a strict superset.
1057
1058 *** s-region.el and pc-select.el are obsolete.
1059 They are superseded by shift-select-mode, enabled by default since 23.1.
1060
1061 *** vc-mcvs.el is obsolete (for lack of a maintainer).
1062
1063 ** Miscellaneous
1064
1065 *** The Landmark game is now invoked with `landmark', not `lm'.
1066 Its functions and variables have been similarly renamed.
1067
1068 *** In `ido-file-completion-map', C-v is no longer bound to `ido-toggle-vc'.
1069 (This interfered with cua-mode.)
1070
1071 *** f90.el has some support for Fortran 2008 syntax.
1072
1073 *** `copyright-fix-years' can optionally convert consecutive years to ranges.
1074
1075 *** New command `nato-region' converts text to NATO phonetic alphabet.
1076
1077 \f
1078 * New Modes and Packages in Emacs 24.1
1079
1080 ** Occur Edit mode applies edits made in *Occur* buffers to the
1081 original buffers. It is bound to "e" in Occur mode.
1082
1083 ** New global minor mode electric-pair-mode.
1084 When enabled, typing an open parenthesis automatically inserts the
1085 matching closing one.
1086
1087 ** New global minor mode electric-indent-mode.
1088 When enabled, typing certain characters triggers reindentation.
1089 Major modes wishing to use this can set electric-indent-chars or
1090 electric-indent-functions.
1091
1092 ** New global minor mode electric-layout-mode.
1093 When enabled, typing certain characters automatically inserts newlines.
1094 Major modes wishing to use this can set electric-layout-rules.
1095
1096 ** tabulated-list.el provides a generic major mode for tabulated data,
1097 from which other modes can be derived.
1098
1099 ** pcase.el provides the ML-style pattern matching macro `pcase'.
1100
1101 ** secrets.el is an implementation of the Secret Service API, an
1102 interface to password managers like GNOME Keyring or KDE Wallet. The
1103 Secret Service API requires D-Bus for communication. The command
1104 `secrets-show-secrets' offers a buffer with a visualization of the
1105 secrets.
1106
1107 ** notifications.el provides an implementation of the Desktop
1108 Notifications API. It requires D-Bus for communication.
1109
1110 ** soap-client.el supports access to SOAP web services from Emacs.
1111 soap-inspect.el is an interactive inspector for SOAP WSDL structures.
1112
1113 ** New generic mode, xmodmap-generic-mode, for xmodmap files.
1114
1115 ** New emacs-lock.el package.
1116 The previous version has been moved to obsolete/old-emacs-lock.el.
1117 Now, there is a proper minor mode `emacs-lock-mode'. Protection
1118 against exiting Emacs and killing the buffer can be set separately.
1119 The mechanism for automatically turning off protection for buffers
1120 with dead inferior processes has been generalized.
1121
1122 \f
1123 * Incompatible Lisp Changes in Emacs 24.1
1124
1125 ** Passing a nil argument to a minor mode function call now ENABLES
1126 the minor mode unconditionally. This is so that you can write e.g.
1127
1128 (add-hook 'text-mode-hook 'foo-mode)
1129
1130 to enable foo-mode in Text mode buffers, removing the need for
1131 `turn-on-foo-mode' style functions. This affects all mode commands
1132 defined by `define-minor-mode'. If called interactively, the mode
1133 command still toggles the minor mode.
1134
1135 ** The return value of `backup-buffer' has changed.
1136 It is now a list of three elements, where the second element is a list
1137 describing the original file's SELinux context. If Emacs or the
1138 system lacks SELinux support, the context list is (nil nil nil nil).
1139 See "Basic SELinux support" above, under "Changes in Emacs 24.1".
1140
1141 ** `char-direction-table' and the `char-direction' function were deleted.
1142 They were buggy and inferior to the new support of bidirectional
1143 editing introduced in Emacs 24. If you need the bidirectional
1144 properties of a character, use `get-char-code-property' with the last
1145 argument `bidi-class'.
1146
1147 ** `copy-directory' now copies the source directory as a subdirectory
1148 of the target directory, if the latter is an existing directory. The
1149 new optional arg COPY-CONTENTS, if non-nil, makes the function copy
1150 the contents directly into a pre-existing target directory.
1151
1152 ** For mouse click input events in the text area, the Y pixel
1153 coordinate in the POSITION list now counts from the top of the text
1154 area, excluding any header line. Previously, it counted from the top
1155 of the header line.
1156
1157 ** Support for "old-style" backquotes, obsolete for 10+ years, has
1158 been further reduced. Now a backquote not followed by a space is
1159 always treated as a "new-style" backquote. Please remove all
1160 "old-style" backquotes from your code. If your code uses backquotes
1161 as documented in the Elisp manual, and compiles without warning, then
1162 you have nothing to do in this regard. Code not following the
1163 appropriate conventions may fail to compile.
1164
1165 The most common cause of trouble seems to be an old-style backquote
1166 followed by a newline. Another cause of trouble is vector notation
1167 for key sequence notation: instead of [(control ,)] and [(control ')],
1168 you should write [(control ?,)] and [(control ?')], which will work in
1169 older Emacsen too.
1170
1171 ** The macro `eval-at-startup' was removed in Emacs 23.2, but this
1172 was not advertised at the time. The function `custom-initialize-delay'
1173 replaced all known uses.
1174
1175 ** `view-buffer' now treats special mode-class in the same way that
1176 `view-file' has since Emacs 22 (i.e. it won't enable View mode if the
1177 major mode is special).
1178
1179 ** Menu and tool bar changes
1180
1181 *** During startup, Emacs no longer adds entries for `menu-bar-lines'
1182 and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'.
1183 With these alist entries omitted, `make-frame' checks the value of the
1184 variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create
1185 a menu-bar or tool-bar, respectively. If the alist entries are added,
1186 they override the value of `menu-bar-mode'/`tool-bar-mode'.
1187
1188 *** The menu bar bindings's caches are not used any more.
1189 Use (where-is-internal <def> nil t) instead.
1190
1191 ** Regions created by mouse dragging are now normal active regions,
1192 similar to those created by shift-selection (see Selection changes
1193 above). In previous Emacs versions, these regions were delineated by
1194 `mouse-drag-overlay'; that variable has been removed.
1195
1196 ** The fourth argument of `filter-buffer-substring' has been removed.
1197 If you want to remove text properties from the final result, simply
1198 pass the result through substring-no-properties.
1199
1200 ** cl.el no longer provides `cl-19'.
1201
1202 ** The following obsolete functions and aliases have been removed
1203 (the appropriate new function is given in parentheses; "not needed"
1204 means you can just remove all calls to the function in question):
1205
1206 *** `comint-kill-output' (`comint-delete-output')
1207 *** `decompose-composite-char' (`char-to-string')
1208 *** `outline-visible' (`outline-invisible-p')
1209 *** `internal-find-face' (`facep')
1210 *** `internal-get-face' (`facep and check-face')
1211 *** `frame-update-faces' (not needed)
1212 *** `frame-update-face-colors' (`frame-set-background-mode')
1213 *** `x-frob-font-weight' and `x-frob-font-slant' (`make-face-*' functions)
1214 *** `x-make-font-bold and x-make-font-demibold (`make-face-bold')
1215 *** `x-make-font-italic' and `x-make-font-oblique' (`make-face-italic')
1216 *** `x-make-font-bold-italic' (`make-face-bold-italic')
1217 *** `x-make-font-unbold' (`make-face-unbold')
1218 *** `x-make-font-unitalic' (`make-face-unitalic')
1219 *** `mldrag-drag-mode-line' (`mouse-drag-mode-line')
1220 *** `mldrag-drag-vertical-line' (`mouse-drag-vertical-line')
1221 *** `iswitchb-default-keybindings' (`iswitchb-mode')
1222 *** `char-bytes' (== 1)
1223 *** `isearch-return-char' (`isearch-printing-char')
1224 *** `make-local-hook' (not needed)
1225 *** `set-screen-height' (`set-frame-height')
1226 *** `set-screen-width' (`set-frame-width')
1227
1228 ** The following obsolete variables and varaliases have been removed
1229 (the appropriate new variable is given in parentheses):
1230
1231 *** `checkdoc-minor-keymap' (`checkdoc-minor-mode-map')
1232 *** `vc-header-alist' (`vc-BACKEND-header')
1233 *** `directory-sep-char' (== ?/)
1234 *** `font-lock-defaults-alist' (`font-lock-defaults')
1235 *** `e' (`float-e').
1236
1237 ** The following obsolete files were removed:
1238 sc.el, x-menu.el, rnews.el, rnewspost.el
1239
1240 ** The format of the finder-inf.el file has changed, since the Finder
1241 mechanism is now based on the package system. The variable
1242 `finder-package-info' is replaced by `package--builtins' and
1243 `finder-keywords-hash'.
1244
1245 ** When generating autoloads, `update-directory-autoloads' no longer
1246 assumes every inspected file is in your `load-path'. It instead
1247 generates relative names according to the current `load-path'.
1248
1249 \f
1250 * Lisp changes in Emacs 24.1
1251
1252 ** Code can now use lexical scoping by default instead of dynamic scoping.
1253 The `lexical-binding' variable enables lexical scoping for local
1254 variables. It is typically set via a file-local variable in the first
1255 line of the file, in which case it applies to all the code in that
1256 file.
1257
1258 *** `eval' takes a new optional argument `lexical' to choose the new lexical
1259 binding instead of the old dynamic binding mode.
1260
1261 *** Lexically scoped interpreted functions are represented with a new form
1262 of function value which looks like (closure ENV ARGS &rest BODY).
1263
1264 *** New macro `letrec' to define recursive local functions.
1265
1266 *** `defvar' and `defconst' now mark the variable as special (dynamic).
1267 So do `defcustom' and other forms that call `defvar' as a subroutine.
1268
1269 *** New function `special-variable-p' to check whether a variable is
1270 declared as dynamically bound.
1271
1272 *** The form ((lambda ...) ...) is deprecated.
1273
1274 ** An Emacs Lisp testing tool is now included.
1275 Emacs Lisp developers can use this tool to write automated tests for
1276 their code. See the ERT info manual for details.
1277
1278 ** Changes for bidirectional display and editing
1279
1280 *** New function `current-bidi-paragraph-direction'.
1281 This returns the base direction of the paragraph at point.
1282
1283 *** New function `bidi-string-mark-left-to-right'.
1284 Given a string containing characters from right-to-left scripts, this
1285 function returns another string which can be safely inserted into a
1286 buffer, such that any following text will be always displayed to the
1287 right of that string. (This works by appending an invisible Unicode
1288 "LEFT-TO-RIGHT MARK" character if the argument string might need it.)
1289
1290 This is useful when the buffer has overall left-to-right paragraph
1291 direction and you need to insert a string whose contents are not known
1292 in advance, without disrupting the layout of the line.
1293
1294 ** Window changes
1295
1296 *** Window tree functions are accessible in Elisp.
1297 Functions are provided to return the parent, siblings or child windows
1298 of any window including internal windows (windows not associated with a
1299 buffer) in the window tree.
1300
1301 **** New function `window-valid-p' gives non-nil for live and internal
1302 windows.
1303
1304 **** Window manipulation can deal with internal windows.
1305 Many window handling functions like `split-window', `delete-window', or
1306 `delete-other-windows' as well as the window resizing functions can now
1307 act on any window including internal ones.
1308
1309 *** window-total-height/-width vs window-body-height/-width.
1310 The function `window-height' has been renamed to `window-total-height'
1311 and `window-width' has been renamed to `window-body-width'. The old
1312 names are provided as aliases. Two new functions `window-total-width'
1313 and `window-body-height' are provided.
1314
1315 *** Window parameters specific to window handling functions.
1316 For each window you can specify a parameter to override the default
1317 behavior of a number of functions like `split-window', `delete-window'
1318 and `delete-other-windows'. The variable `ignore-window-parameters'
1319 allows to ignore processing such parameters.
1320
1321 *** New semantics of third argument of `split-window'.
1322 The third argument of `split-window' has been renamed to SIDE and can be
1323 set to any of the values 'below, 'right, 'above, or 'left to make the
1324 new window appear on the corresponding side of the window that shall be
1325 split. Any other value of SIDE will cause `split-window' to split the
1326 window into two side-by-side windows as before.
1327
1328 *** Window resizing functions.
1329 A new standard function for resizing windows called `window-resize' has
1330 been introduced. This and all other functions for resizing windows no
1331 longer delete any windows when they become too small.
1332
1333 *** Deleting the selected window now selects the most recently selected
1334 live window on that frame instead.
1335
1336 *** `adjust-window-trailing-edge' adjustments.
1337 `adjust-window-trailing-edge' can now deal with fixed-size windows and
1338 is able to resize other windows if a window adjacent to the trailing
1339 edge cannot be shrunk any more. This makes its behavior more similar to
1340 that of Emacs 21 without compromising, however, its inability to delete
1341 windows which was introduced in Emacs 22.
1342
1343 *** Window-local buffer lists.
1344 Windows now have local buffer lists. This means that removing a buffer
1345 from display in a window will preferably show the buffer previously
1346 shown in that window with its previous window-start and window-point
1347 positions. This also means that the same buffer may be automatically
1348 shown twice even if it already appears in another window.
1349
1350 *** `switch-to-buffer' has a new optional argument FORCE-SAME-WINDOW,
1351 which if non-nil requires the buffer to be displayed in the currently
1352 selected window, signaling an error otherwise. If nil, another window
1353 can be used, e.g. if the selected one is strongly dedicated.
1354
1355 *** `split-window-vertically' and `split-window-horizontally' renamed
1356 to `split-window-below' and `split-window-right' respectively.
1357 The old names are kept as aliases.
1358
1359 *** Display actions
1360
1361 **** The second arg to `display-buffer' and `pop-to-buffer' is now
1362 named ACTION, and takes a display action of the same form as
1363 `display-buffer-base-action' (see Changes, above). A non-nil,
1364 non-list value is treated specially, as the old meaning.
1365
1366 **** New variable `display-buffer-overriding-action'.
1367
1368 **** The procedure of `display-buffer' etc. to choose a window is
1369 determined by combining `display-buffer-overriding-action',
1370 `display-buffer-alist', the ACTION arg, `display-buffer-base-action',
1371 and `display-buffer-fallback-action'. The second and fourth of these
1372 are user-customizable variables.
1373
1374 See the docstring of `display-buffer' for details.
1375
1376 *** New functions `window-state-get' and `window-state-put'.
1377 These functions allow to save and restore the state of an arbitrary
1378 frame or window as an Elisp object.
1379
1380 ** Completion
1381
1382 *** New variable `completion-extra-properties' used to specify extra
1383 properties of the current completion:
1384 - :annotate-function, same as the old completion-annotate-function.
1385 - :exit-function, function to call after completion took place.
1386
1387 *** Functions on `completion-at-point-functions' can return any of the
1388 properties valid for `completion-extra-properties'.
1389
1390 *** `completion-annotate-function' is obsolete.
1391
1392 *** New `metadata' method for completion tables. The metadata thus returned
1393 can specify various details of the data returned by `all-completions':
1394 - `category' is the kind of objects returned (e.g., `buffer', `file', ...),
1395 used to select a style in completion-category-overrides.
1396 - `annotation-function' to add annotations in *Completions*.
1397 - `display-sort-function' to specify how to sort entries in *Completions*.
1398 - `cycle-sort-function' to specify how to sort entries when cycling.
1399
1400 *** `minibuffer-local-filename-must-match-map' is not used any more.
1401 Instead, the bindings in `minibuffer-local-filename-completion-map'
1402 are combined with `minibuffer-local-must-match-map'.
1403
1404 *** New variable `completing-read-function' allows overriding the
1405 behavior of `completing-read'.
1406
1407 ** `glyphless-char-display' can now distinguish between graphical and
1408 text terminal display, via a char-table entry that is a cons cell.
1409
1410 ** `pre-command-hook'/`post-command-hook' are not reset to nil on error.
1411 Instead, the offending function is removed.
1412
1413 ** New hook types
1414
1415 *** New function `run-hook-wrapped' for running an abnormal hook by
1416 passing the hook functions as arguments to a "wrapping" function.
1417 Like `run-hook-with-args-until-success', it stops at the first
1418 non-nil return value.
1419
1420 *** New macro `with-wrapper-hook' for running an abnormal hook as a
1421 set of "wrapping" filters, similar to around advice.
1422 (A version of this macro was actually added in Emacs 23.2 but was not
1423 advertised at the time.)
1424
1425 ** Debugger changes
1426
1427 *** New macro `condition-case-unless-debug' (this was actually added in
1428 Emacs 23.1 as condition-case-no-debug, but not advertised)
1429
1430 *** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised.
1431
1432 *** Variable `stack-trace-on-error' removed.
1433
1434 *** The debugger can now "continue" from an error, which means it will
1435 jump to the error handler as if the debugger had not been invoked
1436 instead of jumping all the way to the top-level.
1437
1438 *** Set `debug-on-event' to enter the debugger on events like SIGUSR1.
1439 This can be useful when `inhibit-quit' is set.
1440
1441 ** The new function `server-eval-at' allows evaluation of Lisp forms on
1442 named Emacs server instances.
1443
1444 ** `call-process' and `call-process-region' allow a `(:file "file")' spec
1445 to redirect STDOUT to a file.
1446
1447 ** The function `format-time-string' now supports the %N directive,
1448 for higher-resolution time stamps.
1449
1450 ** New input reading functions
1451
1452 *** New function `read-char-choice' reads a restricted set of
1453 characters, discarding any inputs not inside the set.
1454
1455 *** The command `read-color' now requires a match for a color name
1456 or RGB triplet, instead of signaling an error if the user provides
1457 invalid input.
1458
1459 **** `facemenu-read-color' is now an alias for `read-color'.
1460
1461 ** `image-library-alist' is renamed to `dynamic-library-alist'.
1462 The variable is now used to load all kind of supported dynamic libraries,
1463 not just image libraries. The previous name is still available as an
1464 obsolete alias.
1465
1466 ** Syntax parsing changes
1467
1468 *** New variable `syntax-propertize-function'.
1469 This replaces `font-lock-syntactic-keywords' which is now obsolete.
1470 This allows syntax-table properties to be set independently from font-lock:
1471 just call syntax-propertize to make sure the text is propertized.
1472 Together with this new variable come a new hook
1473 syntax-propertize-extend-region-functions, as well as two helper functions:
1474 syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
1475 as-is; and syntax-propertize-rules which provides a new way to specify
1476 syntactic rules.
1477
1478 *** Syntax tables support a new "comment style c" additionally to style b.
1479
1480 ** New hook `post-self-insert-hook', run after `self-insert-command'.
1481
1482 ** frame-local variables cannot be let-bound any more.
1483
1484 ** Major and minor mode changes
1485
1486 *** `set-auto-mode' now respects mode: local variables at the end of files,
1487 as well as those in the -*- line.
1488
1489 *** `prog-mode' is a new major mode from which programming modes
1490 should be derived.
1491
1492 **** `prog-mode-hook' can be used to enable features for programming
1493 modes, e.g. (add-hook 'prog-mode-hook 'flyspell-prog-mode) to enable
1494 on-the-fly spell checking for comments and strings.
1495
1496 *** New hook `change-major-mode-after-body-hook', run by
1497 `run-mode-hooks' just before any other mode hooks.
1498
1499 *** Enabled globalized minor modes can be disabled in specific major modes.
1500 If the global mode is global-FOO-mode, then run (FOO-mode -1) in the
1501 major mode's hook, where FOO-mode toggles the mode on a per-buffer basis.
1502
1503 *** `define-minor-mode' accepts new keywords :variable, :after-hook.
1504
1505 ** File-handling changes
1506
1507 *** `delete-file' and `delete-directory' now accept optional arg TRASH.
1508 Trashing is performed if TRASH and `delete-by-moving-to-trash' are
1509 both non-nil. Interactively, TRASH defaults to t, unless a prefix
1510 argument is supplied (see Trash changes, above).
1511
1512 *** New file predicates: `file-equal-p', `file-in-directory-p'.
1513
1514 ** Tool-bars can display separators.
1515 Tool-bar separators are handled like menu separators in menu-bar maps,
1516 i.e. via menu entries of the form `(menu-item "--")'.
1517
1518 ** Image API
1519
1520 *** Animated images support (currently animated gifs only).
1521
1522 **** `image-animated-p' returns non-nil if an image can be animated.
1523
1524 **** `image-animate' animates a supplied image spec.
1525
1526 **** `image-animate-timer' returns the timer object for an image that
1527 is being animated.
1528
1529 *** `image-extension-data' has been renamed to `image-metadata'.
1530 The old name is an obsolete alias to the new one.
1531
1532 *** Image mode can view any image type that ImageMagick supports.
1533 This requires Emacs to be built with ImageMagick support.
1534
1535 **** New function `imagemagick-types', defined if ImageMagick support
1536 is enabled, returns a list of image file extensions that your
1537 ImageMagick installation supports.
1538
1539 **** New function `imagemagick-register-types' enables ImageMagick
1540 image types in Image mode and in `create-image' and other helper
1541 functions.
1542
1543 **** New option `imagemagick-types-inhibit' excludes certain
1544 ImageMagick image types from `imagemagick-register-types'.
1545
1546 **** With ImageMagick support, there are extra Image mode commands to
1547 resize and rotate images: `image-transform-fit-to-height',
1548 `image-transform-fit-to-width', `image-transform-set-rotation', and
1549 `image-transform-set-scale'.
1550
1551 ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
1552 passes it to the mail user agent function. This argument specifies an
1553 action for returning to the caller after finishing with the mail. For
1554 example, this is used by Rmail to optionally delete a mail window.
1555
1556 ** XML and HTML parsing
1557 If Emacs is compiled with libxml2 support, there are two new
1558 functions: `libxml-parse-html-region' (which parses "real world" HTML)
1559 and `libxml-parse-xml-region' (which parses XML). Both return an
1560 Emacs Lisp parse tree.
1561
1562 ** Networking and encryption changes
1563
1564 *** `open-network-stream' can now be used to open an encrypted stream.
1565 It now accepts an optional `:type' parameter for initiating a TLS
1566 connection, directly or via STARTTLS. To do STARTTLS, additional
1567 parameters (`:end-of-command', `:success', `:capabilities-command')
1568 must also be supplied.
1569
1570 *** New library gnutls.el.
1571 The new function `gnutls-available-p' returns non-nil if Emacs is
1572 built with GnuTLS support. The main entry points are
1573 `open-gnutls-stream' and `gnutls-negotiate'. It's easiest to use
1574 these functions through `open-network-stream', because that can
1575 upgrade connections through STARTTLS opportunistically or use plain
1576 SSL, depending on your needs. For debugging, set `gnutls-log-level'
1577 greater than 0.
1578
1579 *** New primitive `secure-hash' that supports many secure hash algorithms:
1580 md5, sha1, sha2, sha224, sha256, sha384, and sha512. The lisp library
1581 sha1.el has been removed. The `sha1' feature is provided by default.
1582
1583 ** Isearch
1584
1585 *** New hook `isearch-update-post-hook' that runs in `isearch-update'.
1586
1587 ** Progress reporters can now "spin".
1588 The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
1589 now be nil, or omitted. This makes a "non-numeric" reporter. Each
1590 time you call `progress-reporter-update' on that progress reporter,
1591 with a nil or omitted VALUE argument, the reporter message is
1592 displayed with a "spinning bar".
1593
1594 ** New variable `revert-buffer-in-progress-p' is true while a buffer is
1595 being reverted, even if the buffer has a local `revert-buffer-function'.
1596
1597 ** New variables `delayed-warnings-list' and `delayed-warnings-hook'.
1598 If delayed-warnings-list is non-nil, the command loop calls
1599 `delayed-warnings-hook' after `post-command-hook'. At present, this
1600 is only used by Emacs on some platforms to display warnings during
1601 startup, which might otherwise not be noticed. This uses the
1602 functions `display-delayed-warnings' and `collapse-delayed-warnings'.
1603
1604 ** rx.el has a new `group-n' construct for explicitly numbered groups.
1605
1606 ** New function `make-composed-keymap' that constructs a new keymap
1607 from multiple input maps. You can use this to make a keymap that
1608 inherits from multiple maps, eg:
1609 (set-keymap-parent newmap (make-composed-keymap othermap parent))
1610
1611 ** New function `string-prefix-p'.
1612 (This was actually added in Emacs 23.2 but was not advertised at the time.)
1613
1614 ** New reader macro ## that stands for the empty symbol.
1615 This means that the empty symbol can now be read back. Also, #: by itself
1616 (when not immediately followed by a possible symbol character) stands for
1617 an empty uninterned symbol.
1618
1619 ** New math functions `isnan', `copysign', `frexp', `ldexp'.
1620
1621 ** The following functions and variables are obsolete:
1622
1623 *** `tooltip-use-echo-area' is obsolete.
1624 Rather than setting this to t, disable Tooltip mode instead.
1625
1626 *** buffer-substring-filters is obsolete.
1627 Use `filter-buffer-substring-functions' instead.
1628
1629 *** `byte-compile-disable-print-circle' is obsolete.
1630
1631 *** `deferred-action-list' and `deferred-action-function' are obsolete.
1632 Use `post-command-hook' instead.
1633
1634 *** `font-lock-maximum-size' is obsolete.
1635
1636 \f
1637 * Changes in Emacs 24.1 on non-free operating systems
1638
1639 ** On MS Windows, Emacs warns when using the obsolete init file _emacs,
1640 and also when HOME is set to C:\ by default.
1641
1642 ** New configure.bat options
1643
1644 *** --enable-checking builds Emacs with extra runtime checks.
1645
1646 *** --distfiles specifies files to be included in binary distribution.
1647
1648 *** --without-gnutls disables automatic GnuTLS detection.
1649
1650 *** --lib for general library linkage, works with the USER_LIBS build variable.
1651
1652 ** New make target `dist' to create binary distribution for MS Windows.
1653
1654 ** The Lisp function `w32-default-color-map' is now obsolete.
1655 (It is only used internally in the Emacs C code.)
1656
1657 ** Customize ns-auto-hide-menu-bar to have the menu-bar hidden, but
1658 reappear on mouse-over. (Requires OS X 10.6 or later.)
1659
1660 ** On Mac OS X, dragging a file into Emacs visits the file, like on
1661 other platforms, rather than inserting its contents into the buffer.
1662
1663 \f
1664 ----------------------------------------------------------------------
1665 This file is part of GNU Emacs.
1666
1667 GNU Emacs is free software: you can redistribute it and/or modify
1668 it under the terms of the GNU General Public License as published by
1669 the Free Software Foundation, either version 3 of the License, or
1670 (at your option) any later version.
1671
1672 GNU Emacs is distributed in the hope that it will be useful,
1673 but WITHOUT ANY WARRANTY; without even the implied warranty of
1674 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1675 GNU General Public License for more details.
1676
1677 You should have received a copy of the GNU General Public License
1678 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
1679
1680 \f
1681 Local variables:
1682 mode: outline
1683 paragraph-separate: "[ \f]*$"
1684 end: