Paul Eggert [Sat, 23 Jun 2012 16:44:45 +0000 (09:44 -0700)]
* sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
Privately reported by Herbert J. Skuhra.
(make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
All uses changed.
(system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
not make_lisp_timeval, when the argument is of type EMACS_TIME.
Stefan Monnier [Sat, 23 Jun 2012 15:38:23 +0000 (11:38 -0400)]
Miscellaneous minor cleanups and simplifications.
* lisp/help-fns.el (describe-variable): Don't croak when doc is not found.
* lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
* lisp/emacs-lisp/smie.el (smie-next-sexp): CSE.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
((lambda ..) ..).
* lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
Chong Yidong [Sat, 23 Jun 2012 13:27:40 +0000 (21:27 +0800)]
Fixes for Info link-following mouse commands.
* lisp/info.el (Info-mouse-follow-link): Accept symbol values of the
link-args property. Select the window.
(Info-fontify-node): Use Info-link-keymap for all navigation
buttons, with link-args property to perform the desired action.
(Info-link-keymap): Doc fix.
(Info-next-link-keymap, Info-prev-link-keymap)
(Info-up-link-keymap): Delete now-unused keymaps.
Eli Zaretskii [Sat, 23 Jun 2012 12:39:23 +0000 (15:39 +0300)]
Improve and document the language-change event on MS-Windows.
src/keyboard.c (kbd_buffer_get_event): Include the codepage and the
language ID in the event parameters.
src/w32term.c (w32_read_socket): Put the new keyboard codepage into
event.code, not the obscure "character set ID".
doc/lispref/commands.texi (Misc Events): Document the language-change event.
Eli Zaretskii [Sat, 23 Jun 2012 09:46:33 +0000 (12:46 +0300)]
Really fix bug #11519, by fixing the last change in ralloc.c.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
in the logic of incrementing and decrementing the value of
use_relocatable_buffers.
Privately reported by Herbert J. Skuhra.
[__FreeBSD__]: Remove "*/" typo after "#include".
(timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
(TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
(TIMEVAL, system_process_attributes) [__FreeBSD__]:
Don't assume EMACS_TIME and struct timeval are the same type.
Stefan Monnier [Fri, 22 Jun 2012 21:24:54 +0000 (17:24 -0400)]
Further GV/CL cleanups.
* lisp/emacs-lisp/gv.el (gv-get): Autoload functions to find their
gv-expander.
(gv--defun-declaration): New function.
(defun-declarations-alist): Use it.
(gv-define-modify-macro, gv-pushnew!, gv-inc!, gv-dec!): Remove.
(gv-place): Autoload.
* lisp/emacs-lisp/cl.el (cl--dotimes, cl--dolist): Remember subr.el's
original definition of dotimes and dolist.
* lisp/emacs-lisp/cl-macs.el (cl-expr-access-order): Remove unused.
(cl-dolist, cl-dotimes): Use `dolist' and `dotimes'.
* lisp/emacs-lisp/cl-lib.el: Move gv handlers from cl-macs to here.
(cl-fifth, cl-sixth, cl-seventh, cl-eighth)
(cl-ninth, cl-tenth): Move gv handler to the function's definition.
* lisp/emacs-lisp/cl-extra.el (cl-subseq, cl-get, cl-getf): Move gv handler
to the function's definition.
* lisp/Makefile.in (COMPILE_FIRST): Re-order to speed it up by about 50%.
* lisp/window.el:
* lisp/files.el:
* lisp/faces.el:
* lisp/env.el: Don't use CL.
Stefan Monnier [Fri, 22 Jun 2012 17:37:28 +0000 (13:37 -0400)]
* lisp/icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
Move the non-essential binding to the post/pre-command-hook where it is
more obviously correct.
Stefan Monnier [Fri, 22 Jun 2012 17:30:25 +0000 (13:30 -0400)]
* lisp/subr.el (read-passwd): Don't use a history at all.
* lisp/savehist.el (savehist-save): Remove password saved accidentally
because of the above bug.
Glenn Morris [Fri, 22 Jun 2012 07:38:26 +0000 (00:38 -0700)]
Further speed up rpm completion, by caching the installed packages
* lisp/pcmpl-rpm.el (pcmpl-rpm-cache): New option.
(pcmpl-rpm-cache-stamp-file): New constant.
(pcmpl-rpm-cache-time, pcmpl-rpm-packages): New variables.
(pcmpl-rpm-packages): Optionally cache list of packages.
Glenn Morris [Fri, 22 Jun 2012 07:01:32 +0000 (00:01 -0700)]
Try to speed up pcomplete's calling of rpm -qa
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-04/msg00174.html
* lisp/pcmpl-rpm.el (pcmpl-rpm): New group.
(pcmpl-rpm-query-options): New option.
(pcmpl-rpm-packages): No need to inline it. Use pcmpl-rpm-query-options.
Eli Zaretskii [Fri, 22 Jun 2012 06:51:06 +0000 (09:51 +0300)]
Enlarge NSTATICS to 0x650.
src/alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
staticidx goes up to 1597 out of 1600 = 0x640.)
Chong Yidong [Wed, 20 Jun 2012 08:34:21 +0000 (16:34 +0800)]
Fixes to window size calculations in term.el.
* term.el (term-window-width): Handle the case of a missing right
fringe.
(term-check-size): Use window-text-height.
(term-mode): Use define-derived-mode. Minor cleanups.
Dmitry Antipov [Tue, 19 Jun 2012 16:56:28 +0000 (20:56 +0400)]
* alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
Kevin Gallagher [Tue, 19 Jun 2012 07:05:44 +0000 (15:05 +0800)]
In EDT emulator, allow updating of menu-bar Buffers menu.
* lisp/emulation/edt.el (edt-default-menu-bar-update-buffers)
(edt-user-menu-bar-update-buffers): New functions.
(edt-default-emulation-setup, edt-user-emulation-setup): Use them.
Chong Yidong [Tue, 19 Jun 2012 06:49:50 +0000 (14:49 +0800)]
Preserve tty top-frames under various window-changing operations.
* subr.el (with-selected-window): Preserve the selected window's
terminal's top-frame.
* window.el (save-selected-window): Likewise.
* frame.c (delete_frame): When selecting a frame on a different
text terminal, do not alter the terminal's top-frame.
* term.c (Ftty_top_frame): New function.
* xdisp.c (format_mode_line_unwind_data): Record the target
frame's selected window and its terminal's top-frame.
(unwind_format_mode_line): Restore them.
(x_consider_frame_title, display_mode_line, Fformat_mode_line):
Callers changed.
(x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
since tty frames can be explicitly named.
(prepare_menu_bars): Likewise.
Stefan Monnier [Mon, 18 Jun 2012 15:57:41 +0000 (11:57 -0400)]
Fix return value of `defun' and un-define it.
* src/data.c (Fdefalias): Return `symbol'.
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/macros.texi (Defining Macros): Un-define the return value of
`defun', `defmacro' and `defalias'.
Martin Rudalics [Mon, 18 Jun 2012 07:20:19 +0000 (09:20 +0200)]
Handle cases where buffer gets killed while running Fkill_buffer (Bug#11665).
* buffer.c (Fkill_buffer): Don't throw an error when the buffer
gets killed during executing of this function (Bug#11665). Try
to always return Qt when the buffer has been actually killed.
(Vkill_buffer_query_functions): In doc-string say that functions
run by this hook should not change the current buffer.
Paul Eggert [Mon, 18 Jun 2012 06:58:00 +0000 (23:58 -0700)]
Fix recently-introduced process.c problems found by static checking.
* process.c (write_queue_push, write_queue_pop, send_process):
Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
(write_queue_pop): Fix pointer signedness problem.
(send_process): Remove unused local.
Troels Nielsen [Sun, 17 Jun 2012 09:00:37 +0000 (17:00 +0800)]
Ensure correct ordering of process writes.
* process.c (make_process): Initialize write_queue.
(write_queue_push, write_queue_pop): New functions.
(send_process): Use them to maintain correct ordering of process writes.
Paul Eggert [Sun, 17 Jun 2012 08:21:25 +0000 (01:21 -0700)]
* lisp.h (eassert): Assume C89 or later.
This removes the need for CHECK.
(CHECK): Remove. Its comments about always evaluating its
argument were confusing, as 'eassert' typically does not evaluate
its argument.
Alp Aker [Sun, 17 Jun 2012 00:32:36 +0000 (20:32 -0400)]
Implement wave-style variant of underlining.
* doc/lispref/display.texi: Document new face attribute.
* lisp/cus-face.el (custom-face-attributes): Add wave-style underline
attribute.
* lisp/faces.el (set-face-attribute): Update docstring.
* src/dispextern.h (face_underline_type): New enum.
(face): Add field for underline type.
* src/nsterm.m (ns_draw_underwave): New function.
(ns_draw_text_decoration): Use it.
* src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
New functions.
(x_draw_glyph_string): Use them.
* src/xfaces.c (Qline, Qwave): New Lisp objects.
(check_lface_attrs, merge_face_ref)
(Finternal_set_lisp_face_attribute, realize_x_face): Handle
wave-style underline face attributes.
* src/xterm.c (x_draw_underwave): New function.
(x_draw_glyph_string): Use it.
Eli Zaretskii [Sat, 16 Jun 2012 13:17:14 +0000 (16:17 +0300)]
Fix "make dist" on MS-Windows.
nt/makefile.w32-in (install-addpm): New target.
(dist): Depend on it.
(install-shortcuts): Depend on install-addpm instead of copying
addpm.exe as part of the recipe. See
http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00171.html
for the related problem and discussions.
Eli Zaretskii [Sat, 16 Jun 2012 09:57:56 +0000 (12:57 +0300)]
Fix bug #11653 with cursor positioning in a row that has only strings.
src/xdisp.c (set_cursor_from_row): Don't dereference glyphs_end. If
all the glyphs of the glyph row came from strings, and we have no
cursor positioning clues, put the cursor on the first glyph of the
row.
Stefan Monnier [Fri, 15 Jun 2012 03:18:14 +0000 (23:18 -0400)]
* lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner.
* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): New function.
(macroexp--expand-all): Use it.