1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Merge from emacs--devo--0

Patches applied:

 * emacs--devo--0  (patch 771-780)

   - Update from CVS
   - Merge from emacs--rel--22
   - Merge from emacs--rel--22, gnus--rel--5.10
   - Fix tq.el edge case

 * emacs--rel--22  (patch 26-32)

   - Update from CVS
   - lisp/vc-hooks.el (vc-find-root): Fix file attribute test

 * gnus--rel--5.10  (patch 224-225)

   - Merge from emacs--devo--0, emacs--rel--22
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-18
This commit is contained in:
Miles Bader 2007-05-30 14:44:47 +00:00
commit 34c6724464
62 changed files with 862 additions and 327 deletions

View file

@ -1,3 +1,7 @@
2007-05-25 Chong Yidong <cyd@stupidchicken.com>
* mkinstalldirs: Sync to version in automake CVS.
2007-05-22 Andreas Schwab <schwab@suse.de>
* configure.in: Prefer build_alias over host when host_alias is

View file

@ -10,8 +10,6 @@ ren emacs.exe emacs.exe.orig
:dump
rem Overwrites emacs.exe if still present
mkdir ..\lib-src
copy fns* ..\lib-src
mkdir obj
mkdir obj\i386
mkdir obj\etc

View file

@ -25,8 +25,6 @@ rem along with GNU Emacs; see the file COPYING. If not, write to the
rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
rem Boston, MA 02110-1301, USA.
set ZIP=zip
if (%3) == () goto usage
if not (%4) == () goto %4
@ -34,18 +32,25 @@ if not (%4) == () goto %4
echo Create full bin distribution
copy %3\README.W32 emacs-%1\README.W32
%ZIP% -x emacs.mdp -x *.pdb -x *.opt -x *~ -x CVS -9 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %2-bin-i386.zip
rem Info-ZIP zip seems to be broken on Windows.
rem It always writes to zip.zip and treats the zipfile argument as one
rem of the files to go in it.
rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS
7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim
del emacs-%1\README.W32
if not (%4) == () goto end
:barebin
echo Create archive with just the basic binaries and generated files
echo (the user needs to unpack the full source distribution for
echo everything else)
copy %3\README.W32 emacs-%1\README.W32
%ZIP% -9 emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X %2-barebin-i386.zip
copy %3\dump.bat emacs-%1\bin\dump.bat
rem Info-ZIP zip seems to be broken on Windows.
rem It always writes to zip.zip and treats the zipfile argument as one
rem of the files to go in it.
rem zip -9 -r %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X
7z a -tZIP -mx=9 %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X
del emacs-%1\README.W32
if not (%4) == () goto end

View file

@ -1,3 +1,7 @@
2007-05-29 Robert J. Chassell <bob@rattlesnake.com>
* NEWS: Fix instances of `allow' without object.
2007-05-22 Glenn Morris <rgm@gnu.org>
* NEWS.22: New file with entries for Emacs 22.

View file

@ -34,6 +34,10 @@ with a prefix argument or by typing C-u C-h C-n.
* Changes in Specialized Modes and Packages in Emacs 23.1
** In the `copyright' package, you can specify your copyright holders's names.
Only copyright lines with holders matching copyright-names-regexp will be
considered for update.
* Changes in Emacs 23.1 on non-free operating systems

View file

@ -442,7 +442,7 @@ same string that would be displayed on mouse-over using the
`help-echo' property, but, in certain cases, it can display a more
keyboard oriented alternative.
*** New user option `help-at-pt-display-when-idle' allows to
*** New user option `help-at-pt-display-when-idle' allows you to
automatically show the help provided by `display-local-help' on
point-over, after suitable idle time. The amount of idle time is
determined by the user option `help-at-pt-timer-delay' and defaults
@ -1949,11 +1949,11 @@ old name remains available as alias, but has been marked obsolete.
If point is at the end of a file buffer before reverting, Auto Revert
mode keeps it at the end after reverting. Similarly if point is
displayed at the end of a file buffer in any window, it stays at
the end of the buffer in that window. This allows to tail a file:
just put point at the end of the buffer and it stays there. This
rule applies to file buffers. For non-file buffers, the behavior can
be mode dependent.
displayed at the end of a file buffer in any window, it stays at the end
of the buffer in that window. This allows you to "tail" a file: just
put point at the end of the buffer and it stays there. This rule
applies to file buffers. For non-file buffers, the behavior can be mode
dependent.
If you are sure that the file will only change by growing at the end,
then you can tail the file more efficiently by using the new minor
@ -3047,7 +3047,7 @@ struct members in C, members variables in C++ and variables in PHP.
*** Support for `movemail' from GNU mailutils was added to Rmail.
This version of `movemail' allows to read mail from a wide range of
This version of `movemail' allows you to read mail from a wide range of
mailbox formats, including remote POP3 and IMAP4 mailboxes with or
without TLS encryption. If GNU mailutils is installed on the system
and its version of `movemail' can be found in exec-path, it will be

View file

@ -2452,27 +2452,6 @@ This results from a bug in a VERY old version of GNU Sed. To solve
the problem, install the current version of GNU Sed, then rerun
Emacs's configure script.
*** Compiling on GNU/Linux fails due to a missing left operand in gnu-linux.h.
The error messages have the form:
../src/s/gnu-linux.h:49:24: error: operator '>' has no left operand
This error occurs because your system defines LINUX_VERSION_CODE in
the standard header file linux/version.h but does not give it a value.
As a workaround, you can edit the file src/s/gnu-linux.h to add the
needed definition. On the line after "#include <linux/version.h>",
add a line as shown below:
#include <linux/version.h>
#define LINUX_VERSION_CODE 132626
The number to use depends on your kernel version (the example shown is
for kernel 2.6.18). The number can be obtained by running the
following command in the shell:
uname -r | sed -e 's/\./ /g' -e 's/-.*//' | awk '{print $1*(2^16) + $2*(2^8) + $3}'
*** Building a 32-bit executable on a 64-bit GNU/Linux architecture.
First ensure that the necessary 32-bit system libraries and include

View file

@ -1,3 +1,121 @@
2007-05-30 Michael Olson <mwolson@gnu.org>
* emacs-lisp/tq.el (tq-queue-pop): Stifle error when a process has
died and we are trying to send a signal to it. The program using
tq.el should periodically check to see whether the process has
died and react appropriately -- this is not the responsibility of
tq.el, and is consistent with the rest of the tq.el source code.
2007-05-29 Martin Rudalics <rudalics@gmx.at>
* textmodes/table.el (table--point-entered-cell-function)
(table--point-left-cell-function): Bind
`inhibit-point-motion-hooks' to t.
2007-05-29 Nikolaj Schumacher <n_schumacher@web.de> (tiny change)
* emacs-lisp/rx.el (rx): Doc fix.
2007-05-28 Juanma Barranquero <lekktu@gmail.com>
* progmodes/idlwave.el (idlwave-routines): Fix typo in docstring.
2007-05-28 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.0.56.
* net/tramp.el:
* net/tramp-ftp.el:
* net/tramp-smb.el:
* net/tramp-util.el:
* net/tramp-vc.el:
Don't load cl.el, because that pollutes the namespace. Replace cl
macros by their implementations where necessary. Requested by
Richard Stallman <rms@gnu.org>.
* net/tramp.el (top): Make `set-buffer-multibyte' an alias if it
doesn't exist.
(with-parsed-tramp-file-name): Protect debug spec during
compilation.
(tramp-handle-insert-directory): Check (featurep 'ls-lisp).
(tramp-file-name-p, tramp-file-name-multi-method)
(tramp-file-name-method, tramp-file-name-user)
(tramp-file-name-host, tramp-file-name-localname): New defuns,
replacing defstruct `tramp-file-name'.
(tramp-handle-file-remote-p, tramp-completion-dissect-file-name1)
(tramp-dissect-file-name, tramp-dissect-multi-file-name): Apply
`vector' instead of `make-tramp-file-name'.
(tramp-handle-make-auto-save-file-name): Apply
`tramp-temporary-file-directory' for compatibility reasons.
(tramp-completion-mode): Use `natnump' instead of `wholenump'
because of XEmacs.
(tramp-completion-mode): `last-input-event' is nil when XEmacs is
started.
2007-05-28 Chong Yidong <cyd@stupidchicken.com>
* textmodes/sgml-mode.el (sgml-point-entered): Use condition-case.
2007-05-27 Tetsurou Okazaki <okazaki@be.to> (tiny change)
* log-edit.el (log-edit-changelog-paragraph): Return point-max
as the end of the ChangeLog paragraph when it ends without a line
termination.
2007-05-27 Ryan Yeske <rcyeske@gmail.com>
* net/webjump.el (webjump-sample-sites):
Add simple Wikipedia query.
2007-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/derived.el (define-derived-mode): Remove bogus
compatibiity code.
* emacs-lisp/copyright.el (copyright-names-regexp): New var.
(copyright-update-year): Use it.
* edmacro.el (edmacro-format-keys): Use current-active-maps.
* ediff-init.el (ediff-defvar-local, ediff-with-current-buffer):
Add indentation and debugging info. Fix up comment convention.
* cus-dep.el (custom-make-dependencies): Simplify.
* composite.el (compose-region, decompose-region):
Use inhibit-read-only and restore-buffer-modified-p.
* xt-mouse.el (xterm-mouse-truncate-wrap): New function.
(xterm-mouse-event): Use it.
2007-05-25 Juanma Barranquero <lekktu@gmail.com>
* bs.el (bs-cycle-previous): Don't modify the cycle list until
`switch-to-buffer' has returned succesfully.
(bs-cycle-next): Ditto. Also, don't bury the buffer when the
window is dedicated (it could iconify the frame).
2007-05-25 Miles Bader <miles@fencepost.gnu.org>
* vc-hooks.el (vc-find-root): Fix file attribute test.
2007-05-24 Richard Stallman <rms@gnu.org>
* textmodes/flyspell.el (flyspell-correct-word-before-point):
Don't let opoint be nil.
(flyspell-emacs-popup): Explicit error if no dialogs.
2007-05-24 Chong Yidong <cyd@stupidchicken.com>
* image-mode.el (image-forward-hscroll, image-backward-hscroll)
(image-next-line, image-previous-line, image-scroll-up)
(image-scroll-down, image-bol, image-eol, image-bob, image-eob):
New functions.
(image-mode-map): Remap motion commands.
(image-mode-text-map): New keymap for viewing images as text.
(image-mode): Use image-mode-map.
(image-toggle-display): Toggle auto-hscroll-mode and mode keymaps.
2007-05-24 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/fill.el (canonically-space-region): Make the second arg

