Martin Rudalics [Sun, 22 Dec 2013 15:19:09 +0000 (16:19 +0100)]
Handle Bug#16207 by being more restrictive when running hooks.
* window.c (unwind_change_frame): New function.
(Fset_window_configuration): Don't run configuration change hook
while the frame configuration is unsafe. Call select_window
twice.
Dmitry Gutov [Sun, 22 Dec 2013 06:04:40 +0000 (08:04 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t
after `{'. We need it after block openers, and it doesn't seem
to hurt after hash openers.
Dmitry Gutov [Sun, 22 Dec 2013 04:57:00 +0000 (06:57 +0200)]
Integrate ruby-mode with electric-indent-mode better
* lisp/progmodes/ruby-mode.el (ruby--at-indentation-p): New function,
extracted from `ruby-smie-rules'.
(ruby--electric-indent-chars): New variable.
(ruby--electric-indent-p): New function.
(ruby-mode): Use `electric-indent-functions' instead of
`electric-indent-chars'.
Ted Zlatanov [Sat, 21 Dec 2013 20:33:44 +0000 (15:33 -0500)]
eww: machinery to list browser history
* net/eww.el (eww-list-histories, eww-list-histories)
(eww-history-browse, eww-history-quit, eww-history-kill)
(eww-history-mode-map, eww-history-mode): New command and
functions to list browser histories.
Chong Yidong [Sat, 21 Dec 2013 15:31:09 +0000 (23:31 +0800)]
Don't make faces when loading Custom themes.
* custom.el (custom-theme-recalc-face): Do nothing if the face is
undefined. Thus, theme settings for undefined faces do not take
effect until the faces are defined with defface, the same as with
theme variables.
* faces.el (face-spec-set): Use face-spec-recalc in all cases.
(face-spec-reset-face): Don't assign extra properties in temacs.
(face-spec-recalc): Apply X resources too.
Chong Yidong [Sat, 21 Dec 2013 08:37:08 +0000 (16:37 +0800)]
Tweak C-x TAB behavior changes, and update docs.
* lisp/indent.el (indent-rigidly-map): Add docstring, and move commands
into named functions.
(indent-rigidly-left, indent-rigidly-right)
(indent-rigidly-left-to-tab-stop)
(indent-rigidly-right-to-tab-stop): New functions. Decide on
indentation direction based on bidi direction, and accumulate
sequential commands in a single undo boundary.
(indent-rigidly--pop-undo): New utility function.
* w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
* w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
fringe background extension.
(x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
because they are now always the same as `left' and `width',
respectively. Remove code for the case that `width' and
`sb_width' are different.
Juri Linkov [Fri, 20 Dec 2013 20:20:39 +0000 (22:20 +0200)]
* lisp/saveplace.el (save-place-to-alist): Add `dired-filename' as
a position when `dired-directory' is non-nil. Check integer
positions with `integerp'.
(toggle-save-place, save-places-to-alist): Add check for
`dired-directory'.
(save-place-find-file-hook): Check integer positions with
`integerp'.
(save-place-dired-hook): Use `dired-goto-file' when
`dired-filename' is found in the assoc list. Check integer
positions with `integerp'.
(dired-initial-position-hook): Rename from `dired-initial-point-hook'.
* lisp/dired.el (dired-initial-position-hook): Rename back from
`dired-initial-point-hook'.
(dired-initial-position): Rename `dired-initial-point-hook' to
`dired-initial-position-hook'.
(dired-file-name-at-point): Doc fix.
Juri Linkov [Fri, 20 Dec 2013 19:55:56 +0000 (21:55 +0200)]
* lisp/replace.el (read-regexp-defaults-function): New defcustom.
(read-regexp-suggestions): New function.
(read-regexp): Use `read-regexp-defaults-function' to get default values.
Use `read-regexp-suggestions'. Add non-empty default to history
for empty input.
(occur-read-regexp-defaults-function): Remove function.
(occur-read-primary-args): Use `regexp-history-last' instead of
`occur-read-regexp-defaults-function'.
* lisp/hi-lock.el (hi-lock-read-regexp-defaults-function): Remove function.
(hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use `regexp-history-last' instead of
`hi-lock-read-regexp-defaults-function'. Doc fix.
(hi-lock-face-symbol-at-point): Replace `find-tag-default-as-regexp'
with `find-tag-default-as-symbol-regexp'. Doc fix.
(hi-lock-read-regexp-defaults): Remove function.
(hi-lock-regexp-okay): Add check for null.
* lisp/progmodes/grep.el (grep-read-regexp): Use `grep-tag-default' for
the arg DEFAULTS. Move formatting of the prompt to `read-regexp'.
* lisp/subr.el (find-tag-default-as-symbol-regexp): New function.
(find-tag-default-as-regexp): Move symbol regexp formatting to
`find-tag-default-as-symbol-regexp'.
Stephen Berman [Fri, 20 Dec 2013 17:21:12 +0000 (18:21 +0100)]
New implementation of Todo item insertion commands and key bindings.
* calendar/todo-mode.el: New implementation of item insertion
commands and key bindings.
(todo-key-prompt): New face.
(todo-insert-item): New command.
(todo-insert-item--parameters): New defconst, replacing defvar
todo-insertion-commands-args-genlist.
(todo-insert-item--param-key-alist): New defconst, replacing
defvar todo-insertion-commands-arg-key-list.
(todo-insert-item--keyof, todo-insert-item--this-key): New defsubsts.
(todo-insert-item--argsleft, todo-insert-item--apply-args)
(todo-insert-item--next-param): New functions.
(todo-insert-item--args, todo-insert-item--argleft)
(todo-insert-item--argsleft, todo-insert-item--newargsleft):
New variables.
(todo-key-bindings-t): Change binding of "i" from
todo-insertion-map to todo-insert-item.
(todo-powerset, todo-gen-arglists, todo-insertion-commands-args)
(todo-insertion-command-name, todo-insertion-commands-names)
(todo-define-insertion-command, todo-insertion-commands)
(todo-insertion-key-bindings, todo-insertion-map): Remove.
Stephen Berman [Fri, 20 Dec 2013 17:16:47 +0000 (18:16 +0100)]
Todo mode bug fixes and new features.
* calendar/todo-mode.el: Bug fixes and new features.
(todo-toggle-item-highlighting): Use eval-and-compile instead of
eval-when-compile.
(todo-move-category): Allow choosing a non-existing todo file to
move the category to, and create that file.
(todo-default-priority): New user option.
(todo-set-item-priority): Use it.
(todo-desktop-save-buffer, todo-restore-desktop-buffer): New functions.
(desktop-restore-file-buffer): Declare.
(desktop-buffer-mode-handlers): Add todo-restore-desktop-buffer.
(todo-modes-set-2): Locally set desktop-save-buffer to
todo-desktop-save-buffer.
(todo-mode, todo-archive-mode, todo-filtered-items-mode)
(auto-mode-alist): Add autoload cookie.
Martin Rudalics [Fri, 20 Dec 2013 10:48:36 +0000 (11:48 +0100)]
Some more fixes for pixelwise resizing.
Remove scroll_bar_actual_width from frames.
* frame.h (struct frame): Remove scroll_bar_actual_width slot.
* frame.c (Fscroll_bar_width): Return scroll bar area width.
(x_figure_window_size):
* nsterm.m (x_set_window_size):
* widget.c (set_frame_size):
* w32term.c (x_set_window_size):
* xterm.c (x_set_window_size, x_set_window_size_1): Don't set
scroll_bar_actual_width.
Convert scroll_bar members to integers on Windows.
* w32term.h (struct scroll_bar): Convert top, left, width,
height, start, end and dragging to integers.
* w32fns.c (w32_createscrollbar): Remove XINT conversions for
scroll_bar members.
* w32term.c (w32_set_scroll_bar_thumb)
(w32_scroll_bar_handle_click): Remove XINT conversions for
scroll_bar members. Treat bar->dragging as integer.
(x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
first element. Remove XINT conversions for scroll_bar members.
(w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
Remove XINT conversions for scroll_bar members.
Fix assignment for new window total sizes.
* window.c (Fwindow_resize_apply_total): Assign values for
minibuffer window.
* window.el (window--pixel-to-size): Remove function.
(window--pixel-to-total-1, window--pixel-to-total): Fix
calculation of new total sizes.
Dmitry Gutov [Fri, 20 Dec 2013 05:20:33 +0000 (07:20 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): New
option.
(ruby-smie--indent-to-stmt-p): Use it.
(ruby-smie-rules): Revert the logic in the handling of `when'.
Expand the `begin' clause to handle `ruby-align-to-stmt-keywords'.
(ruby-deep-arglist, ruby-deep-indent-paren)
(ruby-deep-indent-paren-style): Update docstrings to note that the
vars don't have any effect with SMIE.
* test/automated/ruby-mode-tests.el: Add tests for
`ruby-align-to-stmt-keywords'.
* test/indent/ruby.rb: Update examples to reflect the lack of change in
default indentation of `begin' blocks.
Juri Linkov [Fri, 20 Dec 2013 00:07:08 +0000 (02:07 +0200)]
* lisp/replace.el (occur-engine): Use `add-face-text-property'
to add the face property to matches and titles.
* lisp/hi-lock.el (hi-green): Use lighter color "light green" closer to
the palette of other hi-lock colors.
(hi-lock-set-pattern): Prepend hi-lock face to the existing face.
Juri Linkov [Thu, 19 Dec 2013 22:12:12 +0000 (00:12 +0200)]
* lisp/isearch.el (isearch-mode-map): Bind `M-s e' to `isearch-edit-string'.
Put :advertised-binding on `M-s c', `M-s r', `M-s e'. (Bug#16035)
(minibuffer-history-symbol): Move variable declaration closer to
its usage.
* lisp/isearchb.el (isearchb): Add `event-basic-type' on `last-command-event'.
(Bug#14785)
* lisp/gnus/gnus.el (gnus-suppress-keymap):
* lisp/gnus/gnus-art.el (gnus-article-mode-map):
* lisp/gnus/gnus-group.el (gnus-group-mode-map):
* lisp/gnus/gnus-sum.el (gnus-summary-mode-map, gnus-summary-backend-map):
Remove [backspace] key binding because it shadows DEL (bug#16035).
Juri Linkov [Thu, 19 Dec 2013 21:02:46 +0000 (23:02 +0200)]
* lisp/simple.el (eval-expression-print-format): Don't check for
command names and the last command. Always display additional
formats of the integer result in the echo area, and insert them
to the current buffer only with a zero prefix arg.
Display character when char-displayable-p is non-nil.
(eval-expression): With a zero prefix arg, set `print-length' and
`print-level' to nil, and insert the integer values from
`eval-expression-print-format' at the end. Doc fix.
* lisp/emacs-lisp/lisp-mode.el (eval-print-last-sexp): Add arg
`eval-last-sexp-arg-internal'. Doc fix.
(eval-last-sexp-1): Pass arg `eval-last-sexp-arg-internal' to
`eval-last-sexp-print-value'. Doc fix.
(eval-last-sexp-print-value): Add arg `eval-last-sexp-arg-internal'.
Set `print-length' and `print-level' to nil when arg is zero.
(eval-last-sexp): Doc fix.
(eval-defun-2): Print the integer values from
`eval-expression-print-format' at the end.
* lisp/emacs-lisp/edebug.el (edebug-eval-defun): Print the integer
values from `eval-expression-print-format' at the end.
* lisp/ielm.el (ielm-eval-input): Print the integer
values from `eval-expression-print-format' at the end.
Stefan Monnier [Thu, 19 Dec 2013 14:00:55 +0000 (09:00 -0500)]
* lisp/hl-line.el (hl-line-make-overlay): New fun. Set priority.
(hl-line-highlight, global-hl-line-highlight): Use it.
(hl-line-overlay): Use defvar-local.