Rewrite the kmacro register function to avoid using obsolete functions
* lisp/kmacro.el (kmacro-register): New struct to replace the
general registerv struct.
(register-val-jump-to, register-val-describe)
(register-val-insert): New methods to implement the register
interface.
(kmacro-to-register): Use the kmacro-register struct.
(beginning-of-defun-raw): Suppress warning about syntax-begin-function
* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw):
font-lock-compile-keywords also suppresses warnings about the
obsolete syntax-begin-function variable, so suppress the only
other use not in syntax.el.
Suppress warning about obsolete function custom-show
* lisp/cus-edit.el (custom-variable-value-create): Suppress
warning about obsolete function custom-show. The widget this
supports has been obsolete since Emacs 24, but we should perhaps
be very conservative about removing widget types, so suppress the
warning instead of removing the widget type.
* lisp/epa.el (epa-verify-cleartext-in-region): Suppress warnings
about calling interactive-only functions, because these are
interactive-only thin wrappers around those functions.
* lisp/ehelp.el (electric-help-execute-extended): Suppress warning
about `execute-extended-command' only being interactive, because
we're still using it interactively, but via a wrapper.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro.
* doc/lispref/compile.texi (Compiler Errors): Document
with-suppressed-warnings and deemphasise with-no-warnings
slightly.
* lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings):
New internal variable.
(byte-compile-warning-enabled-p): Heed
byte-compile--suppressed-warnings, bound via with-suppressed-warnings.
(byte-compile-initial-macro-environment): Provide a macro
expansion of with-suppressed-warnings.
(byte-compile-file-form-with-suppressed-warnings): New byte hunk
handler for the suppressed symbol machinery.
(byte-compile-suppressed-warnings): Ditto for the byteop.
(byte-compile-file-form-defmumble): Ditto.
(byte-compile-form, byte-compile-normal-call)
(byte-compile-normal-call, byte-compile-variable-ref)
(byte-compile-set-default, byte-compile-variable-set)
(byte-compile-function-form, byte-compile-set-default)
(byte-compile-warn-obsolete, byte-compile--declare-var): Pass the
symbol being warned in to byte-compile-warning-enabled-p.
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New
function.
(bytecomp-test--with-suppressed-warnings): Tests.
Eli Zaretskii [Tue, 11 Jun 2019 14:45:23 +0000 (17:45 +0300)]
Fix shaping of Arabic test when the region is extended
* src/xdisp.c (compute_stop_pos): Set the limit for searching
for changes in text properties such that the limit is never in
the middle of composable text. (Bug#28312)
Pip Cet [Tue, 11 Jun 2019 08:13:36 +0000 (10:13 +0200)]
Fix mouse cursor movement in 'select-frame-set-input-focus' (Bug#36165)
* lisp/frame.el (select-frame-set-input-focus): With
'mouse-autoselect-window' use 'set-mouse-pixel-position' to
avoid selecting another window manager window (Bug#36165).
Noam Postavsky [Wed, 5 Jun 2019 01:26:06 +0000 (21:26 -0400)]
Don't keep warning about unescaped literals (Bug#36068)
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Restore lost
let-binding of lread--unescaped-character-literals, so that unescaped
literals warning will only apply to the form just read.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Expand test to check that
we don't keep warning about old unescaped literals.
Michael Albinus [Mon, 10 Jun 2019 15:53:15 +0000 (17:53 +0200)]
Make tramp-test43-asynchronous-requests working, again
* test/lisp/net/tramp-tests.el (tramp-list-tramp-buffers):
Declare `tramp-list-tramp-buffers'.
(tramp--test-ignore-make-symbolic-link-error)
(tramp--test-ignore-add-name-to-file-error): Improve declaration.
(tramp--test-with-proper-process-name-and-buffer): New macro.
(tramp-test43-asynchronous-requests): Use the macro for timer,
process filter and process sentinel. Comment the remote file
operation in the timer. Remove further async events. Accept
output from all processes.
Michael Albinus [Mon, 10 Jun 2019 15:48:08 +0000 (17:48 +0200)]
Fix quoting problem in Tramp on w32 systems
* lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
* lisp/net/tramp-integration.el (tramp-connection-local-default-profile):
Revert patch from 2019-05-24. It is fixed differently.
Eli Zaretskii [Wed, 17 Oct 2018 15:19:47 +0000 (18:19 +0300)]
Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)
* test/src/thread-tests.el (threads-test-bug33073): New test.
Dmitry Gutov [Mon, 10 Jun 2019 00:50:44 +0000 (03:50 +0300)]
Omit the misplaced and unnecessary shyness qualifier
* lisp/progmodes/ruby-mode.el (ruby-find-library-file):
Omit the misplaced and unnecessary shyness qualifier.
Suggested by Mattias Engdegård <mattiase@acm.org>.
Dmitry Gutov [Mon, 10 Jun 2019 00:10:34 +0000 (03:10 +0300)]
Unbreak saving xref--original-window, etc
* lisp/progmodes/xref.el (xref--show-xref-buffer)
(xref--show-defs-buffer-at-bottom): Move major mode calls earlier.
So that local variable values are not lost.
Stefan Kangas [Sun, 9 Jun 2019 23:47:16 +0000 (16:47 -0700)]
Make bookmark-old-default-file variable obsolete
* lisp/bookmark.el (bookmark-old-default-file):
Redefine as obsolete variable alias for 'bookmark-default-file'.
(bookmark-maybe-load-default-file): Don't try to rename file
'bookmark-old-default-file' (~/.emacs-bkmrks) to new name (Bug#35940).
Stefan Kangas [Sun, 9 Jun 2019 23:38:31 +0000 (16:38 -0700)]
Make bookmark-maybe-message obsolete (Bug#35918)
* lisp/bookmark.el (bookmark-maybe-message):
Redefine as obsolete function alias for 'message'.
(bookmark-write-file): Use a progress reporter.
(bookmark-load-file): Use a progress reporter.
Dmitry Gutov [Sun, 9 Jun 2019 14:13:40 +0000 (17:13 +0300)]
Rename xref--pop-to-location to xref-pop-to-location
* lisp/progmodes/xref.el (xref-pop-to-location):
Rename from xref-pop-to-location. So that third-party
xref-show-definitions-function implementations can use it safely
(bug#36144). Update all callers.
Dmitry Gutov [Fri, 31 May 2019 15:30:36 +0000 (18:30 +0300)]
Add a built-in alternative for xref-show-definitions-function
* lisp/progmodes/xref.el (xref--transient-buffer-mode-map):
New variable.
(xref--transient-buffer-mode): New major mode.
(xref--button-map): Remove the RET binding (it was unnecessary in
the first place).
(xref--show-common-initialize):
Extract from xref--show-xref-buffer.
(xref--show-defs-buffer-at-bottom): New function.
Stefan Kangas [Thu, 30 May 2019 11:05:46 +0000 (13:05 +0200)]
Fix TODO to convert defvar with leading '*' to defcustom
* etc/TODO: Remove done TODO to remove '*' from defvar.
* doc/misc/gnus.texi: Remove leading '*' from defvar example.
* lisp/kermit.el (kermit-esc-char): Convert to defcustom.
* lisp/desktop.el (desktop-header):
* lisp/obsolete/cc-compat.el (c-indent-level)
(c-brace-imaginary-offset, c-brace-offset, c-argdecl-indent)
(c-label-offset, c-continued-statement-offset)
(c-continued-brace-offset): Remove leading '*' from docstring.
* lisp/progmodes/dcl-mode.el: Remove leading '*' from docstring in
comment.
* test/manual/cedet/tests/test.el: Add comment asking if example of
defvar with leading '*' should be removed.
(Bug#35994) (The previous commit is also for the same bug.)
Stefan Kangas [Wed, 29 May 2019 16:49:07 +0000 (18:49 +0200)]
Fix TODO to remove leading '*' from defcustom
* etc/TODO: Remove done TODO to remove leading '*' from defcustom
doc-strings.
* lisp/ibuffer.el (ibuffer-inline-columns): Remove leading '*' from
doc-string.
Paul Eggert [Sun, 9 Jun 2019 06:31:28 +0000 (23:31 -0700)]
Tune base64 decoding
This improves performance of base64-decode-region by about 7.5% on
my platform, and gets rid of some macros.
* src/fns.c (IS_ASCII, IS_BASE64, IS_BASE64_IGNORABLE)
(READ_QUADRUPLET_BYTE): Remove.
(base64_value_to_char, base64_char_to_value):
Now an array of two arrays. All uses changed.
(base64url_value_to_char, base64url_char_to_value):
Remove. All uses changed to the other array.
(base64_char_to_value): Entries are now of type signed char, not
short, since we can assume C99. Use C99 initializers; this is
clearer and caters to the (theoretical) possibility of systems
that do not use ASCII or do not have 8-bit bytes. Allow any index
in the range 0..UCHAR_MAX instead of limiting it to 0..127, so
that uses need not check for in-range indexes. Also record
padding chars. All uses changed.
(base64_decode_1): Always store number of chars in *NCHARS_RETURN,
for simplicity. All callers changed. Speed up the byte-fetching.
Paul Eggert [Sat, 8 Jun 2019 21:08:05 +0000 (14:08 -0700)]
Fix out-of-source make-dist problems
Problem with jisx2131-filter reported by Phillip Lord in:
https://lists.gnu.org/r/emacs-devel/2019-06/msg00147.html
* admin/charsets/Makefile.in (SED_SCRIPT):
Put it in $(srcdir), which is not necessarily the working directory.
($(SED_SCRIPT)): Rename from jisx2131-filter. All uses changed.
(clean): Do not remove SED_SCRIPT.
(extraclean): Remove it here instead.
* make-dist (possibly_non_vc_files): Remove src/emacs-module.h.
Although it is portable and could be distributed in the tarball,
it's too much hassle to do that, so let each builder make it.
Eli Zaretskii [Sat, 8 Jun 2019 15:48:33 +0000 (18:48 +0300)]
Minor copyedits in efaq-w32
* doc/misc/efaq-w32.texi (Grep, Recursive grep): More accurate
description of using 'findstr' as a poor-man's replacement for
'grep'. Reported by 范凯 <m_pupil@163.com>
Bernhard Rotter [Thu, 30 May 2019 08:13:00 +0000 (10:13 +0200)]
Fix path for current directory in eshell on MS-Windows
On MS-Windows, PATH implicitly includes the current directory.
Do it right for Eshell by adding "./" instead of ".", to
avoid finding .FOO instead of ./FOO.
* lisp/eshell/esh-util.el (eshell-get-path): New function.
* lisp/eshell/em-cmpl.el (eshell-complete-commands-list):
* lisp/eshell/esh-ext.el (eshell-search-path): Use eshell-get-path.
Add support for base64url variant of base-64 encoding/decoding
Implement the RFC4648 variant of base64 encoding used by URLs.
* doc/lispref/text.texi (base64url-encode-region,
base64url-encode-string): Document new functions.
(base64-decode-region, base64-decode-string): Document new optional
parameter 'base64url' used to use url variant when decoding data.
* src/fns.c (base64url-encode-region, base64url-encode-region): New
functions to manage url variant.
(base64-decode-region, base64-decode-string): Add optional
parameter to indicate use of url-variant.
(base64_encode_region_1, base64_encode_string_1): Internal functions
with extracted code from 'base64_encode_region' and
'base64_encode_string' and optional parameters to manage padding and
url variant.
(base64-encode-region, base64-encode-string) : Use
base64_encode_region_1 and base64_encode_string_1.
(base64-encode-1): Add parameters to manage padding and url variant.
(base64-decode-1): Add parameter to manage url variant.
* test/src/fns-tests.el (fns-tests--with-region): New helper macro to
test region variant of base64 encode / decode functions.
(fns-tests--string-repeat): Helper function used in base64 tests.
(fns-tests-base64-encode-region, fns-tests-base64-encode-string):
Tests for standard base64 function.
(fns-test-base64url-encode-region,
fns-test-base64url-encode-string): Tests for url variant.
(fns-tests-base64-decode-string): Tests for decoding part.
* src/xterm.c (x_cr_gc_clip) [USE_CAIRO]: New function extracted from
x_begin_cr_clip.
(x_begin_cr_clip) [USE_CAIRO]: Use it.
(xlib_surface_key, saved_drawable_key) [USE_CAIRO]: New variables.
(x_cr_destroy_xlib_surface, x_try_cr_xlib_drawable)
(x_end_cr_xlib_drawable) [USE_CAIRO]: New functions.
(x_draw_composite_glyph_string_foreground)
(x_draw_glyph_string_foreground) [USE_CAIRO]: Get Xlib surface when drawing
text with X core fonts into bitmap surfaces. Add fallback code for drawing
into outline surfaces.
* src/image.c (cr_create_surface_from_pix_containers) [USE_CAIRO]: Rename
from cr_create_surface_from_pix_containers. Change arguments to pair of
Emacs_Pix_Container:s. Move block_input and unblock_input to caller.
(cr_put_image_to_cr_data) [USE_CAIRO]: New function.
(prepare_image_for_display) [USE_CAIRO]: Use it.
(image_set_transform) [USE_CAIRO]: Create dummy solid color pattern equipped
with transformation matrix and set it to img->cr_data.
* src/xterm.c (fringe_bmp) [USE_CAIRO]: Change type to cairo_pattern_t **.
(x_cr_define_fringe_bitmap, x_cr_destroy_fringe_bitmap) [USE_CAIRO]: Create
or destroy cairo pattern.
(x_cr_draw_image) [USE_CAIRO]: Remove arguments image_width and image_height.
Change type of image to cairo pattern. All callers changed.
* src/gtkutil.c (xg_get_image_for_pixmap) [USE_CAIRO]: Get cairo surface
from img->cr_data, which is of cairo pattern now.
Make icalendar-import-buffer not show diary file buffer
* lisp/calendar/diary-lib.el (diary-make-entry): Add
omit-trailing-space parameter. Add do-not-show parameter to
allow not showing diary file buffer.
* lisp/calendar/icalendar.el (icalendar--add-diary-entry): Remove
workaround to omit trailing space in diary entry. Have
diary-make-entry not display the diary file buffer. (Bug#35645)
Paul Eggert [Fri, 7 Jun 2019 23:39:22 +0000 (16:39 -0700)]
Use machine pointer width for face hashes
* src/dispextern.h (struct face):
* src/xfaces.c (hash_string_case_insensitive, lface_hash)
(cache_face, lookup_face): Use uintptr_t for face hashes
instead of discarding the upper pointer bits on 64-bit machines.
Eli Zaretskii [Fri, 7 Jun 2019 19:02:25 +0000 (22:02 +0300)]
Support text shaping with HarfBuzz
The code to support HarfBuzz was written by these individuals:
Khaled Hosny <dr.khaled.hosny@gmail.com>
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Eli Zaretskii <eliz@gnu.org>
* src/xftfont.c (xftfont_list): Call ftfont_list2.
(xftfont_match): Call ftfont_match2.
(xftfont_open) [HAVE_HARFBUZZ]: Set the font driver to
xfthbfont_driver as required. Reset xftfont_info->hb_font to
NULL.
(xftfont_close) [HAVE_HARFBUZZ]: Dispose of the hb_font object.
(xftfont_shape): Accept an additional argument DIRECTION and
pass it to ftfont_shape.
(xfthbfont_list, xfthbfont_match, xfthbfont_begin_hb_font)
(xfthbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions.
(syms_of_xftfont): New DEFSYM 'xfthb'.
(syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize
xfthbfont_driver.
* src/xfns.c (Fx_create_frame, x_create_tip_frame)
[HAVE_HARFBUZZ]: Register the HarfBuzz font driver.
* src/w32uniscribe.c (bswap_32) [HAVE_HARFBUZZ]: Define to use
the builtin for GCC 4.3.9 and newer; else use byteswap.h from
Gnulib.
(struct uniscribe_font_info): New member 'scale'. The member
'cache' is now used both by Uniscribe and HarfBuzz backends.
(uniscribe_open): Set the font backend as required by the font
entity's font_type field.
(uniscribe_close) [HAVE_HARFBUZZ]: Dispose of the hb_font
object.
(uniscribe_shape): Accept an additional argument DIRECTION.
(w32hb_list, w32hb_match, free_cb, w32hb_get_font_table)
(w32hb_get_font, w32hb_encode_char, w32hb_begin_font)
(w32hb_get_variation_glyphs, load_harfbuzz_funcs)
[HAVE_HARFBUZZ]: New functions.
(syms_of_w32uniscribe_for_pdumper): Initialize
harfbuzz_font_driver if loading the requisite functions from
the HarfBuzz DLL succeeded.
* src/w32font.c (syms_of_w32font): New DEFSYM 'harfbuzz'.
* src/w32fns.c (Fx_create_frame, w32_create_tip_frame):
Determine whether we should register the HarfBuzz backend, or
Uniscribe backend, or both for the new frame.
* src/ftfont.h [HAVE_HARFBUZZ]: Include hb.h and hb-ft.h.
(struct font_info): New member hb_font.
* src/ftfont.c (ftfont_list2, ftfont_list_family): New functions.
(ftfont_open) [HAVE_HARFBUZZ]: Reset ftfont_info->hb_font to
NULL. Set the font backend to fthbfont_driver when required.
(ftfont_close) [HAVE_HARFBUZZ]: Dispose of ftfont_info->hb_font.
(ftfont_glyph_metrics): New function.
(ftfont_text_extents): Call ftfont_glyph_metrics instead of
FT_Load_Glyph.
(ftfont_shape): Accept an additional argument DIRECTION.
(ftfont_variation_glyphs) [!HAVE_OTF_GET_VARIATION_GLYPHS]:
Support for variation glyphs without FLT.
(fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: New function.
(syms_of_ftfont): New DEFSYM freetypehb.
(syms_of_ftfont_for_pdumper): Initialize fthbfont_driver.
* src/ftcrfont.c (ftcrfont_list): Call ftfont_list2.
(ftcrfont_match): Call ftfont_match2.
(ftcrfont_open) [HAVE_HARFBUZZ]: Set the font backend to
ftcrhbfont_driver as required. Reset ftcrfont_info->hb_font
to NULL.
(ftcrfont_close) [HAVE_HARFBUZZ]: Discard of
ftcrfont_info->hb_font.
(ftcrfont_shape): Pass DIRECTION to ftfont_shape.
(ftcrhbfont_list, ftcrhbfont_match)
(ftcrhbfont_begin_hb_font, ftcrhbfont_end_hb_font)
[HAVE_HARFBUZZ]: New functions.
(syms_of_ftcrfont): New DEFSYM ftcrhb.
(syms_of_ftcrfont_for_pdumper): Initialize ftcrhbfont_driver.
* src/font.h [HAVE_HARFBUZZ]: Include hb.h.
(struct font_driver): Update comments and function signatures
to reflect the new argument DIRECTION accepted by the 'shape'
method. New methods 'begin_hb_font' and 'end_hb_font'.
(hbfont_shape, hbfont_combining_capability)
(fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: Add prototypes.
* src/font.c (Ffont_shape_gstring): Accept an additional
argument DIRECTION, and pass it to the font driver's 'shape'
method.
(Ffont_variation_glyphs): Doc fix.
(syms_of_font): New DEFSYMS L2R and R2L.
* src/composite.c (autocmp_chars): Accept additional argument
DIRECTION, and pass it to auto-composition-function. All
callers changed.
(composition_reseat_it): Accept additional argument
BIDI_LEVEL, and use it to determine the DIRECTION argument to
be passed to autocmp_chars. All callers changed.
(syms_of_composite) <auto-composition-function>: Improve the
doc string; document the meaning of the new argument
DIRECTION.
* src/chartab.c (get_unicode_property): New function,
refactored from the body of get-unicode-property-internal.
(Fget_unicode_property_internal): Call get_unicode_property
after validating the input arguments.
* src/Makefile.in (HARFBUZZ_CFLAGS, HARFBUZZ_LIBS): New macros.
(EMACS_CFLAGS): Use HARFBUZZ_CFLAGS.
(SOME_MACHINE_OBJECTS): Add hbfont.o
(LIBES): Add HARFBUZZ_LIBS.
* lisp/language/tv-util.el (tai-viet-composition-function):
* lisp/language/thai-util.el (thai-composition-function):
* lisp/language/misc-lang.el (arabic-shape-gstring):
* lisp/language/lao-util.el (lao-composition-function):
* lisp/language/japanese.el (compose-gstring-for-variation-glyph):
* lisp/language/hebrew.el (hebrew-shape-gstring):
* lisp/language/ethio-util.el (ethio-composition-function):
* lisp/composite.el (compose-chars-after)
(compose-gstring-for-graphic)
(compose-gstring-for-dotted-circle)
(compose-gstring-for-terminal, auto-compose-chars): All
composition functions that call shapers now accept an
additional argument DIRECTION, either L2R or R2L.
* etc/NEWS: Document the HarfBuzz support.
* etc/HELLO: Add diacritics to Hebrew greetings.
* doc/lispref/frames.texi (Font and Color Parameters):
* doc/emacs/msdos.texi (Windows Fonts): Describe the
'harfbuzz' font backend on MS-Windows and how it is preferred
to 'uniscribe'.
* configure.ac (--wthout-harfbuzz): New option.
(HAVE_HARFBUZZ): New tests.
(FONT_OBJ) [HAVE_HARFBUZZ]: Add hbfont.o
(emacs_config_features): Add HARFBUZZ.
Glenn Morris [Fri, 7 Jun 2019 14:50:49 +0000 (07:50 -0700)]
Merge from origin/emacs-26
9254885 (origin/emacs-26) Resurrect display-line-number-mode in clien... aecbbd5 * src/fns.c (Fmapconcat): Doc fix. (Bug#35710) 8e5fc38 Fix typo ee21b40 * lisp/term/w32-win.el ([noname]): Bind to 'ignore'. (Bug#36... f68b33f Fix styling of Unicode codepoints in manuals ff7ec6f Fix a few uses of quotes in user manual b67042b More minor copyedits in the Emacs manual 9734b5c Fix minor issues in the Emacs manual c153250 Try to improve text on atomic windows in Elisp manual fb314ba Don't recommend insert-before-markers in process filters
John Shahid [Sat, 27 Apr 2019 16:21:38 +0000 (12:21 -0400)]
Consider line spacing and font height when deriving proc window size
* lisp/window.el (window-adjust-process-window-size): Use
window-screen-lines instead of window-body-height.
* lisp/term.el (term-mode): Use window-screen-lines to set the initial
window height.
* src/image.c (image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Don't call
compute_image_size, as it is already called from image_set_size.
(image_set_size, image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Use harmless
matrix transformation code also for USE_CAIRO and HAVE_NTGUI cases,
though image_set_transform is not yet implemented on them.
Paul Eggert [Fri, 7 Jun 2019 04:18:11 +0000 (21:18 -0700)]
Use copy_file_range to copy files
The copy_file_range syscall (introduced in Linux kernel
version 4.5) can copy files more efficiently via server-side
copy etc.
* admin/merge-gnulib (GNULIB_MODULES): Add copy-file-range.
* lib/copy-file-range.c, m4/copy-file-range.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/fileio.c (Fcopy_file): Try copy_file_range first,
falling back on read+write only if copy_file_range failed or
if the input is empty and so could be a /proc file.
Paul Eggert [Thu, 6 Jun 2019 15:09:58 +0000 (08:09 -0700)]
Fix overflow issues in image rotation
Also, do some refactoring to simplify code.
* src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): Remove.
* src/image.c (matrix3x3): New type, replacing all uses of 3x3 double.
(matrix3x3_copy, matrix3x3_mult): New functions, replacing
COPY_MATRIX, MULT_MATRICES. Replace INIT_MATRIX by C initializers.
(image_set_rotation): Use Fmod to avoid undefined behavior on
double-to-int conversion and to reduce bignum rotations correctly.
(image_set_crop): Finish up previous correction, by not re-setting
width and height if compute_image_size has set them.
Prefer shifting right by 1 to dividing by 2 if either will do.
Steve Scott [Mon, 3 Jun 2019 00:55:34 +0000 (21:55 -0300)]
Check rcirc-server for auto authentication (Bug#10162)
Since the hostname returned by irc.freenode.net can be something other
than irc.freenode.net, e.g. niven.freenode.net, the entries for
rcirc-authinfo and rcirc-server-alist will not match.
* lisp/net/rcirc.el (rcirc-handler-001): Check rcirc-server (the
hostname connected to) instead of rcirc-server-name (the hostname
returned), this corresponds with what rcirc-authenticate does.
Moreover, if rcirc-auto-authenticate-flag is set, check the
corresponding rcirc-authinfo, regardless of whether the
rcirc-authenticate-before-join must happen.