1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00
Commit Graph

121970 Commits

Author SHA1 Message Date
Paul Eggert
1552e67373 Fix bug that munged selection info
On some optimizing C compilers, copying a structure did not
copy the padding bytes between elements, and the type punning
between struct input_data and struct selection_input_data did
not work.  Change the C code to use a proper union type instead.
Problem reported by YAMAMOTO Mitsuharu (Bug#20756).
* src/keyboard.c (kbd_buffer, kbd_fetch_ptr, kbd_store_ptr)
(readable_events, discard_mouse_events, kbd_buffer_events_waiting)
(kbd_buffer_get_event, process_special_events, stuff_buffered_input)
(mark_kboards):
Use union buffered_input_event, not struct input_event.
(clear_event, deliver_input_available_signal, process_special_events):
Remove unnecessary forward decls.
(kbd_buffer_store_buffered_event): New function, mostly just the
old kbd_buffer_store_event_hold, except its argument is of type
union buffered_input_event, not struct input_event.
(kbd_buffer_unget_event): Define only if HAVE_X11, since it's
not needed otherwise.  Argument is now of type
struct selection_input_event *, not struct input_event *.
All callers changed.
(clear_event): Arg is now of type union buffered_input_event *,
not struct input_event *.  All callers changed.
* src/keyboard.h [HAVE_X11]: Include "xterm.h".
(union buffered_input_event): New type.
(kbd_buffer_store_event_hold): Now an inline function,
defined here.
* src/termhooks.h (EVENT_KIND_WIDTH): New constant.
(struct input_event): Use it.
* src/xselect.c (struct selection_event_queue):
Make elements be of type struct selection_input_event,
not struct input_event.
(selection_input_event_equal): New static function.
(x_queue_event): Use it.
(x_queue_event, x_decline_selection_request)
(x_selection_current_request, x_reply_selection_request)
(x_handle_selection_request, x_handle_selection_clear)
(x_handle_selection_event): Use struct selection_input_event,
not struct input_event.  All callers changed.
(x_convert_selection): Omit unused first arg.  All callers changed.
(Fx_disown_selection_internal): Omit unnecessary union.
* src/xterm.c (handle_one_xevent): Use new union buffered_input_event
rather than rolling our own equivalent.  Prefer sie.kind when
setting up that kind of structure.
Call kbd_buffer_store_buffered_event, not kbd_buffer_store_event_hold.
* src/xterm.h (struct selection_input_event: Use EVENT_KIND_WIDTH.
(SELECTION_EVENT_DISPLAY, SELECTION_EVENT_DPYINFO)
(SELECTION_EVENT_REQUESTOR, SELECTION_EVENT_SELECTION)
(SELECTION_EVENT_TARGET, SELECTION_EVENT_PROPERTY)
(SELECTION_EVENT_TIME, x_handle_selection_event):
Arg is now of type struct selection_input_event *)
not struct input_event *.  All callers changed.
2015-06-23 16:30:58 -07:00
Glenn Morris
8769d0fe79 * Makefile.in (install-arch-dep): Simplify with Make conditionals. 2015-06-23 16:44:07 -04:00
Artur Malabarba
c7a19e0c80 * lisp/isearch.el: Fold many unicode characters to ASCII
(isearch-character-fold-search, isearch--character-fold-extras)
(isearch--character-fold-table): New variable.
(isearch--character-folded-regexp): New function.
(isearch-search-fun-default): Use them.

* lisp/replace.el (replace-character-fold): New variable.
(replace-search): Use it.

* etc/NEWS: Document it.
2015-06-23 20:09:06 +01:00
Glenn Morris
2ca5558395 Check for an input event before showing a dialog box. (Bug#20813)
* lisp/subr.el (y-or-n-p):
* src/fns.c (Fyes_or_no_p): Check last-input-event as well
as last-nonmenu-event.
2015-06-23 14:02:24 -04:00
Jürgen Hartmann
abe07ef01c Respect ‘switch-to-visible-buffer’ more rigidly. (Bug#20861)
* lisp/window.el (switch-to-visible-buffer): Doc adjustment.
(switch-to-prev-buffer, switch-to-next-buffer): Respect
switch-to-visible-buffer independent of the windows history.

Copyright-paperwork-exempt: yes
2015-06-23 17:43:58 +02:00
Paul Eggert
931f00677d * src/keyboard.c (last_timer_event): Remove unused var. 2015-06-23 07:50:06 -07:00
Artur Malabarba
8b169764ad * test/automated/package-test.el (package-test-update-listing):
Fix test.
2015-06-23 09:40:56 +01:00
Glenn Morris
371ebe02a6 Revert 2014-06-25 nextstep/Makefile change.
* nextstep/Makefile.in (${ns_appbindir}): Remove rule.
(${ns_appbindir}/Emacs, links): Create ns_appbindir in the rule,
not as an order-only prerequisite.
2015-06-22 23:53:22 -07:00
Glenn Morris
d97fbcbedc * configure.ac (--with-ns): Enable by default on OS X.
; * etc/NEWS, nextstep/INSTALL: Mention this.
2015-06-22 22:03:33 -04:00
Leo Liu
eccfc0a487 Fix shell-for/backward-command to exclude spaces
* lisp/shell.el (shell-forward-command, shell-backward-command):
  Handle the 'move case from re-search-forward/backward.

  fixes debbugs:20873
2015-06-23 09:19:36 +08:00
Juri Linkov
1b1b6644c8 * lisp/replace.el (query-replace-read-from): Add separator to
the local binding of text-property-default-nonsticky.  (Bug#20690)
2015-06-23 01:59:23 +03:00
Juri Linkov
d010523177 * lisp/simple.el (shell-command-on-region): Replace 'error' with 'user-error'.
(Bug#20785)
2015-06-23 01:45:33 +03:00
Ken Brown
531125e4c0 Enable CPU profiling on Cygwin
* src/syssignal.h [CYGWIN] (PROFILER_CPU_SUPPORT): Revert previous
change that undefined this.
(SIGEV_SIGNAL): Ensure that this is defined as a macro.
* src/profiler.c [CYGWIN] (timer_getoverrun): Define as a macro on
  Cygwin.
2015-06-22 17:38:35 -04:00
Ken Brown
dc30fb9247 Improve diagnostics of profiler-cpu-start
* src/profiler.c (setup_cpu_timer): Change return type to 'int';
return -1 if the sampling interval is invalid.
(Fprofiler_cpu_start): Improve error message if 'setup_cpu_timer'
fails.  (Bug#20843)
2015-06-22 15:26:44 -04:00
Artur Malabarba
567bf811dc * lisp/emacs-lisp/package.el: Exclude packages by name
(package-hidden-regexps): New variable.
(package-menu--refresh): Use it.
(package-menu-hide-package): New command.
2015-06-22 19:02:08 +01:00
Artur Malabarba
a9d9b66ebb * lisp/emacs-lisp/package.el: Rename hide-obsolete to toggle-hiding 2015-06-22 19:02:08 +01:00
Eli Zaretskii
c4c531bbee Fix debug-timer-check on systems without HAVE_TIMERFD
* src/atimer.c (Fdebug_timer_check) [!HAVE_TIMERFD]: Actively run
the expired timers, since wait_reading_process_output doesn't.
(debug_timer_callback): Enlarge the tolerance to 20 msec.
2015-06-22 19:11:45 +03:00
Eli Zaretskii
fff0184e38 Fix RCS crashes in vc-test
* lisp/vc/vc-rcs.el (vc-rcs-register): Avoid crashes with some old
ports of 'ci' on MS-Windows by always passing the -t- switch.
2015-06-22 19:06:23 +03:00
Glenn Morris
14eba49418 * doc/emacs/package.texi (Packages):
* doc/emacs/trouble.texi (Known Problems): Remove faq cross-references.
2015-06-22 08:35:21 -07:00
Glenn Morris
7973c83bbc * doc/misc/efaq-w32.texi (Downloading): Copyedits. (Bug#20851) 2015-06-22 00:02:34 -07:00
Paul Eggert
f3cec81955 Port tests to help-quote-translation
* test/automated/ert-x-tests.el (ert-test-describe-test):
* test/automated/package-test.el (package-test-describe-package)
(package-test-signed): Allow straight quotes, too.
2015-06-21 23:10:17 -07:00
Dmitry Gutov
0cee2fbc7d Make find-function-on-key use the current window
* lisp/emacs-lisp/find-func.el (find-function-on-key-do-it):
Extract from `find-function-on-key', add a second argument.
(find-function-on-key): Use it (bug#19679).
(find-function-on-key-other-window)
(find-function-on-key-other-frame): New commands.
2015-06-22 03:25:38 +03:00
Nicolas Petton
fa52edd4c4 Revert "Define `map-elt' as a generalized variable"
This reverts commit 8b6d82d3ca.
2015-06-21 23:44:50 +02:00
Ken Brown
5fac0dee87 Drop support for CPU profiling on Cygwin
* src/syssignal.h (PROFILER_CPU_SUPPORT): Don't define on Cygwin.
(Bug#20843)
2015-06-21 16:18:48 -04:00
Paul Eggert
38bb9ff0f4 Fix some “nested” quoting confusion in doc strings
* lisp/emacs-lisp/advice.el (ad-map-arglists):
* lisp/kermit.el (kermit-clean-on):
* lisp/mh-e/mh-comp.el (mh-repl-group-formfile):
* src/keyboard.c (Frecursive_edit):
Use curved quotes when quoting text containing apostrophe,
so that the apostrophe isn't curved in the output.
2015-06-21 12:38:08 -07:00
Nicolas Petton
8b6d82d3ca Define `map-elt' as a generalized variable
* lisp/emacs-lisp/map.el (map-elt): Define a gv-expander.

* lisp/emacs-lisp/map.el (map--dispatch): Tighten the code.

* lisp/emacs-lisp/map.el (map-put): Redefine it as a function using a
`setf' with `map-elt'.

* test/automated/map-tests.el: Comment out `test-map-put-literal'.
2015-06-21 20:49:16 +02:00
Michael Albinus
8d4f1e3bd7 Improve error handling in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
Improve error handling.
2015-06-21 20:36:14 +02:00
Nicolas Petton
a94202b78a Reuse `alist-get' in map.el
* lisp/emacs-lisp/map.el (map-elt): Use `alist-get' to retrieve alist
elements.
2015-06-21 20:26:52 +02:00
Eli Zaretskii
3be98ca53b Fix bytecomp-tests--warnings when $TMPDIR has a long name
* test/automated/bytecomp-tests.el (bytecomp-tests--warnings):
Allow the warning to begin on the 3rd, not only 2nd line, which
happens if temporary-file-directory has a very long name.
2015-06-21 20:27:48 +03:00
Eli Zaretskii
8bc4185d64 Expect 2 icalendar tests to fail on MS-Windows
* test/automated/icalendar-tests.el (icalendar-import-with-timezone)
(icalendar-real-world): Make them expected failures on MS-Windows.
2015-06-21 18:10:49 +03:00
Glenn Morris
821a363356 ; Auto-commit of ChangeLog files. 2015-06-21 06:24:05 -04:00
Paul Eggert
bf32130d7d Improve port of settings UI to older displays
* lisp/cus-start.el (standard): Don't assume curved quotes are
easily distinguishable when users are tinkering with a setting
that affects how curved quotes are generated.
2015-06-20 13:35:59 -07:00
Paul Eggert
b1cd8375f6 Fix quoting in electric-quote-mode doc string
* lisp/electric.el (electric-quote-mode): Fix quoting.
This is a fallout from the recent change introducing
‘help-quote-translation’.
2015-06-20 13:35:59 -07:00
Paul Eggert
1b89ea39dd Spelling fix 2015-06-20 10:24:47 -07:00
Paul Eggert
0e0dae5e87 * doc/misc/texinfo.tex, lib/set-permissions.c: Merge from gnulib. 2015-06-20 10:17:05 -07:00
Paul Eggert
20514277e2 * src/doc.c (syms_of_doc): Remove unused symbols. 2015-06-20 10:17:05 -07:00
Martin Rudalics
1338482473 In ‘window-state-put’ undedicate target window. (Bug#20848)
* lisp/window.el (window-state-put): Undedicate target window
before putting STATE into it.  (Bug#20848)
2015-06-20 10:16:07 +02:00
Paul Eggert
f95211e9a4 Merge from origin/emacs-24
a5e6f33 Fixes: debbugs:20832
b9f02cf Fixes: debbugs:20832
2015-06-19 16:45:50 -07:00
Eli Zaretskii
b9373ac26a Fix file-in-directory-p when the directory is UNC
* lisp/files.el (file-in-directory-p): Support files and
directories that begin with "//".  (Bug#20844)
2015-06-19 20:47:44 +03:00
Stephen Berman
a5e6f33b4c Fixes: debbugs:20832
* lisp/calendar/todo-mode.el (todo-show): Don't visit todo file
in the minibuffer.
2015-06-19 17:03:49 +02:00
Nicolas Richard
b9f02cf65a Fixes: debbugs:20832
* lisp/calendar/todo-mode.el (todo-show): Signal an error
if buffer for adding new todo file is empty but modified.
2015-06-19 16:57:26 +02:00
Stefan Monnier
ea47568b19 (filepos-to-bufferpos): Further tweaks to the utf-16 code
* lisp/international/mule-util.el (filepos-to-bufferpos):
Fix typo.  Move non-exact check to the utf-16 branch (the only one
affected).  Don't use byte-to-position for the utf-16 case.
2015-06-19 10:51:22 -04:00
Glenn Morris
06d503faeb ; Auto-commit of loaddefs files. 2015-06-19 06:20:41 -04:00
Eli Zaretskii
a2bb6c7bc1 Minor fixes in filepos-to-bufferpos
* lisp/international/mule-util.el (filepos-to-bufferpos): Remove
test for utf-8-emacs.  Exempt single-byte encodings from the
'use-exact' path when QUALITY is 'exact'.  Test UTF-16 encodings
for BOM before subtracting 2 bytes.  Use 'identity' when adjusting
UTF-16 encoded files for CR-LF EOLs.
2015-06-19 11:19:06 +03:00
Paul Eggert
c4151ebe15 Improve the optional translation of quotes
Fix several problems with the recently-added custom variable
help-quote-translation where the code would quote inconsistently
in help buffers.  Add support for quoting 'like this', which
is common in other GNU programs in ASCII environments.  Change
help-quote-translation to use more mnemonic values: values are now the
initial quoting char, e.g., (setq help-quote-translation ?`) gets the
traditional Emacs help-buffer quoting style `like this'.  Change the
default behavior of substitute-command-keys to match what's done in
set-locale-environment, i.e., quote ‘like this’ if displayable,
'like this' otherwise.
* doc/lispref/help.texi (Keys in Documentation): Document
new behavior of substitute-command-keys, and document
help-quote-translation.
* doc/lispref/tips.texi (Documentation Tips):
Mention the effect of help-quote-translation.
* etc/NEWS: Mention new behavior of substitute-command-keys,
and merge help-quote-translation news into it.
When talking about doc strings, mention new ways to type quotes.
* lisp/cedet/mode-local.el (overload-docstring-extension):
Revert my recent change to this function, which shouldn't be
needed as the result is a doc string.
* lisp/cedet/mode-local.el (mode-local-print-binding)
(mode-local-describe-bindings-2):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-theme.el (describe-theme-1):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
(eieio-help-constructor):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/faces.el (describe-face):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode):
Use substitute-command-keys to ensure a more-consistent quoting
style in help buffers.
* lisp/cus-start.el (standard):
Document new help-quote-translation behavior.
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs):
* lisp/help-mode.el (help-xref-symbol-regexp, help-xref-info-regexp)
(help-xref-url-regexp):
* lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
* lisp/wid-edit.el (widget-documentation-link-regexp):
Also match 'foo', in case we're in a help buffer generated when
help-quote-translation is ?'.
* src/doc.c: Include disptab.h, for DISP_CHAR_VECTOR.
(LEFT_SINGLE_QUOTATION_MARK, uLSQM0, uLSQM1, uLSQM2, uRSQM0)
(uRSQM1, uRSQM2, LSQM, RSQM): New constants.
(Fsubstitute_command_keys): Document and implement new behavior.
(Vhelp_quote_translation): Document new behavior.
2015-06-19 00:38:45 -07:00
Glenn Morris
aad7ea32c5 * lisp/cus-start.el (help-quote-translation): Add :version.
; * etc/NEWS: Add placeholder.
2015-06-18 21:07:27 -04:00
Glenn Morris
d213cf0400 * src/doc.c (Fsubstitute_command_keys): Make previous change compile. 2015-06-18 19:15:05 -04:00
Alan Mackenzie
52c3946c87 Make translation of quotes to curly in doc strings optional.
src/doc.c (traditional, prefer-unicode): new symbols.
(help-quote-translation): new variable.
(Fsubstitute_command_keys): make translation of quotes dependent on
`help-quote-translation'; also translate curly quotes back to ASCII
ones.

lisp/cus-start.el (top-level): Add a customization entry for
`help-quote-translation'.
2015-06-18 21:08:02 +00:00
Artur Malabarba
711e14ddad * lisp/emacs-lisp/package.el: Don't always propagate async errors
(package--with-work-buffer-async): Only propagate the error if the
callback returns non-nil.
(package--download-one-archive): Return nil on the signature
checking callback if we accept unsigned.
(package--download-and-read-archives): Return non-nil on the
archive download callback.
2015-06-18 14:28:03 +01:00
Martin Rudalics
8db25739a4 Fix last fix" 2015-06-18 14:45:43 +02:00