Commit graph

62357 commits

Author SHA1 Message Date
Martin Rudalics
c936cbbc83 Run `window-configuration-change-hook' only after all faces have been realized.
* frame.c (adjust_frame_size): Call x_set_window_size only if
f->can_x_set_window_size is set.
(make_frame): Initialize f->can_x_set_window_size and
f->can_run_window_configuration_change_hook.
(Fcan_run_window_configuration_change_hook): New function.
* frame.h (frame): Split `official' into `can_x_set_window_size'
and `can_run_window_configuration_change_hook'.
* nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
* w32fns.c (Fx_create_frame, x_create_tip_frame): Set
f->can_x_set_window_size.
* window.c (run_window_configuration_change_hook): Return
immediately if either f->can_x_set_window_size or
f->can_run_window_configuration_change_hook are false.
(Fset_window_configuration): Instead of f->official set
f->can_x_set_window_size.
* xfns.c (Fx_create_frame, x_create_tip_frame): Set
f->can_x_set_window_size.
* faces.el (face-set-after-frame-default): Enable running
`window-configuration-change-hook'.
2014-11-08 12:11:50 +01:00
Juri Linkov
2b513c3b1c * lisp/replace.el: History for query replace pairs.
(query-replace-defaults): Promote to a list of cons cell.  Doc fix.
(query-replace-from-to-separator): New variable.
(query-replace-read-from): Let-bind query-replace-from-to-history
to a list of FROM-TO strings created from query-replace-defaults
and separated by query-replace-from-to-separator.  Use it as
the history while reading from the minibuffer.  Split the returned
string by the separator to get FROM and TO parts, and add them
to the history variables.
(query-replace-read-to): Add FROM-TO pairs to query-replace-defaults.
(query-replace-regexp-eval): Let-bind query-replace-defaults to nil.
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg00253.html

