]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoModernize INSTALL a bit
Paul Eggert [Fri, 3 May 2019 20:58:09 +0000 (13:58 -0700)]
Modernize INSTALL a bit

* INSTALL: Omit filesystem space estimates.  These estimates
were (1) wrong and (2) no longer important nowadays, as people
have plenty of space.  Instead, start with how to get and
unpack an Emacs tarball.  Don’t say "disk" as it’s often not
disk nowadays.  Update URLs.

5 years agoSimplify use of NDEBUG in etags.c
Paul Eggert [Fri, 3 May 2019 19:38:28 +0000 (12:38 -0700)]
Simplify use of NDEBUG in etags.c

* lib-src/etags.c [!DEBUG]: Do not define NDEBUG,
as that’s conf_post.h’s job now.
[NDEBUG]: Do not redefine ‘assert’, as that works around
ancient bugs (e.g., sunos4 pcc) that don’t matter any more,
as can be seen that other Emacs source files that successfully
use assert.h without this workaround.

5 years agoPacify librsvg 2.45.1 and later
Paul Eggert [Fri, 3 May 2019 19:16:33 +0000 (12:16 -0700)]
Pacify librsvg 2.45.1 and later

* src/image.c (svg_load_image): Pacify librsvg 2.45.1 and later,
and add a FIXME comment about the deprecated librsvg functions.

5 years agoSimplify xd_signature to pacify GCC 9
Paul Eggert [Fri, 3 May 2019 19:14:38 +0000 (12:14 -0700)]
Simplify xd_signature to pacify GCC 9

* src/dbusbind.c (xd_signature): Use simpler way to set up
the subsignature.  This also pacifies GCC 9 on Fedora 30 x86-64.

5 years agoUpdate from Gnulib
Paul Eggert [Fri, 3 May 2019 19:12:43 +0000 (12:12 -0700)]
Update from Gnulib

This incorporates:
2019-05-03 Port manywarnings to GCC 9
* m4/manywarnings.m4: Copy from Gnulib.

5 years agoAdd tests for remote files in auto-revert-tests
Michael Albinus [Fri, 3 May 2019 15:18:13 +0000 (17:18 +0200)]
Add tests for remote files in auto-revert-tests

* lisp/autorevert.el (auto-revert-debug): New defvar.
(auto-revert-notify-handler): Write traces.

* lisp/filenotify.el (file-notify-debug): New defvar.
(file-notify-handle-event, file-notify-callback): Write traces.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
Handle nil `vc-handled-backends'.

* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): New defconst.
Handle also $REMOTE_FILE_NOTIFY_LIBRARY.
(auto-revert--test-enabled-remote-checked): New defvar.
(auto-revert--test-enabled-remote): New defun.
(auto-revert--wait-for-revert): Rewrite without timeout.
(auto-revert--deftest-remote): New defmacro.
(auto-revert-test01-auto-revert-several-files):
(auto-revert-test02-auto-revert-deleted-file): Adapt for remote files.
(auto-revert-test02-auto-revert-deleted-file):
Use `auto-revert-debug' for debug messages.
(auto-revert-test00-auto-revert-mode-remote)
(auto-revert-test01-auto-revert-several-files-mode-remote)
(auto-revert-test02-auto-revert-deleted-file-mode-remote)
(auto-revert-test03-auto-revert-tail-mode-mode-remote)
(auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests.

* test/lisp/filenotify-tests.el (file-notify--test-event-handler):
Use `file-notify-debug' for debug messages.

5 years agoFix Gnus inline attachment decoding (bug#35507)
Basil L. Contovounesios [Thu, 2 May 2019 21:06:02 +0000 (22:06 +0100)]
Fix Gnus inline attachment decoding (bug#35507)

Proposed by Andy Moreton <andrewjmoreton@gmail.com>
and Noam Postavsky <npostavs@gmail.com>.
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Always decode
handle text, falling back on 'undecided' coding system.

5 years ago* lisp/server.el: Cosmetic changes
Stefan Monnier [Fri, 3 May 2019 13:49:38 +0000 (09:49 -0400)]
* lisp/server.el: Cosmetic changes

Remove redundant :group args.
(server-temp-file-regexp): Fix ^$ to  \`\'.

5 years agoImprove documentation of 'isearch-regexp-function'
Eli Zaretskii [Fri, 3 May 2019 09:22:55 +0000 (12:22 +0300)]
Improve documentation of 'isearch-regexp-function'

* lisp/isearch.el (isearch-regexp-function): Doc fix.
(Bug#35498)

5 years ago; Fix declaration in tramp-compat.el
Michael Albinus [Fri, 3 May 2019 08:05:15 +0000 (10:05 +0200)]
; Fix declaration in tramp-compat.el

5 years agoRefactor update_window_begin and update_window_end hooks
Alexander Gramiak [Sat, 27 Apr 2019 21:00:13 +0000 (15:00 -0600)]
Refactor update_window_begin and update_window_end hooks

Bug#35464.

* src/dispnew.c (gui_update_window_begin, gui_update_window_end): New
procedures implementing common functionality.

* src/nsterm.m: (ns_update_window_begin, ns_update_window_end):
* src/xterm.c: (x_update_window_begin, x_update_window_end): Remove in
favor of only using the new generic versions.

* src/w32term.c: (w32_update_window_begin, w32_update_window_end):
Remove duplicated and unused code.

5 years agoxref--find-ignores-arguments: Return "" if IGNORES is nil
Dmitry Gutov [Thu, 2 May 2019 23:48:44 +0000 (02:48 +0300)]
xref--find-ignores-arguments: Return "" if IGNORES is nil

5 years agoAllow project-find-regexp'ing inside an ignored dir
Dmitry Gutov [Thu, 2 May 2019 22:52:05 +0000 (01:52 +0300)]
Allow project-find-regexp'ing inside an ignored dir

* lisp/progmodes/project.el (project-find-regexp): Don't pass
project's ignores to project--files-in-directory.  The FILES glob
should be enough, and we don't want to prohibit searching inside
ignored directories this way (it can be counter-intuitive).

5 years ago(xref--mouse-2): Fix not to jump to the next line
Dmitry Gutov [Thu, 2 May 2019 22:47:15 +0000 (01:47 +0300)]
(xref--mouse-2): Fix not to jump to the next line

* lisp/progmodes/xref.el (xref--mouse-2): Fix not to jump to the
next line.

5 years agoFix an "empty identifier" problem
Dmitry Gutov [Thu, 2 May 2019 22:29:59 +0000 (01:29 +0300)]
Fix an "empty identifier" problem

* lisp/progmodes/xref.el (xref--read-identifier): Abort on empty
input if there is no default
(https://lists.gnu.org/archive/html/help-gnu-emacs/2019-05/msg00012.html).

5 years agoFix fontification of first item in CC Mode macro without parentheses
Alan Mackenzie [Thu, 2 May 2019 20:53:47 +0000 (20:53 +0000)]
Fix fontification of first item in CC Mode macro without parentheses

* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Handle the new
matching possibility (of a #define construct) in the new
c-decl-prefix-or-start-re.
(c-find-decl-spots): Allow the initial search for an in-macro starting point
settle on the # of #define, to facilitate the regexp matching in
c-find-decl-prefix-search.

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): New lang
const.
(c-literal-start-regexp): Correct what was always supposed to be a "generic
string" regexp element.
(c-decl-prefix-or-start-re): Enhance also to match "#define <identifier>".
(c-dposr-cpp-macro-depth): New lang variable and lang constant.

5 years ago* lisp/mail/footnote.el: Add TEXT and POINTERS together
Stefan Monnier [Thu, 2 May 2019 15:00:20 +0000 (11:00 -0400)]
* lisp/mail/footnote.el: Add TEXT and POINTERS together

Rather than adding POINTERS and TEXT separately to footnote--markers-alist,
add them together, so we don't need footnote--first-text-marker because
the TEXT part is never nil.

(footnote--insert-numbered-footnote): Return marker.
(footnote--insert-text-marker, footnote--insert-pointer-marker):
Delete functions.
(footnote--insert-markers): New function to replace them.
(footnote--insert-footnote): Adjust accordingly.
Simplify pointless `unless`.
(footnote--first-text-marker): Remove.  Replace all calls by
(cadr (car footnote--markers-alist)) or just footnote--markers-alist.

5 years agoCC Mode: Fix multiline block comments in macros.
Alan Mackenzie [Thu, 2 May 2019 14:30:29 +0000 (14:30 +0000)]
CC Mode: Fix multiline block comments in macros.

In particulr, handle multiline block comments whose newlines are not escaped.
There is an example of this in #define EXTRA_CONTEXT_FIELDS in editfns.c.

* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Enclose
the loops scanning escaped newlines with outer loops which check
heuristically for, respectively, a block comment ender and a block comment
starter on the lines we end up on.  (A rigorous syntactic check would be too
slow, here.)

* lisp/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
(c-last-open-c-comment-start-on-line-re): New language constants/variables.

5 years ago* lisp/mail/footnote.el: Tweak markers convention
Stefan Monnier [Thu, 2 May 2019 14:27:42 +0000 (10:27 -0400)]
* lisp/mail/footnote.el: Tweak markers convention

Instead of using markers that are sometimes before and sometimes after
the [...] and using `insert-before-markers` to make sure those that are
are before stay before, always place them before, and make them
"move after"so they stay with their [...] without the need for
insert-before-markers.

(footnote--current-regexp): Add arg to match previous style.
Include the start/end "tags" in the regexp.  Adjust all callers.
(footnote--markers-alist): Change position of POINTERS.
(footnote--refresh-footnotes, footnote--renumber)
(footnote--make-hole, footnote-delete-footnote)
(footnote-back-to-message): Adjust accordingly, mostly by using
`looking-at` instead of `looking-back`.
(footnote--make-hole): Always return footnote nb to use.
(footnote-add-footnote): Simplify call accordingly.

* test/lisp/mail/footnote-tests.el: New file.

5 years agouse view-mode on score file for ease of scrolling and quitting
Sam Steingold [Thu, 2 May 2019 14:17:56 +0000 (10:17 -0400)]
use view-mode on score file for ease of scrolling and quitting

5 years agotetris-null-map: bind "q" to `quit-window`
Sam Steingold [Thu, 2 May 2019 14:17:04 +0000 (10:17 -0400)]
tetris-null-map: bind "q" to `quit-window`

5 years agoSmall code clean-up of file-notify-add-watch
Mattias Engdegård [Mon, 29 Apr 2019 14:42:04 +0000 (16:42 +0200)]
Small code clean-up of file-notify-add-watch

* lisp/filenotify.el (file-notify-add-watch):
Clearly separate backend-specific code from the rest, and simplify.
(file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
(file-notify--add-watch-w32notify, file-notify--add-watch-gfilenotify):
New functions.

5 years ago* lisp/mail/footnote.el: Use dolist and hoist regexps out of loops
Stefan Monnier [Thu, 2 May 2019 13:00:53 +0000 (09:00 -0400)]
* lisp/mail/footnote.el: Use dolist and hoist regexps out of loops

(footnote--refresh-footnotes): Use pcase-dolist; compute regexp once
outside of the loops.  Use less confusing `literal` arg to `replace-match`
and specify `fixedcase` since footnote--index-to-string already chose
the proper case for us.
(footnote--renumber): Use dolist; compute regexp once
outside of the loops; shortcircuit when number is unchanged.
(footnote--text-under-cursor): Rewrite.
(footnote--make-hole): Use dolist.
(footnote-add-footnote): CSE.
(footnote-delete-footnote): Use dolist; compute regexp once
outside of the loop.
(footnote-delete-footnote): Don't renumber if there's no footnote left.
(footnote-renumber-footnotes): Use dolist.

5 years agoFix tramp-compat-file-name-quoted-p
Michael Albinus [Thu, 2 May 2019 07:51:41 +0000 (09:51 +0200)]
Fix tramp-compat-file-name-quoted-p

* lisp/net/tramp-compat.el (tramp-compat-file-local-name)
(tramp-compat-file-name-quoted-p): Declare them.
(top): Do not use `eval-and-compile'.
(tramp-compat-file-name-quoted-p): Check also func-arity of
`file-name-quoted-p'.

5 years ago* lisp/mail/footnote.el: Consolidate the two marker-alists
Stefan Monnier [Wed, 1 May 2019 21:53:39 +0000 (17:53 -0400)]
* lisp/mail/footnote.el: Consolidate the two marker-alists

Consolidate footnote-text-marker-alist and footnote-pointer-marker-alist
into a single footnote--markers-alist.

(footnote--markers-alist): New var.
(footnote-text-marker-alist, footnote-pointer-marker-alist): Delete vars.
(footnote--refresh-footnotes, footnote--text-under-cursor)
(footnote--calc-fn-alignment-column, footnote-add-footnote)
(footnote-goto-footnote, footnote-back-to-message): Adjust accordingly.
(footnote--make-hole, footnote-delete-footnote)
(footnote-renumber-footnotes): Simplify accordingly.
(footnote-cycle-style): Indicate style name in echo area.
(footnote--renumber): Take a single `alist-elem` arg instead of
`pointer-alist` and `text-alist`.
(footnote--insert-text-marker, footnote--insert-pointer-marker):
Add to footnote--markers-alist instead.
(footnote--first-text-marker): New function.
(footnote--get-area-point-min): Use it.
footnote--goto-first): New function.
(footnote--insert-footnote): Use it.
(footnote-style-number): Use defvar-local.

5 years ago* lisp/mail/footnote.el: Minor simplifications
Stefan Monnier [Wed, 1 May 2019 17:14:31 +0000 (13:14 -0400)]
* lisp/mail/footnote.el: Minor simplifications

Remove redundant :group args.
(footnote-mode-hook): Let define-minor-mode define it.
(footnote--style-p): Delete function.
(footnote--index-to-string): Inline it instead, and simplify.
(footnote-cycle-style): Use a pointer into the alist as the "index"
instead of a number.
(footnote-set-style): Use footnote-style-alist as the completion table.
Prefer `assq` over `footnote--assoc-index`.
(footnote--assoc-index): Delete function.
(footnote--renumber): Remove first (unused) argument; Adjust all callers.
(footnote--sort): Use car-less-than-car.

5 years agoRestore previous calling signature of gnus-set-info
Lars Ingebrigtsen [Wed, 1 May 2019 17:04:36 +0000 (19:04 +0200)]
Restore previous calling signature of gnus-set-info

5 years ago* lisp/emacs-lisp/edebug.el: Better handle instrumentation of `end-of-defun`
Stefan Monnier [Wed, 1 May 2019 16:45:37 +0000 (12:45 -0400)]
* lisp/emacs-lisp/edebug.el: Better handle instrumentation of `end-of-defun`

Remove redundant :group args.
(edebug-read-top-level-form): Let-bind edebug-active.
(edebug-active): Move before this new first use.

5 years ago* lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function
Stefan Monnier [Wed, 1 May 2019 16:37:48 +0000 (12:37 -0400)]
* lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function

5 years ago; * etc/NEWS: Fix position of +++ marker
Basil L. Contovounesios [Wed, 1 May 2019 13:51:37 +0000 (14:51 +0100)]
; * etc/NEWS: Fix position of +++ marker

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 May 2019 13:27:17 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.

5 years agoMinor region-noncontiguous-p simplification
Basil L. Contovounesios [Tue, 30 Apr 2019 23:39:54 +0000 (00:39 +0100)]
Minor region-noncontiguous-p simplification

* lisp/simple.el (region-noncontiguous-p): Don't needlessly traverse
region-bounds.

5 years ago* lisp/progmodes/cc-engine.el: Silence minor compiler warnings
Stefan Monnier [Tue, 30 Apr 2019 18:56:29 +0000 (14:56 -0400)]
* lisp/progmodes/cc-engine.el: Silence minor compiler warnings

(c-restricted-<>-arglists, c-parse-and-markup-<>-arglists):
Move declaration before first use.
(c-after-change-unmark-raw-strings): Remove unused var `found-end`.

5 years agoFix decode-time/encode-time roundtrip on macOS
Paul Eggert [Tue, 30 Apr 2019 17:45:48 +0000 (10:45 -0700)]
Fix decode-time/encode-time roundtrip on macOS

* src/timefns.c (Fencode_time): Ignore DST flag when the zone is
numeric or is a cons, as the doc string says it’s ignored in that
case, and not ignoring it causes encode-time to not invert
decode-time on some platforms (Bug#35502).
* test/src/timefns-tests.el (encode-time-dst-numeric-zone):
New test.

5 years ago* lisp/progmodes/cc-fonts.el: Silence some compiler warnings
Stefan Monnier [Tue, 30 Apr 2019 17:42:44 +0000 (13:42 -0400)]
* lisp/progmodes/cc-fonts.el: Silence some compiler warnings

(c-font-lock-declarators): Mark `id_end` and `not-top` as unused.

5 years agoUpdate from Gnulib
Paul Eggert [Tue, 30 Apr 2019 16:44:38 +0000 (09:44 -0700)]
Update from Gnulib

* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/mktime-internal.h, lib/mktime.c, lib/timegm.c:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years ago* lisp/autorevert.el (auto-revert-avoid-polling): Fix :set form.
Mattias Engdegård [Tue, 30 Apr 2019 13:53:56 +0000 (15:53 +0200)]
* lisp/autorevert.el (auto-revert-avoid-polling): Fix :set form.

5 years agoCC Mode: in certain font lock loops, check point is not beyond limit.
Alan Mackenzie [Tue, 30 Apr 2019 13:20:22 +0000 (13:20 +0000)]
CC Mode: in certain font lock loops, check point is not beyond limit.

* /lisp/progmodes/cc-fonts.el (c-font-lock-enum-body)
(autodoc-font-lock-line-markup): As part of the `while' condition, check that
the previous iteration of the loop hasn't moved point past `limit', thus
obviating "wrong side of point" errors in re-search-forward, etc.

5 years agoDon't poll auto-revert files that use notification (bug#35418)
Mattias Engdegård [Wed, 24 Apr 2019 16:39:05 +0000 (18:39 +0200)]
Don't poll auto-revert files that use notification (bug#35418)

It is a waste to periodically poll files that use change notification
in auto-revert mode; stop doing that.  If no files need polling,
turn off the periodic execution entirely to further avoid wasting power.
Use a timer to inhibit immediate reversion for some time after a
notification, for throttling.

This change does not apply to files in global-auto-revert-mode, where
polling is still necessary.  It is disabled by default, and enabled by
setting `auto-revert-avoid-polling' to non-nil.

* lisp/autorevert.el
(toplevel): Require cl-lib.
(auto-revert-avoid-polling, auto-revert--polled-buffers)
(auto-revert--need-polling-p, auto-revert--lockout-interval)
(auto-revert--lockout-timer, auto-revert--end-lockout): New.
(global-auto-revert-mode): Keep notifiers for buffers in auto-revert mode.
(auto-revert-set-timer): Use auto-revert--need-polling-p.
(auto-revert-notify-handler): Restart polling if notification stopped.
Use new lockout timer.
(auto-revert-buffers):
Use auto-revert--polled-buffers and auto-revert--need-polling-p.
(auto-revert-buffers-counter, auto-revert-buffers-counter-lockedout):
Remove.

* etc/NEWS (Changes in Specialized Modes and Packages):
Describe the new auto-revert-avoid-polling variable.

* doc/emacs/files.texi (Reverting):
Add paragraph describing auto-revert-avoid-polling.

5 years agoRefrain from splicing anonymous faces in text properties
Stefan Monnier [Mon, 29 Apr 2019 21:29:47 +0000 (17:29 -0400)]
Refrain from splicing anonymous faces in text properties

* lisp/font-lock.el (font-lock-prepend-text-property): Distinguish
list of faces from property lists.
(font-lock-ensure-function): Remove redundant code.

5 years ago* lisp/international/mule-util.el: Avoid setq; clarify meaning of -1.
Stefan Monnier [Mon, 29 Apr 2019 20:32:52 +0000 (16:32 -0400)]
* lisp/international/mule-util.el: Avoid setq; clarify meaning of -1.

5 years agoSync latest SKK-JISYO.L
Paul Eggert [Mon, 29 Apr 2019 19:56:44 +0000 (12:56 -0700)]
Sync latest SKK-JISYO.L

Problem reported by Tsuyoshi Kitamoto (Bug#35442).
* leim/SKK-DIC/README: Update to current URL.
* leim/SKK-DIC/SKK-JISYO.L: Sync to current upstream version.

5 years agoDisable __attribute__ ((cold)) on MinGW
Paul Eggert [Mon, 29 Apr 2019 19:27:04 +0000 (12:27 -0700)]
Disable __attribute__ ((cold)) on MinGW

* src/conf_post.h (ATTRIBUTE_COLD) [__MINGW32__]:
Define to empty on this platform.

5 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 29 Apr 2019 16:12:53 +0000 (09:12 -0700)]
Merge from origin/emacs-26

c26d452 (origin/emacs-26) * src/macfont.m (macfont_shape): Use conven...
140e7f8 Recommend using font-lock-face over face (Bug#35044)
7cb5364 Check if mouse_face_overlay was deleted (Bug#35273)

# Conflicts:
# src/macfont.m

5 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 29 Apr 2019 16:08:19 +0000 (09:08 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

531c74e Port to platforms where tputs is in libtinfow

5 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 29 Apr 2019 16:08:19 +0000 (09:08 -0700)]
Merge from origin/emacs-26

0e8d452 ; * doc/lispref/nonascii.texi (Coding System Basics): Fix gra...
25a2ff7 ; Add missing space in custom.texi
9ec18fb * admin/admin.el (set-version): Check for increase in version...
93912ba Be more careful about indent-sexp going over eol (Bug#35286)

5 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 29 Apr 2019 16:08:18 +0000 (09:08 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

3988e93 Backport: Improve pure and side-effect-free docs
7565d2d Backport: Avoid using obsolete indent-relative-maybe

5 years agoReplace ‘/* FALLTHROUGH! */’ with ‘break;’
Paul Eggert [Mon, 29 Apr 2019 15:39:34 +0000 (08:39 -0700)]
Replace ‘/* FALLTHROUGH! */’ with ‘break;’

* src/data.c (set_internal, set_default_internal):
Replace obsolescent /* FALLTHROUGH! */ comments with ‘break;’,
as ‘FALLTHROUGH;’ is not needed here.

5 years ago* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Instrument.
Michael Albinus [Mon, 29 Apr 2019 15:24:53 +0000 (17:24 +0200)]
* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Instrument.

5 years agoAvoid compilation warnings in w32.c
Eli Zaretskii [Mon, 29 Apr 2019 15:18:51 +0000 (18:18 +0300)]
Avoid compilation warnings in w32.c

* src/w32.c (unsetenv, readlink): Use memcpy instead of
strncpy, to avoid a compiler warning about calculating the
bound of the copy.

5 years ago* src/macfont.m (macfont_shape): Use convenient LGLYPH_NEW.
YAMAMOTO Mitsuharu [Sun, 28 Apr 2019 22:31:45 +0000 (07:31 +0900)]
* src/macfont.m (macfont_shape): Use convenient LGLYPH_NEW.

5 years agoRecommend using font-lock-face over face (Bug#35044)
Noam Postavsky [Fri, 19 Apr 2019 04:55:14 +0000 (00:55 -0400)]
Recommend using font-lock-face over face (Bug#35044)

* doc/lispref/modes.texi (Precalculated Fontification): Explain
advantages of using font-lock-face over face.

5 years agoReplace use of obsolete string-make-unibyte
Noam Postavsky [Sun, 28 Apr 2019 20:29:44 +0000 (16:29 -0400)]
Replace use of obsolete string-make-unibyte

* lisp/image-file.el (insert-image-file): Use encode-coding-region
instead of string-make-unibyte.
* test/lisp/image-file-tests.el: New test.

5 years ago; Add test for previous change
Noam Postavsky [Sat, 20 Apr 2019 19:31:51 +0000 (15:31 -0400)]
; Add test for previous change

* test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren):
New test.

5 years agopython.el: Fix close paren indentation to match pep8 (Bug#20742)
Tommi Komulainen [Fri, 19 Jun 2015 16:53:52 +0000 (18:53 +0200)]
python.el: Fix close paren indentation to match pep8 (Bug#20742)

* lisp/progmodes/python.el (python-indent--calculate-indentation):
When opening paren is followed by newline the closing paren should
follow the current indentation.  Otherwise the closing paren should be
aligned with the opening paren.  This fixes the latter case.

Copyright-paperwork-exempt: yes

5 years agoUpdate from GMP
Paul Eggert [Sun, 28 Apr 2019 20:14:49 +0000 (13:14 -0700)]
Update from GMP

* admin/update-copyright (updatable_files):
Don’t update copyright year on files copied from GMP, so that
they’re identical to upstream.
* src/mini-gmp.c, src/mini-gmp.h: Copy from GMP development
versions as of 2019-01-01 20:15:39 UTC.

5 years agoExport major version of latest Emacs supported by emacs-module.h.
Philipp Stephani [Wed, 24 Apr 2019 08:22:18 +0000 (10:22 +0200)]
Export major version of latest Emacs supported by emacs-module.h.

This is useful if module authors want to support multiple versions of
emacs-module.h.

* configure.ac (emacs_major_version): Define substitution.

* src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.

* doc/lispref/internals.texi (Module Initialization): Document
EMACS_MAJOR_VERSION preprocessor macro.

* test/data/emacs-module/mod-test.c (emacs_module_init): Verify
behavior of EMACS_MAJOR_VERSION.

5 years agoFix another compilation warning.
Philipp Stephani [Sun, 28 Apr 2019 17:21:03 +0000 (19:21 +0200)]
Fix another compilation warning.

* test/src/emacs-module-tests.el (multiply-string): Remove unused
variable ‘i’.

5 years agoAlso regenerate emacs-module.h if module-env-*.h changes.
Philipp Stephani [Sun, 28 Apr 2019 17:17:41 +0000 (19:17 +0200)]
Also regenerate emacs-module.h if module-env-*.h changes.

* Makefile.in (CONFIG_STATUS_FILES_IN): Add versioned environment
header fragments.

5 years ago* src/emacs-module.c (funcall_module): Add a nontrivial assertion
Philipp Stephani [Sun, 28 Apr 2019 15:40:41 +0000 (17:40 +0200)]
* src/emacs-module.c (funcall_module): Add a nontrivial assertion

5 years agoFix a few minor compilation and Checkdoc warnings.
Philipp Stephani [Sun, 28 Apr 2019 15:15:04 +0000 (17:15 +0200)]
Fix a few minor compilation and Checkdoc warnings.

* test/src/emacs-module-tests.el: Add package name and standard
sections.
(multiply-string): Add a docstring.

5 years ago* test/src/emacs-module-tests.el: Switch to lexical binding.
Philipp Stephani [Sun, 28 Apr 2019 14:49:13 +0000 (16:49 +0200)]
* test/src/emacs-module-tests.el: Switch to lexical binding.

5 years agoFix names of functions in last commit
Eli Zaretskii [Sun, 28 Apr 2019 14:14:39 +0000 (17:14 +0300)]
Fix names of functions in last commit

* src/coding.h (build_string_from_utf8): Rename from
build_utf8_string.  All callers changed.
* src/coding.c (make_string_from_utf8): Rename from
make_utf8_string.  All callers changed.

5 years agoCheck if mouse_face_overlay was deleted (Bug#35273)
Noam Postavsky [Sat, 27 Apr 2019 19:22:11 +0000 (15:22 -0400)]
Check if mouse_face_overlay was deleted (Bug#35273)

* src/xdisp.c (note_mouse_highlight): Check if the mouse_face_overlay
actually points to a buffer, before calling
mouse_face_overlay_overlaps on it.

5 years agoRefactoring: move UTF-8 decoding functions into coding.h.
Philipp Stephani [Sun, 28 Apr 2019 10:28:27 +0000 (12:28 +0200)]
Refactoring: move UTF-8 decoding functions into coding.h.

json_make_string and json_build_string are generally useful and not
JSON-specific.  Move them to coding.[ch].

* src/coding.h (build_utf8_string): Move from json.c.

* src/coding.c (make_utf8_string): Move from json.c.

* src/json.c (json_make_string, json_build_string): Move to
coding.[ch].  Split out JSON-specific comment.
(json_parse_error, Fjson_serialize, json_to_lisp): Fix callers.

* src/emacs-module.c (module_make_function, module_make_string): Use
new functions.
(module_decode, module_decode_copy): Remove.

5 years agoPort to platforms where tputs is in libtinfow
Paul Eggert [Sat, 5 Jan 2019 17:47:14 +0000 (09:47 -0800)]
Port to platforms where tputs is in libtinfow

* configure.ac (tputs_library): Also try tinfow, ncursesw (Bug#33977).

(cherry picked from commit a3d52b3057c98bce581bc94912ef3ced6fad6f14)

5 years agoFix slow scrolling in C++ buffers with lots of template delimiters.
Alan Mackenzie [Sat, 27 Apr 2019 17:17:10 +0000 (17:17 +0000)]
Fix slow scrolling in C++ buffers with lots of template delimiters.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): bind
c-parse-and-markup-<>-arglists and c-restricted-<>-arglists to t around the
call to c-forward-<>-arglist, to force the marking of template delimiters with
syntax-table text properties.

5 years agoFix -nw sessions on MS-Windows broken by a recent commit
Eli Zaretskii [Sat, 27 Apr 2019 08:34:05 +0000 (11:34 +0300)]
Fix -nw sessions on MS-Windows broken by a recent commit

* src/w32console.c: Include dispextern.h.
(initialize_w32_display): Populate defined_color_hook.

5 years agoFix MS-Windows build broken by a recent commit
Eli Zaretskii [Sat, 27 Apr 2019 07:43:05 +0000 (10:43 +0300)]
Fix MS-Windows build broken by a recent commit

* src/w32term.c (w32_new_focus_frame): Fix a typo in a recent
commit.

5 years agoFix --with-x-toolkit=no build breakage
YAMAMOTO Mitsuharu [Sat, 27 Apr 2019 06:27:36 +0000 (15:27 +0900)]
Fix --with-x-toolkit=no build breakage

* oldXMenu/Create.c (XMenuCreate): Add const modifier to variable def_val.
* oldXMenu/Create.c:
* src/frame.h: Add const modifier to return type of x_get_resource_string.
* src/frame.c (x_get_resource_string): Exempt x_get_string_resource from
renaming generic x_* identifiers.

5 years agoUpdate multicolor font support status
YAMAMOTO Mitsuharu [Sat, 27 Apr 2019 05:43:19 +0000 (14:43 +0900)]
Update multicolor font support status

* etc/NEWS: Mention multicolor font support on Cairo and NS.
* src/macfont.m (macfont_list): Re-enable color bitmap fonts.

5 years ago* src/frame.c (x_get_resource_string): Fix typo
Alexander Gramiak [Sat, 27 Apr 2019 03:49:52 +0000 (21:49 -0600)]
* src/frame.c (x_get_resource_string): Fix typo

5 years ago* src/xdisp.c: Only check FRAME_RIF for graphical frames
Alexander Gramiak [Sat, 27 Apr 2019 03:32:06 +0000 (21:32 -0600)]
* src/xdisp.c: Only check FRAME_RIF for graphical frames

5 years agoRename x_highlight_frame property to highlight_frame
Alexander Gramiak [Wed, 17 Apr 2019 13:39:25 +0000 (07:39 -0600)]
Rename x_highlight_frame property to highlight_frame

* src/nsterm.h:
* src/nsterm.m:
* src/w32term.c:
* src/w32term.h:
* src/xdisp.c:
* src/xterm.c:
* src/xterm.h: Rename.

5 years agoCheck for existence of terminal hooks before use
Alexander Gramiak [Mon, 15 Apr 2019 17:33:19 +0000 (11:33 -0600)]
Check for existence of terminal hooks before use

This should not be necessary, and is merely a precaution. For
background, see:
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00639.html

* src/frame.c:
* src/xdisp.c: Check for existence of terminal hooks before use.

5 years agoAdd terminal hook query_frame_background_color
Alexander Gramiak [Sun, 14 Apr 2019 02:41:31 +0000 (20:41 -0600)]
Add terminal hook query_frame_background_color

* src/termhooks.c (query_frame_background_color): New terminal hook.

* src/image.c (image_query_frame_background_color): Remove. Use the
terminal hook instead.

* src/nsterm.m:
* src/w32term.c:
* src/xterm.c: Implement and set the new terminal hook.

5 years agoAdd terminal hook defined_color_hook
Alexander Gramiak [Sat, 13 Apr 2019 14:59:07 +0000 (08:59 -0600)]
Add terminal hook defined_color_hook

* src/termhooks.h (defined_color_hook): New terminal hook.

* src/xterm.c:
* src/nsterm.m:
* src/term.c:
* src/w32term.c: Set defined_color_hook.

* src/xfaces.c: Use defined_color_hook.
(defined_color): Remove.

* src/image.c: Remove redefinitions of x_defined_color, and use
defined_color_hook.

5 years agoRename generic x_* identifiers
Alexander Gramiak [Sat, 13 Apr 2019 15:40:03 +0000 (09:40 -0600)]
Rename generic x_* identifiers

* src/image.c: Rename x_* procedures to image_*.

* src/frame.c: Rename x_* procedures to gui_*. Rename
xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to
gui_display_get arg.

* src/frame.h: Rename can_x_set_window_size to can_set_window_size.

* src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename
x_supports_face_attributes_p to gui_supports_face_attributes_p.

* src/keyboard.c:
* src/lisp.h:
* src/nsterm.m:
* src/w32term.c:
* src/xterm.c: Rename x_get_keysym_name to get_keysym_name.

* src/nsfns.c:
* src/nsterm.m: Rename x_* procedures to ns_*.

* src/w32fns.c:
* src/w32term.c: Rename x_* procedures to w32_*.

* src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook)
(frame_visible_invisible_hook, iconify_frame_hook)
(set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook)
(set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook)
(activate_menubar_hook, change_tool_bar_height_hook)
(set_scroll_bar_default_width_hook)
(set_scroll_bar_default_height_hook, get_string_resource_hook): New
terminal hooks to replace backend-specific x_* procedures.

* src/dispextern.h (clear_under_internal_border): New RIF procedure.

* src/alloc.c:
* src/frame.c:
* src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT.

* src/frame.c:
* src/w32term.c:
* src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.

5 years agoAdd prefixes to some window system-dependent procedures
Alexander Gramiak [Thu, 11 Apr 2019 15:00:58 +0000 (09:00 -0600)]
Add prefixes to some window system-dependent procedures

* src/nsterm.m (note_mouse_movement):
* src/w32fns.c (construct_console_modifiers):
* src/w32inevt.c:
* src/w32term.c (frame_highlight, frame_unhighlight)
(construct_mouse_click, construct_mouse_wheel, construct_drag_n_drop)
(lispy_file_action, queue_notifications, note_mouse_movement):
* src/w32term.h:
* src/xterm.c (frame_highlight, frame_unhighlight)
(construct_mouse_click, note_mouse_movement, get_current_wm_state):
Add and use window system prefixes.

5 years agoRename generic x_* procedures in xdisp.c
Alexander Gramiak [Sat, 23 Mar 2019 17:19:40 +0000 (11:19 -0600)]
Rename generic x_* procedures in xdisp.c

* src/xdisp.c (x_consider_frame_title, x_get_glyph_overhangs)
(x_produce_glyphs, x_write_glyphs, x_insert_glyphs)
(x_clear_end_of_line), x_fix_overlapping_area)
(x_update_cursor, x_clear_cursor, x_clear_window_mouse_face)
(x_draw_vertical_border, x_draw_right_divider, x_draw_bottom_divider)
(x_intersect_rectangles): Rename with a gui prefix to indicate
non-X-specific functionality.

* src/composite.c:
* src/dispextern.h:
* src/nsfns.m:
* src/nsterm.m:
* src/w32fns.c:
* src/w32term.c:
* src/window.c:
* src/xfns.c:
* src/xterm.c: Use the renamed procedures.

5 years ago; * doc/lispref/nonascii.texi (Coding System Basics): Fix grammar.
Charles A. Roelli [Fri, 26 Apr 2019 19:49:46 +0000 (21:49 +0200)]
; * doc/lispref/nonascii.texi (Coding System Basics): Fix grammar.

5 years agoAvoid assertion violations in calculating line-number width
Eli Zaretskii [Fri, 26 Apr 2019 19:40:54 +0000 (22:40 +0300)]
Avoid assertion violations in calculating line-number width

* src/indent.c (line_number_display_width): Don't use the
window's start marker if it belongs to a different buffer.
(Bug#35429)

5 years ago* lib-src/profile.c: Delete long-obsolete file
Stefan Monnier [Fri, 26 Apr 2019 12:54:02 +0000 (08:54 -0400)]
* lib-src/profile.c: Delete long-obsolete file

This auxiliary executable was used by the old `profile.el` which later
inspired `elp.el`.  It was made obsolete when Emacs acquired native timers.

* lib-src/Makefile.in (UTILITIES): Remove profile.
(profile${EXEEXT}): Delete rule.

5 years agoHandle quoted file names in tramp-archive.el
Michael Albinus [Fri, 26 Apr 2019 10:31:50 +0000 (12:31 +0200)]
Handle quoted file names in tramp-archive.el

* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Suppress quoted file names.
(tramp-archive-file-name-handler): Handle quoted file names.

* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p):
Add optional TOP argument.

5 years agoAvoid compiler warning in dynlib.c
Eli Zaretskii [Fri, 26 Apr 2019 07:39:24 +0000 (10:39 +0300)]
Avoid compiler warning in dynlib.c

* src/dynlib.c (dynlib_addr) [WINDOWSNT]: Rename the first
argument to be consistent with other platforms.  Cast it to
'void *' to avoid compiler warning as result of changing the
function's signature as part of the last recent change in
dynlib.c.

5 years ago* test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Glenn Morris [Fri, 26 Apr 2019 02:06:34 +0000 (22:06 -0400)]
* test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Fix previous for TEST_LOAD_EL=no.

5 years agoFix the formatting of '\' (including apostrophes) in CC Mode.
Alan Mackenzie [Fri, 26 Apr 2019 01:15:00 +0000 (01:15 +0000)]
Fix the formatting of '\' (including apostrophes) in CC Mode.

In particular, the second apostrophe must also get font-lock-warning-face.

* lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
(c-parse-quotes-after-change): Add cond arms to recognize and handle the
anomalous construct '\'.  Correct the handling of c-new-BEG in
c-parse-quotes-before-change.

5 years ago* test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Glenn Morris [Thu, 25 Apr 2019 23:53:02 +0000 (19:53 -0400)]
* test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Skip if no sqlite program.

5 years agoFix Bug#33618; define search path variables for grep, byte-compile
Stephen Leake [Thu, 25 Apr 2019 22:49:38 +0000 (15:49 -0700)]
Fix Bug#33618; define search path variables for grep, byte-compile

* etc/NEWS: Mention new variables.

* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-search-path): New.

* lisp/progmodes/grep.el (grep-search-path): New.

5 years ago; Add missing space in custom.texi
Michael Albinus [Thu, 25 Apr 2019 20:49:03 +0000 (22:49 +0200)]
; Add missing space in custom.texi

5 years agoMinor tweaks to recent UBSan-related fix
Paul Eggert [Thu, 25 Apr 2019 20:42:50 +0000 (13:42 -0700)]
Minor tweaks to recent UBSan-related fix

* src/alloc.c: No need to include stdalign.h; it’s pervasive.
(GC_STRING_OVERRUN_COOKIE_SIZE): Align to sdata’s alignment,
so that the code works even if alignof (sdata) exceeds 8.
Don’t require the cookie size to be 8, as this overly fattens
32-bit platforms and one DEADBEEF should be enough.
(GC_STRING_EXTRA): Omit now-unnecessary ‘verify’.
(allocate_string_data): Omit unnecessary cast.

5 years agoPort to Oracle Developer Studio 12.6
Paul Eggert [Thu, 25 Apr 2019 20:21:39 +0000 (13:21 -0700)]
Port to Oracle Developer Studio 12.6

This compiler is a bit pickier about checking conformance to
the C standard, ranging from syntax trivia (no extra ";" at
the top level) to portability trivia (warnings re conversion
between function and data pointers) to more-important stuff
like lack of support for some __attribute__ usages.
* src/dynlib.c (dynlib_addr): First argument is a function
pointer, not a data pointer.  All callers changed.
* src/emacs-module.c (module_function_address):
Return module_funcptr, not void *.  All uses changed.
* src/lisp.h (module_funcptr) [HAVE_MODULES]: New type.
* src/lread.c (union ieee754_double): Don’t assume the usual
semantics for converting signed to unsigned int when initializing
a bitfield, as the Oracle compiler complains and the C standard
is unclear.
* src/pdumper.c (ALLOW_IMPLICIT_CONVERSION): Make it clearer
that -Wsign-conversion is disabled everywhere in this file.
(dump_trace, dump_tailq_prepend, dump_tailq_append):
Don’t assume __attribute__.
(dump_object_self_representing_p): Don’t disable conversion
warnings; it’s not needed here.
(DEFINE_FROMLISP_FUNC): Avoid possible signal in integer
conversion from unsigned to signed.
(DEFINE_FROMLISP_FUNC, finish_dump_pvec): Avoid warning about
unreachable statements on platforms not supporting the
__attribute__.
(intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp)
(dump_off_to_lisp, dump_emacs_reloc_immediate_lv)
(dump_emacs_reloc_immediate_ptrdiff_t)
(dump_emacs_reloc_immediate_intmax_t)
(dump_emacs_reloc_immediate_int, dump_emacs_reloc_immediate_bool):
Omit stray semicolon that violates C standard.
(dump_metadata_for_pdumper): Add cast to pacify compiler complaining
about conversion from function pointer to data pointer.
(Fdump_emacs_portable): Do not use CALLN to call a function
with zero arguments, as C99 prohibits empty initializers.
* src/xdisp.c (syms_of_xdisp): Do not nest calls to pure_list,
to work around a bug in Oracle Developer Studio 12.6.

5 years ago* lisp/simple.el (eval-expression): Fix paren typo.
Stefan Monnier [Thu, 25 Apr 2019 19:34:05 +0000 (15:34 -0400)]
* lisp/simple.el (eval-expression): Fix paren typo.

5 years agoMake sure that ‘sdata’ objects in ‘sblock’ objects are aligned.
Philipp Stephani [Thu, 25 Apr 2019 19:28:46 +0000 (21:28 +0200)]
Make sure that ‘sdata’ objects in ‘sblock’ objects are aligned.

Issue found by Clang’s UBSan.

* src/alloc.c (GC_STRING_OVERRUN_COOKIE_SIZE): Increase to 8.
(string_overrun_cookie): Extend accordingly.
(GC_STRING_EXTRA): Ensure that it’s properly aligned for ‘sdata’.
(allocate_string_data): Verify that ‘sdata’ blocks remain aligned.

5 years agoUse lexical-binding by default for M-:, --eval, and *scratch*
Stefan Monnier [Thu, 25 Apr 2019 18:36:03 +0000 (14:36 -0400)]
Use lexical-binding by default for M-:, --eval, and *scratch*

* lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
(normal-no-mouse-startup-screen, command-line-1):
Use startup--get-buffer-create-scratch.
(command-line-1):
* lisp/simple.el (eval-expression):
* lisp/server.el (server-eval-and-print): Use lexical-binding to
evaluate the expression.
(server-execute): Use startup--get-buffer-create-scratch.
* lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.

5 years agoRestore fontification of delimiters of multiline CC Mode strings.
Alan Mackenzie [Thu, 25 Apr 2019 18:00:15 +0000 (18:00 +0000)]
Restore fontification of delimiters of multiline CC Mode strings.

E.g., on typing the closing delimiter of a string continued onto a second
line, the opening delimiter retained its font-lock-warning-face.

* lisp/progmodes/cc-defs.el (c-c++-raw-string-opener-re)
(c-c++-raw-string-opener-1-re): New constants.
(c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.

* lisp/progmodes/cc-engine.el (c-raw-string-pos)
(c-depropertize-raw-strings-in-region, c-after-change-unmark-raw-strings):
Replace uses of open-coded raw string regexps by the new constants and macros
in cc-defs.el.

* lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Ditto

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Set
c-new-BEG to the beginning of the string when we encounter its closing ".
When not in a raw string, but in a string, clear syntax-table properties from
its delimiters and set c-new-BEG/END to its limits.
(c-after-change-mark-abnormal-strings): When applying syntax-table properties
to string delimiters, also set c-new-BEG/END to ensure subsequent
fontification.

5 years agoMake wdired-mode ignore ls file indicators
Stephen Berman [Thu, 25 Apr 2019 17:17:23 +0000 (19:17 +0200)]
Make wdired-mode ignore ls file indicators

* lisp/wdired.el (wdired--restore-dired-filename-prop): When
dired-listing-switches includes "F" or "classify", don't treat
appended indicator characters as part of the file name (bug#34915).

* test/lisp/wdired-tests.el (wdired-test-bug34915): New test.

5 years agoPort emacsclient euidaccess to Solaris 10
Paul Eggert [Thu, 25 Apr 2019 15:50:50 +0000 (08:50 -0700)]
Port emacsclient euidaccess to Solaris 10

Without this fix, linking emacsclient fails with ‘Undefined
symbol eaccess’ on Solaris 10 sparc.
* lib-src/Makefile.in (LIB_EACCESS): New macro.
(emacsclient${EXEEXT}, emacsclientw${EXEEXT}): Use it.

5 years agoFix some corner cases in the recognition of C++ raw strings.
Alan Mackenzie [Thu, 25 Apr 2019 15:18:12 +0000 (15:18 +0000)]
Fix some corner cases in the recognition of C++ raw strings.

These are where changing the identifier in a raw string delimiter causes
different delimiters to match eachother.

* lisp/progmodes/cc-engine.el (c-raw-string-end-delim-disrupted): New
variable.
(c-before-change-check-raw-strings): Use new variable.
(c-after-change-unmark-raw-strings): When typing into an opening delimiter or
altering its close delimiter causes the opening delimiter to match a later
closing delimiter, clear all syntax-table char properties from the opening
delimiter onwards, and set c-new-END to point max.  Also, when changing a
closing delimiter, check whether its new value matches a previously open
opening delimiter earlier in the buffer, and amend the syntax-table text
properties appropriately.

5 years ago* lisp/progmodes/sql.el
Michael R. Mauger [Thu, 25 Apr 2019 00:59:25 +0000 (20:59 -0400)]
* lisp/progmodes/sql.el
(sql-is-sqli-buffer-p): New function.
(sql-generate-unique-sqli-buffer-name): Refactor and use it.
(sql-product-interactive): Simplify name logic.
* test/lisp/progmodes/sql-tests.el
(sql-tests-placeholder-filter-harness): New macro.
(sql-tests-placeholder-filter-simple)
(sql-tests-placeholder-filter-ampersand)
(sql-tests-placeholder-filter-period): Refactored tests and use macro.
(sql-tests-buffer-naming-harness): New macro.
(sql-tests-buffer-naming-default)
(sql-tests-buffer-naming-multiple)
(sql-tests-buffer-naming-explicit)
(sql-tests-buffer-naming-universal-argument)
(sql-tests-buffer-naming-existing): New tests.