#
# make docs
# Make Emacs documentation files from their sources; requires makeinfo.
+ #
+ # make check or make check-expensive
+ # Run Emacs test suite. check-expensive runs also tests which
+ # take more time to perform.
SHELL = @SHELL@
TAGS tags: lib lib-src src
$(MAKE) -C src tags
-check check-expensive: all
- @if test ! -d test/automated; then \
+.PHONY: have-tests
+have-tests:
+ @if test ! -d test; then \
echo "You do not seem to have the test/ directory."; \
echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
- else \
- $(MAKE) -C test/automated $@; \
+ exit 1; \
fi
+check check-maybe check-expensive: have-tests all
+ $(MAKE) -C test $@
+
dist:
cd ${srcdir}; ./make-dist
$(MAKE) -C doc/$(subst -, ,$@)
.PHONY: $(DOCS) docs pdf ps
-.PHONY: info dvi dist check check-expensive html info-real info-dir check-info
+.PHONY: info dvi dist check check-maybe check-expensive html info-real info-dir check-info
## TODO add etc/refcards.
docs: $(DOCS)
$(MAKE) all
.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
-.PHONY: emacs-25-branch-is-current unchanged-history-files
+.PHONY: preferred-branch-is-current unchanged-history-files
CHANGELOG = ChangeLog
emacslog = build-aux/gitlog-to-emacslog
./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
# Check that we are in a good state for changing history.
-emacs-25-branch-is-current:
- git branch | grep -q '^\* emacs-25$$'
+PREFERRED_BRANCH = master
+preferred-branch-is-current:
+ git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
unchanged-history-files:
x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
test -z "$$x"
# Copy newer commit messages to the start of the ChangeLog history file,
# and consider them to be older.
-change-history-nocommit: emacs-25-branch-is-current unchanged-history-files
+change-history-nocommit: preferred-branch-is-current unchanged-history-files
-rm -f ChangeLog.tmp
$(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
sed '/^This file records repository revisions/,$$d' \
wish. @code{:max-width} and @code{:max-height} will always preserve
the aspect ratio.
+@item :scale @var{scale}
+This should be a number, where values higher than 1 means to increase
+the size, and lower means to decrease the size. For instance, a value
+of 0.25 will make the image a quarter size of what it originally was.
+If the scaling makes the image larger than specified by
+@code{:max-width} or @code{:max-height}, the resulting size will not
+exceed those two values.
+
@item :format @var{type}
The value, @var{type}, should be a symbol specifying the type of the
image data, as found in @code{image-format-suffixes}. This is used
hint to ImageMagick to help it detect the image type.
@item :rotation @var{angle}
- Specifies a rotation angle in degrees. If no rotation is explicitly
- specified, and the @acronym{EXIF} headers specify a rotation, the
- rotation from the @acronym{EXIF} headers are used instead.
+ Specifies a rotation angle in degrees.
@item :index @var{frame}
@c Doesn't work: http://debbugs.gnu.org/7978
@end example
@end defun
+@vindex image-scaling-factor
+Images are automatically scaled when created based on the
+@code{image-scaling-factor} variable. The value is either a floating
+point number (where numbers higher than 1 means to increase the size
+and lower means to shrink the size), or the symbol @code{auto}, which
+will compute a scaling factor based on the font pixel size.
+
@node Showing Images
@subsection Showing Images
@cindex show image
@code{max-image-size} is subsequently changed (@pxref{Image Cache}).
@end defvar
+Images inserted with the insertion functions above also get a local
+keymap installed in the text properties (or overlays) that span the
+displayed image. This keymap defines the following commands:
+
+@table @kbd
+@item +
+Increase the image size (@code{image-increase-size}). A prefix value
+of @samp{4} means to increase the size by 40%. The default is 20%.
+
+@item -
+Decrease the image size (@code{image-increase-size}). A prefix value
+of @samp{4} means to decrease the size by 40%. The default is 20%.
+
+@item r
+Rotate the image by 90 degrees (@code{image-rotate}).
+
+@item o
+Save the image to a file (@code{image-save}).
+@end table
+
@node Multi-Frame Images
@subsection Multi-Frame Images
@cindex multi-frame images
When you add a new item, use the appropriate mark if you are sure it applies,
otherwise leave it unmarked.
+\f
+* Installation Changes in Emacs 25.2
+
+\f
+* Startup Changes in Emacs 25.2
+
+\f
+* Changes in Emacs 25.2
+
+** It is possible to disable attempted recovery on fatal signals
+
+Two new variables allow to disable attempts to recover from stack
+overflow and to avoid automatic auto-save when Emacs is delivered a
+fatal signal. `attempt-stack-overflow-recovery', if set to `nil',
+will disable attempts to recover from C stack overflows; Emacs will
+then crash as with any other fatal signal.
+`attempt-orderly-shutdown-on-fatal-signal', if set to `nil', will
+disable attempts to auto-save the session and shut down in an orderly
+fashion when Emacs receives a fatal signal; instead, Emacs will
+terminate immediately. Both variables are non-`nil' by default.
+These variables are for users who would like to avoid the small
+probability of data corruption due to techniques Emacs uses to recover
+in these situations.
+
+\f
+* Editing Changes in Emacs 25.2
+
+\f
+* Changes in Specialized Modes and Packages in Emacs 25.2
+
+** eww
+
++++
+*** A new `s' command for switching to another eww buffer via the minibuffer.
+
++++
+** The commands that add ChangeLog entries now prefer a VCS root directory
+for the ChangeLog file, if none already exists. Customize
+`change-log-directory-files' to nil for the old behavior.
+
+---
+** Support for non-string values of `time-stamp-format' has been removed.
+
+** Tramp
+
++++
+*** New connection method "sg", which allows to edit files under
+different group ID.
+
++++
+*** New connection method "doas" for OpenBSD hosts.
+
+\f
+* New Modes and Packages in Emacs 25.2
+
+\f
+* Incompatible Lisp Changes in Emacs 25.2
+
+\f
+* Lisp Changes in Emacs 25.2
+
+** New var syntax-ppss-table to control the syntax-table used in syntax-ppss
+
+** Autoload files can be generated without timestamps,
+by setting `autoload-timestamps' to nil.
+
+\f
+* Changes in Emacs 25.2 on Non-Free Operating Systems
+
\f
* Installation Changes in Emacs 25.1
by default, and must be enabled by using the `--with-modules' option
at configure time.
++++
+** A second dir-local file (.dir-locals-2.el) is now accepted.
+See the variable `dir-locals-file-2' for more information.
+
+++
** Network security (TLS/SSL certificate validity and the like) is
added via the new Network Security Manager (NSM) and controlled via
the `network-security-level' variable.
+---
+** International domain names (IDNA) are now encoded via the new
+puny.el library, so that one can visit web sites like
+"http://méxico.icom.museum".
+
+++
** C-h l now also lists the commands that were run.
+** The new M-s M-w key binding uses eww to search the web for the
+text in the region.
+
+++
-** x-select-enable-clipboard is renamed select-enable-clipboard
-and x-select-enable-primary is renamed select-enable-primary.
+** The new `timer-list' command lists all active timers in a buffer
+where you can cancel them with the `c' command.
+
+** M-x suggests shorthands and ignores obsolete commands for completion.
+** x-select-enable-clipboard is renamed select-enable-clipboard.
+x-select-enable-primary and renamed select-enable-primary.
Additionally they both now apply to all systems (OSX, GNUstep, Windows, you
name it), with the proviso that on some systems (e.g. Windows)
select-enable-primary is ineffective since the system doesn't
** The option `even-window-heights' has been renamed to
`even-window-sizes' and now handles window widths as well.
++++
+** New function `read-multiple-choice' use to prompt for
+multiple-choice questions, with a handy way to display help texts.
+
+++
** terpri gets an optional arg ENSURE to conditionally output a newline.
hiding character but the default `.' can be used by let-binding the
variable `read-hide-char'.
-+++
-** The Emacs pseudo-random number generator can be securely seeded.
-On system where Emacs can access the system entropy or some other
-cryptographically secure random stream, it now uses that when `random'
-is called with its argument `t'. This allows cryptographically strong
-random values; in particular, the Emacs server now uses this facility
-to produce its authentication key.
-
---
** New input methods: `tamil-dvorak' and `programmer-dvorak'.
`erc-network-hide-list' and `erc-channel-hide-list' will only hide the
specified message types for the respective specified targets.
+*** New variable `erc-default-port-tls' used to connect to TLS IRC
+servers.
+
---
*** Reconnection is now asynchronous.
text in the region. The search engine to use for this is specified by
the customizable variable `eww-search-prefix'.
- +++
- *** Images that have rotation specified in the EXIF headers are now
- automatically rotated (if displayed as ImageMagick images).
-
+++
*** Query-replace history is enhanced.
When query-replace reads the FROM string from the minibuffer, typing
whether to use variable-pitch fonts or not. The user can also
customize the `shr-use-fonts' variable.
++++
+*** A new command `C' (`eww-toggle-colors') can be used to toggle
+whether to use the HTML-specified colors or not. The user can also
+customize the `shr-use-colors' variable.
+
+++
*** A new command `R' (`eww-readable') will try do identify the main
textual parts of a web page and display only that, leaving menus and
*** text/html messages that contain inline image parts will be
transformed into multipart/related messages before sending.
+---
+*** The `message-valid-fqdn-regexp' variable has been removed, since
+there are now top-level domains added all the time. Message will no
+longer warn about sending emails to top-level domains it hasn't heard
+about.
+
+*** `message-beginning-of-line' (bound to C-a) understands folded headers.
+In `visual-line-mode' it will look for the true beginning of a header
+while in non-`visual-line-mode' it will move the point to the indented
+header’s value.
+
+++
** In Show Paren Mode, a parenthesis can be highlighted when point
stands inside it, and certain parens can be highlighted when point is
** If gpg2 exists on the system, it is now used as the default value
of `epg-gpg-program' (instead of gpg).
+** Images
+
++++
+*** Images are automatically scaled before displaying based on the
+`image-scaling-factor' variable (if Emacs supports scaling the images
+in question).
+
+*** Images inserted with `insert-image' and related functions get a
+keymap put into the text properties (or overlays) that span the
+image. This keymap binds keystrokes for manipulating size and
+rotation, as well as saving the image to a file.
+
** Lisp mode
---
---
** New js.el option `js-indent-first-init'.
+It was renamed from `js-indent-first-initialiser', to avoid issues
+with American vs British spelling.
** Info
`dired-compress-files-alist' variable.
+++
+*** `W' is now bound to `browse-url-of-dired-file', and is useful for
+viewing HTML files and the like.
+
*** New user interface for the `A' and `Q' commands.
These keys, now bound to `dired-do-find-regexp' and
`dired-do-find-regexp-and-replace', work similarly to `xref-find-apropos'
Removed font-lock-beginning-of-syntax-function and the SYNTAX-BEGIN
slot in font-lock-defaults.
-+++
-** The new implementation of Subword mode affects word movement everywhere.
-When Subword mode is turned on, `forward-word', `backward-word', and
-everything that uses them will move by sub-words, effectively
-overriding the buffer's syntax table. Lisp programs that shouldn't be
-affected by Subword mode should call the new functions
-`forward-word-strictly' and `backward-word-strictly' instead.
-
+++
** `package-initialize' now sets `package-enable-at-startup' to nil if
called during startup. Users who call this function in their init
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
- (while (forward-word-strictly 1)
+ (while (forward-word 1)
(setq words (1+ words)))))
words))
((use-region-p)
(defun backward-word (&optional arg)
"Move backward until encountering the beginning of a word.
With argument ARG, do this that many times.
- If ARG is omitted or nil, move point backward one word."
+ If ARG is omitted or nil, move point backward one word.
+
+ The word boundaries are normally determined by the buffer's syntax
+ table, but `find-word-boundary-function-table', such as set up
+ by `subword-mode', can change that. If a Lisp program needs to
+ move by words determined strictly by the syntax table, it should
+ use `backward-word-strictly' instead."
(interactive "^p")
(forward-word (- (or arg 1))))
#include "composite.h"
#include "dispextern.h"
#include "regex.h"
+#include "sheap.h"
#include "syntax.h"
#include "sysselect.h"
#include "systime.h"
bool initialized;
/* Set to true if this instance of Emacs might dump. */
+#ifndef DOUG_LEA_MALLOC
+static
+#endif
bool might_dump;
#ifdef DARWIN_OS
extern void unexec_init_emacs_zone (void);
#endif
-extern void malloc_enable_thread (void);
-
/* If true, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
bool inhibit_window_system;
{
signal (sig, SIG_DFL);
- /* If fatal error occurs in code below, avoid infinite recursion. */
- if (! fatal_error_in_progress)
+ if (attempt_orderly_shutdown_on_fatal_signal)
{
- fatal_error_in_progress = 1;
+ /* If fatal error occurs in code below, avoid infinite recursion. */
+ if (! fatal_error_in_progress)
+ {
+ fatal_error_in_progress = 1;
- totally_unblock_input ();
- if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
- Fkill_emacs (make_number (sig));
+ totally_unblock_input ();
+ if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
+ Fkill_emacs (make_number (sig));
- shut_down_emacs (sig, Qnil);
- emacs_backtrace (backtrace_limit);
+ shut_down_emacs (sig, Qnil);
+ emacs_backtrace (backtrace_limit);
+ }
}
/* Signal the same code; this time it will really be fatal.
filename_from_ansi (ch_to_dir, newdir);
ch_to_dir = newdir;
#endif
- original_pwd = get_current_dir_name ();
+ original_pwd = emacs_get_current_dir_name ();
if (chdir (ch_to_dir) != 0)
{
fprintf (stderr, "%s: Can't chdir to %s: %s\n",
init_ntproc (dumping); /* must precede init_editfns. */
#endif
+ #ifdef HAVE_NS
+ /* Initialise the locale from user defaults. */
+ ns_init_locale();
+ #endif
+
/* Initialize and GC-protect Vinitial_environment and
Vprocess_environment before set_initial_environment fills them
in. */
tem = Vpurify_flag;
Vpurify_flag = Qnil;
+#ifdef HYBRID_MALLOC
+ {
+ static char const fmt[] = "%d of %d static heap bytes used";
+ char buf[sizeof fmt + 2 * (INT_STRLEN_BOUND (int) - 2)];
+ int max_usage = max_bss_sbrk_ptr - bss_sbrk_buffer;
+ sprintf (buf, fmt, max_usage, STATIC_HEAP_SIZE);
+ /* Don't log messages, because at this point buffers cannot be created. */
+ message1_nolog (buf);
+ }
+#endif
+
fflush (stdout);
/* Tell malloc where start of impure now is. */
/* Also arrange for warnings when nearly out of space. */
{
Lisp_Object value;
int desired_width, desired_height;
+ double scale = 1;
/* If width and/or height is set in the display spec assume we want
to scale to those values. If either h or w is unspecified, the
value = image_spec_value (spec, QCheight, NULL);
desired_height = NATNUMP (value) ? min (XFASTINT (value), INT_MAX) : -1;
+ value = image_spec_value (spec, QCscale, NULL);
+ if (NUMBERP (value))
+ scale = extract_float (value);
+ width = width * scale;
+ height = height * scale;
+
if (desired_width == -1)
{
value = image_spec_value (spec, QCmax_width, NULL);
/* h known, calculate w. */
desired_width = scale_image_size (desired_height, height, width);
+ /* We have no width/height settings, so just apply the scale. */
+ if (desired_width == -1 && desired_height == -1)
+ {
+ desired_width = width;
+ desired_height = height;
+ }
+
*d_width = desired_width;
*d_height = desired_height;
}
return 0;
}
+#ifdef HAVE_MAGICKAUTOORIENTIMAGE
+ /* If no :rotation is explicitly specified, apply the automatic
+ rotation from EXIF. */
+ if (NILP (image_spec_value (img->spec, QCrotation, NULL)))
+ if (MagickAutoOrientImage (image_wand) == MagickFalse)
+ {
+ image_error ("Error applying automatic orientation in image `%s'", img->spec);
+ DestroyMagickWand (image_wand);
+ return 0;
+ }
+#endif
+
if (ino < 0 || ino >= MagickGetNumberImages (image_wand))
{
image_error ("Invalid image number `%s' in image `%s'", image, img->spec);
image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP
(specified_bg). */
value = image_spec_value (img->spec, QCrotation, NULL);
- if (FLOATP (value) || INTEGERP (value))
+ if (FLOATP (value))
{
rotation = extract_float (value);
status = MagickRotateImage (image_wand, bg_wand, rotation);
DEFSYM (QCcrop, ":crop");
DEFSYM (QCrotation, ":rotation");
DEFSYM (QCmatrix, ":matrix");
+ DEFSYM (QCscale, ":scale");
DEFSYM (QCcolor_adjustment, ":color-adjustment");
DEFSYM (QCmask, ":mask");
doc: /* Move point forward ARG words (backward if ARG is negative).
If ARG is omitted or nil, move point forward one word.
Normally returns t.
- If an edge of the buffer or a field boundary is reached, point is left there
- and the function returns nil. Field boundaries are not noticed if
- `inhibit-field-text-motion' is non-nil. */)
+ If an edge of the buffer or a field boundary is reached, point is
+ left there and the function returns nil. Field boundaries are not
+ noticed if `inhibit-field-text-motion' is non-nil.
+
+ The word boundaries are normally determined by the buffer's syntax
+ table, but `find-word-boundary-function-table', such as set up
+ by `subword-mode', can change that. If a Lisp program needs to
+ move by words determined strictly by the syntax table, it should
+ use `forward-word-strictly' instead. */)
(Lisp_Object arg)
{
Lisp_Object tmp;
POS and LIMIT are character positions in the current buffer.
If POS is less than LIMIT, POS is at the first character of a word,
-and the return value of a function should be a position after the
-last character of that word.
+and the return value of a function is a position after the last
+character of that word.
If POS is not less than LIMIT, POS is at the last character of a word,
-and the return value of a function should be a position at the first
+and the return value of a function is a position at the first
character of that word.
In both cases, LIMIT bounds the search. */);