Juri Linkov [Sun, 22 Aug 2010 23:27:59 +0000 (00:27 +0100)]
Move reading an extended command to Elisp (bug#5364, bug#5214).
* lisp/simple.el (read-extended-command): New function with the logic
for `completing-read' moved to Elisp from `execute-extended-command'.
Use `function-called-at-point' in `minibuffer-default-add-function'
to get a command name for M-n (bug#5364, bug#5214).
* src/keyboard.c (Fexecute_extended_command): Move reading a command name
with `completing-read' to a new Elisp function `read-extended-command'.
Call it to read a command to `function' (bug#5364, bug#5214).
Eli Zaretskii [Sun, 22 Aug 2010 17:00:08 +0000 (20:00 +0300)]
Fix the w32 build after 2010-08-22T15:14:37Z!dann@ics.uci.edu.
sysselect.h [WINDOWSNT]: Don't define the FD_* and select stuff for w32.
s/ms-w32.h (HAVE_SYS_TIMEB_H): Don't #undef HAVE_SYS_SELECT_H, it's done
in nt/config.nt.
makefile.w32-in ($(BLD)/sysdep.$(O)): Depend on sysselect.h.
Dan Nicolaescu [Sun, 22 Aug 2010 15:14:37 +0000 (08:14 -0700)]
Simplify termio code.
All non-MSDOS non-WINDOWSNT platforms define HAVE_TERMIOS, so
HAVE_TERMIO code is obsolete.
Replace HAVE_TERMIOS conditionals with !DOS_NT.
* src/systty.h: Do not define HAVE_TCATTR.
Remove HAVE_TERMIO, HAVE_LTCHARS and HAVE_TCHARS code.
Do not define EMACS_HAVE_TTY_PGRP. Only define
EMACS_GET_TTY_PGRP for !DOS_NT.
* src/sysdep.c: Include sysselect.h unconditionally. Do not include
sys/ioctl.h and termios.h, systty.h does it. Use
HAVE_SYS_UTSNAME_H instead of USG as an include guard.
(init_baud_rate): Remove HAVE_TERMIO code.
(child_setup_tty): Remove HAVE_TERMIO code.
(emacs_get_tty, emacs_set_tty): Remove HAVE_TERMIO, HAVE_TCHARS
and HAVE_LTCHARS code. Use !DOS_NT instead of HAVE_TCATTR.
(new_ltchars, new_tchars): Remove, unused.
(init_sys_modes): Remove HAVE_TERMIO, HAVE_TCHARS and HAVE_LTCHARS
code. Remove special casing for __mips__, it was a no-op. Remove
HAVE_TCATTR conditional, it is implied by HAVE_TERMIOS.
(init_sys_modes): Remove HPUX special case.
* src/process.c: Include stdlib.h unconditionally. Do not include
fcntl.h, systty.h does it. Remove conditional code for
HAVE_SERIAL, it is always true.
(process_send_signal): Remove HAVE_TERMIOS conditional, it's
always true when SIGNALS_VIA_CHARACTERS is true.
(Fcontinue_process, Fprocess_send_eof): Simplify conditionals:
!WINDOWSNT means HAVE_TERMIOS.
(create_process): Remove HAVE_TERMIOS, it's inside a HAVE_PTYS
conditional, which is true for all HAVE_TERMIOS systems.
* src/keyboard.c (init_keyboard): Do not use HAVE_TERMIO, use !DOS_NT
instead of HAVE_TERMIOS.
* src/emacs.c (shut_down_emacs): Use !defined DOS_NT instead of
EMACS_HAVE_TTY_PGRP.
* src/callproc.c (child_setup): Move EMACS_SET_TTY_PGRP use to the
non-MSDOS, non-WINDOWSNT code, it's only defined for such systems
anyway.
Leo Liu [Sat, 21 Aug 2010 13:35:27 +0000 (15:35 +0200)]
Fix buffer-list rename&refresh after after killing a buffer in ido.
* lisp/ido.el: Revert Óscar's.
(ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh.
Remember the buffers at head, rather than their name.
* lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list.
Chong Yidong [Sat, 21 Aug 2010 04:46:23 +0000 (00:46 -0400)]
Cleanups and fixes for mouse-save-then-kill and mouse-secondary-save-then-kill.
* mouse.el (mouse-save-then-kill): Don't save region to kill ring
when extending it. Before killing on the second click, check if
the buffer is the correct one. Doc fix.
(mouse-secondary-save-then-kill): Allow usage without first
calling mouse-start-secondary, by defaulting to point. Don't save
an empty secondary selection. Doc fix.
Eli Zaretskii [Fri, 20 Aug 2010 19:49:20 +0000 (22:49 +0300)]
Fix version string in top-level MSDOS Makefile.
msdos/mainmake.v2 (version): Update due to change in emacs.c.
src/emacs.c <emacs_version>: Add a comment regarding msdos/mainmake.v2's
dependency on the syntax of this declaration.
Eli Zaretskii [Fri, 20 Aug 2010 19:45:24 +0000 (22:45 +0300)]
Fix version string in top-level MSDOS Makefile.
msods/mainmake.v2 (version): Update due to change in emacs.c.
src/emacs.c <emacs_version>: Add a comment regarding msdos/mainmake.v2's
dependency on the syntax of this declaration.
Eli Zaretskii [Fri, 20 Aug 2010 14:19:39 +0000 (17:19 +0300)]
Fix mouse clicks, drag, and highlight in R2L lines.
dispnew.c (buffer_posn_from_coords): Fix calculation of buffer
position for R2L lines by mirroring the pixel position wrt the
text are box. Improve commentary.
Glenn Morris [Fri, 20 Aug 2010 07:11:35 +0000 (00:11 -0700)]
Fix rmail-forward with non-sendmail sending function.
* lisp/mail/rmail.el (rmail-forward): Replace mail-text-start with its
expansion, so as not to need sendmail.
(mail-text-start): Remove declaration.
(rmail-retry-failure): Require sendmail.
Stefan Monnier [Thu, 19 Aug 2010 15:43:45 +0000 (17:43 +0200)]
New post-self-insert-hook.
* src/cmds.c (Vself_insert_face, Vself_insert_face_command): Remove.
(Qpost_self_insert_hook, Vpost_self_insert_hook): New vars.
(internal_self_insert): Run post-self-insert-hook rather than handle
self-insert-face.
(syms_of_cmds): Initialize the new vars.
* lisp/facemenu.el (facemenu-self-insert-data): New var.
(facemenu-post-self-insert-function, facemenu-set-self-insert-face): New funs.
(facemenu-add-face): Use them.
Eli Zaretskii [Wed, 18 Aug 2010 16:42:06 +0000 (19:42 +0300)]
Fix display of bar cursor on right-to-left text.
xterm.c (x_draw_bar_cursor):
w32term.c (x_draw_bar_cursor): If the character under cursor is
R2L, draw the bar cursor on its right rather than on its left.
Stefan Monnier [Wed, 18 Aug 2010 10:57:48 +0000 (12:57 +0200)]
Try and remove some of SMIE's black magic by generalizing some rules.
* lisp/emacs-lisp/smie.el (smie-default-backward-token)
(smie-default-forward-token): Strip properties.
(smie-next-sexp): Be more careful with associative operators.
(smie-forward-sexp-command): Generalize.
(smie-backward-sexp-command): Simplify.
(smie-closer-alist): New var.
(smie-close-block): New command.
(smie-indent-debug-log): New var.
(smie-indent-offset-rule): Add a few more cases.
(smie-indent-column): New function.
(smie-indent-after-keyword): Use it.
(smie-indent-keyword): Use it.
Fix up the opener code's point position.
(smie-indent-comment): Only applies at BOL.
(smie-indent-debug): New command.
Stefan Monnier [Wed, 18 Aug 2010 10:21:43 +0000 (12:21 +0200)]
* lisp/emacs-lisp/autoload.el (make-autoload): Preload the macros's
declarations that are useful before running the macro.
* src/eval.c (Fdefmacro): Only obey one declaration.
Eli Zaretskii [Tue, 17 Aug 2010 20:05:50 +0000 (23:05 +0300)]
Fix bug #6796.
w32fns.c <w32_frame_parm_handlers>: Add a slot for the
x_set_tool_bar_position handler, needed to support changes from
2010-07-29T16:49:59Z!jan.h.d@swipnet.se for positioning the tool bar.
Stefan Monnier [Tue, 17 Aug 2010 15:49:30 +0000 (17:49 +0200)]
Font-lock '...' strings, plus various simplifications and fixes.
* lisp/progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt.
(octave-font-lock-close-quotes): New function.
(octave-font-lock-syntactic-keywords): New var.
(octave-mode): Use it. Set beginning-of-defun-function.
(octave-mode-map): Don't override the <foo>-defun commands.
(octave-mode-menu): Pass it directly to easy-menu-define;
remove (now generic) <foo>-defun commands; use info-lookup-symbol.
(octave-block-match-alist): Fix up last change so that
octave-close-block uses the more specific keyword.
(info-lookup-mode): Silence byte-compiler.
(octave-beginning-of-defun): Not interactive any more.
Optimize slightly.
(octave-end-of-defun, octave-mark-defun, octave-in-defun-p): Remove.
(octave-indent-defun, octave-send-defun): Use mark-defun instead.
(octave-completion-at-point-function): Make sure point is within
beg..end.
(octave-reindent-then-newline-and-indent):
Use reindent-then-newline-and-indent.
(octave-add-octave-menu): Remove.
Jan Djärv [Tue, 17 Aug 2010 10:07:41 +0000 (12:07 +0200)]
Add command C-c m in report-emacs-bug that puts the bug into preferred mailer.
Depends on xdg-email being available.
* lisp/mail/emacsbug.el (report-emacs-bug-insert-to-mailer)
(report-emacs-bug-can-use-xdg-email): New functions.
(report-emacs-bug): Set can-xdg-email to result of
report-emacs-bug-can-use-xdg-email. If can-xdg-email bind
\C-cm to report-emacs-bug-insert-to-mailer and add help text
about it.
Michael Albinus [Tue, 17 Aug 2010 04:52:16 +0000 (06:52 +0200)]
* net/tramp.el (tramp-handle-make-symbolic-link): Flush file
properties.
(tramp-handle-process-file): Call the program in a subshell, in
order to preserve working directory.
(tramp-action-password): Hide password prompt before next run.
(tramp-process-actions): Widen connection buffer for the trace.