View file

@ -1221,10 +1221,13 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(next (car tupel))
(cycle-list (cdr tupel)))
(unless (window-dedicated-p (selected-window))
;; We don't want the frame iconified if the only window in the frame
;; happens to be dedicated; let's get the error from switch-to-buffer
(bury-buffer))
(switch-to-buffer next)
(setq bs--cycle-list (append (cdr cycle-list)
(list (car cycle-list))))
(bury-buffer)
(switch-to-buffer next)
(bs-message-without-log "Next buffers: %s"
(or (cdr bs--cycle-list)
"this buffer"))))))
@ -1251,9 +1254,9 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(prev-buffer (car tupel))
(cycle-list (cdr tupel)))
(switch-to-buffer prev-buffer)
(setq bs--cycle-list (append (last cycle-list)
(reverse (cdr (reverse cycle-list)))))
(switch-to-buffer prev-buffer)
(bs-message-without-log "Previous buffers: %s"
(or (reverse (cdr bs--cycle-list))
"this buffer"))))))

View file

@ -194,7 +194,7 @@ adjust the composition when it gets invalid because of a change of
text in the composition."
(interactive "r")
(let ((modified-p (buffer-modified-p))
(buffer-read-only nil))
(inhibit-read-only t))
(if (or (vectorp components) (listp components))
(setq components (encode-composition-components components)))
(compose-region-internal start end components modification-func)
@ -208,9 +208,9 @@ When called from a program, expects two arguments,
positions (integers or markers) specifying the region."
(interactive "r")
(let ((modified-p (buffer-modified-p))
(buffer-read-only nil))
(inhibit-read-only t))
(remove-text-properties start end '(composition nil))
(set-buffer-modified-p modified-p)))
(restore-buffer-modified-p modified-p)))
;;;###autoload
(defun compose-string (string &optional start end components modification-func)
@ -372,8 +372,8 @@ after a sequence of character events."
;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars)
;;; The following codes are only for backward compatibility with Emacs
;;; 20.4 and earlier.
;; The following codes are only for backward compatibility with Emacs
;; 20.4 and earlier.
;;;###autoload
(defun decompose-composite-char (char &optional type with-composition-rule)
@ -392,5 +392,5 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored."
;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
;;; composite.el ends here

View file

@ -141,7 +141,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
(member where
(cdr (assoc version version-alist)))
(push where (cdr (assoc version version-alist))))
(push (cons version (list where)) version-alist)))
(push (list version where) version-alist)))
;; This is a group
(insert "(custom-put-if-not '" (symbol-name symbol)
" 'custom-version ")

View file

