1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

130500 commits

Author SHA1 Message Date
Philipp Stephani
1eb4e5c3c8 Make FILENAME argument of 'file-name-base' mandatory
* lisp/files.el (file-name-base): Make FILENAME argument mandatory.

* lisp/autoinsert.el (auto-insert-alist):
* lisp/progmodes/cperl-mode.el (cperl-electric-pod):
* lisp/progmodes/idlwave.el (idlwave-parse-definition):
* lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes): Fix
all callers.
2017-09-24 10:02:00 +02:00
Stefan Monnier
535db535a9 * lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428) 2017-09-23 17:06:23 -04:00
Philipp Stephani
c0af83b6cc Don't attempt to disable double buffering in newer GTK+ versions
* src/gtkutil.c (xg_create_frame_widgets): Stop calling deprecated
function gtk_widget_set_double_buffered.
2017-09-23 13:02:13 +02:00
Philipp Stephani
f6818e761e GTK+: Stop querying for background colors.
* src/gtkutil.c (xg_check_special_colors): Don't call deprecated
function gtk_style_context_get_background_color in newer versions of
GTK+.
2017-09-23 12:51:24 +02:00
Philipp Stephani
f02e76fb8f GTK+: stop calling 'gtk_window_set_wmclass' in new versions
* src/gtkutil.c (xg_create_frame_widgets): Stop calling deprecated
function 'gtk_window_set_wmclass' in GTK+ 3.22.
2017-09-23 12:39:43 +02:00
Philipp Stephani
7144e5e9f5 GTK+: Use a style provider instead of deprecated function
* src/gtkutil.c (xg_set_widget_bg): Use a CSS style provider instead
of the deprecated gtk_widget_override_background_color.
2017-09-23 12:28:44 +02:00
Mark Oteiza
3a09343eab Teach Emacs to set XTerm window titles
* lisp/term/xterm.el (terminal-init-xterm): Add initialization.
(xterm--init-frame-title, xterm-set-window-title-flag):
(xterm-unset-window-title-flag, xterm-set-window-title): New functions.
(xterm-window-title-flag): New variable.
(xterm-set-window-title): New custom variable.
* etc/NEWS: Mention it.
2017-09-20 11:39:37 -04:00
Philipp Stephani
b1f83c10df Don't call deprecated GTK function gtk_adjustment_changed
* src/gtkutil.c (xg_set_toolkit_scroll_bar_thumb)
(xg_set_toolkit_horizontal_scroll_bar_thumb): Remove calls to
deprecated function gtk_adjustment_changed.  This function has been
deprecated since GTK+ 3.18.
2017-09-19 17:41:32 +02:00
Sam Steingold
0bddbbc5aa Fix bug#28435: "all" score file is ignored
(gnus-score-find-bnews): Fix removing the empty suffix.
2017-09-18 16:33:37 -04:00
Sam Steingold
9dbdc0f005 Add define-thing-chars and use it for filename.
(define-thing-chars): New defmacro.
(filename): Define this thing using `define-thing-chars'.
2017-09-18 12:54:57 -04:00
Philipp Stephani
0925a20e0a Revert "Implement native JSON support using Jansson"
This reverts commit cb99cf5a99.
2017-09-18 18:00:45 +02:00
Philipp Stephani
cb99cf5a99 Implement native JSON support using Jansson
* configure.ac: New option --with-json.

* src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer): New defuns.
(json_out_of_memory, json_parse_error, json_release_object)
(check_string_without_embedded_nulls, json_check, lisp_to_json)
(json_insert, json_insert_callback, json_to_lisp)
(json_read_buffer_callback, Fjson_parse_buffer, define_error): New
helper function.
(syms_of_json): New file.

* src/lisp.h: Declaration for syms_of_json.

* src/emacs.c (main): Enable JSON functions.

* src/Makefile.in (JSON_LIBS, JSON_CFLAGS, JSON_OBJ, EMACS_CFLAGS)
(base_obj, LIBES): Compile json.c if --with-json is enabled.

* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/object, json-parse-string/object): New unit tests.
2017-09-18 16:34:47 +02:00
Alan Mackenzie
61a5c30e70 Fix irregularities with CC Mode fontification, particularly with "known types"
* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Introduce a new
optional parameter, template-class.  In "class <X = Y>", fontify "Y" as a
type.
(c-font-lock-single-decl): New variable template-class, set to non-nil when we
have a construct like the above.  Pass this as argument to
c-font-lock-declarators.
(c-font-lock-cut-off-declarators): Check more rigorously that a declaration
being processed starts before the function's starting position.
(c-complex-decl-matchers): Remove the redundant clause which fontified "types
preceded by, e.g., "struct"".

* lisp/progmodes/cc-langs.el (c-template-typename-kwds)
(c-template-typename-key): New lang defconsts and defvar.
2017-09-18 08:52:24 +00:00
Michael Albinus
198ba44984 * lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 26.1.
2017-09-17 10:08:54 +02:00
Glenn Morris
8081df2691 * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present. 2017-09-16 13:27:25 -07:00
Eli Zaretskii
977cd6cb28 Increment Emacs version to 27.0.50
* README:
* configure.ac:
* nt/README.W32:
* src/msdos.c (internal_terminal_init):
* msdos/sed2v2.inp:
* etc/refcards/ru-refcard.tex: Increment Emacs version to 27.0.50.
* etc/NEWS: New file with sections for Emacs 27.1.
* etc/NEWS.26: Renamed from etc/NEWS.
2017-09-16 15:53:03 +03:00
Alan Mackenzie
4ea37c2b8b Cope better with C++ and Objective-C protection keywords in class declarations
This fix fixes the fontification of a method inside a class at the time it is
typed, when there is a protection keyword clause preceding it.

* lisp/progmodes/cc-engine.el (c-forward-keyword-clause): Handle protection
keywords.
(c-looking-at-decl-block): Avoid scanning forward over protection keyword
clauses too eagerly.

* lisp/progmodes/cc-langs.el (c-protection-key c-post-protection-token): New
lang defconsts and defvars.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): When we encounter a protection
keyword following a semicolon or brace, move forward over it before attempting
to parse a type.
2017-09-16 11:31:38 +00:00
Eli Zaretskii
2d53f8783f Fix order of sorted overlays returned by 'overlays-at'
* src/buffer.c (Foverlays_at): If SORTED is non-nil, reverse the
list of results, to have their order as per the documentation.
(Bug#28390)

* etc/NEWS: Mention the change in the behavior of overlays-at.
2017-09-16 13:02:31 +03:00
Eli Zaretskii
a103dbe360 Disable execution of unsafe Lisp by Enriched Text mode
* src/xdisp.c (handle_display_spec): If the display property is
wrapped in 'disable-eval' form, disable Lisp evaluation while
processing this property.
(handle_single_display_spec): Accept new argument ENABLE_EVAL_P.
If that argument is false, don't evaluate Lisp while processing
display properties.

* lisp/textmodes/enriched.el
(enriched-allow-eval-in-display-props): New defcustom.
(enriched-decode-display-prop): If
enriched-allow-eval-in-display-props is nil, wrap the display
property with 'disable-eval' to disable Lisp evaluation when the
display property is processed for display.  (Bug#28350)
* lisp/gnus/mm-view.el (mm-inline-text): Re-enable processing of
enriched text.

* doc/lispref/display.texi (Display Property): Document the
'disable-eval' wrapping of 'display' properties.
* doc/emacs/text.texi (Enriched Properties): Document
'enriched-allow-eval-in-display-props'.

* etc/NEWS: Describe the security issues with Enriched Text mode
and their solution.
2017-09-16 12:45:24 +03:00
Eli Zaretskii
6d6dc246f9 Avoid MinGW64 compilation warning in w32.c
* src/w32.c (sys_strerror): Provide a prototype for MinGW64.
2017-09-16 11:51:24 +03:00
Eli Zaretskii
d25d2a9b2d ; * src/data.c (minmax_driver): Fix last change. 2017-09-16 11:01:19 +03:00
Eli Zaretskii
1170c2f371 Fix MS-Windows build broken by recent changes in lcms.c
* src/lcms.c [WINDOWSNT]: Define types for cmsWhitePointFromTemp
and cmsxyY2XYZ function pointers.
(init_lcms_functions) [WINDOWSNT]: Load cmsWhitePointFromTemp and
cmsxyY2XYZ from liblcms2.
(cmsWhitePointFromTemp, cmsxyY2XYZ) [WINDOWSNT]: Redirect to the
corresponding function pointers.
(Flcms_temp_to_white_point): Minor stylistic changes.  Doc fix.
(syms_of_lcms2): Defsubr Slcms_temp_to_white_point.
2017-09-16 10:41:52 +03:00
Eli Zaretskii
cb27a13413 Avoid GCC 7 compilation warning in data.c
* src/data.c (minmax_driver): Use UNINIT to avoid compilation
warnings.  Reported by Fabrice Popineau
<fabrice.popineau@centralesupelec.fr>.
2017-09-16 10:31:32 +03:00
Mark Oteiza
f5f261c690 Add lcms-temp->white-point and initial tests
* src/lcms.c (lcms-temp->white-point): New function.
* test/src/lcms-tests.el: New file.
2017-09-15 23:49:42 -04:00
Mark Oteiza
30c955b172 Use cl-print in timer list
* lisp/emacs-lisp/timer-list.el (timer-list): Use cl-print
for handling functions.
(timer-list-mode): Capitalize major mode name.  Set bidi direction
as in tabulated-list-mode.
2017-09-15 23:18:54 -04:00
Vincent Belaïche
767b3a7429 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2017-09-15 23:52:24 +02:00
Vincent Belaïche
d1458d0f40 Make landscape layout with geometry package rather than a PostScript special.
* lisp/calendar/cal-tex.el (cal-tex-preamble): Make 12pt the
default class option.
(cal-tex-year, cal-tex-cursor-month-landscape): Pass landscape
request to `cal-tex-insert-preamble' function call within the
class option string.
(cal-tex-cursor-month): Don't pass any longer "12pt" argument
to `cal-tex-insert-preamble' function, as it is default.
(cal-tex-insert-preamble): Suppress landscape and size
argument, and replace them by a class-options string
argument. Do not insert any longer "\special{landscape}" in
case of landscape layout, as the job is made by the geometry
package.
2017-09-15 23:51:05 +02:00
Mark Oteiza
9785d35137 * lisp/json.el (json-read-keyword): Revert previous change to catch EOL. 2017-09-15 15:38:44 -04:00
Eli Zaretskii
541b596bf1 One more attempt to avoid GCC 7 warnings in dispnew.c
* src/dispnew.c (adjust_glyph_matrix): Use eassume instead of
eassert, to avoid compilation warnings about NULL pointer
dereferences.
2017-09-15 21:59:08 +03:00
Mark Oteiza
6e38b9253e Fix color-distance docstring
Also feed the translated color to the metric argument.
* src/xfaces.c (color-distance): Reword docstring to be more helpful.
Avoid duplicating effort in lcms2 by passing the translated 16 bit RGB
instead of the function's color arguments.
2017-09-15 13:30:20 -04:00
Michael Albinus
7911ebc610 Improve Tramp behaviour according to bug#27986
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Check, that NEWNAME is a
directory name when existing.  Use `file-name-as-directory'
where appropriate.
2017-09-15 18:29:00 +02:00
Mark Oteiza
1c70054750 ; Partially revert previous commit
The reduction in was because I broke it.
* lisp/json.el (json-pop): Do not bind at compile time something needed
at run time.
2017-09-15 10:06:56 -04:00
Mark Oteiza
3b783a75ad More JSON optimization
Last I checked, inlining json-skip-whitespace didn't make much
difference.  However, changing defsubsts to define-inline results
in roughly 15% reduction in read time on a 200K file.
* lisp/json.el (json-advance, json-peek, json-pop):
(json-skip-whitespace): Inline with define-inline.
(json-read-keyword): Don't use whitespace syntax.
(json-add-to-object): Simpler condition.
2017-09-15 09:49:27 -04:00
Eli Zaretskii
817e92b2bd Avoid crashes due to invalid error forms from sentinels/filters
* src/process.c (exec_sentinel_error_handler): Make sure the error
form passed to cmd_error_internal is a cons cell.  (Bug#28430)
2017-09-15 16:15:05 +03:00
Eli Zaretskii
015172d1ba Avoid compilation warnings with GCC 7 on MS-Windows
* src/w32term.c (w32_setup_relief_color, construct_mouse_click)
(w32_read_socket): Initialize variables to shut up bogus
compilation warnings from GCC 7.
* src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR
to avoid compiler warnings about printing signed values using %x
format spec.
* src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid
compiler warning about possible NULL pointer dereference.
* src/lisp.h (pI): Tweak the definition some more for MinGW64.
2017-09-15 11:46:37 +03:00
Martin Rudalics
025e216566 Define gnutls_rnd for WINDOWSNT and HAVE_GNUTLS3 case only
* src/fns.c (gnutls_rnd): Define for WINDOWSNT and HAVE_GNUTLS3
case only to avoid unused macros warning otherwise.
2017-09-15 09:48:54 +02:00
Martin Rudalics
0ce6b4310d In w32heap.c bump up DUMPED_HEAP_SIZE
* src/w32heap.c (DUMPED_HEAP_SIZE): Bump up DUMPED_HEAP_SIZE
to 13*1024*1024 for 32-bit non-wide-integer builds.
2017-09-15 09:39:17 +02:00
Mark Oteiza
117f28430a Bind n,p in timer-list
* lisp/emacs-lisp/timer-list.el (timer-list-mode-map): Bind n and p
to next- and previous-line, respectively.
2017-09-14 19:52:09 -04:00
Glenn Morris
ce0aa05864 * lisp/net/tls.el (tls-program): Fix :version.
; Ref: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00401.html
2017-09-14 16:35:43 -04:00
Eli Zaretskii
d44c8542af * configure.ac (--with-lcms2, --without-lcms2): New options. 2017-09-14 22:22:29 +03:00
Eli Zaretskii
0d5f0a8d56 ; * etc/NEWS: Reword the lcms2 entry. 2017-09-14 21:35:31 +03:00
Eli Zaretskii
7d33ebc1f0 Avoid 64-bit compilation warnings in unexw32.c
* src/unexw32.c (pDWP): New macro.
(COPY_CHUNK, COPY_PROC_CHUNK): Declare 'count' as DWORD_PTR.  Use
pDWP for printing values that can be either 32-bit or 64-bit wide.
2017-09-14 20:46:59 +03:00
Eli Zaretskii
2c29280e7a Fix warnings about formats in printf-like functions on MS-Windows
* src/lisp.h (pI) [__MINGW32__]: Provide definition that will
hopefully DTRT with both MinGW64 and mingw.org's MinGW.  See
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00171.html
for the details.
* src/conf_post.h (PRINTF_ARCHETYPE) [MINGW_W64]: Separate
definition specific to MinGW64.
(PRINTF_ARCHETYPE) [__MINGW32__]: For mingw.org's MinGW, use
__mingw_printf__ in ANSI-compatible mode.
2017-09-14 20:38:42 +03:00
Eli Zaretskii
56ab0c4a4c Support lcms2 in MS-Windows builds
* lisp/term/w32-win.el (dynamic-library-alist): Include
association for the lcms2 library.

* src/lcms.c [WINDOWSNT]: Include windows.h and w32.h.  Use
DEF_DLL_FN to define pointers to dynamically loaded lcms2
functions.
(cmsCIE2000DeltaE, cmsCIECAM02Init, cmsCIECAM02Forward)
(cmsCIECAM02Done): New macros.
(init_lcms_functions, Flcms2_available_p): New functions.
(Flcms_cie_de2000, Flcms_cam02_ucs) [WINDOWSNT]: Call
init_lcms_functions.
(syms_of_lcms2): Defsubr lcms2-available-p.
* src/w32fns.c (syms_of_w32fns): DEFSYM Qlcms2.

* configure.ac: Include lcms2 in the final report and in
emacs_config_features.

* nt/INSTALL:
* nt/INSTALL.W64: Update with the information about lcms2 library.
2017-09-14 19:37:35 +03:00
Paul Eggert
bc5485edef Port renameat_noreplace to openSUSE 12.3
Problem reported by M. Nomiya in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00363.html
* src/sysdep.c (renameat_noreplace):
Call renameat2 only if CYGWIN.
2017-09-14 07:23:49 -07:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5da53a0191 Prefer HTTPS to HTTP for gnu.org
This patch just changes code files; a followup companion patch
(much larger) will affect the commentary.  This part is
separated out to make it easier to review.
* .dir-locals.el (change-log-mode):
* lisp/org/org-info.el (org-info-other-documents)
(org-info-map-html-url):
* lisp/org/ox-html.el (org-html-creator-string):
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head):
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
* test/lisp/thingatpt-tests.el (thing-at-point-test-data):
Use HTTPS instead of HTTP.
2017-09-13 15:54:25 -07:00
Simen Heggestøyl
e7d6c62209 Add tests for color.el
* lisp/color.el (color-name-to-rgb, color-complement): Clarify in
docstrings that RGB triplets should use four digits per component.
(color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element"
warning.

* test/lisp/color-tests.el: New file.
2017-09-13 20:23:44 +02:00
Lars Ingebrigtsen
6339807147 Make gnutls-verify-error work again with url-retrieve-synchronously
* lisp/url/url-gw.el (url-open-stream): Only use :nowait if
we're doing async connections (bug#26835).

* lisp/url/url-parse.el (url): Add an asynchronous slot.

* lisp/url/url.el (url-asynchronous): New variable.
(url-retrieve-internal): Store the value.
(url-retrieve-synchronously): Bind the variable.
2017-09-13 20:11:02 +02:00
Michael Albinus
4ab44f75d6 Improve backward compatibility of tramp-tests
* test/lisp/net/tramp-tests.el (seq): Don't require.
(tramp--test-emacs26-p): New defun.
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Use it.
(tramp-test16-file-expand-wildcards): Use `copy-sequence'.
2017-09-13 20:10:40 +02:00