1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

125138 commits

Author SHA1 Message Date
Eli Zaretskii
2fa05dcd5e Remove unused code in coding.c
* src/coding.c (decode_eol): Remove unused code that handled the
case of coding->dst_object being nil.  Replace it with an
assertion.
2016-02-27 13:58:16 +02:00
Aurelien Aptel
10a364d673 * src/syntax.c: Fix result of syntax_multibyte()
The ?: operator has a lower precedence than ||.
Bug introduced by commit 45b683a.
2016-02-26 21:22:23 +01:00
Paul Eggert
e35f99f2dd --enable-gcc-warnings now uses -Wjump-misses-init
When configuring with --enable-gcc-warnings, also enable
-Wjump-misses-init, as it’s confusing to use a goto to skip over
an initialization.  Fix the few places in the code that run afoul
of this warning.
* configure.ac (WERROR_CFLAGS): Add -Wjump-misses-init.
* src/doc.c (Fsubstitute_command_keys):
* src/image.c (svg_load_image):
* src/regex.c (re_match_2_internal):
* src/xdisp.c (redisplay_internal, redisplay_window):
Don’t jump over initialization.
2016-02-26 08:23:26 -08:00
Phillip Lord
9583b9e871 ; Improve documentation in test Makefile
* test/Makefile.in: Improve documentation.
2016-02-26 11:55:38 +00:00
Jussi Lahdenniemi
97d7a0b8db Improve the register-hotkey functionality on MS-Windows
* src/w32fns.c (_WIN32_WINNT): Define to 0x0600, needed for
keyboard hook functionality.
Include w32inevt.h, basetyps.h and unknwn.h.
(VK_ANY, WM_WTSSESSION_CHANGE, WTS_SESSION_LOCK): New macros.
(kbdhook): A new struct definition.
(funhook, setup_w32_kbdhook, remove_w32_kbdhook, hook_w32_key)
(check_w32_winkey_state, reset_w32_kbdhook_state): New functions.
(modifier_set): Call check_w32_winkey_state if a Win key was
pressed and the keyboard hook is active.
(w32_wnd_proc): Don't handle Win key combinations if the keyboard
hook is active.  Only register/unregister the hotkeys if the
keyboard hook is not active.  When WM_CREATE is received, call
setup_w32_kbdhook.  When WM_DESTROY is received, call
reset_w32_kbdhook_state.
(lookup_vk_code): When the keyboard hook is active, map
alphanumeric characters to themselves.
(w32_parse_and_hook_hot_key): Renamed from w32_parse_hot_key.  Map
modified keys to VK_ANY if the keyboard hook is active.  Register
Alt-x and Win-x combinations.
(Fw32_shell_execute): Update doc string to reflect new
functionality.  Bypass the code that posts the
WM_EMACS_REGISTER_HOT_KEY message if the keyboard hook is active.
(Fw32_unregister_hot_key): Bypass the code that posts the
WM_EMACS_UNREGISTER_HOT_KEY message if the keyboard hook is active.
(syms_of_w32fns) <w32-pass-lwindow-to-system>
<w32-pass-rwindow-to-system, w32-phantom-key-code>
<w32-lwindow-modifier, w32-rwindow-modifier>: Update doc strings
to reflect the new functionality.
* src/w32console.c (initialize_w32_display): Install the low-level
keyboard hook.
* src/w32inevt.c (key_event): Handle Win-x combinations only if
the keyboard hook is not active.  If the hook is active, use
check_w32_winkey_state instead.
* src/w32term.h (setup_w32_kbdhook, remove_w32_kbdhook)
(check_w32_winkey_state): Add prototypes.
(w32_kbdhook_active): New macro.