@ -220,7 +220,7 @@ with either the `--unibyte' option or the EMACS_UNIBYTE environment
variable, or else customize `enable-multibyte-characters'.
With prefix argument, this command enables European character display
if arg is positive, disables it otherwise. Otherwise, it toggles
if ARG is positive, disables it otherwise. Otherwise, it toggles
European character display.
When this mode is enabled, characters in the range of 160 to 255
@ -264,5 +264,5 @@ for users who call this function in `.emacs'."
(provide 'disp-table)
;;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7
;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7
;;; disp-table.el ends here

View file

@ -110,6 +110,7 @@ that Ediff doesn't know about.")
;;
;; Plagiarised from `emerge-defvar-local' for XEmacs.
(defmacro ediff-defvar-local (var value doc)
(declare (indent defun))
`(progn
(defvar ,var ,value ,doc)
(make-variable-buffer-local ',var)
@ -258,6 +259,7 @@ It needs to be killed when we quit the session.")
;; Doesn't save the point and mark.
;; This is `with-current-buffer' with the added test for live buffers."
(defmacro ediff-with-current-buffer (buffer &rest body)
(declare (indent 1) (debug (form body)))
`(if (ediff-buffer-live-p ,buffer)
(save-current-buffer
(set-buffer ,buffer)
@ -1873,11 +1875,11 @@ Unless optional argument INPLACE is non-nil, return a new string."
;;; Local Variables:
;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
;; Local Variables:
;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;; End:
;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
;;; ediff-init.el ends here

View file

@ -4315,11 +4315,11 @@ Mail anyway? (y or n) ")
(provide 'ediff-util)
;;; Local Variables:
;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
;; Local Variables:
;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;; End:
;;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
;;; ediff-util.el ends here

View file

@ -430,10 +430,7 @@ doubt, use whitespace."
(defun edmacro-format-keys (macro &optional verbose)
(setq macro (edmacro-fix-menu-commands macro))
(let* ((maps (append (current-minor-mode-maps)
(if (current-local-map)
(list (current-local-map)))
(list (current-global-map))))
(let* ((maps (current-active-maps))
(pkeys '(end-macro ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?\C-u
?\M-- ?\M-0 ?\M-1 ?\M-2 ?\M-3 ?\M-4 ?\M-5 ?\M-6
?\M-7 ?\M-8 ?\M-9))

View file

@ -37,7 +37,7 @@
:group 'tools)
(defcustom copyright-limit 2000
"*Don't try to update copyright beyond this position unless interactive.
"Don't try to update copyright beyond this position unless interactive.
A value of nil means to search whole buffer."
:group 'copyright
:type '(choice (integer :tag "Limit")
@ -49,21 +49,28 @@ A value of nil means to search whole buffer."
"\\([<5B>©Ž©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
\\|[Cc]opyright\\s *:?\\s *[<EFBFBD>©Ž©]\\)\
\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"*What your copyright notice looks like.
"What your copyright notice looks like.
The second \\( \\) construct must match the years."
:group 'copyright
:type 'regexp)
(defcustom copyright-names-regexp ""
"Regexp matching the names which correspond to the user.
Only copyright lines where the name matches this regexp will be updated.
This allows you to avoid adding yars to a copyright notice belonging to
someone else or to a group for which you do not work."
:type 'regexp)
(defcustom copyright-years-regexp
"\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"*Match additional copyright notice years.
"Match additional copyright notice years.
The second \\( \\) construct must match the years."
:group 'copyright
:type 'regexp)
(defcustom copyright-query 'function
"*If non-nil, ask user before changing copyright.
"If non-nil, ask user before changing copyright.
When this is `function', only ask when called non-interactively."
:group 'copyright
:type '(choice (const :tag "Do not ask")
@ -83,7 +90,17 @@ When this is `function', only ask when called non-interactively."
"String representing the current year.")
(defun copyright-update-year (replace noquery)
(when (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
(when
(condition-case err
(re-search-forward (concat "\\(" copyright-regexp
"\\)\\([ \t]*\n\\)?.*\\(?:"
copyright-names-regexp "\\)")
(+ (point) copyright-limit) t)
;; In case the regexp is rejected. This is useful because
;; copyright-update is typically called from before-save-hook where
;; such an error is very inconvenient for the user.
(error (message "Can't update copyright: %s" err) nil))
(goto-char (match-end 1))
;; If the years are continued onto multiple lined
;; that are marked as comments, skip to the end of the years anyway.
(while (save-excursion
@ -94,7 +111,7 @@ When this is `function', only ask when called non-interactively."
(save-match-data
(forward-line 1)
(and (looking-at comment-start-skip)
(goto-char (match-end 0))))
(goto-char (match-end 1))))
(save-match-data
(looking-at copyright-years-regexp))))
(forward-line 1)
@ -103,7 +120,7 @@ When this is `function', only ask when called non-interactively."
;; Note that `current-time-string' isn't locale-sensitive.
(setq copyright-current-year (substring (current-time-string) -4))
(unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2))
(unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
(substring copyright-current-year -2))
(if (or noquery
(y-or-n-p (if replace
@ -235,5 +252,5 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
;; coding: emacs-mule
;; End:
;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8
;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8
;;; copyright.el ends here

View file

@ -254,11 +254,7 @@ No problems result if this variable is not bound.
,@body
)
;; Run the hooks, if any.
;; Make the generated code work in older Emacs versions
;; that do not yet have run-mode-hooks.
(if (fboundp 'run-mode-hooks)
(run-mode-hooks ',hook)
(run-hooks ',hook))))))
(run-mode-hooks ',hook)))))
;; PUBLIC: find the ultimate class of a derived mode.

View file

@ -725,8 +725,7 @@ CHAR
matches the empty string, but only at point.
`word-start', `bow'
matches the empty string, but only at the beginning or end of a
word.
matches the empty string, but only at the beginning of a word.
`word-end', `eow'
matches the empty string, but only at the end of a word.
@ -740,6 +739,12 @@ CHAR
matches the empty string, but not at the beginning or end of a
word.
`symbol-start'
matches the empty string, but only at the beginning of a symbol.
`symbol-end'
matches the empty string, but only at the end of a symbol.
`digit', `numeric', `num'
matches 0 through 9.

View file

@ -100,8 +100,9 @@ to a tcp server on another machine."
(defun tq-queue-pop (tq)
(setcar tq (cdr (car tq)))
(let ((question (tq-queue-head-question tq)))
(when question
(process-send-string (tq-process tq) question)))
(condition-case nil
(process-send-string (tq-process tq) question)
(error nil)))
(null (car tq)))
(defun tq-enqueue (tq question regexp closure fn &optional delay-question)

View file

@ -1,3 +1,8 @@
2007-05-28 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-pop-to-buffer): Add switch-function argument.
(message-mail): Pass switch-function argument to it.
2007-05-24 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-narrow-to-headers-or-head): Ignore

View file

@ -5576,7 +5576,7 @@ between beginning of field and beginning of line."
'car-less-than-car)))
new)))))
(defun message-pop-to-buffer (name)
(defun message-pop-to-buffer (name &optional switch-function)
"Pop to buffer NAME, and warn if it already exists and is modified."
(let ((buffer (get-buffer name)))
(if (and buffer
@ -5587,14 +5587,16 @@ between beginning of field and beginning of line."
(progn
(gnus-select-frame-set-input-focus (window-frame window))
(select-window window))
(set-buffer (pop-to-buffer buffer)))
(funcall (or switch-function 'pop-to-buffer) buffer)
(set-buffer buffer))
(when (and (buffer-modified-p)
(not (prog1
(y-or-n-p
"Message already being composed; erase? ")
(message nil))))
(error "Message being composed")))
(set-buffer (pop-to-buffer name)))
(funcall (or switch-function 'pop-to-buffer) name)
(set-buffer name))
(erase-buffer)
(message-mode)))
@ -5831,15 +5833,15 @@ is a function used to switch to and display the mail buffer."
(interactive)
(let ((message-this-is-mail t) replybuffer)
(unless (message-mail-user-agent)
(funcall
(or switch-function 'message-pop-to-buffer)
(message-pop-to-buffer
;; Search for the existing message buffer if `continue' is non-nil.
(let ((message-generate-new-buffers
(when (or (not continue)
(eq message-generate-new-buffers 'standard)
(functionp message-generate-new-buffers))
message-generate-new-buffers)))
(message-buffer-name "mail" to))))
(message-buffer-name "mail" to))
switch-function))
;; FIXME: message-mail should do something if YANK-ACTION is not
;; insert-buffer.
(and (consp yank-action) (eq (car yank-action) 'insert-buffer)

View file

@ -43,11 +43,162 @@
;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist)
;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist)
;;; Image scrolling functions
(defun image-forward-hscroll (&optional n)
"Scroll image in current window to the left by N character widths.
Stop if the right edge of the image is reached."
(interactive "p")
(cond ((= n 0) nil)
((< n 0)
(set-window-hscroll (selected-window)
(max 0 (+ (window-hscroll) n))))
(t
(let* ((image (get-text-property 1 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image)))))
(set-window-hscroll (selected-window)
(min (max 0 (- img-width win-width))
(+ n (window-hscroll))))))))
(defun image-backward-hscroll (&optional n)
"Scroll image in current window to the right by N character widths.
Stop if the left edge of the image is reached."
(interactive "p")
(image-forward-hscroll (- n)))
(defun image-next-line (&optional n)
"Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached."
(interactive "p")
(cond ((= n 0) nil)
((< n 0)
(set-window-vscroll (selected-window)
(max 0 (+ (window-vscroll) n))))
(t
(let* ((image (get-text-property 1 'display))
(edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges)))
(img-height (ceiling (cdr (image-size image)))))
(set-window-vscroll (selected-window)
(min (max 0 (- img-height win-height))
(+ n (window-vscroll))))))))
(defun image-previous-line (&optional n)
"Scroll image in current window downward by N lines.
Stop if the top edge of the image is reached."
(interactive "p")
(image-next-line (- n)))
(defun image-scroll-up (&optional n)
"Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
If ARG is omitted or nil, scroll upward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom `-', scroll downward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'."
(interactive "P")
(cond ((null n)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(max 0 (- win-height next-screen-context-lines)))))
((eq n '-)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(min 0 (- next-screen-context-lines win-height)))))
(t (image-next-line (prefix-numeric-value n)))))
(defun image-scroll-down (&optional n)
"Scroll image in current window downward by N lines
Stop if the top edge of the image is reached.
If ARG is omitted or nil, scroll downward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll upward.
If ARG is the atom `-', scroll upward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'."
(interactive "P")
(cond ((null n)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(min 0 (- next-screen-context-lines win-height)))))
((eq n '-)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(max 0 (- win-height next-screen-context-lines)))))
(t (image-next-line (- (prefix-numeric-value n))))))
(defun image-bol (arg)
"Scroll horizontally to the left edge of the image in the current window.
With argument ARG not nil or 1, move forward ARG - 1 lines first,
stopping if the top or bottom edge of the image is reached."
(interactive "p")
(and arg
(/= (setq arg (prefix-numeric-value arg)) 1)
(image-next-line (- arg 1)))
(set-window-hscroll (selected-window) 0))
(defun image-eol (arg)
"Scroll horizontally to the right edge of the image in the current window.
With argument ARG not nil or 1, move forward ARG - 1 lines first,
stopping if the top or bottom edge of the image is reached."
(interactive "p")
(and arg
(/= (setq arg (prefix-numeric-value arg)) 1)
(image-next-line (- arg 1)))
(let* ((image (get-text-property 1 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image)))))
(set-window-hscroll (selected-window)
(max 0 (- img-width win-width)))))
(defun image-bob ()
"Scroll to the top-left corner of the image in the current window."
(interactive)
(set-window-hscroll (selected-window) 0)
(set-window-vscroll (selected-window) 0))
(defun image-eob ()
"Scroll to the bottom-right corner of the image in the current window."
(interactive)
(let* ((image (get-text-property 1 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image))))
(win-height (- (nth 3 edges) (nth 1 edges)))
(img-height (ceiling (cdr (image-size image)))))
(set-window-hscroll (selected-window) (max 0 (- img-width win-width)))
(set-window-vscroll (selected-window) (max 0 (- img-height win-height)))))
;;; Image Mode setup
(defvar image-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-c" 'image-toggle-display)
(define-key map [remap forward-char] 'image-forward-hscroll)
(define-key map [remap backward-char] 'image-backward-hscroll)
(define-key map [remap previous-line] 'image-previous-line)
(define-key map [remap next-line] 'image-next-line)
(define-key map [remap scroll-up] 'image-scroll-up)
(define-key map [remap scroll-down] 'image-scroll-down)
(define-key map [remap move-beginning-of-line] 'image-bol)
(define-key map [remap move-end-of-line] 'image-eol)
(define-key map [remap beginning-of-buffer] 'image-bob)
(define-key map [remap end-of-buffer] 'image-eob)
map)
"Major mode keymap for Image mode.")
"Major mode keymap for viewing images in Image mode.")
(defvar image-mode-text-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-c" 'image-toggle-display)
map)
"Major mode keymap for viewing images as text in Image mode.")
;;;###autoload
(defun image-mode ()
@ -58,13 +209,13 @@ to toggle between display as an image and display as text."
(kill-all-local-variables)
(setq mode-name "Image")
(setq major-mode 'image-mode)
(use-local-map image-mode-map)
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
(if (and (display-images-p)
(not (get-text-property (point-min) 'display)))
(image-toggle-display)
;; Set next vars when image is already displayed but local
;; variables were cleared by kill-all-local-variables
(use-local-map image-mode-map)
(setq cursor-type nil truncate-lines t))
(run-mode-hooks 'image-mode-hook)
(if (display-images-p)
@ -140,6 +291,8 @@ and showing the image as an image."
(set-buffer-modified-p modified)
(kill-local-variable 'cursor-type)
(kill-local-variable 'truncate-lines)
(kill-local-variable 'auto-hscroll-mode)
(use-local-map image-mode-text-map)
(if (called-interactively-p)
(message "Repeat this command to go back to displaying the image")))
;; Turn the image data into a real image, but only if the whole file
@ -161,12 +314,9 @@ and showing the image as an image."
nil t)))
(props
`(display ,image
intangible ,image
rear-nonsticky (display intangible)
;; This a cheap attempt to make the whole buffer
;; read-only when we're visiting the file (as
;; opposed to just inserting it).
read-only t front-sticky (read-only)))
intangible ,image
rear-nonsticky (display intangible)
read-only t front-sticky (read-only)))
(inhibit-read-only t)
(buffer-undo-list t)
(modified (buffer-modified-p)))
@ -179,6 +329,9 @@ and showing the image as an image."
;; This just makes the arrow displayed in the right fringe
;; area look correct when the image is wider than the window.
(setq truncate-lines t)
;; Allow navigation of large images
(set (make-local-variable 'auto-hscroll-mode) nil)
(use-local-map image-mode-map)
(if (called-interactively-p)
(message "Repeat this command to go back to displaying the file as text")))))

View file

@ -538,7 +538,7 @@ If we are between paragraphs, return the previous paragraph."
(point))
(if (re-search-forward "^[ \t\n]*$" nil t)
(match-beginning 0)
(point)))))
(point-max)))))
(defun log-edit-changelog-subparagraph ()
"Return the bounds of the ChangeLog subparagraph containing point.

View file

@ -1,6 +1,7 @@
;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 2007 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@ -31,12 +32,7 @@
(require 'tramp)
(eval-when-compile
(require 'cl)
(require 'custom)
;; Emacs 19.34 compatibility hack -- is this needed?
(or (>= emacs-major-version 20)
(load "cl-seq")))
(eval-when-compile (require 'custom))
;; Disable Ange-FTP from file-name-handler-alist.
;; To handle EFS, the following functions need to be dealt with:

View file

@ -31,12 +31,7 @@
(require 'tramp)
;; Pacify byte-compiler
(eval-when-compile
(require 'cl)
(require 'custom)
;; Emacs 19.34 compatibility hack -- is this needed?
(or (>= emacs-major-version 20)
(load "cl-seq")))
(eval-when-compile (require 'custom))
;; Avoid byte-compiler warnings if the byte-compiler supports this.
;; Currently, XEmacs supports this.

View file

@ -29,7 +29,6 @@
;;; Code:
(eval-when-compile (require 'cl))
(require 'compile)
(require 'tramp)
(add-hook 'tramp-util-unload-hook

View file

@ -1,7 +1,8 @@
;;; -*- coding: iso-2022-7bit; -*-
;;; tramp-uu.el --- uuencode in Lisp
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 2007 Free Software Foundation, Inc.
;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
;; Keywords: comm, terminals

View file

@ -31,8 +31,6 @@
;;; Code:
(eval-when-compile
(require 'cl))
(require 'vc)
;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module.
(unless (boundp 'vc-rcs-release)

View file

@ -151,11 +151,7 @@ Otherwise, use a separate filename syntax for Tramp.")
(when (featurep 'tramp-smb)
(unload-feature 'tramp-smb 'force)))))))
(require 'cl)
(require 'custom)
;; Emacs 19.34 compatibility hack -- is this needed?
(or (>= emacs-major-version 20)
(load "cl-seq"))
(unless (boundp 'custom-print-functions)
(defvar custom-print-functions nil)) ; not autoloaded before Emacs 20.4
@ -175,6 +171,11 @@ Otherwise, use a separate filename syntax for Tramp.")
(when (boundp 'byte-compile-not-obsolete-var)
(setq byte-compile-not-obsolete-var 'directory-sep-char)))
;; `set-buffer-multibyte' comes from Emacs Leim.
(eval-and-compile
(unless (fboundp 'set-buffer-multibyte)
(defalias 'set-buffer-multibyte 'ignore)))
;;; User Customizable Internal Variables:
(defgroup tramp nil
@ -2077,7 +2078,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method',
(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
;; Enable debugging.
(def-edebug-spec with-parsed-tramp-file-name (form symbolp body))
(eval-and-compile
(when (featurep 'edebug)
(def-edebug-spec with-parsed-tramp-file-name (form symbolp body))))
;; Highlight as keyword.
(when (functionp 'font-lock-add-keywords)
(funcall 'font-lock-add-keywords
@ -2384,10 +2387,10 @@ target of the symlink differ."
"Integer constant overflow in reader")
(string-match
"^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'"
(caddr err)))
(let* ((big (read (substring (caddr err) 0
(car (cddr err))))
(let* ((big (read (substring (car (cddr err)) 0
(match-beginning 1))))
(small (read (match-string 1 (caddr err))))
(small (read (match-string 1 (car (cddr err)))))
(twiddle (/ small 65536)))
(cons (+ big twiddle)
(- small (* twiddle 65536))))))))
@ -2807,7 +2810,7 @@ of."
object)))
(cell root))
(while (cdr cell)
(if (and match (not (string-match match (caadr cell))))
(if (and match (not (string-match match (car (cadr cell)))))
;; Remove from list
(setcdr cell (cddr cell))
;; Include in list
@ -3426,10 +3429,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
(defun tramp-handle-insert-directory
(filename switches &optional wildcard full-directory-p)
"Like `insert-directory' for tramp files."
(if (and (boundp 'ls-lisp-use-insert-directory-program)
(if (and (featurep 'ls-lisp)
(not (symbol-value 'ls-lisp-use-insert-directory-program)))
(tramp-run-real-handler 'insert-directory
(list filename switches wildcard full-directory-p))
(tramp-run-real-handler
'insert-directory (list filename switches wildcard full-directory-p))
;; For the moment, we assume that the remote "ls" program does not
;; grok "--dired". In the future, we should detect this on
;; connection setup.
@ -3869,12 +3872,7 @@ This will break if COMMAND prints a newline, followed by the value of
"Like `file-remote-p' for tramp files."
(when (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
(make-tramp-file-name
:multi-method multi-method
:method method
:user user
:host host
:localname ""))))
(vector multi-method method user host ""))))
(defun tramp-handle-insert-file-contents
(filename &optional visit beg end replace)
@ -3919,7 +3917,7 @@ This will break if COMMAND prints a newline, followed by the value of
(when (boundp 'last-coding-system-used)
(set 'last-coding-system-used coding-system-used))
(list (expand-file-name filename)
(second result))))))
(cadr result))))))
(defun tramp-handle-find-backup-file-name (filename)
@ -3978,7 +3976,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
(when (and (string-match (car x) buffer-file-name)
(not (car (cddr x))))
(setq tramp-auto-save-directory
(or tramp-auto-save-directory temporary-file-directory))))
(or tramp-auto-save-directory
(tramp-temporary-file-directory)))))
(symbol-value 'auto-save-file-name-transforms)))
;; Create directory.
(when tramp-auto-save-directory
@ -4566,7 +4565,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
(member (match-string 1 file) (mapcar 'car tramp-methods)))
((or (equal last-input-event 'tab)
;; Emacs
(and (wholenump last-input-event)
(and (natnump last-input-event)
(or
;; ?\t has event-modifier 'control
(char-equal last-input-event ?\t)
@ -4575,6 +4574,10 @@ Falls back to normal file name handler if no tramp file name handler exists."
(char-equal last-input-event ?\ )))))
;; XEmacs
(and (featurep 'xemacs)
;; `last-input-event' might be nil.
(not (null last-input-event))
;; `last-input-event' may have no character approximation.
(funcall (symbol-function 'event-to-character) last-input-event)
(or
;; ?\t has event-modifier 'control
(char-equal
@ -4771,24 +4774,14 @@ remote host and localname (filename on remote host)."
(match-string (nth 1 structure) name)))
(if (and method (member method tramp-multi-methods))
;; Not handled (yet).
(make-tramp-file-name
:multi-method method
:method nil
:user nil
:host nil
:localname nil)
(vector method nil nil nil nil)
(let ((user (and (nth 2 structure)
(match-string (nth 2 structure) name)))
(host (and (nth 3 structure)
(match-string (nth 3 structure) name)))
(localname (and (nth 4 structure)
(match-string (nth 4 structure) name))))
(make-tramp-file-name
:multi-method nil
:method method
:user user
:host host
:localname localname)))))))
(vector nil method user host localname)))))))
;; This function returns all possible method completions, adding the
;; trailing method delimeter.
@ -5191,7 +5184,7 @@ USER the array of user names, HOST the array of host names."
(aref user i) (aref host i))
(format "%s@%s:" (aref method i) (aref host i)))
string-list))
(incf i))
(setq i (1+ i)))
(format "*%s/%s %s*"
prefix multi-method
(apply 'concat (reverse string-list)))))
@ -5928,7 +5921,7 @@ log in as u2 to h2."
;; is done here.
(funcall multi-func p m u h command)
(erase-buffer)
(incf i)))
(setq i (1+ i))))
(tramp-open-connection-setup-interactive-shell
p multi-method method user host)
(tramp-post-connection multi-method method user host)))))
@ -6824,7 +6817,8 @@ If `tramp-discard-garbage' is nil, just erase buffer."
(defun tramp-mode-string-to-int (mode-string)
"Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits."
(let* ((mode-chars (string-to-vector mode-string))
(let* (case-fold-search
(mode-chars (string-to-vector mode-string))
(owner-read (aref mode-chars 1))
(owner-write (aref mode-chars 2))
(owner-execute-or-setid (aref mode-chars 3))
@ -6836,45 +6830,61 @@ If `tramp-discard-garbage' is nil, just erase buffer."
(other-execute-or-sticky (aref mode-chars 9)))
(save-match-data
(logior
(case owner-read
(?r (tramp-octal-to-decimal "00400")) (?- 0)
(t (error "Second char `%c' must be one of `r-'" owner-read)))
(case owner-write
(?w (tramp-octal-to-decimal "00200")) (?- 0)
(t (error "Third char `%c' must be one of `w-'" owner-write)))
(case owner-execute-or-setid
(?x (tramp-octal-to-decimal "00100"))
(?S (tramp-octal-to-decimal "04000"))
(?s (tramp-octal-to-decimal "04100"))
(?- 0)
(t (error "Fourth char `%c' must be one of `xsS-'"
owner-execute-or-setid)))
(case group-read
(?r (tramp-octal-to-decimal "00040")) (?- 0)
(t (error "Fifth char `%c' must be one of `r-'" group-read)))
(case group-write
(?w (tramp-octal-to-decimal "00020")) (?- 0)
(t (error "Sixth char `%c' must be one of `w-'" group-write)))
(case group-execute-or-setid
(?x (tramp-octal-to-decimal "00010"))
(?S (tramp-octal-to-decimal "02000"))
(?s (tramp-octal-to-decimal "02010"))
(?- 0)
(t (error "Seventh char `%c' must be one of `xsS-'"
group-execute-or-setid)))
(case other-read
(?r (tramp-octal-to-decimal "00004")) (?- 0)
(t (error "Eighth char `%c' must be one of `r-'" other-read)))
(case other-write
(?w (tramp-octal-to-decimal "00002")) (?- 0)
(cond
((char-equal owner-read ?r) (tramp-octal-to-decimal "00400"))
((char-equal owner-read ?-) 0)
(t (error "Second char `%c' must be one of `r-'" owner-read)))
(cond
((char-equal owner-write ?w) (tramp-octal-to-decimal "00200"))
((char-equal owner-write ?-) 0)
(t (error "Third char `%c' must be one of `w-'" owner-write)))
(cond
((char-equal owner-execute-or-setid ?x)
(tramp-octal-to-decimal "00100"))
((char-equal owner-execute-or-setid ?S)
(tramp-octal-to-decimal "04000"))
((char-equal owner-execute-or-setid ?s)
(tramp-octal-to-decimal "04100"))
((char-equal owner-execute-or-setid ?-) 0)
(t (error "Fourth char `%c' must be one of `xsS-'"
owner-execute-or-setid)))
(cond
((char-equal group-read ?r) (tramp-octal-to-decimal "00040"))
((char-equal group-read ?-) 0)
(t (error "Fifth char `%c' must be one of `r-'" group-read)))
(cond
((char-equal group-write ?w) (tramp-octal-to-decimal "00020"))
((char-equal group-write ?-) 0)
(t (error "Sixth char `%c' must be one of `w-'" group-write)))
(cond
((char-equal group-execute-or-setid ?x)
(tramp-octal-to-decimal "00010"))
((char-equal group-execute-or-setid ?S)
(tramp-octal-to-decimal "02000"))
((char-equal group-execute-or-setid ?s)
(tramp-octal-to-decimal "02010"))
((char-equal group-execute-or-setid ?-) 0)
(t (error "Seventh char `%c' must be one of `xsS-'"
group-execute-or-setid)))
(cond
((char-equal other-read ?r)
(tramp-octal-to-decimal "00004"))
((char-equal other-read ?-) 0)
(t (error "Eighth char `%c' must be one of `r-'" other-read)))
(cond
((char-equal other-write ?w) (tramp-octal-to-decimal "00002"))
((char-equal other-write ?-) 0)
(t (error "Nineth char `%c' must be one of `w-'" other-write)))
(case other-execute-or-sticky
(?x (tramp-octal-to-decimal "00001"))
(?T (tramp-octal-to-decimal "01000"))
(?t (tramp-octal-to-decimal "01001"))
(?- 0)
(t (error "Tenth char `%c' must be one of `xtT-'"
other-execute-or-sticky)))))))
(cond
((char-equal other-execute-or-sticky ?x)
(tramp-octal-to-decimal "00001"))
((char-equal other-execute-or-sticky ?T)
(tramp-octal-to-decimal "01000"))
((char-equal other-execute-or-sticky ?t)
(tramp-octal-to-decimal "01001"))
((char-equal other-execute-or-sticky ?-) 0)
(t (error "Tenth char `%c' must be one of `xtT-'"
other-execute-or-sticky)))))))
(defun tramp-convert-file-attributes (multi-method method user host attr)
"Convert file-attributes ATTR generated by perl script or ls.
@ -6977,7 +6987,29 @@ Not actually used. Use `(format \"%o\" i)' instead?"
;; internal data structure. Convenience functions for internal
;; data structure.
(defstruct tramp-file-name multi-method method user host localname)
(defun tramp-file-name-p (obj)
"Check whether TRAMP-FILE-NAME is a Tramp object."
(and (vectorp obj) (= 5 (length obj))))
(defun tramp-file-name-multi-method (obj)
"Return MULTI-METHOD component of TRAMP-FILE-NAME."
(and (tramp-file-name-p obj) (aref obj 0)))
(defun tramp-file-name-method (obj)
"Return METHOD component of TRAMP-FILE-NAME."
(and (tramp-file-name-p obj) (aref obj 1)))
(defun tramp-file-name-user (obj)
"Return USER component of TRAMP-FILE-NAME."
(and (tramp-file-name-p obj) (aref obj 2)))
(defun tramp-file-name-host (obj)
"Return HOST component of TRAMP-FILE-NAME."
(and (tramp-file-name-p obj) (aref obj 3)))
(defun tramp-file-name-localname (obj)
"Return LOCALNAME component of TRAMP-FILE-NAME."
(and (tramp-file-name-p obj) (aref obj 4)))
(defun tramp-tramp-file-p (name)
"Return t iff NAME is a tramp file."
@ -7010,12 +7042,7 @@ localname (file name on remote host)."
(let ((user (match-string (nth 2 tramp-file-name-structure) name))
(host (match-string (nth 3 tramp-file-name-structure) name))
(localname (match-string (nth 4 tramp-file-name-structure) name)))
(make-tramp-file-name
:multi-method nil
:method method
:user (or user nil)
:host host
:localname localname))))))
(vector nil method (or user nil) host localname))))))
(defun tramp-find-default-method (user host)
"Look up the right method to use in `tramp-default-method-alist'."
@ -7055,7 +7082,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
(setq method (match-string method-index name))
(setq hops (match-string hops-index name))
(setq len (/ (length (match-data t)) 2))
(when (< localname-index 0) (incf localname-index len))
(when (< localname-index 0) (setq localname-index (+ localname-index len)))
(setq localname (match-string localname-index name))
(let ((index 0))
(while (string-match hop-regexp hops index)
@ -7066,12 +7093,12 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
(cons (match-string hop-user-index hops) hop-users))
(setq hop-hosts
(cons (match-string hop-host-index hops) hop-hosts))))
(make-tramp-file-name
:multi-method method
:method (apply 'vector (reverse hop-methods))
:user (apply 'vector (reverse hop-users))
:host (apply 'vector (reverse hop-hosts))
:localname localname)))
(vector
method
(apply 'vector (reverse hop-methods))
(apply 'vector (reverse hop-users))
(apply 'vector (reverse hop-hosts))
localname)))
(defun tramp-make-tramp-file-name (multi-method method user host localname)
"Constructs a tramp file name from METHOD, USER, HOST and LOCALNAME."
@ -7103,7 +7130,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
(let ((m (aref method i)) (u (aref user i)) (h (aref host i)))
(setq hops (concat hops (format-spec hop-format
`((?m . ,m) (?u . ,u) (?h . ,h)))))
(incf i)))
(setq i (1+ i))))
(concat prefix hops localname)))
(defun tramp-make-copy-program-file-name (user host localname)
@ -7218,7 +7245,7 @@ as default."
(assoc (tramp-find-method multi-method method user host)
tramp-methods))))
(if entry
(second entry)
(cadr entry)
(symbol-value param))))

View file

@ -30,7 +30,7 @@
;; are auto-frobbed from configure.ac, so you should edit that file and run
;; "autoconf && ./configure" to change them.
(defconst tramp-version "2.0.55"
(defconst tramp-version "2.0.56"
"This version of Tramp.")
(defconst tramp-bug-report-address "tramp-devel@gnu.org"

View file

@ -229,6 +229,8 @@
("Yahoo" .
[simple-query "www.yahoo.com" "search.yahoo.com/search?p=" ""])
("Yahoo: Reference" . "www.yahoo.com/Reference/")
("Wikipedia" .
[simple-query "wikipedia.org" "wikipedia.org/wiki/" ""])
;; Misc. general interest.
("Interactive Weather Information Network" . webjump-to-iwin)

View file

@ -4342,7 +4342,7 @@ catalog \('lib).")
(defvar idlwave-true-path-alist nil
"Like `idlwave-path-alist', but with true filenames.")
(defvar idlwave-routines nil
"Holds the combinded procedure/function/method routine-info.")
"Holds the combined procedure/function/method routine-info.")
(defvar idlwave-class-alist nil
"Holds the class names known to IDLWAVE.")
(defvar idlwave-class-history nil
@ -4846,7 +4846,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.")
;; Create a sysvar list entry from the xml parsed list.
(let* ((nameblock (nth 1 xml-entry))
(name (cdr (assq 'name nameblock)))
(sysvar (substring name (progn (string-match "^ *!" name)
(sysvar (substring name (progn (string-match "^ *!" name)
(match-end 0))))
(link (cdr (assq 'link nameblock)))
(params (cddr xml-entry))

View file

@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
(error "Pop-up menus do not work on this terminal"))
;; use the correct dictionary
(flyspell-accept-buffer-local-defs)
(or opoint (setq opoint (point-marker)))
(let ((cursor-location (point))
(word (flyspell-get-word nil)))
(if (consp word)
@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
;;*---------------------------------------------------------------------*/
(defun flyspell-emacs-popup (event poss word)
"The Emacs popup menu."
(unless window-system
(error "This command requires pop-up dialogs"))
(if (not event)
(let* ((mouse-pos (mouse-position))
(mouse-pos (if (nth 1 mouse-pos)

View file

@ -896,16 +896,19 @@ With prefix argument ARG, repeat this ARG times."
;; Show preceding or following hidden tag, depending of cursor direction.
(let ((inhibit-point-motion-hooks t))
(save-excursion
(message "Invisible tag: %s"
;; Strip properties, otherwise, the text is invisible.
(buffer-substring-no-properties
(point)
(if (or (and (> x y)
(not (eq (following-char) ?<)))
(and (< x y)
(eq (preceding-char) ?>)))
(backward-list)
(forward-list)))))))
(condition-case nil
(message "Invisible tag: %s"
;; Strip properties, otherwise, the text is invisible.
(buffer-substring-no-properties
(point)
(if (or (and (> x y)
(not (eq (following-char) ?<)))
(and (< x y)
(eq (preceding-char) ?>)))
(backward-list)
(forward-list))))
(error nil)))))
(defun sgml-validate (command)

View file

@ -5333,21 +5333,25 @@ instead of the current buffer and returns the OBJECT."
(defun table--point-entered-cell-function (&optional old-point new-point)
"Point has entered a cell.
Refresh the menu bar."
(unless table-cell-entered-state
(setq table-cell-entered-state t)
(setq table-mode-indicator t)
(force-mode-line-update)
(table--warn-incompatibility)
(run-hooks 'table-point-entered-cell-hook)))
;; Avoid calling point-motion-hooks recursively.
(let ((inhibit-point-motion-hooks t))
(unless table-cell-entered-state
(setq table-cell-entered-state t)
(setq table-mode-indicator t)
(force-mode-line-update)
(table--warn-incompatibility)
(run-hooks 'table-point-entered-cell-hook))))
(defun table--point-left-cell-function (&optional old-point new-point)
"Point has left a cell.
Refresh the menu bar."
(when table-cell-entered-state
(setq table-cell-entered-state nil)
(setq table-mode-indicator nil)
(force-mode-line-update)
(run-hooks 'table-point-left-cell-hook)))
;; Avoid calling point-motion-hooks recursively.
(let ((inhibit-point-motion-hooks t))
(when table-cell-entered-state
(setq table-cell-entered-state nil)
(setq table-mode-indicator nil)
(force-mode-line-update)
(run-hooks 'table-point-left-cell-hook))))
(defun table--warn-incompatibility ()
"If called from interactive operation warn the know incompatibilities.

View file

@ -1,3 +1,9 @@
2007-05-29 Chong Yidong <cyd@stupidchicken.com>
* url-mailto.el (url-mailto): Insert body after
mail-header-separator if present, so that it is before signature.
Suggested by Leo <sdl.web@gmail.com>.
2007-04-15 Chong Yidong <cyd@stupidchicken.com>
* url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes.

View file

@ -100,7 +100,9 @@
(while args
(if (string= (caar args) "body")
(progn
(goto-char (point-max))
(goto-char (point-min))
(or (search-forward (concat "\n" mail-header-separator "\n") nil t)
(goto-char (point-max)))
(insert (mapconcat
#'(lambda (string)
(replace-regexp-in-string "\r\n" "\n" string))

View file

@ -325,7 +325,7 @@ If WITNESS if not found, return nil, otherwise return the root."
;; to another user. This should save us from looking in
;; things like /net and /afs. This assumes that all the
;; files inside a project belong to the same user.
(not (equal user (file-attributes file)))
(not (equal user (nth 2 (file-attributes file))))
(string-match vc-ignore-dir-regexp file)))
(if (file-exists-p (expand-file-name witness file))
(setq root file)

View file

@ -131,6 +131,21 @@
(+ c #x8000000 128)
c)))
(defun xterm-mouse-truncate-wrap (f)
"Truncate with wrap-around."
(condition-case nil
;; First try the built-in truncate, in case there's no overflow.
(truncate f)
;; In case of overflow, do wraparound by hand.
(range-error
;; In our case, we wrap around every 3 days or so, so if we assume
;; a maximum of 65536 wraparounds, we're safe for a couple years.
;; Using a power of 2 makes rounding errors less likely.
(let* ((maxwrap (* 65536 2048))
(dbig (truncate (/ f maxwrap)))
(fdiff (- f (* 1.0 maxwrap dbig))))
(+ (truncate fdiff) (* maxwrap dbig))))))
(defun xterm-mouse-event ()
"Convert XTerm mouse event to Emacs mouse event."
(let* ((type (- (xterm-mouse-event-read) #o40))
@ -138,12 +153,12 @@
(y (- (xterm-mouse-event-read) #o40 1))
;; Emulate timestamp information. This is accurate enough
;; for default value of mouse-1-click-follows-link (450msec).
(timestamp (truncate
(* 1000
(- (float-time)
(or xt-mouse-epoch
(setq xt-mouse-epoch (float-time)))))))
(mouse (intern
(timestamp (xterm-mouse-truncate-wrap
(* 1000
(- (float-time)
(or xt-mouse-epoch
(setq xt-mouse-epoch (float-time)))))))
(mouse (intern
;; For buttons > 3, the release-event looks
;; differently (see xc/programs/xterm/button.c,
;; function EditorButton), and there seems to come in
@ -243,5 +258,5 @@ down the SHIFT key while pressing the mouse button."
(provide 'xt-mouse)
;;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03
;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03
;;; xt-mouse.el ends here

View file

@ -1,3 +1,9 @@
2007-05-30 Nick Roberts <nickrob@snap.net.nz>
* commands.texi (Click Events): Layout more logically. Describe
width and height.
(Drag Events, Motion Events): Update to new format for position.
2007-05-12 Richard Stallman <rms@gnu.org>
* text.texi (Margins): indent-to-left-margin is not the default.

View file

@ -1196,12 +1196,7 @@ describe events by their types; thus, if there is a key binding for
@item @var{position}
This is the position where the mouse click occurred. The actual
format of @var{position} depends on what part of a window was clicked
on. The various formats are described below.
@item @var{click-count}
This is the number of rapid repeated presses so far of the same mouse
button. @xref{Repeat Events}.
@end table
on.
For mouse click events in the text area, mode line, header line, or in
the marginal areas, @var{position} has this form:
@ -1223,6 +1218,12 @@ which the click occurred. It is one of the symbols @code{mode-line},
@code{header-line}, @code{vertical-line}, @code{left-margin},
@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
In one special case, @var{pos-or-area} is a list containing a symbol (one
of the symbols listed above) instead of just the symbol. This happens
after the imaginary prefix keys for the event are inserted into the
input stream. @xref{Key Sequence Input}.
@item @var{x}, @var{y}
These are the pixel-denominated coordinates of the click, relative to
the top left corner of @var{window}, which is @code{(0 . 0)}.
@ -1238,6 +1239,7 @@ This is the object on which the click occurred. It is either
(@var{string} . @var{string-pos}) when there is a string-type text
property at the click position.
@table @asis
@item @var{string}
This is the string on which the click occurred, including any
properties.
@ -1245,6 +1247,7 @@ properties.
@item @var{string-pos}
This is the position in the string on which the click occurred,
relevant if properties at the click need to be looked up.
@end table
@item @var{text-pos}
For clicks on a marginal area or on a fringe, this is the buffer
@ -1267,8 +1270,12 @@ These are the pixel-denominated coordinates of the click, relative to
the top left corner of @var{object}, which is @code{(0 . 0)}. If
@var{object} is @code{nil}, the coordinates are relative to the top
left corner of the character glyph clicked on.
@end table
@item @var{width}, @var{height}
These are the pixel-denominated width and height of @var{object}.
@end table
@sp 1
For mouse clicks on a scroll-bar, @var{position} has this form:
@example
@ -1299,10 +1306,10 @@ of the symbols @code{above-handle}, @code{handle}, @code{below-handle},
@code{up}, @code{down}, @code{top}, @code{bottom}, and @code{end-scroll}.
@end table
In one special case, @var{buffer-pos} is a list containing a symbol (one
of the symbols listed above) instead of just the symbol. This happens
after the imaginary prefix keys for the event are inserted into the
input stream. @xref{Key Sequence Input}.
@item @var{click-count}
This is the number of rapid repeated presses so far of the same mouse
button. @xref{Repeat Events}.
@end table
@node Drag Events
@subsection Drag Events
@ -1318,19 +1325,18 @@ position and the final position, like this:
@example
(@var{event-type}
(@var{window1} @var{buffer-pos1} (@var{x1} . @var{y1}) @var{timestamp1})
(@var{window2} @var{buffer-pos2} (@var{x2} . @var{y2}) @var{timestamp2})
@var{click-count})
(@var{window1} START-POSITION)
(@var{window2} END-POSITION))
@end example
For a drag event, the name of the symbol @var{event-type} contains the
prefix @samp{drag-}. For example, dragging the mouse with button 2 held
down generates a @code{drag-mouse-2} event. The second and third
elements of the event give the starting and ending position of the drag.
Aside from that, the data have the same meanings as in a click event
(@pxref{Click Events}). You can access the second element of any mouse
event in the same way, with no need to distinguish drag events from
others.
prefix @samp{drag-}. For example, dragging the mouse with button 2
held down generates a @code{drag-mouse-2} event. The second and third
elements of the event give the starting and ending position of the
drag. They have the same form as @var{position} in a click event
(@pxref{Click Events}) that is not on the scroll bar part of the
window. You can access the second element of any mouse event in the
same way, with no need to distinguish drag events from others.
The @samp{drag-} prefix follows the modifier key prefixes such as
@samp{C-} and @samp{M-}.
@ -1470,7 +1476,7 @@ of the mouse without any button activity. Mouse motion events are
represented by lists that look like this:
@example
(mouse-movement (@var{window} @var{buffer-pos} (@var{x} . @var{y}) @var{timestamp}))
(mouse-movement (POSITION))
@end example
The second element of the list describes the current position of the

View file

@ -1,3 +1,14 @@
2007-05-28 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.0.56.
* tramp.texi (Frequently Asked Questions): Improve ~/.zshrc
settings. Reported by Ted Zlatanov <tzz@lifelogs.com>.
2007-05-26 Michael Olson <mwolson@gnu.org>
* erc.texi (Modules): Fix references to completion modules.
2007-05-09 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Running NNDiary): Use ~/.gnus.el instead of gnusrc.

View file

@ -564,7 +564,8 @@ Buttonize URLs, nicknames, and other text
Mark unidentified users on freenode and other servers supporting CAPAB.
@cindex modules, completion
@item pcomplete
@cindex modules, pcomplete
@item completion (aka pcomplete)
Complete nicknames and commands (programmable)
@cindex modules, fill
@ -572,7 +573,7 @@ Complete nicknames and commands (programmable)
Wrap long lines
@cindex modules, hecomplete
@item completion
@item hecomplete
Complete nicknames and commands (old). This is the old module---you
might prefer the ``completion'' module instead.

View file

@ -2051,7 +2051,11 @@ setting the regular expression detecting the prompt.
A special problem is the zsh, which uses left-hand side and right-hand
side prompts in parallel. Therefore, it is necessary to disable the
zsh line editor on the remote host. You shall add to @file{~/.zshrc}
the following command: @command{[ $TERM = "dumb" ] && unsetopt zle}.
the following command:
@example
[ $TERM = "dumb" ] && unsetopt zle && PS1='$ '
@end example
@item
@value{tramp} doesn't transfer strings with more than 500 characters

View file

@ -9,7 +9,7 @@
@c In the Tramp CVS, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.0.55
@set trampver 2.0.56
@c Other flags from configuration
@set prefix /usr/local

View file

@ -1,38 +1,152 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
scriptversion=2006-05-11.19
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
if test -d "$file"; then
shift
else
break
fi
done
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
case $# in
0) exit 0 ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
(mkdir "$pathcomp" && chmod a+rx "$pathcomp") || lasterr=$?
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
for d
do
test "x$d" = x && continue
pathcomp="$pathcomp/"
done
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# mkinstalldirs ends here

View file

@ -1,3 +1,7 @@
2007-05-30 Ulrich Mueller <ulm@gentoo.org> (tiny change)
* XMakeAssoc.c (XMakeAssoc): Use malloc rather than xmalloc.
2007-02-27 Glenn Morris <rgm@gnu.org>
* Imakefile: Remove unused file with no explicit legal info.

View file

@ -81,7 +81,7 @@ XMakeAssoc(dpy, table, x_id, data)
/* If we are here then the new entry should be inserted just */
/* before the current value of "Entry". */
/* Create a new XAssoc and load it with new provided data. */
new_entry = (XAssoc *) xmalloc(sizeof(XAssoc));
new_entry = (XAssoc *) malloc(sizeof(XAssoc));
new_entry->display = dpy;
new_entry->x_id = x_id;
new_entry->data = data;

View file

@ -1,8 +1,30 @@
2007-05-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* xdisp.c (redisplay_internal): Bind inhibit-point-motion-hooks to t
around current_column call.
2007-05-26 Dan Nicolaescu <dann@ics.uci.edu>
* xfaces.c (syms_of_xfaces): Delete stray semicolon.
* xdisp.c (next_element_from_buffer):
* window.c (delete_window):
* term.c (term_mouse_highlight):
* msdos.c (getdefdir):
* macterm.c (mac_create_bitmap_from_bitmap_data)
(init_font_name_table):
* fns.c (Fsxhash):
* data.c (Fmake_local_variable):
* ccl.c (ccl_driver): Likewise.
2007-05-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event):
Call mac_wakeup_from_rne on window size change.
2007-05-25 Chong Yidong <cyd@stupidchicken.com>
* image.c (uncache_image): Fix typo.
2007-05-23 Johannes Weiner <hannes@saeurebad.de> (tiny change)
* keyboard.c (make_lispy_movement): Condition on HAVE_GPM too.

View file

@ -1261,7 +1261,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
case CCL_MOD: reg[rrr] = i % j; break;
case CCL_AND: reg[rrr] = i & j; break;
case CCL_OR: reg[rrr] = i | j; break;
case CCL_XOR: reg[rrr] = i ^ j;; break;
case CCL_XOR: reg[rrr] = i ^ j; break;
case CCL_LSH: reg[rrr] = i << j; break;
case CCL_RSH: reg[rrr] = i >> j; break;
case CCL_LSH8: reg[rrr] = (i << 8) | j; break;

View file

@ -1587,7 +1587,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
XBUFFER_LOCAL_VALUE (newval)->found_for_frame = 0;
XBUFFER_LOCAL_VALUE (newval)->check_frame = 0;
XBUFFER_LOCAL_VALUE (newval)->cdr = tem;
SET_SYMBOL_VALUE (variable, newval);;
SET_SYMBOL_VALUE (variable, newval);
}
/* Make sure this buffer has its own value of symbol. */
tem = Fassq (variable, current_buffer->local_var_alist);

View file

@ -5215,7 +5215,7 @@ DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0,
(obj)
Lisp_Object obj;
{
unsigned hash = sxhash (obj, 0);;
unsigned hash = sxhash (obj, 0);
return make_number (hash);
}

View file

@ -1795,6 +1795,13 @@ before calling this function on it, like this.
Fselect_frame (frame);
mouse_moveto (XINT (x), XINT (y));
}
#else
#ifdef HAVE_GPM
{
Fselect_frame (frame);
term_mouse_moveto (XINT (x), XINT (y));
}
#endif
#endif
#endif

View file

@ -1639,7 +1639,7 @@ uncache_image (f, spec)
Lisp_Object spec;
{
struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
struct image *img = IMAGE_FROM_ID (f, lookup_image (f, spec));
struct image *img;
unsigned hash = sxhash (spec, 0);
int i = hash % IMAGE_CACHE_BUCKETS_SIZE;

View file

@ -736,7 +736,7 @@ mac_create_bitmap_from_bitmap_data (bitmap, bits, w, h)
/* Bitswap XBM bytes to match how Mac does things. */
unsigned char c = *bits++;
*p++ = (unsigned char)((swap_nibble[c & 0xf] << 4)
| (swap_nibble[(c>>4) & 0xf]));;
| (swap_nibble[(c>>4) & 0xf]));
}
}
@ -7553,7 +7553,7 @@ init_font_name_table ()
make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE),
make_float (DEFAULT_REHASH_SIZE),
make_float (DEFAULT_REHASH_THRESHOLD),
Qnil, Qnil, Qnil);;
Qnil, Qnil, Qnil);
h = XHASH_TABLE (atsu_font_id_hash);
err = ATSUFontCount (&nfonts);

View file

@ -1584,7 +1584,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
{
extern Lisp_Object Qmouse_face;
Lisp_Object mouse_face, overlay, position, *overlay_vec;
int noverlays, obegv, ozv;;
int noverlays, obegv, ozv;
struct buffer *obuf;
/* If we get an out-of-range value, return now; avoid an error. */
@ -4071,7 +4071,7 @@ getdefdir (drive, dst)
int drive;
char *dst;
{
char in_path[4], *p = in_path, e = errno;;
char in_path[4], *p = in_path, e = errno;
/* Generate "X:." (when drive is X) or "." (when drive is 0). */
if (drive != 0)

View file

@ -1751,7 +1751,7 @@ init_sys_modes (tty_out)
if (term_gpm)
{
fcntl (gpm_fd, F_SETOWN, getpid ());
fcntl (gpm_fd, F_SETFL, O_NONBLOCK);
fcntl (gpm_fd, F_SETFL, fcntl (gpm_fd, F_GETFL, 0) | O_NONBLOCK);
init_sigio (gpm_fd);
}
#endif /* HAVE_GPM */

View file

@ -205,7 +205,7 @@ int gpm_tty;
static int mouse_face_beg_row, mouse_face_beg_col;
static int mouse_face_end_row, mouse_face_end_col;
static int mouse_face_past_end;
static Lisp_Object mouse_face_window;
static Lisp_Object Qmouse_face_window;
static int mouse_face_face_id;
/* FRAME and X, Y position of mouse when last checked for
@ -2344,10 +2344,23 @@ the currently selected frame. */)
***********************************************************************/
#ifdef HAVE_GPM
void term_mouse_moveto (int x, int y)
{
const char *name;
int fd;
name = (const char *) ttyname (0);
fd = open (name, O_WRONLY);
/* TODO: how to set mouse position?
SOME_FUNCTION (x, y, fd); */
close (fd);
last_mouse_x = x;
last_mouse_y = y;
}
static void
term_show_mouse_face (enum draw_glyphs_face draw)
{
struct window *w = XWINDOW (mouse_face_window);
struct window *w = XWINDOW (Qmouse_face_window);
int save_x, save_y;
int i, j;
@ -2426,12 +2439,12 @@ term_show_mouse_face (enum draw_glyphs_face draw)
static void
term_clear_mouse_face ()
{
if (!NILP (mouse_face_window))
if (!NILP (Qmouse_face_window))
term_show_mouse_face (DRAW_NORMAL_TEXT);
mouse_face_beg_row = mouse_face_beg_col = -1;
mouse_face_end_row = mouse_face_end_col = -1;
mouse_face_window = Qnil;
Qmouse_face_window = Qnil;
}
/* Find the glyph matrix position of buffer position POS in window W.
@ -2532,7 +2545,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
if (!WINDOWP (window))
return;
if (!EQ (window, mouse_face_window))
if (!EQ (window, Qmouse_face_window))
term_clear_mouse_face ();
w = XWINDOW (window);
@ -2590,7 +2603,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
{
extern Lisp_Object Qmouse_face;
Lisp_Object mouse_face, overlay, position, *overlay_vec;
int noverlays, obegv, ozv;;
int noverlays, obegv, ozv;
struct buffer *obuf;
/* If we get an out-of-range value, return now; avoid an error. */
@ -2615,7 +2628,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
noverlays = sort_overlays (overlay_vec, noverlays, w);
/* Check mouse-face highlighting. */
if (!(EQ (window, mouse_face_window)
if (!(EQ (window, Qmouse_face_window)
&& y >= mouse_face_beg_row
&& y <= mouse_face_end_row
&& (y > mouse_face_beg_row
@ -2665,7 +2678,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
= !fast_find_position (w, XFASTINT (after),
&mouse_face_end_col,
&mouse_face_end_row);
mouse_face_window = window;
Qmouse_face_window = window;
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
@ -2700,7 +2713,7 @@ term_mouse_highlight (struct frame *f, int x, int y)
= !fast_find_position (w, XFASTINT (after),
&mouse_face_end_col,
&mouse_face_end_row);
mouse_face_window = window;
Qmouse_face_window = window;
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
@ -2787,33 +2800,31 @@ term_mouse_movement (FRAME_PTR frame, Gpm_Event *event)
Set *time to the time the mouse was at the returned position.
This should clear mouse_moved until the next motion
event arrives.
NOT CURRENTLY INVOKED: see mouse_position_hook below. */
event arrives. */
static void
term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
enum scroll_bar_part *part, Lisp_Object *x,
Lisp_Object *y, unsigned long *time)
{
Gpm_Event event;
struct timeval now;
int i;
BLOCK_INPUT;
Lisp_Object frame, window;
struct window *w;
*fp = SELECTED_FRAME ();
(*fp)->mouse_moved = 0;
*bar_window = Qnil;
*part = 0;
i = Gpm_GetSnapshot (&event);
XSETINT (*x, last_mouse_x);
XSETINT (*y, last_mouse_y);
XSETFRAME (frame, *fp);
window = Fwindow_at (*x, *y, frame);
XSETINT (*x, event.x);
XSETINT (*y, event.y);
XSETINT (*x, last_mouse_x - WINDOW_LEFT_EDGE_COL (XWINDOW (window)));
XSETINT (*y, last_mouse_y - WINDOW_TOP_EDGE_LINE (XWINDOW (window)));
gettimeofday(&now, 0);
*time = (now.tv_sec * 1000) + (now.tv_usec / 1000);
UNBLOCK_INPUT;
}
/* Prepare a mouse-event in *RESULT for placement in the input queue.
@ -2912,7 +2923,7 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct in
name = (const char *) ttyname (0);
fd = open (name, O_WRONLY);
ioctl (fd, TIOCLINUX, buf + sizeof (short) - 1);
close(fd);
close (fd);
term_mouse_movement (f, event);
@ -2927,7 +2938,6 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct in
else {
f->mouse_moved = 0;
term_mouse_click (&ie, event, f);
//kbd_buffer_store_event_hold (&ie, hold_quit);
}
done:
@ -3259,11 +3269,8 @@ init_tty (char *name, char *terminal_type, int must_succeed)
encode_terminal_bufsize = 0;
#ifdef HAVE_GPM
/* TODO: Can't get Gpm_Snapshot in term_mouse_position to work: test with
(mouse-position). Also set-mouse-position won't work as is. */
/* mouse_position_hook = term_mouse_position; */
mouse_face_window = Qnil;
mouse_position_hook = term_mouse_position;
Qmouse_face_window = Qnil;
#endif
#ifdef WINDOWSNT
@ -3899,6 +3906,8 @@ bigger, or it may make it blink, or it may do nothing at all. */);
#ifdef HAVE_GPM
defsubr (&Sterm_open_connection);
defsubr (&Sterm_close_connection);
staticpro (&Qmouse_face_window);
#endif /* HAVE_GPM */
}

View file

@ -297,6 +297,7 @@ enum {
#ifdef HAVE_GPM
#include <gpm.h>
extern int handle_one_term_event (struct tty_display_info *, Gpm_Event *, struct input_event *);
extern void term_mouse_moveto (int, int);
/* Nonzero means mouse is enabled on Linux console */
extern int term_gpm;

View file

@ -1534,7 +1534,7 @@ delete_window (window)
if (!EQ (window, pwindow))
break;
/* Otherwise, try another window for SWINDOW. */
swindow = Fnext_window (swindow, Qlambda, Qnil);;
swindow = Fnext_window (swindow, Qlambda, Qnil);
/* If we get back to the frame's selected window,
it means there was no acceptable alternative,

View file

@ -6256,7 +6256,7 @@ next_element_from_buffer (it)
it->c = *p, it->len = 1;
/* Record what we have and where it came from. */
it->what = IT_CHARACTER;;
it->what = IT_CHARACTER;
it->object = it->w->buffer;
it->position = it->current.pos;
@ -10840,7 +10840,7 @@ redisplay_internal (preserve_echo_area)
int must_finish = 0;
struct text_pos tlbufpos, tlendpos;
int number_of_visible_frames;
int count;
int count, count1;
struct frame *sf;
int polling_stopped_here = 0;
@ -10978,6 +10978,10 @@ redisplay_internal (preserve_echo_area)
update_mode_lines++;
}
/* Avoid invocation of point motion hooks by `current_column' below. */
count1 = SPECPDL_INDEX ();
specbind (Qinhibit_point_motion_hooks, Qt);
/* If %c is in the mode line, update it if needed. */
if (!NILP (w->column_number_displayed)
/* This alternative quickly identifies a common case
@ -10989,6 +10993,8 @@ redisplay_internal (preserve_echo_area)
!= (int) current_column ())) /* iftc */
w->update_mode_line = Qt;
unbind_to (count1, Qnil);
FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1;
/* The variable buffer_shared is set in redisplay_window and

View file

@ -8010,7 +8010,7 @@ syms_of_xfaces ()
staticpro (&QCforeground);
QCbackground = intern (":background");
staticpro (&QCbackground);
QCstipple = intern (":stipple");;
QCstipple = intern (":stipple");
staticpro (&QCstipple);
QCwidth = intern (":width");
staticpro (&QCwidth);