]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoFix highlighting of CSS selectors with double hyphens
Simen Heggestøyl [Sun, 11 Jun 2017 15:41:09 +0000 (17:41 +0200)]
Fix highlighting of CSS selectors with double hyphens

* lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix
highlighting of selectors that contain double hyphens.  They would be
mistaken for a variable.

7 years agoSupport threads in modules
Philipp Stephani [Sat, 22 Apr 2017 14:51:44 +0000 (16:51 +0200)]
Support threads in modules

Rather than checking for the main thread, check for the current
thread.

* emacs-module.c (check_thread): New function.
(MODULE_FUNCTION_BEGIN_NO_CATCH, module_get_environment)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw, module_is_not_nil, module_eq): Use it.

7 years agoAllow non-local exits in module initializers
Philipp Stephani [Sun, 11 Jun 2017 12:50:20 +0000 (14:50 +0200)]
Allow non-local exits in module initializers

Previously signals, throws, and quits from module initialization
functions were ignored.  These function aren't special, and better
errors can be reported using signals than with the initialization
return code, so allow non-local exits.

* src/emacs-module.c (module_signal_or_throw): New helper function.
(Fmodule_load, funcall_module): Use it.
(Fmodule_load): Also allow quitting.

7 years agoLet eshell/sudo handle absolute command names (Bug#27167)
Noam Postavsky [Wed, 7 Jun 2017 22:48:39 +0000 (18:48 -0400)]
Let eshell/sudo handle absolute command names (Bug#27167)

* lisp/eshell/esh-ext.el (eshell-find-interpreter): Don't change
absolute paths into relative ones.

7 years agoDon't wait for toolbar in NS native fullscreen
Alan Third [Sat, 10 Jun 2017 21:44:01 +0000 (22:44 +0100)]
Don't wait for toolbar in NS native fullscreen

* src/nsterm.m (EmacsView:updateFrameSize): Don't short-circuit the
function when in fullscreen.

7 years ago; Spelling fixes
Paul Eggert [Sat, 10 Jun 2017 18:44:27 +0000 (11:44 -0700)]
; Spelling fixes

7 years agoFix the placement of GTK menus on multi-monitor systems
Alexander Gramiak [Sat, 10 Jun 2017 09:28:03 +0000 (12:28 +0300)]
Fix the placement of GTK menus on multi-monitor systems

menu_position_func did not properly use the current monitor's
resolution.  Also see commit '2016-02-06 22:12:53 +0100'.

* lisp/frame.el (frame-monitor-attribute, frame-monitor-geometry)
(frame-monitor-workarea): New functions.

* src/xmenu.c (menu_position_func): Take into account the workarea of
the monitor that contains the mouse.  (Bug#23568)

7 years agoClarify documentation of 'face-spec-set'
Eli Zaretskii [Sat, 10 Jun 2017 09:08:45 +0000 (12:08 +0300)]
Clarify documentation of 'face-spec-set'

* lisp/faces.el (face-spec-set): Clarify the description of
SPEC-TYPE in the doc string.

* doc/lispref/display.texi (Defining Faces): Clarify the
description of 'face-spec-set's SPEC-TYPE argument.  (Bug#27246)

7 years agoFix domain port and handling in tramp-gvfs.el
Michael Albinus [Sat, 10 Jun 2017 08:57:19 +0000 (10:57 +0200)]
Fix domain port and handling in tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
Return nil if BYTE-ARRAY is nil.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Fix domain and port handling.

* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Ignore errors.

7 years agoImprove documentation of 'face-spec-set-2'
Eli Zaretskii [Sat, 10 Jun 2017 08:39:59 +0000 (11:39 +0300)]
Improve documentation of 'face-spec-set-2'

* lisp/faces.el (face-spec-recalc, face-spec-set-2): Rename 'spec'
to 'face-attrs'.
(face-spec-choose, face-spec-set-2): Doc fix.  (Bug#27238)

7 years agoFix handling of Python/Guile commands with arguments in gdb-mi.el
Eli Zaretskii [Sat, 10 Jun 2017 08:29:58 +0000 (11:29 +0300)]
Fix handling of Python/Guile commands with arguments in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-python-guile-commands-regexp): New
variable.
(gdb-control-commands-regexp): Use it.
(gdb-send): Don't increment gdb-control-level if the command
matches gdb-python-guile-commands-regexp and has non-empty
arguments.  Reported by David Boles <boles@ieee.org> in
http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00009.html.

7 years agoPreserve point in Dired windows under 'dired-auto-revert-buffer'
Eli Zaretskii [Sat, 10 Jun 2017 08:22:50 +0000 (11:22 +0300)]
Preserve point in Dired windows under 'dired-auto-revert-buffer'

* lisp/dired.el (dired-find-file): When dired-auto-revert-buffer
is non-nil, bind switch-to-buffer-preserve-window-point to nil
while calling find-file.  (Bug#27243)

7 years agoGive test files a -tests.el suffix
Philipp Stephani [Fri, 19 May 2017 08:58:58 +0000 (10:58 +0200)]
Give test files a -tests.el suffix

Rename a couple of test files that have the same name as the library
they test.  This harmonizes the naming pattern and makes it possible
to have the tests directories in the load path.

7 years agoFix another compiler warning on macOS
Philipp Stephani [Thu, 8 Jun 2017 23:27:39 +0000 (01:27 +0200)]
Fix another compiler warning on macOS

* src/image.c (x_query_frame_background_color): Don't define if we
have NextStep but no image support.

7 years agoAdd garbage collection support for module environments
Philipp Stephani [Thu, 8 Jun 2017 23:25:47 +0000 (01:25 +0200)]
Add garbage collection support for module environments

* src/emacs-module.c (mark_modules): New function.
(initialize_environment): Properly initialize Lisp objects.
* src/alloc.c (garbage_collect_1): Call it.

7 years agoMake autogen.sh report relevant environment variables
Glenn Morris [Thu, 8 Jun 2017 16:48:59 +0000 (12:48 -0400)]
Make autogen.sh report relevant environment variables

* autogen.sh (check_version):
Indicate if using an environment variable.

7 years agoSplit variable macro env from function env
Noam Postavsky [Sat, 22 Apr 2017 03:37:05 +0000 (23:37 -0400)]
Split variable macro env from function env

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove.
(cl-symbol-macrolet): Instead of adding each binding directly into the
main environment with a special key format, put all symbol macro
bindings into a single entry in the main environment under
`:cl-symbol-macros'.
(cl--sm-macroexpand): Look up symbol bindings in the
`:cl-symbol-macros' entry of the environment.

7 years ago; ChangeLog fixes
Glenn Morris [Wed, 7 Jun 2017 19:55:33 +0000 (15:55 -0400)]
; ChangeLog fixes

7 years ago* make-dist: Directory modules/mod-test no longer exists.
Glenn Morris [Wed, 7 Jun 2017 18:39:59 +0000 (14:39 -0400)]
* make-dist: Directory modules/mod-test no longer exists.

7 years agoMore authors.el updates
Glenn Morris [Wed, 7 Jun 2017 18:27:21 +0000 (14:27 -0400)]
More authors.el updates

* admin/authors.el (authors-ignored-files, authors-valid-file-names)
(authors-renamed-files-alist): Additions.

; ChangeLog fixes

7 years ago* make-dist: Check a release has a ChangeLog with a release notice.
Glenn Morris [Wed, 7 Jun 2017 17:41:46 +0000 (13:41 -0400)]
* make-dist: Check a release has a ChangeLog with a release notice.

7 years ago* make-dist: Use existing ChangeLog if present.
Glenn Morris [Wed, 7 Jun 2017 17:26:25 +0000 (13:26 -0400)]
* make-dist: Use existing ChangeLog if present.

7 years ago* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Fix port handling.
Michael Albinus [Wed, 7 Jun 2017 14:24:31 +0000 (16:24 +0200)]
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Fix port handling.

7 years ago(url-cookie-host-can-set-p): Protect against zero-length domains
Lars Ingebrigtsen [Wed, 7 Jun 2017 14:17:47 +0000 (16:17 +0200)]
(url-cookie-host-can-set-p): Protect against zero-length domains

* lisp/url/url-cookie.el (url-cookie-host-can-set-p): Protect
against zero-length domains.

Backtrace of a real-world site that triggers a bug:

Debugger entered--Lisp error: (args-out-of-range "" 0)
  url-cookie-host-can-set-p("www.washingtonpost.com" "")
  url-cookie-handle-set-cookie("utm_term=0;Expires=Thursday,
  01-January-1970 00:00:00 GMT; path=/; domain=")
  url-http-handle-cookies()

7 years agoMore authors.el updates
Glenn Morris [Tue, 6 Jun 2017 20:19:10 +0000 (16:19 -0400)]
More authors.el updates

* admin/authors.el (authors-obsolete-files-regexps)
(authors-valid-file-names, authors-renamed-files-alist)
(authors-renamed-files-regexps): Additions.

7 years ago; * admin/authors.el (authors-obsolete-files-regexps): Tweak previous.
Glenn Morris [Tue, 6 Jun 2017 19:19:58 +0000 (15:19 -0400)]
; * admin/authors.el (authors-obsolete-files-regexps): Tweak previous.

7 years agoMore small authors.el updates
Glenn Morris [Tue, 6 Jun 2017 19:08:41 +0000 (15:08 -0400)]
More small authors.el updates

* admin/authors.el (authors-aliases): Fix recent addition.
(authors-obsolete-files-regexps, authors-no-scan-regexps)
(authors-ignored-files, authors-valid-file-names)
(authors-renamed-files-alist): Additions.
; * lisp/vc/pcvs.el, test/lisp/emacs-lisp/checkdoc-tests.el:
; Fix Author headers.
; * ChangeLog.2: Fixes.

7 years ago; Update some more Maintainer: header comments
Glenn Morris [Tue, 6 Jun 2017 01:08:07 +0000 (21:08 -0400)]
; Update some more Maintainer: header comments

; This removes some people who are absent from commit logs or mailing
; lists for upwards of a decade.

7 years ago; Update some Maintainer: header comments
Glenn Morris [Tue, 6 Jun 2017 00:48:49 +0000 (20:48 -0400)]
; Update some Maintainer: header comments

7 years agoMake authors.el report names that were ignored
Glenn Morris [Tue, 6 Jun 2017 00:39:29 +0000 (20:39 -0400)]
Make authors.el report names that were ignored

* admin/authors.el (authors-ignored-names): New.
(authors-canonical-author-name): Add file and position arguments.
Record ignored authors.
(authors-scan-change-log, authors-scan-el):
Pass file and position to authors-canonical-author-name.
(authors): Also print authors that were ignored.

7 years ago* admin/authors.el (authors-aliases): Additions.
Glenn Morris [Tue, 6 Jun 2017 00:38:31 +0000 (20:38 -0400)]
* admin/authors.el (authors-aliases): Additions.

7 years ago; Small fixes for some Author: header comments
Glenn Morris [Tue, 6 Jun 2017 00:35:17 +0000 (20:35 -0400)]
; Small fixes for some Author: header comments

7 years ago; ChangeLog fixes
Glenn Morris [Tue, 6 Jun 2017 00:33:55 +0000 (20:33 -0400)]
; ChangeLog fixes

7 years ago* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
Tino Calancha [Mon, 5 Jun 2017 00:35:29 +0000 (09:35 +0900)]
* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.

7 years ago* lisp/subr.el (read-passwd): Don't delete return value (Bug#22027).
Noam Postavsky [Sun, 4 Jun 2017 03:41:53 +0000 (23:41 -0400)]
* lisp/subr.el (read-passwd): Don't delete return value (Bug#22027).

7 years agoEnable ElDoc messages after the newline command
Dmitry Gutov [Mon, 5 Jun 2017 22:23:41 +0000 (01:23 +0300)]
Enable ElDoc messages after the newline command

* lisp/emacs-lisp/eldoc.el:
Add "newline" to the eldoc-add-command-completions call (bug#27228).

7 years agoEnable eldoc-mode explicitly inside read--expression
Dmitry Gutov [Mon, 5 Jun 2017 22:04:04 +0000 (01:04 +0300)]
Enable eldoc-mode explicitly inside read--expression

* lisp/simple.el (read--expression): Call eldoc-mode (bug#27202).

7 years agoFix check for package-unsigned-archives during retrieval
Andy Moreton [Mon, 5 Jun 2017 22:01:55 +0000 (01:01 +0300)]
Fix check for package-unsigned-archives during retrieval

* lisp/emacs-lisp/package.el (package--download-one-archive):
Fix check for package-unsigned-archives.

7 years agoMerge etc/emacs-buffer.gdb from emacs-25 to master.
Noah Friedman [Mon, 5 Jun 2017 21:08:22 +0000 (14:08 -0700)]
Merge etc/emacs-buffer.gdb from emacs-25 to master.

7 years agoFix undefined behavior in mapbacktrace
Philipp Stephani [Mon, 5 Jun 2017 20:09:00 +0000 (22:09 +0200)]
Fix undefined behavior in mapbacktrace

* src/eval.c (Fmapbacktrace): Don't assume that PDL is still valid.

7 years agoFix emacs-module-tests on MS-Windows
Eli Zaretskii [Mon, 5 Jun 2017 16:16:04 +0000 (19:16 +0300)]
Fix emacs-module-tests on MS-Windows

* src/print.c (print_vectorlike): Make sure module function's
address prints with a leading "0x".  This fixes emacs-module-tests
on MS-Windows.  Fix whitespace.
* src/dynlib.c (dynlib_addr): Remove unused variable.  Update
commentary.

7 years agoUse unwind protection to clean up data structures in modules
Philipp Stephani [Mon, 5 Jun 2017 11:05:51 +0000 (13:05 +0200)]
Use unwind protection to clean up data structures in modules

Reuse existing functionality and simplify the code a bit.

* src/emacs-module.c (Fmodule_load): Use unwind protection to clean up
runtime object.
(funcall_module): Use unwind protection to clean up environment
object.
(finalize_environment): Simplify signature.
(finalize_environment_unwind, finalize_runtime_unwind): New functions.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Mon, 5 Jun 2017 11:00:07 +0000 (13:00 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoSome minor tweaks in tramp-tests.el
Michael Albinus [Mon, 5 Jun 2017 10:59:26 +0000 (12:59 +0200)]
Some minor tweaks in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
Let it pass for all gfvs based methods.
(tramp-test24-file-name-completion): Run method and host
completion for all syntaxes only when expensive tests are enabled.
Do not check host completion for gvfs based methods.
(tramp--test-gvfs-p): Add optional METHOD argument.
(tramp--test-afp-or-smb-p): Remove.

7 years agoFix error in Tramp rsync method
Michael Albinus [Mon, 5 Jun 2017 10:58:59 +0000 (12:58 +0200)]
Fix error in Tramp rsync method

* lisp/net/tramp-sh.el (tramp-methods) <rsync>: Add "-c" argument.
Otherwise, `tramp-test10-write-region' could fail.

7 years agoInline module_has_cleanup
Philipp Stephani [Mon, 5 Jun 2017 08:19:59 +0000 (10:19 +0200)]
Inline module_has_cleanup

This constant is only used once, and we fail compilation anyway if
it's false.

* src/emacs-module.c (MODULE_SETJMP_1): Inline __has_attribute.

7 years agoAdd missing dependency to test module source file
Philipp Stephani [Mon, 5 Jun 2017 08:04:20 +0000 (10:04 +0200)]
Add missing dependency to test module source file

7 years agoOmit space that broke ‘make check’
Paul Eggert [Mon, 5 Jun 2017 07:17:05 +0000 (00:17 -0700)]
Omit space that broke ‘make check’

* src/print.c (print_vectorlike): Omit stray space.

7 years agoRemove easserts etc. from emacs-module.c
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
Remove easserts etc. from emacs-module.c

Most of these seem to run afoul of the comment "Do NOT use
'eassert' for checking validity of user code in the module."
* src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw, module_make_string):
Remove unnecessary easserts that pointers are nonnull.
Hardware checks this for us nowadays, and the checks
just clutter up the code.
(module_extract_integer): Remove unnecessary verify that
a C signed integer is in the range INTMAX_MIN..INTMAX_MAX.
The C standard guarantees this.
(module_copy_string_contents): Remove unnecessary eassert
that Lisp strings are null-terminated.
(module_function_arity): Remove unnecessary easserts that
function arities are in range.

7 years agoRemove unnecessary checking in emacs-module.c
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
Remove unnecessary checking in emacs-module.c

* src/emacs-module.c (module_copy_string_contents):
Remove checking, as string lengths are always nonnegative and less
than STRING_BYTES_BOUND, and this is checked elsewhere.
(module_make_string): Check length against STRING_BYTES_BOUND, a
tighter bound than MOST_POSITIVE_FIXNUM.  (funcall_module): Don't
assume that an out-of-range integer is nonnegative.

7 years agoSCHARS and STRING_BYTES are nonnegative
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
SCHARS and STRING_BYTES are nonnegative

Tell the compiler that SCHARS and STRING_BYTES are nonnegative, in
the hopes that this will optimize a bit better.  Also, check this
at runtime if ENABLE_CHECKING.
* src/lisp.h (SCHARS, STRING_BYTES):
eassume that these functions return nonnegative values.
(STRING_SET_CHARS) [ENABLE_CHECKING]:
eassert that newsize is nonnegative.

7 years ago* lisp/desktop.el (desktop-clear): Skip the daemon's frame (Bug#26912).
Noam Postavsky [Mon, 5 Jun 2017 03:54:51 +0000 (23:54 -0400)]
* lisp/desktop.el (desktop-clear): Skip the daemon's frame (Bug#26912).

7 years agoRemove an unused error symbol
Philipp Stephani [Sun, 4 Jun 2017 17:35:52 +0000 (19:35 +0200)]
Remove an unused error symbol

* src/emacs-module.c (syms_of_module): Remove unused error symbol
'invalid-module-call'.

7 years agoSupport quitting in modules
Philipp Stephani [Sun, 4 Jun 2017 17:34:22 +0000 (19:34 +0200)]
Support quitting in modules

The idea is that modules should call env->should_quit from time to
time and return as quickly as possible if it returns true.

* src/emacs-module.c (module_should_quit): New module function.
(initialize_environment): Use it.
(funcall_module): Process potential pending quit.

* src/eval.c (maybe_quit): Add reference to module_should_quit.

7 years agoUse more specific errors for module load failure
Philipp Stephani [Sun, 4 Jun 2017 17:28:50 +0000 (19:28 +0200)]
Use more specific errors for module load failure

* src/emacs-module.c (syms_of_module): Add more specific error
symbols.
(Fmodule_load): Use them.

7 years agoRemove an unneeded assertion
Philipp Stephani [Sun, 4 Jun 2017 17:26:24 +0000 (19:26 +0200)]
Remove an unneeded assertion

* src/emacs-module.c (module_copy_string_contents): Remove unneeded
assertion.  If this assertion triggers, we raise an error anyway.

7 years agoGuard against signed integer overflows
Philipp Stephani [Sun, 4 Jun 2017 17:22:41 +0000 (19:22 +0200)]
Guard against signed integer overflows

* src/emacs-module.c (module_extract_integer)
(module_copy_string_contents, module_make_string): Guard against
signed integer overflows.

7 years agoAdd a couple more assertions to the module code
Philipp Stephani [Sun, 4 Jun 2017 17:19:30 +0000 (19:19 +0200)]
Add a couple more assertions to the module code

These can help module authors debug crashes.

* emacs-module.c (module_non_local_exit_check)
(module_non_local_exit_clear, module_non_local_exit_get)
(module_non_local_exit_signal, module_non_local_exit_throw)
(module_copy_string_contents, module_make_string)
(funcall_module, initialize_environment): Add assertions

7 years ago; Grammar fix
Philipp Stephani [Sun, 4 Jun 2017 17:16:07 +0000 (19:16 +0200)]
; Grammar fix

7 years ago; Small comment fix
Philipp Stephani [Sun, 4 Jun 2017 17:15:20 +0000 (19:15 +0200)]
; Small comment fix

* emacs-module.c (MODULE_FUNCTION_BEGIN): Don't say that the error
value should be a sentinel value, because in almost all cases it
isn't.

7 years agoUse ATTRIBUTE_MAY_ALIAS where alias violations are likely
Philipp Stephani [Sun, 4 Jun 2017 17:12:23 +0000 (19:12 +0200)]
Use ATTRIBUTE_MAY_ALIAS where alias violations are likely

In particular, alias violations are likely for the return values of
dlsym(3), which get cast around arbitrarily.

* src/emacs-module.c (Fmodule_load): Use ATTRIBUTE_MAY_ALIAS.

7 years agoSimplify interface of dynlib_attr.
Philipp Stephani [Sun, 4 Jun 2017 17:05:46 +0000 (19:05 +0200)]
Simplify interface of dynlib_attr.

Instead of returning bool, set the argument pointers to NULL if the
information is not available.

* src/dynlib.c (dynlib_addr): Don't return bool.

7 years agoRationalize environment lifetime management functions
Philipp Stephani [Sun, 4 Jun 2017 17:02:50 +0000 (19:02 +0200)]
Rationalize environment lifetime management functions

* src/emacs-module.c (Fmodule_load, funcall_module): Adapt callers.
(finalize_environment): Add parameter for public part of the
environment, like 'initialize_environment'.  Add assertions.

7 years agoRework printing of module functions
Philipp Stephani [Sun, 4 Jun 2017 16:57:51 +0000 (18:57 +0200)]
Rework printing of module functions

Fix a FIXME in emacs-module.c.  Put the printing into print.c, like
other types.

* src/print.c (print_vectorlike): Add code to print module functions.

* src/emacs-module.c (funcall_module): Stop calling
'module_format_fun_env'.  Now that module functions are first-class
objects, they can be added to signal data directly.
(module_handle_signal): Remove now-unused function
'module_format_fun_env'.

* test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test.

* src/eval.c (funcall_lambda): Adapt call to changed signature of
'funcall_module'.

7 years agoDefine helper macro to reduce code duplication
Philipp Stephani [Sun, 4 Jun 2017 16:50:42 +0000 (18:50 +0200)]
Define helper macro to reduce code duplication

* src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH): New helper
macro.
(MODULE_FUNCTION_BEGIN, module_type_of, module_is_not_nil, module_eq):
Use it.

7 years agoRemove two FIXMEs that can't be fixed
Philipp Stephani [Sun, 4 Jun 2017 16:46:23 +0000 (18:46 +0200)]
Remove two FIXMEs that can't be fixed

7 years agoAvoid slow startup in daemon mode when global-linum-mode is on
Eli Zaretskii [Sun, 4 Jun 2017 16:27:13 +0000 (19:27 +0300)]
Avoid slow startup in daemon mode when global-linum-mode is on

* lisp/linum.el (linum-on): Don't turn on linum-mode in a
non-client frame of a daemon session.  (Bug#27210)

7 years agoFix eldoc bug with curved quote
Paul Eggert [Sun, 4 Jun 2017 16:13:15 +0000 (09:13 -0700)]
Fix eldoc bug with curved quote

* lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
Substitute quotes in documentation before returning it (Bug#27159).

7 years agoTune ‘format’ after recent fix
Paul Eggert [Sun, 4 Jun 2017 15:39:37 +0000 (08:39 -0700)]
Tune ‘format’ after recent fix

* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat): Format field numbers no longer need
to be unique, reverting the previous doc change since that has
now been fixed.  Also, document that %% should not have modifiers.
* src/editfns.c (styled_format): Improve performance.  Remove
the need for the new prepass over the format string, by using
a typically-more-generous bound for the info array size.
Initialize the info array lazily.  Move string inspection to
the same area to help caching.  Avoid the need for a
converted_to_string bitfield by using EQ.  Cache arg in a
local and avoid some potential aliasing issues to help the
compiler.  Info array is now 0-origin, not 1-origin.

7 years agoImprove of file-local-name use in vc-git-checkin
Nikolay Kudryavtsev [Sun, 4 Jun 2017 07:59:49 +0000 (09:59 +0200)]
Improve of file-local-name use in vc-git-checkin

* lisp/vc/vc-git.el (vc-git-checkin): Use file-local-name only
when calling git commit.

7 years agoSupport a new CSS indentation style
Simen Heggestøyl [Sat, 3 Jun 2017 11:29:06 +0000 (13:29 +0200)]
Support a new CSS indentation style

* lisp/textmodes/css-mode.el (css-smie-rules): Indent after property
immediately followed by a newline.

* test/manual/indent/css-mode.css: Add test for the change above.

* test/manual/indent/scss-mode.scss: Ditto.

7 years ago; Fix off-by-one error
Philipp Stephani [Sat, 3 Jun 2017 09:42:07 +0000 (11:42 +0200)]
; Fix off-by-one error

7 years agoFix a bug when using format field numbers
Philipp Stephani [Sat, 3 Jun 2017 09:16:21 +0000 (11:16 +0200)]
Fix a bug when using format field numbers

Previously styled_format overwrite the argument vector.  This is no
longer possible because there might be more than one specification per
argument.  Use the existing auxiliary info array instead.

* src/editfns.c (styled_format): Record arguments in the info
structure instead of overwriting them.
* test/src/editfns-tests.el (format-with-field): Add unit test.

7 years agoDocument uniqueness limitation of ‘format’
Paul Eggert [Sat, 3 Jun 2017 08:31:04 +0000 (01:31 -0700)]
Document uniqueness limitation of ‘format’

* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat):
Document that field numbers should be unique within a format.

7 years agoSmall rmailmm fix (bug#27203)
Glenn Morris [Sat, 3 Jun 2017 00:42:01 +0000 (20:42 -0400)]
Small rmailmm fix (bug#27203)

* lisp/mail/rmailmm.el (rmail-mime-insert-bulk):
Fall back to HOME if no match in rmail-mime-attachment-dirs-alist.

7 years ago* admin/authors.el (authors-aliases): Addition.
Glenn Morris [Sat, 3 Jun 2017 00:29:34 +0000 (20:29 -0400)]
* admin/authors.el (authors-aliases): Addition.

7 years agoAdd watch for password back to inferior python comint filter
Glenn Morris [Sat, 3 Jun 2017 00:06:12 +0000 (20:06 -0400)]
Add watch for password back to inferior python comint filter

It was removed along with other items for speed (bug#16875),
but doesn't seem to have been causing an issue, and it's useful to
have it there (bug#27154).
* lisp/progmodes/python.el (inferior-python-mode):
Add comint-watch-for-password-prompt to comint-output-filter-functions.

7 years agoUse completing-read-default in tmm-prompt
Ryan [Sat, 3 Jun 2017 00:00:49 +0000 (20:00 -0400)]
Use completing-read-default in tmm-prompt

tmm uses completing-read, but customizes its behavior so much
that any alternative completing-read-function will almost
certainly break it.  For example, both ido-ubiquitous and ivy have
special code to deactivate themselves for tmm.
* lisp/tmm.el (tmm-prompt): Use completing-read-default instead of
completing-read.  (Bug#27193)

Copyright-paperwork-exempt: yes

7 years ago* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371)
Mats Lidell [Fri, 2 Jun 2017 20:16:01 +0000 (22:16 +0200)]
* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371)

7 years agoFix with-todo-test
Glenn Morris [Fri, 2 Jun 2017 17:14:44 +0000 (13:14 -0400)]
Fix with-todo-test

* test/lisp/calendar/todo-mode-tests.el (with-todo-test):
HOME should be a directory, not a file.  Delete it when finished.

7 years agoUpdate TUTORIAL.it
Lele Gaifax [Fri, 2 Jun 2017 14:06:55 +0000 (17:06 +0300)]
Update TUTORIAL.it

* etc/tutorials/TUTORIAL.it: Adjust to recent changes in TUTORIAL.

Copyright-paperwork-exempt: yes

7 years ago; * doc/emacs/emacs-xtra.texi: Explain in a comment the purpose of this file.
Eli Zaretskii [Fri, 2 Jun 2017 12:27:55 +0000 (15:27 +0300)]
; * doc/emacs/emacs-xtra.texi: Explain in a comment the purpose of this file.

7 years agoFix cursor position in Dired buffers after dired-sort-toggle
Eli Zaretskii [Fri, 2 Jun 2017 09:53:57 +0000 (12:53 +0300)]
Fix cursor position in Dired buffers after dired-sort-toggle

* src/xdisp.c (display_and_set_cursor): Record cursor coordinates
even if the frame is marked as garbaged.  (Bug#27187)

7 years agoUpdate TUTORIAL.he
Eli Zaretskii [Fri, 2 Jun 2017 06:27:09 +0000 (09:27 +0300)]
Update TUTORIAL.he

* etc/tutorials/TUTORIAL.he: Adjust to recent changes in TUTORIAL.

7 years ago* etc/tutorials/TUTORIAL: Explain how to stop the tutorial (Bug#20371).
Noam Postavsky [Fri, 2 Jun 2017 02:54:09 +0000 (22:54 -0400)]
* etc/tutorials/TUTORIAL: Explain how to stop the tutorial (Bug#20371).

7 years agoLimit format fields to more POSIX-like spec
Paul Eggert [Thu, 1 Jun 2017 23:03:12 +0000 (16:03 -0700)]
Limit format fields to more POSIX-like spec

* doc/lispref/strings.texi (Formatting Strings):
Don’t allow mixing numbered with unnumbered format specs.
* src/editfns.c (styled_format): Don’t bother checking for field 0,
since it doesn’t crash and the behavior is not specified.
* test/src/editfns-tests.el (format-with-field): Adjust tests to
match current doc.  Add more tests for out-of-range fields.

7 years agoImprove performance by avoiding strtoumax
Paul Eggert [Thu, 1 Jun 2017 23:03:12 +0000 (16:03 -0700)]
Improve performance by avoiding strtoumax

This made (string-to-number "10") 20% faster on my old desktop,
an AMD Phenom II X4 910e running Fedora 25 x86-64.
* admin/merge-gnulib (GNULIB_MODULES): Remove strtoumax.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, m4/strtoull.m4:
* m4/strtoumax.m4: Remove.
* src/editfns.c (str2num): New function.
(styled_format): Use it instead of strtoumax.  Use ptrdiff_t
instead of uintmax_t.  Check for integer overflow.
* src/lread.c (LEAD_INT, DOT_CHAR, TRAIL_INT, E_EXP):
Move to private scope and make them enums.
(string_to_number): Compute integer value directly during
first pass instead of revisiting it with strtoumax later.

7 years agoMinor improvements to format field numbers
Paul Eggert [Thu, 1 Jun 2017 05:09:39 +0000 (22:09 -0700)]
Minor improvements to format field numbers

* src/editfns.c (styled_format): Allow field numbers in a %% spec.
No need for a special diagnostic for field numbers greater than
PTRDIFF_MAX.  Reword diagnostic for field 0.
* test/src/editfns-tests.el (format-with-field): Adjust to match.

7 years agoImplement field numbers in format strings
Philipp Stephani [Wed, 31 May 2017 22:09:43 +0000 (00:09 +0200)]
Implement field numbers in format strings

A field number explicitly specifies the argument to be formatted.
This is especially important for potential localization work, since
grammars of various languages dictate different word orders.

* src/editfns.c (Fformat): Update documentation.
(styled_format): Implement field numbers.

* doc/lispref/strings.texi (Formatting Strings): Document field numbers.

* lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt.

* test/src/editfns-tests.el (format-with-field): New unit test.

7 years agoLimit scope of local overriding-terminal-local-map
Alexander Gramiak [Mon, 29 May 2017 19:43:23 +0000 (13:43 -0600)]
Limit scope of local overriding-terminal-local-map

The function `binding' may call isearch-done, which globally sets
overriding-terminal-local-map to nil (Bug#23007).
* lisp/isearch.el (isearch-mouse-2): Don't bind
overriding-terminal-local-map around the call to `binding'.

7 years agoCorrect and isolate the todo-mode test environment
Stephen Berman [Thu, 1 Jun 2017 20:15:50 +0000 (22:15 +0200)]
Correct and isolate the todo-mode test environment

This avoids having to set todo-mode variables globally in the test
file and prevents any exisiting user todo-mode files from influencing
the tests.

* test/lisp/calendar/todo-mode-tests.el:
(with-todo-test): New macro.
(todo-test-todo-quit01, todo-test-todo-quit02)
(todo-test-item-highlighting): Use it.

7 years agoFix build errors on macOS 10.6 (bug#27059)
Alan Third [Tue, 30 May 2017 18:48:17 +0000 (19:48 +0100)]
Fix build errors on macOS 10.6 (bug#27059)

* src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.

7 years agoImprove testing of octal and hex display of raw bytes
Eli Zaretskii [Thu, 1 Jun 2017 18:29:24 +0000 (21:29 +0300)]
Improve testing of octal and hex display of raw bytes

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): Add a test with a large codepoint.

7 years agoAdd customizable to display raw bytes as hex
Vasilij Schneidermann [Thu, 1 Jun 2017 18:25:58 +0000 (21:25 +0300)]
Add customizable to display raw bytes as hex

* src/xdisp.c (get_next_display_element): Dispatch used format string
for unprintables based on new display-raw-bytes-as-hex variable.
(display-raw-bytes-as-hex): New variable.  (Bug#27122)

* lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.

* doc/emacs/display.texi: Document the new variable.
* etc/NEWS: Mention display-raw-bytes-as-hex.

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): New tests.
(test-redisplay): Call test-redisplay-5.

7 years agoRevert "Add customizable to display raw bytes as hex"
Eli Zaretskii [Thu, 1 Jun 2017 18:24:15 +0000 (21:24 +0300)]
Revert "Add customizable to display raw bytes as hex"

This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.

7 years agoAdd customizable to display raw bytes as hex
Eli Zaretskii [Thu, 1 Jun 2017 18:12:39 +0000 (21:12 +0300)]
Add customizable to display raw bytes as hex

* src/xdisp.c (get_next_display_element): Dispatch used format string
for unprintables based on new display-raw-bytes-as-hex variable.
(display-raw-bytes-as-hex): New variable.  (Bug#27122)

* lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.

* doc/emacs/display.texi: Document the new variable.
* etc/NEWS: Mention display-raw-bytes-as-hex.

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): New tests.
(test-redisplay): Call test-redisplay-5.

7 years agoFix linum under text-scaling when leuven-theme is used
Eli Zaretskii [Thu, 1 Jun 2017 14:55:25 +0000 (17:55 +0300)]
Fix linum under text-scaling when leuven-theme is used

* etc/themes/leuven-theme.el (linum): Make the 'linum' face
inherit from 'default' and 'shadow', so that margins are enlarged
as expected under text-scaling.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Jun 2017 10:26:41 +0000 (06:26 -0400)]
; Auto-commit of loaddefs files.

7 years agoFree cwd when no longer needed
Paul Eggert [Thu, 1 Jun 2017 05:38:04 +0000 (22:38 -0700)]
Free cwd when no longer needed

* lib-src/emacsclient.c (main): Don’t dally when freeing cwd.

7 years agoFix memory leak of cwd string in emacsclient (Bug#26628)
Anders Waldenborg [Sun, 23 Apr 2017 19:15:46 +0000 (21:15 +0200)]
Fix memory leak of cwd string in emacsclient (Bug#26628)

* lib-src/emacsclient.c (main): emacsclient retrieves the current
working directory using get_current_dir_name which returns a newly
allocated string.  Make sure this string is freed before exiting.

Copyright-paperwork-exempt: yes