* doc/emacs/msdos.texi (Windows Keyboard): Update to reflect the
new functionality.
2016-02-26 12:51:24 +02:00
Aaron S. Hawley
22994735af Add forward-sexp (and related) tests
* test/lisp/emacs-lisp/lisp-tests.el: New file for testing
forward-sexp and related functions (bug#22800).
2016-02-26 16:18:58 +10:30
Jan Tatarik
10b040814e Don't use (localised) week days in dates
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:org-timestamp): Don't use (localised)
week days in the dates, because that messes up things later.
2016-02-26 16:06:43 +10:30
Thierry Volpiatto
eea55f4f4a Update pcomplete/find
* lisp/pcmpl-gnu.el (pcomplete/find): Update to newest version
(bug#10487).
2016-02-26 16:01:46 +10:30
Lars Ingebrigtsen
4861b50e43 Make parse-time-string-chars more efficient
* lisp/calendar/parse-time.el (parse-time-string-chars): The
string has already been downcase, so don't care about case
(bug#18522).
2016-02-26 14:00:06 +10:30
Lars Ingebrigtsen
a1e7304fc4 Remove killed buffers from the list of Gnus buffers
* lisp/gnus/gnus.el (gnus-prune-buffers): Remove killed
buffers from the list of Gnus buffers (bug#18522).
2016-02-26 13:54:41 +10:30
Paul Eggert
c1415cc98c Integer overflow cleanups for ports and socklen
* src/process.c (struct sockaddr_and_len, conv_sockaddr_to_lisp)
(get_lisp_to_sockaddr_size, Fset_process_datagram_address)
(connect_network_socket):
Use ptrdiff_t, not int, for signed object sizes.
This addresses only a theoretical problem, as in practice these
object sizes are less than 2**31, but we might as well use the
same style here as elsewhere in Emacs.
(string_integer_p): Remove; all uses removed.
(Fmake_network_process): Check that port number is in range.
When converting an integer-string service, rely on strtol
rather than rechecking the string by hand.
* src/process.h, src/w32.c (conv_sockaddr_to_lisp):
Adjust prototypes to match.
2016-02-25 11:59:13 -08:00
Thierry Volpiatto
e65d4d3a5d Add pcomplete support for find
* lisp/pcmpl-gnu.el (pcomplete/find): Add pcomplete support
for find (bug#10487).
2016-02-25 16:43:52 +10:30
Per Starbäck
fecd5e589d Replace XXX acronyms with draft standard ones
* lisp/international/characters.el (c1-acronyms): Replace XXX
entries with the acronyms PAD, HOP, SGCI from draft DIS 10646
(bug#13745).
2016-02-25 16:22:17 +10:30
Kevin Ryde
80c4cfa965 Make checkdoc warn about variables described as "True"
* checkdoc.el (checkdoc-this-string-valid-engine): Docstrings for
variables "True...", and functions "Return true...", should usually be
"non-nil" (bug#15506).
2016-02-25 16:16:37 +10:30
Lars Ingebrigtsen
75b0a03c09 Add NEWS entry for "number string" change 2016-02-25 15:54:29 +10:30
Lars Ingebrigtsen
e7650ba63b Allow using "number strings" as services on non-GNU systems
* src/process.c (string_integer_p): New function.
(Fmake_network_process): Use it to allow connecting to
services specified as "993" even when getaddrbyname isn't
available.
2016-02-25 15:54:03 +10:30
Michael Albinus
ce6a03cb00 Fix problem in tramp.texi
* doc/misc/tramp.texi (File name completion): Do not use
@trampfn{} for IPv6 addresses.  Somehow, it results in errors
during PDF creation.
2016-02-24 11:02:48 +01:00
Lars Ingebrigtsen
378d138e64 Make image commands available in image-mode
* lisp/image-mode.el (image-mode-map): Inherit from
`image-map' so that the usual image commands work.
2016-02-24 18:11:46 +11:00
Lars Ingebrigtsen
bb2ab2fbcc Move o' to O' in shr-map
* lisp/net/shr.el (shr-map): `shr-save-contents' has moved
from `o' to `O' to avoid collisions with `image-map'.
2016-02-24 18:07:49 +11:00
Lars Ingebrigtsen
dcf9eee5f1 Make setting the coding system non-blocking
* src/process.c (Fset_process_filter_multibyte): Defer
completing coding system setup in asynchronous processes.
(Fset_process_coding_system): Ditto.
2016-02-24 17:21:50 +11:00
Gregoire Jadi
9aac47f42e Mention `proced-toggle-auto-update' in the proced-mode doc string
* lisp/proced.el (proced-mode): Mention
`proced-toggle-auto-update' (bug#14341).
2016-02-24 16:06:07 +11:00
Joshua Datko
338f78ad6a Add a fortune-message command
* lisp/play/fortune.el (fortune-message): Add a command to
display fortunes in the echo area (bug#14915).

Copyright-paperwork-exempt: yes
2016-02-24 15:42:28 +11:00
Susanne Oberhauser
bed990a747 Add hideshow bindings analogous to outline mode
* lisp/progmodes/hideshow.el (hs-minor-mode-map): Add bindings
analogous to outline mode bindings (bug#15324).

Copyright-paperwork-exempt: yes
2016-02-24 15:13:41 +11:00
Bastien Guerry
3c36fc13c9 Allow highlighting things like @math{2^{12}}
* lisp/textmodes/texinfo.el (texinfo-font-lock-keywords):
Allow highlighting things like @math{2^{12}} (bug#16390).
2016-02-24 14:35:28 +11:00
Per Bothner
6ef8c6ceb8 Make `C-{up,down,left,right}' work in term mode
* lisp/term.el (term-raw-map): Define C-{up,down,left,right}
to send the same escape sequence that xterm sends.  This makes
backward-word and forward-word work in readline (bug#16746).
2016-02-24 14:19:17 +11:00
Dima Kogan
70c3c79ec0 Allow ff-find-other-file (etc) to work with indirect clone buffers
* lisp/find-file.el (ff-buffer-file-name): New function to
allow the feature to work with indirect buffers, too
(bug#16904).
(ff-find-the-other-file): Use it.
(ff-other-file-name): Ditto.
(ff-get-file-name): Ditto.
2016-02-24 14:01:50 +11:00
Lars Ingebrigtsen
fddbd8ca22 Fix error in add-change-log-entry when the entry has no newline
* lisp/vc/add-log.el (add-change-log-entry): The entry in the
ChangeLog may end without a new line starting with blanks.
2016-02-24 13:08:48 +11:00
Lars Ingebrigtsen
91ea60cf58 Avoid using mm-util functoins in gravatar.el
* lisp/image/gravatar.el (gravatar-retrieve): Avoid using
mm-util functions.
(gravatar-retrieve-synchronously): Ditto.
2016-02-24 13:07:34 +11:00
Lars Ingebrigtsen
21fe2ebec8 Move low-level library files from the lisp/gnus directory
The files moved from lisp/gnus are:

auth-source.el -> /
compface.el -> /image
ecomplete.el -> /
flow-fill.el -> /mail
gravatar.el -> /image
gssapi.el -> /net
html2text.el -> /net
ietf-drums.el -> /mail
mail-parse.el -> /mail
mail-prsvr.el -> /mail
mailcap.el -> /net
plstore.el -> /
pop3.el -> /net
qp.el -> /mail
registry.el -> /
rfc1843.el -> /international
rfc2045.el -> /mail
rfc2047.el -> /mail
rfc2231.el -> /mail
rtree.el -> /
sieve-manage.el -> /net
sieve-mode.el -> /net
sieve.el -> /net
starttls.el -> /net
utf7.el -> /international
yenc.el -> /mail
2016-02-24 13:04:03 +11:00
Tino Calancha
e1d749bd7e Allow undoing changes while doing query-replace
* doc/lispref/searching.texi (Search and Replace): Mention
undo (bug#21684).

* lisp/replace.el (query-replace-help): Document undo.
(perform-replace): Implement undo while replacing text.
2016-02-24 12:35:46 +11:00
John F. Trudeau
bbd86c5642 Highlight assignments in Makefiles more correctly
* lisp/progmodes/make-mode.el (makefile-macroassign-regex):
Highlight assignments preceded by a TAB character correctly
(bug#20787).

Copyright-paperwork-exempt: yes
2016-02-24 12:21:06 +11:00
Fredrik Bergroth
354f9f0fc6 Use memmove instead of memcpy on overlapping regions
* src/editfns.c (Ftranspose_regions): Regions may overlap, so
use memmove instead of memcpy (bug#19213).

Copyright-paperwork-exempt: yes
2016-02-24 11:58:50 +11:00
Paul Eggert
c7b8194c04 Port to --enable-gcc-warnings sans getaddrinfo_a
* src/process.c (Fmake_network_process): Add ATTRIBUTE_UNUSED
to a local unused when getaddrinfo_a is missing.
Resize portbuf to size needed.  Do cheap test first.
Move local to block where it’s needed.
2016-02-23 15:26:23 -08:00
Paul Eggert
82848cf689 Minor cleanups for async DNS etc.
* src/frame.h (FRAME_WINDOW_CONFIGURATION_CHANGED):
Omit unnecessary parens.
* src/gnutls.c (gnutls_try_handshake, emacs_gnutls_deinit)
(gnutls_verify_boot):
Use bool for boolean.
(ATTRIBUTE_FORMAT_PRINTF): Add printf attribute.
* src/process.c (free_dns_request, Fmake_network_process):
Allocate and free async request control block all in one go.
(set_network_socket_coding_system, finish_after_tls_connection)
(connect_network_socket):
Now static.
(conv_numerical_to_lisp): 2nd arg is now int, not unsigned.
(Fmake_network_process): Use list1 for brevity.
(wait_for_socket_fds): 2nd arg is now const ptr.
* src/process.h (struct Lisp_Process.dns_request):
Now struct gaicb *, not struct gaicb **, since there was always
exactly one.  All uses changed.
* src/window.c, src/window.h (run_window_configuration_change_hook):
Now static.
2016-02-23 09:42:28 -08:00
Martin Rudalics
f4152efd2f ; Add NEWS entries for last commit 2016-02-23 12:27:45 +01:00
Carlos Pita
c817549b52 Allow more shell script defun forms
* lisp/progmodes/sh-script.el (sh-mode): Allow more shell
script defun forms, like function name () {...} (bug#19754).
2016-02-23 22:16:26 +11:00
Martin Rudalics
8e7712c7af Fix window-configuration-change-hook' and window-size-change-functions'
(1) Run `window-configuration-change-hook' if and only if at least
one window was deleted or created or shows another buffer since
last redisplay.

(2) Run `window-size-change-functions' if and only if at least
one window changed its size since last redisplay (in a few cases
`window-size-change-functions' will also run when no window
changed its size).

(3) Provide two functions `window-pixel-height-before-size-change'
and `window-pixel-width-before-size-change' that allow to easily
detect which window changed size.

* src/frame.h (struct frame): New boolean member
window_configuration_changed.
(FRAME_WINDOW_SIZES_CHANGED): Remove macro.
(FRAME_WINDOW_CONFIGURATION_CHANGED): New macro.
* src/frame.c (adjust_frame_size): Don't run
`window-configuration-change-hook'.
* src/window.h (struct window): New fields
pixel_width_before_size_change and pixel_height_before_size_change.
(WINDOW_INTERNAL_P): New macro.
* src/window.c (Fwindow_pixel_width_before_size_change)
(Fwindow_pixel_height_before_size_change): New functions.
(Fdelete_other_windows_internal, Fwindow_resize_apply)
(resize_frame_windows, Fsplit_window_internal)
(Fdelete_window_internal, grow_mini_window)
(shrink_mini_window, Fresize_mini_window_internal): Don't call
FRAME_WINDOW_SIZES_CHANGED.
(window_size_changed, window_set_before_size_change_sizes)
(run_window_size_change_functions): New functions.
(make_window): Initialize pixel_width_before_size_change and
pixel_height_before_size_change.
(Fdelete_window_internal): Don't call
run_window_configuration_change_hook.
(struct saved_window): Add pixel_height_before_size_change and
pixel_width_before_size_change.
(Fset_window_configuration): Try to identify window configuration
changes correctly so run_window_configuration_change_hook and
run_window_size_change_functions run only if configuration and size
really changed.
(save_window_save): Set the pixel_height_before_size_change and
pixel_width_before_size_change fields.
(Vwindow_size_change_functions): Move here definiton from xdisp.c.
* src/xdisp.c (prepare_menu_bars, redisplay_internal): Call
run_window_size_change_functions.
(Vwindow_size_change_functions): Move definition to window.c.
* src/xfns.c (x_set_menu_bar_lines): Don't call
run_window_configuration_change_hook.
* doc/lispref/windows.texi (Window Sizes): Document new
functions `window-pixel-height-before-size-change' and
`window-pixel-width-before-size-change'.
(Window Configurations): Mention that this may trigger
execution of `window-size-change-functions' although no window
changed size.
(Window Hooks): Update descriptions of `window-size-change-functions'
and `window-configuration-change-hook'.
2016-02-23 12:08:55 +01:00
Drew Adams
ef52e66efd (ls-lisp-insert-directory): Make -B work
* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work
(bug#20776).
2016-02-23 21:12:55 +11:00
Lars Ingebrigtsen
c399756dda Fix typo in message-setup-fill-variables
* lisp/gnus/message.el (message-setup-fill-variables): Fix
typo in a recent checkin that used `setq-default' instead of
`setq-local' (bug#22781).
2016-02-23 20:58:54 +11:00
Lars Ingebrigtsen
d9ab2503b1 `message-dont-reply-to-names' can also be a list of regexps
* lisp/gnus/message.el (message-dont-reply-to-names):
`message-dont-reply-to-names' can also be a list of regexps (bug#22773).
2016-02-23 20:54:42 +11:00
Vaidheeswaran C
c11e565a6b Make buttons in header lines work
* lisp/help-mode.el (help-button-action): `help-xref-button' in
header line doesn't work (bug#21024).
2016-02-23 20:46:00 +11:00
Vasilij Schneidermann
879e09bbbc Place apples randomly in Snake
* lisp/play/snake.el (snake-score): New variable (bug#21359).
(snake-set-dot): Place the apples randomly.
2016-02-23 20:28:37 +11:00
Tino Calancha
cc27b1b041 Allow optional parameter to be nil
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill): Allow the
optional parameter to be nil (bug#21576).
2016-02-23 20:17:21 +11:00
Tino Calancha
b8dfc7beeb Completely ignore buffers with no name when copying file names
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill): Completely
ignore buffers with no file name. (bug#21577).
2016-02-23 20:12:59 +11:00
Lars Ingebrigtsen
ed91405a07 Make spelling of "Eshell" consistent
* lisp/eshell/esh-mode.el (eshell-mode): Spell it "Eshell".
* lisp/eshell/eshell.el (eshell-command):
Spell it "Eshell" (bug#21678).
2016-02-23 20:01:06 +11:00
Simen Heggestøyl
ad99299f40 Allow pretty lambdas in Scheme mode
* lisp/progmodes/scheme.el (scheme-mode-variables): Borrow
`prettify-symbols-alist' from Lisp mode (bug#21679).
2016-02-23 19:56:52 +11:00
Lars Ingebrigtsen
aeac603715 Rename lisp--prettify-symbols-alist
* lisp/emacs-lisp/lisp-mode.el (lisp-prettify-symbols-alist):
Rename from `lisp--prettify-symbols-alist' since we're going
to use it in Scheme mode, too.
(lisp-mode-variables): Use it.
2016-02-23 19:46:02 +11:00
Chunyang Xu
d692562377 Remove spurious newline in package list
* lisp/emacs-lisp/package.el (describe-package-1): Remove
spurious newline (bug#21706).

Copyright-paperwork-exempt: yes
2016-02-23 19:36:23 +11:00
Lars Ingebrigtsen
b85bfe2c3b Revert "Remove spurious newline in package list"
This reverts commit fad14c289d.
2016-02-23 19:35:47 +11:00
Chunyang Xu
fad14c289d Remove spurious newline in package list
* lisp/emacs-lisp/package.el (describe-package-1): Remove
spurious newline (bug#21706).
2016-02-23 19:35:03 +11:00