]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years ago* src/xfont.c (xfont_draw): Allocate the XChar2b array (Bug#35814)
Alexander Gramiak [Tue, 21 May 2019 20:58:59 +0000 (14:58 -0600)]
* src/xfont.c (xfont_draw): Allocate the XChar2b array (Bug#35814)

5 years agoFix some deprecation notices on macOS 10.14
Alan Third [Tue, 2 Apr 2019 20:49:36 +0000 (21:49 +0100)]
Fix some deprecation notices on macOS 10.14

* src/nsimage.m ([EmacsImage setXBMColor:]): Replace colorSpaceName
code.
* src/nsmenu.m ([EmacsDialogPanel initWithContentRect:styleMask:]):
Remove reference to oneShot.
* src/nsterm.h (ns_enable_screen_updates): Remove function prototype.
(NSPasteboardTypeString):
(NSPasteboardTypeTabularText):
(NSControlStateValueOn):
(NSControlStateValueOff):
(NSBezelStyleRounded):
(NSPasteboardTypeURL): Define new names and replace all callers.
* src/nsterm.m ([EmacsColor colorUsingDefaultColorSpace]): Replace
calls to colorUsingColorSpaceName on macOS > 10.7.
([EmacsView performDragOperation:]): Add FIXME about deprecation.
(ns_disable_screen_updates):
(ns_enable_screen_updates): Remove functions and all callers.
(disable_screen_updates_count): Remove variable.
* src/macfont.m (macfont_draw): Use CGContext instead of graphicsPort
on macOS >= 10.10

5 years agoPacify libpng on interlaced images (Bug#35843)
Paul Eggert [Tue, 21 May 2019 15:51:48 +0000 (08:51 -0700)]
Pacify libpng on interlaced images (Bug#35843)

* src/image.c (png_set_interlace_handling) [WINDOWSNT]:
New function to link.
(init_png_functions): Link it.
(png_load_body): Call it before calling png_read_update_info.

5 years agoRemove time-date debugging scaffolding
Paul Eggert [Tue, 21 May 2019 15:13:04 +0000 (08:13 -0700)]
Remove time-date debugging scaffolding

Problem reported by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2019-05/msg00721.html
* lisp/calendar/time-date.el (date-to-time):
Use plain condition-case, not condition-case-unless-debug.

5 years agoUse lexical-binding in tempo.el and add tests
Federico Tedin [Tue, 14 May 2019 12:16:00 +0000 (09:16 -0300)]
Use lexical-binding in tempo.el and add tests

For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00395.html
* lisp/tempo.el: Use lexical-binding.
(tempo-define-template): Expand documentation to mention
`tempo-user-elements'.
(tempo-local-tags, tempo-collection, tempo-dirty-collection)
(tempo-marks, tempo-match-finder): Define with defvar-local.
(tempo-named-insertions, tempo-region-start, tempo-region-stop): Make
them automatically buffer-local.
* test/lisp/tempo-tests.el: Add tests for tempo.el.

5 years agoC Mode: Fix indentation of DEFUN's function's argument list.
Alan Mackenzie [Tue, 21 May 2019 11:47:14 +0000 (11:47 +0000)]
C Mode: Fix indentation of DEFUN's function's argument list.

Formally, when DEFUNs still used knr argument lists, these were indented by
the syntactic context knr-argdecl-intro (5 columns).  Since this is no longer
the case, we now just use c-basic-offset (2 columns in "gnu" style).

* lisp/progmodes/cc-align.el (c-indent-gnu-DEFUN-intro-cont): Modernize the
indentation.  Amend the doc string accordingly.

5 years ago* src/ftcrfont.c (ftcrfont_open): Skip zero glyph index.
YAMAMOTO Mitsuharu [Mon, 20 May 2019 23:49:07 +0000 (08:49 +0900)]
* src/ftcrfont.c (ftcrfont_open): Skip zero glyph index.

5 years agoRevert recent project-find-file change
Stephen Leake [Mon, 20 May 2019 22:24:47 +0000 (15:24 -0700)]
Revert recent project-find-file change

* lisp/progmodes/project.el (project-find-file): Delete recently added
'filename' arg; just use project-find-file-in.

5 years agoAllow zero-argument rx `or' and `seq' forms
Mattias Engdegård [Wed, 15 May 2019 20:44:00 +0000 (22:44 +0200)]
Allow zero-argument rx `or' and `seq' forms

Make the rx `or' and `seq' forms accept zero arguments to produce a
never-matching regexp and an empty string, respectively.

* lisp/emacs-lisp/rx.el: Require cl-extra.
(rx-constituents, rx-or): Permit zero args.
(rx): Amend doc string for `or' and `seq'.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
* etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.

5 years agoRevert "Allow zero-argument rx `or' and `seq' forms"
Mattias Engdegård [Mon, 20 May 2019 15:38:03 +0000 (17:38 +0200)]
Revert "Allow zero-argument rx `or' and `seq' forms"

This reverts commit b552fc05c231ca6800330a318d3a74ddd0f5a13c.
It caused a bootstrapping failure which I have yet to resolve - sorry.

5 years agoImprove C and Elisp Git diff hunk headers
Basil L. Contovounesios [Mon, 20 May 2019 14:53:49 +0000 (15:53 +0100)]
Improve C and Elisp Git diff hunk headers

For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00457.html
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00369.html

* autogen.sh: Extend the built-in Git xfuncname pattern 'cpp' to
match preprocessor and DEFUN macros, and the 'elisp' pattern to
match cl-lib and other top-level defuns.

5 years agoUse lexical-binding in delim-col.el and add tests
Stefan Kangas [Sun, 5 May 2019 13:48:57 +0000 (15:48 +0200)]
Use lexical-binding in delim-col.el and add tests

Thanks to Basil L. Contovounesios for additional cleanups.
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00177.html

* lisp/delim-col.el: Use lexical-binding.

* test/lisp/delim-col-tests.el: New file.
(delim-col-tests-delimit-colummns-before-after)
(delim-col-tests-delimit-columns)
(delim-col-tests-delimit-columns-format/nil)
(delim-col-tests-delimit-columns-format/padding)
(delim-col-tests-delimit-columns-format/separator)
(delim-col-tests-delimit-columns-separator)
(delim-col-tests-delimit-columns-str-before-after)
(delim-col-tests-delimit-columns-str-separator)
(delim-col-tests-delimit-rectangle): New unit tests.

5 years agoCC Mode: Remove unused code from c-maybe-re-mark-raw-string
Alan Mackenzie [Mon, 20 May 2019 12:46:37 +0000 (12:46 +0000)]
CC Mode: Remove unused code from c-maybe-re-mark-raw-string

Acknowledge that when the function is called, it is always at the start of a
string, never in the middle or at the end of one.

* lisp/progmodes/cc-engine.el (c-maybe-re-mark-raw-string): Reformulate the
cond form into a `when' form, with all but the first arm of the cond
discarded.

5 years ago; Fix last change to nnheader-cancel-timer
Basil L. Contovounesios [Mon, 20 May 2019 12:38:32 +0000 (13:38 +0100)]
; Fix last change to nnheader-cancel-timer

* lisp/gnus/nnheader.el (nnheader-cancel-timer)
(nnheader-cancel-function-timers): Remove defalias calls made
redundant by subsequent define-obsolete-function-alias calls.

5 years agow32--os-description: Fix previous change
Lars Ingebrigtsen [Mon, 20 May 2019 12:34:36 +0000 (14:34 +0200)]
w32--os-description: Fix previous change

* lisp/w32-fns.el (w32--os-description): Fix inadvertant "o" added
to the end of the function name in the previous patch (bug#35807).

5 years agoMark nnheader-cancel-timer as obsolete and adjust callers
Lars Ingebrigtsen [Mon, 20 May 2019 11:47:16 +0000 (13:47 +0200)]
Mark nnheader-cancel-timer as obsolete and adjust callers

* lisp/gnus/nnheader.el (nnheader-cancel-timer)
(nnheader-cancel-function-timers): Mark as obsolete.

* lisp/gnus/nntp.el (nntp-with-open-group-function)
(nntp-async-stop): Adjust caller.

* lisp/gnus/gnus-art.el (gnus-stop-date-timer): Ditto.

* lisp/gnus/gnus-async.el (gnus-async-prefetch-next): Ditto.

* lisp/gnus/gnus-demon.el (gnus-demon-run-callback)
(gnus-demon-cancel): Ditto.

* lisp/gnus/mail-source.el (mail-source-report-new-mail): Ditto.

* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article): Ditto.

5 years agoAllow zero-argument rx `or' and `seq' forms
Mattias Engdegård [Wed, 15 May 2019 20:44:00 +0000 (22:44 +0200)]
Allow zero-argument rx `or' and `seq' forms

Make the rx `or' and `seq' forms accept zero arguments to produce a
never-matching regexp and an empty string, respectively.

* lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args.
(rx): Amend doc string for `or' and `seq'.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
* etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.

5 years agoAvoid polling in global-auto-revert-mode (bug#35418)
Mattias Engdegård [Thu, 9 May 2019 07:40:46 +0000 (09:40 +0200)]
Avoid polling in global-auto-revert-mode (bug#35418)

Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode.
Buffers actually handled by that mode are marked with a non-nil value
of `auto-revert--global-mode'.  When global-auto-revert-mode is
entered, eligible buffers are marked in that way, and hooks are set up
to mark new buffers and take care of buffers whose file names change.
This way the existing poll-avoidance logic can be used, since the
entire set of buffers in auto-revert is known.

A new hook, `after-set-visited-file-name-hook', was added to handle
the case when the file name of a tracked buffer changes.

* lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string.
(auto-revert--global-mode): New buffer-local variable.
(global-auto-revert-mode): Mark existing buffers and set up hooks when
mode is entered; do the opposite when exited.
(auto-revert--global-add-current-buffer)
(auto-revert--global-adopt-current-buffer)
(auto-revert--set-visited-file-name-advice): New functions.
(auto-revert--polled-buffers, auto-revert--need-polling-p)
(auto-revert-notify-handler)
(auto-revert-active-p): Modify logic to cover global-auto-revert-mode.
* lisp/files.el (after-set-visited-file-name-hook): New hook.
(set-visited-file-name-hook): Call new hook.
* test/lisp/autorevert-tests.el (top):  Use lexical-binding.
(auto-revert-test--write-file, auto-revert-test--buffer-string)
(auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text)
(auto-revert-test05-global-notify): New test.
* doc/lispref/hooks.texi (Standard Hooks):
Mention new hook (in a comment, since it's unclear whether it should
actually be documented here)
* etc/NEWS (Changes in Specialized Modes and Packages): Update entry.

5 years agoFix problems in autorevert-tests
Michael Albinus [Mon, 20 May 2019 08:14:13 +0000 (10:14 +0200)]
Fix problems in autorevert-tests

* test/lisp/autorevert-tests.el (auto-revert--deftest-remote):
Fix typo.
(auto-revert-test02-auto-revert-deleted-file): On emba, there are
no stopped events.

5 years agoFixes for "Maintainer:" and related lines
Paul Eggert [Mon, 20 May 2019 04:29:13 +0000 (21:29 -0700)]
Fixes for "Maintainer:" and related lines

Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.

5 years agoUse HAVE_WINDOW_SYSTEM over HAVE_X11 || HAVE_NTGUI || HAVE_NS
Alexander Gramiak [Mon, 20 May 2019 02:18:54 +0000 (20:18 -0600)]
Use HAVE_WINDOW_SYSTEM over HAVE_X11 || HAVE_NTGUI || HAVE_NS

* src/keyboard.c (kbd_buffer_get_event, make_lispy_event): Use
HAVE_WINDOW_SYSTEM.

5 years agoIntroduce Emacs_Pix_Container and Emacs_Pix_Context typedefs
Alexander Gramiak [Fri, 10 May 2019 23:12:39 +0000 (17:12 -0600)]
Introduce Emacs_Pix_Container and Emacs_Pix_Context typedefs

Emacs_Pix_Container is a pointer to a struct representing pixmap data
on the backend.  Emacs_Pix_Context is the context for the
bitmap/pixmap on the backend.  Only w32 currently makes this
distinction; they are otherwise the same type.

* src/dispextern.h: Remove XImagePtr in favor of
using XImage* directly. Rename XImagePtr_or_DC to Emacs_Pix_Context.
[HAVE_X_WINDOWS] Alias Emacs_Pix_Container and
Emacs_Pix_Context to XImage*.
[HAVE_NS] Alias Emacs_Pix_Container and Emacs_Pix_Context to trivial
Emacs_Pixmap definition.
[HAVE_NTGUI]: Alias Emacs_Pix_Container to XImage* and
Emacs_Pix_Context to HDC.

* src/dispextern.h:
* src/image.c: Use Emacs_Pix_Container over XImagePtr and
Emacs_Pix_Context over XImagePtr_or_DC.

5 years agoReplace XChar2b with unsigned in all font backends
Alexander Gramiak [Fri, 10 May 2019 15:45:57 +0000 (09:45 -0600)]
Replace XChar2b with unsigned in all font backends

The xfont backend using XChar2b in its API doesn't mean that we should
use it everywhere else.

* src/dispextern.h (glyph_string):
* src/ftcrfont.c (ftcrfont_draw):
* src/ftxfont.c (ftxfont_draw):
* src/w32term.c (w32_draw_glyphless_glyph_string_foreground):
* src/xdisp.c (init_glyph_string, get_char_face_and_encoding)
(get_glyph_face_and_encoding, get_char_glyph_code)
(fill_gstring_glyph_string, fill_stretch_glyph_string)
(normal_char_ascent_descent, gui_get_glyph_overhangs)
(compute_overhangs_and_x, gui_produce_glyphs):
* src/xfont.c (xfont_get_pcm, xfont_chars_supported, xfont_open)
(xfont_encode_char, xfont_text_extents, xfont_draw)
* src/xftfont.c (xftfont_draw):
* src/xterm.c (x_compute_glyph_string_overhangs)
(x_draw_glyphless_glyph_string_foreground): Use unsigned over XChar2b.

* src/nsgui.h:
* src/w32gui.h:
* src/xterm.h: Remove XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, and
XCHAR2B_BYTE2 typedefs and macros.

* src/font.h (font_driver):
(ftfont_text_extents)
* src/ftcrfont.c (ftcrfont_text_extents):
* src/ftfont.c (ftfont_text_extents):
* src/macfont.m (macfont_text_extents):
* src/nsfont.m (nsfont_text_extents):
* src/w32font.h (w32_font_text_extents):
* src/font.c (xfont_text_extents):
* src/xftfont.c (xftfont_text_extents): Make code parameter const.

5 years agoIntroduce Emacs_GC struct and typedef
Alexander Gramiak [Fri, 10 May 2019 04:08:06 +0000 (22:08 -0600)]
Introduce Emacs_GC struct and typedef

* src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_GC to XGCValues.
[!HAVE_X_WINDOWS]: Define Emacs_GC, GCForeground, and GCBackground.

* src/nsgui.h:
* src/w32gui.h:Remove obsolete XGCValues, GC, GCForeground,
GCBackground, and GCFont definitions.

* src/w32fns.c (w32_make_gc): Do not set unused font field.

* src/w32term.c: Use Emacs_GC over XGCValues. Do not set unused font
field.

* src/xfaces.c: Use Emacs_GC over XGCValues and GC.

5 years agoIntroduce Emacs_Rectangle struct and typedef
Alexander Gramiak [Fri, 10 May 2019 00:12:22 +0000 (18:12 -0600)]
Introduce Emacs_Rectangle struct and typedef

* src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Rectangle to
XRectangle.
[!HAVE_X_WINDOWS]: Define Emacs_Rectangle struct.
Use Emacs_Rectangle over XRectangle.

* src/frame.h (MonitorInfo):
* src/msdos.h:
* src/w32term.c:
* src/xdisp.c: Use Emacs_Rectangle over XRectangle.

* src/nsgui.h:
* src/w32gui.h: Remove old XRectangle structs.

* src/xdisp.c:
* src/nsgui.h:
* src/w32gui.h: Rename CONVERT_FROM_XRECT and CONVERT_TO_XRECT to
CONVERT_FROM_EMACS_RECT and CONVERT_TO_EMACS_RECT respectively.

5 years agoIntroduce Emacs_Pixmap typedef
Alexander Gramiak [Thu, 9 May 2019 23:48:55 +0000 (17:48 -0600)]
Introduce Emacs_Pixmap typedef

* src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Pixmap to Pixmap.
(image, x_kill_gs_process): Use Emacs_Pixmap over Pixmap.

* src/image.c:

* src/nsgui.h:
* src/nsterm.m:
* src/termhooks.h:
* src/w32gui.h:
* src/w32term.c:
* src/w32term.h:
* src/xterm.c (x_free_pixmap): Use Emacs_Pixmap over Pixmap.

* src/w32gui.h: Remove unused typedef Bitmap.

5 years agoIntroduce Emacs_Cursor typedef
Alexander Gramiak [Thu, 9 May 2019 23:13:18 +0000 (17:13 -0600)]
Introduce Emacs_Cursor typedef

* src/dispextern.h [HAVE_X_WINDOWS]: Define Emacs_Cursor alias. Move
the No_Cursor definition from xterm.h.
(redisplay_interface): Use Emacs_Cursor over Cursor.

* src/nsgui.h:
* src/nsterm.h:
* src/nsterm.m:
* src/w32gui.h:
* src/w32term.c:
* src/xdisp.c:
* src/xterm.c (x_define_frame_cursor): Use Emacs_Cursor over Cursor.

5 years agoIntroduce Emacs_Color struct and typedef
Alexander Gramiak [Thu, 9 May 2019 19:07:35 +0000 (13:07 -0600)]
Introduce Emacs_Color struct and typedef

This avoids clashing with the XColor struct from X.

* src/dispextern [HAVE_X_WINDOWS]: Define Emacs_Color alias.
[!HAVE_X_WINDOWS]: Rename XColor compatibility struct to
Emacs_Color. Remove unused fields.

* src/gtkutil.c:
* src/gtkutil.h:
* src/image.c:
* src/nsterm.h:
* src/nsterm.m:
* src/termhooks.h:
* src/w32fns.c:
* src/w32term.c:
* src/w32term.h:
* src/xfaces.c:
* src/xfns.c:
* src/xterm.h: Use Emacs_Color over XColor outside of X-specific
sections.

5 years ago; Remove some redundant Gnus autoloads
Basil L. Contovounesios [Sun, 19 May 2019 23:29:47 +0000 (00:29 +0100)]
; Remove some redundant Gnus autoloads

* lisp/gnus/nnheader.el:
* lisp/gnus/nnmail.el: Don't autoload functions from files already
loaded.

5 years agoComment out inexplicable condition in filenotify
Mattias Engdegård [Sun, 19 May 2019 20:43:31 +0000 (22:43 +0200)]
Comment out inexplicable condition in filenotify

* lisp/filenotify.el (file-notify-callback):
Comment out condition that does not seem to make any sense. All it
seems to do is allowing notifications for files on the form DIR/X/X
when we really just are watching DIR/X/Y.

5 years ago* lisp/vc/vc-dispatcher.el (vc-do-command): Let-bind inhibit-message to t
Juri Linkov [Sun, 19 May 2019 20:16:01 +0000 (23:16 +0300)]
* lisp/vc/vc-dispatcher.el (vc-do-command): Let-bind inhibit-message to t

in active minibuffer.  (Bug#34939)

5 years agoPublicize behavior of log-view-diff at beginning/end of active region
Juri Linkov [Sun, 19 May 2019 20:11:27 +0000 (23:11 +0300)]
Publicize behavior of log-view-diff at beginning/end of active region

* lisp/vc/log-view.el (log-view-diff, log-view-diff-changeset):
* doc/emacs/maintaining.texi (VC Change Log): Document behavior of
log-view-diff at the beginning and the end of the log buffer
when the region is active.  (Bug#35624)

* lisp/vc/vc-git.el (vc-git-print-log): Insert newline at the
beginning to enable the feature of diffing with the working revision.

5 years agocus-edit.el: Remove XEmacs compat code
Lars Ingebrigtsen [Sun, 19 May 2019 18:50:54 +0000 (20:50 +0200)]
cus-edit.el: Remove XEmacs compat code

* lisp/cus-edit.el (custom-browse-insert-prefix): Remove XEmacs
compat code and make obsolete.
(custom-group-value-create): Use `insert' directly.

* lisp/emacs-lisp/elint.el (elint-check-conditional-form): Don't
refer to function that doesn't have an if any more.

5 years agobs.el: Remove XEmacs compat code
Lars Ingebrigtsen [Sun, 19 May 2019 18:40:43 +0000 (20:40 +0200)]
bs.el: Remove XEmacs compat code

* lisp/bs.el (bs-mode-font-lock-keywords): Remove XEmacs compat code.
(bs-mode-map): Ditto.

5 years agoarc-mode.el: Remove XEmacs compat code
Lars Ingebrigtsen [Sun, 19 May 2019 18:37:54 +0000 (20:37 +0200)]
arc-mode.el: Remove XEmacs compat code

* lisp/arc-mode.el (archive-mode-map): Remove XEmacs compat code.
(archive-summarize-files): Ditto.

5 years agorfc2104.el: Remove XEmacs compat code.
Lars Ingebrigtsen [Sun, 19 May 2019 18:30:58 +0000 (20:30 +0200)]
rfc2104.el: Remove XEmacs compat code.

* lisp/net/rfc2104.el (rfc2104-string-make-unibyte): Remove XEmacs
  compat code.

5 years ago(mml-generate-mime-1): Remove XEmacs compat code
Lars Ingebrigtsen [Sun, 19 May 2019 18:26:48 +0000 (20:26 +0200)]
(mml-generate-mime-1): Remove XEmacs compat code

* lisp/gnus/mml.el (mml-generate-mime-1): Remove XEmacs compat code.

5 years ago; Instrument autorevert-tests
Michael Albinus [Sun, 19 May 2019 17:52:46 +0000 (19:52 +0200)]
; Instrument autorevert-tests

5 years agoMinor updates to project.el
Stephen Leake [Sun, 19 May 2019 17:28:46 +0000 (10:28 -0700)]
Minor updates to project.el

* lisp/progmodes/project.el (project-find-file): Add optional 'filename' arg.
(project--completing-read-strict): Ignore 'default' set to empty string.

5 years agoFix Gnus group sorting to use gnus-group-list
Eric Abrahamsen [Sun, 19 May 2019 16:57:50 +0000 (09:57 -0700)]
Fix Gnus group sorting to use gnus-group-list

* lisp/gnus/gnus-group.el (gnus-group-sort-flat): As
  gnus-newsrc-hashtb is now a real (unsorted) hash table, use
  gnus-group-list to maintain group sort order.
  (gnus-group-sort-selected-flat): Ditto.
* lisp/gnus/gnus-start.el (gnus-subscribe-alphabetically): Simplify
  function using seq-find.
  (gnus-subscribe-killed, gnus-subscribe-zombies): Use cl-pushnew to
  avoid adding duplicates (can happen when un/subscribing multiple
  times to one group).

5 years agoRemove usage of string-to-multibyte from arc-mode.el
Lars Ingebrigtsen [Sun, 19 May 2019 16:35:33 +0000 (18:35 +0200)]
Remove usage of string-to-multibyte from arc-mode.el

* lisp/arc-mode.el (arc-insert-unibyte): Rename from
insert-unibyte, make into a function, and remove the superfluous
string-to-multibyte.  Change callers throughout the file.

5 years ago* doc/lispintro/emacs-lisp-intro.texi: Remove euphemism.
Paul Eggert [Sun, 19 May 2019 15:27:46 +0000 (08:27 -0700)]
* doc/lispintro/emacs-lisp-intro.texi: Remove euphemism.

5 years agoFix dired-omit-files regexp (Bug#35668)
Noam Postavsky [Sun, 12 May 2019 16:42:35 +0000 (12:42 -0400)]
Fix dired-omit-files regexp (Bug#35668)

* lisp/dired-x.el (dired-omit-files): Match beginning and end of
string, rather than beginning and end of line.

5 years ago* lisp/progmodes/hideshow.el: Simplify mouse binding; Use lexical-binding
Stefan Monnier [Sun, 19 May 2019 13:36:22 +0000 (09:36 -0400)]
* lisp/progmodes/hideshow.el: Simplify mouse binding; Use lexical-binding

(hs-set-up-overlay, hs-adjust-block-beginning): Use non-nil default for
function variables, so `add-function` can be used on them.
(hs-toggle-hiding): Make it work for mouse bindings as well.
(hs-minor-mode-map): Use it for the mouse binding.
(hs-grok-mode-type): Use bound-and-true-p.
(hs-life-goes-on): Use `declare` for the debug spec.
(hs-mouse-toggle-hiding): Make it an obsolete alias.

5 years ago* test/lisp/autorevert-tests.el (auto-revert--deftest-remote):
Michael Albinus [Sun, 19 May 2019 11:34:01 +0000 (11:34 +0000)]
* test/lisp/autorevert-tests.el (auto-revert--deftest-remote):

Do not handle errors.

5 years agoNew buffer display action function 'display-buffer-in-direction'
Martin Rudalics [Sun, 19 May 2019 09:03:05 +0000 (11:03 +0200)]
New buffer display action function 'display-buffer-in-direction'

* lisp/window.el (windows-sharing-edge)
(window--try-to-split-window-in-direction)
(display-buffer-in-direction): New functions.
* doc/lispref/windows.texi (Buffer Display Action Functions):
Describe new action function 'display-buffer-in-direction'.
(Buffer Display Action Alists): Describe new entry 'direction'.
Amend description of 'window' entry.
* etc/NEWS: Mention 'display-buffer-in-direction' and 'direction'
and 'window' action alist entries.

5 years agoAvoid triple buffering with Xdbe in cairo
YAMAMOTO Mitsuharu [Sat, 18 May 2019 23:35:40 +0000 (08:35 +0900)]
Avoid triple buffering with Xdbe in cairo

* src/xterm.h (struct x_output): Remove member cr_surface.
Add members cr_surface_desired_width and cr_surface_desired_height.
(x_cr_destroy_frame_context) [USE_CAIRO]: Add extern.

* src/xterm.c (x_free_cr_resources): Remove function.
(FRAME_CR_SURFACE) [USE_CAIRO]: Remove macro.
(FRAME_CR_SURFACE_DESIRED_WIDTH, FRAME_CR_SURFACE_DESIRED_HEIGHT) [USE_CAIRO]:
New macros.
(x_cr_destroy_frame_context) [USE_CAIRO]: Rename from x_cr_destroy_surface.
All Uses changed.  Don't use FRAME_CR_SURFACE.  Make non-static.
(x_cr_update_surface_desired_size) [USE_CAIRO]: New function.
(x_begin_cr_clip) [USE_CAIRO]: Create Xlib surface if Xdbe is in use.
Use FRAME_CR_SURFACE_DESIRED_WIDTH and FRAME_CR_SURFACE_DESIRED_HEIGHT.
(x_end_cr_clip) [USE_CAIRO]: Call x_mark_frame_dirty if Xdbe is in use.
(x_cr_draw_frame, x_cr_export_frames) [USE_CAIRO]: Save and restore cairo
context instead of freeing and clearing it.
(x_update_begin) [USE_CAIRO]: Don't create cairo surface here.
(show_back_buffer) [USE_CAIRO]: Call cairo_surface_flush before swapping.
(x_update_end) [USE_CAIRO]: Don't copy image surface if Xdbe is in use.
Get image surface by cairo_get_target instead of FRAME_CR_SURFACE.
(x_scroll_run) [USE_CAIRO]: Use XCopyArea if Xdbe is in use.
(handle_one_xevent) [USE_CAIRO] <ConfigureNotify>: Call
x_cr_update_surface_desired_size instead of x_cr_destroy_surface.
(x_free_frame_resources) [USE_CAIRO]: Call x_cr_destroy_frame_context instead
of x_free_cr_resources.

* src/xfns.c (set_up_x_back_buffer, tear_down_x_back_buffer) [USE_CAIRO]:
Call x_cr_destroy_frame_context.

5 years ago* lisp/emacs-lisp/package.el: Fix decoding of downloaded files
Stefan Monnier [Sat, 18 May 2019 22:32:47 +0000 (18:32 -0400)]
* lisp/emacs-lisp/package.el: Fix decoding of downloaded files

This is a different fix for bug#34909, which should also fix bug#35739.

Our downloading code used to automatically decode the result according
to the usual heuristics for files.  This caused problems when we later
needed to save the data in a file that needed to be byte-for-byte
equal to the original in order to pass the signature verification,
especially because we didn't keep track of which coding-system was
used to decode the data.

(package--unless-error): New macro extracted from
package--with-response-buffer-1, so that we can specify edebug and
indent specs.
(package--with-response-buffer-1): Use it.  More importantly, change
code so it runs `body` in a unibyte buffer with undecoded data.
(package--download-one-archive): Don't encode with utf-8 since the data
is not decoded yet.
(describe-package-1): Explicitly decode the readem.txt files here.

* lisp/url/url-handlers.el (url-insert-file-contents): Use it.
(url-insert): Don't decode if buffer is unibyte.

* lisp/url/url-http.el (url-http--insert-file-helper): New function,
extracted from url-insert-file-contents.

5 years ago* lisp/emacs-lisp/package.el: Reduce macrology in ...with-response-buffer
Stefan Monnier [Sat, 18 May 2019 21:40:21 +0000 (17:40 -0400)]
* lisp/emacs-lisp/package.el: Reduce macrology in ...with-response-buffer

(package--with-response-buffer-1): New function, extracted from
package--with-response-buffer.
(package--with-response-buffer): Use it.

5 years agoFix broken logic in file-notify
Mattias Engdegård [Sat, 18 May 2019 17:48:32 +0000 (19:48 +0200)]
Fix broken logic in file-notify

* lisp/filenotify.el (file-notify-callback):
Repair warped condition that didn't match rename-to/from events correctly.

5 years ago* lisp/textmodes/texinfmt.el: Chassell is no longer maintainer.
Paul Eggert [Sat, 18 May 2019 18:05:06 +0000 (11:05 -0700)]
* lisp/textmodes/texinfmt.el: Chassell is no longer maintainer.

5 years agoBob Chassell passed away
Jean-Christophe Helary [Sat, 18 May 2019 18:02:12 +0000 (11:02 -0700)]
Bob Chassell passed away

* doc/lispintro/emacs-lisp-intro.texi (About the Author): Update.

5 years agoFix recent Tramp typo that broke the build
Paul Eggert [Sat, 18 May 2019 17:50:36 +0000 (10:50 -0700)]
Fix recent Tramp typo that broke the build

‘make bootstrap’ without this patch should reproduce the problem.
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
Autoload zeroconf-init.

5 years agoRemove XEmacs audio checks from mm-decode.el
Basil L. Contovounesios [Sat, 18 May 2019 17:06:29 +0000 (18:06 +0100)]
Remove XEmacs audio checks from mm-decode.el

For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01087.html
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00584.html
* lisp/gnus/mm-decode.el (mm-inline-media-tests): Remove no-op media
tests for XEmacs features.

5 years agoFor SVG, 8192 is the new 256
Paul Eggert [Sat, 18 May 2019 17:00:26 +0000 (10:00 -0700)]
For SVG, 8192 is the new 256

Prefer librsvg for display of splash.svg
When both librsvg and Imagemagick are available, Emacs should
prefer librsvg to render SVG images.  However, Emacs was using
Imagemagick to render its own splash.svg file because
image-type-from-file-header returned nil for that file.
* lisp/image.el (image-type-from-buffer)
(image-type-from-file-header): Look at the first 8192 bytes of
the image, not just the first 256.  For Emacs’s own splash.svg
file, image-type-header-regexps needs to look at 939 bytes.
8192 bytes is a reasonable number nowadays given typical file
system design.
* test/lisp/image-tests.el (image-tests--emacs-images-directory):
New contant.
(image-type-from-file-header-test): New test.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 18 May 2019 16:14:39 +0000 (18:14 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoBug#35769
Michael Albinus [Sat, 18 May 2019 16:14:17 +0000 (18:14 +0200)]
Bug#35769

* lisp/net/tramp-sh.el: (tramp-maybe-open-connection):
Arrange `process-environment' that it doesn't work for local
processes.  (Bug#35769)

5 years agoCC Mode: Handle several consecutive noise macros in declaration contexts.
Alan Mackenzie [Sat, 18 May 2019 15:20:49 +0000 (15:20 +0000)]
CC Mode: Handle several consecutive noise macros in declaration contexts.

In the bug scenario, the second and subsequent noise macros with parentheses
were getting font-lock-type-face.

* lisp/progmodes/cc-engine.el (c-end-of-token)
(c-forward-noise-clause-not-macro-decl): New functions.
(c-find-decl-prefix-search): Handle noise macros by skipping over them.
(c-forward-decl-or-cast-1): In the loop checking for types, skip over all
consecutive noise macros with parens, not just one.

5 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 18 May 2019 14:46:29 +0000 (17:46 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

5 years agoFix missing declaration in gnus-sum.el
Bastien [Sat, 18 May 2019 14:45:00 +0000 (16:45 +0200)]
Fix missing declaration in gnus-sum.el

* lisp/gnus/gnus-sum.el (gnus-tmp-name): Declare var.

5 years agoFix display of images on MS-Windows broken by a recent commit
Eli Zaretskii [Sat, 18 May 2019 14:44:16 +0000 (17:44 +0300)]
Fix display of images on MS-Windows broken by a recent commit

* src/image.c (initialize_image_type): Test if the type is in
Vlibrary_cache up front, and return true without calling the
'init' method if the type was already initialized.

5 years agoSuppress compiler warnings for older Emacsen in tramp-tests.el
Michael Albinus [Sat, 18 May 2019 14:04:58 +0000 (16:04 +0200)]
Suppress compiler warnings for older Emacsen in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add error name to test.
(tramp-test30-make-process, tramp-test45-unload):
Suppress compiler warnings from older Emacsen.

5 years agoRequire less packages in Tramp
Michael Albinus [Sat, 18 May 2019 14:04:02 +0000 (16:04 +0200)]
Require less packages in Tramp

* lisp/net/tramp-compat.el (format-spec): Do not require advice, cl-lib,
custom, password-cache, timer and ucs-normalize.

* lisp/net/tramp-gvfs.el: Do not require zeroconf.  Declare
zeroconf-* functions.
(tramp-gvfs-enabled): Autoload `zeroconf-init'.

* lisp/net/tramp-sh.el: Do not require dired.

* lisp/net/tramp.el (tramp-get-debug-buffer): Do not require outline.
(tramp-file-name-for-operation): Extend docstring.
(tramp-parse-netrc): Do not require netrc.  Autoload `netrc-parse'.

5 years agoDon't use file notification on non-file buffers
Mattias Engdegård [Tue, 7 May 2019 22:02:59 +0000 (00:02 +0200)]
Don't use file notification on non-file buffers

Allow non-file buffers to declare that notification on their
default-directory is sufficient to know when auto-revert updates are
required by setting the new variable `buffer-auto-revert-by-notification'
to non-nil.  If nil, the default, then auto-revert will poll
those buffers instead. (bug#35418).
Currently, only Dired sets that variable.

* lisp/autorevert.el (auto-revert-buffers):
Modify condition for using notification.
* lisp/files.el (buffer-auto-revert-by-notification): New variable.
* lisp/dired.el (dired-mode): Set buffer-auto-revert-by-notification.
* doc/emacs/arevert-xtra.texi (Non-File Buffers): Document new variable.
* etc/NEWS (Changes in Specialized Modes and Packages): Describe new variable.

5 years ago(epa-file-decode-and-insert): Byte compilation warning fix
Lars Ingebrigtsen [Sat, 18 May 2019 09:18:42 +0000 (11:18 +0200)]
(epa-file-decode-and-insert): Byte compilation warning fix

* lisp/epa-file.el (epa-file-decode-and-insert): Remove
superfluous call to `string-to-multibyte string'.

5 years ago* lisp/net/tramp.el (tramp-interrupt-process): Return proper value.
Michael Albinus [Sat, 18 May 2019 09:11:36 +0000 (11:11 +0200)]
* lisp/net/tramp.el (tramp-interrupt-process): Return proper value.

5 years ago; Add comment in tramp-archive.el
Michael Albinus [Sat, 18 May 2019 09:11:23 +0000 (11:11 +0200)]
; Add comment in tramp-archive.el

5 years agoRemove usage of string-as-unibyte in arc-mode
Eli Zaretskii [Sat, 18 May 2019 08:02:25 +0000 (10:02 +0200)]
Remove usage of string-as-unibyte in arc-mode

* lisp/arc-mode.el (archive-l-e): Encode with utf-8-emacs-unix
instead of using string-as-unibyte.

5 years agoFix visiting and saving UTF-16 encoded XML files
Eli Zaretskii [Sat, 18 May 2019 07:15:19 +0000 (10:15 +0300)]
Fix visiting and saving UTF-16 encoded XML files

* lisp/international/mule.el (sgml-xml-auto-coding-function):
When the 'enncoding' tag specifies a UTF-16 encoding, enforce
saving the buffer with BOM, per the XML spec.
(xml-find-file-coding-system): Recognize UTF-16 encodings with
BOM.  (Bug#35766)  (Bug#8282)
* lisp/international/mule-cmds.el (select-safe-coding-system):
Don't consider UTF-16 encodings with and without BOM as
"different", so as not to annoy users with redundant questions
about mismatch between the XML/SGML header and the selected
explicit encoding.

5 years agoMitigate byte-compile warning in arc-mode
Lars Ingebrigtsen [Sat, 18 May 2019 05:47:32 +0000 (07:47 +0200)]
Mitigate byte-compile warning in arc-mode

* lisp/arc-mode.el (byte-after): Remove defsubst.
Replace all calls to byte-after with get-byte throughout the file,
because byte-after gave compilation warnings.

5 years ago(hexl-insert-multibyte-char): Avoid using `string-as-unibyte'
Eli Zaretskii [Sat, 18 May 2019 05:08:02 +0000 (07:08 +0200)]
(hexl-insert-multibyte-char): Avoid using `string-as-unibyte'

* lisp/hexl.el (hexl-insert-multibyte-char): Avoid using
`string-as-unibyte' in the fallback case.

5 years ago(dirtrack-toggle, dirtrackp): Remove obsolete aliases
Lars Ingebrigtsen [Fri, 17 May 2019 15:37:35 +0000 (17:37 +0200)]
(dirtrack-toggle, dirtrackp): Remove obsolete aliases

* lisp/dirtrack.el (dirtrack-toggle, dirtrackp): Remove
function/variable aliases declared obsolete in Emacs 23.1 (and
that issued a byte-compile warning).

5 years agoClean up and simplify image-type setup
Paul Eggert [Sat, 18 May 2019 01:41:22 +0000 (18:41 -0700)]
Clean up and simplify image-type setup

This also fixes an unlikely hang involving a circular image
description.
* src/dispextern.h (struct image.type): Now pointer-to-const.
* src/image.c (struct image_type.init) [!WINDOWSNT]: Omit.
(IMAGE_TYPE_INIT): New macro.
(image_types): Now a small array-of-const, not a pointer.
(CACHE_IMAGE_TYPE): Remove; the code’s simpler without it.
(ADD_IMAGE_TYPE): Remove this macro, replacing with ...
(add_image_type): ... this equivalent function.  All uses changed.
(define_image_type): Remove.  All uses removed.
(valid_image_p): Use FOR_EACH_TAIL_SAFE to avoid Emacs hanging
if the user creates a circular description of an image.
(xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
(gif_type, imagemagick_type, svg_type, gs_type):
Remove; now done by image_types.
(init_imagemagick_functions): Remove decl of nonexistent function.
(gs_clear_image): Remove; all uses replaced by image_clear_image.
(initialize_image_type): New function, which captures a lot
of the previously-scattered WINDOWSNT ifdefs.
(lookup_image_type): Use it.
(reset_image_types): Remove.  All uses removed.
(syms_of_image): Don’t worry about ignoring image_types for
pdumper, since it’s a constant now.

5 years ago* lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var
Stefan Monnier [Fri, 17 May 2019 18:42:36 +0000 (14:42 -0400)]
* lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var

The recent change to use lexical-binding introduced a bug because
gnus-summary-line-format-alist refers to variable `thread` which is now
lexical and hence not available there any more.  Replace it with
a dynamically scoped var `gnus-tmp-thread` as was already done with
all other vars.

(gnus-summary-line-format-alist): Use it instead of `thread`.
(gnus-summary-prepare-threads): Bind it around call to (eval
gnus-summary-line-format-spec).

5 years agoMove Info-edit-* commands from info.el to obsolete/info-edit.el
Lars Ingebrigtsen [Fri, 17 May 2019 11:55:43 +0000 (13:55 +0200)]
Move Info-edit-* commands from info.el to obsolete/info-edit.el

* lisp/info.el: Move Info-edit-* commands to obsolete/info-edit.el.

* lisp/obsolete/info-edit.el: New file.

5 years agoUse cl-assert instead of assert in ps-print.el
Lars Ingebrigtsen [Fri, 17 May 2019 10:27:26 +0000 (12:27 +0200)]
Use cl-assert instead of assert in ps-print.el

* lisp/ps-print.el (ps-begin-job): Use cl-assert instead of assert
and require cl-lib.

5 years ago(ps-begin-job): Remove two unneeded string-as-unibyte calls
Lars Ingebrigtsen [Fri, 17 May 2019 10:16:19 +0000 (12:16 +0200)]
(ps-begin-job): Remove two unneeded string-as-unibyte calls

* lisp/ps-print.el (ps-begin-job): Remove two unneeded
string-as-unibyte calls to avoid byte compilation warnings.

5 years agoFix a recent commit in select.el
Eli Zaretskii [Fri, 17 May 2019 08:01:20 +0000 (11:01 +0300)]
Fix a recent commit in select.el

* lisp/select.el (gui-get-selection): Revert a recent
incorrect change.  Add a comment explaining what we are trying
to do with C_STRING and why.
(xselect--encode-string): Add a comment explaining what we are
trying to do with C_STRING and why.

5 years agoRemove obsolete example functions from imenu.el
Lars Ingebrigtsen [Fri, 17 May 2019 04:53:58 +0000 (06:53 +0200)]
Remove obsolete example functions from imenu.el

* lisp/imenu.el (imenu-example--create-c-index)
(imenu-example--function-name-regexp-c)
(imenu-example--create-lisp-index)
(imenu-example--lisp-extract-index-name): Remove functions (and
internal variables used by those functions) declared obsolete in
Emacs 23.2.  The functions gave compilation warnings.

5 years agoRemove unused internal function completion-pcm--optimize-pattern
Lars Ingebrigtsen [Fri, 17 May 2019 04:21:37 +0000 (06:21 +0200)]
Remove unused internal function completion-pcm--optimize-pattern

* lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove
unused internal function (that signalled a compilation warning).

5 years ago* lisp/gnus: Remove assumptions about mail-header being a vector
Stefan Monnier [Fri, 17 May 2019 04:09:16 +0000 (00:09 -0400)]
* lisp/gnus: Remove assumptions about mail-header being a vector

Use `mail-header-p` and `make-full-mail-header` instead of `vectorp` and
`vector`, respectively.

* lisp/gnus/message.el (message-cite-original-1, message-reply)
(message-followup):
* lisp/gnus/gnus-sum.el (gnus-get-newsgroup-headers):
Use make-full-mail-header instead of `vector`.
(gnus--dummy-mail-header): New const, using make-full-mail-header.
(gnus-update-summary-mark-positions): Use it instead of
an immediate vector.
(gnus-set-mode-line, gnus-summary-article-pseudo-p)
(gnus-summary-article-subject, gnus-summary-insert-subject)
(gnus-summary-find-subject, gnus-summary-goto-subject)
(gnus-summary-limit-to-age, gnus-summary-find-matching)
(gnus-summary-mark-article-as-unread, gnus-summary-mark-article)
(gnus-summary-save-article):
* lisp/gnus/gnus.el (gnus-news-group-p): Use mail-header-p instead
of vectorp.

5 years agoDeclare fileloop-continue in dired-aux to avoid warning
Lars Ingebrigtsen [Fri, 17 May 2019 04:07:00 +0000 (06:07 +0200)]
Declare fileloop-continue in dired-aux to avoid warning

* lisp/dired-aux.el (fileloop-continue): Declare to avoid
compilation warning.  `fileloop-initialize-search' (used before
-continue) will load fileloop.el.

5 years agoAvoind string-as-multibyte in ps-output-string-prim
Lars Ingebrigtsen [Fri, 17 May 2019 04:00:22 +0000 (06:00 +0200)]
Avoind string-as-multibyte in ps-output-string-prim

* lisp/ps-print.el (ps-output-string-prim): Avoid
`string-as-multibyte', and encode as utf-8 instead if multibyte.

5 years ago(gui-get-selection): Avoid using `string-to-multibyte'
Lars Ingebrigtsen [Fri, 17 May 2019 03:42:12 +0000 (05:42 +0200)]
(gui-get-selection): Avoid using `string-to-multibyte'

* lisp/select.el (gui-get-selection): Avoid using
`string-to-multibyte' -- instead encode as `eight-bit' if the
string is unibyte.

5 years agoDeclare two w32 functions to avoid byte compilation warnings
Lars Ingebrigtsen [Fri, 17 May 2019 03:18:12 +0000 (05:18 +0200)]
Declare two w32 functions to avoid byte compilation warnings

* lisp/w32-fns.el (w32-version, w32-read-registry): Declare these
functions to avoid byte compilation warnings.  The functions
should be loaded when `w32--os-description' is called, as far as I
can tell.

5 years agoRemove obsolete epg functions
Lars Ingebrigtsen [Fri, 17 May 2019 02:47:31 +0000 (04:47 +0200)]
Remove obsolete epg functions

* lisp/epg.el (epg-start-sign-keys, epg-sign-keys): Remove
functions declared obsolete since Emacs 23.1.

5 years agoDeclare rectangle functions in mouse.el to avoid warnings
Lars Ingebrigtsen [Fri, 17 May 2019 02:22:08 +0000 (04:22 +0200)]
Declare rectangle functions in mouse.el to avoid warnings

* lisp/mouse.el (rectangle-dimensions)
(rectangle-position-as-coordinates, rectangle-intersect-p):
Declare these functions from rect.el to avoid compilation warnings.

5 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix docstring of accessors.
Stefan Monnier [Fri, 17 May 2019 02:00:57 +0000 (22:00 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix docstring of accessors.

5 years ago* lisp/gnus/nnheader.el (mail-header-*): Define via cl-defstruct
Stefan Monnier [Fri, 17 May 2019 01:50:16 +0000 (21:50 -0400)]
* lisp/gnus/nnheader.el (mail-header-*): Define via cl-defstruct

This also has the side effect that the accessors are now defined as proper
functions rather than as macros, so they can be passed to `mapcar` etc..

* lisp/gnus/nnheader.el (mail-header-number, mail-header-subject)
(mail-header-from, mail-header-date, mail-header-id)
(mail-header-references, mail-header-chars, mail-header-lines)
(mail-header-xref, mail-header-extra): Define via cl-defstruct.
(mail-header-set-number, mail-header-set-subject)
(mail-header-set-from, mail-header-set-date, mail-header-set-id)
(mail-header-set-message-id, mail-header-set-references)
(mail-header-set-chars, mail-header-set-lines, mail-header-set-xref)
(mail-header-set-extra): Remove, use `setf` instead.  All callers adjusted.

* lisp/gnus/gnus-sum.el (gnus-select-newsgroup)
(gnus-summary-pop-limit, gnus-summary-limit-mark-excluded-as-read)
(gnus-summary-find-matching, gnus-find-matching-articles):
* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal, gnus-execute):
* lisp/gnus/gnus-score.el (gnus-score-adaptive):
Eta-reduce, now that mail-header-FIELD are functions.

5 years agoFix ffap behavior in the Gnus group buffer (bug#35693)
Katsumi Yamaoka [Fri, 17 May 2019 01:34:47 +0000 (01:34 +0000)]
Fix ffap behavior in the Gnus group buffer (bug#35693)

* lisp/ffap.el (ffap-file-exists-string, ffap-file-at-point):
Don't recognize "" as a path or a file name (bug#35693).

5 years ago* mule.el (set-buffer-file-coding-system): Don't burp on iso-2022-7bit
Stefan Monnier [Fri, 17 May 2019 00:49:06 +0000 (20:49 -0400)]
* mule.el (set-buffer-file-coding-system): Don't burp on iso-2022-7bit

5 years agoMake `package' not "uninhibit" messages (Bug#34037)
Paul Pogonyshev [Thu, 10 Jan 2019 19:39:54 +0000 (20:39 +0100)]
Make `package' not "uninhibit" messages (Bug#34037)

* lisp/emacs-lisp/package.el: Don't let-bind inhibit-message to a
different value if it was non-nil.

5 years agoFix gnus-summary-expand-window placement of point
Basil L. Contovounesios [Tue, 7 May 2019 12:46:22 +0000 (13:46 +0100)]
Fix gnus-summary-expand-window placement of point

* lisp/gnus/gnus-win.el (gnus-configure-frame): Replace
switch-to-buffer with pop-to-buffer-same-window to avoid messing
with point. (bug#35613)

5 years agoAdd docstring to project--read-file-cpd-relative
Basil L. Contovounesios [Thu, 16 May 2019 22:26:27 +0000 (23:26 +0100)]
Add docstring to project--read-file-cpd-relative

For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00460.html
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Describe arglist as promised by user option
project-read-file-name-function.

5 years ago* cl-macs-tests.el (cl-macs-test--symbol-macrolet): New test
Stefan Monnier [Thu, 16 May 2019 21:16:36 +0000 (17:16 -0400)]
* cl-macs-tests.el (cl-macs-test--symbol-macrolet): New test

5 years agoFix stray call to make-vector
Eric Abrahamsen [Thu, 16 May 2019 19:47:18 +0000 (12:47 -0700)]
Fix stray call to make-vector

* lisp/gnus/gnus-agent.el (gnus-agent-fetch-group-1): This is meant to
  be a hash table.

5 years ago* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand) <setq>: Rewrite
Stefan Monnier [Thu, 16 May 2019 19:29:36 +0000 (15:29 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand) <setq>: Rewrite

The previous code had 2 problems:
- It converted `setq` to `setf` in unrelated cases such as
  (cl-symbol-macrolet ((x 1)) (setq (car foo) bar))
- It macroexpanded places before `setf` had a chance to see if they
  have a gv-expander.

5 years agoDistribute test cases in tarballs by default
Paul Eggert [Thu, 16 May 2019 17:42:27 +0000 (10:42 -0700)]
Distribute test cases in tarballs by default

* INSTALL, INSTALL.REPO, admin/make-tarball.txt:
Mention ‘make check’.
* configure.ac: Update comment.
* etc/NEWS: Say that tarballs have a test directory.
* make-dist (with_tests): Default to "yes".
Add an option --no-tests to make it "no".

5 years agoMake shr-rescale-image respect get-buffer-window again
Lars Ingebrigtsen [Thu, 16 May 2019 11:38:11 +0000 (13:38 +0200)]
Make shr-rescale-image respect get-buffer-window again

* lisp/net/shr.el (shr-rescale-image): Partially revert previous
change -- ressurrect the check for `get-buffer-window'.

5 years agoImprove user convenience of the rcirc debug buffer
Ivan Shmakov [Fri, 14 Sep 2018 19:05:12 +0000 (19:05 +0000)]
Improve user convenience of the rcirc debug buffer

* lisp/net/rcirc.el (rcirc-debug): Ignore rcirc-debug-buffer read-only
status.  Restore point after insertion unless it was at the end.
Ensure a newline before each [lead].  Replace %Y-%m-%d with the
equivalent %F in format-time-string; remove useless concat.  (Bug#32470)