1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

538 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
cad2bbbe25 Declare rectangle functions in mouse.el to avoid warnings
* lisp/mouse.el (rectangle-dimensions)
(rectangle-position-as-coordinates, rectangle-intersect-p):
Declare these functions from rect.el to avoid compilation warnings.
2019-05-17 04:23:20 +02:00
Paul Eggert
476066e89d Avoid some double-rounding of Lisp timestamps
Also, simplify some time-related Lisp timestamp code
while we’re in the neighborhood.
* lisp/battery.el (battery-linux-proc-acpi)
(battery-linux-sysfs, battery-upower, battery-bsd-apm):
* lisp/calendar/timeclock.el (timeclock-seconds-to-string)
(timeclock-log, timeclock-last-period)
(timeclock-entry-length, timeclock-entry-list-span)
(timeclock-find-discrep, timeclock-generate-report):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-decay-1):
* lisp/emacs-lisp/ert.el (ert--results-update-stats-display)
(ert--results-update-stats-display-maybe):
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/emacs-lisp/timer.el (timer-until)
(timer-event-handler):
* lisp/erc/erc-backend.el (erc-server-send-ping)
(erc-server-send-queue, erc-handle-parsed-server-response)
(erc-handle-unknown-server-response):
* lisp/erc/erc-track.el (erc-buffer-visible):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p)
(erc-cmd-PING, erc-send-current-line):
* lisp/eshell/em-pred.el (eshell-pred-file-time):
* lisp/eshell/em-unix.el (eshell-show-elapsed-time):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
* lisp/gnus/gnus-int.el (gnus-backend-trace):
* lisp/gnus/gnus-sum.el (gnus-user-date):
* lisp/gnus/mail-source.el (mail-source-delete-crash-box):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/ibuf-ext.el (ibuffer-mark-old-buffers):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/mouse.el (mouse--down-1-maybe-follows-link)
(mouse--click-1-maybe-follows-link):
* lisp/mpc.el (mpc--faster-toggle):
* lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE)
(rcirc-sentinel):
* lisp/net/tramp-cache.el (tramp-get-file-property):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/org/org-clock.el (org-clock-resolve):
(org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds):
* lisp/org/org.el (org-evaluate-time-range):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/pixel-scroll.el (pixel-scroll-in-rush-p):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cpp.el (cpp-progress-message):
* lisp/progmodes/flymake.el (flymake--handle-report):
* lisp/progmodes/js.el (js--wait-for-matching-output):
* lisp/subr.el (progress-reporter-do-update):
* lisp/term/xterm.el (xterm--read-event-for-query):
* lisp/time.el (display-time-update, emacs-uptime):
* lisp/tooltip.el (tooltip-delay):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-queue.el (url-queue-prune-old-entries):
* lisp/url/url.el (url-retrieve-synchronously):
* lisp/xt-mouse.el (xterm-mouse-event):
Avoid double-rounding of time-related values.  Simplify.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
When hoping for the best (unlikely), use a better decoded time.
(icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time.
* lisp/calendar/timeclock.el (timeclock-when-to-leave):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle):
* lisp/org/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
Use time-since instead of open-coding most of it.
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel):
* lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt):
Now obsolete.  All uses changed.
(erc-time-diff): Accept all Lisp time values.
All uses changed.
* lisp/gnus/gnus-demon.el (gnus-demon-idle-since):
* lisp/gnus/gnus-score.el (gnus-score-headers):
* lisp/gnus/nneething.el (nneething-make-head):
* lisp/gnus/nnheader.el (nnheader-message-maybe):
* lisp/gnus/nnimap.el (nnimap-keepalive):
* lisp/image.el (image-animate-timeout):
* lisp/mail/feedmail.el (feedmail-rfc822-date):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/newst-backend.el (newsticker--image-get):
* lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333):
* lisp/obsolete/xesam.el (xesam-refresh-entry):
* lisp/org/org-agenda.el (org-agenda-show-clocking-issues)
(org-agenda-check-clock-gap, org-agenda-to-appt):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-columns-edit-value)
(org-columns, org-agenda-columns):
* lisp/org/org-duration.el (org-duration-from-minutes):
* lisp/org/org-element.el (org-element-cache-sync-duration)
(org-element-cache-sync-break)
(org-element--cache-interrupt-p, org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-table.el (org-table-sum):
* lisp/org/org-timer.el (org-timer-show-remaining-time)
(org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-today)
(org-auto-repeat-maybe, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/ses.el (ses--time-check):
* lisp/type-break.el (type-break-time-warning)
(type-break-statistics, type-break-demo-boring):
* lisp/url/url-cache.el (url-cache-expired)
(url-cache-prune-cache):
* lisp/vc/vc-git.el (vc-git-stash-snapshot):
* lisp/erc/erc-match.el (erc-log-matches-come-back):
Simplify.
2019-02-22 18:33:57 -08:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Stefan Monnier
ca0f86e60a * mouse.el (mouse-posn-property): Add comment 2018-11-19 09:12:15 -05:00
Pierre Téchoueyres
4eb0e4266f 'minor-mode-menu-from-indicator' now display full minor mode.
When there is no menu for a mode, display the mode name after the
indicator instead of just the indicator (which is sometime cryptic).
Ex:
before : SP
now    : SP - Smartparens Mode

* etc/NEWS: Add en entry for this new feature.
* lisp/mouse.el (minor-mode-menu-from-indicator): Append the mode name
  after the indicator when there is no menu defined by the mode.
2018-11-03 10:58:57 +02:00
Federico Tedin
8fffac14b1 Subject: (mouse-drag-and-drop-region): Simplify and remove assumptions
* lisp/mouse.el (mouse-drag-and-drop-region): Use insert-for-yank for
insertion, remove rectangular-region-specific variables.
Use text-property-not-all.
* lisp/rect.el (rectangle-dimensions): New function.
(rectangle-position-as-coordinates): Use the usual 1-origin for lines.
2018-10-26 13:16:50 -04:00
Federico Tedin
134ba45bf0 Allow two mouse functions to work with Rectangle Mark mode
* lisp/mouse.el (mouse-save-then-kill): Make
mouse-save-then-kill work with rectangular regions, including
when mouse-drag-copy-region is set to t. (Bug#31240)
(mouse-drag-and-drop-region): Allow dragging and dropping
rectangular regions. (Bug#31240)
* rect.el (rectangle-intersect-p)
(rectangle-position-as-coordinates): New functions.
2018-10-17 08:34:51 +02:00
Glenn Morris
6aa93b45af Merge from origin/emacs-26
1908173 (origin/emacs-26) Fix Bug#32828
7f5086d * lisp/net/shr.el (shr-copy-url): Fix docstring.
d309994 Fix typos in documentation
25cdd65 ; Spellcheck two more documentation strings
c8bda05 ; * lisp/simple.el (save-interprogram-paste-before-kill): Fix...
dc7fdee * doc/emacs/kmacro.texi (Basic Keyboard Macro): Mention old b...
17766a1 Improve docs of functions/variables related to 'display-buffer'
a363931 * lisp/mouse.el (tear-off-window): Fix non-mouse use (bug#32799)
8b8a4c0 Improve documentation of directory-local variables
c9c9756 Don't use obsolete variable 'save-place' in documentation
ca208e8 Use save-place-mode instead of save-place
2018-09-28 07:54:24 -07:00
Stefan Monnier
a3639317bc * lisp/mouse.el (tear-off-window): Fix non-mouse use (bug#32799) 2018-09-22 19:16:55 -04:00
Glenn Morris
b81e193ac0 Merge from origin/emacs-26
5cb3991 Fix a typo in emacs-lisp-intro.texi
d6aa55e Avoid segfaults in replace-buffer-contents with large buffers
d22b8d1 Adjust for scaling for mode-line popup menus (Bug#31880)
3d2e3dc Change name of `seqp' argument (Bug#26411)
40e1db8 Change index of ";" to better reflect it's usage (Bug#31623)
d289e7e Fix bug of 'mouse-drag-and-drop-region' to detect edges of re...
e292c09 Fix #'fun handling inside `labels' (Bug#31792)
2018-06-23 07:50:59 -07:00
Tak Kunihiro
d289e7e38a Fix bug of 'mouse-drag-and-drop-region' to detect edges of region (Bug#31905)
* lisp/mouse.el (mouse-drag-and-drop-region): Detect both the
beginning and the end of character of region during dragging
text.
2018-06-20 09:27:50 +02:00
Glenn Morris
988b53ed2d Merge from origin/emacs-26
ebe065f Prevent errant scroll on mouse click (Bug#31546)
ffd2018 Minor documentation fix
cf4dc95 * lisp/window.el (window-toggle-side-windows): Doc fix.  (Bug...
2018-06-18 12:14:26 -07:00
Aaron Jensen
ebe065fddf Prevent errant scroll on mouse click (Bug#31546)
* src/nsterm.m (ns_mouse_position): Use correct frame when determining
  mouse position.
* lisp/mouse.el (mouse-drag-track): Only account for mode-line height
  if `mode-line-format' is non-nil.
2018-06-17 11:50:57 +01:00
Stefan Monnier
c13cd74322 (read_key_sewuence): Use POSN in second event when needed (bug#30955)
* src/keyboard.c (active_maps): Add arg 'second_event'.
(read_key_sequence): Pass it.

* lisp/mouse.el (mouse--click-1-maybe-follows-link): Modify event in place.
2018-03-27 15:26:02 -04:00
Stefan Monnier
7eac1a57ce * lisp/mouse.el: Remove redundant ':group's. 2018-03-27 15:22:42 -04:00
Stefan Monnier
3d5e31eceb * lisp/mouse.el: Rework the mouse-1-click remapping
Avoid peeking ahead at the next event because this had undesirable effects,
such as making 'this-single-command-raw-keys' return bogus information.

(mouse--last-down): New variable.
(mouse--down-1-maybe-follows-link): Don't do the remapping here.
Instead, just keep track of the time when the down happened.
(mouse--down-1-maybe-follows-link): Do the remapping here.
(key-translation-map): Add bindings for (double-)mouse-1.
2018-01-30 12:41:29 -05:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Tak Kunihiro
c62ced5b4d Make 'mouse-drag-and-drop-region' more robust and customizable
* lisp/mouse.el
(mouse-drag-and-drop-region-cut-when-buffers-differ): New option
to permit 'mouse-drag-and-drop-region' to cut text also when source
and destination buffers differ.
(mouse-drag-and-drop-region-show-tooltip): New option to toggle
display of tooltip during mouse dragging on graphic displays.
(mouse-drag-and-drop-region-show-cursor): New option to toggle
moving point with mouse cursor during mouse dragging of region.
(mouse-drag-and-drop-region): New face to highlight original
text while dragging.
(mouse-drag-and-drop-region): Make use of new options and face.
Ignore errors during tracking.
2017-12-17 11:19:19 +01:00
Martin Rudalics
796c7f7a94 ; Fix last fix of 'mouse-drag-and-drop-region'
* lisp/mouse.el (mouse-drag-and-drop-region): Use 'car-safe'
instead of 'car' to ignore 'select-window' events.  Thanks to
Stefan Monnier for spotting this.
2017-11-14 18:36:12 +01:00
Martin Rudalics
ff7bd84b23 Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil
* lisp/mouse.el (mouse-drag-and-drop-region): Ignore
'select-window' events to make it work with
'mouse-autoselect-window'.
2017-11-14 10:09:24 +01:00
Charles A. Roelli
a7f154688d Improve customization type of 'mouse-drag-and-drop-region'
* lisp/mouse.el (mouse-drag-and-drop-region): Provide a more
precise customization type.
2017-10-15 12:40:34 +02:00
Eli Zaretskii
28e0c410c9 ; * lisp/mouse.el (secondary-selection-exist-p): Doc fix. 2017-09-21 11:29:11 +03:00
Tak Kunihiro
31e1d9ef2f Support setting region from secondary selection and vice versa
* lisp/mouse.el (secondary-selection-exist-p): New function to
allow callers to tell existence of the secondary selection
in current buffer.
(secondary-selection-to-region): New function to set
beginning and end of the region from those of the secondary
selection.
(secondary-selection-from-region): New function to set
beginning and end of the secondary selection from those of
the region.  (Bug#27530)

* etc/NEWS: Mention the new functions.
2017-09-21 11:26:00 +03:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
20e9a00fb5 Spelling fixes
* lisp/org/org-table.el (org-table-sort-lines):
Fix misspelling in prompt.
* lisp/org/ox-ascii.el (org-ascii--describe-datum):
Fix misspelling in call to org-element-lineage.
2017-07-06 00:24:56 -07:00
Martin Rudalics
1886246f6f Provide additional support for child frames
Provide mouse dragging and resizing of frames.  Allow resizing
frames proportionally.  Provide additional functionality for
child frames.  Minor bug fixes.

* lisp/frame.el (frame-border-width, frame-pixel-width)
(frame-pixel-height): Alias to `frame-internal-border-width',
`frame-native-width' and `frame-native-height'.
(frame-inner-width, frame-inner-height, frame-outer-width)
(frame-outer-height): New functions.
* lisp/minibuffer.el (completion-auto-help): Fix typo.
* lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
(mouse-drag-header-line): Allow moving a frame by dragging the
mode line of its bottommost window (on a minibuffer-less frame)
or the header line of its topmost window.
(mouse-drag-vertical-line): Mention argument in doc-string.
(mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
(mouse-drag-top-left-corner, mouse-drag-top-edge)
(mouse-drag-top-right-corner, mouse-drag-right-edge)
(mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
(mouse-drag-bottom-left-corner): New functions for resizing a
frame by dragging its internal border together with
corresponding key bindings.
* lisp/tooltip.el (tooltip-frame-parameters): Add
'no-special-glyphs' to default parameters and update version
tag.
* lisp/window.el (frame-auto-hide-function): Add choice to make
frame invisible and update version tag.
(window--delete): Handle 'auto-hide-function' frame parameter.
(window--maybe-raise-frame): Respect 'no-focus-on-map' and
'no-accept-focus' frame parameters.
(display-buffer--action-function-custom-type): Add
`display-buffer-in-child-frame'.
(display-buffer): Mention `display-buffer-in-child-frame' in
doc-string.
(display-buffer-in-child-frame): New action function for
`display-buffer'.
(window--sanitize-margin): Return zero when MARGIN cannot be
sanitized.
(fit-frame-to-buffer): Major rewrite to handle child frames and
'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
frame parameters.
(window-largest-empty-rectangle--maximums-1)
(window-largest-empty-rectangle--maximums)
(window-largest-empty-rectangle--disjoint-maximums)
(window-largest-empty-rectangle): New functions.

* src/dispextern.h (WINDOW_WANTS_MODELINE_P)
(WINDOW_WANTS_HEADER_LINE_P): Remove.  Functionality is now
provided by corresponding functions window_wants_modeline and
window_wants_header_line in window.c.  Adjust users.
* src/dispnew.c (adjust_glyph_matrix)
(buffer_posn_from_coords): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.
* src/frame.c (keep_ratio): New function.
(adjust_frame_size): Call keep_ratio for each of F's child
frames.
(make_frame): Initialize no_special_glyphs slot.
(frame_internal_border_part): New function.
(Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
to Fframe_native_width, Fframe_native_height mand
Fframe_internal_border_width.
(frame_parm_table): Add Qno_special_glyphs entry.
(frame_float_type): New enumeration type.
(frame_float): New function to handle frame size and position
ratios.
(x_set_frame_parameters): Handle size and position ratios.
(x_set_no_special_glyphs): New function
(x_figure_window_size): Handle size and position ratios.
(syms_of_frame): Add Qdisplay_monitor_attributes_list,
Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
Qheight_only, Qleft_only and Qtop_only.
* src/frame.h (internal_border_part): New enumeration type.
(struct frame): New slot no_special_glyphs.
(FRAME_NO_SPECIAL_GLYPHS): New macro.
* src/gtkutil.c (xg_frame_restack): Return immediately for
GTK versions before 2.18.0.
* src/keyboard.c (internal_border_parts): New array constant.
(make_lispy_position): For frames with border dragging enabled
return internal border part.
(syms_of_keyboard): New symbols Qdrag_internal_border,
Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
Qright_edge, Qbottom_right_corner, Qbottom_edge and
Qbottom_left_corner.
* src/minibuf.c (read_minibuf_unwind): When exiting the
minibuffer deal with frames that have the 'minibuffer-exit'
parameter set.
(syms_of_minibuf): New symbol Qminibuffer_exit.
* src/nsfns.m (frame_parm_handler): Add entry for
x_set_no_special_glyphs.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
Intitialize new cursor types for dragging frame borders.
* src/nsterm.h (struct ns_output): Add new cursor types for
dragging frame borders.
* src/w32fns.c (w32_frame_parm_handlers): Add entry for
x_set_no_special_glyphs.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
Intitialize new cursor types for dragging frame borders.
* src/w32term.h (struct w32_output): Add new cursor types for
dragging frame borders.
* src/window.c (coordinates_in_window)
(Fwindow_line_height, window_internal_height): Use
window_wants_modeline and window_wants_header_line instead of
WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
(Fwindow_lines_pixel_dimensions): New function.
(window_parameter): New function.
(Fwindow_parameter): Call window_parameter.
(window_wants_mode_line, window_wants_header_line): New
functions replacing the macros WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
(syms_of_window): New symbols Qmode_line_format and
Qheader_line_format.
* src/window.h: Reorganize and re-comment macros.  Use
window_wants_modeline and window_wants_header_line instead of
WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
(MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
(WINDOW_BUFFER): New macro.
(WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
* src/xdisp.c (window_text_bottom_y, window_box_height)
(window_box, start_display)
(compute_window_start_on_continuation_line)
(try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id)
(display_line, expose_window): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.
(pos_visible_p, display_mode_lines): Respect W's
'mode-line-format' and 'header-line-format' window parameters.
(init_iterator): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.  For tip frames respect
no_special_glyphs value.
(note_mouse_highlight): Set frame border cursors when on
internal border.
(x_draw_right_divider, x_draw_bottom_divider): Try to improve
drawing of window dividers.
* src/xfns.c (mouse_cursor): Add entries for border parts.
(mouse_cursor_types): Add entries for cursor types to drag
frame borders.
(INSTALL_CURSOR): Add entries for new cursor types to drag
frame borders.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
(x_frame_parm_handlers): Add entry for
x_set_no_special_glyphs.
(Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
(Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
(Vx_window_right_edge_shape)
(Vx_window_bottom_right_corner_shape)
(Vx_window_bottom_edge_shape)
(Vx_window_bottom_left_corner_shape): New variables.
(x_frame_restack): Call xg_frame_restack only for GTK versions
starting with 2.18.0.
* src/xterm.c (x_free_frame_resources): Remove new cursors for
dragging frame borders.
* src/xterm.h (struct x_output): Add new cursor types for
dragging frame borders.

* doc/lispref/display.texi (Size of Displayed Text): Document
`window-lines-pixel-dimensions'.
* doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
Parameters".
* doc/lispref/frames.texi (Frame Size): Replace
frame-pixel-width/-height by frame-native-width/-height.  Add
frame-inner-width/-height and frame-outer-width/-height docs.
(Position Parameters): Describe specifying position as ratios.
Clarify remark about positions relative to bottom/ridge display
edge.
(Size Parameters): Describe specifying sizes as ratios.
Describe 'fit-frame-to-buffer-margins' and
'fit-frame-to-buffer-sizes' parameters.
(Layout Parameters): Describe 'no-special-glyphs' parameter.
(Frame Interaction Parameters): Describe 'auto-hide-function',
'minibuffer-exit' and 'keep-ratio' parameters.
(Mouse Dragging Parameters): New section describing
'drag-internal-border', 'drag-with-header-line',
'drag-with-mode-line', 'snap-width', 'top-visible' and
'bottom-visible' parameters.
(Management Parameters): Mention that `override-redirect' has
no effect on MS Windows.
(Font and Color Parameters): Mention child frames for `alpha'
parameter.
(Child Frames): Rewrite section with description and cross
references to new frame parameters added.
* doc/lispref/modes.texi (Mode Line Basics): Mention
'mode-line-format' and 'header-line-format' window parameters.
* doc/lispref/windows.texi (Resizing Windows): Mention effect
of `fit-frame-to-buffer-margins' for child frames.
(Display Action Functions): New action function
`display-buffer-in-child-frame'.
(Quitting Windows): Mention `make-frame-invisible' as optional
value of `frame-auto-hide-function' and `auto-hide-function'
frame paameter.
(Coordinates and Windows): Describe new function
`window-largest-empty-rectangle'.
(Window Parameters): Describe new parameters 'mode-line-format'
and 'header-line-format'.  Index all window parameters described
in this section.
2017-06-25 11:33:25 +02:00
Tak Kunihiro
c0f2c29877 Support drag and drop of region by mouse (Bug#26725)
* doc/emacs/frames.texi (Drag and Drop): Document support of drag
and drop region by mouse.
* lisp/mouse.el (mouse-drag-region): Call mouse-drag-and-drop-region
when start-event is on region.
(mouse-drag-and-drop-region): New function, moves the region by
(mouse-drag-and-drop-region): New defcustom.
* etc/NEWS: Mention mouse-drag-and-drop-region.
2017-05-27 14:57:11 +03:00
Bartosz Duszel
6a151cf8d5 Don't pass the value of point to 'push-mark', as that's the default.
* lisp/textmodes/bib-mode.el (mark-bib):
* lisp/simple.el (mark-whole-buffer, yank):
* lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
* lisp/progmodes/xscheme.el (xscheme-yank):
* lisp/progmodes/verilog-mode.el (verilog-mark-defun):
* lisp/progmodes/perl-mode.el (perl-mark-function):
* lisp/progmodes/pascal.el (pascal-mark-defun):
* lisp/progmodes/meta-mode.el (meta-mark-defun):
* lisp/progmodes/icon.el (mark-icon-function):
* lisp/progmodes/cc-cmds.el (c-mark-function):
* lisp/obsolete/vip.el (ex-goto):
* lisp/obsolete/vi.el (vi-put-before):
* lisp/mouse.el (mouse-yank-primary):
* lisp/menu-bar.el (menu-bar-select-yank):
* lisp/mail/sendmail.el (mail-yank-original):
* lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
* lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer)
(viper-mark-end-of-buffer):
* lisp/cedet/semantic/senator.el (senator-mark-defun):
* lisp/allout.el (allout-mark-topic): Remove unnecessary argument
`(point)' from calls to `push-mark'.  (Bug#25565)
2017-04-28 11:25:26 +03:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Tino Calancha
5ffdbe0a5e Update parameter :version to 26.1 in several defcustom
Following defcustom where added or modified for 25.2 release.
In fact all these changes belong to 26.1 release.
* lisp/battery.el (battery-linux-sysfs-regexp)
* lisp/comint.el (comint-password-prompt-regexp)
* lisp/dired.el (dired-always-read-filesystem)
* lisp/image.el (image-scaling-factor)
* lisp/ibuf-ext.el (ibuffer-never-search-content-name)
(ibuffer-never-search-content-mode)
* lisp/mouse.el (mouse-select-region-move-to-beginning)
* lisp/net/net-utils.el (iwconfig-program, iwconfig-program-options)
(netstat-program, route-program, route-program-options)
* lisp/net/sieve-manage.el (sieve-manage-default-stream)
* lisp/progmodes/grep.el (grep-save-buffers)
* lisp/vc/add-log.el (change-log-directory-files)
* lisp/url/url-vars.el (url-user-agent)
* lisp/vc/vc-hg.el (vc-hg-symbolic-revision-styles)
(vc-hg-use-file-version-for-mode-line-version)
(vc-hg-parse-hg-data-structures)
* lisp/wdired.el (wdired-create-parent-directories)
* lisp/faces.el (homoglyph, nobreak-hyphen, read-multiple-choice-face)
* lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
(gnus-button-url-regexp)
* lisp/window.el (switch-to-buffer-preserve-window-point)
* lisp/ibuffer.el (ibuffer-formats, ibuffer-locked-char)
(ibuffer-locked-buffer)
* lisp/textmodes/flyspell.el (flyspell-sort-corrections-function)
* lisp/emacs-lisp/edebug.el (edebug-sit-on-break)
* lisp/gnus/message.el (message-user-fqdn)
* lisp/simple.el (shell-command-dont-erase-buffer)
(extended-command-suggest-shorter)
* lisp/net/shr.el (shr-use-fonts)
* lisp/files.el (mounted-file-systems, kill-emacs-query-functions)
2016-11-17 00:39:43 +09:00
Paul Eggert
fffa49b136 Merge from origin/emacs-25
cf9e174 Document the optional zlib library in MS-Windows builds
84eb144 ; * admin/notes/unicode: Mention BidiCharacterTest.txt.
73c67dd Fix tagging of DEFUN by etags
ea1960b Avoid resetting track-mouse by mouse clicks
505fef3 Improve nt/README.W32 instructions
1229cc4 Document that desktop file overrides frame parameters
f0eb70d ; Update ChangeLog.2 and ldef-boot.el for Emacs 25.1 release

# Conflicts:
#	ChangeLog.2
#	admin/notes/unicode
#	lisp/ldefs-boot.el
2016-09-26 13:35:56 -07:00
Eli Zaretskii
f746a92c3c Fix region display while dragging mouse
* lisp/mouse.el (mouse-drag-track): Reset deactivate-mark in the
buffer of the drag event, to allow mark to be set and the region
be shown as we drag the mouse.  (Bug#24030)

This was backported from master
(cherry picked from commit 7d58b02f36)
2016-09-23 17:01:42 +03:00
Eli Zaretskii
ea1960bf3c Avoid resetting track-mouse by mouse clicks
* lisp/mouse.el (mouse-drag-line, mouse-drag-track): Don't assume
the previous value of track-mouse is nil; instead, save and
restore the previous value.  (Bug#24480)
2016-09-21 18:00:18 +03:00
Paul Eggert
6b780a2e97 Merge from origin/emacs-25
9ba51ed Document buffer-swap-text+save-excursion interaction
452aa94 Fix eieio vs cl-generic incompatibilities found in Rudel (bug...
248d5dd Include cl-generic in package--builtin-versions (bug#22817)
8f5a8b6 Improve timing in `tramp-test29-environment-variables'
05ba7a0 Add test for handling environment variables in Tramp
e393d4f * lisp/emacs-lisp/package.el (describe-package-1) (package-st...
5e38887 ; * lisp/net/tramp.el: Fix 2010-10-04 comment typo.  (Bug#23913)
90f2169 ; Spelling fixes
069fc05 Improve documentation of search functions
0a0144a Delete environment variables in Tramp when needed
f624671 Add "New in Emacs 25" section to the FAQ
658daf9 Fix 'vertical-motion' in non-interactive sessions
686b520 Fix memory leak in imagemagick-types
4069b71 Update ELisp manual to match 'string-collate-equalp' doc string
1b2d6a6 Clarify docstring of find-feature-regexp
aac62a6 Add details to cl-lib defining macros' docstrings
d6aa4da Clarify doc string of 'save-buffer'
03bcf11 Un-confuse doc string of 'string-collate-equalp'
c53135b Clarify documentation of 'mouse-on-link-p'

# Conflicts:
#	lisp/emacs-lisp/eieio-core.el
2016-08-05 14:09:08 -07:00
Eli Zaretskii
7d58b02f36 Fix region display while dragging mouse
* lisp/mouse.el (mouse-drag-track): Reset deactivate-mark in the
buffer of the drag event, to allow mark to be set and the region
be shown as we drag the mouse.  (Bug#24030)
2016-07-30 11:32:02 +03:00
Stefan Monnier
d2533d7268 * lisp/mouse.el (mouse): Consolidate group definition here
* lisp/cus-edit.el (mouse): Remove both group definitions.
2016-07-13 11:08:21 -04:00
Stephen Berman
2f67f8a145 * lisp/mouse.el (mouse-select-region-move-to-beginning): Add :group. 2016-07-12 10:43:24 +02:00
Mario Lang
466ee1b3ea An efficient built-in mapcan
A built-in version of `mapcan' avoids consing up (and GC'ing) the
intermediate list.

* src/fns.c (Fmapcan): New built-in.
(syms_of_fns): Define.

* lisp/emacs-lisp/cl.el (mapcan): Remove defalias.

* lisp/emacs-lisp/cl-extra.el (cl-mapcan): Use built-in `mapcan'
if only one sequence is provided.

* lisp/progmodes/hideif.el (hif-delimit):
* lisp/dired-aux.el (dired-do-find-regexp):
* lisp/woman.el (woman-parse-colon-path): Use `mapcan' instead of
`cl-mapcan'.

* lisp/woman.el (eval-when-compile): Require 'cl-lib only when
compiling.

* lisp/mouse.el (mouse-buffer-menu-map):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/progmodes/gud.el (gud-jdb-build-source-files-list):
* lisp/cedet/semantic/db-find.el (semanticdb-fast-strip-find-results):
* lisp/cedet/semantic/symref/grep.el (semantic-symref-derive-find-filepatterns):
* lisp/gnus/nnmail.el (nnmail-split-it):
* lisp/gnus/gnus-sum.el (gnus-articles-in-thread):
* lisp/gnus/gnus-registry.el (gnus-registry-sort-addresses):
* lisp/gnus/gnus-util.el (gnus-mapcar): Use `mapcan'.
2016-07-10 01:18:47 +02:00
Stephen Berman
d0c0b71d88 Allow selecting region with mouse to move point to beginning
* etc/NEWS: Mention new user option
`mouse-select-region-move-to-beginning'.

* doc/emacs/frames.texi (Mouse Commands): Add cross-reference
to the following.
(Word and Line Mouse): Describe how double-clicking mouse-1 to
activate region and `mouse-select-region-move-to-beginning'
affect point.

* lisp/mouse.el (mouse-select-region-move-to-beginning): New defcustom.
(mouse-set-point): Use it.  (Bug#23478)
2016-07-08 17:36:55 +02:00
Eli Zaretskii
c53135b6b6 Clarify documentation of 'mouse-on-link-p'
* lisp/mouse.el (mouse-on-link-p): Clarify the form of the POS
argument.  (Bug#23899)
2016-07-07 19:15:03 +03:00
Dmitry Antipov
a7e302dc1d Prefer 'frame-parameter' where it is expected to be a bit faster
* lisp/international/mule-diag.el (mule-diag):
* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu):
* lisp/mouse.el (mouse-drag-line, font-menu-add-default):
* lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar):
* lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'.
2016-07-06 06:05:15 +03:00
Paul Eggert
68cb71c092 Merge from origin/emacs-25
9ae514a * etc/AUTHORS: Update the AUTHORS file
3ca428e add entries to authors.el
66d556b Fix eldoc-related freezes in python mode
d59bcbc Handle mouse leaving initial window in `mouse-set-region' (Bu...
27fe1e4 org.el: Fix bindings of < and > for calendar scrolling
a813487 Fix undo boundary in recursive edit (Bug#23632)
1f85b7c Doc fixes re alist-get.  (Bug#23548)
ba3f206 * lisp/progmodes/python.el (inferior-python-mode): Avoid tabs...
56fa055 * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>:...
4c1370a * lisp/help-fns.el (describe-function-1): Fix handling of fil...
a3f7ae8 * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".
601b9b2 * doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.
2016-06-19 00:47:00 +02:00
Martin Rudalics
d59bcbc00b Handle mouse leaving initial window in `mouse-set-region' (Bug#23707)
* lisp/mouse.el (mouse-set-region): If the mouse ends up in
another window or on the menu bar, use `window-point' of
selected window instead of `posn-point' of the event end
(Bug#23707).
2016-06-09 10:12:48 +02:00
Paul Eggert
2aa6b47e3e Merge from origin/emacs-25
6e3adf8 Fix crash in syntax.c after GC
973ce5a Improve squiggly heredoc support in non-SMIE Ruby mode
9d5cceb Fix doc string quoting
0b33a23 Fix mouse dragging of vertical dividers with scroll bars on l...
a5d05f4 * etc/PROBLEMS: Mention the link-time problems on FreeBSD 11.
2016-06-07 09:34:27 -07:00
Martin Rudalics
0b33a23ffe Fix mouse dragging of vertical dividers with scroll bars on left (Bug#23690)
* lisp/mouse.el (mouse-drag-line): With scroll bars on the left
adjust trailing edge of window on the left when dragging the
vertical divider of the mode line.  (Bug#23690)
2016-06-05 11:50:47 +02:00
Philipp Stephani
f2b7a43268 Fix handling of ‘mouse-on-link-p’.
If ‘mouse-on-link-p’ returns a string or vector, the first element
is to be used as new event.  Translation to ‘mouse-2’ should only
happen if the return value is not a string or vector.  See
docstring of ‘mouse-on-link-p’ and Bug#23288.

* lisp/mouse.el (mouse--down-1-maybe-follows-link): Process return
value of ‘mouse-on-link-p’ according to documentation.

* test/lisp/mouse-tests.el (bug23288-use-return-value)
(bug23288-translate-to-mouse-2): Tests for Bug#23288.
2016-05-20 19:47:58 +02:00
Lars Ingebrigtsen
42a4e9b70d Fix text in menu in minor-mode-menu-from-indicator
* lisp/mouse.el (minor-mode-menu-from-indicator): Don't
capitalize "Off" in "Turn Off" (bug#11028).
2016-05-01 21:46:56 +02:00
Alan Mackenzie
95f5a4337c Make double-click-1 work with unbalanced parens in CC Mode. Fixes bug#5560.
* lisp/mouse.el (mouse-start-end): check the syntax of alleged parens with
`syntax-after' to ensure syntax-table text properties are respected.
2016-02-25 09:31:23 +00:00