diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2007-01-13 22:59:28 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2007-01-13 22:59:28 +0000 |
commit | 38db5c8d522cc1faa8190e77dbc932a5560e6aad (patch) | |
tree | efe4c81d7210843bb208282461ebce12c5bd3daf | |
parent | 191ae1cf7cd2571277635b3b8e488e773ca5c9b9 (diff) | |
parent | b4ec8cb4e66f94547e8215a1c1eb6cda3b83ca63 (diff) | |
download | emacs-38db5c8d522cc1faa8190e77dbc932a5560e6aad.tar.gz emacs-38db5c8d522cc1faa8190e77dbc932a5560e6aad.tar.bz2 emacs-38db5c8d522cc1faa8190e77dbc932a5560e6aad.zip |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-592
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-593
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-594
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-595
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-596
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-597
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-598
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-186
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-187
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-188
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-189
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-190
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-191
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-593
50 files changed, 864 insertions, 425 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 428b2589886..64163176bbb 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -86,15 +86,15 @@ through the custom mechanism. ** dooglus@gmail.com, Dec 29: 4 week-old pretest bugs Two GTK version bugs. -** pgg bugs reported by rms. - -** (global-set-key "\M-k" 'bury-buffer) confuses tutorial warnings. - ** jpff@cs.bath.ac.uk, Jan 5: Failure to submit second netnews message ** KSNetz@UseNet.ArcorNews.DE, Jan 5: url-http.el: calling the callback function for proxy connections +** simon.marshall@misys.com, Jan 9: Possible mouse-face redisplay glitch + +** dooglus@gmail.com, Jan 10: problem with transparent PNG image display + * DOCUMENTATION ** Check the Emacs Tutorial. diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server index e351d025309..67d8e7919ce 100644 --- a/admin/nt/README-ftp-server +++ b/admin/nt/README-ftp-server @@ -88,44 +88,25 @@ leim-21.3-src.tar.gz -* Distributions in multi-file .zip format - - A second distribution in the form of multiple small .zip files is also - provided, for the benefit of people who have unreliable internet - connections, or who need to copy the distribution onto floppy disks: - - em213b*.zip - - This is equivalent to getting emacs-21.3-bin-i386.tar.gz above. - The lisp source is available as em213l*.zip. - - * Distributions for non-x86 platforms - I try to make this port available for all platforms supported by - Windows (it should build on all supported Windows NT/9x platforms). - However, I do not always have access to non-x86 platforms, and so I - cannot guarantee to provide precompiled distributions for the other - platforms myself. If you find there are no binaries for your - platform, and you have access to a Microsoft compiler, then you can - download the source and compile Emacs yourself (and, if you do, please - consider contributing your executables; send me mail and we can make - arrangements for making them available on this ftp server.) - + Distributions for non-x86 platforms are no longer supplied. Older + platforms supported by Windows NT no longer seem to be in demand, + and Emacs is yet to be ported to 64bit Windows platforms. If you are + willing to help port Emacs to 64bit versions of Windows, your + contribution will be welcome on the emacs-devel mailing list. * Unpacking distributions - Programs for handling the distribution file formats can be found in - the utilities directory: + Ports of GNU gzip and GNU tar for handling the distribution file + formats can be found in several places that distribute ports of GNU + programs, for example: - http://mirrors.sunsite.dk/gnu/windows/emacs/utilities/ + Cygwin: http://www.cygwin.com/ + GnuWin32: http://gnuwin32.sourceforge.net/ - For gzipped tar files, you will need either gunzip.exe and tar.exe - together, or djtarnt.exe. djtarnt.exe can also unpack .zip files. I - strongly urge you to use these utilities since they were the ones used - to create the distributions; the most common problem people have in - trying to get Emacs to run is due to some other utility program - corrupting the distribution while unpacking. + Many other popular file compression utilities for Windows are also + able to handle gzipped tar files. Open a command prompt (MSDOS) window. Decide on a directory in which to place Emacs. Move the distribution to that directory, and then @@ -151,25 +132,10 @@ You may be prompted to rename or overwrite directories when using djtarnt: simply type return to continue (this is harmless). - If you have the multi-file .zip distribution, use djtarnt to unpack - all of the .zip files: - - % djtarnt -x *.zip - Once you have unpacked a precompiled distribution of Emacs, it should have the following subdirectories: - bin etc info lisp lock site-lisp - - If your utility failed to create the lock directory, then you can - simply create it by hand (it is initially empty). - - One final step is needed only when installing from the multi-file .zip - distribution, in order to recreate emacs.exe from its fragments (it is - too big to fit on a floppy even when zipped): - - % cd emacs-21.3\bin - % stitch + bin etc info lisp site-lisp * Unpacking with other tools @@ -178,9 +144,9 @@ the following to be sure the distribution was not corrupted: + Be sure to disable the CR/LF translation or the executables will be - unusable. Older versions of WinZipNT would enable this translation - by default. If you are using WinZipNT, disable it. (I don't have - WinZipNT myself, and I do not know the specific commands necessary + unusable. Older versions of WinZip would enable this translation + by default. If you are using WinZip, disable it. (I don't have + WinZip myself, and I do not know the specific commands necessary to disable it.) + Check that filenames were not truncated to 8.3. For example, there @@ -188,12 +154,9 @@ abbrevli.el, your distribution has been corrupted while unpacking and Emacs will not start. - + I've been told that some utilities (WinZip again?) don't create the - lock subdirectory. The lock subdirectory needs to be created. - - + I've also had reports that the "gnu-win32" port of tar corrupts the - executables. Use the version of tar or djtarnt in the utilities - directory instead. + + I've also had reports that some older "gnuwin32" port of tar + corrupts the executables. Use the latest version from the gnuwin32 + site or another port of tar instead. If you believe you have unpacked the distributions correctly and are still encountering problems, see the section on Further Information @@ -204,11 +167,12 @@ If you would like to compile Emacs from source, download the source distribution, unpack it in the same manner as a precompiled - distribution, and look in the file nt/INSTALL for detailed directions. - You can either use the Microsoft compiler included with Visual C++, or - GCC 2.95 or later with MinGW support, to compile the source. The port - of GCC included in Cygwin is supported, but check the nt/INSTALL file - if you have trouble since some builds of GNU make aren't supported. + distribution, and look in the file nt/INSTALL for detailed + directions. You can either use the Microsoft compiler included with + Visual C++ 2003 or earlier, or GCC 2.95 or later with MinGW support, + to compile the source. The port of GCC included in Cygwin is + supported, but check the nt/INSTALL file if you have trouble since + some builds of GNU make aren't supported. * Further information @@ -250,5 +214,8 @@ Enjoy! - Andrew Innes - (andrewi@gnu.org) + Jason Rumney + (jasonr@gnu.org) + + Most of this README was contributed by former maintainer Andrew Innes + (andrewi@gnu.org)
\ No newline at end of file diff --git a/etc/ChangeLog b/etc/ChangeLog index a4fcc77a887..c8b7a2ec1a9 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,4 +1,4 @@ -2006-06-30 Francesco Potort,Al(B <pot@gnu.org> +2007-01-02 Francesco Potort,Al(B <pot@gnu.org> * etags.1: Undocument the --no-warn option. @@ -512,7 +512,7 @@ hyperlinks for variables without variable documentation, unless preceded by one of the words `variable' or `option'. It now makes hyperlinks to Info anchors (or nodes) if the anchor (or node) name is enclosed in single quotes and preceded by `info anchor' or `Info -anchor' (in addition to earlier `info node' and `Info node'). In +anchor' (in addition to earlier `info node' and `Info node'). In addition, it now makes hyperlinks to URLs as well if the URL is enclosed in single quotes and preceded by `URL'. @@ -778,7 +778,7 @@ parts less visible than normal, so that the rest of the differing parts is, by contrast, slightly highlighted. Above fontification is always done when listing completions is -triggered at minibuffer. If you want to fontify completions whose +triggered at minibuffer. If you want to fontify completions whose listing is triggered at the other normal buffer, you have to pass the common prefix of completions to `display-completion-list' as its second argument. @@ -1666,8 +1666,8 @@ on the mode line, header line and display margin, when run in an xterm. --- *** Improved key bindings support when running in an xterm. -When emacs is running in an xterm more key bindings are available. The -following should work: +When emacs is running in an xterm more key bindings are available. +The following should work: {C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}. These key bindings work on xterm from X.org 6.8, they might not work on some older versions of xterm, or on some proprietary versions. @@ -2032,7 +2032,7 @@ boundaries during scrolling. +++ ** The file t-mouse.el is now part of Emacs and provides access to mouse events from the console. It still requires gpm to work but has been updated -for Emacs 22. In particular, the mode-line is now position sensitive. +for Emacs 22. In particular, the mode-line is now position sensitive. * Changes in Specialized Modes and Packages in Emacs 22.1: @@ -2047,7 +2047,7 @@ is similar to the way sequential output to a terminal works.) +++ *** Bindings for Tumme added Several new keybindings, all starting with the C-t prefix, have been -added to Dired. They are all bound to commands in Tumme. As a starting +added to Dired. They are all bound to commands in Tumme. As a starting point, mark some image files in a dired buffer and do C-t d to display thumbnails of them in a separate buffer. @@ -2696,7 +2696,7 @@ C-c C-i b, and so on. ** Fortran mode changes: --- -*** Fortran mode does more font-locking by default. Use level 3 +*** Fortran mode does more font-locking by default. Use level 3 highlighting for the old default. +++ @@ -2890,7 +2890,7 @@ extracting the content of a BibTeX field. *** The variables `bibtex-autokey-name-case-convert' and `bibtex-autokey-titleword-case-convert' have been renamed to `bibtex-autokey-name-case-convert-function' and -`bibtex-autokey-titleword-case-convert-function'. The old names are +`bibtex-autokey-titleword-case-convert-function'. The old names are still available as aliases. ** In Artist mode the variable `artist-text-renderer' has been @@ -3104,13 +3104,13 @@ feature. +++ *** When comparing directories. Typing D brings up a buffer that lists the differences between the contents of -directories. Now it is possible to use this buffer to copy the missing files +directories. Now it is possible to use this buffer to copy the missing files from one directory to another. +++ *** When comparing files or buffers. Typing the = key now offers to perform the word-by-word comparison of the -currently highlighted regions in an inferior Ediff session. If you answer 'n' +currently highlighted regions in an inferior Ediff session. If you answer 'n' then it reverts to the old behavior and asks the user to select regions for comparison. @@ -3211,6 +3211,10 @@ be used (only once) in place of a file name on the command line. Etags reads from standard input and marks the produced tags as belonging to the file FILE. +** Ctags changes. + +*** Ctags now allows duplicate tags + ** VC Changes +++ @@ -3344,7 +3348,7 @@ appointments, paydays or anything else using a sexp. +++ *** The new function `calendar-goto-day-of-year' (g D) prompts for a -year and day number, and moves to that date. Negative day numbers +year and day number, and moves to that date. Negative day numbers count backward from the end of the year. +++ @@ -3359,7 +3363,7 @@ window generated by the function `generate-calendar-window'. --- *** The functions `holiday-easter-etc' and `holiday-advent' now take optional arguments, in order to only report on the specified holiday -rather than all. This makes customization of variables such as +rather than all. This makes customization of variables such as `christian-holidays' simpler. --- @@ -3719,7 +3723,7 @@ See the Emacs 21.1 NEWS entry for tooltips for details. --- ** Images are now supported on MS Windows. -PBM and XBM images are supported out of the box. Other image formats +PBM and XBM images are supported out of the box. Other image formats depend on external libraries. All of these libraries have been ported to Windows, and can be found in both source and binary form at http://gnuwin32.sourceforge.net/. Note that libpng also depends on @@ -3761,7 +3765,7 @@ you wish to use them in other faces. ** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations. Those systems use Unicode internally, so this allows Emacs to share -multilingual text with other applications. On other versions of +multilingual text with other applications. On other versions of MS Windows, Emacs now uses the appropriate locale coding-system, so the clipboard should work correctly for your local language without any customizations. @@ -3771,12 +3775,12 @@ any customizations. Previous versions of Emacs erred on the side of having a usable Emacs through telnet, even though that was inconvenient if you use Emacs in -a local console window with a scrollback buffer. The default value of +a local console window with a scrollback buffer. The default value of w32-use-full-screen-buffer is now nil, which favors local console -windows. Recent versions of Windows telnet also work well with this -setting. If you are using an older telnet server then Emacs detects +windows. Recent versions of Windows telnet also work well with this +setting. If you are using an older telnet server then Emacs detects that the console window dimensions that are reported are not sane, and -defaults to 80x25. If you use such a telnet server regularly at a size +defaults to 80x25. If you use such a telnet server regularly at a size other than 80x25, you can still manually set w32-use-full-screen-buffer to t. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d1825190c1a..f24de58fbb7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,87 @@ +2007-01-10 Juanma Barranquero <lekktu@gmail.com> + + * ediff-init.el (ediff-autostore-merges): + * textmodes/fill.el (fill-region): Doc fix. + +2007-01-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * server.el (server-ensure-safe-dir): UIDs may be floats. + +2007-01-10 Richard Stallman <rms@gnu.org> + + * battery.el (battery-linux-proc-acpi): Use ignore-errors + around calls to directory-files. + + * subr.el (momentary-string-display): Use save-excursion. + + * emacs-lisp/pp.el (pp-eval-expression): Once again eval the + argument, but read it as `X' does. + +2007-01-09 Juri Linkov <juri@jurta.org> + + * info.el (Info-fontify-node): Don't hide node names of index entries. + + * faces.el (momentary): Change :group to basic-faces where all + basic faces belong to. Add :version. + +2007-01-09 Lennart Borgman <lennart.borgman.073@student.lu.se> + + * tutorial.el (tutorial--display-changes): Show M-x sequence if no + keybinding is found. + (tutorial--find-changed-keys): Never treat null keybinding as a + remapping. + +2007-01-09 Martin Rudalics <rudalics@gmx.at> + + * wdired.el (wdired-xcase-word): Skip non-word read-only characters. + +2007-01-09 Kenichi Handa <handa@m17n.org> + + * international/mule-cmds.el + (select-safe-coding-system-interactively): Fix message. + +2007-01-09 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-process-one-action): Remove `with-timeout'. + (tramp-process-actions): Add optional parameter TIMEOUT. + (tramp-open-connection-telnet, tramp-open-connection-rsh) + (tramp-open-connection-su): Add timeout of 60". + +2007-01-09 Richard Stallman <rms@gnu.org> + + * progmodes/compile.el (compile): Doc fix. + +2007-01-09 Markus Triska <markus.triska@gmx.at> + + * tumme.el (tumme-display-thumb): Doc fix. + +2007-01-08 Juanma Barranquero <lekktu@gmail.com> + + * battery.el (battery-search-for-one-match-in-files): + * bindings.el (mode-line-minor-mode-help): + * x-dnd.el (x-dnd-types-alist): + * calendar/icalendar.el (icalendar-import-buffer): + * term/mac-win.el (mac-dnd-types-alist): Fix typo in docstring. + + * progmodes/vhdl-mode.el (vhdl-save-caches): Fix typo in error message. + +2007-01-07 Chris Moore <christopher.ian.moore@gmail.com> (tiny change) + + * replace.el (replace-regexp): Fix typo in docstring. + +2007-01-07 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-langs.el (c-operators, c-filter-ops): + Amend doc-string and comments. + +2007-01-06 Eli Zaretskii <eliz@gnu.org> + + * files.el (abbreviate-file-name): Doc fix. + +2007-01-06 Markus Triska <triska@gmx.at> + + * subr.el (split-string): Remove spurious ")" from doc string. + 2007-01-05 Takaaki Ota <Takaaki.Ota@am.sony.com> * textmodes/table.el (table--warn-incompatibility): @@ -275,6 +359,11 @@ 2006-12-27 Kenichi Handa <handa@m17n.org> * international/mule-cmds.el (select-safe-coding-system-interactively): + Use face `link' for problematic chars. + +2006-12-27 Kenichi Handa <handa@m17n.org> + + * international/mule-cmds.el (select-safe-coding-system-interactively): Improve the message in *Warning* buffer. 2006-12-27 Kim F. Storm <storm@cua.dk> diff --git a/lisp/battery.el b/lisp/battery.el index a4c72df0bbb..aec6865dc06 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -357,15 +357,17 @@ The following %-sequences are provided: (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A")) (cons ?L (or (battery-search-for-one-match-in-files (mapcar (lambda (e) (concat e "/state")) - (directory-files "/proc/acpi/ac_adapter/" - t "\\`[^.]")) + (ignore-errors + (directory-files "/proc/acpi/ac_adapter/" + t "\\`[^.]"))) "state: +\\(.*\\)$" 1) "N/A")) (cons ?d (or (battery-search-for-one-match-in-files (mapcar (lambda (e) (concat e "/temperature")) - (directory-files "/proc/acpi/thermal_zone/" - t "\\`[^.]")) + (ignore-errors + (directory-files "/proc/acpi/thermal_zone/" + t "\\`[^.]"))) "temperature: +\\([0-9]+\\) C$" 1) "N/A")) @@ -455,7 +457,7 @@ The following %-sequences are provided: (defun battery-search-for-one-match-in-files (files regexp match-num) "Search REGEXP in the content of the files listed in FILES. -If a match occured, return the parenthesized expression numbered by +If a match occurred, return the parenthesized expression numbered by MATCH-NUM in the match. Otherwise, return nil." (with-temp-buffer (catch 'found diff --git a/lisp/bindings.el b/lisp/bindings.el index 1d64612d8ca..690431a99e6 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -476,7 +476,7 @@ Menu of mode operations in the mode line.") (x-popup-menu event mode-line-mode-menu)) (defun mode-line-minor-mode-help (event) - "Describe minor mode for EVENT occured on minor modes area of the mode line." + "Describe minor mode for EVENT occurred on minor modes area of the mode line." (interactive "@e") (let ((indicator (car (nth 4 (car (cdr event)))))) (describe-minor-mode-from-indicator indicator))) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 6fecc86bf34..9de4d1f3954 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -709,7 +709,7 @@ would be \"pm\"." "Export diary file to iCalendar format. All diary entries in the file DIARY-FILENAME are converted to iCalendar format. The result is appended to the file ICAL-FILENAME." - (interactive "FExport diary data from file: + (interactive "FExport diary data from file: Finto iCalendar file: ") (save-current-buffer (set-buffer (find-file diary-filename)) @@ -1453,8 +1453,8 @@ Argument ICAL-FILENAME output iCalendar file. Argument DIARY-FILENAME input `diary-file'. Optional argument NON-MARKING determines whether events are created as non-marking or not." - (interactive "fImport iCalendar data from file: -Finto diary file: + (interactive "fImport iCalendar data from file: +Finto diary file: p") ;; clean up the diary file (save-current-buffer @@ -1479,7 +1479,7 @@ NON-MARKING determines whether diary events are created as non-marking. Return code t means that importing worked well, return code nil -means that an error has occured. Error messages will be in the +means that an error has occurred. Error messages will be in the buffer `*icalendar-errors*'." (interactive) (save-current-buffer @@ -1508,7 +1508,7 @@ buffer `*icalendar-errors*'." (set-buffer b) (save-buffer))))) (message "Converting icalendar...done") - ;; return t if no error occured + ;; return t if no error occurred (not ical-errors)) (message "Current buffer does not contain icalendar contents!") diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 2fc0ceefe4d..75b2fdc6fc5 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el @@ -1410,9 +1410,10 @@ This property can be toggled interactively." (defcustom ediff-autostore-merges 'group-jobs-only "*Save the results of merge jobs automatically. -nil means don't save automatically. t means always save. Anything else -means save automatically only if the merge job is part of a group of jobs, such -as `ediff-merge-directory' or `ediff-merge-directory-revisions'." +With value nil, don't save automatically. With value t, always +save. Anything else means save automatically only if the merge +job is part of a group of jobs, such as `ediff-merge-directory' +or `ediff-merge-directory-revisions'." :type '(choice (const nil) (const t) (const group-jobs-only)) :group 'ediff-merge) (make-variable-buffer-local 'ediff-autostore-merges) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 77f8854e022..27cb936c598 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -97,16 +97,13 @@ Output stream is STREAM, or value of `standard-output' (which see)." (princ (pp-to-string object) (or stream standard-output))) ;;;###autoload -(defun pp-eval-expression (expval) - "Evaluate an expression, then pretty-print value EXPVAL into a new buffer. -If pretty-printed EXPVAL fits on one line, display it in the echo -area instead. Also add EXPVAL to the front of the list -in the variable `values'. - -Non-interactively, the argument is the value, EXPVAL, not the expression -to evaluate." - (interactive "XPp-eval: ") - (setq values (cons expval values)) +(defun pp-eval-expression (expression) + "Evaluate EXPRESSION and pretty-print its value. +Also add the value to the front of the list in the variable `values'." + (interactive + (list (read-from-minibuffer "Eval: " nil read-expression-map t + 'read-expression-history))) + (setq values (cons (eval expression) values)) (let* ((old-show-function temp-buffer-show-function) ;; Use this function to display the buffer. ;; This function either decides not to display it at all diff --git a/lisp/faces.el b/lisp/faces.el index a3d0e8b6de6..0736cda2993 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2179,17 +2179,18 @@ terminal type to a different value." :version "21.1" :group 'basic-faces) -(defface momentary - '((t (:inherit mode-line))) - "Face for momentarily displaying text in the current buffer." - :group 'display) - (defface vertical-border '((((type tty)) :inherit mode-line-inactive)) "Face used for vertical window dividers on ttys." :version "22.1" :group 'basic-faces) +(defface momentary + '((t (:inherit mode-line))) + "Face for momentarily displaying text in the current buffer." + :version "22.1" + :group 'basic-faces) + (defface minibuffer-prompt '((((background dark)) :foreground "cyan") ;; Don't use blue because many users of the MS-DOS port customize diff --git a/lisp/files.el b/lisp/files.el index 3834424ed4e..3b28f28b59b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1289,8 +1289,9 @@ Choose the buffer's name using `generate-new-buffer-name'." (defun abbreviate-file-name (filename) "Return a version of FILENAME shortened using `directory-abbrev-alist'. -This also substitutes \"~\" for the user's home directory and -removes automounter prefixes (see the variable `automount-dir-prefix')." +This also substitutes \"~\" for the user's home directory (unless the +home directory is a root directory) and removes automounter prefixes +\(see the variable `automount-dir-prefix')." ;; Get rid of the prefixes added by the automounter. (save-match-data (if (and automount-dir-prefix diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ec7476b8758..a56f9ff1536 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,8 +1,38 @@ +2007-01-07 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus-soup.el: Add missing :group in previous change. + 2007-01-05 Reiner Steib <Reiner.Steib@gmx.de> * gnus-soup.el (gnus-soup): New custom group. Make user variables customizable. +2007-01-03 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> + + * nnweb.el (nnweb-gmane-create-mapping): Put back code to merge the + headers read from disk with the ones newly found in the current search. + This should no longer cause problems, because the article numbers in + Gmane's `nov.php' output are ignored since the previous change. + +2006-01-03 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> + + * nnweb.el (nnweb-gmane-create-mapping): Keep the mapping stable for + solid groups. + +2006-01-03 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnweb.el (nnweb-gmane-create-mapping): Use the article number from + the headers when creating the mapping to avoid mismappings. + (nnweb-gmane-create-mapping): Always nix out old mapping. + +2007-01-02 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> + + * gmm-utils.el (gmm-tool-bar-style): Fix custom type. + +2007-01-01 Katsumi Yamaoka <yamaoka@jpl.org> + + * mm-decode.el (mm-display-external): Use itimer function for XEmacs. + 2006-12-30 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> * gnus-sum.el (gnus-summary-insert-dormant-articles): Fix typo in diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index 59d02927008..18b1a528c29 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el @@ -203,8 +203,8 @@ This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." 'gnome 'retro) "Prefered tool bar style." - :type '(choice (const :tag "GNOME style" 'gnome) - (const :tag "Retro look" 'retro)) + :type '(choice (const :tag "GNOME style" gnome) + (const :tag "Retro look" retro)) :group 'gmm) (defvar tool-bar-map) diff --git a/lisp/gnus/gnus-soup.el b/lisp/gnus/gnus-soup.el index 31074cb8c77..d5b1a9fad88 100644 --- a/lisp/gnus/gnus-soup.el +++ b/lisp/gnus/gnus-soup.el @@ -45,18 +45,21 @@ (defcustom gnus-soup-directory (nnheader-concat gnus-home-directory "SoupBrew/") "Directory containing an unpacked SOUP packet." :version "22.1" ;; Gnus 5.10.9 - :type 'directory) + :type 'directory + :group 'gnus-soup) (defcustom gnus-soup-replies-directory (nnheader-concat gnus-soup-directory "SoupReplies/") "Directory where Gnus will do processing of replies." :version "22.1" ;; Gnus 5.10.9 - :type 'directory) + :type 'directory + :group 'gnus-soup) (defcustom gnus-soup-prefix-file "gnus-prefix" "Name of the file where Gnus stores the last used prefix." :version "22.1" ;; Gnus 5.10.9 - :type 'file) + :type 'file + :group 'gnus-soup) (defcustom gnus-soup-packer "tar cf - %s | gzip > $HOME/Soupout%d.tgz" "Format string command for packing a SOUP packet. @@ -64,28 +67,33 @@ The SOUP files will be inserted where the %s is in the string. This string MUST contain both %s and %d. The file number will be inserted where %d appears." :version "22.1" ;; Gnus 5.10.9 - :type 'string) + :type 'string + :group 'gnus-soup) (defcustom gnus-soup-unpacker "gunzip -c %s | tar xvf -" "Format string command for unpacking a SOUP packet. The SOUP packet file name will be inserted at the %s." :version "22.1" ;; Gnus 5.10.9 - :type 'string) + :type 'string + :group 'gnus-soup) (defcustom gnus-soup-packet-directory gnus-home-directory "Where gnus-soup will look for REPLIES packets." :version "22.1" ;; Gnus 5.10.9 - :type 'directory) + :type 'directory + :group 'gnus-soup) (defcustom gnus-soup-packet-regexp "Soupin" "Regular expression matching SOUP REPLIES packets in `gnus-soup-packet-directory'." :version "22.1" ;; Gnus 5.10.9 - :type 'regexp) + :type 'regexp + :group 'gnus-soup) (defcustom gnus-soup-ignored-headers "^Xref:" "Regexp to match headers to be removed when brewing SOUP packets." :version "22.1" ;; Gnus 5.10.9 - :type 'regexp) + :type 'regexp + :group 'gnus-soup) ;;; Internal Variables: diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 7e6f93be1f1..361c83cfa7c 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -883,13 +883,21 @@ external if displayed external." ;; a vector in Emacs but is a list in XEmacs) ;; requires that it is lexically scoped. (timer (run-at-time 2.0 nil 'ignore))) - (lambda (process state) - (when (eq 'exit (process-status process)) - (if (memq timer timer-list) - (timer-set-function timer fn) - (funcall fn)) - (ignore-errors (eval fm)) - (message "%s" done)))))) + (if (boundp 'itimer-list) + (lambda (process state) + (when (eq 'exit (process-status process)) + (if (memq timer itimer-list) + (set-itimer-function timer fn) + (funcall fn)) + (ignore-errors (eval fm)) + (message "%s" done))) + (lambda (process state) + (when (eq 'exit (process-status process)) + (if (memq timer timer-list) + (timer-set-function timer fn) + (funcall fn)) + (ignore-errors (eval fm)) + (message "%s" done))))))) (mm-handle-set-external-undisplayer handle (cons file buffer))) (message "Displaying %s..." command)) diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index d020d533aea..54c57879d5b 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -480,7 +480,7 @@ Valid types include `google', `dejanews', and `gmane'.") (from (mail-header-from header)) (subject (mail-header-subject header)) (rfc2047-encoding-type 'mime)) - (when (string-match " \\([^:]+\\):\\([0-9]+\\)" xref) + (when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref) (mail-header-set-xref header (format "http://article.gmane.org/%s/%s/raw" @@ -496,11 +496,8 @@ Valid types include `google', `dejanews', and `gmane'.") (rfc2047-encode-string subject)) (unless (nnweb-get-hashtb (mail-header-xref header)) - (push - (list - (incf (cdr active)) - header) - map) + (mail-header-set-number header (incf (cdr active))) + (push (list (mail-header-number header) header) map) (nnweb-set-hashtb (cadar map) (car map)))))) (forward-line 1))) (nnheader-message 7 "Searching Gmane...done") diff --git a/lisp/info.el b/lisp/info.el index 6d966da3317..880b659faa6 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3996,7 +3996,9 @@ the variable `Info-file-list-for-emacs'." (setq res (car hl) hl nil) (setq hl (cdr hl)))) res))) 'info-xref-visited 'info-xref))) - (when (and not-fontified-p (memq Info-hide-note-references '(t hide))) + (when (and not-fontified-p + (memq Info-hide-note-references '(t hide)) + (not (Info-index-node))) (put-text-property (match-beginning 2) (1- (match-end 6)) 'invisible t) ;; Unhide the file name in parens diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 65c3f6fe5ff..41f6b376995 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -788,10 +788,10 @@ e.g., for sending an email message.\n ") (car coding))))) (setq i (1+ i)))) (insert "\n")) - (insert "\ + (insert (substitute-command-keys "\ -Click on a character to jump to the place it appears,\n" - (substitute-command-keys "\ +Click on a character (or switch to this window by `\\[other-window]'\n\ +and select the characters by RET) to jump to the place it appears,\n\ where `\\[universal-argument] \\[what-cursor-position]' will give information about it.\n")))) (insert (substitute-command-keys "\nSelect \ one of the safe coding systems listed below,\n\ diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 18248771da0..80e2f978f58 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -5782,8 +5782,8 @@ suggest to customize that face, if it's customizable. \(fn &optional FACE)" t nil) -(autoload (quote customize-customized) "cus-edit" "\ -Customize all user options set since the last save in this session. +(autoload (quote customize-unsaved) "cus-edit" "\ +Customize all user options set in this session but not saved. \(fn)" t nil) @@ -6029,11 +6029,10 @@ This function is designed to be added to hooks, for example: Non-nil if Global-Cwarn mode is enabled. See the command `global-cwarn-mode' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `global-cwarn-mode'.") - -(custom-autoload (quote global-cwarn-mode) "cwarn") +either customize it (see the info node `Easy Customization') +or call the function `global-cwarn-mode'.") -(put (quote global-cwarn-mode) (quote custom-set) (quote custom-set-minor-mode)) +(custom-autoload (quote global-cwarn-mode) "cwarn" nil) (autoload (quote global-cwarn-mode) "cwarn" "\ Toggle Cwarn mode in every buffer. @@ -6407,11 +6406,10 @@ no args, if that value is non-nil. Non-nil if Delete-Selection mode is enabled. See the command `delete-selection-mode' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `delete-selection-mode'.") - -(custom-autoload (quote delete-selection-mode) "delsel") +either customize it (see the info node `Easy Customization') +or call the function `delete-selection-mode'.") -(put (quote delete-selection-mode) (quote custom-set) (quote custom-set-minor-mode)) +(custom-autoload (quote delete-selection-mode) "delsel" nil) (autoload (quote delete-selection-mode) "delsel" "\ Toggle Delete Selection mode. @@ -7973,6 +7971,10 @@ If MAP is specified, it should normally be a keymap; nil stands for the local menu-bar keymap. It can also be a symbol, which has earlier been used as the first argument in a call to `easy-menu-define', or the value of such a symbol. +If MAP is specified, it should normally be a keymap; nil stands for the local +menu-bar keymap. It can also be a symbol, which has earlier been used as the +first argument in a call to `easy-menu-define', or the value of such a symbol. + If the menu located by PATH has no submenu named NAME, add one. If the optional argument BEFORE is present, add it just before the submenu named BEFORE, otherwise add it at the end of the menu. @@ -9690,7 +9692,7 @@ Use the `etags' program to make a tags table file.") A value of t means case-insensitive, a value of nil means case-sensitive. Any other value means use the setting of `case-fold-search'.") -(custom-autoload (quote tags-case-fold-search) "etags") +(custom-autoload (quote tags-case-fold-search) "etags" t) (defvar tags-table-list nil "\ *List of file names of tags tables to search. @@ -9699,7 +9701,7 @@ To switch to a new list of tags tables, setting this variable is sufficient. If you set this variable, do not also set `tags-file-name'. Use the `etags' program to make a tags table file.") -(custom-autoload (quote tags-table-list) "etags") +(custom-autoload (quote tags-table-list) "etags" t) (defvar tags-compression-info-list (quote ("" ".Z" ".bz2" ".gz" ".tgz")) "\ *List of extensions tried by etags when jka-compr is used. @@ -9708,7 +9710,7 @@ These extensions will be tried only if jka-compr was activated \(i.e. via customize of `auto-compression-mode' or by calling the function `auto-compression-mode').") -(custom-autoload (quote tags-compression-info-list) "etags") +(custom-autoload (quote tags-compression-info-list) "etags" t) (defvar tags-add-tables (quote ask-user) "\ *Control whether to add a new tags table to the current list. @@ -9716,14 +9718,14 @@ t means do; nil means don't (always start a new list). Any other value means ask the user whether to add a new tags table to the current list (as opposed to starting a new list).") -(custom-autoload (quote tags-add-tables) "etags") +(custom-autoload (quote tags-add-tables) "etags" t) (defvar find-tag-hook nil "\ *Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'. The value in the buffer in which \\[find-tag] is done is used, not the value in the buffer \\[find-tag] goes to.") -(custom-autoload (quote find-tag-hook) "etags") +(custom-autoload (quote find-tag-hook) "etags" t) (defvar find-tag-default-function nil "\ *A function of no arguments used by \\[find-tag] to pick a default tag. @@ -9731,7 +9733,7 @@ If nil, and the symbol that is the value of `major-mode' has a `find-tag-default-function' property (see `put'), that is used. Otherwise, `find-tag-default' is used.") -(custom-autoload (quote find-tag-default-function) "etags") +(custom-autoload (quote find-tag-default-function) "etags" t) (autoload (quote tags-table-mode) "etags" "\ Major mode for tags table file buffers. @@ -13360,11 +13362,10 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'. Non-nil if Global-Hi-Lock mode is enabled. See the command `global-hi-lock-mode' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `global-hi-lock-mode'.") - -(custom-autoload (quote global-hi-lock-mode) "hi-lock") +either customize it (see the info node `Easy Customization') +or call the function `global-hi-lock-mode'.") -(put (quote global-hi-lock-mode) (quote custom-set) (quote custom-set-minor-mode)) +(custom-autoload (quote global-hi-lock-mode) "hi-lock" nil) (autoload (quote global-hi-lock-mode) "hi-lock" "\ Toggle Hi-Lock mode in every buffer. @@ -15009,6 +15010,15 @@ This function is intended to be used from `magic-mode-alist' (which see). \(fn)" nil nil) +(autoload (quote image-type-auto-detected-p) "image" "\ +Return t iff the current buffer contains an auto-detectable image. +Whether image types are auto-detectable or not depends on the setting +of the variable `image-type-auto-detectable'. + +This function is intended to be used from `magic-mode-alist' (which see). + +\(fn)" nil nil) + (autoload (quote create-image) "image" "\ Create an image. FILE-OR-DATA is an image file name or image data. @@ -15136,7 +15146,7 @@ setting this variable directly does not take effect unless `auto-image-file-mode' is re-enabled; this happens automatically when the variable is set using \\[customize].") -(custom-autoload (quote image-file-name-extensions) "image-file") +(custom-autoload (quote image-file-name-extensions) "image-file" nil) (defvar image-file-name-regexps nil "\ *List of regexps matching image-file filenames. @@ -15148,7 +15158,7 @@ enabled, setting this variable directly does not take effect unless `auto-image-file-mode' is re-enabled; this happens automatically when the variable is set using \\[customize].") -(custom-autoload (quote image-file-name-regexps) "image-file") +(custom-autoload (quote image-file-name-regexps) "image-file" nil) (autoload (quote image-file-name-regexp) "image-file" "\ Return a regular expression matching image-file filenames. @@ -15166,11 +15176,10 @@ the command `insert-file-contents'. Non-nil if Auto-Image-File mode is enabled. See the command `auto-image-file-mode' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `auto-image-file-mode'.") - -(custom-autoload (quote auto-image-file-mode) "image-file") +either customize it (see the info node `Easy Customization') +or call the function `auto-image-file-mode'.") -(put (quote auto-image-file-mode) (quote custom-set) (quote custom-set-minor-mode)) +(custom-autoload (quote auto-image-file-mode) "image-file" nil) (autoload (quote auto-image-file-mode) "image-file" "\ Toggle visiting of image files as images. @@ -15391,12 +15400,12 @@ Input matching this regexp is not saved on the input history in Inferior Lisp mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword \(as in :a, :c, etc.)") -(custom-autoload (quote inferior-lisp-filter-regexp) "inf-lisp") +(custom-autoload (quote inferior-lisp-filter-regexp) "inf-lisp" t) (defvar inferior-lisp-program "lisp" "\ *Program name for invoking an inferior Lisp in Inferior Lisp mode.") -(custom-autoload (quote inferior-lisp-program) "inf-lisp") +(custom-autoload (quote inferior-lisp-program) "inf-lisp" t) (defvar inferior-lisp-load-command "(load \"%s\")\n" "\ *Format-string for building a Lisp expression to load a file. @@ -15407,7 +15416,7 @@ The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\" produces cosmetically superior output for this application, but it works only in Common Lisp.") -(custom-autoload (quote inferior-lisp-load-command) "inf-lisp") +(custom-autoload (quote inferior-lisp-load-command) "inf-lisp" t) (defvar inferior-lisp-prompt "^[^> \n]*>+:? *" "\ Regexp to recognize prompts in the Inferior Lisp mode. @@ -15425,7 +15434,7 @@ kcl: \"^>+ *\" This is a fine thing to set in your .emacs file or through Custom.") -(custom-autoload (quote inferior-lisp-prompt) "inf-lisp") +(custom-autoload (quote inferior-lisp-prompt) "inf-lisp" t) (defvar inferior-lisp-mode-hook (quote nil) "\ *Hook for customising Inferior Lisp mode.") @@ -16322,28 +16331,28 @@ Specifies the keypad setup for unshifted keypad keys when NumLock is off. When selecting the plain numeric keypad setup, the character returned by the decimal key must be specified.") -(custom-autoload (quote keypad-setup) "keypad") +(custom-autoload (quote keypad-setup) "keypad" nil) (defvar keypad-numlock-setup nil "\ Specifies the keypad setup for unshifted keypad keys when NumLock is on. When selecting the plain numeric keypad setup, the character returned by the decimal key must be specified.") -(custom-autoload (quote keypad-numlock-setup) "keypad") +(custom-autoload (quote keypad-numlock-setup) "keypad" nil) (defvar keypad-shifted-setup nil "\ Specifies the keypad setup for shifted keypad keys when NumLock is off. When selecting the plain numeric keypad setup, the character returned by the decimal key must be specified.") -(custom-autoload (quote keypad-shifted-setup) "keypad") +(custom-autoload (quote keypad-shifted-setup) "keypad" nil) (defvar keypad-numlock-shifted-setup nil "\ Specifies the keypad setup for shifted keypad keys when NumLock is off. When selecting the plain numeric keypad setup, the character returned by the decimal key must be specified.") -(custom-autoload (quote keypad-numlock-shifted-setup) "keypad") +(custom-autoload (quote keypad-numlock-shifted-setup) "keypad" nil) (autoload (quote keypad-setup) "keypad" "\ Set keypad bindings in function-key-map according to SETUP. @@ -17286,7 +17295,7 @@ This function normally would be called when the message is sent. Otherwise, (the default) use a smaller, somewhat faster, and often correct parser.") -(custom-autoload (quote mail-use-rfc822) "mail-utils") +(custom-autoload (quote mail-use-rfc822) "mail-utils" t) (autoload (quote mail-file-babyl-p) "mail-utils" "\ Not documented @@ -23124,7 +23133,7 @@ SENDERS is a string of names separated by commas. By default, `identity' is set.") -(custom-autoload (quote rmail-summary-line-decoder) "rmailsum") +(custom-autoload (quote rmail-summary-line-decoder) "rmailsum" t) (defvar rmail-user-mail-address-regexp nil "\ *Regexp matching user mail addresses. @@ -23567,7 +23576,7 @@ Mode for automatic saving of minibuffer history. Set this by calling the `savehist-mode' function or using the customize interface.") -(custom-autoload (quote savehist-mode) "savehist") +(custom-autoload (quote savehist-mode) "savehist" nil) (autoload (quote savehist-mode) "savehist" "\ Toggle savehist-mode. @@ -24682,7 +24691,7 @@ For example, the form would give military-style times like `21:07 (UTC)'.") -(custom-autoload (quote calendar-time-display-form) "solar") +(custom-autoload (quote calendar-time-display-form) "solar" t) (defvar calendar-latitude nil "\ *Latitude of `calendar-location-name' in degrees. @@ -24694,7 +24703,7 @@ York City. This variable should be set in `site-start'.el.") -(custom-autoload (quote calendar-latitude) "solar") +(custom-autoload (quote calendar-latitude) "solar" t) (defvar calendar-longitude nil "\ *Longitude of `calendar-location-name' in degrees. @@ -24706,7 +24715,7 @@ York City. This variable should be set in `site-start'.el.") -(custom-autoload (quote calendar-longitude) "solar") +(custom-autoload (quote calendar-longitude) "solar" t) (defvar calendar-location-name (quote (let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (equal (aref calendar-latitude 2) (quote north)) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (equal (aref calendar-longitude 2) (quote east)) "E" "W"))))) "\ *Expression evaluating to name of `calendar-longitude', `calendar-latitude'. @@ -24715,7 +24724,7 @@ pair. This variable should be set in `site-start'.el.") -(custom-autoload (quote calendar-location-name) "solar") +(custom-autoload (quote calendar-location-name) "solar" t) (autoload (quote sunrise-sunset) "solar" "\ Local time of sunrise and sunset for today. Accurate to a few seconds. @@ -28017,7 +28026,7 @@ Not documented (autoload (quote tramp-completion-handle-file-name-all-completions) "tramp" "\ Like `file-name-all-completions' for partial tramp files. -\(fn FILENAME DIRECTORY)" nil nil) +\(fn FILENAME DIRECTORY &optional PREDICATE)" nil nil) (autoload (quote tramp-completion-handle-file-name-completion) "tramp" "\ Like `file-name-completion' for tramp files. @@ -30532,7 +30541,8 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke Non-nil if Which-Function mode is enabled. See the command `which-function-mode' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `which-function-mode'.") +either customize it (see the info node `Easy Customization') +or call the function `which-function-mode'.") (custom-autoload (quote which-function-mode) "which-func" nil) @@ -30778,7 +30788,7 @@ Toggle Winner mode. Setting this variable directly does not take effect; use either \\[customize] or the function `winner-mode'.") -(custom-autoload (quote winner-mode) "winner") +(custom-autoload (quote winner-mode) "winner" nil) (autoload (quote winner-mode) "winner" "\ Toggle Winner mode. @@ -31150,10 +31160,9 @@ Zone out, completely. ;;;;;; "net/eudcb-bbdb.el" "net/eudcb-ldap.el" "net/eudcb-mab.el" ;;;;;; "net/eudcb-ph.el" "net/ldap.el" "net/netrc.el" "net/tls.el" ;;;;;; "net/tramp-smb.el" "net/tramp-util.el" "net/tramp-uu.el" -;;;;;; "net/tramp-vc.el" "net/trampver.el" "obsolete/bg-mouse.el" -;;;;;; "obsolete/hilit19.el" "obsolete/sc.el" "obsolete/uncompress.el" -;;;;;; "patcomp.el" "paths.el" "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" -;;;;;; "pgg-def.el" "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" +;;;;;; "net/tramp-vc.el" "net/trampver.el" "patcomp.el" "paths.el" +;;;;;; "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" "pgg-def.el" +;;;;;; "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" ;;;;;; "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el" ;;;;;; "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" ;;;;;; "progmodes/cc-cmds.el" "progmodes/cc-defs.el" "progmodes/cc-fonts.el" diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 822a995230e..4d3ee29c4d6 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2,7 +2,7 @@ ;;; tramp.el --- Transparent Remote Access, Multiple Protocol ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -5540,32 +5540,36 @@ The terminal type can be configured with `tramp-terminal-type'." (let (found item pattern action todo) (erase-buffer) (tramp-message 9 "Waiting 60s for prompt from remote shell") - (with-timeout (60 (throw 'tramp-action 'timeout)) - (while (not found) - (tramp-accept-process-output p 1) + (while (not found) + (tramp-accept-process-output p 1) + (goto-char (point-min)) + (setq todo actions) + (while todo (goto-char (point-min)) - (setq todo actions) - (while todo - (goto-char (point-min)) - (setq item (pop todo)) - (setq pattern (symbol-value (nth 0 item))) - (setq action (nth 1 item)) - (tramp-message 10 "Looking for regexp \"%s\" from remote shell" - pattern) - (when (re-search-forward (concat pattern "\\'") nil t) - (setq found (funcall action p multi-method method user host))))) - found))) + (setq item (pop todo)) + (setq pattern (symbol-value (nth 0 item))) + (setq action (nth 1 item)) + (tramp-message 10 "Looking for regexp \"%s\" from remote shell" + pattern) + (when (re-search-forward (concat pattern "\\'") nil t) + (setq found (funcall action p multi-method method user host))))) + found)) -(defun tramp-process-actions (p multi-method method user host actions) - "Perform actions until success." +(defun tramp-process-actions + (p multi-method method user host actions &optional timeout) + "Perform actions until success or TIMEOUT." (tramp-message 10 "%s" (mapconcat 'identity (process-command p) " ")) (let (exit) (while (not exit) (tramp-message 9 "Waiting for prompts from remote shell") (setq exit (catch 'tramp-action - (tramp-process-one-action - p multi-method method user host actions) + (if timeout + (with-timeout (timeout) + (tramp-process-one-action + p multi-method method user host actions)) + (tramp-process-one-action + p multi-method method user host actions)) nil))) (unless (eq exit 'ok) (tramp-clear-passwd user host) @@ -5689,7 +5693,7 @@ Maybe the different regular expressions need to be tuned. (set-buffer (tramp-get-buffer multi-method method user host)) (erase-buffer) (tramp-process-actions p multi-method method user host - tramp-actions-before-shell) + tramp-actions-before-shell 60) (tramp-open-connection-setup-interactive-shell p multi-method method user host) (tramp-post-connection multi-method method user host))))) @@ -5762,7 +5766,7 @@ arguments, and xx will be used as the host name to connect to. (set-buffer buf) (tramp-process-actions p multi-method method user host - tramp-actions-before-shell) + tramp-actions-before-shell 60) (tramp-message 7 "Initializing remote shell") (tramp-open-connection-setup-interactive-shell p multi-method method user host) @@ -5823,7 +5827,7 @@ prompt than you do, so it is not at all unlikely that the variable (tramp-set-process-query-on-exit-flag p nil) (set-buffer (tramp-get-buffer multi-method method user host)) (tramp-process-actions p multi-method method user host - tramp-actions-before-shell) + tramp-actions-before-shell 60) (tramp-open-connection-setup-interactive-shell p multi-method method user host) (tramp-post-connection multi-method method diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b3c0a578649..6907b56d6c6 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -208,23 +208,31 @@ the evaluated constant value at compile time." ;; Some helper functions used when building the language constants. (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate) - ;; Used to filter operators from the list OPS in a DWIM:ey way: - ;; OPS either has the structure of `c-operators', as a single + ;; Extract a subset of the operators in the list OPS in a DWIM:ey + ;; way. The return value is a plain list of operators: + ;; + ;; OPS either has the structure of `c-operators', is a single ;; group in `c-operators', or is a plain list of operators. - ;; OPGROUP-FILTER is used filter out the operator groups. It can - ;; be t to choose all groups, a list of the group type symbols to - ;; accept, or a function which will be called with the group - ;; symbol for each group and should return non-nil for those to - ;; include. OP-FILTER filters the individual operators in each - ;; group. It can be t to choose all operators, a regexp to test - ;; against each operator, or a function which will be called for - ;; each operator and should return non-nil for those to include. + ;; + ;; OPGROUP-FILTER specifies how to select the operator groups. It + ;; can be t to choose all groups, a list of group type symbols + ;; (such as 'prefix) to accept, or a function which will be called + ;; with the group symbol for each group and should return non-nil + ;; if that group is to be included. + ;; + ;; OP-FILTER filters the individual operators in each group. It + ;; can be t to choose all operators, a regexp to test against each + ;; operator, or a function which will be called for each operator + ;; and should return non-nil for those to include. + ;; ;; If XLATE is given, it's a function which is called for each ;; matching operator and its return value is collected instead. ;; If it returns a list, the elements are spliced directly into ;; the final result, which is returned as a list with duplicates - ;; removed using `equal'. `c-mode-syntax-table' for the current - ;; mode is in effect during the whole procedure. + ;; removed using `equal'. + ;; + ;; `c-mode-syntax-table' for the current mode is in effect during + ;; the whole procedure. (unless (listp (car-safe ops)) (setq ops (list ops))) (cond ((eq opgroup-filter t) @@ -719,11 +727,11 @@ expression." (c-lang-defconst c-operators "List describing all operators, along with their precedence and associativity. The order in the list corresponds to the precedence of -the operators: The operators in each element is a group with the same +the operators: The operators in each element are a group with the same precedence, and the group has higher precedence than the groups in all -following elements. The car of each element describes the type of of -the operator group, and the cdr is a list of the operator tokens in -it. The operator group types are: +following elements. The car of each element describes the type of the +operator group, and the cdr is a list of the operator tokens in it. +The operator group types are: 'prefix Unary prefix operators. 'postfix Unary postfix operators. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 04a5cf9cad7..c6876fb5d79 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -876,12 +876,12 @@ FMTS is a list of format specs for transforming the file name. Runs COMMAND, a shell command, in a separate process asynchronously with output going to the buffer `*compilation*'. -If optional second arg COMINT is t the buffer will be in Comint mode with -`compilation-shell-minor-mode'. - You can then use the command \\[next-error] to find the next error message and move to the source code that caused it. +If optional second arg COMINT is t the buffer will be in Comint mode with +`compilation-shell-minor-mode'. + Interactively, prompts for the command if `compilation-read-command' is non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. Additionally, with universal prefix arg, compilation buffer will be in diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 3bf4227a82f..cc58a09ec59 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -13851,7 +13851,7 @@ entity ENT-KEY." (vhdl-save-cache (car project-list)) (setq project-list (cdr project-list))) (message "Saving hierarchy caches...done"))) - (error (progn (vhdl-warning "ERROR: An error occured while saving the hierarchy caches") + (error (progn (vhdl-warning "ERROR: An error occurred while saving the hierarchy caches") (sit-for 2))))) (defun vhdl-save-cache (key) diff --git a/lisp/replace.el b/lisp/replace.el index 610fd9d2e9f..c51985c3e4a 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -467,10 +467,9 @@ at the given position for each replacement. In interactive calls, the replacement text may contain `\\,' followed by a Lisp expression used as part of the replacement text. Inside of that expression, `\\&' is a string denoting the -whole match, `\\N' a partial matches, `\\#&' and `\\#N' the -respective numeric values from `string-to-number', and `\\#' -itself for `replace-count', the number of replacements occured so -far. +whole match, `\\N' a partial match, `\\#&' and `\\#N' the respective +numeric values from `string-to-number', and `\\#' itself for +`replace-count', the number of replacements occurred so far. If your Lisp expression is an identifier and the next letter in the replacement string would be interpreted as part of it, you diff --git a/lisp/server.el b/lisp/server.el index 7a4179e85f6..dd64bb6cf89 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1,7 +1,7 @@ ;;; server.el --- Lisp code for GNU Emacs running as server process ;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: William Sommerfeld <wesommer@athena.mit.edu> ;; Maintainer: FSF @@ -435,7 +435,7 @@ Creates the directory if necessary and makes sure: (letf (((default-file-modes) ?\700)) (make-directory dir t)) (setq attrs (file-attributes dir))) ;; Check that it's safe for use. - (unless (and (eq t (car attrs)) (eq (nth 2 attrs) (user-uid)) + (unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid)) (or (eq system-type 'windows-nt) (zerop (logand ?\077 (file-modes dir))))) (error "The directory %s is unsafe" dir)))) diff --git a/lisp/subr.el b/lisp/subr.el index b48fa1a9f35..18f4ad65686 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1905,11 +1905,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." (recenter (/ (window-height) 2))) ;; If that pushed message start off the screen, ;; scroll to start it at the top of the screen. - (move-to-window-line 0) - (if (> (point) pos) - (progn + (save-excursion + (move-to-window-line 0) + (if (> (point) pos) (goto-char pos) - (recenter 0))) + (recenter 0))) (message (or message "Type %s to continue editing.") (single-key-description exit-char)) (let (char) @@ -2695,7 +2695,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained, which correctly parses CSV format, for example. Note that the effect of `(split-string STRING)' is the same as -`(split-string STRING split-string-default-separators t)'). In the rare +`(split-string STRING split-string-default-separators t)'. In the rare case that you wish to retain zero-length substrings when splitting on whitespace, use `(split-string STRING split-string-default-separators)'. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index f35bf080bbb..700ad57029b 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -2177,7 +2177,7 @@ either in the current buffer or in the echo area." ("TIFF" . mac-dnd-insert-TIFF)) "Which function to call to handle a drop of that type. The function takes three arguments, WINDOW, ACTION and DATA. -WINDOW is where the drop occured, ACTION is always `private' on +WINDOW is where the drop occurred, ACTION is always `private' on Mac. DATA is the drop data. Unlike the x-dnd counterpart, the return value of the function is not significant. diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 21ee585ec11..65c8067d48a 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -743,7 +743,7 @@ space does not end a sentence, so don't break a line there." (defun fill-minibuffer-function (arg) "Fill a paragraph in the minibuffer, ignoring the prompt." - (save-restriction + (save-restriction (narrow-to-region (minibuffer-prompt-end) (point-max)) (fill-paragraph arg))) @@ -838,18 +838,22 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (commark (comment-string-strip (buffer-substring comstart comin) nil t)) (comment-re - ;; `commark' is surrounded with arbitrary text (`\0' and `a') - ;; to make sure it can be used as an optimization of - ;; `comment-start-skip' in the middle of a line. For example, - ;; `commark' can't be used with the "@c" in TeXinfo (hence - ;; the `a') or with the "C" at BOL in Fortran (hence the `\0'). - (if (string-match comment-start-skip (concat "\0" commark "a")) - (concat "[ \t]*" (regexp-quote commark) - ;; Make sure we only match comments that use - ;; the exact same comment marker. - "[^" (substring commark -1) "]") - (concat "[ \t]*\\(?:" comment-start-skip "\\)"))) - (comment-fill-prefix ; Compute a fill prefix. + ;; A regexp more specialized than comment-start-skip, that only + ;; matches the current commark rather than any valid commark. + ;; + ;; The specialized regexp only works for "normal" comment + ;; syntax, not for Texinfo's "@c" (which can't be immediately + ;; followed by word-chars) or Fortran's "C" (which needs to be + ;; at bol), so check that comment-start-skip indeed allows the + ;; commark to appear in the middle of the line and followed by + ;; word chars. The choice of "\0" and "a" is mostly arbitrary. + (if (string-match comment-start-skip (concat "\0" commark "a")) + (concat "[ \t]*" (regexp-quote commark) + ;; Make sure we only match comments that + ;; use the exact same comment marker. + "[^" (substring commark -1) "]") + (concat "[ \t]*\\(?:" comment-start-skip "\\)"))) + (comment-fill-prefix ; Compute a fill prefix. (save-excursion (goto-char comstart) (if has-code-and-comment @@ -944,13 +948,13 @@ Ordinarily the variable `fill-column' controls the width. Noninteractively, the third argument JUSTIFY specifies which kind of justification to do: `full', `left', `right', `center', -or `none' (equivalent to nil). t means handle each paragraph -as specified by its text properties. +or `none' (equivalent to nil). A value of t means handle each +paragraph as specified by its text properties. -The fourth arg NOSQUEEZE non-nil means to leave -whitespace other than line breaks untouched, and fifth arg TO-EOP -non-nil means to keep filling to the end of the paragraph (or next -hard newline, if variable `use-hard-newlines' is on). +The fourth arg NOSQUEEZE non-nil means to leave whitespace other +than line breaks untouched, and fifth arg TO-EOP non-nil means +to keep filling to the end of the paragraph (or next hard newline, +if variable `use-hard-newlines' is on). Return the fill-prefix used for filling the last paragraph. diff --git a/lisp/tumme.el b/lisp/tumme.el index 788a29958a8..2fc6eff2458 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -1646,7 +1646,7 @@ Ask user for number of images to show and the delay in between." ;;;###autoload (defun tumme-display-thumb () - "Shorthard for `tumme-display-thumbs' with prefix argument." + "Shorthand for `tumme-display-thumbs' with prefix argument." (interactive) (tumme-display-thumbs t nil t)) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index cf9a391e5a6..53f41c95646 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -446,7 +446,8 @@ where (cond ((eq key-fun def-fun) ;; No rebinding, return t t) - ((eq key-fun (command-remapping def-fun)) + ((and key-fun + (eq key-fun (command-remapping def-fun))) ;; Just a remapping, return t t) ;; cua-mode specials: @@ -571,6 +572,8 @@ with some explanatory links." (where (nth 3 ck)) s1 s2 help-string) (unless (string= where "Same key") + (when (string= where "") + (setq where (format "M-x %s" def-fun))) (setq tutorial--point-after-chkeys (point-marker) s1 (get-lang-string tutorial--lang 'tut-chgdkey) s2 (get-lang-string tutorial--lang 'tut-chgdkey2) diff --git a/lisp/wdired.el b/lisp/wdired.el index 5a925e5d031..2c43b6f1552 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -576,8 +576,11 @@ If OLD, return the old target. If MOVE, move point before it." (funcall command 1) (setq arg (1- arg))) (error - (if (not (forward-word 1)) - (setq arg 0))))))) + (if (forward-word) + ;; Skip any non-word characters to avoid triggering a read-only + ;; error which would cause skipping the next word characters too. + (skip-syntax-forward "^w") + (setq arg 0))))))) (defun wdired-downcase-word (arg) "WDired version of `downcase-word'. diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 717fcf207da..1c72d0a65fe 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -70,7 +70,7 @@ The default value for this variable is `x-dnd-default-test-function'." "Which function to call to handle a drop of that type. If the type for the drop is not present, or the function is nil, the drop is rejected. The function takes three arguments, WINDOW, ACTION -and DATA. WINDOW is where the drop occured, ACTION is the action for +and DATA. WINDOW is where the drop occurred, ACTION is the action for this drop (copy, move, link, private or ask) as determined by a previous call to `x-dnd-test-function'. DATA is the drop data. The function shall return the action used (copy, move, link or private) if drop diff --git a/man/ChangeLog b/man/ChangeLog index 8bed7ae1672..342bafa4e6b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2007-01-10 Richard Stallman <rms@gnu.org> + + * msdog.texi (Windows Keyboard): Yet another try to make + everyone happy with that passage. + 2007-01-05 Richard Stallman <rms@gnu.org> * anti.texi (Antinews): Mention M-x shell scrolling. diff --git a/man/msdog.texi b/man/msdog.texi index 8aecd513591..4f1711ff9ea 100644 --- a/man/msdog.texi +++ b/man/msdog.texi @@ -336,12 +336,12 @@ keyboard input in Emacs. @cindex MS-Windows keyboard shortcuts Many key combinations (known as ``keyboard shortcuts'') that have conventional uses in MS-Windows programs conflict with traditional -Emacs commands. This conflict arose because the designers of the CUA -interface implemented by MS-Windows did not try to avoid conflict with -Emacs. Examples of conflicts include @kbd{C-c}, @kbd{C-x}, @kbd{C-z}, -@kbd{C-a}, and @kbd{W-@key{SPC}}. You can redefine some of them with -meanings more like the MS-Windows meanings by enabling CUA Mode -(@pxref{CUA Bindings}). +Emacs commands. (These Emacs commands were established years before +MS-Windows, and years before Microsoft.) Examples of conflicts +include @kbd{C-c}, @kbd{C-x}, @kbd{C-z}, @kbd{C-a}, and +@kbd{W-@key{SPC}}. You can redefine some of them with meanings more +like the MS-Windows meanings by enabling CUA Mode (@pxref{CUA +Bindings}). @kindex F10 @r{(MS-Windows)} @cindex menu bar access using keyboard @r{(MS-Windows)} diff --git a/nt/ChangeLog b/nt/ChangeLog index 179efe7a8d4..f3c983e8b37 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2007-01-10 Jason Rumney <jasonr@gnu.org> + + * README: Update URLs and advice about reporting bugs. + 2006-12-29 Jason Rumney <jasonr@gnu.org> * nmake.defs (TEMACS_EXTRA_LINK): Remove duplicated flags from diff --git a/nt/README b/nt/README index b1d7cb5ae57..6a83eadfbb3 100644 --- a/nt/README +++ b/nt/README @@ -1,7 +1,7 @@ Emacs for Windows NT/2000 and Windows 95/98/ME - Copyright (C) 2001, 2002, 2003, 2004, 2005, - 2006 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 + 2007 Free Software Foundation, Inc. See the end of the INSTALL file in this directory for copying permissions. This directory contains support for compiling and running GNU Emacs on @@ -12,7 +12,7 @@ Precompiled distributions are also available; ftp to - ftp://ftp.gnu.org/gnu/windows/emacs/latest/ + ftp://ftp.gnu.org/gnu/emacs/windows/ for the latest precompiled distributions. @@ -59,22 +59,12 @@ about it. First check the file etc/PROBLEMS and the FAQ on the web page above to see if the bug is already known and if there are any workarounds. If not, then check whether the bug has something to do - with code in your .emacs file, e.g. by invoking Emacs with the "-q - --no-site-file" options. - - If you decide that it is a bug in Emacs that might be specific to the - Windows port, send a message to the help-emacs-windows@gnu.org - mailing list describing the bug, the version of Emacs that you are - using, and the operating system that you are running on (Windows NT, - 95 or 98 including service pack level if known). If the bug is - related to subprocesses, also specify which shell you are using (e.g., - include the values of `shell-file-name' and `shell-explicit-file-name' - in your message). - - If you think the bug is not specific to the Windows port of Emacs, - then it is better to mail the bug report to bug-gnu-emacs@gnu.org so - that it will be seen by the right people. If Emacs has been set up to - send mail, you can use the command M-x report-emacs-bug to create and - send the bug report, but in some cases there is a function to report - bugs in a specific package; e.g. M-x gnus-bug for Gnus, M-x - c-submit-bug-report for C/C++/Java mode, etc. + with code in your .emacs file, e.g. by invoking Emacs with the "-Q" + option. + + Use the built in bug reporting functionality in Emacs so that it + will be seen by the right people. You can use the command M-x + report-emacs-bug to create and send the bug report, but in some + cases there is a function to report bugs in a specific package; + e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java + mode, etc. diff --git a/src/ChangeLog b/src/ChangeLog index 97c9d4cbeb9..1974d45dd2c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,71 @@ +2007-01-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * editfns.c (Fformat): Allow integer-format to work with floats of size + larger than most-positive-fixnum (but still smaller than MAXINT). + + * dired.c (Ffile_attributes): Use floats for large uids/gids. + +2007-01-09 Eli Zaretskii <eliz@gnu.org> + + * emacs.c (syms_of_emacs) <path-separator>: Doc fix. + +2007-01-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * callproc.c (Fcall_process_region) [HAVE_MKSTEMP]: Add BLOCK_INPUT + around mkstemp. + + * image.c (XDrawLine) [MAC_OS]: Remove macro. + (XCreateGC_pixmap) [!HAVE_NTGUI]: Likewise. + (x_disable_image) [!HAVE_NTGUI]: Use XCreateGC instead of + XCreateGC_pixmap. + + * macgui.h (Display): Typedef to opaque type. + + * macmenu.c (mac_dialog_modal_filter) [MAC_OSX]: New function. + (Fx_popup_dialog) [MAC_OSX]: Use standard alert if called from + Fmessage_box, Fyes_or_no_p, or Fy_or_n_p. + [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030] (menu_quit_handler): + Use mac_quit_char_key_p. + + * macterm.c (XDrawLine): Rename from mac_draw_line_to_pixmap. + (XCreateGC): Change type of 2nd argument to void *. + (XFreeGC) [USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: + Fix last change. + (mac_to_emacs_modifiers): Change return type to int. + [USE_CARBON_EVENTS] (mac_event_to_emacs_modifiers): Likewise. + (mac_mapped_modifiers): New function. + (XTread_socket): Use it. + [USE_TSM] (mac_handle_text_input_event): Likewise. + (do_window_update) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw. + (mac_quit_char_modifiers, mac_quit_char_keycode) [MAC_OSX]: + Remove variables. + (mac_determine_quit_char_modifiers, init_quit_char_handler) + [MAC_OSX]: Remove functions. + (make_ctrl_char) [MAC_OSX]: Add extern. + (mac_quit_char_key_p) [MAC_OSX]: New function. + (mac_initialize) [MAC_OSX]: Don't call init_quit_char_handler. + + * macterm.h (FONT_MAX_WIDTH): Remove unused macro. + (XCreateGC): Change type in extern. + (XDrawLine): Rename from mac_draw_line_to_pixmap. + (mac_quit_char_key_p) [MAC_OSX]: Add extern. + +2007-01-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * keyboard.c (init_keyboard): Initialize interrupt_input_blocked and + interrupt_input_pending. + + * xterm.h (x_display_info): New: net_supported_atoms, + nr_net_supported_atoms and net_supported_window. + + * xterm.c: New variable last_user_time. + (handle_one_xevent): Set last_user_time from events that have Time. + Set net_supported_window to 0 when reparented. + (wm_supports): New function. + (do_ewmh_fullscreen): Use wm_supports to check for _NET_WM_STATE. + (x_term_init): Initialize net_supported_atoms, nr_net_supported_atoms + and net_supported_window. + 2007-01-05 Kim F. Storm <storm@cua.dk> * indent.c (Fvertical_motion): Fix it overshoot check for overlay @@ -148,8 +216,8 @@ 2006-12-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> - * macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]: Call - mac_update_proxy_icon also when buffer modification flag changed. + * macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]: + Call mac_update_proxy_icon also when buffer modification flag changed. [TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias, but compare FSRef/FSSpec of resolved alias. @@ -242,8 +310,8 @@ (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function. (syms_of_macfns) [USE_ATSUI]: Defsubr it. - * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use - mac_wakeup_from_rne instead of mac_post_mouse_moved_event. + * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): + Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event. * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call ATSUGetGlyphBounds if not necessary. @@ -256,8 +324,8 @@ (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name. Don't get metrics for Latin-1 right half characters. (mac_load_query_font): Don't load font if space width is not positive. - [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use - mac_wakeup_from_rne instead of mac_post_mouse_moved_event. + [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): + Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event. (XTread_socket): Call SelectWindow when unfocused frame is clicked. * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern. diff --git a/src/callproc.c b/src/callproc.c index bc9c8d67d11..eb7f8ff6252 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1107,7 +1107,11 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r #ifdef HAVE_MKSTEMP { - int fd = mkstemp (tempfile); + int fd; + + BLOCK_INPUT; + fd = mkstemp (tempfile); + UNBLOCK_INPUT; if (fd == -1) report_file_error ("Failed to open temporary file", Fcons (Vtemp_file_name_pattern, Qnil)); diff --git a/src/dired.c b/src/dired.c index ffaeb5adee4..7b8f978b20c 100644 --- a/src/dired.c +++ b/src/dired.c @@ -1,6 +1,6 @@ /* Lisp functions for making directory listings. Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -966,16 +966,18 @@ Elements of the attribute list are: values[1] = make_number (s.st_nlink); if (NILP (id_format) || EQ (id_format, Qinteger)) { - values[2] = make_number (s.st_uid); - values[3] = make_number (s.st_gid); + values[2] = make_fixnum_or_float (s.st_uid); + values[3] = make_fixnum_or_float (s.st_gid); } else { BLOCK_INPUT; pw = (struct passwd *) getpwuid (s.st_uid); - values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid)); + values[2] = (pw ? build_string (pw->pw_name) + : make_fixnum_or_float (s.st_uid)); gr = (struct group *) getgrgid (s.st_gid); - values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid)); + values[3] = (gr ? build_string (gr->gr_name) + : make_fixnum_or_float (s.st_gid)); UNBLOCK_INPUT; } values[4] = make_time (s.st_atime); diff --git a/src/editfns.c b/src/editfns.c index 6089ee9a2e2..ab29a07b693 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1,7 +1,7 @@ /* Lisp functions pertaining to editing. Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 Free Software Foundation, Inc. + 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3631,7 +3631,12 @@ usage: (format STRING &rest OBJECTS) */) if (*format != 'd' && *format != 'o' && *format != 'x' && *format != 'i' && *format != 'X' && *format != 'c') error ("Invalid format operation %%%c", *format); - args[n] = Ftruncate (args[n], Qnil); + /* This fails unnecessarily if args[n] is bigger than + most-positive-fixnum but smaller than MAXINT. + These cases are important because we sometimes use floats + to represent such integer values (typically such values + come from UIDs or PIDs). */ + /* args[n] = Ftruncate (args[n], Qnil); */ } /* Note that we're using sprintf to print floats, @@ -3799,8 +3804,15 @@ usage: (format STRING &rest OBJECTS) */) else sprintf (p, this_format, XUINT (args[n])); } - else + else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g') sprintf (p, this_format, XFLOAT_DATA (args[n])); + else if (format[-1] == 'd') + /* Maybe we should use "%1.0f" instead so it also works + for values larger than MAXINT. */ + sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n])); + else + /* Don't sign-extend for octal or hex printing. */ + sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n])); if (p > buf && multibyte diff --git a/src/emacs.c b/src/emacs.c index 8ffab8f0d3d..d068ee767bf 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2483,7 +2483,8 @@ before you compile Emacs, to enable the code for this feature. */); emacs_priority = 0; DEFVAR_LISP ("path-separator", &Vpath_separator, - doc: /* The directory separator in search paths, as a string. */); + doc: /* String containing the character that separates directories in +search paths, such as PATH and other similar environment variables. */); { char c = SEPCHAR; Vpath_separator = make_string (&c, 1); diff --git a/src/image.c b/src/image.c index 8f13da337ff..b4ee3104543 100644 --- a/src/image.c +++ b/src/image.c @@ -122,8 +122,6 @@ typedef struct mac_bitmap_record Bitmap_Record; #define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual #define x_defined_color mac_defined_color #define DefaultDepthOfScreen(screen) (one_mac_display_info.n_planes) -#define XDrawLine(display, w, gc, x1, y1, x2, y2) \ - mac_draw_line_to_pixmap(display, w, gc, x1, y1, x2, y2) #endif /* MAC_OS */ @@ -5253,14 +5251,12 @@ x_disable_image (f, img) GC gc; #ifdef MAC_OS -#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, NULL, 0, NULL) #define MaskForeground(f) PIX_MASK_DRAW #else -#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, pixmap, 0, NULL) #define MaskForeground(f) WHITE_PIX_DEFAULT (f) #endif - gc = XCreateGC_pixmap (dpy, img->pixmap); + gc = XCreateGC (dpy, img->pixmap, 0, NULL); XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f)); XDrawLine (dpy, img->pixmap, gc, 0, 0, img->width - 1, img->height - 1); @@ -5270,7 +5266,7 @@ x_disable_image (f, img) if (img->mask) { - gc = XCreateGC_pixmap (dpy, img->mask); + gc = XCreateGC (dpy, img->mask, 0, NULL); XSetForeground (dpy, gc, MaskForeground (f)); XDrawLine (dpy, img->mask, gc, 0, 0, img->width - 1, img->height - 1); diff --git a/src/keyboard.c b/src/keyboard.c index 656a642c666..c2603427004 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11410,6 +11410,8 @@ init_keyboard () do_mouse_tracking = Qnil; #endif input_pending = 0; + interrupt_input_blocked = 0; + interrupt_input_pending = 0; /* This means that command_loop_1 won't try to select anything the first time through. */ diff --git a/src/macgui.h b/src/macgui.h index 3a9913181de..7eed001a4db 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ #ifndef EMACS_MACGUI_H #define EMACS_MACGUI_H -typedef int Display; /* fix later */ +typedef struct _XDisplay Display; /* opaque */ typedef Lisp_Object XrmDatabase; diff --git a/src/macmenu.c b/src/macmenu.c index 9981250979a..a70a80d32ed 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -876,6 +876,32 @@ no quit occurs and `x-popup-menu' returns nil. */) #ifdef HAVE_MENUS +/* Regard ESC and C-g as Cancel even without the Cancel button. */ + +#ifdef MAC_OSX +static Boolean +mac_dialog_modal_filter (dialog, event, item_hit) + DialogRef dialog; + EventRecord *event; + DialogItemIndex *item_hit; +{ + Boolean result; + + result = StdFilterProc (dialog, event, item_hit); + if (result == false + && (event->what == keyDown || event->what == autoKey) + && ((event->message & charCodeMask) == kEscapeCharCode + || mac_quit_char_key_p (event->modifiers, + (event->message & keyCodeMask) >> 8))) + { + *item_hit = kStdCancelItemIndex; + return true; + } + + return result; +} +#endif + DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, doc: /* Pop up a dialog box and return user's selection. POSITION specifies which frame to use. @@ -961,6 +987,96 @@ for instance using the window manager, then this produces a quit and but I don't want to make one now. */ CHECK_WINDOW (window); +#ifdef MAC_OSX + /* Special treatment for Fmessage_box, Fyes_or_no_p, and Fy_or_n_p. */ + if (EQ (position, Qt) + && STRINGP (Fcar (contents)) + && ((!NILP (Fequal (XCDR (contents), + Fcons (Fcons (build_string ("OK"), Qt), Qnil))) + && EQ (header, Qt)) + || (!NILP (Fequal (XCDR (contents), + Fcons (Fcons (build_string ("Yes"), Qt), + Fcons (Fcons (build_string ("No"), Qnil), + Qnil)))) + && NILP (header)))) + { + OSStatus err = noErr; + AlertStdCFStringAlertParamRec param; + CFStringRef error_string, explanation_string; + DialogRef alert; + DialogItemIndex item_hit; + Lisp_Object tem; + + tem = Fstring_match (concat3 (build_string ("\\("), + call0 (intern ("sentence-end")), + build_string ("\\)\n")), + XCAR (contents), Qnil); + BLOCK_INPUT; + if (NILP (tem)) + { + error_string = cfstring_create_with_string (XCAR (contents)); + if (error_string == NULL) + err = memFullErr; + explanation_string = NULL; + } + else + { + tem = Fmatch_end (make_number (1)); + error_string = + cfstring_create_with_string (Fsubstring (XCAR (contents), + make_number (0), tem)); + if (error_string == NULL) + err = memFullErr; + else + { + XSETINT (tem, XINT (tem) + 1); + explanation_string = + cfstring_create_with_string (Fsubstring (XCAR (contents), + tem, Qnil)); + if (explanation_string == NULL) + { + CFRelease (error_string); + err = memFullErr; + } + } + } + if (err == noErr) + err = GetStandardAlertDefaultParams (¶m, + kStdCFStringAlertVersionOne); + if (err == noErr) + { + param.movable = true; + param.position = kWindowAlertPositionParentWindow; + if (NILP (header)) + { + param.defaultText = CFSTR ("Yes"); + param.otherText = CFSTR ("No"); +#if 0 + param.cancelText = CFSTR ("Cancel"); + param.cancelButton = kAlertStdAlertCancelButton; +#endif + } + err = CreateStandardAlert (kAlertNoteAlert, error_string, + explanation_string, ¶m, &alert); + CFRelease (error_string); + if (explanation_string) + CFRelease (explanation_string); + } + if (err == noErr) + err = RunStandardAlert (alert, mac_dialog_modal_filter, &item_hit); + UNBLOCK_INPUT; + + if (err == noErr) + { + if (item_hit == kStdCancelItemIndex) + Fsignal (Qquit, Qnil); + else if (item_hit == kStdOkItemIndex) + return Qt; + else + return Qnil; + } + } +#endif #ifndef HAVE_DIALOGS /* Display a menu with these alternatives in the middle of frame F. */ @@ -1537,8 +1653,6 @@ menu_quit_handler (nextHandler, theEvent, userData) OSStatus err; UInt32 keyCode; UInt32 keyModifiers; - extern int mac_quit_char_modifiers; - extern int mac_quit_char_keycode; err = GetEventParameter (theEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode); @@ -1548,8 +1662,7 @@ menu_quit_handler (nextHandler, theEvent, userData) typeUInt32, NULL, sizeof(UInt32), NULL, &keyModifiers); - if (err == noErr && keyCode == mac_quit_char_keycode - && keyModifiers == mac_quit_char_modifiers) + if (err == noErr && mac_quit_char_key_p (keyModifiers, keyCode)) { MenuRef menu = userData != 0 ? (MenuRef)userData : AcquireRootMenu (); diff --git a/src/macterm.c b/src/macterm.c index 7c3f036f1ba..1706da48cc3 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -505,8 +505,10 @@ mac_draw_line (f, gc, x1, y1, x2, y2) #endif } +/* Mac version of XDrawLine (to Pixmap). */ + void -mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2) +XDrawLine (display, p, gc, x1, y1, x2, y2) Display *display; Pixmap p; GC gc; @@ -1628,9 +1630,9 @@ XChangeGC (display, gc, mask, xgcv) /* Mac replacement for XCreateGC. */ GC -XCreateGC (display, window, mask, xgcv) +XCreateGC (display, d, mask, xgcv) Display *display; - Window window; + void *d; unsigned long mask; XGCValues *xgcv; { @@ -1663,8 +1665,13 @@ XFreeGC (display, gc) if (gc->clip_region) DisposeRgn (gc->clip_region); #if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - CGColorRelease (gc->cg_fore_color); - CGColorRelease (gc->cg_back_color); +#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020 + if (CGColorGetTypeID != NULL) +#endif + { + CGColorRelease (gc->cg_fore_color); + CGColorRelease (gc->cg_back_color); + } #endif xfree (gc); } @@ -8967,7 +8974,7 @@ static const unsigned char fn_keycode_to_keycode_table[] = { }; #endif /* MAC_OSX */ -static unsigned int +static int #if USE_CARBON_EVENTS mac_to_emacs_modifiers (UInt32 mods) #else @@ -9014,6 +9021,23 @@ mac_to_emacs_modifiers (EventModifiers mods) return result; } +static UInt32 +mac_mapped_modifiers (modifiers) + UInt32 modifiers; +{ + UInt32 mapped_modifiers_all = + (NILP (Vmac_control_modifier) ? 0 : controlKey) + | (NILP (Vmac_option_modifier) ? 0 : optionKey) + | (NILP (Vmac_command_modifier) ? 0 : cmdKey); + +#ifdef MAC_OSX + mapped_modifiers_all |= + (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask); +#endif + + return mapped_modifiers_all & modifiers; +} + static int mac_get_emulated_btn ( UInt32 modifiers ) { @@ -9031,7 +9055,7 @@ mac_get_emulated_btn ( UInt32 modifiers ) #if USE_CARBON_EVENTS /* Obtains the event modifiers from the event ref and then calls mac_to_emacs_modifiers. */ -static UInt32 +static int mac_event_to_emacs_modifiers (EventRef eventRef) { UInt32 mods = 0; @@ -9256,6 +9280,9 @@ do_window_update (WindowPtr win) GetPortVisibleRegion (GetWindowPort (win), region); GetRegionBounds (region, &r); expose_frame (f, r.left, r.top, r.right - r.left, r.bottom - r.top); +#if USE_CG_DRAWING + mac_prepare_for_quickdraw (f); +#endif UpdateControls (win, region); DisposeRgn (region); #else @@ -10067,21 +10094,10 @@ mac_handle_text_input_event (next_handler, event, data) err = GetEventParameter (kbd_event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof (UInt32), NULL, &modifiers); - if (err == noErr) - { - mapped_modifiers = - (NILP (Vmac_control_modifier) ? 0 : controlKey) - | (NILP (Vmac_option_modifier) ? 0 : optionKey) - | (NILP (Vmac_command_modifier) ? 0 : cmdKey); -#ifdef MAC_OSX - mapped_modifiers |= - (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask); -#endif - if (modifiers & mapped_modifiers) - /* There're mapped modifier keys. Process it in - XTread_socket. */ - return eventNotHandledErr; - } + if (err == noErr && mac_mapped_modifiers (modifiers)) + /* There're mapped modifier keys. Process it in + XTread_socket. */ + return eventNotHandledErr; if (err == noErr) err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, typeUnicodeText, NULL, 0, &actual_size, @@ -11032,20 +11048,12 @@ XTread_socket (sd, expected, hold_quit) SInt16 current_key_script; UInt32 modifiers = er.modifiers, mapped_modifiers; - mapped_modifiers = - (NILP (Vmac_control_modifier) ? 0 : controlKey) - | (NILP (Vmac_option_modifier) ? 0 : optionKey) - | (NILP (Vmac_command_modifier) ? 0 : cmdKey); - #if USE_CARBON_EVENTS && defined (MAC_OSX) - mapped_modifiers |= - (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask); - GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL, sizeof (UInt32), NULL, &modifiers); #endif - mapped_modifiers &= modifiers; + mapped_modifiers = mac_mapped_modifiers (modifiers); #if USE_CARBON_EVENTS && (defined (MAC_OSX) || USE_MAC_TSM) /* When using Carbon Events, we need to pass raw keyboard @@ -11639,34 +11647,33 @@ MakeMeTheFrontProcess () } /***** Code to handle C-g testing *****/ - -/* Contains the Mac modifier formed from quit_char */ -int mac_quit_char_modifiers = 0; -int mac_quit_char_keycode; extern int quit_char; +extern int make_ctrl_char P_ ((int)); -static void -mac_determine_quit_char_modifiers() -{ - /* Todo: Determine modifiers from quit_char. */ - UInt32 qc_modifiers = ctrl_modifier; +int +mac_quit_char_key_p (modifiers, key_code) + UInt32 modifiers, key_code; +{ + UInt32 char_code; + unsigned long some_state = 0; + Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); + int c, emacs_modifiers; + + /* Mask off modifier keys that are mapped to some Emacs modifiers. */ + key_code |= (modifiers & ~(mac_mapped_modifiers (modifiers))); + char_code = KeyTranslate (kchr_ptr, key_code, &some_state); + if (char_code & ~0xff) + return 0; - /* Map modifiers */ - mac_quit_char_modifiers = 0; - if (qc_modifiers & ctrl_modifier) mac_quit_char_modifiers |= controlKey; - if (qc_modifiers & shift_modifier) mac_quit_char_modifiers |= shiftKey; - if (qc_modifiers & alt_modifier) mac_quit_char_modifiers |= optionKey; -} + emacs_modifiers = mac_to_emacs_modifiers (modifiers); + if (emacs_modifiers & ctrl_modifier) + c = make_ctrl_char (char_code); -static void -init_quit_char_handler () -{ - /* TODO: Let this support keys other the 'g' */ - mac_quit_char_keycode = 5; - /* Look at <architecture/adb_kb_map.h> for details */ - /* http://gemma.apple.com/techpubs/mac/Toolbox/Toolbox-40.html#MARKER-9-184*/ + c |= (emacs_modifiers + & (meta_modifier | alt_modifier + | hyper_modifier | super_modifier)); - mac_determine_quit_char_modifiers(); + return c == quit_char; } #endif /* MAC_OSX */ @@ -11804,8 +11811,6 @@ mac_initialize () #if USE_CARBON_EVENTS #ifdef MAC_OSX init_service_handler (); - - init_quit_char_handler (); #endif /* MAC_OSX */ init_command_handler (); diff --git a/src/macterm.h b/src/macterm.h index c941fafb690..c7d86f157f1 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -44,8 +44,6 @@ Boston, MA 02110-1301, USA. */ #define FONT_BASE(f) ((f)->ascent) #define FONT_DESCENT(f) ((f)->descent) -#define FONT_MAX_WIDTH(f) FONT_WIDTH(f) /* fix later */ - /* Structure recording bitmaps and reference count. If REFCOUNT is 0 then this record is free to be reused. */ @@ -614,13 +612,12 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, unsigned long, unsigned long, unsigned int)); extern void XFreePixmap P_ ((Display *, Pixmap)); -extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *)); +extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *)); extern void XFreeGC P_ ((Display *, GC)); extern void XSetForeground P_ ((Display *, GC, unsigned long)); extern void XSetBackground P_ ((Display *, GC, unsigned long)); extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); -extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, - int, int)); +extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int)); extern void mac_clear_area P_ ((struct frame *, int, int, unsigned int, unsigned int)); extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); @@ -636,6 +633,9 @@ extern void do_apple_menu P_ ((SInt16)); #if USE_CG_DRAWING extern void mac_prepare_for_quickdraw P_ ((struct frame *)); #endif +#ifdef MAC_OSX +extern int mac_quit_char_key_p P_ ((UInt32, UInt32)); +#endif #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 diff --git a/src/xterm.c b/src/xterm.c index e16fb852873..122d9b7c3de 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -276,6 +276,10 @@ static Lisp_Object last_mouse_scroll_bar; static Time last_mouse_movement_time; +/* Time for last user interaction as returned in X events. */ + +static Time last_user_time; + /* Incremented by XTread_socket whenever it really tries to read events. */ @@ -5882,6 +5886,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) break; case SelectionNotify: + last_user_time = event.xselection.time; #ifdef USE_X_TOOLKIT if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) goto OTHER; @@ -5890,6 +5895,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) break; case SelectionClear: /* Someone has grabbed ownership. */ + last_user_time = event.xselectionclear.time; #ifdef USE_X_TOOLKIT if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) goto OTHER; @@ -5906,6 +5912,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) break; case SelectionRequest: /* Someone wants our selection. */ + last_user_time = event.xselectionrequest.time; #ifdef USE_X_TOOLKIT if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) goto OTHER; @@ -5926,6 +5933,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) break; case PropertyNotify: + last_user_time = event.xproperty.time; #if 0 /* This is plain wrong. In the case that we are waiting for a PropertyNotify used as an ACK in incremental selection transfer, the property will be on the receiver's window. */ @@ -5949,6 +5957,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) /* Perhaps reparented due to a WM restart. Reset this. */ FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; + FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0; } goto OTHER; @@ -6107,6 +6116,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) case KeyPress: + last_user_time = event.xkey.time; ignore_next_mouse_click_timeout = 0; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) @@ -6497,6 +6507,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) #endif case KeyRelease: + last_user_time = event.xkey.time; #ifdef HAVE_X_I18N /* Don't dispatch this event since XtDispatchEvent calls XFilterEvent, and two calls in a row may freeze the @@ -6507,6 +6518,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) #endif case EnterNotify: + last_user_time = event.xcrossing.time; x_detect_focus_change (dpyinfo, &event, &inev.ie); f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); @@ -6547,6 +6559,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) goto OTHER; case LeaveNotify: + last_user_time = event.xcrossing.time; x_detect_focus_change (dpyinfo, &event, &inev.ie); f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); @@ -6580,6 +6593,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) case MotionNotify: { + last_user_time = event.xmotion.time; previous_help_echo_string = help_echo_string; help_echo_string = Qnil; @@ -6728,6 +6742,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) bzero (&compose_status, sizeof (compose_status)); last_mouse_glyph_frame = 0; + last_user_time = event.xbutton.time; if (dpyinfo->grabbed && last_mouse_frame @@ -8336,40 +8351,111 @@ x_set_offset (f, xoff, yoff, change_gravity) UNBLOCK_INPUT; } -/* Do fullscreen as specified in extended window manager hints */ +/* Return non-zero if _NET_SUPPORTING_WM_CHECK window exists and _NET_SUPPORTED + on the root window for frame F contains ATOMNAME. + This is how a WM check shall be done according to the Window Manager + Specification/Extended Window Manager Hints at + http://freedesktop.org/wiki/Standards_2fwm_2dspec. */ + static int -do_ewmh_fullscreen (f) +wm_supports (f, atomname) struct frame *f; + const char *atomname; { - int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms; + Atom actual_type; + unsigned long actual_size, bytes_remaining; + int i, rc, actual_format; + Atom prop_atom; + Window wmcheck_window; + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Window target_window = dpyinfo->root_window; + long max_len = 65536; + Display *dpy = FRAME_X_DISPLAY (f); + unsigned char *tmp_data = NULL; + Atom target_type = XA_WINDOW; + Atom want_atom; + + BLOCK_INPUT; + + prop_atom = XInternAtom (dpy, "_NET_SUPPORTING_WM_CHECK", False); + + x_catch_errors (dpy); + rc = XGetWindowProperty (dpy, target_window, + prop_atom, 0, max_len, False, target_type, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, &tmp_data); + + if (rc != Success || actual_type != XA_WINDOW || x_had_errors_p (dpy)) + { + if (tmp_data) XFree (tmp_data); + x_uncatch_errors (); + UNBLOCK_INPUT; + return 0; + } + + wmcheck_window = *(Window *) tmp_data; + XFree (tmp_data); - if (!have_net_atom) + /* Check if window exists. */ + XSelectInput (dpy, wmcheck_window, StructureNotifyMask); + x_sync (f); + if (x_had_errors_p (dpy)) { - int num; - Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), - FRAME_X_DISPLAY_INFO (f)->root_window, - &num); - if (atoms && num > 0) + x_uncatch_errors (); + UNBLOCK_INPUT; + return 0; + } + + if (dpyinfo->net_supported_window != wmcheck_window) + { + /* Window changed, reload atoms */ + if (dpyinfo->net_supported_atoms != NULL) + XFree (dpyinfo->net_supported_atoms); + dpyinfo->net_supported_atoms = NULL; + dpyinfo->nr_net_supported_atoms = 0; + dpyinfo->net_supported_window = 0; + + target_type = XA_ATOM; + prop_atom = XInternAtom (dpy, "_NET_SUPPORTED", False); + tmp_data = NULL; + rc = XGetWindowProperty (dpy, target_window, + prop_atom, 0, max_len, False, target_type, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, &tmp_data); + + if (rc != Success || actual_type != XA_ATOM || x_had_errors_p (dpy)) { - char **names = (char **) xmalloc (num * sizeof(*names)); - if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) - { - int i; - for (i = 0; i < num; ++i) - { - if (!have_net_atom) - have_net_atom = strncmp (names[i], "_NET_", 5) == 0; - XFree (names[i]); - } - } - xfree (names); + if (tmp_data) XFree (tmp_data); + x_uncatch_errors (); + UNBLOCK_INPUT; + return 0; } - if (atoms) - XFree (atoms); - FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; + dpyinfo->net_supported_atoms = (Atom *)tmp_data; + dpyinfo->nr_net_supported_atoms = actual_size; + dpyinfo->net_supported_window = wmcheck_window; } + rc = 0; + want_atom = XInternAtom (dpy, atomname, False); + + for (i = 0; rc == 0 && i < dpyinfo->nr_net_supported_atoms; ++i) + rc = dpyinfo->net_supported_atoms[i] == want_atom; + + x_uncatch_errors (); + UNBLOCK_INPUT; + + return rc; +} + +/* Do fullscreen as specified in extended window manager hints */ + +static int +do_ewmh_fullscreen (f) + struct frame *f; +{ + int have_net_atom = wm_supports (f, "_NET_WM_STATE"); + if (have_net_atom) { Lisp_Object frame; @@ -8396,6 +8482,9 @@ do_ewmh_fullscreen (f) break; } + if (!wm_supports (f, what)) return 0; + + Fx_send_client_event (frame, make_number (0), frame, make_unibyte_string (atom, strlen (atom)), make_number (32), @@ -8796,23 +8885,27 @@ XTframe_raise_lower (f, raise_flag) /* The following code is needed for `raise-frame' to work on some versions of metacity; see Window Manager Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Standards_2fwm_2dspec + http://freedesktop.org/wiki/Standards_2fwm_2dspec */ - However, on other versions (metacity 2.17.2-1.fc7), it +#if 0 + /* However, on other versions (metacity 2.17.2-1.fc7), it reportedly causes hangs when resizing frames. */ - /* Lisp_Object frame; - const char *atom = "_NET_ACTIVE_WINDOW"; */ - - x_raise_frame (f); - - /* XSETFRAME (frame, f); - Fx_send_client_event (frame, make_number (0), frame, - make_unibyte_string (atom, strlen (atom)), - make_number (32), - Fcons (make_number (1), - Fcons (make_number (time (NULL) * 1000), - Qnil))); */ + const char *atom = "_NET_ACTIVE_WINDOW"; + if (f->async_visible && wm_supports (f, atom)) + { + Lisp_Object frame; + XSETFRAME (frame, f); + Fx_send_client_event (frame, make_number (0), frame, + make_unibyte_string (atom, strlen (atom)), + make_number (32), + Fcons (make_number (1), + Fcons (make_number (last_user_time), + Qnil))); + } + else +#endif + x_raise_frame (f); } else x_lower_frame (f); @@ -10807,6 +10900,10 @@ x_term_init (display_name, xrm_option, resource_name) dpyinfo->x_dnd_atoms = xmalloc (sizeof (*dpyinfo->x_dnd_atoms) * dpyinfo->x_dnd_atoms_size); + dpyinfo->net_supported_atoms = NULL; + dpyinfo->nr_net_supported_atoms = 0; + dpyinfo->net_supported_window = 0; + connection = ConnectionNumber (dpyinfo->display); dpyinfo->connection = connection; diff --git a/src/xterm.h b/src/xterm.h index 1ea50b8158f..b8e86d646ed 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -396,7 +396,10 @@ struct x_display_info size_t x_dnd_atoms_size; size_t x_dnd_atoms_length; - int have_net_atoms; + /* Extended window manager hints, Atoms supported by the window manager */ + Atom *net_supported_atoms; + int nr_net_supported_atoms; + Window net_supported_window; }; #ifdef HAVE_X_I18N |