Richard Stallman [Wed, 12 Aug 2015 15:21:49 +0000 (11:21 -0400)]
Re-enable mime processing after decryption. Add 'decrypt' keyword.
* rmail.el (rmail-epa-decrypt-1): New subroutine.
(rmail-epa-decrypt): rmail-epa-decrypt-1 broken out.
In a mime message, reenable Mime and show the parts that
were shown before.
Add keyword "decrypt" if anything decrypted.
* test/automated/elisp-mode-tests.el (xref-elisp-test-run): Split out
from xref-elisp-test for ease of debugging.
(xref-elisp-deftest): Rename from xref-elisp-test.
(find-defs-constructor): New test.
(find-defs-defgeneric-el): Match batch test config.
(compile): Required for find-defs compilation-minor-mode test.
(find-defs-defvar-el): Match code change.
(find-defs-face-el): Match code change.
Jürgen Hötzel [Tue, 11 Aug 2015 06:57:45 +0000 (08:57 +0200)]
; Fix prompt in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-prompt): Match leading escape
sequence. Recent adb version send initial escape sequences, even
when terminal type is set to TERM=dumb.
Stephen Leake [Tue, 11 Aug 2015 02:53:19 +0000 (21:53 -0500)]
Rewrite elisp--xref-find-definitions to handle many more cases; add tests.
* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location): deleted
(elisp--xref-format-cl-defmethod): new
(find-feature-regexp): new
(find-alias-regexp): new
(elisp--xref-make-xref): new
(elisp--xref-find-definitions): Rewrite using the above, handle many more
cases. Always output all available definitions.
(xref-location-marker): No need for special cases.
* test/automated/elisp-mode-tests.el: Add more tests of
elisp--xref-find-definitions, improve current tests.
Eli Zaretskii [Mon, 10 Aug 2015 18:15:03 +0000 (21:15 +0300)]
Fix recording of events pushed onto unread-command-events
* src/keyboard.c (read_char): Make sure events read from
unread-command-events and unread-post-input-method-events are
always recorded by record_char. Reported by David Kastrup
<dak@gnu.org>, see
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00193.html.
Eli Zaretskii [Mon, 10 Aug 2015 17:01:31 +0000 (20:01 +0300)]
Avoid setting LC_NUMERIC on MS-Windows to anything but "C"
* src/emacs.c (synchronize_locale) [WINDOWSNT]: Call fixup_locale
after setting LC_ALL to the desired locale, to avoid affecting how
numbers are read and printed. (Bug#21223)
Paul Eggert [Mon, 10 Aug 2015 06:23:14 +0000 (23:23 -0700)]
Fix DPI calculation when Xft/DPI is default
* src/xsettings.c (parse_settings): Don't use Xft/DPI default
value of -1, which evaluates to 2**32 - 1 (Bug#21152).
Remove unnecessary cast while we're in the neighborhood.
Paul Eggert [Sun, 9 Aug 2015 23:21:05 +0000 (16:21 -0700)]
Fix some minor quoting issues with grave accent
* src/dispnew.c (add_window_display_history) [GLYPH_DEBUG]:
Remove redundant quotes.
* src/doc.c (uLSQM, uRSQM): New macros.
* src/doc.c (Fsubstitute_command_keys):
* src/syntax.c (Finternal_describe_syntax_value): Follow the user
preference for quotes rather than hardcoding the ‘grave’ style.
* src/regex.c (PUSH_FAILURE_POINT, POP_FAILURE_POINT)
(re_match_2_internal) [DEBUG]: In debugging output, quote C
strings with "...", not `...'.
Paul Eggert [Sun, 9 Aug 2015 14:48:00 +0000 (07:48 -0700)]
Remove no-op calls to substitute-command-keys
* lisp/org/org-src.el (org-edit-src-code)
(org-edit-fixed-width-region):
* lisp/simple.el (completion-setup-function):
Remove calls to substitute-command-keys that always just return
their argument.
Ivan Kanis [Sun, 9 Aug 2015 09:27:38 +0000 (10:27 +0100)]
fix link to source code in help window
* lisp/help-fns.el (find-lisp-object-file-name): remove code that
will never work due to Glenn Morris change a6d63d9 on Apr 20 2013
'No longer include timestamp in header of .elc files'. Add code
that will return .el source file in load-path.
Stefan Monnier [Sat, 8 Aug 2015 23:41:57 +0000 (19:41 -0400)]
* org.el: Fix up some lexical scoping warnings, and use dolist
* lisp/org/org.el (org-set-regexps-and-options-for-tags, org-goto-map)
(org-set-regexps-and-options, org-assign-fast-keys)
(org-contextualize-keys, org-contextualize-validate-key)
(org-notes-order-reversed-p, org-local-logging, org-map-entries)
(org-find-olp, org-find-exact-heading-in-directory)
(org-cycle-agenda-files, org-release-buffers, org-fill-template)
(org-agenda-prepare-buffers, org-occur-in-agenda-files)
(org-replace-escapes): Use dolist.
(org-mode): Optimize away XEmacs-only code.
(org-refile-get-targets): Remove unused var `f'.
(org-fast-todo-selection): Remove unused var `e'.
(org-make-tags-matcher): Use dolist. Remove unused var `term'.
(org-fast-tag-selection): Use dolist. Remove unused var `e'.
(org-format-latex): Use dolist. Remove unused var `e'.
(org-toggle-heading): Access vars lexically rather than dynamically.
(org-backward-sentence, org-forward-sentence, org-meta-return)
(org-kill-line): Mark arg as unused.
(org-submit-bug-report): Silence compiler warning.
(org-occur-in-agenda-files): Don't use add-to-list on local vars.
(org-get-cursor-date): Remove unused var `tm'.
(org-comment-or-uncomment-region): Use standard name `_'.
(reftex-docstruct-symbol, reftex-cite-format): Declare to
silence byte-compiler.
(org-reftex-citation): Add `org--' prefix to dynamically scoped
`rds' var.
Paul Eggert [Sat, 8 Aug 2015 16:47:37 +0000 (09:47 -0700)]
Electric quote if coding is undecided or no conv
* lisp/electric.el (electric--insertable-p): Also say that a
string is insertable if the buffer file coding system is undecided
or uses no conversion, as curved quotes will work in either case.
Eli Zaretskii [Sat, 8 Aug 2015 13:55:26 +0000 (16:55 +0300)]
Fix overlay string display regressions introduced in Emacs 24.5
* src/xdisp.c (pop_it): Reset the flag to ignore overlays at this
buffer position, if we move the iterator to a new position as
result of jumping over text covered by a "replacing" display
property.
* test/redisplay-testsuite.el (test-redisplay-4): Add 2 new tests.
Eli Zaretskii [Sat, 8 Aug 2015 08:12:06 +0000 (11:12 +0300)]
Support recovery from C stack overflow on MS-Windows
* src/w32fns.c (w32_reset_stack_overflow_guard)
(stack_overflow_handler): New functions for handling C stack
overflow exceptions.
(my_exception_handler): Handle EXCEPTION_STACK_OVERFLOW exceptions
specially, and zero out except_addr if we do.
(globals_of_w32fns): Initialize dwMainThreadId in non-interactive
mode.
* src/sysdep.c [HAVE_STACK_OVERFLOW_HANDLING]: Add !WINDOWSNT to
the condition, as HAVE_STACK_OVERFLOW_HANDLING is now defined for
the MinGW build, but the code guarded by that is for Posix hosts.
* src/keyboard.c (command_loop) [WINDOWSNT]: Call
w32_reset_stack_overflow_guard.
* nt/inc/ms-w32.h (sigjmp_buf): New typedef.
(sigsetjmp): New macro.
(w32_reset_stack_overflow_guard): Declare the prototype.
* configure.ac (HAVE_STACK_OVERFLOW_HANDLING): Set to 1 for MinGW.
Phillip Lord [Fri, 7 Aug 2015 21:12:59 +0000 (22:12 +0100)]
Improve error signalling for seq-subseq.
The existing behaviour for seq-subseq is to error when indexes are too
large, but to silently ignore numbers which are too negative for lists.
String and vector handling errors in both cases. This has been
regularlised.
Error signalling behaviour has been explicitly added to the docstring of
seq-subseq, and also to cl-subseq which largely defers to
seq-subseq (and is therefore also impacted by this change).
Tests have been added for these exceptional cases, as well as one non
exceptional base case.
Eli Zaretskii [Fri, 7 Aug 2015 13:42:24 +0000 (16:42 +0300)]
Avoid infinite loop in display of invisible text in strings
* src/xdisp.c (handle_invisible_prop): If the next change of
invisibility spec does not mean the beginning of a visible text,
update the string position from which to start the search for the
next invisibility change. This avoids an infinite loop when we
have more than one invisibility spec that are made inactive by
buffer-invisibility-spec. Simplify code. (Bug#21200)
* test/redisplay-testsuite.el (test-redisplay-4): Add a test case
for the situation that caused bug #21200.
Dmitry Gutov [Wed, 5 Aug 2015 12:18:25 +0000 (15:18 +0300)]
Preserve window point in xref-find-definitions-other-window
Fix the problem reported by Ingo Logmar in
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00152.html
* lisp/progmodes/xref.el (xref--goto-char): Extract from
xref--goto-location.
(xref--pop-to-location): Use it. Replace xref--goto-location with
a direct xref-location-marker call.
(xref--show-location): Likewise.
(xref--display-position): Use xref--goto-char.
Ingo Lohmar [Mon, 3 Aug 2015 16:49:55 +0000 (18:49 +0200)]
Add new 'calendar-weekend-days' option
Make the days receiving the `calendar-weekend-header' face freely
customizable, as they differ by region/culture.
* doc/emacs/calendar.texi: Document the new variable.
* lisp/calendar/calendar.el (calendar-generate-month): New variable
calendar-weekend-days to customize day header fontification.
Paul Eggert [Sun, 2 Aug 2015 22:58:02 +0000 (15:58 -0700)]
Redo text-quoting-style variable
Rename help-quote-translation to text-quoting-style,
and use symbols rather than characters as values.
This follows suggestions along these lines by Alan Mackenzie in:
http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00343.html
and by Drew Adams in:
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00048.html
* doc/lispref/help.texi (Keys in Documentation)
* etc/NEWS:
* lisp/cus-start.el (standard):
* src/doc.c (Fsubstitute_command_keys, syms_of_doc):
Document and/or implement the new behavior instead of the old.
(syms_of_doc): New symbols 'grave' and 'straight'.
Paul Eggert [Sun, 2 Aug 2015 21:55:15 +0000 (14:55 -0700)]
Treat help strings like other doc strings
* doc/lispref/text.texi (Special Properties), etc/NEWS: Document this.
* lisp/epa.el (epa--select-keys): Remove no-longer-needed calls to
substitute-command-keys.
* src/keyboard.c (show_help_echo, parse_menu_item): Call
substitute-command-keys on the help string before displaying it.
Paul Eggert [Sun, 2 Aug 2015 19:43:20 +0000 (12:43 -0700)]
Also mention "curly quotes"
See Drew Adams's email in:
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00040.html
* doc/lispref/help.texi (Keys in Documentation):
Add index entry "curly quotes".
* etc/NEWS: Use the phrase "curly quotes" too.
Ingo Lohmar [Sun, 2 Aug 2015 15:20:53 +0000 (17:20 +0200)]
Add option `calendar-weekend-days'
Previously, the face `calendar-weekend-header' was invariably applied to
Sundays and Saturdays, although weekend days differ by region/culture.
Making the days freely customizable, independent of
`calendar-week-start-day', should cover all possible scenarios.
Paul Eggert [Sun, 2 Aug 2015 15:27:13 +0000 (08:27 -0700)]
ede-proj-target-makefile docstring tweaks
* lisp/cedet/ede/proj.el (ede-proj-target-makefile):
Consistently use "all:" to describe the all: target,
replacing three different and confusingly-quoted usages.
Eli Zaretskii [Sun, 2 Aug 2015 14:40:19 +0000 (17:40 +0300)]
Fix handling of 1st keystroke on MS-Windows
* src/w32fns.c (globals_of_w32fns): Initialize after_deadkey to -1.
This is needed to correctly handle the session's first keystroke,
if it has any modifiers. (Bug#19994)
Paul Eggert [Sun, 2 Aug 2015 07:04:51 +0000 (00:04 -0700)]
Substitute some customization etc. doc strings
These changes apply substitute-command-keys to some
doc strings that were going through untranslated
when creating customization or other widgets.
* lisp/cus-edit.el (custom-group-value-create):
* lisp/wid-edit.el (widget-default-create):
(widget-push-button-value-create):
Treat the widget tag as a doc string.
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slot):
Treat the :documentation value as a doc string.
* lisp/wid-edit.el (widget-choose):
Treat the choice names as doc strings.
(widget-default-create): Treat the :doc value as a doc string.
(widget-toggle-value-create): Treat the :on and :off values
as doc strings.
(widget-documentation-string-value-create):
Substitute the doc string.
Eli Zaretskii [Sat, 1 Aug 2015 09:10:45 +0000 (12:10 +0300)]
Honor 'line-spacing' for empty lines
* src/xdisp.c (append_space_for_newline): Honor 'line-height'
property and 'line-spacing' frame parameter or variable or
property for empty lines, by doing the same processing as in
x_produce_glyph for newline characters. (Bug#21165)
Paul Eggert [Fri, 31 Jul 2015 16:55:49 +0000 (09:55 -0700)]
Fix some int overflows in profiler.c
* src/profiler.c (make_log): Make args EMACS_INT, not int,
to avoid unwanted behavior on 'int' overflow.
(make_log, evict_lower_half, record_backtrace):
Use ptrdiff_t, not int, for object indexes.
Eli Zaretskii [Fri, 31 Jul 2015 09:14:07 +0000 (12:14 +0300)]
Allow to use the old key processing code on MS-Windows
* src/w32fns.c (syms_of_w32fns) <w32-use-fallback-wm-chars-method>:
New variable.
(w32_wnd_proc): Use it to invoke the old code that processed
character keys, as fallback, when this variable is non-nil. Fix
typos in comments. (Bug#19994)
Improve handling of Unicode keyboard input on MS-Windows
* src/w32fns.c (get_wm_chars, deliver_wm_chars): New functions.
(FPRINTF_WM_CHARS) [DEBUG_WM_CHARS]: New macro for debugging.
(w32_wnd_proc): Call deliver_wm_chars to process non-special keys
upon receiving WM_KEYDOWN or WM_SYSKEYDOWN messages. If that is
successful, don't call TranslateMessage. (Bug#19994)
Fix default-directory in changeset diffs after vc-print-log
* lisp/vc/log-view.el (log-view-diff-common): Move the
revision-granularity check back into log-view-diff-changeset.
(log-view-diff-changeset): Bind default-directory to the current
VC root.
* lisp/progmodes/project.el (project-search-path-function)
(project-search-path): Update the docstring.
(project-directories): Rename to `project-roots', update all
callers and implementations accordingly.
(project-root): Remove.
* lisp/progmodes/xref.el (xref-find-regexp): Use * instead of *.*
as the default file mask.
Eli Zaretskii [Thu, 30 Jul 2015 16:50:51 +0000 (19:50 +0300)]
Support long URLs in w32-shell-execute
* src/w32fns.c (Fw32_shell_execute): Don't use filename_to_utf16
and filename_to_ansi to convert the DOCUMENT argument, as it could
be a URL that is not limited to MAX_PATH characters. Instead, use
MultiByteToWideChar directly, and allocate heap storage as
required to accommodate the converted string. Likewise with
non-Unicode operation. Ensure OPERATION is null-terminated, even
if it is longer than 32K bytes. (Bug#21158)
* lisp/net/tramp-sh.el (tramp-methods) <nc>: Separate STDERR.
(tramp-do-copy-or-rename-file-out-of-band): Increase timeout of
netstat to 60".
(tramp-sh-handle-start-file-process): Do not show hops in prompt.
* lisp/net/tramp.el (tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory, tramp-handle-file-remote-p):
Keep hop in result.
* test/automated/tramp-tests.el (tramp-test02-file-name-dissect):
Add hop tests.
Eli Zaretskii [Wed, 29 Jul 2015 17:52:23 +0000 (20:52 +0300)]
Resurrect highlighting of repeated words by Flyspell Mode
* lisp/textmodes/flyspell.el (flyspell-word): Leave some non-word
characters between point and the doublon candidate, so that
flyspell-word-search-backward finds it. (Bug#21157)
Eli Zaretskii [Wed, 29 Jul 2015 17:02:56 +0000 (20:02 +0300)]
Fix redisplay of large images on expose events
* src/xdisp.c (expose_window, expose_area): Avoid comparisons
between signed negative values and unsigned values. This
prevented redisplay on expose events when the window showed a very
large image.
Paul Eggert [Wed, 29 Jul 2015 04:41:59 +0000 (21:41 -0700)]
Remove unnecessary stack overflow dependency
* configure.ac (HAVE_STACK_OVERFLOW_HANDLING):
Don't worry about $ac_cv_header_sys_resource_h and
$ac_cv_func_getrlimit, as they're no longer needed for this.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00443.html
* src/w32proc.c (Fw32_get_codepage_charset): Avoid compilation
warning.
(CompareStringW_Proc): New typedef.
(w32_compare_strings): Use it, to pacify compiler warnings under
"-Wincompatible-pointer-types".
* src/w32fns.c (GetDiskFreeSpaceExW_Proc)
(GetDiskFreeSpaceExA_Proc): New typedefs.
(Ffile_system_info): Use them, to pacify compiler warnings under
"-Wincompatible-pointer-types".