* lisp/isearch.el (isearch-text-char-description): Keep characters
intact and put formatted strings with the `display' property.
2014-11-08 01:33:41 +02:00
Martin Rudalics
1c50b3adb6 Improve inhibiting of implied frame resizes.
* frames.texi (Size and Position): Rewrite description of
`frame-inhibit-implied-resize'.
* cus-start.el (frame-resize-pixelwise): Fix group.
(frame-inhibit-implied-resize): Add entry.
* dispnew.c (change_frame_size_1): Fix call of
adjust_frame_size.
* frame.c (Qsize, Qframe_position, Qframe_outer_size)
(Qframe_inner_size, Qexternal_border_size, Qtitle_height)
(Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
(Qtool_bar_size): New constants.
(frame_inhibit_resize, adjust_frame_size): New argument to
handle case where frame_inhibit_implied_resize is a list.
(Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
(Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
(x_set_right_divider_width, x_set_bottom_divider_width)
(x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
(x_set_scroll_bar_width, x_set_scroll_bar_height): Update
callers.
(frame-inhibit-implied-resize): Rewrite doc-string.
* frame.h (frame_inhibit_resize, adjust_frame_size): Fix
external declarations.
(Qframe_position, Qframe_outer_size)
(Qframe_inner_size, Qexternal_border_size, Qtitle_height)
(Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
(Qtool_bar_size): Extern them.
* gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
(xg_height_or_width_changed): Remove.
(xg_frame_set_char_size): Adjust adjust_frame_size calls.
(menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
(tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
(xg_change_toolbar_position): Call adjust_frame_size directly.
* nsfns.m (x_set_internal_border_width, Fx_create_frame): Fix
calls of adjust_frame_size.
* w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
(Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size
calls.
(x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
frame can get resized when tool-bar-lines parameter changes from
or to zero.
(Fw32_frame_menu_bar_size): Return fourth value.
(Fw32_frame_rect): Block input around system calls
(Fx_frame_geometry): New function.
* w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
* w32term.c (x_new_font): Adjust adjust_frame_size call.
* widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize
call.
* window.c (Fset_window_configuration): Adjust adjust_frame_size
call.
* xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
(Fx_create_frame): Adjust adjust_frame_size calls.
(x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
frame can get resized when tool-bar-lines parameter changes from
or to zero.
(Fx_frame_geometry): New function.
* xmenu.c (update_frame_menubar): On Lucid call
adjust_frame_size with one pixel less height to avoid that
repeatedly adding/removing the menu bar grows the frame.
(free_frame_menubar): On Motif arrange to optionally preserve
the old frame height when removing the menu bar.
* xterm.c (x_new_font): Adjust adjust_frame_size call.
2014-11-07 11:49:22 +01:00
Daiki Ueno
b912aed95a epg: Utilize --pinentry-mode added in GnuPG 2.1
* epa.el (epa-pinentry-mode): New user option.
(epa-sign-file, epa-encrypt-file, epa-decrypt-region)
(epa-sign-region, epa-encrypt-region): Respect epa-pinentry-mode.
* epa-file.el (epa-file-insert-file-contents)
(epa-file-write-region): Respect epa-pinentry-mode.
2014-11-07 15:12:40 +09:00
Daiki Ueno
135a9f4b5a epg: Adjust to GnuPG 2.1 key listing change
* epg.el (epg--list-keys-1): Ignore fields after the 15th field
(bug#18979).  Reported by Hideki Saito.
2014-11-07 11:31:12 +09:00
Daiki Ueno
55ea575e13 package.el: Fix the last commit 2014-11-06 15:29:24 +09:00
Daiki Ueno
4cd90e0920 package.el: Display output sent to stderr, when verification failed
* emacs-lisp/package.el (package--display-verify-error): New function.
(package--check-signature): Use it to display output sent to stderr.
2014-11-06 12:44:52 +09:00
Daiki Ueno
f374845f4c epg: Fix the last commit
* epg.el (epg-context): Initialize ERROR-OUTPUT as "" instead of nil.
2014-11-06 12:40:03 +09:00
Stefan Monnier
577ef0bc58 * lisp/subr.el (pop): Don't call the getter twice.
Fixes: debbugs:18968
2014-11-05 22:27:23 -05:00
Stefan Monnier
4d5468e529 * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
uses of `funcall'.
2014-11-05 22:16:41 -05:00
Daiki Ueno
9e48a95cf2 epg: Improve error handling
* epa.el (epa-error-buffer): New variable.
(epa-display-error): New function.
(epa-decrypt-file, epa-verify-file, epa-verify-region)
(epa-delete-keys, epa-import-keys): Display output sent to stderr.
(epa-sign-file, epa-sign-region, epa-encrypt-region)
(epa-export-keys, epa-insert-keys): Display output sent to stderr.
Use setf instead of epg-context-set-*.
* epa-file.el (epa-file-insert-file-contents): Use
epa-display-error instead of epa-display-info.  Mimic the behavior
of jka-compr when decryption program is not found.
(epa-file-write-region): Use epa-display-error instead of
epa-display-info.
2014-11-06 12:04:22 +09:00
Glenn Morris
e1418d0e25 * lisp/vc/vc/git.el: Fix previous.
Move new code after vc-git-log-view-mode definition to avoid bootstrap error.
Ref: http://hydra.nixos.org/build/16795500
2014-11-05 18:12:07 -05:00
Stefan Monnier
8b86268b69 * lisp/vc/vc.el (vc-region-history): New command.
(vc-print-log-internal): Use cl-some.
* lisp/vc/vc-git.el (vc-git-region-history): New function.
(vc-git-region-history-mode-map)
(vc-git--log-view-long-font-lock-keywords)
(vc-git-region-history-font-lock-keywords): New vars.
(vc-git-region-history-font-lock): New function.
(vc-git-region-history-mode): New major mode.
2014-11-05 14:59:31 -05:00
Tassilo Horn
cde44c6ff5 Require subst-x only at compile-time
* lisp/net/eww.el (subr-x): Require subr-x at compile-time because eww
uses string-trim.
2014-11-05 20:29:28 +01:00
Ted Zlatanov
a7fde0e7e6 url-http.el (url-user-agent): Add :version. 2014-11-05 12:18:22 -05:00
Ted Zlatanov
d9f7c524b6 url-http.el: introduce url-user-agent
* url-http.el (url-user-agent): New variable, can be function or
string.  Suggested by Vibhav Pant <vibhavp@ubuntu.com>.

(url-http-user-agent-string): Use it.

* url-http.el (url-user-agent): New variable, can be function or
string.  Suggested by Vibhav Pant <vibhavp@ubuntu.com>.
2014-11-05 11:06:40 -05:00
Tassilo Horn
eecd19cf09 Fix void-function string-trim error
* lisp/net/eww.el (subr-x): Require subr-x because eww uses
string-trim.
2014-11-05 12:10:20 +01:00
Daiki Ueno
5e28461482 epg: Collect output lines sent to stderr
* epg.el (epg-context): Add new slot ERROR-OUTPUT.
(epg-error-output): New buffer-local variable.
(epg--start): Initialize epg-error-output.
(epg--process-filter): Record output lines sent to stderr, in
epg-error-output.
(epg-wait-for-completion): Copy epg-error-output to ERROR-OUTPUT
slot of context.
* epa-file.el (epa-file-insert-file-contents): On error, display
output sent to stderr.
(epa-file-write-region): Likewise.
2014-11-05 18:38:37 +09:00
Glenn Morris
b6e66a5cc7 Merge from emacs-24; up to 117669 2014-11-04 21:08:57 -08:00
Glenn Morris
ddce73d32f Revert previous accidental commit 2014-11-04 21:08:12 -08:00
Glenn Morris
6a278b64f7 Merge from emacs-24; up to 117669 2014-11-04 21:04:30 -08:00
Stefan Monnier
6cd9d8c94d * lisp/erc/erc.el (erc-send-input): Bind `str' dynamically.
Fixes: debbugs:18936
2014-11-04 15:07:59 -05:00
Paul Eggert
a9f1618de8 Spelling fixes; tweak explanation of commit messages.
* admin/notes/repo: Avoid "DVCS" acronym without first explaining it.
Mention using the first line of a ChangeLog as the topic line, and
that commit messages should use UTF-8.
* lisp/mouse.el (mouse-drag-line): Fix misspelling of "right-fringe".
2014-11-04 09:46:49 -08:00
Ted Zlatanov
f3e25d69b0 * net/eww.el (eww): Trim URL with `string-trim'.
Suggested by Vibhav Pant <vibhavp@gmail.com>.
2014-11-04 11:31:33 -05:00
Eli Zaretskii
a1740a150d Fix error messages from jit-stealth-lock when load-average returns nil.
lisp/jit-lock.el (jit-lock-stealth-fontify): Be tolerant to nil being
 returned by load-average.
2014-11-04 18:30:48 +02:00
Michael Albinus
b6ad705482 * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use
a local copy; setting `inhibit-file-name-handlers' proper might be
more performant.

Fixes: debbugs:18751
2014-11-04 10:02:56 +01:00
Glenn Morris
46fc78f57e * lisp/mail/emacsbug.el (report-emacs-bug): Simplify interactive spec. 2014-11-03 23:11:37 -08:00
Glenn Morris
d236329b52 * lisp/mail/emacsbug.el (report-emacs-bug): No longer include recent-keys
Fixes: debbugs:18900
2014-11-03 23:07:04 -08:00
Lars Magne Ingebrigtsen
15eb2ec114 eww readability tweak
* net/eww.el (eww-score-readability): Don't count comments positively.
2014-11-04 00:46:20 +01:00
Lars Magne Ingebrigtsen
704da6eeb4 shr typo fix from recent check-in
* net/shr.el (shr-retransform-dom): Typo fix.
2014-11-03 23:59:07 +01:00
Lars Magne Ingebrigtsen
b0481eb966 eww point positioning tweak
(eww-display-html): Don't leave point inside forms.
2014-11-03 23:58:02 +01:00
Lars Magne Ingebrigtsen
1ca31e8cbd Minor readability parsing issues with SVC images
* net/eww.el (eww-score-readability): Parse SVC images correctly.

* net/shr.el: Ditto.
2014-11-03 23:54:16 +01:00
Stefan Monnier
50deba142a * lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Fix compiler-macro
autoloading when specified as a lambda.
* lisp/emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Assume that
edebug-prin1-to-string already handles circularity.
2014-11-03 17:48:30 -05:00
Lars Magne Ingebrigtsen
772a965c5f Minor `shr-retransform-dom' fix
* net/shr.el (shr-retransform-dom): Don't ignore elements that
have no children like <br />.
2014-11-03 23:38:26 +01:00
Stefan Monnier
d94bc77ec7 * lisp/simple.el (execute-extended-command--last-typed): New var.
(read-extended-command): Set it.
Don't complete obsolete commands.
(execute-extended-command--shorter-1)
(execute-extended-command--shorter): New functions.
(execute-extended-command): Use them to suggest shorter names.
(indicate-copied-region, deactivate-mark): Use region-active-p.
2014-11-03 17:27:26 -05:00
Glenn Morris
41e962982d Merge from emacs-24; up to 2014-08-07T11:49:36Z!rrt@sc3d.org 2014-11-03 16:49:37 -05:00
Glenn Morris
bd673cc594 NEWS and comment trivia re crisp.el 2014-11-03 16:47:16 -05:00
Lars Magne Ingebrigtsen
303fd9411f Remove `eww-colorize-region'
(eww-colorize-region): Remove duplicate function.
(eww-tag-body): Use `shr-colorize-region'.
2014-11-03 22:27:24 +01:00
Lars Magne Ingebrigtsen
a3e8e5089f eww compilation warning fix
(url-queue): Require `url-queue' to avoid compilation warning.
2014-11-03 21:33:32 +01:00
Lars Magne Ingebrigtsen
39804c1adb Make eww display PDFs inline
* net/eww.el (eww-display-html): Clear `url-queue'.
(eww-display-pdf): New function.
(eww-render): Display PDFs with `doc-view'.
2014-11-03 20:39:08 +01:00
Michael Albinus
6c5a32ddbc * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Use a
local copy of FILENAME, when it is remote.

Fixes: debbugs:18751
2014-11-03 15:29:51 +01:00
Yoni Rabkin
d9079cf1b8 * net/eww.el (eww-list-bookmarks): Autoload. 2014-11-03 08:22:43 -05:00
Lars Magne Ingebrigtsen
bd57ef327d Add missing ChangeLog entry from previous checkin 2014-11-03 02:03:07 +01:00
Lars Magne Ingebrigtsen
01af3a585d * net/shr.el (shr-retransform-dom): Allow several text sub-nodes. 2014-11-03 02:02:37 +01:00
Lars Magne Ingebrigtsen
ab657babf0 Make titles in eww prettier
(eww-tag-title): Remove newlines and extra whitespace from the
displayed title.
2014-11-03 01:35:44 +01:00
Lars Magne Ingebrigtsen
029788dbb0 Fix `eww-display-html' bug when passed an explicit DOM
(eww-display-html): Don't try to decode the text if we've been
passed in a pre-parsed DOM.
2014-11-03 01:30:41 +01:00
Lars Magne Ingebrigtsen
13375c1345 Have `R' in eww save the history
(eww-readable): Save the history before displaying so that we can
go back to the non-readable version.
2014-11-03 01:24:33 +01:00
Lars Magne Ingebrigtsen
54b3c985d6 Fix charset problems with the `R' command in eww
* net/eww.el (eww-display-html): The charset is called `utf-8',
not `utf8'.
(eww-readable): Decode the saved text correctly.
2014-11-03 01:16:21 +01:00
Lars Magne Ingebrigtsen
2e8259b044 Add a new, somewhat experimental "readability" command to eww
* net/eww.el (eww-readable): New command and keystroke.

* net/shr.el (shr-retransform-dom): New function.
2014-11-03 01:01:20 +01:00
Lars Magne Ingebrigtsen
816cad6e24 Fix `eww-current-source' buffer confustion
* net/eww.el (eww-display-html): Set `eww-current-source' in the
correct buffer.
(eww-view-source): Use it.
2014-11-03 00:02:01 +01:00