mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-22 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-23 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-24 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-25 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-26 Fix permission bogosities * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-27 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-28 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-29 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-30 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-50
This commit is contained in:
commit
b80bf66eab
32 changed files with 541 additions and 323 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2004-01-06 Eric Hanchrow <offby1@blarg.net> (tiny change)
|
||||||
|
|
||||||
|
* make-dist (tempdir): Include cursors in nt/icons
|
||||||
|
|
||||||
2003-12-30 Eli Zaretskii <eliz@elta.co.il>
|
2003-12-30 Eli Zaretskii <eliz@elta.co.il>
|
||||||
|
|
||||||
* INSTALL.CVS: Renamed from INSTALL-CVS to avoid file-name
|
* INSTALL.CVS: Renamed from INSTALL-CVS to avoid file-name
|
||||||
|
|
@ -5745,7 +5749,7 @@
|
||||||
to match build-install and paths.h.
|
to match build-install and paths.h.
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; coding: iso-2022-7bit-unix
|
;; coding: iso-2022-7bit
|
||||||
;; End:
|
;; End:
|
||||||
|
|
||||||
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
|
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
|
||||||
|
|
|
||||||
20
etc/NEWS
20
etc/NEWS
|
|
@ -1792,14 +1792,18 @@ mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'.
|
||||||
*** Mouse clicks on fringes now generates left-fringe or right-fringes
|
*** Mouse clicks on fringes now generates left-fringe or right-fringes
|
||||||
events, rather than a text area click event.
|
events, rather than a text area click event.
|
||||||
|
|
||||||
|
*** Mouse clicks in the left and right marginal areas now includes a
|
||||||
|
sensible buffer position corresponding to the first character in the
|
||||||
|
corresponding text row.
|
||||||
|
|
||||||
|
*** Function `mouse-set-point' now works for events outside text area.
|
||||||
|
|
||||||
+++
|
+++
|
||||||
*** Mouse events now includes buffer position for all event types.
|
*** Mouse events now includes buffer position for all event types.
|
||||||
|
|
||||||
+++
|
+++
|
||||||
*** `posn-point' now returns buffer position for non-text area events.
|
*** `posn-point' now returns buffer position for non-text area events.
|
||||||
|
|
||||||
*** Function `mouse-set-point' now works for events outside text area.
|
|
||||||
|
|
||||||
+++
|
+++
|
||||||
*** New function `posn-area' returns window area clicked on (nil means
|
*** New function `posn-area' returns window area clicked on (nil means
|
||||||
text area).
|
text area).
|
||||||
|
|
@ -1817,9 +1821,15 @@ text area).
|
||||||
*** Mouse events include relative x and y pixel coordinates relative to
|
*** Mouse events include relative x and y pixel coordinates relative to
|
||||||
the top left corner of the object (image or character) clicked on.
|
the top left corner of the object (image or character) clicked on.
|
||||||
|
|
||||||
*** New functions 'posn-object' and 'posn-object-x-y' return the image
|
+++
|
||||||
or string object of a mouse click, and the x and y pixel coordinates
|
*** Mouse events include the pixel width and height of the object
|
||||||
relative to the top left corner of that object.
|
(image or character) clicked on.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** New functions 'posn-object', 'posn-object-x-y', and
|
||||||
|
'posn-object-width-height' return the image or string object of a mouse
|
||||||
|
click, the x and y pixel coordinates relative to the top left corner
|
||||||
|
of that object, and the total width and height of that object.
|
||||||
|
|
||||||
** New function `force-window-update' can initiate a full redisplay of
|
** New function `force-window-update' can initiate a full redisplay of
|
||||||
one or all windows. Normally, this is not needed as changes in window
|
one or all windows. Normally, this is not needed as changes in window
|
||||||
|
|
|
||||||
|
|
@ -966,7 +966,7 @@ An example of such an error is:
|
||||||
|
|
||||||
x-complement-fontset-spec: "Wrong type argument: stringp, nil"
|
x-complement-fontset-spec: "Wrong type argument: stringp, nil"
|
||||||
|
|
||||||
This can be another symptom of stale *.elc files in your classpath.
|
This can be another symptom of stale *.elc files in your load-path.
|
||||||
The following command will print any duplicate Lisp files that are
|
The following command will print any duplicate Lisp files that are
|
||||||
present in load-path:
|
present in load-path:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
2004-01-08 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* emacsclient.c (main): Save errno from socket_status.
|
||||||
|
|
||||||
2004-01-04 Andreas Schwab <schwab@suse.de>
|
2004-01-04 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* emacsclient.c (main): Fix socket name when using another user.
|
* emacsclient.c (main): Fix socket name when using another user.
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,7 @@ main (argc, argv)
|
||||||
|
|
||||||
{
|
{
|
||||||
int sock_status = 0;
|
int sock_status = 0;
|
||||||
int oerrno = 0;
|
int saved_errno = 0;
|
||||||
|
|
||||||
if (! socket_name)
|
if (! socket_name)
|
||||||
{
|
{
|
||||||
|
|
@ -452,7 +452,7 @@ main (argc, argv)
|
||||||
|
|
||||||
/* See if the socket exists, and if it's owned by us. */
|
/* See if the socket exists, and if it's owned by us. */
|
||||||
sock_status = socket_status (server.sun_path);
|
sock_status = socket_status (server.sun_path);
|
||||||
oerrno = errno;
|
saved_errno = errno;
|
||||||
if (sock_status)
|
if (sock_status)
|
||||||
{
|
{
|
||||||
/* Failing that, see if LOGNAME or USER exist and differ from
|
/* Failing that, see if LOGNAME or USER exist and differ from
|
||||||
|
|
@ -473,7 +473,7 @@ main (argc, argv)
|
||||||
sprintf (server.sun_path, "/tmp/emacs%d-%s/server",
|
sprintf (server.sun_path, "/tmp/emacs%d-%s/server",
|
||||||
(int) pw->pw_uid, system_name);
|
(int) pw->pw_uid, system_name);
|
||||||
sock_status = socket_status (server.sun_path);
|
sock_status = socket_status (server.sun_path);
|
||||||
oerrno = errno;
|
saved_errno = errno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -492,14 +492,14 @@ main (argc, argv)
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
/* `stat' failed */
|
/* `stat' failed */
|
||||||
if (errno == ENOENT)
|
if (saved_errno == ENOENT)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"%s: Can't find socket; have you started the server?\n\
|
"%s: Can't find socket; have you started the server?\n\
|
||||||
To start the server in Emacs, type \"M-x server-start\".\n",
|
To start the server in Emacs, type \"M-x server-start\".\n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
else
|
else
|
||||||
fprintf (stderr, "%s: Can't stat %s: %s\n",
|
fprintf (stderr, "%s: Can't stat %s: %s\n",
|
||||||
argv[0], server.sun_path, strerror (oerrno));
|
argv[0], server.sun_path, strerror (saved_errno));
|
||||||
fail ();
|
fail ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,61 @@
|
||||||
|
2004-01-09 John Paul Wallington <jpw@gnu.org>
|
||||||
|
|
||||||
|
* bindings.el (mode-line-change-eol): Add EVENT parameter.
|
||||||
|
Temporarily select EVENT's window for changing eol type.
|
||||||
|
|
||||||
|
2004-01-09 Deepak Goel <deego@gnufans.org>
|
||||||
|
|
||||||
|
* calendar/diary-lib.el (diary-entry-time):
|
||||||
|
Also accept time in the form XX[.XX][am/pm/AM/PM].
|
||||||
|
(fancy-diary-font-lock-keywords): Likewise.
|
||||||
|
(diary-font-lock-keywords): Likewise.
|
||||||
|
* calendar/appt.el (appt-add): Likewise.
|
||||||
|
(appt-make-list): Likewise.
|
||||||
|
(appt-convert-time): Likewise.
|
||||||
|
|
||||||
|
2004-01-08 Nick Roberts <nick@nick.uklinux.net>
|
||||||
|
|
||||||
|
* gdb-ui.el (gdb-ann3): Revert previous change.
|
||||||
|
(gdb-source-info): Allow for case of where compilation directory
|
||||||
|
is not recorded.
|
||||||
|
|
||||||
|
2004-01-08 John Paul Wallington <jpw@gnu.org>
|
||||||
|
|
||||||
|
* emerge.el (emerge-restore-buffer-characteristics): Doc fix.
|
||||||
|
|
||||||
|
2004-01-07 Nick Roberts <nick@nick.uklinux.net>
|
||||||
|
|
||||||
|
* progmodes/gud.el (gdb-first-prompt): Renamed from
|
||||||
|
gdb-first-pre-prompt
|
||||||
|
|
||||||
|
* gdb-ui.el (gdba): Avoid duplication, use gdb-ann3.
|
||||||
|
(gdb-ann3): Use GDB command "set width 0" to prevent word wrapping
|
||||||
|
problems.
|
||||||
|
(gdb-prompt): Set (renamed) gdb-first-prompt to nil in gdb-ann3.
|
||||||
|
|
||||||
|
2004-01-07 Luc Teirlinck <teirllm@auburn.edu>
|
||||||
|
|
||||||
|
* files.el (write-file-functions, write-contents-functions):
|
||||||
|
Clarify docstrings.
|
||||||
|
|
||||||
|
2004-01-07 Kenichi Handa <handa@m17n.org>
|
||||||
|
|
||||||
|
* international/mule.el (set-auto-coding): Fix for the case that
|
||||||
|
end-of-line is only CR.
|
||||||
|
|
||||||
|
2004-01-07 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* subr.el (event-start, event-end): Doc fix.
|
||||||
|
(posn-string, posn-image): New defuns.
|
||||||
|
(posn-object): Return either image or string object.
|
||||||
|
(posn-object-x-y): Return 8th element of position.
|
||||||
|
(posn-object-width-height): New defun.
|
||||||
|
|
||||||
|
2004-01-06 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* gdb-ui.el (gdb-frame-handler): Handle word wrapping anywhere in
|
||||||
|
output.
|
||||||
|
|
||||||
2004-01-05 Karl Berry <karl@gnu.org>
|
2004-01-05 Karl Berry <karl@gnu.org>
|
||||||
|
|
||||||
* emacs-lisp/copyright.el (copyright-regexp): might as well allow
|
* emacs-lisp/copyright.el (copyright-regexp): might as well allow
|
||||||
|
|
@ -149,7 +207,7 @@
|
||||||
(term-sentinel): New function.
|
(term-sentinel): New function.
|
||||||
(term-handle-exit): New function.
|
(term-handle-exit): New function.
|
||||||
|
|
||||||
* subr.el (assoc-ignore-case, assoc-ignore-representation):
|
* subr.el (assoc-ignore-case, assoc-ignore-representation):
|
||||||
Use assoc-string, and mark them obsolete.
|
Use assoc-string, and mark them obsolete.
|
||||||
(delay-mode-hooks): Mark as permanent local.
|
(delay-mode-hooks): Mark as permanent local.
|
||||||
|
|
||||||
|
|
@ -833,7 +891,7 @@
|
||||||
* xml.el (xml-parse-region): Allow comments to appear after the
|
* xml.el (xml-parse-region): Allow comments to appear after the
|
||||||
topmost element has closed.
|
topmost element has closed.
|
||||||
(xml-ns-parse-ns-attrs, xml-ns-expand-el)
|
(xml-ns-parse-ns-attrs, xml-ns-expand-el)
|
||||||
(xml-ns-expand-attr): New functions to do namespace handling.
|
(xml-ns-expand-attr): New functions to do namespace handling.
|
||||||
(xml-intern-attrlist): Back-compatible handling of attribute
|
(xml-intern-attrlist): Back-compatible handling of attribute
|
||||||
names.
|
names.
|
||||||
(xml-parse-tag): Move namespace handling to seperate functions.
|
(xml-parse-tag): Move namespace handling to seperate functions.
|
||||||
|
|
|
||||||
|
|
@ -135,12 +135,14 @@ corresponding to the mode line clicked."
|
||||||
"Local keymap for the coding-system part of the mode line.")
|
"Local keymap for the coding-system part of the mode line.")
|
||||||
|
|
||||||
|
|
||||||
(defun mode-line-change-eol ()
|
(defun mode-line-change-eol (event)
|
||||||
"Cycle through the various possible kinds of end-of-line styles."
|
"Cycle through the various possible kinds of end-of-line styles."
|
||||||
(interactive)
|
(interactive "e")
|
||||||
(let ((eol (coding-system-eol-type buffer-file-coding-system)))
|
(save-selected-window
|
||||||
(set-buffer-file-coding-system
|
(select-window (posn-window (event-start event)))
|
||||||
(cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix)))))
|
(let ((eol (coding-system-eol-type buffer-file-coding-system)))
|
||||||
|
(set-buffer-file-coding-system
|
||||||
|
(cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix))))))
|
||||||
|
|
||||||
(defvar mode-line-eol-desc-cache nil)
|
(defvar mode-line-eol-desc-cache nil)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,8 @@ Usually just deletes the appointment buffer."
|
||||||
The time should be in either 24 hour format or am/pm format."
|
The time should be in either 24 hour format or am/pm format."
|
||||||
|
|
||||||
(interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
|
(interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
|
||||||
(if (string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time)
|
(if (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?"
|
||||||
|
new-appt-time)
|
||||||
nil
|
nil
|
||||||
(error "Unacceptable time-string"))
|
(error "Unacceptable time-string"))
|
||||||
|
|
||||||
|
|
@ -519,7 +520,7 @@ They specify the range of dates that the diary is being processed for."
|
||||||
(calendar-current-date) (car (car entry-list))))
|
(calendar-current-date) (car (car entry-list))))
|
||||||
(let ((time-string (cadr (car entry-list))))
|
(let ((time-string (cadr (car entry-list))))
|
||||||
(while (string-match
|
(while (string-match
|
||||||
"\\([0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?\\).*"
|
"\\([0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?\\).*"
|
||||||
time-string)
|
time-string)
|
||||||
(let* ((beg (match-beginning 0))
|
(let* ((beg (match-beginning 0))
|
||||||
;; Get just the time for this appointment.
|
;; Get just the time for this appointment.
|
||||||
|
|
@ -527,7 +528,7 @@ They specify the range of dates that the diary is being processed for."
|
||||||
;; Find the end of this appointment
|
;; Find the end of this appointment
|
||||||
;; (the start of the next).
|
;; (the start of the next).
|
||||||
(end (string-match
|
(end (string-match
|
||||||
"^[ \t]*[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?"
|
"^[ \t]*[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?"
|
||||||
time-string
|
time-string
|
||||||
(match-end 0)))
|
(match-end 0)))
|
||||||
;; Get the whole string for this appointment.
|
;; Get the whole string for this appointment.
|
||||||
|
|
@ -586,17 +587,17 @@ it from the original list."
|
||||||
|
|
||||||
|
|
||||||
(defun appt-convert-time (time2conv)
|
(defun appt-convert-time (time2conv)
|
||||||
"Convert hour:min[am/pm] format to minutes from midnight."
|
"Convert hour:min[am/pm] format to minutes from midnight.
|
||||||
|
Also try to accept the hour.min[am/pm] format."
|
||||||
(let ((conv-time 0)
|
(let ((conv-time 0)
|
||||||
(hr 0)
|
(hr 0)
|
||||||
(min 0))
|
(min 0))
|
||||||
|
|
||||||
(string-match ":\\([0-9][0-9]\\)" time2conv)
|
(string-match "[:.]\\([0-9][0-9]\\)" time2conv)
|
||||||
(setq min (string-to-int
|
(setq min (string-to-int
|
||||||
(match-string 1 time2conv)))
|
(match-string 1 time2conv)))
|
||||||
|
|
||||||
(string-match "[0-9]?[0-9]:" time2conv)
|
(string-match "[0-9]?[0-9][:.]" time2conv)
|
||||||
(setq hr (string-to-int
|
(setq hr (string-to-int
|
||||||
(match-string 0 time2conv)))
|
(match-string 0 time2conv)))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -636,7 +636,7 @@ This function is provided for optional use as the `diary-display-hook'."
|
||||||
(symbol-name sym)))
|
(symbol-name sym)))
|
||||||
marks))))
|
marks))))
|
||||||
faceinfo)
|
faceinfo)
|
||||||
;; Remove :face info from the marks,
|
;; Remove :face info from the marks,
|
||||||
;; copy the face info into temp-face
|
;; copy the face info into temp-face
|
||||||
(setq faceinfo marks)
|
(setq faceinfo marks)
|
||||||
(while (setq faceinfo (memq :face faceinfo))
|
(while (setq faceinfo (memq :face faceinfo))
|
||||||
|
|
@ -1097,12 +1097,15 @@ after those with times."
|
||||||
(defun diary-entry-time (s)
|
(defun diary-entry-time (s)
|
||||||
"Return time at the beginning of the string S as a military-style integer.
|
"Return time at the beginning of the string S as a military-style integer.
|
||||||
For example, returns 1325 for 1:25pm.
|
For example, returns 1325 for 1:25pm.
|
||||||
Returns `diary-unknown-time' (default value -9999) if no time is recognized. The recognized forms are XXXX, X:XX, or
|
|
||||||
XX:XX (military time), and XXam, XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm,
|
Returns `diary-unknown-time' (default value -9999) if no time is recognized.
|
||||||
or XX:XXPM."
|
The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam,
|
||||||
|
XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. We also try to
|
||||||
|
accept time in the form XX[.XX][am/pm/AM/PM]]."
|
||||||
(let ((case-fold-search nil))
|
(let ((case-fold-search nil))
|
||||||
(cond ((string-match ; Military time
|
(cond ((string-match ; Military time
|
||||||
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s)
|
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
|
||||||
|
s)
|
||||||
(+ (* 100 (string-to-int
|
(+ (* 100 (string-to-int
|
||||||
(substring s (match-beginning 1) (match-end 1))))
|
(substring s (match-beginning 1) (match-end 1))))
|
||||||
(string-to-int (substring s (match-beginning 2) (match-end 2)))))
|
(string-to-int (substring s (match-beginning 2) (match-end 2)))))
|
||||||
|
|
@ -1114,7 +1117,7 @@ or XX:XXPM."
|
||||||
(if (equal ?a (downcase (aref s (match-beginning 2))))
|
(if (equal ?a (downcase (aref s (match-beginning 2))))
|
||||||
0 1200)))
|
0 1200)))
|
||||||
((string-match ; Hour and minute XX:XXam or XX:XXpm
|
((string-match ; Hour and minute XX:XXam or XX:XXpm
|
||||||
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
|
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.][\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
|
||||||
(+ (* 100 (% (string-to-int
|
(+ (* 100 (% (string-to-int
|
||||||
(substring s (match-beginning 1) (match-end 1)))
|
(substring s (match-beginning 1) (match-end 1)))
|
||||||
12))
|
12))
|
||||||
|
|
@ -1286,7 +1289,7 @@ A number of built-in functions are available for this type of diary entry:
|
||||||
|
|
||||||
Marking these entries is *extremely* time consuming, so these entries are
|
Marking these entries is *extremely* time consuming, so these entries are
|
||||||
best if they are nonmarking."
|
best if they are nonmarking."
|
||||||
(let ((s-entry (concat "\\(\\`\\|\^M\\|\n\\)"
|
(let ((s-entry (concat "\\(\\`\\|\^M\\|\n\\)"
|
||||||
(regexp-quote diary-nonmarking-symbol)
|
(regexp-quote diary-nonmarking-symbol)
|
||||||
"?"
|
"?"
|
||||||
(regexp-quote sexp-diary-entry-symbol)
|
(regexp-quote sexp-diary-entry-symbol)
|
||||||
|
|
@ -1753,7 +1756,7 @@ Prefix arg will make the entry nonmarking."
|
||||||
'("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face)
|
'("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face)
|
||||||
'("^Day.*omer.*$" . font-lock-builtin-face)
|
'("^Day.*omer.*$" . font-lock-builtin-face)
|
||||||
'("^Parashat.*$" . font-lock-comment-face)
|
'("^Parashat.*$" . font-lock-comment-face)
|
||||||
'("^[ \t]*[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?"
|
'("^[ \t]*[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?"
|
||||||
. font-lock-variable-name-face))
|
. font-lock-variable-name-face))
|
||||||
"Keywords to highlight in fancy diary display")
|
"Keywords to highlight in fancy diary display")
|
||||||
|
|
||||||
|
|
@ -1848,7 +1851,7 @@ names."
|
||||||
"?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)")
|
"?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)")
|
||||||
'(1 font-lock-reference-face))
|
'(1 font-lock-reference-face))
|
||||||
'(font-lock-diary-sexps . font-lock-keyword-face)
|
'(font-lock-diary-sexps . font-lock-keyword-face)
|
||||||
'("[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\(-[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\)?"
|
'("[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\)?"
|
||||||
. font-lock-function-name-face)))
|
. font-lock-function-name-face)))
|
||||||
"Forms to highlight in diary-mode")
|
"Forms to highlight in diary-mode")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1454,7 +1454,7 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'."
|
||||||
emerge-merging-values)))))
|
emerge-merging-values)))))
|
||||||
|
|
||||||
(defun emerge-restore-buffer-characteristics ()
|
(defun emerge-restore-buffer-characteristics ()
|
||||||
"Restores characteristics saved by `emerge-remember-buffer-characteristics'."
|
"Restore characteristics saved by `emerge-remember-buffer-characteristics'."
|
||||||
(let ((A-values emerge-A-buffer-values)
|
(let ((A-values emerge-A-buffer-values)
|
||||||
(B-values emerge-B-buffer-values))
|
(B-values emerge-B-buffer-values))
|
||||||
(emerge-eval-in-buffer emerge-A-buffer
|
(emerge-eval-in-buffer emerge-A-buffer
|
||||||
|
|
@ -3112,7 +3112,7 @@ SPC, it is ignored; if it is anything else, it is processed as a command."
|
||||||
(setq unread-command-events (list c)))))
|
(setq unread-command-events (list c)))))
|
||||||
(erase-buffer)))))
|
(erase-buffer)))))
|
||||||
|
|
||||||
;; Improved auto-save gfile names.
|
;; Improved auto-save file names.
|
||||||
;; This function fixes many problems with the standard auto-save file names:
|
;; This function fixes many problems with the standard auto-save file names:
|
||||||
;; Auto-save files for non-file buffers get put in the default directory
|
;; Auto-save files for non-file buffers get put in the default directory
|
||||||
;; for the buffer, whether that makes sense or not.
|
;; for the buffer, whether that makes sense or not.
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,12 @@ So any buffer-local binding of this variable is discarded if you change
|
||||||
the visited file name with \\[set-visited-file-name], but not when you
|
the visited file name with \\[set-visited-file-name], but not when you
|
||||||
change the major mode.
|
change the major mode.
|
||||||
|
|
||||||
See also `write-contents-functions'.")
|
This hook is not run if any of the functions in
|
||||||
|
`write-contents-functions' returns non-nil. Both hooks pertain
|
||||||
|
to how to save a buffer to file, for instance, choosing a suitable
|
||||||
|
coding system and setting mode bits. (See Info
|
||||||
|
node `(elisp)Saving Buffers'.) To perform various checks or
|
||||||
|
updates before the buffer is saved, use `before-save-hook' .")
|
||||||
(put 'write-file-functions 'permanent-local t)
|
(put 'write-file-functions 'permanent-local t)
|
||||||
(defvaralias 'write-file-hooks 'write-file-functions)
|
(defvaralias 'write-file-hooks 'write-file-functions)
|
||||||
(make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4")
|
(make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4")
|
||||||
|
|
@ -395,7 +400,11 @@ buffer's contents, not to the particular visited file; thus,
|
||||||
`set-visited-file-name' does not clear this variable; but changing the
|
`set-visited-file-name' does not clear this variable; but changing the
|
||||||
major mode does clear it.
|
major mode does clear it.
|
||||||
|
|
||||||
See also `write-file-functions'.")
|
For hooks that _do_ pertain to the particular visited file, use
|
||||||
|
`write-file-functions'. Both this variable and
|
||||||
|
`write-file-functions' relate to how a buffer is saved to file.
|
||||||
|
To perform various checks or updates before the buffer is saved,
|
||||||
|
use `before-save-hook'.")
|
||||||
(make-variable-buffer-local 'write-contents-functions)
|
(make-variable-buffer-local 'write-contents-functions)
|
||||||
(defvaralias 'write-contents-hooks 'write-contents-functions)
|
(defvaralias 'write-contents-hooks 'write-contents-functions)
|
||||||
(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4")
|
(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4")
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
;; Maintainer: FSF
|
;; Maintainer: FSF
|
||||||
;; Keywords: unix, tools
|
;; Keywords: unix, tools
|
||||||
|
|
||||||
;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; This file is part of GNU Emacs.
|
;; This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
|
@ -116,7 +116,9 @@ The following interactive lisp functions help control operation :
|
||||||
;;
|
;;
|
||||||
;; Let's start with a basic gud-gdb buffer and then modify it a bit.
|
;; Let's start with a basic gud-gdb buffer and then modify it a bit.
|
||||||
(gdb command-line)
|
(gdb command-line)
|
||||||
;;
|
(gdb-ann3))
|
||||||
|
|
||||||
|
(defun gdb-ann3 ()
|
||||||
(set (make-local-variable 'gud-minor-mode) 'gdba)
|
(set (make-local-variable 'gud-minor-mode) 'gdba)
|
||||||
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
|
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
|
||||||
;;
|
;;
|
||||||
|
|
@ -160,7 +162,7 @@ The following interactive lisp functions help control operation :
|
||||||
(setq gdb-selected-view 'source)
|
(setq gdb-selected-view 'source)
|
||||||
(setq gdb-var-list nil)
|
(setq gdb-var-list nil)
|
||||||
(setq gdb-var-changed nil)
|
(setq gdb-var-changed nil)
|
||||||
(setq gdb-first-pre-prompt nil)
|
(setq gdb-first-prompt nil)
|
||||||
;;
|
;;
|
||||||
(mapc 'make-local-variable gdb-variables)
|
(mapc 'make-local-variable gdb-variables)
|
||||||
(setq gdb-buffer-type 'gdba)
|
(setq gdb-buffer-type 'gdba)
|
||||||
|
|
@ -686,9 +688,7 @@ output from a previous command if that happens to be in effect."
|
||||||
(defun gdb-prompt (ignored)
|
(defun gdb-prompt (ignored)
|
||||||
"An annotation handler for `prompt'.
|
"An annotation handler for `prompt'.
|
||||||
This sends the next command (if any) to gdb."
|
This sends the next command (if any) to gdb."
|
||||||
(when gdb-first-pre-prompt
|
(when gdb-first-prompt (gdb-ann3))
|
||||||
(gdb-ann3)
|
|
||||||
(setq gdb-first-pre-prompt nil))
|
|
||||||
(let ((sink (gdb-get-output-sink)))
|
(let ((sink (gdb-get-output-sink)))
|
||||||
(cond
|
(cond
|
||||||
((eq sink 'user) t)
|
((eq sink 'user) t)
|
||||||
|
|
@ -708,66 +708,6 @@ This sends the next command (if any) to gdb."
|
||||||
(gdb-set-prompting t)
|
(gdb-set-prompting t)
|
||||||
(gud-display-frame)))))
|
(gud-display-frame)))))
|
||||||
|
|
||||||
(defun gdb-ann3 ()
|
|
||||||
(set (make-local-variable 'gud-minor-mode) 'gdba)
|
|
||||||
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
|
|
||||||
;;
|
|
||||||
(gud-def gud-break (if (not (string-equal mode-name "Machine"))
|
|
||||||
(gud-call "break %f:%l" arg)
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(forward-char 2)
|
|
||||||
(gud-call "break *%a" arg)))
|
|
||||||
"\C-b" "Set breakpoint at current line or address.")
|
|
||||||
;;
|
|
||||||
(gud-def gud-remove (if (not (string-equal mode-name "Machine"))
|
|
||||||
(gud-call "clear %f:%l" arg)
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(forward-char 2)
|
|
||||||
(gud-call "clear *%a" arg)))
|
|
||||||
"\C-d" "Remove breakpoint at current line or address.")
|
|
||||||
;;
|
|
||||||
(gud-def gud-until (if (not (string-equal mode-name "Machine"))
|
|
||||||
(gud-call "until %f:%l" arg)
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(forward-char 2)
|
|
||||||
(gud-call "until *%a" arg)))
|
|
||||||
"\C-u" "Continue to current line or address.")
|
|
||||||
|
|
||||||
(define-key gud-minor-mode-map [left-margin mouse-1]
|
|
||||||
'gdb-mouse-toggle-breakpoint)
|
|
||||||
(define-key gud-minor-mode-map [left-fringe mouse-1]
|
|
||||||
'gdb-mouse-toggle-breakpoint)
|
|
||||||
|
|
||||||
(setq comint-input-sender 'gdb-send)
|
|
||||||
;;
|
|
||||||
;; (re-)initialise
|
|
||||||
(setq gdb-current-address "main")
|
|
||||||
(setq gdb-previous-address nil)
|
|
||||||
(setq gdb-previous-frame nil)
|
|
||||||
(setq gdb-current-frame "main")
|
|
||||||
(setq gdb-view-source t)
|
|
||||||
(setq gdb-selected-view 'source)
|
|
||||||
(setq gdb-var-list nil)
|
|
||||||
(setq gdb-var-changed nil)
|
|
||||||
;;
|
|
||||||
(mapc 'make-local-variable gdb-variables)
|
|
||||||
(setq gdb-buffer-type 'gdba)
|
|
||||||
;;
|
|
||||||
(gdb-clear-inferior-io)
|
|
||||||
;;
|
|
||||||
(if (eq window-system 'w32)
|
|
||||||
(gdb-enqueue-input (list "set new-console off\n" 'ignore)))
|
|
||||||
(gdb-enqueue-input (list "set height 0\n" 'ignore))
|
|
||||||
;; find source file and compilation directory here
|
|
||||||
(gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program
|
|
||||||
(gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program
|
|
||||||
(gdb-enqueue-input (list "server info source\n" 'gdb-source-info))
|
|
||||||
;;
|
|
||||||
(run-hooks 'gdba-mode-hook))
|
|
||||||
|
|
||||||
(defun gdb-subprompt (ignored)
|
(defun gdb-subprompt (ignored)
|
||||||
"An annotation handler for non-top-level prompts."
|
"An annotation handler for non-top-level prompts."
|
||||||
(gdb-set-prompting t))
|
(gdb-set-prompting t))
|
||||||
|
|
@ -1765,14 +1705,13 @@ This arrangement depends on the value of `gdb-many-windows'."
|
||||||
buffers."
|
buffers."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(if (search-forward "directory is " nil t)
|
(if (search-forward "directory is " nil t)
|
||||||
(progn
|
(if (looking-at "\\S-*:\\(\\S-*\\)")
|
||||||
(if (looking-at "\\S-*:\\(\\S-*\\)")
|
(setq gdb-cdir (match-string 1))
|
||||||
(setq gdb-cdir (match-string 1))
|
|
||||||
(looking-at "\\S-*")
|
|
||||||
(setq gdb-cdir (match-string 0)))
|
|
||||||
(search-forward "Located in ")
|
|
||||||
(looking-at "\\S-*")
|
(looking-at "\\S-*")
|
||||||
(setq gdb-main-file (match-string 0)))
|
(setq gdb-cdir (match-string 0))))
|
||||||
|
(if (search-forward "Located in " nil t)
|
||||||
|
(if (looking-at "\\S-*")
|
||||||
|
(setq gdb-main-file (match-string 0)))
|
||||||
(setq gdb-view-source nil))
|
(setq gdb-view-source nil))
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(switch-to-buffer gud-comint-buffer)
|
(switch-to-buffer gud-comint-buffer)
|
||||||
|
|
@ -1985,7 +1924,7 @@ BUFFER nil or omitted means use the current buffer."
|
||||||
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
|
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(forward-line)
|
(forward-line)
|
||||||
(if (looking-at ".*= 0x\\(\\S-*\\) in \\(\\S-*\\)")
|
(if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*\\)")
|
||||||
(progn
|
(progn
|
||||||
(setq gdb-current-frame (match-string 2))
|
(setq gdb-current-frame (match-string 2))
|
||||||
(let ((address (match-string 1)))
|
(let ((address (match-string 1)))
|
||||||
|
|
@ -1994,7 +1933,7 @@ BUFFER nil or omitted means use the current buffer."
|
||||||
(setq gdb-current-address
|
(setq gdb-current-address
|
||||||
(concat "0x" (match-string 1 address)))
|
(concat "0x" (match-string 1 address)))
|
||||||
(setq gdb-current-address (concat "0x" address))))
|
(setq gdb-current-address (concat "0x" address))))
|
||||||
(if (or (if (not (looking-at ".*(\\S-*:[0-9]*)"))
|
(if (or (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t))
|
||||||
(progn (setq gdb-view-source nil) t))
|
(progn (setq gdb-view-source nil) t))
|
||||||
(eq gdb-selected-view 'assembler))
|
(eq gdb-selected-view 'assembler))
|
||||||
(progn
|
(progn
|
||||||
|
|
@ -2003,8 +1942,7 @@ BUFFER nil or omitted means use the current buffer."
|
||||||
(gdb-get-create-buffer 'gdb-assembler-buffer))
|
(gdb-get-create-buffer 'gdb-assembler-buffer))
|
||||||
;;update with new frame for machine code if necessary
|
;;update with new frame for machine code if necessary
|
||||||
(gdb-invalidate-assembler))))))
|
(gdb-invalidate-assembler))))))
|
||||||
(forward-line)
|
(if (re-search-forward " source language \\(\\S-*\\)\." nil t)
|
||||||
(if (looking-at " source language \\(\\S-*\\)\.")
|
|
||||||
(setq gdb-current-language (match-string 1))))
|
(setq gdb-current-language (match-string 1))))
|
||||||
|
|
||||||
(provide 'gdb-ui)
|
(provide 'gdb-ui)
|
||||||
|
|
|
||||||
|
|
@ -1662,31 +1662,36 @@ function by default."
|
||||||
(setq coding-system nil)))))
|
(setq coding-system nil)))))
|
||||||
|
|
||||||
;; If no coding: tag in the head, check the tail.
|
;; If no coding: tag in the head, check the tail.
|
||||||
|
;; Here we must pay attention to the case that the end-of-line
|
||||||
|
;; is just "\r" and we can't use "^" nor "$" in regexp.
|
||||||
(when (and tail-found (not coding-system))
|
(when (and tail-found (not coding-system))
|
||||||
(goto-char tail-start)
|
(goto-char tail-start)
|
||||||
(search-forward "\n\^L" nil t)
|
(re-search-forward "[\r\n]\^L" nil t)
|
||||||
(if (re-search-forward
|
(if (re-search-forward
|
||||||
"^\\(.*\\)[ \t]*Local Variables:[ \t]*\\(.*\\)$" tail-end t)
|
"[\r\n]\\([^[\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*\\)[\r\n]"
|
||||||
;; The prefix is what comes before "local variables:" in its
|
tail-end t)
|
||||||
;; line. The suffix is what comes after "local variables:"
|
;; The prefix is what comes before "local variables:" in its
|
||||||
|
;; line. The suffix is what comes after "local variables:"
|
||||||
;; in its line.
|
;; in its line.
|
||||||
(let* ((prefix (regexp-quote (match-string 1)))
|
(let* ((prefix (regexp-quote (match-string 1)))
|
||||||
(suffix (regexp-quote (match-string 2)))
|
(suffix (regexp-quote (match-string 2)))
|
||||||
(re-coding
|
(re-coding
|
||||||
(concat
|
(concat
|
||||||
"^" prefix
|
"[\r\n]" prefix
|
||||||
;; N.B. without the \n below, the regexp can
|
;; N.B. without the \n below, the regexp can
|
||||||
;; eat newlines.
|
;; eat newlines.
|
||||||
"[ \t]*coding[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*"
|
"[ \t]*coding[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*"
|
||||||
suffix "$"))
|
suffix "[\r\n]"))
|
||||||
(re-unibyte
|
(re-unibyte
|
||||||
(concat
|
(concat
|
||||||
"^" prefix
|
"[\r\n]" prefix
|
||||||
"[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*"
|
"[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*"
|
||||||
suffix "$"))
|
suffix "[\r\n]"))
|
||||||
(re-end
|
(re-end
|
||||||
(concat "^" prefix "[ \t]*End *:[ \t]*" suffix "$"))
|
(concat "[\r\n]" prefix "[ \t]*End *:[ \t]*" suffix
|
||||||
(pos (point)))
|
"[\r\n]?"))
|
||||||
|
(pos (1- (point))))
|
||||||
|
(forward-char -1) ; skip back \r or \n.
|
||||||
(re-search-forward re-end tail-end 'move)
|
(re-search-forward re-end tail-end 'move)
|
||||||
(setq tail-end (point))
|
(setq tail-end (point))
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
|
|
|
||||||
|
|
@ -508,7 +508,7 @@ off the specialized speedbar mode."
|
||||||
gud-minibuffer-local-map nil
|
gud-minibuffer-local-map nil
|
||||||
hist-sym)))
|
hist-sym)))
|
||||||
|
|
||||||
(defvar gdb-first-pre-prompt t)
|
(defvar gdb-first-prompt t)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun gdb (command-line)
|
(defun gdb (command-line)
|
||||||
|
|
@ -540,7 +540,7 @@ and source-file directory for your debugger."
|
||||||
(local-set-key "\C-i" 'gud-gdb-complete-command)
|
(local-set-key "\C-i" 'gud-gdb-complete-command)
|
||||||
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
|
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
|
||||||
(setq paragraph-start comint-prompt-regexp)
|
(setq paragraph-start comint-prompt-regexp)
|
||||||
(setq gdb-first-pre-prompt t)
|
(setq gdb-first-prompt t)
|
||||||
(run-hooks 'gdb-mode-hook))
|
(run-hooks 'gdb-mode-hook))
|
||||||
|
|
||||||
;; One of the nice features of GDB is its impressive support for
|
;; One of the nice features of GDB is its impressive support for
|
||||||
|
|
|
||||||
30
lisp/subr.el
30
lisp/subr.el
|
|
@ -665,7 +665,8 @@ If EVENT is a mouse press or a mouse click, this returns the location
|
||||||
of the event.
|
of the event.
|
||||||
If EVENT is a drag, this returns the drag's starting position.
|
If EVENT is a drag, this returns the drag's starting position.
|
||||||
The return value is of the form
|
The return value is of the form
|
||||||
(WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW))
|
(WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
|
||||||
|
IMAGE (DX . DY) (WIDTH . HEIGHT))
|
||||||
The `posn-' functions access elements of such lists."
|
The `posn-' functions access elements of such lists."
|
||||||
(if (consp event) (nth 1 event)
|
(if (consp event) (nth 1 event)
|
||||||
(list (selected-window) (point) '(0 . 0) 0)))
|
(list (selected-window) (point) '(0 . 0) 0)))
|
||||||
|
|
@ -674,7 +675,8 @@ The `posn-' functions access elements of such lists."
|
||||||
"Return the ending location of EVENT. EVENT should be a click or drag event.
|
"Return the ending location of EVENT. EVENT should be a click or drag event.
|
||||||
If EVENT is a click event, this function is the same as `event-start'.
|
If EVENT is a click event, this function is the same as `event-start'.
|
||||||
The return value is of the form
|
The return value is of the form
|
||||||
(WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW))
|
(WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
|
||||||
|
IMAGE (DX . DY) (WIDTH . HEIGHT))
|
||||||
The `posn-' functions access elements of such lists."
|
The `posn-' functions access elements of such lists."
|
||||||
(if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
|
(if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
|
||||||
(list (selected-window) (point) '(0 . 0) 0)))
|
(list (selected-window) (point) '(0 . 0) 0)))
|
||||||
|
|
@ -757,17 +759,35 @@ POSITION should be a list of the form returned by the `event-start'
|
||||||
and `event-end' functions."
|
and `event-end' functions."
|
||||||
(nth 3 position))
|
(nth 3 position))
|
||||||
|
|
||||||
(defsubst posn-object (position)
|
(defsubst posn-string (position)
|
||||||
"Return the object of POSITION.
|
"Return the string object of POSITION, or nil if a buffer position.
|
||||||
POSITION should be a list of the form returned by the `event-start'
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
and `event-end' functions."
|
and `event-end' functions."
|
||||||
(nth 4 position))
|
(nth 4 position))
|
||||||
|
|
||||||
|
(defsubst posn-image (position)
|
||||||
|
"Return the image object of POSITION, or nil if a not an image.
|
||||||
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
|
and `event-end' functions."
|
||||||
|
(nth 7 position))
|
||||||
|
|
||||||
|
(defsubst posn-object (position)
|
||||||
|
"Return the object (image or string) of POSITION.
|
||||||
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
|
and `event-end' functions."
|
||||||
|
(or (posn-image position) (posn-string position)))
|
||||||
|
|
||||||
(defsubst posn-object-x-y (position)
|
(defsubst posn-object-x-y (position)
|
||||||
"Return the x and y coordinates relative to the object of POSITION.
|
"Return the x and y coordinates relative to the object of POSITION.
|
||||||
POSITION should be a list of the form returned by the `event-start'
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
and `event-end' functions."
|
and `event-end' functions."
|
||||||
(nth 7 position))
|
(nth 8 position))
|
||||||
|
|
||||||
|
(defsubst posn-object-width-height (position)
|
||||||
|
"Return the pixel width and height of the object of POSITION.
|
||||||
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
|
and `event-end' functions."
|
||||||
|
(nth 9 position))
|
||||||
|
|
||||||
|
|
||||||
;;;; Obsolescent names for functions.
|
;;;; Obsolescent names for functions.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,18 @@
|
||||||
|
2004-01-07 Luc Teirlinck <teirllm@auburn.edu>
|
||||||
|
|
||||||
|
* files.texi (Saving Buffers): Clarify descriptions of
|
||||||
|
`write-contents-functions' and `before-save-hook'.
|
||||||
|
Make the defvar's for `before-save-hook' and `after-save-hook'
|
||||||
|
into defopt's.
|
||||||
|
|
||||||
|
2004-01-07 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* commands.texi (Click Events): Describe new image and
|
||||||
|
width/height elements of click events.
|
||||||
|
(Accessing Events): Add posn-string, posn-image, and
|
||||||
|
posn-object-width-height. Change posn-object to return either
|
||||||
|
image or string object.
|
||||||
|
|
||||||
2004-01-01 Simon Josefsson <jas@extundo.com>
|
2004-01-01 Simon Josefsson <jas@extundo.com>
|
||||||
|
|
||||||
* hooks.texi (Standard Hooks): Add before-save-hook.
|
* hooks.texi (Standard Hooks): Add before-save-hook.
|
||||||
|
|
|
||||||
|
|
@ -1156,7 +1156,8 @@ the marginal areas, @var{position} has this form:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
||||||
@var{object} @var{text-pos} (@var{col} . @var{row}) (@var{dx} . @var{dy}))
|
@var{object} @var{text-pos} (@var{col} . @var{row})
|
||||||
|
@var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height}))
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
|
|
@ -1181,10 +1182,9 @@ This is the time at which the event occurred, in milliseconds.
|
||||||
|
|
||||||
@item @var{object}
|
@item @var{object}
|
||||||
This is the object on which the click occurred. It is either
|
This is the object on which the click occurred. It is either
|
||||||
@code{nil} if there is no string property or image at the position
|
@code{nil} if there is no string property, or it has the form
|
||||||
clicked on, or it has the form (@var{string} . @var{string-pos}) when
|
(@var{string} . @var{string-pos}) when there is a string-type text
|
||||||
there is a string-type text property at the click position, or it is
|
property at the click position.
|
||||||
an image object as returned by @code{find-image} if click was in an image.
|
|
||||||
|
|
||||||
@item @var{string}
|
@item @var{string}
|
||||||
This is the string on which the click occurred, including any
|
This is the string on which the click occurred, including any
|
||||||
|
|
@ -1205,6 +1205,11 @@ These are the actual coordinates of the glyph under the @var{x},
|
||||||
@var{y} position, possibly padded with default character width
|
@var{y} position, possibly padded with default character width
|
||||||
glyphs if @var{x} is beyond the last glyph on the line.
|
glyphs if @var{x} is beyond the last glyph on the line.
|
||||||
|
|
||||||
|
@item @var{image}
|
||||||
|
This is the image object on which the click occurred. It is either
|
||||||
|
@code{nil} if there is no image at the position clicked on, or it is
|
||||||
|
an image object as returned by @code{find-image} if click was in an image.
|
||||||
|
|
||||||
@item @var{dx}, @var{dy}
|
@item @var{dx}, @var{dy}
|
||||||
These are the pixel-denominated coordinates of the click, relative to
|
These are the pixel-denominated coordinates of the click, relative to
|
||||||
the top left corner of @var{object}, which is @code{(0 . 0)}. If
|
the top left corner of @var{object}, which is @code{(0 . 0)}. If
|
||||||
|
|
@ -1669,7 +1674,8 @@ mouse-button event, as a list of this form:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
||||||
@var{object} @var{text-pos} (@var{col} . @var{row}) (@var{dx} . @var{dy}))
|
@var{object} @var{text-pos} (@var{col} . @var{row})
|
||||||
|
@var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height}))
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@defun event-start event
|
@defun event-start event
|
||||||
|
|
@ -1730,15 +1736,33 @@ in the window, and the actual character number in that row. Return
|
||||||
case, @code{posn-col-row} can be used to get approximate values.
|
case, @code{posn-col-row} can be used to get approximate values.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@defun posn-string position
|
||||||
|
Return the string object in @var{position}, either @code{nil}, or a
|
||||||
|
cons cell @code{(@var{string} . @var{string-pos})}.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
@defun posn-image position
|
||||||
|
Return the image object in @var{position}, either @code{nil}, or an
|
||||||
|
image @code{(image ...)}.
|
||||||
|
@end defun
|
||||||
|
|
||||||
@defun posn-object position
|
@defun posn-object position
|
||||||
Return the object in @var{position}, either @code{nil}, a cons
|
Return the image or string object in @var{position}, either
|
||||||
cell @code{(@var{string} . @var{string-pos})}, or an image
|
@code{nil}, an image @code{(image ...)}, or a cons cell
|
||||||
@code{(image ...)}.
|
@code{(@var{string} . @var{string-pos})}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun posn-object-x-y position
|
@defun posn-object-x-y position
|
||||||
Return the pixel-based x and y coordinates relative to the upper left
|
Return the pixel-based x and y coordinates relative to the upper left
|
||||||
corner of the object in @var{position}, as a cons cell @code{(@var{dx} . @var{dy})}.
|
corner of the object in @var{position} as a cons cell @code{(@var{dx}
|
||||||
|
. @var{dy})}. If the @var{position} is a buffer position, return the
|
||||||
|
relative position in the character at that position.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
@defun posn-object-width-height position
|
||||||
|
Return the pixel width and height of the object in @var{position} as a
|
||||||
|
cons cell @code{(@var{width} . @var{height})}. If the @var{position}
|
||||||
|
is a buffer position, return the size of the character at that position.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@cindex mouse event, timestamp
|
@cindex mouse event, timestamp
|
||||||
|
|
|
||||||
|
|
@ -404,25 +404,29 @@ Even though this is not a normal hook, you can use @code{add-hook} and
|
||||||
This works just like @code{write-file-functions}, but it is intended for
|
This works just like @code{write-file-functions}, but it is intended for
|
||||||
hooks that pertain to the contents of the file, as opposed to hooks that
|
hooks that pertain to the contents of the file, as opposed to hooks that
|
||||||
pertain to where the file came from. Such hooks are usually set up by
|
pertain to where the file came from. Such hooks are usually set up by
|
||||||
major modes, as buffer-local bindings for this variable.
|
major modes, as buffer-local bindings for this variable. If any of the
|
||||||
|
functions in this hook returns non-@code{nil}, @code{write-file-functions}
|
||||||
|
is not run.
|
||||||
|
|
||||||
This variable automatically becomes buffer-local whenever it is set;
|
This variable automatically becomes buffer-local whenever it is set;
|
||||||
switching to a new major mode always resets this variable.
|
switching to a new major mode always resets this variable, but
|
||||||
|
calling @code{set-visited-file-name} does not.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@defvar before-save-hook
|
@defopt before-save-hook
|
||||||
This normal hook runs before a buffer has been saved in its visited
|
This normal hook runs before a buffer is saved in its visited file,
|
||||||
file. One use of this hook is for the Copyright package; it uses this
|
regardless of whether that is done normally or by one of the hooks
|
||||||
hook to make sure the file has the current year in the copyright
|
described above. One use of this hook is for the Copyright package;
|
||||||
header.
|
it uses this hook to make sure the file has the current year in the
|
||||||
@end defvar
|
copyright header.
|
||||||
|
@end defopt
|
||||||
|
|
||||||
@c Emacs 19 feature
|
@c Emacs 19 feature
|
||||||
@defvar after-save-hook
|
@defopt after-save-hook
|
||||||
This normal hook runs after a buffer has been saved in its visited file.
|
This normal hook runs after a buffer has been saved in its visited file.
|
||||||
One use of this hook is in Fast Lock mode; it uses this hook to save the
|
One use of this hook is in Fast Lock mode; it uses this hook to save the
|
||||||
highlighting information in a cache file.
|
highlighting information in a cache file.
|
||||||
@end defvar
|
@end defopt
|
||||||
|
|
||||||
@defvar file-precious-flag
|
@defvar file-precious-flag
|
||||||
If this variable is non-@code{nil}, then @code{save-buffer} protects
|
If this variable is non-@code{nil}, then @code{save-buffer} protects
|
||||||
|
|
@ -2456,7 +2460,7 @@ multiple handlers, and for operations that have two file names that may
|
||||||
each have handlers.
|
each have handlers.
|
||||||
|
|
||||||
@kindex safe-magic (@r{property})
|
@kindex safe-magic (@r{property})
|
||||||
Handlers that don't really do anything specal for actual access to the
|
Handlers that don't really do anything special for actual access to the
|
||||||
file---such as the ones that implement completion of host names for
|
file---such as the ones that implement completion of host names for
|
||||||
remote file names---should have a non-@code{nil} @code{safe-magic}
|
remote file names---should have a non-@code{nil} @code{safe-magic}
|
||||||
property. For instance, Emacs normally ``protects'' directory names
|
property. For instance, Emacs normally ``protects'' directory names
|
||||||
|
|
|
||||||
|
|
@ -512,7 +512,8 @@ echo "Making links to \`nt/inc/netinet'"
|
||||||
|
|
||||||
echo "Making links to \`nt/icons'"
|
echo "Making links to \`nt/icons'"
|
||||||
(cd nt/icons
|
(cd nt/icons
|
||||||
ln [a-z]*.ico ../../${tempdir}/nt/icons)
|
ln [a-z]*.ico ../../${tempdir}/nt/icons
|
||||||
|
ln [a-z]*.cur ../../${tempdir}/nt/icons)
|
||||||
|
|
||||||
echo "Making links to \`mac'"
|
echo "Making links to \`mac'"
|
||||||
(cd mac
|
(cd mac
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,57 @@
|
||||||
|
2004-01-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
|
* xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are
|
||||||
|
specified.
|
||||||
|
|
||||||
|
2004-01-08 Kenichi Handa <handa@m17n.org>
|
||||||
|
|
||||||
|
* editfns.c (Fformat): Fix '&' to '&&'.
|
||||||
|
|
||||||
|
2004-01-08 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* print.c (print_preprocess) <case Lisp_Vectorlike>: Only mask
|
||||||
|
size if PSEUDOVECTOR_FLAG is set.
|
||||||
|
|
||||||
|
2004-01-07 Kenichi Handa <handa@m17n.org>
|
||||||
|
|
||||||
|
* charset.c (Fdeclare_equiv_charset): Fix docstring.
|
||||||
|
|
||||||
|
* fontset.c (fontset_ref_via_base): Fix previous change.
|
||||||
|
|
||||||
|
2004-01-07 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* process.c (read_process_output): Only activate adaptive
|
||||||
|
buffering if we read less than 256 bytes at a time.
|
||||||
|
|
||||||
|
2004-01-06 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* dispnew.c (buffer_posn_from_coords): Return both buffer/string
|
||||||
|
object and image object. Return glyph width and height.
|
||||||
|
(mode_line_string, marginal_area_string): Ditto.
|
||||||
|
|
||||||
|
* dispextern.h (buffer_posn_from_coords, mode_line_string)
|
||||||
|
(marginal_area_string): Fix prototypes.
|
||||||
|
|
||||||
|
* keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from
|
||||||
|
POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed.
|
||||||
|
(POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros.
|
||||||
|
|
||||||
|
* keyboard.c (make_lispy_position): Use modified mode_line_string,
|
||||||
|
buffer_posn_from_coords, and marginal_area_string functions to
|
||||||
|
include both string object and image object in the lispy position.
|
||||||
|
Also add actual glyph width and height to position.
|
||||||
|
(read_key_sequence): Use real buffer position from mouse
|
||||||
|
event to find keymap property even when click is in marginal area.
|
||||||
|
|
||||||
|
* xdisp.c (note_mode_line_or_margin_highlight): Use modified
|
||||||
|
mode_line_string and marginal_area_string functions to handle
|
||||||
|
both string object and image object properties.
|
||||||
|
|
||||||
|
2004-01-06 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* syntax.c (skip_chars): Treat '-' at end of string as ordinary
|
||||||
|
character.
|
||||||
|
|
||||||
2004-01-02 Andreas Schwab <schwab@suse.de>
|
2004-01-02 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* macterm.c (emacs_options, x_initialized, same_x_server): Remove
|
* macterm.c (emacs_options, x_initialized, same_x_server): Remove
|
||||||
|
|
|
||||||
|
|
@ -760,17 +760,20 @@ return nil. */)
|
||||||
|
|
||||||
DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset,
|
DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset,
|
||||||
4, 4, 0,
|
4, 4, 0,
|
||||||
doc: /* Declare a charset of DIMENSION, CHARS, FINAL-CHAR is the same as CHARSET.
|
doc: /* Declare an equivalent charset for ISO-2022 decoding.
|
||||||
CHARSET should be defined by `defined-charset' in advance. */)
|
|
||||||
(dimension, chars, final_char, charset_symbol)
|
On decoding by an ISO-2022 base coding system, when a charset
|
||||||
Lisp_Object dimension, chars, final_char, charset_symbol;
|
specified by DIMENSION, CHARS, and FINAL-CHAR is designated, behave as
|
||||||
|
if CHARSET is designated instead. */)
|
||||||
|
(dimension, chars, final_char, charset)
|
||||||
|
Lisp_Object dimension, chars, final_char, charset;
|
||||||
{
|
{
|
||||||
int charset;
|
int charset_id;
|
||||||
|
|
||||||
CHECK_NUMBER (dimension);
|
CHECK_NUMBER (dimension);
|
||||||
CHECK_NUMBER (chars);
|
CHECK_NUMBER (chars);
|
||||||
CHECK_NUMBER (final_char);
|
CHECK_NUMBER (final_char);
|
||||||
CHECK_SYMBOL (charset_symbol);
|
CHECK_SYMBOL (charset);
|
||||||
|
|
||||||
if (XINT (dimension) != 1 && XINT (dimension) != 2)
|
if (XINT (dimension) != 1 && XINT (dimension) != 2)
|
||||||
error ("Invalid DIMENSION %d, it should be 1 or 2", XINT (dimension));
|
error ("Invalid DIMENSION %d, it should be 1 or 2", XINT (dimension));
|
||||||
|
|
@ -778,10 +781,10 @@ CHARSET should be defined by `defined-charset' in advance. */)
|
||||||
error ("Invalid CHARS %d, it should be 94 or 96", XINT (chars));
|
error ("Invalid CHARS %d, it should be 94 or 96", XINT (chars));
|
||||||
if (XINT (final_char) < '0' || XFASTINT (final_char) > '~')
|
if (XINT (final_char) < '0' || XFASTINT (final_char) > '~')
|
||||||
error ("Invalid FINAL-CHAR %c, it should be `0'..`~'", XINT (chars));
|
error ("Invalid FINAL-CHAR %c, it should be `0'..`~'", XINT (chars));
|
||||||
if ((charset = get_charset_id (charset_symbol)) < 0)
|
if ((charset_id = get_charset_id (charset)) < 0)
|
||||||
error ("Invalid charset %s", SDATA (SYMBOL_NAME (charset_symbol)));
|
error ("Invalid charset %s", SDATA (SYMBOL_NAME (charset)));
|
||||||
|
|
||||||
ISO_CHARSET_TABLE (dimension, chars, final_char) = charset;
|
ISO_CHARSET_TABLE (dimension, chars, final_char) = charset_id;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2668,12 +2668,19 @@ int popup_activated P_ ((void));
|
||||||
extern int inverse_video;
|
extern int inverse_video;
|
||||||
extern int required_matrix_width P_ ((struct window *));
|
extern int required_matrix_width P_ ((struct window *));
|
||||||
extern int required_matrix_height P_ ((struct window *));
|
extern int required_matrix_height P_ ((struct window *));
|
||||||
extern Lisp_Object mode_line_string P_ ((struct window *, int *, int *,
|
extern Lisp_Object buffer_posn_from_coords P_ ((struct window *,
|
||||||
int *, int *,
|
int *, int *,
|
||||||
enum window_part, int *));
|
struct display_pos *,
|
||||||
extern Lisp_Object marginal_area_string P_ ((struct window *, int *, int *,
|
Lisp_Object *,
|
||||||
int *, int *,
|
int *, int *, int *, int *));
|
||||||
enum window_part, int *));
|
extern Lisp_Object mode_line_string P_ ((struct window *, enum window_part,
|
||||||
|
int *, int *, int *,
|
||||||
|
Lisp_Object *,
|
||||||
|
int *, int *, int *, int *));
|
||||||
|
extern Lisp_Object marginal_area_string P_ ((struct window *, enum window_part,
|
||||||
|
int *, int *, int *,
|
||||||
|
Lisp_Object *,
|
||||||
|
int *, int *, int *, int *));
|
||||||
extern void redraw_frame P_ ((struct frame *));
|
extern void redraw_frame P_ ((struct frame *));
|
||||||
extern void redraw_garbaged_frames P_ ((void));
|
extern void redraw_garbaged_frames P_ ((void));
|
||||||
extern void cancel_line P_ ((int, struct frame *));
|
extern void cancel_line P_ ((int, struct frame *));
|
||||||
|
|
@ -2714,9 +2721,6 @@ int direct_output_forward_char P_ ((int));
|
||||||
int update_frame P_ ((struct frame *, int, int));
|
int update_frame P_ ((struct frame *, int, int));
|
||||||
void update_single_window P_ ((struct window *, int));
|
void update_single_window P_ ((struct window *, int));
|
||||||
int scrolling P_ ((struct frame *));
|
int scrolling P_ ((struct frame *));
|
||||||
void buffer_posn_from_coords P_ ((struct window *, int *, int *,
|
|
||||||
int *, int *,
|
|
||||||
Lisp_Object *, struct display_pos *));
|
|
||||||
void do_pending_window_change P_ ((int));
|
void do_pending_window_change P_ ((int));
|
||||||
void change_frame_size P_ ((struct frame *, int, int, int, int, int));
|
void change_frame_size P_ ((struct frame *, int, int, int, int, int));
|
||||||
void bitch_at_user P_ ((void));
|
void bitch_at_user P_ ((void));
|
||||||
|
|
|
||||||
131
src/dispnew.c
131
src/dispnew.c
|
|
@ -5697,21 +5697,24 @@ update_frame_line (f, vpos)
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* Determine what's under window-relative pixel position (*X, *Y).
|
/* Determine what's under window-relative pixel position (*X, *Y).
|
||||||
Return in *OBJECT the object (string or buffer) that's there.
|
Return the object (string or buffer) that's there.
|
||||||
Return in *POS the position in that object. Adjust *X and *Y
|
Return in *POS the position in that object.
|
||||||
to character positions. */
|
Adjust *X and *Y to character positions. */
|
||||||
|
|
||||||
void
|
Lisp_Object
|
||||||
buffer_posn_from_coords (w, x, y, dx, dy, object, pos)
|
buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height)
|
||||||
struct window *w;
|
struct window *w;
|
||||||
int *x, *y;
|
int *x, *y;
|
||||||
int *dx, *dy;
|
|
||||||
Lisp_Object *object;
|
|
||||||
struct display_pos *pos;
|
struct display_pos *pos;
|
||||||
|
Lisp_Object *object;
|
||||||
|
int *dx, *dy;
|
||||||
|
int *width, *height;
|
||||||
{
|
{
|
||||||
struct it it;
|
struct it it;
|
||||||
struct buffer *old_current_buffer = current_buffer;
|
struct buffer *old_current_buffer = current_buffer;
|
||||||
struct text_pos startp;
|
struct text_pos startp;
|
||||||
|
Lisp_Object string;
|
||||||
|
struct glyph_row *row;
|
||||||
int x0, x1;
|
int x0, x1;
|
||||||
|
|
||||||
current_buffer = XBUFFER (w->buffer);
|
current_buffer = XBUFFER (w->buffer);
|
||||||
|
|
@ -5729,7 +5732,10 @@ buffer_posn_from_coords (w, x, y, dx, dy, object, pos)
|
||||||
*dx = x0 + it.first_visible_x - it.current_x;
|
*dx = x0 + it.first_visible_x - it.current_x;
|
||||||
*dy = *y - it.current_y;
|
*dy = *y - it.current_y;
|
||||||
|
|
||||||
*object = w->buffer;
|
string = w->buffer;
|
||||||
|
if (STRINGP (it.string))
|
||||||
|
string = it.string;
|
||||||
|
*pos = it.current;
|
||||||
|
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
if (it.what == IT_IMAGE)
|
if (it.what == IT_IMAGE)
|
||||||
|
|
@ -5737,25 +5743,33 @@ buffer_posn_from_coords (w, x, y, dx, dy, object, pos)
|
||||||
struct image *img;
|
struct image *img;
|
||||||
if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL
|
if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL
|
||||||
&& !NILP (img->spec))
|
&& !NILP (img->spec))
|
||||||
{
|
*object = img->spec;
|
||||||
struct glyph_row *row = MATRIX_ROW (w->current_matrix, it.vpos);
|
}
|
||||||
struct glyph *glyph;
|
#endif
|
||||||
|
|
||||||
if (it.hpos < row->used[TEXT_AREA]
|
row = MATRIX_ROW (w->current_matrix, it.vpos);
|
||||||
&& (glyph = row->glyphs[TEXT_AREA] + it.hpos,
|
if (row->enabled_p)
|
||||||
glyph->type == IMAGE_GLYPH))
|
{
|
||||||
{
|
if (it.hpos < row->used[TEXT_AREA])
|
||||||
*dy -= row->ascent - glyph->ascent;
|
{
|
||||||
*object = img->spec;
|
struct glyph *glyph = row->glyphs[TEXT_AREA] + it.hpos;
|
||||||
}
|
*width = glyph->pixel_width;
|
||||||
|
*height = glyph->ascent + glyph->descent;
|
||||||
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
|
if (glyph->type == IMAGE_GLYPH)
|
||||||
|
*dy -= row->ascent - glyph->ascent;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*width = 0;
|
||||||
|
*height = row->height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
{
|
||||||
if (STRINGP (it.string))
|
*width = *height = 0;
|
||||||
*object = it.string;
|
}
|
||||||
|
|
||||||
*pos = it.current;
|
|
||||||
|
|
||||||
/* Add extra (default width) columns if clicked after EOL. */
|
/* Add extra (default width) columns if clicked after EOL. */
|
||||||
x1 = max(0, it.current_x + it.pixel_width - it.first_visible_x);
|
x1 = max(0, it.current_x + it.pixel_width - it.first_visible_x);
|
||||||
|
|
@ -5764,21 +5778,24 @@ buffer_posn_from_coords (w, x, y, dx, dy, object, pos)
|
||||||
|
|
||||||
*x = it.hpos;
|
*x = it.hpos;
|
||||||
*y = it.vpos;
|
*y = it.vpos;
|
||||||
|
|
||||||
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Value is the string under window-relative coordinates X/Y in the
|
/* Value is the string under window-relative coordinates X/Y in the
|
||||||
mode or header line of window W, or nil if none. MODE_LINE_P non-zero
|
mode line or header line (PART says which) of window W, or nil if none.
|
||||||
means look at the mode line. *CHARPOS is set to the position in
|
*CHARPOS is set to the position in the string returned. */
|
||||||
the string returned. */
|
|
||||||
|
|
||||||
Lisp_Object
|
Lisp_Object
|
||||||
mode_line_string (w, x, y, dx, dy, part, charpos)
|
mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height)
|
||||||
struct window *w;
|
struct window *w;
|
||||||
int *x, *y;
|
|
||||||
int *dx, *dy;
|
|
||||||
enum window_part part;
|
enum window_part part;
|
||||||
|
int *x, *y;
|
||||||
int *charpos;
|
int *charpos;
|
||||||
|
Lisp_Object *object;
|
||||||
|
int *dx, *dy;
|
||||||
|
int *width, *height;
|
||||||
{
|
{
|
||||||
struct glyph_row *row;
|
struct glyph_row *row;
|
||||||
struct glyph *glyph, *end;
|
struct glyph *glyph, *end;
|
||||||
|
|
@ -5805,22 +5822,36 @@ mode_line_string (w, x, y, dx, dy, part, charpos)
|
||||||
{
|
{
|
||||||
string = glyph->object;
|
string = glyph->object;
|
||||||
*charpos = glyph->charpos;
|
*charpos = glyph->charpos;
|
||||||
|
*width = glyph->pixel_width;
|
||||||
|
*height = glyph->ascent + glyph->descent;
|
||||||
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
|
if (glyph->type == IMAGE_GLYPH)
|
||||||
|
{
|
||||||
|
struct image *img;
|
||||||
|
img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id);
|
||||||
|
if (img != NULL)
|
||||||
|
*object = img->spec;
|
||||||
|
y0 -= row->ascent - glyph->ascent;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Add extra (default width) columns if clicked after EOL. */
|
{
|
||||||
*x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w);
|
/* Add extra (default width) columns if clicked after EOL. */
|
||||||
|
*x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w);
|
||||||
|
*width = 0;
|
||||||
|
*height = row->height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*x = 0;
|
*x = 0;
|
||||||
x0 = 0;
|
x0 = 0;
|
||||||
|
*width = *height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dx)
|
*dx = x0;
|
||||||
{
|
*dy = y0;
|
||||||
*dx = x0;
|
|
||||||
*dy = y0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
@ -5831,12 +5862,14 @@ mode_line_string (w, x, y, dx, dy, part, charpos)
|
||||||
the string returned. */
|
the string returned. */
|
||||||
|
|
||||||
Lisp_Object
|
Lisp_Object
|
||||||
marginal_area_string (w, x, y, dx, dy, part, charpos)
|
marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height)
|
||||||
struct window *w;
|
struct window *w;
|
||||||
int *x, *y;
|
|
||||||
int *dx, *dy;
|
|
||||||
enum window_part part;
|
enum window_part part;
|
||||||
|
int *x, *y;
|
||||||
int *charpos;
|
int *charpos;
|
||||||
|
Lisp_Object *object;
|
||||||
|
int *dx, *dy;
|
||||||
|
int *width, *height;
|
||||||
{
|
{
|
||||||
struct glyph_row *row = w->current_matrix->rows;
|
struct glyph_row *row = w->current_matrix->rows;
|
||||||
struct glyph *glyph, *end;
|
struct glyph *glyph, *end;
|
||||||
|
|
@ -5881,32 +5914,36 @@ marginal_area_string (w, x, y, dx, dy, part, charpos)
|
||||||
{
|
{
|
||||||
string = glyph->object;
|
string = glyph->object;
|
||||||
*charpos = glyph->charpos;
|
*charpos = glyph->charpos;
|
||||||
|
*width = glyph->pixel_width;
|
||||||
|
*height = glyph->ascent + glyph->descent;
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
if (glyph->type == IMAGE_GLYPH)
|
if (glyph->type == IMAGE_GLYPH)
|
||||||
{
|
{
|
||||||
struct image *img;
|
struct image *img;
|
||||||
img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id);
|
img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id);
|
||||||
if (img != NULL)
|
if (img != NULL)
|
||||||
string = img->spec;
|
*object = img->spec;
|
||||||
y0 -= row->ascent - glyph->ascent;
|
y0 -= row->ascent - glyph->ascent;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Add extra (default width) columns if clicked after EOL. */
|
{
|
||||||
*x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w);
|
/* Add extra (default width) columns if clicked after EOL. */
|
||||||
|
*x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w);
|
||||||
|
*width = 0;
|
||||||
|
*height = row->height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x0 = 0;
|
x0 = 0;
|
||||||
*x = 0;
|
*x = 0;
|
||||||
|
*width = *height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dx)
|
*dx = x0;
|
||||||
{
|
*dy = y0;
|
||||||
*dx = x0;
|
|
||||||
*dy = y0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3447,7 +3447,7 @@ usage: (format STRING &rest OBJECTS) */)
|
||||||
/* Anything but a string, convert to a string using princ. */
|
/* Anything but a string, convert to a string using princ. */
|
||||||
register Lisp_Object tem;
|
register Lisp_Object tem;
|
||||||
tem = Fprin1_to_string (args[n], Qt);
|
tem = Fprin1_to_string (args[n], Qt);
|
||||||
if (STRING_MULTIBYTE (tem) & ! multibyte)
|
if (STRING_MULTIBYTE (tem) && ! multibyte)
|
||||||
{
|
{
|
||||||
multibyte = 1;
|
multibyte = 1;
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ fontset_ref_via_base (fontset, c)
|
||||||
elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
|
elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
|
||||||
if (NILP (elt))
|
if (NILP (elt))
|
||||||
elt = lookup_overriding_fontspec (FONTSET_FRAME (fontset), *c);
|
elt = lookup_overriding_fontspec (FONTSET_FRAME (fontset), *c);
|
||||||
if (NILP (elt) && ! EQ (FONTSET_BASE (fontset), Vdefault_fontset))
|
if (NILP (elt))
|
||||||
elt = FONTSET_REF (Vdefault_fontset, *c);
|
elt = FONTSET_REF (Vdefault_fontset, *c);
|
||||||
if (NILP (elt))
|
if (NILP (elt))
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
|
|
||||||
|
|
@ -2939,13 +2939,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
||||||
{
|
{
|
||||||
Lisp_Object posn;
|
Lisp_Object posn;
|
||||||
|
|
||||||
posn = POSN_BUFFER_POSN (EVENT_START (c));
|
posn = POSN_POSN (EVENT_START (c));
|
||||||
/* Handle menu-bar events:
|
/* Handle menu-bar events:
|
||||||
insert the dummy prefix event `menu-bar'. */
|
insert the dummy prefix event `menu-bar'. */
|
||||||
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
|
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
|
||||||
{
|
{
|
||||||
/* Change menu-bar to (menu-bar) as the event "position". */
|
/* Change menu-bar to (menu-bar) as the event "position". */
|
||||||
POSN_BUFFER_SET_POSN (EVENT_START (c), Fcons (posn, Qnil));
|
POSN_SET_POSN (EVENT_START (c), Fcons (posn, Qnil));
|
||||||
|
|
||||||
also_record = c;
|
also_record = c;
|
||||||
Vunread_command_events = Fcons (c, Vunread_command_events);
|
Vunread_command_events = Fcons (c, Vunread_command_events);
|
||||||
|
|
@ -4979,9 +4979,11 @@ make_lispy_position (f, x, y, time)
|
||||||
{
|
{
|
||||||
/* It's a click in window window at frame coordinates (x,y) */
|
/* It's a click in window window at frame coordinates (x,y) */
|
||||||
struct window *w = XWINDOW (window);
|
struct window *w = XWINDOW (window);
|
||||||
Lisp_Object object = Qnil;
|
Lisp_Object string_info = Qnil;
|
||||||
int textpos = -1, rx = -1, ry = -1;
|
int textpos = -1, rx = -1, ry = -1;
|
||||||
int dx = -1, dy = -1;
|
int dx = -1, dy = -1;
|
||||||
|
int width = -1, height = -1;
|
||||||
|
Lisp_Object object = Qnil;
|
||||||
|
|
||||||
/* Set event coordinates to window-relative coordinates
|
/* Set event coordinates to window-relative coordinates
|
||||||
for constructing the Lisp event below. */
|
for constructing the Lisp event below. */
|
||||||
|
|
@ -4997,9 +4999,10 @@ make_lispy_position (f, x, y, time)
|
||||||
|
|
||||||
posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line;
|
posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line;
|
||||||
rx = wx, ry = wy;
|
rx = wx, ry = wy;
|
||||||
string = mode_line_string (w, &rx, &ry, &dx, &dy, part, &charpos);
|
string = mode_line_string (w, part, &rx, &ry, &charpos,
|
||||||
|
&object, &dx, &dy, &width, &height);
|
||||||
if (STRINGP (string))
|
if (STRINGP (string))
|
||||||
object = Fcons (string, make_number (charpos));
|
string_info = Fcons (string, make_number (charpos));
|
||||||
if (w == XWINDOW (selected_window))
|
if (w == XWINDOW (selected_window))
|
||||||
textpos = PT;
|
textpos = PT;
|
||||||
else
|
else
|
||||||
|
|
@ -5010,6 +5013,7 @@ make_lispy_position (f, x, y, time)
|
||||||
posn = Qvertical_line;
|
posn = Qvertical_line;
|
||||||
wx = -1;
|
wx = -1;
|
||||||
dx = 0;
|
dx = 0;
|
||||||
|
width = 1;
|
||||||
}
|
}
|
||||||
else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
|
else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
|
||||||
{
|
{
|
||||||
|
|
@ -5018,22 +5022,10 @@ make_lispy_position (f, x, y, time)
|
||||||
|
|
||||||
posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
|
posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
|
||||||
rx = wx, ry = wy;
|
rx = wx, ry = wy;
|
||||||
string = marginal_area_string (w, &rx, &ry, &dx, &dy, part, &charpos);
|
string = marginal_area_string (w, part, &rx, &ry, &charpos,
|
||||||
|
&object, &dx, &dy, &width, &height);
|
||||||
if (STRINGP (string))
|
if (STRINGP (string))
|
||||||
object = Fcons (string, make_number (charpos));
|
string_info = Fcons (string, make_number (charpos));
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
|
||||||
else if (IMAGEP (string))
|
|
||||||
{
|
|
||||||
Lisp_Object image_map, hotspot;
|
|
||||||
object = string;
|
|
||||||
if ((image_map = Fplist_get (XCDR (object), QCmap),
|
|
||||||
!NILP (image_map))
|
|
||||||
&& (hotspot = find_hot_spot (image_map, dx, dy),
|
|
||||||
CONSP (hotspot))
|
|
||||||
&& (hotspot = XCDR (hotspot), CONSP (hotspot)))
|
|
||||||
posn = XCAR (hotspot);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
|
else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
|
||||||
{
|
{
|
||||||
|
|
@ -5052,46 +5044,60 @@ make_lispy_position (f, x, y, time)
|
||||||
|
|
||||||
if (textpos < 0)
|
if (textpos < 0)
|
||||||
{
|
{
|
||||||
Lisp_Object string;
|
Lisp_Object string2, object2 = Qnil;
|
||||||
struct display_pos p;
|
struct display_pos p;
|
||||||
int dx2, dy2;
|
int dx2, dy2;
|
||||||
|
int width2, height2;
|
||||||
wx = max (WINDOW_LEFT_MARGIN_WIDTH (w), wx);
|
wx = max (WINDOW_LEFT_MARGIN_WIDTH (w), wx);
|
||||||
buffer_posn_from_coords (w, &wx, &wy, &dx2, &dy2, &string, &p);
|
string2 = buffer_posn_from_coords (w, &wx, &wy, &p,
|
||||||
|
&object2, &dx2, &dy2,
|
||||||
|
&width2, &height2);
|
||||||
textpos = CHARPOS (p.pos);
|
textpos = CHARPOS (p.pos);
|
||||||
if (rx < 0) rx = wx;
|
if (rx < 0) rx = wx;
|
||||||
if (ry < 0) ry = wy;
|
if (ry < 0) ry = wy;
|
||||||
if (dx < 0) dx = dx2;
|
if (dx < 0) dx = dx2;
|
||||||
if (dy < 0) dy = dy2;
|
if (dy < 0) dy = dy2;
|
||||||
|
if (width < 0) width = width2;
|
||||||
|
if (height < 0) height = height2;
|
||||||
|
|
||||||
if (NILP (posn))
|
if (NILP (posn))
|
||||||
{
|
{
|
||||||
posn = make_number (textpos);
|
posn = make_number (textpos);
|
||||||
if (STRINGP (string))
|
if (STRINGP (string2))
|
||||||
object = Fcons (string,
|
string_info = Fcons (string2,
|
||||||
make_number (CHARPOS (p.string_pos)));
|
make_number (CHARPOS (p.string_pos)));
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
|
||||||
else if (IMAGEP (string))
|
|
||||||
{
|
|
||||||
Lisp_Object image_map, hotspot;
|
|
||||||
object = string;
|
|
||||||
if ((image_map = Fplist_get (XCDR (object), QCmap),
|
|
||||||
!NILP (image_map))
|
|
||||||
&& (hotspot = find_hot_spot (image_map, dx, dy),
|
|
||||||
CONSP (hotspot))
|
|
||||||
&& (hotspot = XCDR (hotspot), CONSP (hotspot)))
|
|
||||||
posn = XCAR (hotspot);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
if (NILP (object))
|
||||||
|
object = object2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
|
if (IMAGEP (object))
|
||||||
|
{
|
||||||
|
Lisp_Object image_map, hotspot;
|
||||||
|
if ((image_map = Fplist_get (XCDR (object), QCmap),
|
||||||
|
!NILP (image_map))
|
||||||
|
&& (hotspot = find_hot_spot (image_map, dx, dy),
|
||||||
|
CONSP (hotspot))
|
||||||
|
&& (hotspot = XCDR (hotspot), CONSP (hotspot)))
|
||||||
|
posn = XCAR (hotspot);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Object info */
|
||||||
extra_info = Fcons (object,
|
extra_info = Fcons (object,
|
||||||
|
Fcons (Fcons (make_number (dx),
|
||||||
|
make_number (dy)),
|
||||||
|
Fcons (Fcons (make_number (width),
|
||||||
|
make_number (height)),
|
||||||
|
Qnil)));
|
||||||
|
|
||||||
|
/* String info */
|
||||||
|
extra_info = Fcons (string_info,
|
||||||
Fcons (make_number (textpos),
|
Fcons (make_number (textpos),
|
||||||
Fcons (Fcons (make_number (rx),
|
Fcons (Fcons (make_number (rx),
|
||||||
make_number (ry)),
|
make_number (ry)),
|
||||||
Fcons (Fcons (make_number (dx),
|
extra_info)));
|
||||||
make_number (dy)),
|
|
||||||
Qnil))));
|
|
||||||
}
|
}
|
||||||
else if (f != 0)
|
else if (f != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -8918,7 +8924,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
||||||
Lisp_Object window, posn;
|
Lisp_Object window, posn;
|
||||||
|
|
||||||
window = POSN_WINDOW (EVENT_START (key));
|
window = POSN_WINDOW (EVENT_START (key));
|
||||||
posn = POSN_BUFFER_POSN (EVENT_START (key));
|
posn = POSN_POSN (EVENT_START (key));
|
||||||
|
|
||||||
if (CONSP (posn)
|
if (CONSP (posn)
|
||||||
|| (!NILP (fake_prefixed_keys)
|
|| (!NILP (fake_prefixed_keys)
|
||||||
|
|
@ -8976,7 +8982,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
||||||
localized_local_map = 1;
|
localized_local_map = 1;
|
||||||
start = EVENT_START (key);
|
start = EVENT_START (key);
|
||||||
|
|
||||||
if (CONSP (start) && CONSP (XCDR (start)))
|
if (CONSP (start) && POSN_INBUFFER_P (start))
|
||||||
{
|
{
|
||||||
pos = POSN_BUFFER_POSN (start);
|
pos = POSN_BUFFER_POSN (start);
|
||||||
if (INTEGERP (pos)
|
if (INTEGERP (pos)
|
||||||
|
|
@ -9086,7 +9092,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
||||||
{
|
{
|
||||||
Lisp_Object posn;
|
Lisp_Object posn;
|
||||||
|
|
||||||
posn = POSN_BUFFER_POSN (EVENT_START (key));
|
posn = POSN_POSN (EVENT_START (key));
|
||||||
/* Handle menu-bar events:
|
/* Handle menu-bar events:
|
||||||
insert the dummy prefix event `menu-bar'. */
|
insert the dummy prefix event `menu-bar'. */
|
||||||
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
|
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
|
||||||
|
|
@ -9098,8 +9104,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
||||||
|
|
||||||
/* Zap the position in key, so we know that we've
|
/* Zap the position in key, so we know that we've
|
||||||
expanded it, and don't try to do so again. */
|
expanded it, and don't try to do so again. */
|
||||||
POSN_BUFFER_SET_POSN (EVENT_START (key),
|
POSN_SET_POSN (EVENT_START (key),
|
||||||
Fcons (posn, Qnil));
|
Fcons (posn, Qnil));
|
||||||
|
|
||||||
mock_input = t + 2;
|
mock_input = t + 2;
|
||||||
goto replay_sequence;
|
goto replay_sequence;
|
||||||
|
|
|
||||||
|
|
@ -254,17 +254,21 @@ extern Lisp_Object item_properties;
|
||||||
|
|
||||||
/* Extract the fields of a position. */
|
/* Extract the fields of a position. */
|
||||||
#define POSN_WINDOW(posn) (XCAR (posn))
|
#define POSN_WINDOW(posn) (XCAR (posn))
|
||||||
#define POSN_BUFFER_POSN(posn) (XCAR (XCDR (posn)))
|
#define POSN_POSN(posn) (XCAR (XCDR (posn)))
|
||||||
#define POSN_BUFFER_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x)))
|
#define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x)))
|
||||||
#define POSN_WINDOW_POSN(posn) (XCAR (XCDR (XCDR (posn))))
|
#define POSN_WINDOW_POSN(posn) (XCAR (XCDR (XCDR (posn))))
|
||||||
#define POSN_TIMESTAMP(posn) \
|
#define POSN_TIMESTAMP(posn) (XCAR (XCDR (XCDR (XCDR (posn)))))
|
||||||
(XCAR (XCDR (XCDR (XCDR (posn)))))
|
|
||||||
#define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn)))
|
#define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn)))
|
||||||
|
|
||||||
/* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events.
|
/* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events.
|
||||||
It's a cons if the click is over a string in the mode line. */
|
It's a cons if the click is over a string in the mode line. */
|
||||||
|
|
||||||
#define POSN_STRING(POSN) Fnth (make_number (4), (POSN))
|
#define POSN_STRING(posn) (Fnth (make_number (4), (posn)))
|
||||||
|
|
||||||
|
/* If POSN_STRING is nil, event refers to buffer location. */
|
||||||
|
|
||||||
|
#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn)))
|
||||||
|
#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn)))
|
||||||
|
|
||||||
/* Some of the event heads. */
|
/* Some of the event heads. */
|
||||||
extern Lisp_Object Qswitch_frame;
|
extern Lisp_Object Qswitch_frame;
|
||||||
|
|
|
||||||
|
|
@ -1342,7 +1342,9 @@ print_preprocess (obj)
|
||||||
goto loop;
|
goto loop;
|
||||||
|
|
||||||
case Lisp_Vectorlike:
|
case Lisp_Vectorlike:
|
||||||
size = XVECTOR (obj)->size & PSEUDOVECTOR_SIZE_MASK;
|
size = XVECTOR (obj)->size;
|
||||||
|
if (size & PSEUDOVECTOR_FLAG)
|
||||||
|
size &= PSEUDOVECTOR_SIZE_MASK;
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
print_preprocess (XVECTOR (obj)->contents[i]);
|
print_preprocess (XVECTOR (obj)->contents[i]);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -4771,7 +4771,7 @@ read_process_output (proc, channel)
|
||||||
if (!NILP (p->adaptive_read_buffering))
|
if (!NILP (p->adaptive_read_buffering))
|
||||||
{
|
{
|
||||||
int delay = XINT (p->read_output_delay);
|
int delay = XINT (p->read_output_delay);
|
||||||
if (nbytes < readmax - carryover)
|
if (nbytes < 256)
|
||||||
{
|
{
|
||||||
if (delay < READ_OUTPUT_DELAY_MAX_MAX)
|
if (delay < READ_OUTPUT_DELAY_MAX_MAX)
|
||||||
{
|
{
|
||||||
|
|
@ -4780,7 +4780,7 @@ read_process_output (proc, channel)
|
||||||
delay += READ_OUTPUT_DELAY_INCREMENT * 2;
|
delay += READ_OUTPUT_DELAY_INCREMENT * 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (delay > 0)
|
else if (delay > 0 && (nbytes == readmax - carryover))
|
||||||
{
|
{
|
||||||
delay -= READ_OUTPUT_DELAY_INCREMENT;
|
delay -= READ_OUTPUT_DELAY_INCREMENT;
|
||||||
if (delay == 0)
|
if (delay == 0)
|
||||||
|
|
|
||||||
15
src/syntax.c
15
src/syntax.c
|
|
@ -1,5 +1,5 @@
|
||||||
/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
|
/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
|
||||||
Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Emacs.
|
This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
|
@ -1442,10 +1442,13 @@ skip_chars (forwardp, syntaxp, string, lim)
|
||||||
if (i_byte == size_byte)
|
if (i_byte == size_byte)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
c = STRING_CHAR_AND_LENGTH (str+i_byte, size_byte-i_byte, len);
|
c = STRING_CHAR_AND_LENGTH (str + i_byte,
|
||||||
|
size_byte - i_byte, len);
|
||||||
i_byte += len;
|
i_byte += len;
|
||||||
}
|
}
|
||||||
if (i_byte < size_byte
|
/* Treat `-' as range character only if another character
|
||||||
|
follows. */
|
||||||
|
if (i_byte + 1 < size_byte
|
||||||
&& str[i_byte] == '-')
|
&& str[i_byte] == '-')
|
||||||
{
|
{
|
||||||
unsigned int c2;
|
unsigned int c2;
|
||||||
|
|
@ -1453,11 +1456,9 @@ skip_chars (forwardp, syntaxp, string, lim)
|
||||||
/* Skip over the dash. */
|
/* Skip over the dash. */
|
||||||
i_byte++;
|
i_byte++;
|
||||||
|
|
||||||
if (i_byte == size_byte)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Get the end of the range. */
|
/* Get the end of the range. */
|
||||||
c2 =STRING_CHAR_AND_LENGTH (str+i_byte, size_byte-i_byte, len);
|
c2 = STRING_CHAR_AND_LENGTH (str + i_byte,
|
||||||
|
size_byte - i_byte, len);
|
||||||
i_byte += len;
|
i_byte += len;
|
||||||
|
|
||||||
if (SINGLE_BYTE_CHAR_P (c))
|
if (SINGLE_BYTE_CHAR_P (c))
|
||||||
|
|
|
||||||
79
src/xdisp.c
79
src/xdisp.c
|
|
@ -20178,20 +20178,57 @@ note_mode_line_or_margin_highlight (w, x, y, area)
|
||||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||||
Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
|
Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
|
||||||
Lisp_Object pointer = Qnil;
|
Lisp_Object pointer = Qnil;
|
||||||
int charpos, dx, dy;
|
int charpos, dx, dy, width, height;
|
||||||
Lisp_Object string;
|
Lisp_Object string, object = Qnil;
|
||||||
Lisp_Object pos, help, image;
|
Lisp_Object pos, help, image;
|
||||||
|
|
||||||
if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
|
if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
|
||||||
string = mode_line_string (w, &x, &y, 0, 0, area, &charpos);
|
string = mode_line_string (w, area, &x, &y, &charpos,
|
||||||
|
&object, &dx, &dy, &width, &height);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w);
|
x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w);
|
||||||
string = marginal_area_string (w, &x, &y, &dx, &dy, area, &charpos);
|
string = marginal_area_string (w, area, &x, &y, &charpos,
|
||||||
|
&object, &dx, &dy, &width, &height);
|
||||||
}
|
}
|
||||||
|
|
||||||
help = Qnil;
|
help = Qnil;
|
||||||
|
|
||||||
|
if (IMAGEP (object))
|
||||||
|
{
|
||||||
|
Lisp_Object image_map, hotspot;
|
||||||
|
if ((image_map = Fplist_get (XCDR (object), QCmap),
|
||||||
|
!NILP (image_map))
|
||||||
|
&& (hotspot = find_hot_spot (image_map, dx, dy),
|
||||||
|
CONSP (hotspot))
|
||||||
|
&& (hotspot = XCDR (hotspot), CONSP (hotspot)))
|
||||||
|
{
|
||||||
|
Lisp_Object area_id, plist;
|
||||||
|
|
||||||
|
area_id = XCAR (hotspot);
|
||||||
|
/* Could check AREA_ID to see if we enter/leave this hot-spot.
|
||||||
|
If so, we could look for mouse-enter, mouse-leave
|
||||||
|
properties in PLIST (and do something...). */
|
||||||
|
if ((plist = XCDR (hotspot), CONSP (plist)))
|
||||||
|
{
|
||||||
|
pointer = Fplist_get (plist, Qpointer);
|
||||||
|
if (NILP (pointer))
|
||||||
|
pointer = Qhand;
|
||||||
|
help = Fplist_get (plist, Qhelp_echo);
|
||||||
|
if (!NILP (help))
|
||||||
|
{
|
||||||
|
help_echo_string = help;
|
||||||
|
/* Is this correct? ++kfs */
|
||||||
|
XSETWINDOW (help_echo_window, w);
|
||||||
|
help_echo_object = w->buffer;
|
||||||
|
help_echo_pos = charpos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (NILP (pointer))
|
||||||
|
pointer = Fplist_get (XCDR (object), QCpointer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (STRINGP (string))
|
if (STRINGP (string))
|
||||||
{
|
{
|
||||||
pos = make_number (charpos);
|
pos = make_number (charpos);
|
||||||
|
|
@ -20221,40 +20258,6 @@ note_mode_line_or_margin_highlight (w, x, y, area)
|
||||||
cursor = dpyinfo->vertical_scroll_bar_cursor;
|
cursor = dpyinfo->vertical_scroll_bar_cursor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (IMAGEP (string))
|
|
||||||
{
|
|
||||||
Lisp_Object image_map, hotspot;
|
|
||||||
if ((image_map = Fplist_get (XCDR (string), QCmap),
|
|
||||||
!NILP (image_map))
|
|
||||||
&& (hotspot = find_hot_spot (image_map, dx, dy),
|
|
||||||
CONSP (hotspot))
|
|
||||||
&& (hotspot = XCDR (hotspot), CONSP (hotspot)))
|
|
||||||
{
|
|
||||||
Lisp_Object area_id, plist;
|
|
||||||
|
|
||||||
area_id = XCAR (hotspot);
|
|
||||||
/* Could check AREA_ID to see if we enter/leave this hot-spot.
|
|
||||||
If so, we could look for mouse-enter, mouse-leave
|
|
||||||
properties in PLIST (and do something...). */
|
|
||||||
if ((plist = XCDR (hotspot), CONSP (plist)))
|
|
||||||
{
|
|
||||||
pointer = Fplist_get (plist, Qpointer);
|
|
||||||
if (NILP (pointer))
|
|
||||||
pointer = Qhand;
|
|
||||||
help = Fplist_get (plist, Qhelp_echo);
|
|
||||||
if (!NILP (help))
|
|
||||||
{
|
|
||||||
help_echo_string = help;
|
|
||||||
/* Is this correct? ++kfs */
|
|
||||||
XSETWINDOW (help_echo_window, w);
|
|
||||||
help_echo_object = w->buffer;
|
|
||||||
help_echo_pos = charpos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (NILP (pointer))
|
|
||||||
pointer = Fplist_get (XCDR (string), QCpointer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define_frame_cursor1 (f, cursor, pointer);
|
define_frame_cursor1 (f, cursor, pointer);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1092,6 +1092,12 @@ on the left of the dialog box and all following items on the right.
|
||||||
CHECK_STRING (title);
|
CHECK_STRING (title);
|
||||||
record_unwind_protect (unuse_menu_items, Qnil);
|
record_unwind_protect (unuse_menu_items, Qnil);
|
||||||
|
|
||||||
|
if (NILP (Fcar (Fcdr (contents))))
|
||||||
|
/* No buttons specified, add an "Ok" button so users can pop down
|
||||||
|
the dialog. Also, the lesstif/motif version crashes if there are
|
||||||
|
no buttons. */
|
||||||
|
contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil));
|
||||||
|
|
||||||
list_of_panes (Fcons (contents, Qnil));
|
list_of_panes (Fcons (contents, Qnil));
|
||||||
|
|
||||||
/* Display them in a dialog box. */
|
/* Display them in a dialog box. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue