1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-29 11:02:01 +00:00
Commit Graph

117420 Commits

Author SHA1 Message Date
Eli Zaretskii
d4dfe4ea85 Fix fallout on MinGW64 from the previous commit.
src/systime.h (Time): Define as size_t, to be consistent with 64-bit
 Windows builds, where 'long' is a 32-bit type.
 src/w32inevt.h (w32_console_mouse_position): Update the argument
 types to use 'Time'.
 src/w32term.c (w32_mouse_position)
 (x_horizontal_scroll_bar_report_motion)
 (x_scroll_bar_report_motion): Update the argument types to use
 'Time'.
2014-09-24 13:06:53 +03:00
Dmitry Antipov
4b930ccbb4 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
(struct input_event): ...unsigned bitfields.  Likewise for
`event_kind' member.  Prefer unsigned for `code' and 'modifiers'.
Use `timestamp' for HELP_EVENT position.  Add compile-time assert.
* keyboard.c (gen_help_event, kbd_buffer_store_help_event)
(kbd_buffer_get_event): Adjust users.
(scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
(make_scroll_bar_position): New function, refactored out of...
(make_lispy_event): ...adjusted user.
* nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
* nsterm.m (ns_mouse_position, mouseUp):
* term.c (term_mouse_position):
* w32inevt.c (w32_console_mouse_position):
* w32term.c (w32_mouse_position):
* xterm.c (XTmouse_position): Use scroll_bar_above_handle.
(x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
Prefer enum and explicit enum members to integers and numeric values.
2014-09-24 11:17:51 +04:00
Paul Eggert
4620e6bccd Fix some slow uses and misuses of strcat.
* doc.c (get_doc_string):
* gtkutil.c (get_utf8_string):
* xsmfns.c (x_session_initialize):
Avoid recomputation of string length.
* ftfont.c (ftfont_spec_pattern):
* xfns.c (xic_create_fontsetname):
Don't assume output buffer is initially zero.
2014-09-23 21:12:37 -07:00
Paul Eggert
7d760fd8f4 movemail: don't dump core if the current time is outlandish
* movemail.c (popmail): Check for mbx_delimit_begin failure.
(mbx_delimit_begin): Fail if the current time is so outlandish
that localtime would fail or asctime would have undefined
behavior.  Use strftime to avoid asctime undefined behavior.
2014-09-23 12:21:54 -07:00
Paul Eggert
dac5be10f3 Merge from gnulib.
This incorporates:
2014-09-11 fcntl-h: fix compilation with Intel C++ compiler
2014-09-04 pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
2014-09-23 11:20:38 -07:00
Paul Eggert
97914756e8 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
All callers changed.
* xterm.c (x_term_init): Use new functionality to avoid two needs
to compute a string length.
2014-09-23 10:03:48 -07:00
Paul Eggert
ccc7be94d7 * dispextern.h, xdisp.c (window_box_right_offset): Now static. 2014-09-23 09:07:23 -07:00
Dmitry Antipov
59e10fbd93 Use known length of a Lisp string to copy it faster.
* lisp.h (lispstrcpy): New function.  Add comment.
* callproc.c (child_setup):
* dbusbind.c (xd_append_arg):
* doc.c (get_doc_string):
* font.c (Ffont_xlfd_name):
* frame.c (xrdb_get_resource):
* process.c (Fmake_network_process, network_interface_info):
* w32fns.c (Fx_open_connection):
* w32proc.c (sys_spawnve):
* xfns.c (select_visual):
* xfont.c (xfont_list):
* xsmfns.c (x_session_initialize):
* xterm.c (x_term_init): Use it.
2014-09-23 19:49:00 +04:00
Glenn Morris
c03d2c89fb Auto-commit of loaddefs files. 2014-09-23 06:21:30 -04:00
Paul Eggert
cb8e2bfba7 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
Problem reported by Dmietry Antipov in thread leading to:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
remain unfixed.
* callproc.c (call_process): Save and restore sa_avail.
* lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
(AVAIL_ALLOCA): New macro.
(SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
Use it, and check against sa_avail rather than MAX_ALLOCA.
2014-09-22 22:42:47 -07:00
Stefan Monnier
9949231fb0 Merge from emacs-24 2014-09-22 15:20:45 -04:00
Sam Steingold
298dfce8ac oops 2014-09-22 15:19:29 -04:00
Sam Steingold
7fc340b270 (sql-execute): Use `special-mode'.
* sql.el (sql-execute): Use `special-mode'.
2014-09-22 15:18:29 -04:00
Sam Steingold
edf16c3783 (sql-product-alist): Improve the Vertica entry.
* lisp/progmodes/sql.el (sql-product-alist): Improve the Vertica entry.
2014-09-22 15:17:40 -04:00
Stefan Monnier
6b33c17c85 Add pcase-defmacro, as well as quote' and app' patterns.
* loadup.el: Increase max-lisp-eval-depth when macroexpanding macroexp.
* emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
* emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
* emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
* emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.
* emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.
2014-09-22 14:22:02 -04:00
Stefan Monnier
f8b25a5169 * lisp/loadup.el: Increase max-lisp-eval-depth while macroexpanding macroexp. 2014-09-22 14:17:27 -04:00
Stefan Monnier
2b968ea662 * lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
2014-09-22 14:05:22 -04:00
Stefan Monnier
7fbd780a00 * lisp/emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
2014-09-22 13:24:46 -04:00
Stefan Monnier
1a6255532e * lisp/emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
2014-09-22 12:22:50 -04:00
Stefan Monnier
536cda1f84 * lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.
2014-09-22 11:04:12 -04:00
Eli Zaretskii
f11af8a48c Fix bug #18516 with SIGSEGV in expand-file-name.
src/fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
 always set to a valid value.  Make sure the size passed to alloca
 is always positive.
2014-09-22 17:37:22 +03:00
Stefan Monnier
13b1840d23 Add support for quote' and app'.
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.
2014-09-22 10:30:47 -04:00
Stefan Monnier
601a0cfe86 Use lexical-bindin in Ibuffer.
* lisp/ibuffer.el (ibuffer-do-toggle-read-only): `arg' is unused.
(ibuffer-compile-format): Simplify.
(ibuffer-clear-summary-columns): Simplify.
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups): Don't use the third
elem of dotimes when we don't refer to the iteration var from it.
(ibuffer-toggle-sorting-mode): Avoid add-to-list.
* lisp/ibuf-macs.el (define-ibuffer-column, define-ibuffer-op):
Silence byte-compiler.
2014-09-22 10:10:53 -04:00
Stefan Monnier
efd314de55 * lisp/font-lock.el (font-lock-compile-keyword): Don't confuse a lambda
expression for a list.
2014-09-22 09:52:06 -04:00
Stefan Monnier
55fa245f37 * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
for functions with no arguments.
2014-09-22 09:47:47 -04:00
Stefan Monnier
84a87ab505 * lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.
(mpc-volume-refresh): Make sure the corresponding header-line is updated.
(mpc-songs-jump-to, mpc-play): Use user-error.
2014-09-22 09:42:57 -04:00
Dmitry Antipov
99c3fad7d4 Avoid extra call to oblookup when interning symbols.
* lisp.h (intern_driver): Add prototype.
* lread.c (intern_driver): New function.
(intern1, intern_c_string_1, Fintern):
* font.c (font_intern_prop):
* w32font.c (intern_font_name): Use it.
2014-09-22 10:06:19 +04:00
Dmitry Antipov
fc5ebc3f49 On OSX, do not free font-specific data more than once (Bug#18501).
* macfont.m (macfont_close): Release and free font-specific data
only if it wasn't previously freed.
2014-09-22 09:34:05 +04:00
Paul Eggert
f135e94e4e Minor improvements to new stack-allocated Lisp objects.
* frame.h (FRAME_PARAMETER):
Prefer scoped_list1 to local_list1 where either would do.
* lisp.h (scoped_list4): New macro.
(local_cons, local_list1, local_list2, local_list3, local_list4)
(make_local_vector, make_local_string, build_local_string):
Prefer functions to macros where either would do.
* xdisp.c (build_desired_tool_bar_string):
Prefer scoped_list4 to local_list4 where either would do.
2014-09-21 15:49:24 -07:00
Tom Willemse
91953c1187 * lisp/simple.el (clone-indirect-buffer): Mention the return value.
Fixes: debbugs:18478
2014-09-21 18:09:40 -04:00
Tom Willemse
f5fafeef5d * lisp/progmodes/prog-mode.el (prog-mode-hook): Replace reference to
Text mode in docstring.

Fixes: debbugs:18464
2014-09-21 18:07:26 -04:00
Stefan Monnier
40aef37804 * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Accept underscores in identifiers after "sub".

Fixes: debbugs:18502
2014-09-21 18:00:28 -04:00
David Caldwell
63126683db * configure.ac: Increase headerpad_extra to 1000, update the comment
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
2014-09-21 22:35:22 +02:00
Glenn Morris
057ba71703 Auto-commit of loaddefs files. 2014-09-21 06:22:38 -04:00
Tassilo Horn
09973863ea Use font-lock-face property; derive from special-mode
* lisp/textmodes/reftex-sel.el (reftex-select-label-mode)
(reftex-select-bib-mode, reftex-insert-docstruct): Derive modes
from special-mode (instead of fundamental-mode) and propertize
with font-lock-face instead of just face.

* lisp/textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto.

Fixes: debbugs:18496
2014-09-21 11:34:02 +02:00
Dmitry Gutov
a58c2690db * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
`lisp--local-variables-completion-table' in the `lisp--form-quoted-p'
case.
2014-09-19 21:33:11 +04:00
Dmitry Gutov
3907574bb8 Fix bug#18265
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
(lisp-completion-at-point): Move `end' back if it's after quote.
If in comment or string, only complete when after backquote.
2014-09-19 07:41:42 +04:00
Dmitry Gutov
30c17da5df * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
2014-09-19 07:28:31 +04:00
Dmitry Gutov
48453e00a3 Make lisp-completion-at-point more discerning
* lisp/emacs-lisp/lisp.el (lisp--expect-function-p)
(lisp--form-quoted-p): New functions.
(lisp-completion-at-point): Use them to see if we're completing a
variable reference, a function name, or just any symbol.
http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00229.html
2014-09-19 07:10:29 +04:00
Dmitry Gutov
b761843bb0 Add the missing last name to ChangeLog 2014-09-19 06:29:25 +04:00
Dmitry Gutov
35ee96fdcb Clarify url-http and url-retrieve-internal docstrings
* lisp/url/url-http.el (url-http): Same. 

* lisp/url/url.el (url-retrieve-internal): Clarify the docstring.

Fixes: debbugs:18116
2014-09-19 05:55:43 +04:00
Juri Linkov
3a449b759c * src/image.c (imagemagick_load_image): Add delay to imagemagick metadata.
(Bug#10747, bug#18334)
2014-09-18 23:59:55 +03:00
David Engster
46b189d794 Do not call egrep to determine emacs version in EDE.
* ede/emacs.el (ede-emacs-version): Do not call 'egrep' to
determine Emacs version (it was dead code anyway).  Make sure that
configure.ac or configure.in exist.  (Bug#18476)
2014-09-18 22:37:19 +02:00
Ivan Kanis
212b4d631b Allow users to specify `shr-width'
* net/shr.el, net/eww.el: Don't override `shr-width', but
introduce a new variable `shr-internal-width'.  This allows users
to specify a width themselves.
2014-09-18 21:18:34 +02:00
Lars Magne Ingebrigtsen
c59f47da5c * image-mode.el: Move defvars earlier to avoid a byte-compilation warning. 2014-09-18 20:38:05 +02:00
Lars Magne Ingebrigtsen
999c35f472 Preserve the aspect ratio when fitting to width/height
* image-mode.el (image-toggle-display-image): If we have a
`fit-width' or a `fit-height', don't limit the size of the image
to the window size, because that doesn't preserve the aspect
ratio.
2014-09-18 20:34:59 +02:00
Eli Zaretskii
41932b21a2 Clarify the doc strings of mouse-position and set-mouse-position.
src/frame.c (Fmouse_position, Fset_mouse_position): Clarify the
 units in which the position is measured.  (Bug#18493)
2014-09-18 20:20:57 +03:00
Eli Zaretskii
a810675374 Fix bug #18490 with redisplay of other windows showing a narrowed buffer.
src/xdisp.c (redisplay_internal): Force redisplay of all windows
 that show a buffer whose narrowing has changed.
2014-09-18 18:10:33 +03:00
Kan-Ru Chen
df2ead390d Fix `fit-window-to-buffer' (Bug#18498).
* window.el (fit-window-to-buffer): When counting buffer width,
count the whole visible buffer.  Correctly convert the body-height
to pixel size for window-text-pixel-size (Bug#18498).
2014-09-18 14:06:17 +02:00
Dmitry Antipov
3cab7dd46f More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
* lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
[!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
* frame.h (FRAME_PARAMETER): New macro.
* dispnew.c (init_display):
* fontset.c (Fset_fontset_font):
* frame.c (x_default_parameter):
* xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
* xfns.c (x_default_scroll_bar_color_parameter)
(x_default_font_parameter, x_create_tip_frame): Use it.
* editfns.c (Fpropertize): Use local_cons.
* process.c (status_message): Use build_local_string.
* xfont.c (xfont_open): Use make_local_string.
* xdisp.c (build_desired_tool_bar_string): Use local_list4.
2014-09-18 15:34:24 +04:00