diff options
| author | Miles Bader | 2007-11-09 09:45:30 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-11-09 09:45:30 +0000 |
| commit | c12ecb0af9679cc0e2fa0409931c34c035763469 (patch) | |
| tree | bd118c7ebc571de0dab542f48ad0c1648c6ccf72 | |
| parent | e83d1fe87564d06d2fcbb4006dfd9133bc340aa8 (diff) | |
| parent | 9d2185d10e3da9062672d96d3b59fcea31ff17ed (diff) | |
| download | emacs-c12ecb0af9679cc0e2fa0409931c34c035763469.tar.gz emacs-c12ecb0af9679cc0e2fa0409931c34c035763469.zip | |
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-923
35 files changed, 580 insertions, 176 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index a6277c545c9..387baade381 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -41,6 +41,18 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem. | |||
| 41 | ** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process) | 41 | ** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process) |
| 42 | http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00690.html | 42 | http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00690.html |
| 43 | 43 | ||
| 44 | ** undefined reference getopt_long | ||
| 45 | Report by Daniel C. Bastos <dbast0s@yahoo.com.br> on bug-gnu-emacs | ||
| 46 | from 2007-08-27. Impossible to procede without more input from OP (as | ||
| 47 | of 20070912, emails are bouncing) or someone else who can reproduce this. | ||
| 48 | http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01497.html | ||
| 49 | |||
| 50 | ** emacs-22.1 with GTK problems (with patches) | ||
| 51 | Only outstanding issue seems to be whether Solaris 2.6 GTK can be | ||
| 52 | supported in the absence of recursive mutexes, via a change to | ||
| 53 | alloc.c, or whether configure should abort. | ||
| 54 | http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00055.html | ||
| 55 | |||
| 44 | * BUGS | 56 | * BUGS |
| 45 | 57 | ||
| 46 | ** Document the changes introduced by multi-tty | 58 | ** Document the changes introduced by multi-tty |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 32617c97b20..7685a3ce789 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2007-11-09 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus.texi, gnus-faq.texi, message.texi: Bump version to 5.10.9. | ||
| 4 | |||
| 5 | 2007-11-09 Nick Roberts <nickrob@snap.net.nz> | ||
| 6 | |||
| 7 | * building.texi (Watch Expressions): Remove obscure sentence. | ||
| 8 | |||
| 1 | 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp> | 9 | 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp> |
| 2 | 10 | ||
| 3 | * mule.texi (Select Input Method): Describe how to activate an input | 11 | * mule.texi (Select Input Method): Describe how to activate an input |
| @@ -15,11 +23,20 @@ | |||
| 15 | 23 | ||
| 16 | * gnus.texi (Troubleshooting): Adjust Gnus version number. | 24 | * gnus.texi (Troubleshooting): Adjust Gnus version number. |
| 17 | 25 | ||
| 26 | 2007-10-30 Nick Roberts <nickrob@snap.net.nz> | ||
| 27 | |||
| 28 | * building.texi (Watch Expressions): Describe gdb-delete-out-of-scope. | ||
| 29 | |||
| 18 | 2007-10-30 Glenn Morris <rgm@gnu.org> | 30 | 2007-10-30 Glenn Morris <rgm@gnu.org> |
| 19 | 31 | ||
| 20 | * misc.texi (Directory Tracking): Explain a bit more about | 32 | * misc.texi (Directory Tracking): Explain a bit more about |
| 21 | dirtrack-mode. | 33 | dirtrack-mode. |
| 22 | 34 | ||
| 35 | 2007-10-29 Richard Stallman <rms@gnu.org> | ||
| 36 | |||
| 37 | * widget.texi (Introduction): Delete discussion of implementation | ||
| 38 | internals. | ||
| 39 | |||
| 23 | 2007-10-25 Glenn Morris <rgm@gnu.org> | 40 | 2007-10-25 Glenn Morris <rgm@gnu.org> |
| 24 | 41 | ||
| 25 | * fortran-xtra.texi (Fortran): F90 mode handles F2003. | 42 | * fortran-xtra.texi (Fortran): F90 mode handles F2003. |
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 45210118f77..a8bea90a635 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -1121,6 +1121,13 @@ changed and @code{shadow} face to make variables which have gone out of | |||
| 1121 | scope less noticeable. When a variable goes out of scope you can't | 1121 | scope less noticeable. When a variable goes out of scope you can't |
| 1122 | edit its value. | 1122 | edit its value. |
| 1123 | 1123 | ||
| 1124 | @vindex gdb-delete-out-of-scope | ||
| 1125 | If the variable @code{gdb-delete-out-of-scope} is non-@code{nil} | ||
| 1126 | (the default value), Emacs automatically deletes watch expressions | ||
| 1127 | which go out of scope. Sometimes, when re-entering the same function, | ||
| 1128 | it may be useful to set this value to nil so that you don't need to | ||
| 1129 | recreate the watch expression. | ||
| 1130 | |||
| 1124 | @vindex gdb-use-colon-colon-notation | 1131 | @vindex gdb-use-colon-colon-notation |
| 1125 | If the variable @code{gdb-use-colon-colon-notation} is | 1132 | If the variable @code{gdb-use-colon-colon-notation} is |
| 1126 | non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}} | 1133 | non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}} |
diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index 35f0722406e..49b2976472e 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi | |||
| @@ -142,19 +142,6 @@ extended to use the GUI features. This means that your code using the | |||
| 142 | widget library will also use the new graphic features automatically. | 142 | widget library will also use the new graphic features automatically. |
| 143 | @end enumerate | 143 | @end enumerate |
| 144 | 144 | ||
| 145 | In order to minimize the code that is loaded by users who do not | ||
| 146 | create any widgets, the code has been split in two files: | ||
| 147 | |||
| 148 | @cindex widget library, files | ||
| 149 | @table @file | ||
| 150 | @item widget.el | ||
| 151 | This will declare the user variables, define the function | ||
| 152 | @code{define-widget}, and autoload the function @code{widget-create}. | ||
| 153 | @item wid-edit.el | ||
| 154 | Everything else is here, there is no reason to load it explicitly, as | ||
| 155 | it will be autoloaded when needed. | ||
| 156 | @end table | ||
| 157 | |||
| 158 | @node User Interface, Programming Example, Introduction, Top | 145 | @node User Interface, Programming Example, Introduction, Top |
| 159 | @comment node-name, next, previous, up | 146 | @comment node-name, next, previous, up |
| 160 | @section User Interface | 147 | @section User Interface |
diff --git a/etc/NEWS.22 b/etc/NEWS.22 index 783092f4f5c..a8e8b3fbb8c 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 | |||
| @@ -42,15 +42,6 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. | |||
| 42 | 42 | ||
| 43 | * Changes in Emacs 22.2 | 43 | * Changes in Emacs 22.2 |
| 44 | 44 | ||
| 45 | ** `browse-url-emacs' loads a URL into an Emacs buffer. Handy for *.el URLs. | ||
| 46 | |||
| 47 | ** `bad-packages-alist' will warn about external packages that are known | ||
| 48 | to cause problems in this version of Emacs. | ||
| 49 | |||
| 50 | ** The values of `dired-recursive-deletes' and `dired-recursive-copies' | ||
| 51 | have been changed to `top'. This means that the user is asked once, | ||
| 52 | before deleting/copying the indicated directory recursively. | ||
| 53 | |||
| 54 | ** In Image mode, whenever the displayed image is wider and/or higher | 45 | ** In Image mode, whenever the displayed image is wider and/or higher |
| 55 | than the window, the usual keys for moving the cursor cause the image | 46 | than the window, the usual keys for moving the cursor cause the image |
| 56 | to be scrolled horizontally or vertically instead. | 47 | to be scrolled horizontally or vertically instead. |
| @@ -67,6 +58,15 @@ Windows installations. Users of software which modifies the behaviour of | |||
| 67 | Windows to cause focus to follow the mouse will now need to explicitly set | 58 | Windows to cause focus to follow the mouse will now need to explicitly set |
| 68 | this variable. | 59 | this variable. |
| 69 | 60 | ||
| 61 | ** `bad-packages-alist' will warn about external packages that are known | ||
| 62 | to cause problems in this version of Emacs. | ||
| 63 | |||
| 64 | ** The values of `dired-recursive-deletes' and `dired-recursive-copies' | ||
| 65 | have been changed to `top'. This means that the user is asked once, | ||
| 66 | before deleting/copying the indicated directory recursively. | ||
| 67 | |||
| 68 | ** `browse-url-emacs' loads a URL into an Emacs buffer. Handy for *.el URLs. | ||
| 69 | |||
| 70 | ** The command gdba has been removed as gdb works now for those cases where it | 70 | ** The command gdba has been removed as gdb works now for those cases where it |
| 71 | was needed. In text command mode, if you have problems before execution has | 71 | was needed. In text command mode, if you have problems before execution has |
| 72 | started, use M-x gud-gdb. | 72 | started, use M-x gud-gdb. |
| @@ -106,7 +106,8 @@ This can be used to add menu entries for backend specific functions. | |||
| 106 | * Lisp Changes in Emacs 22.2. | 106 | * Lisp Changes in Emacs 22.2. |
| 107 | 107 | ||
| 108 | ** Frame-local variables are deprecated and are slated for removal. | 108 | ** Frame-local variables are deprecated and are slated for removal. |
| 109 | Use frame parameters instead. | 109 | Use frame parameters instead. |
| 110 | |||
| 110 | ** The function invisible-p returns non-nil if the character | 111 | ** The function invisible-p returns non-nil if the character |
| 111 | after a specified position is invisible. | 112 | after a specified position is invisible. |
| 112 | 113 | ||
| @@ -121,9 +122,16 @@ as its frame. | |||
| 121 | ** The new function `image-refresh' refreshes all images associated | 122 | ** The new function `image-refresh' refreshes all images associated |
| 122 | with a given image specification. | 123 | with a given image specification. |
| 123 | 124 | ||
| 124 | ** The new function `split-string-and-unquote' does (what?) | 125 | ** The new function `combine-and-quote-strings' concatenates a list of strings |
| 126 | using a specified separator. If a string contains double quotes, they | ||
| 127 | are escaped in the output. | ||
| 128 | |||
| 129 | ** The new function `split-string-and-unquote' performs the inverse operation to | ||
| 130 | `combine-and-quote-strings', i.e. splits a single string into a list | ||
| 131 | of strings, undoing any quoting added by `combine-and-quote-strings'. | ||
| 132 | (For some separator/string combinations, the original strings cannot | ||
| 133 | be recovered.) | ||
| 125 | 134 | ||
| 126 | ** The new function `combine-and-quote-strings' does (what?) | ||
| 127 | 135 | ||
| 128 | * Installation Changes in Emacs 22.1 | 136 | * Installation Changes in Emacs 22.1 |
| 129 | 137 | ||
diff --git a/leim/Makefile.in b/leim/Makefile.in index ad34ca87457..47e220c7112 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -255,7 +255,7 @@ install: all | |||
| 255 | `id -un 2> /dev/null`; do \ | 255 | `id -un 2> /dev/null`; do \ |
| 256 | [ -n "$${installuser}" ] && break ; \ | 256 | [ -n "$${installuser}" ] && break ; \ |
| 257 | done ; \ | 257 | done ; \ |
| 258 | find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' | 258 | -find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' |
| 259 | 259 | ||
| 260 | clean mostlyclean: | 260 | clean mostlyclean: |
| 261 | rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \ | 261 | rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bac3ee7a691..707a2ec45a4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,78 @@ | |||
| 1 | 2007-11-09 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * progmodes/gud.el (gud-gdb): Remove vestigial gdba doc and code. | ||
| 4 | |||
| 5 | 2007-11-09 Sven Joachim <svenjoac@gmx.de> | ||
| 6 | |||
| 7 | * dired-aux.el (dired-copy-file-recursive): | ||
| 8 | Preserve directory permissions. | ||
| 9 | |||
| 10 | 2007-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 11 | |||
| 12 | * whitespace.el (whitespace-write-file-hook): Remove interactive spec. | ||
| 13 | (whitespace-unload-function): New-style unload function. When run, | ||
| 14 | unintern `whitespace-unload-hook' and call `unload-feature' recursively | ||
| 15 | to stop the old hook from messing with the unloading. | ||
| 16 | |||
| 17 | 2007-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 18 | |||
| 19 | * emacs-lisp/elp.el (elp-report-limit, elp-restore-all) | ||
| 20 | (elp-unset-master, elp-results): Fix typos. | ||
| 21 | (elp-sort-by-function, elp-use-standard-output, elp-recycle-buffers-p): | ||
| 22 | Doc fixes. | ||
| 23 | |||
| 24 | * msb.el (msb--many-menus): Remove variable. | ||
| 25 | (msb-max-menu-items, msb--add-to-menu): Doc fixes. | ||
| 26 | (msb-menu-cond, msb-item-handling-function, msb--create-function-info) | ||
| 27 | (msb--toggle-menu-type): Fix typos in docstrings. | ||
| 28 | |||
| 29 | * shadowfile.el (shadow-inhibit-overload, shadow-remove-from-todo) | ||
| 30 | (shadow-insert-var): Doc fixes. | ||
| 31 | (shadow-file-match, shadow-define-cluster, shadow-define-regexp-group): | ||
| 32 | Reflow docstrings. | ||
| 33 | (shadow-parse-fullname, shadow-read-files): Fix typos in docstrings. | ||
| 34 | |||
| 35 | 2007-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 36 | |||
| 37 | * ediff-hook.el (ediff, ediff-files, ediff-buffers, ebuffers, ediff3) | ||
| 38 | (ediff-files3, ediff-buffers3, ebuffers3, erevision, ediff-revision): | ||
| 39 | Fix typos in autoload docstrings. | ||
| 40 | |||
| 41 | 2007-11-09 Richard Stallman <rms@gnu.org> | ||
| 42 | |||
| 43 | * savehist.el (savehist-save): Obey savehist-ignored-variables. | ||
| 44 | |||
| 45 | 2007-11-09 Nick Roberts <nickrob@snap.net.nz> | ||
| 46 | |||
| 47 | * progmodes/gdb-ui.el (gdb-delete-out-of-scope): New option. | ||
| 48 | (gdb-var-update-handler-1): Use it. | ||
| 49 | |||
| 50 | 2007-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 51 | |||
| 52 | * loadhist.el (unload-feature): Remove erroneous check for the | ||
| 53 | FEATURE-unload-function variable; check the existence of the | ||
| 54 | function (that's what the docstring says, and it makes more sense). | ||
| 55 | |||
| 56 | * follow.el (follow-unload-function): Add docstring. | ||
| 57 | (follow-unload-function): Remove variable. | ||
| 58 | |||
| 59 | * server.el (server-unload-function): Remove variable. | ||
| 60 | (server-unload-function): Unbind `server-edit' from `C-x #'. | ||
| 61 | |||
| 62 | * uniquify.el (uniquify-unload-function): Add docstring. | ||
| 63 | (uniquify-unload-function): Remove variable. | ||
| 64 | |||
| 65 | * ses.el (ses-unload-function): New function. | ||
| 66 | |||
| 67 | 2007-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 68 | |||
| 69 | * emacs-lisp/unsafep.el (unsafep, unsafep-function) | ||
| 70 | (unsafep-progn, unsafep-let): Fix typos in docstrings. | ||
| 71 | |||
| 72 | * uniquify.el (uniquify-maybe-rerationalize-w/o-cb): Define it | ||
| 73 | before use to avoid a warning in packages that require uniquify. | ||
| 74 | (uniquify-unload-function): New function and var. | ||
| 75 | |||
| 1 | 2007-11-09 Dan Nicolaescu <dann@ics.uci.edu> | 76 | 2007-11-09 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 77 | ||
| 3 | * ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove. | 78 | * ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove. |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e0749f375ae..b9ceb728dbc 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -1160,7 +1160,8 @@ Special value `always' suppresses confirmation." | |||
| 1160 | (or (eq recursive 'always) | 1160 | (or (eq recursive 'always) |
| 1161 | (yes-or-no-p (format "Recursive copies of %s? " from)))) | 1161 | (yes-or-no-p (format "Recursive copies of %s? " from)))) |
| 1162 | ;; This is a directory. | 1162 | ;; This is a directory. |
| 1163 | (let ((files | 1163 | (let ((mode (file-modes from)) |
| 1164 | (files | ||
| 1164 | (condition-case err | 1165 | (condition-case err |
| 1165 | (directory-files from nil dired-re-no-dot) | 1166 | (directory-files from nil dired-re-no-dot) |
| 1166 | (file-error | 1167 | (file-error |
| @@ -1174,7 +1175,9 @@ Special value `always' suppresses confirmation." | |||
| 1174 | (if (file-exists-p to) | 1175 | (if (file-exists-p to) |
| 1175 | (or top (dired-handle-overwrite to)) | 1176 | (or top (dired-handle-overwrite to)) |
| 1176 | (condition-case err | 1177 | (condition-case err |
| 1177 | (make-directory to) | 1178 | (progn |
| 1179 | (make-directory to) | ||
| 1180 | (set-file-modes to #o700)) | ||
| 1178 | (file-error | 1181 | (file-error |
| 1179 | (push (dired-make-relative from) | 1182 | (push (dired-make-relative from) |
| 1180 | dired-create-files-failures) | 1183 | dired-create-files-failures) |
| @@ -1193,7 +1196,9 @@ Special value `always' suppresses confirmation." | |||
| 1193 | (file-error | 1196 | (file-error |
| 1194 | (push (dired-make-relative thisfrom) | 1197 | (push (dired-make-relative thisfrom) |
| 1195 | dired-create-files-failures) | 1198 | dired-create-files-failures) |
| 1196 | (dired-log "Copying error for %s:\n%s\n" thisfrom err)))))) | 1199 | (dired-log "Copying error for %s:\n%s\n" thisfrom err))))) |
| 1200 | (when (file-directory-p to) | ||
| 1201 | (set-file-modes to mode))) | ||
| 1197 | ;; Not a directory. | 1202 | ;; Not a directory. |
| 1198 | (or top (dired-handle-overwrite to)) | 1203 | (or top (dired-handle-overwrite to)) |
| 1199 | (condition-case err | 1204 | (condition-case err |
diff --git a/lisp/ediff-hook.el b/lisp/ediff-hook.el index 00e6ba6bab2..306b2ed670c 100644 --- a/lisp/ediff-hook.el +++ b/lisp/ediff-hook.el | |||
| @@ -261,17 +261,17 @@ | |||
| 261 | () ; if dumping, autoloads are set up in loaddefs.el | 261 | () ; if dumping, autoloads are set up in loaddefs.el |
| 262 | ;; if the user decides to load this file, set up autoloads | 262 | ;; if the user decides to load this file, set up autoloads |
| 263 | ;; compare files and buffers | 263 | ;; compare files and buffers |
| 264 | (autoload 'ediff "ediff" "Compare two files" t) | 264 | (autoload 'ediff "ediff" "Compare two files." t) |
| 265 | (autoload 'ediff-files "ediff" "Compare two files" t) | 265 | (autoload 'ediff-files "ediff" "Compare two files." t) |
| 266 | (autoload 'ediff-buffers "ediff" "Compare two bufers" t) | 266 | (autoload 'ediff-buffers "ediff" "Compare two buffers." t) |
| 267 | (autoload 'ebuffers "ediff" "Compare two bufers" t) | 267 | (autoload 'ebuffers "ediff" "Compare two buffers." t) |
| 268 | (autoload 'ediff3 "ediff" "Compare three files" t) | 268 | (autoload 'ediff3 "ediff" "Compare three files." t) |
| 269 | (autoload 'ediff-files3 "ediff" "Compare three files" t) | 269 | (autoload 'ediff-files3 "ediff" "Compare three files." t) |
| 270 | (autoload 'ediff-buffers3 "ediff" "Compare three bufers" t) | 270 | (autoload 'ediff-buffers3 "ediff" "Compare three buffers." t) |
| 271 | (autoload 'ebuffers3 "ediff" "Compare three bufers" t) | 271 | (autoload 'ebuffers3 "ediff" "Compare three buffers." t) |
| 272 | 272 | ||
| 273 | (autoload 'erevision "ediff" "Compare versions of a file" t) | 273 | (autoload 'erevision "ediff" "Compare versions of a file." t) |
| 274 | (autoload 'ediff-revision "ediff" "Compare versions of a file" t) | 274 | (autoload 'ediff-revision "ediff" "Compare versions of a file." t) |
| 275 | 275 | ||
| 276 | ;; compare regions and windows | 276 | ;; compare regions and windows |
| 277 | (autoload 'ediff-windows-wordwise | 277 | (autoload 'ediff-windows-wordwise |
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 71231a86df9..c4ba3e4ca9c 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el | |||
| @@ -147,16 +147,16 @@ Results are displayed with the `elp-results' command." | |||
| 147 | :group 'elp) | 147 | :group 'elp) |
| 148 | 148 | ||
| 149 | (defcustom elp-sort-by-function 'elp-sort-by-total-time | 149 | (defcustom elp-sort-by-function 'elp-sort-by-total-time |
| 150 | "*Non-nil specifies elp results sorting function. | 150 | "*Non-nil specifies ELP results sorting function. |
| 151 | These functions are currently available: | 151 | These functions are currently available: |
| 152 | 152 | ||
| 153 | elp-sort-by-call-count -- sort by the highest call count | 153 | elp-sort-by-call-count -- sort by the highest call count |
| 154 | elp-sort-by-total-time -- sort by the highest total time | 154 | elp-sort-by-total-time -- sort by the highest total time |
| 155 | elp-sort-by-average-time -- sort by the highest average times | 155 | elp-sort-by-average-time -- sort by the highest average times |
| 156 | 156 | ||
| 157 | You can write you're own sort function. It should adhere to the | 157 | You can write your own sort function. It should adhere to the |
| 158 | interface specified by the PRED argument for the `sort' defun. Each | 158 | interface specified by the PREDICATE argument for `sort'. |
| 159 | \"element of LIST\" is really a 4 element vector where element 0 is | 159 | Each \"element of LIST\" is really a 4 element vector where element 0 is |
| 160 | the call count, element 1 is the total time spent in the function, | 160 | the call count, element 1 is the total time spent in the function, |
| 161 | element 2 is the average time spent in the function, and element 3 is | 161 | element 2 is the average time spent in the function, and element 3 is |
| 162 | the symbol's name string." | 162 | the symbol's name string." |
| @@ -164,7 +164,7 @@ the symbol's name string." | |||
| 164 | :group 'elp) | 164 | :group 'elp) |
| 165 | 165 | ||
| 166 | (defcustom elp-report-limit 1 | 166 | (defcustom elp-report-limit 1 |
| 167 | "*Prevents some functions from being displayed in the results buffer. | 167 | "*Prevent some functions from being displayed in the results buffer. |
| 168 | If a number, no function that has been called fewer than that number | 168 | If a number, no function that has been called fewer than that number |
| 169 | of times will be displayed in the output buffer. If nil, all | 169 | of times will be displayed in the output buffer. If nil, all |
| 170 | functions will be displayed." | 170 | functions will be displayed." |
| @@ -173,12 +173,12 @@ functions will be displayed." | |||
| 173 | :group 'elp) | 173 | :group 'elp) |
| 174 | 174 | ||
| 175 | (defcustom elp-use-standard-output nil | 175 | (defcustom elp-use-standard-output nil |
| 176 | "*Non-nil says to output to `standard-output' instead of a buffer." | 176 | "*If non-nil, output to `standard-output' instead of a buffer." |
| 177 | :type 'boolean | 177 | :type 'boolean |
| 178 | :group 'elp) | 178 | :group 'elp) |
| 179 | 179 | ||
| 180 | (defcustom elp-recycle-buffers-p t | 180 | (defcustom elp-recycle-buffers-p t |
| 181 | "*nil says to not recycle the `elp-results-buffer'. | 181 | "*If nil, don't recycle the `elp-results-buffer'. |
| 182 | In other words, a new unique buffer is create every time you run | 182 | In other words, a new unique buffer is create every time you run |
| 183 | \\[elp-results]." | 183 | \\[elp-results]." |
| 184 | :type 'boolean | 184 | :type 'boolean |
| @@ -372,7 +372,7 @@ Use optional LIST if provided instead." | |||
| 372 | (mapcar 'elp-restore-function list))) | 372 | (mapcar 'elp-restore-function list))) |
| 373 | 373 | ||
| 374 | (defun elp-restore-all () | 374 | (defun elp-restore-all () |
| 375 | "Restores the original definitions of all functions being profiled." | 375 | "Restore the original definitions of all functions being profiled." |
| 376 | (interactive) | 376 | (interactive) |
| 377 | (elp-restore-list elp-all-instrumented-list)) | 377 | (elp-restore-list elp-all-instrumented-list)) |
| 378 | 378 | ||
| @@ -412,7 +412,7 @@ Use optional LIST if provided instead." | |||
| 412 | (elp-instrument-function funsym))) | 412 | (elp-instrument-function funsym))) |
| 413 | 413 | ||
| 414 | (defun elp-unset-master () | 414 | (defun elp-unset-master () |
| 415 | "Unsets the master function." | 415 | "Unset the master function." |
| 416 | (interactive) | 416 | (interactive) |
| 417 | ;; when there's no master function, recording is turned on by default. | 417 | ;; when there's no master function, recording is turned on by default. |
| 418 | (setq elp-master nil | 418 | (setq elp-master nil |
| @@ -558,7 +558,7 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." | |||
| 558 | (defun elp-results () | 558 | (defun elp-results () |
| 559 | "Display current profiling results. | 559 | "Display current profiling results. |
| 560 | If `elp-reset-after-results' is non-nil, then current profiling | 560 | If `elp-reset-after-results' is non-nil, then current profiling |
| 561 | information for all instrumented functions are reset after results are | 561 | information for all instrumented functions is reset after results are |
| 562 | displayed." | 562 | displayed." |
| 563 | (interactive) | 563 | (interactive) |
| 564 | (let ((curbuf (current-buffer)) | 564 | (let ((curbuf (current-buffer)) |
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index d7dd1f19300..3bb93334c3c 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el | |||
| @@ -116,9 +116,9 @@ in the parse.") | |||
| 116 | 116 | ||
| 117 | ;;;###autoload | 117 | ;;;###autoload |
| 118 | (defun unsafep (form &optional unsafep-vars) | 118 | (defun unsafep (form &optional unsafep-vars) |
| 119 | "Return nil if evaluating FORM couldn't possibly do any harm; | 119 | "Return nil if evaluating FORM couldn't possibly do any harm. |
| 120 | otherwise result is a reason why FORM is unsafe. UNSAFEP-VARS is a list | 120 | Otherwise result is a reason why FORM is unsafe. |
| 121 | of symbols with local bindings." | 121 | UNSAFEP-VARS is a list of symbols with local bindings." |
| 122 | (catch 'unsafep | 122 | (catch 'unsafep |
| 123 | (if (or (eq safe-functions t) ;User turned off safety-checking | 123 | (if (or (eq safe-functions t) ;User turned off safety-checking |
| 124 | (atom form)) ;Atoms are never unsafe | 124 | (atom form)) ;Atoms are never unsafe |
| @@ -213,8 +213,8 @@ of symbols with local bindings." | |||
| 213 | 213 | ||
| 214 | (defun unsafep-function (fun) | 214 | (defun unsafep-function (fun) |
| 215 | "Return nil if FUN is a safe function. | 215 | "Return nil if FUN is a safe function. |
| 216 | \(either a safe lambda or a symbol that names a safe function). Otherwise | 216 | \(Either a safe lambda or a symbol that names a safe function). |
| 217 | result is a reason code." | 217 | Otherwise result is a reason code." |
| 218 | (cond | 218 | (cond |
| 219 | ((eq (car-safe fun) 'lambda) | 219 | ((eq (car-safe fun) 'lambda) |
| 220 | (unsafep fun unsafep-vars)) | 220 | (unsafep fun unsafep-vars)) |
| @@ -226,8 +226,8 @@ result is a reason code." | |||
| 226 | `(function ,fun)))) | 226 | `(function ,fun)))) |
| 227 | 227 | ||
| 228 | (defun unsafep-progn (list) | 228 | (defun unsafep-progn (list) |
| 229 | "Return nil if all forms in LIST are safe, or the reason | 229 | "Return nil if all forms in LIST are safe. |
| 230 | for the first unsafe form." | 230 | Else, return the reason for the first unsafe form." |
| 231 | (catch 'unsafep-progn | 231 | (catch 'unsafep-progn |
| 232 | (let (reason) | 232 | (let (reason) |
| 233 | (dolist (x list) | 233 | (dolist (x list) |
| @@ -236,8 +236,9 @@ for the first unsafe form." | |||
| 236 | 236 | ||
| 237 | (defun unsafep-let (clause) | 237 | (defun unsafep-let (clause) |
| 238 | "Check the safety of a let binding. | 238 | "Check the safety of a let binding. |
| 239 | CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL | 239 | CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). |
| 240 | and throws a reason to `unsafep' if unsafe. Returns SYM." | 240 | Check VAL and throw a reason to `unsafep' if unsafe. |
| 241 | Return SYM." | ||
| 241 | (let (reason sym) | 242 | (let (reason sym) |
| 242 | (if (atom clause) | 243 | (if (atom clause) |
| 243 | (setq sym clause) | 244 | (setq sym clause) |
diff --git a/lisp/follow.el b/lisp/follow.el index 50760cd9909..3edc62e5784 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -2163,6 +2163,7 @@ This prevents `mouse-drag-region' from messing things up." | |||
| 2163 | ;;{{{ The end | 2163 | ;;{{{ The end |
| 2164 | 2164 | ||
| 2165 | (defun follow-unload-function () | 2165 | (defun follow-unload-function () |
| 2166 | "Unload Follow mode library." | ||
| 2166 | (easy-menu-remove-item nil '("Tools") "Follow") | 2167 | (easy-menu-remove-item nil '("Tools") "Follow") |
| 2167 | (follow-stop-intercept-process-output) | 2168 | (follow-stop-intercept-process-output) |
| 2168 | (dolist (group '((before | 2169 | (dolist (group '((before |
| @@ -2189,10 +2190,9 @@ This prevents `mouse-drag-region' from messing things up." | |||
| 2189 | (intern (concat "follow-" (symbol-name fun)))) | 2190 | (intern (concat "follow-" (symbol-name fun)))) |
| 2190 | (ad-update fun)) | 2191 | (ad-update fun)) |
| 2191 | (error nil)))))) | 2192 | (error nil)))))) |
| 2193 | ;; continue standard processing | ||
| 2192 | nil) | 2194 | nil) |
| 2193 | 2195 | ||
| 2194 | (defvar follow-unload-function 'follow-unload-function) | ||
| 2195 | |||
| 2196 | ;; | 2196 | ;; |
| 2197 | ;; We're done! | 2197 | ;; We're done! |
| 2198 | ;; | 2198 | ;; |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 77e1650f88d..bc07acae287 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-11-03 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-highlight): Mark as risky local variable. | ||
| 4 | |||
| 1 | 2007-11-01 Reiner Steib <Reiner.Steib@gmx.de> | 5 | 2007-11-01 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 6 | ||
| 3 | * mm-util.el (mm-charset-eval-alist): Mark as risky local variable. | 7 | * mm-util.el (mm-charset-eval-alist): Mark as risky local variable. |
| @@ -21,6 +25,10 @@ | |||
| 21 | (gnus-article-prev-page): Honor gnus-article-over-scroll when moving | 25 | (gnus-article-prev-page): Honor gnus-article-over-scroll when moving |
| 22 | back to the previous page. | 26 | back to the previous page. |
| 23 | 27 | ||
| 28 | 2007-10-30 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 29 | |||
| 30 | * qp.el (quoted-printable-decode-string): Fix typo in doc string. | ||
| 31 | |||
| 24 | 2007-10-30 Katsumi Yamaoka <yamaoka@jpl.org> | 32 | 2007-10-30 Katsumi Yamaoka <yamaoka@jpl.org> |
| 25 | 33 | ||
| 26 | * gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar. | 34 | * gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar. |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 5709de62b19..bc5ed9f0fb5 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -1080,6 +1080,7 @@ uncached: Non-nil if the article is uncached." | |||
| 1080 | :group 'gnus-summary-visual | 1080 | :group 'gnus-summary-visual |
| 1081 | :type '(repeat (cons (sexp :tag "Form" nil) | 1081 | :type '(repeat (cons (sexp :tag "Form" nil) |
| 1082 | face))) | 1082 | face))) |
| 1083 | (put 'gnus-summary-highlight 'risky-local-variable t) | ||
| 1083 | 1084 | ||
| 1084 | (defcustom gnus-alter-header-function nil | 1085 | (defcustom gnus-alter-header-function nil |
| 1085 | "Function called to allow alteration of article header structures. | 1086 | "Function called to allow alteration of article header structures. |
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index d601222160d..5689a70f3ac 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el | |||
| @@ -82,7 +82,7 @@ them into characters should be done separately." | |||
| 82 | 82 | ||
| 83 | (defun quoted-printable-decode-string (string &optional coding-system) | 83 | (defun quoted-printable-decode-string (string &optional coding-system) |
| 84 | "Decode the quoted-printable encoded STRING and return the result. | 84 | "Decode the quoted-printable encoded STRING and return the result. |
| 85 | If CODING-SYSTEM is non-nil, decode the region with coding-system. | 85 | If CODING-SYSTEM is non-nil, decode the string with coding-system. |
| 86 | Use of CODING-SYSTEM is deprecated; this function should deal with | 86 | Use of CODING-SYSTEM is deprecated; this function should deal with |
| 87 | raw bytes, and coding conversion should be done separately." | 87 | raw bytes, and coding conversion should be done separately." |
| 88 | (mm-with-unibyte-buffer | 88 | (mm-with-unibyte-buffer |
diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 82bab11a7ce..0c1766143d6 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el | |||
| @@ -191,7 +191,7 @@ something strange, such as redefining an Emacs function." | |||
| 191 | (unload-func (intern-soft (concat name "-unload-function")))) | 191 | (unload-func (intern-soft (concat name "-unload-function")))) |
| 192 | ;; If FEATURE-unload-function is defined and returns non-nil, | 192 | ;; If FEATURE-unload-function is defined and returns non-nil, |
| 193 | ;; don't try to do anything more; otherwise proceed normally. | 193 | ;; don't try to do anything more; otherwise proceed normally. |
| 194 | (unless (and (bound-and-true-p unload-func) | 194 | (unless (and (fboundp unload-func) |
| 195 | (funcall unload-func)) | 195 | (funcall unload-func)) |
| 196 | ;; Try to avoid losing badly when hooks installed in critical | 196 | ;; Try to avoid losing badly when hooks installed in critical |
| 197 | ;; places go away. (Some packages install things on | 197 | ;; places go away. (Some packages install things on |
diff --git a/lisp/msb.el b/lisp/msb.el index b67e471c229..cc5a0adcded 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -190,9 +190,6 @@ | |||
| 190 | 3099 | 190 | 3099 |
| 191 | "Other files (%d)"))) | 191 | "Other files (%d)"))) |
| 192 | 192 | ||
| 193 | ;; msb--many-menus is obsolete | ||
| 194 | (defvar msb--many-menus msb--very-many-menus) | ||
| 195 | |||
| 196 | ;;; | 193 | ;;; |
| 197 | ;;; Customizable variables | 194 | ;;; Customizable variables |
| 198 | ;;; | 195 | ;;; |
| @@ -235,12 +232,12 @@ A value of nil means don't display this menu. | |||
| 235 | MENU-TITLE is really a format. If you add %d in it, the %d is | 232 | MENU-TITLE is really a format. If you add %d in it, the %d is |
| 236 | replaced with the number of items in that menu. | 233 | replaced with the number of items in that menu. |
| 237 | 234 | ||
| 238 | ITEM-HANDLING-FN, is optional. If it is supplied and is a function, | 235 | ITEM-HANDLING-FN is optional. If it is supplied and is a function, |
| 239 | than it is used for displaying the items in that particular buffer | 236 | then it is used for displaying the items in that particular buffer |
| 240 | menu, otherwise the function pointed out by | 237 | menu, otherwise the function pointed out by |
| 241 | `msb-item-handling-function' is used. | 238 | `msb-item-handling-function' is used. |
| 242 | 239 | ||
| 243 | ITEM-SORT-FN, is also optional. | 240 | ITEM-SORT-FN is also optional. |
| 244 | If it is not supplied, the function pointed out by | 241 | If it is not supplied, the function pointed out by |
| 245 | `msb-item-sort-function' is used. | 242 | `msb-item-sort-function' is used. |
| 246 | If it is nil, then no sort takes place and the buffers are presented | 243 | If it is nil, then no sort takes place and the buffers are presented |
| @@ -282,7 +279,7 @@ that differs by this value or more." | |||
| 282 | (defcustom msb-max-menu-items 15 | 279 | (defcustom msb-max-menu-items 15 |
| 283 | "*The maximum number of items in a menu. | 280 | "*The maximum number of items in a menu. |
| 284 | If this variable is set to 15 for instance, then the submenu will be | 281 | If this variable is set to 15 for instance, then the submenu will be |
| 285 | split up in minor parts, 15 items each. nil means no limit." | 282 | split up in minor parts, 15 items each. A value of nil means no limit." |
| 286 | :type '(choice integer (const nil)) | 283 | :type '(choice integer (const nil)) |
| 287 | :set 'msb-custom-set | 284 | :set 'msb-custom-set |
| 288 | :group 'msb) | 285 | :group 'msb) |
| @@ -336,7 +333,7 @@ names that starts with a space character." | |||
| 336 | "*The appearance of a buffer menu. | 333 | "*The appearance of a buffer menu. |
| 337 | 334 | ||
| 338 | The default function to call for handling the appearance of a menu | 335 | The default function to call for handling the appearance of a menu |
| 339 | item. It should take to arguments, BUFFER and MAX-BUFFER-NAME-LENGTH, | 336 | item. It should take two arguments, BUFFER and MAX-BUFFER-NAME-LENGTH, |
| 340 | where the latter is the max length of all buffer names. | 337 | where the latter is the max length of all buffer names. |
| 341 | 338 | ||
| 342 | The function should return the string to use in the menu. | 339 | The function should return the string to use in the menu. |
| @@ -664,7 +661,7 @@ If the argument is left out or nil, then the current buffer is considered." | |||
| 664 | (defun msb--create-function-info (menu-cond-elt) | 661 | (defun msb--create-function-info (menu-cond-elt) |
| 665 | "Create a vector from an element MENU-COND-ELT of `msb-menu-cond'. | 662 | "Create a vector from an element MENU-COND-ELT of `msb-menu-cond'. |
| 666 | This takes the form: | 663 | This takes the form: |
| 667 | \]BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER) | 664 | \[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER] |
| 668 | See `msb-menu-cond' for a description of its elements." | 665 | See `msb-menu-cond' for a description of its elements." |
| 669 | (let* ((list-symbol (make-symbol "-msb-buffer-list")) | 666 | (let* ((list-symbol (make-symbol "-msb-buffer-list")) |
| 670 | (tmp-ih (and (> (length menu-cond-elt) 3) | 667 | (tmp-ih (and (> (length menu-cond-elt) 3) |
| @@ -727,7 +724,7 @@ See `msb-menu-cond' for a description of its elements." | |||
| 727 | (defun msb--add-to-menu (buffer function-info max-buffer-name-length) | 724 | (defun msb--add-to-menu (buffer function-info max-buffer-name-length) |
| 728 | "Add BUFFER to the menu depicted by FUNCTION-INFO. | 725 | "Add BUFFER to the menu depicted by FUNCTION-INFO. |
| 729 | All side-effects. Adds an element of form (BUFFER-TITLE . BUFFER) | 726 | All side-effects. Adds an element of form (BUFFER-TITLE . BUFFER) |
| 730 | to the buffer-list variable in function-info." | 727 | to the buffer-list variable in FUNCTION-INFO." |
| 731 | (let ((list-symbol (aref function-info 0))) ;BUFFER-LIST-VARIABLE | 728 | (let ((list-symbol (aref function-info 0))) ;BUFFER-LIST-VARIABLE |
| 732 | ;; Here comes the hairy side-effect! | 729 | ;; Here comes the hairy side-effect! |
| 733 | (set list-symbol | 730 | (set list-symbol |
| @@ -961,7 +958,7 @@ It takes the form ((TITLE . BUFFER-LIST)...)." | |||
| 961 | (msb--create-buffer-menu-2)))) | 958 | (msb--create-buffer-menu-2)))) |
| 962 | 959 | ||
| 963 | (defun msb--toggle-menu-type () | 960 | (defun msb--toggle-menu-type () |
| 964 | "Multi purpose function for selecting a buffer with the mouse." | 961 | "Multi-purpose function for selecting a buffer with the mouse." |
| 965 | (interactive) | 962 | (interactive) |
| 966 | (setq msb-files-by-directory (not msb-files-by-directory)) | 963 | (setq msb-files-by-directory (not msb-files-by-directory)) |
| 967 | ;; This gets a warning, but it is correct, | 964 | ;; This gets a warning, but it is correct, |
diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 0643aca5d80..c2d9a826157 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el | |||
| @@ -51,6 +51,9 @@ | |||
| 51 | (autoload 'format-spec "format-spec") | 51 | (autoload 'format-spec "format-spec") |
| 52 | (autoload 'format-spec-make "format-spec")) | 52 | (autoload 'format-spec-make "format-spec")) |
| 53 | 53 | ||
| 54 | (eval-when-compile | ||
| 55 | (require 'rx)) | ||
| 56 | |||
| 54 | (defgroup tls nil | 57 | (defgroup tls nil |
| 55 | "Transport Layer Security (TLS) parameters." | 58 | "Transport Layer Security (TLS) parameters." |
| 56 | :group 'comm) | 59 | :group 'comm) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c6ae98c5b12..0d1a4b05d65 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -947,6 +947,12 @@ Changed values are highlighted with the face `font-lock-warning-face'." | |||
| 947 | :group 'gud | 947 | :group 'gud |
| 948 | :version "22.1") | 948 | :version "22.1") |
| 949 | 949 | ||
| 950 | (defcustom gdb-delete-out-of-scope t | ||
| 951 | "If non-nil delete watch expressions automatically when they go out of scope." | ||
| 952 | :type 'boolean | ||
| 953 | :group 'gud | ||
| 954 | :version "22.2") | ||
| 955 | |||
| 950 | (defun gdb-speedbar-expand-node (text token indent) | 956 | (defun gdb-speedbar-expand-node (text token indent) |
| 951 | "Expand the node the user clicked on. | 957 | "Expand the node the user clicked on. |
| 952 | TEXT is the text of the button we clicked on, a + or - item. | 958 | TEXT is the text of the button we clicked on, a + or - item. |
| @@ -3515,7 +3521,9 @@ in_scope=\"\\(.*?\\)\".*?}") | |||
| 3515 | (when var | 3521 | (when var |
| 3516 | (let ((match (match-string 3))) | 3522 | (let ((match (match-string 3))) |
| 3517 | (cond ((string-equal match "false") | 3523 | (cond ((string-equal match "false") |
| 3518 | (setcar (nthcdr 5 var) 'out-of-scope)) | 3524 | (if gdb-delete-out-of-scope |
| 3525 | (gdb-var-delete-1 varnum) | ||
| 3526 | (setcar (nthcdr 5 var) 'out-of-scope))) | ||
| 3519 | ((string-equal match "true") | 3527 | ((string-equal match "true") |
| 3520 | (setcar (nthcdr 5 var) 'changed) | 3528 | (setcar (nthcdr 5 var) 'changed) |
| 3521 | (setcar (nthcdr 4 var) | 3529 | (setcar (nthcdr 4 var) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 50dcd6a83bf..ce231f4c662 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -709,25 +709,14 @@ The option \"--fullname\" must be included in this value." | |||
| 709 | (defvar gud-filter-pending-text nil | 709 | (defvar gud-filter-pending-text nil |
| 710 | "Non-nil means this is text that has been saved for later in `gud-filter'.") | 710 | "Non-nil means this is text that has been saved for later in `gud-filter'.") |
| 711 | 711 | ||
| 712 | ;; The old gdb command. The new one is in gdb-ui.el. | 712 | ;; The old gdb command (text command mode). The new one is in gdb-ui.el. |
| 713 | ;;;###autoload | 713 | ;;;###autoload |
| 714 | (defun gud-gdb (command-line) | 714 | (defun gud-gdb (command-line) |
| 715 | "Run gdb on program FILE in buffer *gud-FILE*. | 715 | "Run gdb on program FILE in buffer *gud-FILE*. |
| 716 | The directory containing FILE becomes the initial working | 716 | The directory containing FILE becomes the initial working |
| 717 | directory and source-file directory for your debugger. By | 717 | directory and source-file directory for your debugger." |
| 718 | default this command starts GDB using a graphical interface. See | ||
| 719 | `gdba' for more information. | ||
| 720 | |||
| 721 | To run GDB in text command mode, replace the GDB \"--annotate=3\" | ||
| 722 | option with \"--fullname\" either in the minibuffer for the | ||
| 723 | current Emacs session, or the custom variable | ||
| 724 | `gud-gdb-command-name' for all future sessions. You need to use | ||
| 725 | text command mode to debug multiple programs within one Emacs | ||
| 726 | session." | ||
| 727 | (interactive (list (gud-query-cmdline 'gud-gdb))) | 718 | (interactive (list (gud-query-cmdline 'gud-gdb))) |
| 728 | 719 | ||
| 729 | (require 'gdb-ui) | ||
| 730 | |||
| 731 | (when (and gud-comint-buffer | 720 | (when (and gud-comint-buffer |
| 732 | (buffer-name gud-comint-buffer) | 721 | (buffer-name gud-comint-buffer) |
| 733 | (get-buffer-process gud-comint-buffer) | 722 | (get-buffer-process gud-comint-buffer) |
| @@ -736,8 +725,8 @@ session." | |||
| 736 | (error | 725 | (error |
| 737 | "Multiple debugging requires restarting in text command mode")) | 726 | "Multiple debugging requires restarting in text command mode")) |
| 738 | 727 | ||
| 739 | (gud-common-init command-line nil 'gud-gdba-marker-filter) | 728 | (gud-common-init command-line nil 'gud-gdb-marker-filter) |
| 740 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 729 | (set (make-local-variable 'gud-minor-mode) 'gdb) |
| 741 | 730 | ||
| 742 | (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") | 731 | (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") |
| 743 | (gud-def gud-tbreak "tbreak %f:%l" "\C-t" | 732 | (gud-def gud-tbreak "tbreak %f:%l" "\C-t" |
diff --git a/lisp/savehist.el b/lisp/savehist.el index 7cc56842d4b..705be69088d 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el | |||
| @@ -308,7 +308,8 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, | |||
| 308 | (current-buffer)) | 308 | (current-buffer)) |
| 309 | (insert ?\n) | 309 | (insert ?\n) |
| 310 | (dolist (symbol savehist-minibuffer-history-variables) | 310 | (dolist (symbol savehist-minibuffer-history-variables) |
| 311 | (when (boundp symbol) | 311 | (when (and (boundp symbol) |
| 312 | (not (memq symbol savehist-ignored-variables))) | ||
| 312 | (let ((value (savehist-trim-history (symbol-value symbol))) | 313 | (let ((value (savehist-trim-history (symbol-value symbol))) |
| 313 | excess-space) | 314 | excess-space) |
| 314 | (when value ; Don't save empty histories. | 315 | (when value ; Don't save empty histories. |
diff --git a/lisp/server.el b/lisp/server.el index bbebe784636..c263a21a6cf 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1287,6 +1287,7 @@ only these files will be asked to be saved." | |||
| 1287 | (defun server-unload-function () | 1287 | (defun server-unload-function () |
| 1288 | "Unload the server library." | 1288 | "Unload the server library." |
| 1289 | (server-mode -1) | 1289 | (server-mode -1) |
| 1290 | (substitute-key-definition 'server-edit nil ctl-x-map) | ||
| 1290 | (save-current-buffer | 1291 | (save-current-buffer |
| 1291 | (dolist (buffer (buffer-list)) | 1292 | (dolist (buffer (buffer-list)) |
| 1292 | (set-buffer buffer) | 1293 | (set-buffer buffer) |
| @@ -1294,7 +1295,10 @@ only these files will be asked to be saved." | |||
| 1294 | ;; continue standard unloading | 1295 | ;; continue standard unloading |
| 1295 | nil) | 1296 | nil) |
| 1296 | 1297 | ||
| 1298 | (add-hook 'kill-emacs-hook (lambda () (server-mode -1))) ;Cleanup upon exit. | ||
| 1299 | |||
| 1297 | (defvar server-unload-function 'server-unload-function) | 1300 | (defvar server-unload-function 'server-unload-function) |
| 1301 | |||
| 1298 | 1302 | ||
| 1299 | (provide 'server) | 1303 | (provide 'server) |
| 1300 | 1304 | ||
diff --git a/lisp/ses.el b/lisp/ses.el index 62067471b60..f76befa874d 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -2921,7 +2921,7 @@ TEST is evaluated." | |||
| 2921 | ;;---------------------------------------------------------------------------- | 2921 | ;;---------------------------------------------------------------------------- |
| 2922 | 2922 | ||
| 2923 | ;;These functions use the variables 'row' and 'col' that are | 2923 | ;;These functions use the variables 'row' and 'col' that are |
| 2924 | ;;dynamically bound by ses-print-cell. We define these varables at | 2924 | ;;dynamically bound by ses-print-cell. We define these variables at |
| 2925 | ;;compile-time to make the compiler happy. | 2925 | ;;compile-time to make the compiler happy. |
| 2926 | (eval-when-compile | 2926 | (eval-when-compile |
| 2927 | (dolist (x '(row col)) | 2927 | (dolist (x '(row col)) |
| @@ -2980,6 +2980,19 @@ current column and continues until the next nonblank column." | |||
| 2980 | (dolist (x (cons 'ses-unsafe ses-standard-printer-functions)) | 2980 | (dolist (x (cons 'ses-unsafe ses-standard-printer-functions)) |
| 2981 | (put x 'side-effect-free t)) | 2981 | (put x 'side-effect-free t)) |
| 2982 | 2982 | ||
| 2983 | (defun ses-unload-function () | ||
| 2984 | "Unload the Simple Emacs Spreadsheet." | ||
| 2985 | (dolist (fun '(copy-region-as-kill yank)) | ||
| 2986 | (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun)))) | ||
| 2987 | (ad-update fun)) | ||
| 2988 | (save-current-buffer | ||
| 2989 | (dolist (buf (buffer-list)) | ||
| 2990 | (set-buffer buf) | ||
| 2991 | (when (eq major-mode 'ses-mode) | ||
| 2992 | (funcall (or default-major-mode 'fundamental-mode))))) | ||
| 2993 | ;; continue standard unloading | ||
| 2994 | nil) | ||
| 2995 | |||
| 2983 | (provide 'ses) | 2996 | (provide 'ses) |
| 2984 | 2997 | ||
| 2985 | ;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 | 2998 | ;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 |
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index ca06ace2214..be30ccc8c6a 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el | |||
| @@ -103,8 +103,8 @@ is no buffer currently visiting the file." | |||
| 103 | 103 | ||
| 104 | (defcustom shadow-inhibit-overload nil | 104 | (defcustom shadow-inhibit-overload nil |
| 105 | "If non-nil, shadowfile won't redefine \\[save-buffers-kill-emacs]. | 105 | "If non-nil, shadowfile won't redefine \\[save-buffers-kill-emacs]. |
| 106 | Normally it overloads the function `save-buffers-kill-emacs' to check | 106 | Normally it overloads the function `save-buffers-kill-emacs' to check for |
| 107 | for files have been changed and need to be copied to other systems." | 107 | files that have been changed and need to be copied to other systems." |
| 108 | :type 'boolean | 108 | :type 'boolean |
| 109 | :group 'shadow) | 109 | :group 'shadow) |
| 110 | 110 | ||
| @@ -299,7 +299,7 @@ be matched against the primary of SITE2." | |||
| 299 | 299 | ||
| 300 | (defun shadow-parse-fullname (fullname) | 300 | (defun shadow-parse-fullname (fullname) |
| 301 | "Parse FULLNAME into \(site user path) list. | 301 | "Parse FULLNAME into \(site user path) list. |
| 302 | Leave it alone if it already is one. Returns nil if the argument is | 302 | Leave it alone if it already is one. Return nil if the argument is |
| 303 | not a full ange-ftp pathname." | 303 | not a full ange-ftp pathname." |
| 304 | (if (listp fullname) | 304 | (if (listp fullname) |
| 305 | fullname | 305 | fullname |
| @@ -392,9 +392,9 @@ local filename." | |||
| 392 | "Return t if PATTERN matches FILE. | 392 | "Return t if PATTERN matches FILE. |
| 393 | If REGEXP is supplied and non-nil, the file part of the pattern is a regular | 393 | If REGEXP is supplied and non-nil, the file part of the pattern is a regular |
| 394 | expression, otherwise it must match exactly. The sites and usernames must | 394 | expression, otherwise it must match exactly. The sites and usernames must |
| 395 | match---see `shadow-same-site'. The pattern must be in full ange-ftp format, but | 395 | match---see `shadow-same-site'. The pattern must be in full ange-ftp format, |
| 396 | the file can be any valid filename. This function does not do any filename | 396 | but the file can be any valid filename. This function does not do any |
| 397 | expansion or contraction, you must do that yourself first." | 397 | filename expansion or contraction, you must do that yourself first." |
| 398 | (let* ((pattern-sup (shadow-parse-fullname pattern)) | 398 | (let* ((pattern-sup (shadow-parse-fullname pattern)) |
| 399 | (file-sup (shadow-parse-name file))) | 399 | (file-sup (shadow-parse-name file))) |
| 400 | (and (shadow-same-site pattern-sup file-sup) | 400 | (and (shadow-same-site pattern-sup file-sup) |
| @@ -412,8 +412,8 @@ expansion or contraction, you must do that yourself first." | |||
| 412 | This is a group of hosts that share directories, so that copying to or from | 412 | This is a group of hosts that share directories, so that copying to or from |
| 413 | one of them is sufficient to update the file on all of them. Clusters are | 413 | one of them is sufficient to update the file on all of them. Clusters are |
| 414 | defined by a name, the network address of a primary host \(the one we copy | 414 | defined by a name, the network address of a primary host \(the one we copy |
| 415 | files to), and a regular expression that matches the hostnames of all the sites | 415 | files to), and a regular expression that matches the hostnames of all the |
| 416 | in the cluster." | 416 | sites in the cluster." |
| 417 | (interactive (list (completing-read "Cluster name: " shadow-clusters () ()))) | 417 | (interactive (list (completing-read "Cluster name: " shadow-clusters () ()))) |
| 418 | (let* ((old (shadow-get-cluster name)) | 418 | (let* ((old (shadow-get-cluster name)) |
| 419 | (primary (read-string "Primary host: " | 419 | (primary (read-string "Primary host: " |
| @@ -469,8 +469,8 @@ specific hostnames, or names of clusters \(see `shadow-define-cluster')." | |||
| 469 | "Make each of a group of files be shared between hosts. | 469 | "Make each of a group of files be shared between hosts. |
| 470 | Prompts for regular expression; files matching this are shared between a list | 470 | Prompts for regular expression; files matching this are shared between a list |
| 471 | of sites, which are also prompted for. The filenames must be identical on all | 471 | of sites, which are also prompted for. The filenames must be identical on all |
| 472 | hosts \(if they aren't, use `shadow-define-literal-group' instead of this function). | 472 | hosts \(if they aren't, use `shadow-define-literal-group' instead of this |
| 473 | Each site can be either a hostname or the name of a cluster \(see | 473 | function). Each site can be either a hostname or the name of a cluster \(see |
| 474 | `shadow-define-cluster')." | 474 | `shadow-define-cluster')." |
| 475 | (interactive) | 475 | (interactive) |
| 476 | (let ((regexp (read-string | 476 | (let ((regexp (read-string |
| @@ -639,7 +639,7 @@ Consider them as regular expressions if third arg REGEXP is true." | |||
| 639 | 639 | ||
| 640 | (defun shadow-remove-from-todo (pair) | 640 | (defun shadow-remove-from-todo (pair) |
| 641 | "Remove PAIR from `shadow-files-to-copy'. | 641 | "Remove PAIR from `shadow-files-to-copy'. |
| 642 | PAIR must be (eq to) one of the elements of that list." | 642 | PAIR must be `eq' to one of the elements of that list." |
| 643 | (setq shadow-files-to-copy | 643 | (setq shadow-files-to-copy |
| 644 | (shadow-remove-if (function (lambda (s) (eq s pair))) | 644 | (shadow-remove-if (function (lambda (s) (eq s pair))) |
| 645 | shadow-files-to-copy))) | 645 | shadow-files-to-copy))) |
| @@ -647,7 +647,7 @@ PAIR must be (eq to) one of the elements of that list." | |||
| 647 | (defun shadow-read-files () | 647 | (defun shadow-read-files () |
| 648 | "Visit and load `shadow-info-file' and `shadow-todo-file'. | 648 | "Visit and load `shadow-info-file' and `shadow-todo-file'. |
| 649 | Thus restores shadowfile's state from your last Emacs session. | 649 | Thus restores shadowfile's state from your last Emacs session. |
| 650 | Returns t unless files were locked; then returns nil." | 650 | Return t unless files were locked; then return nil." |
| 651 | (interactive) | 651 | (interactive) |
| 652 | (if (and (fboundp 'file-locked-p) | 652 | (if (and (fboundp 'file-locked-p) |
| 653 | (or (stringp (file-locked-p shadow-info-file)) | 653 | (or (stringp (file-locked-p shadow-info-file)) |
| @@ -723,8 +723,9 @@ With non-nil argument also saves the buffer." | |||
| 723 | (setq shadow-hashtable (make-vector 37 0))) | 723 | (setq shadow-hashtable (make-vector 37 0))) |
| 724 | 724 | ||
| 725 | (defun shadow-insert-var (variable) | 725 | (defun shadow-insert-var (variable) |
| 726 | "Prettily insert a `setq' command for VARIABLE, | 726 | "Build a `setq' to restore VARIABLE. |
| 727 | which, when later evaluated, will restore it to its current setting. | 727 | Prettily insert a `setq' command which, when later evaluated, |
| 728 | will restore VARIABLE to its current setting. | ||
| 728 | VARIABLE must be the name of a variable whose value is a list." | 729 | VARIABLE must be the name of a variable whose value is a list." |
| 729 | (let ((standard-output (current-buffer))) | 730 | (let ((standard-output (current-buffer))) |
| 730 | (insert (format "(setq %s" variable)) | 731 | (insert (format "(setq %s" variable)) |
diff --git a/lisp/strokes.el b/lisp/strokes.el index 73e5594664a..d4fcdb66f61 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -1371,7 +1371,9 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." | |||
| 1371 | 1371 | ||
| 1372 | (defun strokes-alphabetic-lessp (stroke1 stroke2) | 1372 | (defun strokes-alphabetic-lessp (stroke1 stroke2) |
| 1373 | "Return t if STROKE1's command name precedes STROKE2's in lexicographic order." | 1373 | "Return t if STROKE1's command name precedes STROKE2's in lexicographic order." |
| 1374 | (string-lessp (cdr stroke1) (cdr stroke2))) | 1374 | (let ((command-name-1 (symbol-name (cdr stroke1))) |
| 1375 | (command-name-2 (symbol-name (cdr stroke2)))) | ||
| 1376 | (string-lessp command-name-1 command-name-2))) | ||
| 1375 | 1377 | ||
| 1376 | (defvar strokes-mode-map | 1378 | (defvar strokes-mode-map |
| 1377 | (let ((map (make-sparse-keymap))) | 1379 | (let ((map (make-sparse-keymap))) |
diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 254832ed700..492918c7f96 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el | |||
| @@ -421,6 +421,23 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil." | |||
| 421 | 421 | ||
| 422 | ;;; Hooks from the rest of Emacs | 422 | ;;; Hooks from the rest of Emacs |
| 423 | 423 | ||
| 424 | ;; Buffer deletion | ||
| 425 | ;; Rerationalize after a buffer is killed, to reduce coinciding buffer names. | ||
| 426 | ;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so | ||
| 427 | ;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list | ||
| 428 | ;; ignoring the current buffer (which is going to be deleted anyway). | ||
| 429 | (defun uniquify-maybe-rerationalize-w/o-cb () | ||
| 430 | "Re-rationalize buffer names, ignoring current buffer. | ||
| 431 | For use on `kill-buffer-hook'." | ||
| 432 | (if (and (cdr uniquify-managed) | ||
| 433 | uniquify-buffer-name-style | ||
| 434 | uniquify-after-kill-buffer-p) | ||
| 435 | (uniquify-rerationalize-w/o-cb uniquify-managed))) | ||
| 436 | |||
| 437 | ;; Ideally we'd like to add it buffer-locally, but that doesn't work | ||
| 438 | ;; because kill-buffer-hook is not permanent-local :-( | ||
| 439 | (add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb) | ||
| 440 | |||
| 424 | ;; The logical place to put all this code is in generate-new-buffer-name. | 441 | ;; The logical place to put all this code is in generate-new-buffer-name. |
| 425 | ;; It's written in C, so we would add a generate-new-buffer-name-function | 442 | ;; It's written in C, so we would add a generate-new-buffer-name-function |
| 426 | ;; which, if non-nil, would be called instead of the C. One problem with | 443 | ;; which, if non-nil, would be called instead of the C. One problem with |
| @@ -458,22 +475,24 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil." | |||
| 458 | (file-name-nondirectory filename) | 475 | (file-name-nondirectory filename) |
| 459 | (file-name-directory filename) ad-return-value)))) | 476 | (file-name-directory filename) ad-return-value)))) |
| 460 | 477 | ||
| 461 | ;; Buffer deletion | 478 | ;;; The End |
| 462 | ;; Rerationalize after a buffer is killed, to reduce coinciding buffer names. | 479 | |
| 463 | ;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so | 480 | (defun uniquify-unload-function () |
| 464 | ;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list | 481 | "Unload the uniquify library." |
| 465 | ;; ignoring the current buffer (which is going to be deleted anyway). | 482 | (save-current-buffer |
| 466 | (defun uniquify-maybe-rerationalize-w/o-cb () | 483 | (let ((buffers nil)) |
| 467 | "Re-rationalize buffer names, ignoring current buffer. | 484 | (dolist (buf (buffer-list)) |
| 468 | For use on `kill-buffer-hook'." | 485 | (set-buffer buf) |
| 469 | (if (and (cdr uniquify-managed) | 486 | (when uniquify-managed |
| 470 | uniquify-buffer-name-style | 487 | (push (cons buf (uniquify-item-base (car uniquify-managed))) buffers))) |
| 471 | uniquify-after-kill-buffer-p) | 488 | (dolist (fun '(rename-buffer create-file-buffer)) |
| 472 | (uniquify-rerationalize-w/o-cb uniquify-managed))) | 489 | (ad-remove-advice fun 'after (intern (concat (symbol-name fun) "-uniquify"))) |
| 473 | 490 | (ad-update fun)) | |
| 474 | ;; Ideally we'd like to add it buffer-locally, but that doesn't work | 491 | (dolist (buf buffers) |
| 475 | ;; because kill-buffer-hook is not permanent-local :-( | 492 | (set-buffer (car buf)) |
| 476 | (add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb) | 493 | (rename-buffer (cdr buf) t)))) |
| 494 | ;; continue standard uploading | ||
| 495 | nil) | ||
| 477 | 496 | ||
| 478 | (provide 'uniquify) | 497 | (provide 'uniquify) |
| 479 | 498 | ||
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 6e6aeb5fbb7..f6c94534a00 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el | |||
| @@ -784,7 +784,6 @@ When this mode is active, `whitespace-buffer' is added to | |||
| 784 | (defun whitespace-write-file-hook () | 784 | (defun whitespace-write-file-hook () |
| 785 | "Hook function to be called on the buffer when whitespace check is enabled. | 785 | "Hook function to be called on the buffer when whitespace check is enabled. |
| 786 | This is meant to be added buffer-locally to `write-file-functions'." | 786 | This is meant to be added buffer-locally to `write-file-functions'." |
| 787 | (interactive) | ||
| 788 | (let ((werr nil)) | 787 | (let ((werr nil)) |
| 789 | (if whitespace-auto-cleanup | 788 | (if whitespace-auto-cleanup |
| 790 | (whitespace-cleanup-internal) | 789 | (whitespace-cleanup-internal) |
| @@ -794,6 +793,21 @@ This is meant to be added buffer-locally to `write-file-functions'." | |||
| 794 | buffer-file-name)))) | 793 | buffer-file-name)))) |
| 795 | nil) | 794 | nil) |
| 796 | 795 | ||
| 796 | (defun whitespace-unload-function () | ||
| 797 | "Unload the whitespace library." | ||
| 798 | (if (unintern "whitespace-unload-hook") | ||
| 799 | ;; if whitespace-unload-hook is defined, let's get rid of it | ||
| 800 | ;; and recursively call `unload-feature' | ||
| 801 | (progn (unload-feature 'whitespace) t) | ||
| 802 | ;; this only happens in the recursive call | ||
| 803 | (whitespace-global-mode -1) | ||
| 804 | (save-current-buffer | ||
| 805 | (dolist (buf (buffer-list)) | ||
| 806 | (set-buffer buf) | ||
| 807 | (remove-hook 'write-file-functions 'whitespace-write-file-hook t))) | ||
| 808 | ;; continue standard unloading | ||
| 809 | nil)) | ||
| 810 | |||
| 797 | (defun whitespace-unload-hook () | 811 | (defun whitespace-unload-hook () |
| 798 | (remove-hook 'find-file-hook 'whitespace-buffer) | 812 | (remove-hook 'find-file-hook 'whitespace-buffer) |
| 799 | (remove-hook 'write-file-functions 'whitespace-write-file-hook t) | 813 | (remove-hook 'write-file-functions 'whitespace-write-file-hook t) |
diff --git a/src/ChangeLog b/src/ChangeLog index d6a6b80f89c..90338e217b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,60 @@ | |||
| 1 | 2007-11-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE | ||
| 4 | twice. | ||
| 5 | |||
| 6 | * xdisp.c (handle_face_prop): Fix last change. | ||
| 7 | |||
| 8 | 2007-11-09 Richard Stallman <rms@gnu.org> | ||
| 9 | |||
| 10 | * xdisp.c (handle_face_prop): Test for strings that came from overlays, | ||
| 11 | not just for after-strings and before-strings. | ||
| 12 | Call face_for_overlay_string and pass the overlay to it. | ||
| 13 | (handle_display_prop): Determine whether property came from an overlay. | ||
| 14 | Pass OVERLAY arg to handle_single_display_spec. | ||
| 15 | (handle_single_display_spec): New arg OVERLAY sets it->from_overlay. | ||
| 16 | (load_overlay_strings): Fill in it->string_overlays. | ||
| 17 | (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays. | ||
| 18 | |||
| 19 | * xfaces.c (face_for_overlay_string): Function renamed from | ||
| 20 | face_at_buffer_position_no_overlays, and add arg OVERLAY. | ||
| 21 | |||
| 22 | * dispextern.h (struct it): New elt string_overlays. | ||
| 23 | New elt from_overlay, also in stack. | ||
| 24 | Rearrange a few elements. | ||
| 25 | (face_for_overlay_string): Decl renamed from | ||
| 26 | face_at_buffer_position_no_overlays, and add argument. | ||
| 27 | |||
| 28 | 2007-11-09 Richard Stallman <rms@gnu.org> | ||
| 29 | |||
| 30 | * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays | ||
| 31 | to get the base face for an overlay string. | ||
| 32 | |||
| 33 | * dispextern.h (face_at_buffer_position_no_overlays): Add decl. | ||
| 34 | |||
| 35 | * xfaces.c (face_at_buffer_position_no_overlays): New function. | ||
| 36 | |||
| 37 | * xdisp.c (handle_stop): Move some code out of loop. | ||
| 38 | |||
| 39 | 2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 40 | |||
| 41 | * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes): | ||
| 42 | Fix conversion from Lisp object to ATSUFontID. | ||
| 43 | |||
| 44 | 2007-11-09 Jason Rumney <jasonr@gnu.org> | ||
| 45 | |||
| 46 | * xdisp.c (Fformat_mode_line): Do nothing when noninteractive. | ||
| 47 | |||
| 48 | 2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 49 | |||
| 50 | * unexmacosx.c (unexec_regions_recorder, unexec_regions_merge): | ||
| 51 | Don't assume regions are aligned to page boundary. | ||
| 52 | (print_load_command_name): Add LC_UUID if defined. | ||
| 53 | |||
| 54 | 2007-11-09 Richard Stallman <rms@gnu.org> | ||
| 55 | |||
| 56 | * emacs.c (syms_of_emacs) <installation-directory>: Reflow docstring. | ||
| 57 | |||
| 1 | 2007-11-07 Jason Rumney <jasonr@gnu.org> | 58 | 2007-11-07 Jason Rumney <jasonr@gnu.org> |
| 2 | 59 | ||
| 3 | * s/windows95.h: Remove. | 60 | * s/windows95.h: Remove. |
diff --git a/src/dispextern.h b/src/dispextern.h index fd4d8ebec9d..8e792a50fb4 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1803,6 +1803,9 @@ struct it_slice | |||
| 1803 | Lisp_Object height; | 1803 | Lisp_Object height; |
| 1804 | }; | 1804 | }; |
| 1805 | 1805 | ||
| 1806 | /* Input sources for fetching characters or data to display. | ||
| 1807 | The input source is found in the `method' field. */ | ||
| 1808 | |||
| 1806 | enum it_method { | 1809 | enum it_method { |
| 1807 | GET_FROM_BUFFER = 0, | 1810 | GET_FROM_BUFFER = 0, |
| 1808 | GET_FROM_DISPLAY_VECTOR, | 1811 | GET_FROM_DISPLAY_VECTOR, |
| @@ -1904,20 +1907,27 @@ struct it | |||
| 1904 | position in overlay strings etc. */ | 1907 | position in overlay strings etc. */ |
| 1905 | struct display_pos current; | 1908 | struct display_pos current; |
| 1906 | 1909 | ||
| 1910 | /* Total number of overlay strings to process. This can be > | ||
| 1911 | OVERLAY_STRING_CHUNK_SIZE. */ | ||
| 1912 | int n_overlay_strings; | ||
| 1913 | |||
| 1907 | /* Vector of overlays to process. Overlay strings are processed | 1914 | /* Vector of overlays to process. Overlay strings are processed |
| 1908 | OVERLAY_STRING_CHUNK_SIZE at a time. */ | 1915 | OVERLAY_STRING_CHUNK_SIZE at a time. */ |
| 1909 | #define OVERLAY_STRING_CHUNK_SIZE 16 | 1916 | #define OVERLAY_STRING_CHUNK_SIZE 16 |
| 1910 | Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; | 1917 | Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; |
| 1911 | 1918 | ||
| 1912 | /* Total number of overlay strings to process. This can be > | 1919 | /* For each overlay string, the overlay it came from. */ |
| 1913 | OVERLAY_STRING_CHUNK_SIZE. */ | 1920 | Lisp_Object string_overlays[OVERLAY_STRING_CHUNK_SIZE]; |
| 1914 | int n_overlay_strings; | ||
| 1915 | 1921 | ||
| 1916 | /* If non-nil, a Lisp string being processed. If | 1922 | /* If non-nil, a Lisp string being processed. If |
| 1917 | current.overlay_string_index >= 0, this is an overlay string from | 1923 | current.overlay_string_index >= 0, this is an overlay string from |
| 1918 | pos. */ | 1924 | pos. */ |
| 1919 | Lisp_Object string; | 1925 | Lisp_Object string; |
| 1920 | 1926 | ||
| 1927 | /* If non-nil, we are processing a string that came | ||
| 1928 | from a `display' property given by an overlay. */ | ||
| 1929 | Lisp_Object from_overlay; | ||
| 1930 | |||
| 1921 | /* Stack of saved values. New entries are pushed when we begin to | 1931 | /* Stack of saved values. New entries are pushed when we begin to |
| 1922 | process an overlay string or a string from a `glyph' property. | 1932 | process an overlay string or a string from a `glyph' property. |
| 1923 | Entries are popped when we return to deliver display elements | 1933 | Entries are popped when we return to deliver display elements |
| @@ -1953,6 +1963,7 @@ struct it | |||
| 1953 | /* current text and display positions. */ | 1963 | /* current text and display positions. */ |
| 1954 | struct text_pos position; | 1964 | struct text_pos position; |
| 1955 | struct display_pos current; | 1965 | struct display_pos current; |
| 1966 | Lisp_Object from_overlay; | ||
| 1956 | enum glyph_row_area area; | 1967 | enum glyph_row_area area; |
| 1957 | enum it_method method; | 1968 | enum it_method method; |
| 1958 | unsigned multibyte_p : 1; | 1969 | unsigned multibyte_p : 1; |
| @@ -1969,13 +1980,6 @@ struct it | |||
| 1969 | /* Stack pointer. */ | 1980 | /* Stack pointer. */ |
| 1970 | int sp; | 1981 | int sp; |
| 1971 | 1982 | ||
| 1972 | /* Setting of buffer-local variable selective-display-ellipsis. */ | ||
| 1973 | unsigned selective_display_ellipsis_p : 1; | ||
| 1974 | |||
| 1975 | /* 1 means control characters are translated into the form `^C' | ||
| 1976 | where the `^' can be replaced by a display table entry. */ | ||
| 1977 | unsigned ctl_arrow_p : 1; | ||
| 1978 | |||
| 1979 | /* -1 means selective display hides everything between a \r and the | 1983 | /* -1 means selective display hides everything between a \r and the |
| 1980 | next newline; > 0 means hide lines indented more than that value. */ | 1984 | next newline; > 0 means hide lines indented more than that value. */ |
| 1981 | int selective; | 1985 | int selective; |
| @@ -1987,6 +1991,16 @@ struct it | |||
| 1987 | /* Face to use. */ | 1991 | /* Face to use. */ |
| 1988 | int face_id; | 1992 | int face_id; |
| 1989 | 1993 | ||
| 1994 | /* Setting of buffer-local variable selective-display-ellipsis. */ | ||
| 1995 | unsigned selective_display_ellipsis_p : 1; | ||
| 1996 | |||
| 1997 | /* 1 means control characters are translated into the form `^C' | ||
| 1998 | where the `^' can be replaced by a display table entry. */ | ||
| 1999 | unsigned ctl_arrow_p : 1; | ||
| 2000 | |||
| 2001 | /* 1 means lines are truncated. */ | ||
| 2002 | unsigned truncate_lines_p : 1; | ||
| 2003 | |||
| 1990 | /* Non-zero means that the current face has a box. */ | 2004 | /* Non-zero means that the current face has a box. */ |
| 1991 | unsigned face_box_p : 1; | 2005 | unsigned face_box_p : 1; |
| 1992 | 2006 | ||
| @@ -2066,9 +2080,6 @@ struct it | |||
| 2066 | Lisp_Object object; | 2080 | Lisp_Object object; |
| 2067 | struct text_pos position; | 2081 | struct text_pos position; |
| 2068 | 2082 | ||
| 2069 | /* 1 means lines are truncated. */ | ||
| 2070 | unsigned truncate_lines_p : 1; | ||
| 2071 | |||
| 2072 | /* Number of columns per \t. */ | 2083 | /* Number of columns per \t. */ |
| 2073 | short tab_width; | 2084 | short tab_width; |
| 2074 | 2085 | ||
| @@ -2845,6 +2856,9 @@ void free_frame_faces P_ ((struct frame *)); | |||
| 2845 | void recompute_basic_faces P_ ((struct frame *)); | 2856 | void recompute_basic_faces P_ ((struct frame *)); |
| 2846 | int face_at_buffer_position P_ ((struct window *, int, int, int, int *, | 2857 | int face_at_buffer_position P_ ((struct window *, int, int, int, int *, |
| 2847 | int, int)); | 2858 | int, int)); |
| 2859 | int face_for_overlay_string P_ ((struct window *, int, int, | ||
| 2860 | int, int *, | ||
| 2861 | int, int, Lisp_Object)); | ||
| 2848 | int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, | 2862 | int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, |
| 2849 | int, int *, enum face_id, int)); | 2863 | int, int *, enum face_id, int)); |
| 2850 | int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); | 2864 | int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); |
diff --git a/src/emacs.c b/src/emacs.c index 2d47114e16d..8a51b8cb8e4 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -2510,8 +2510,9 @@ The value is nil if that directory's name is not known. */); | |||
| 2510 | 2510 | ||
| 2511 | DEFVAR_LISP ("installation-directory", &Vinstallation_directory, | 2511 | DEFVAR_LISP ("installation-directory", &Vinstallation_directory, |
| 2512 | doc: /* A directory within which to look for the `lib-src' and `etc' directories. | 2512 | doc: /* A directory within which to look for the `lib-src' and `etc' directories. |
| 2513 | This is non-nil when we can't find those directories in their standard installed | 2513 | This is non-nil when we can't find those directories in their standard |
| 2514 | locations, but we can find them near where the Emacs executable was found. */); | 2514 | installed locations, but we can find them near where the Emacs executable |
| 2515 | was found. */); | ||
| 2515 | Vinstallation_directory = Qnil; | 2516 | Vinstallation_directory = Qnil; |
| 2516 | 2517 | ||
| 2517 | DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale, | 2518 | DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale, |
diff --git a/src/macfns.c b/src/macfns.c index 56ef81c9701..9161a0b6c6e 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -4644,8 +4644,8 @@ ID is specified by either an integer or a float. */) | |||
| 4644 | Lisp_Object result; | 4644 | Lisp_Object result; |
| 4645 | 4645 | ||
| 4646 | check_mac (); | 4646 | check_mac (); |
| 4647 | CHECK_NUMBER_OR_FLOAT(id); | 4647 | CHECK_NUMBER_OR_FLOAT (id); |
| 4648 | font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id); | 4648 | font_id = INTEGERP (id) ? XINT (id) : XFLOAT_DATA (id); |
| 4649 | BLOCK_INPUT; | 4649 | BLOCK_INPUT; |
| 4650 | result = mac_atsu_font_face_attributes (font_id); | 4650 | result = mac_atsu_font_face_attributes (font_id); |
| 4651 | UNBLOCK_INPUT; | 4651 | UNBLOCK_INPUT; |
diff --git a/src/textprop.c b/src/textprop.c index e8ba1d87afc..f7b50755ed1 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -713,7 +713,7 @@ POSITION is at the end of OBJECT, both car and cdr are nil. */) | |||
| 713 | Lisp_Object overlay; | 713 | Lisp_Object overlay; |
| 714 | Lisp_Object val | 714 | Lisp_Object val |
| 715 | = get_char_property_and_overlay (position, prop, object, &overlay); | 715 | = get_char_property_and_overlay (position, prop, object, &overlay); |
| 716 | return Fcons(val, overlay); | 716 | return Fcons (val, overlay); |
| 717 | } | 717 | } |
| 718 | 718 | ||
| 719 | 719 | ||
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index e9664f94bbc..3646aec6983 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -443,15 +443,13 @@ unexec_regions_recorder (task_t task, void *rr, unsigned type, | |||
| 443 | 443 | ||
| 444 | while (num && num_unexec_regions < MAX_UNEXEC_REGIONS) | 444 | while (num && num_unexec_regions < MAX_UNEXEC_REGIONS) |
| 445 | { | 445 | { |
| 446 | /* Subtract the size of trailing null pages from filesize. It | 446 | /* Subtract the size of trailing null bytes from filesize. It |
| 447 | can be smaller than vmsize in segment commands. In such a | 447 | can be smaller than vmsize in segment commands. In such a |
| 448 | case, trailing pages are initialized with zeros. */ | 448 | case, trailing bytes are initialized with zeros. */ |
| 449 | for (p = ranges->address + ranges->size; p > ranges->address; | 449 | for (p = ranges->address + ranges->size; p > ranges->address; p--) |
| 450 | p -= sizeof (int)) | 450 | if (*(((char *) p)-1)) |
| 451 | if (*(((int *) p)-1)) | 451 | break; |
| 452 | break; | 452 | filesize = p - ranges->address; |
| 453 | filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address); | ||
| 454 | assert (filesize <= ranges->size); | ||
| 455 | 453 | ||
| 456 | unexec_regions[num_unexec_regions].filesize = filesize; | 454 | unexec_regions[num_unexec_regions].filesize = filesize; |
| 457 | unexec_regions[num_unexec_regions++].range = *ranges; | 455 | unexec_regions[num_unexec_regions++].range = *ranges; |
| @@ -503,11 +501,19 @@ unexec_regions_merge () | |||
| 503 | { | 501 | { |
| 504 | int i, n; | 502 | int i, n; |
| 505 | unexec_region_info r; | 503 | unexec_region_info r; |
| 504 | vm_size_t padsize; | ||
| 506 | 505 | ||
| 507 | qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), | 506 | qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), |
| 508 | &unexec_regions_sort_compare); | 507 | &unexec_regions_sort_compare); |
| 509 | n = 0; | 508 | n = 0; |
| 510 | r = unexec_regions[0]; | 509 | r = unexec_regions[0]; |
| 510 | padsize = r.range.address & (pagesize - 1); | ||
| 511 | if (padsize) | ||
| 512 | { | ||
| 513 | r.range.address -= padsize; | ||
| 514 | r.range.size += padsize; | ||
| 515 | r.filesize += padsize; | ||
| 516 | } | ||
| 511 | for (i = 1; i < num_unexec_regions; i++) | 517 | for (i = 1; i < num_unexec_regions; i++) |
| 512 | { | 518 | { |
| 513 | if (r.range.address + r.range.size == unexec_regions[i].range.address | 519 | if (r.range.address + r.range.size == unexec_regions[i].range.address |
| @@ -520,6 +526,17 @@ unexec_regions_merge () | |||
| 520 | { | 526 | { |
| 521 | unexec_regions[n++] = r; | 527 | unexec_regions[n++] = r; |
| 522 | r = unexec_regions[i]; | 528 | r = unexec_regions[i]; |
| 529 | padsize = r.range.address & (pagesize - 1); | ||
| 530 | if (padsize) | ||
| 531 | { | ||
| 532 | if ((unexec_regions[n-1].range.address | ||
| 533 | + unexec_regions[n-1].range.size) == r.range.address) | ||
| 534 | unexec_regions[n-1].range.size -= padsize; | ||
| 535 | |||
| 536 | r.range.address -= padsize; | ||
| 537 | r.range.size += padsize; | ||
| 538 | r.filesize += padsize; | ||
| 539 | } | ||
| 523 | } | 540 | } |
| 524 | } | 541 | } |
| 525 | unexec_regions[n++] = r; | 542 | unexec_regions[n++] = r; |
| @@ -562,6 +579,11 @@ print_load_command_name (int lc) | |||
| 562 | case LC_TWOLEVEL_HINTS: | 579 | case LC_TWOLEVEL_HINTS: |
| 563 | printf ("LC_TWOLEVEL_HINTS"); | 580 | printf ("LC_TWOLEVEL_HINTS"); |
| 564 | break; | 581 | break; |
| 582 | #ifdef LC_UUID | ||
| 583 | case LC_UUID: | ||
| 584 | printf ("LC_UUID "); | ||
| 585 | break; | ||
| 586 | #endif | ||
| 565 | default: | 587 | default: |
| 566 | printf ("unknown "); | 588 | printf ("unknown "); |
| 567 | } | 589 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 43e5a953e50..ed8d54cfaef 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -954,8 +954,8 @@ static void compute_string_pos P_ ((struct text_pos *, struct text_pos, | |||
| 954 | static int face_before_or_after_it_pos P_ ((struct it *, int)); | 954 | static int face_before_or_after_it_pos P_ ((struct it *, int)); |
| 955 | static int next_overlay_change P_ ((int)); | 955 | static int next_overlay_change P_ ((int)); |
| 956 | static int handle_single_display_spec P_ ((struct it *, Lisp_Object, | 956 | static int handle_single_display_spec P_ ((struct it *, Lisp_Object, |
| 957 | Lisp_Object, struct text_pos *, | 957 | Lisp_Object, Lisp_Object, |
| 958 | int)); | 958 | struct text_pos *, int)); |
| 959 | static int underlying_face_id P_ ((struct it *)); | 959 | static int underlying_face_id P_ ((struct it *)); |
| 960 | static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *, | 960 | static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *, |
| 961 | struct window *)); | 961 | struct window *)); |
| @@ -3060,16 +3060,18 @@ handle_stop (it) | |||
| 3060 | if (it->method == GET_FROM_DISPLAY_VECTOR) | 3060 | if (it->method == GET_FROM_DISPLAY_VECTOR) |
| 3061 | handle_overlay_change_p = 0; | 3061 | handle_overlay_change_p = 0; |
| 3062 | 3062 | ||
| 3063 | /* Handle overlay changes. */ | 3063 | /* Handle overlay changes. |
| 3064 | This sets HANDLED to HANDLED_RECOMPUTE_PROPS | ||
| 3065 | if it finds overlays. */ | ||
| 3064 | if (handle_overlay_change_p) | 3066 | if (handle_overlay_change_p) |
| 3065 | handled = handle_overlay_change (it); | 3067 | handled = handle_overlay_change (it); |
| 3066 | |||
| 3067 | /* Determine where to stop next. */ | ||
| 3068 | if (handled == HANDLED_NORMALLY) | ||
| 3069 | compute_stop_pos (it); | ||
| 3070 | } | 3068 | } |
| 3071 | } | 3069 | } |
| 3072 | while (handled == HANDLED_RECOMPUTE_PROPS); | 3070 | while (handled == HANDLED_RECOMPUTE_PROPS); |
| 3071 | |||
| 3072 | /* Determine where to stop next. */ | ||
| 3073 | if (handled == HANDLED_NORMALLY) | ||
| 3074 | compute_stop_pos (it); | ||
| 3073 | } | 3075 | } |
| 3074 | 3076 | ||
| 3075 | 3077 | ||
| @@ -3350,18 +3352,58 @@ handle_face_prop (it) | |||
| 3350 | else | 3352 | else |
| 3351 | { | 3353 | { |
| 3352 | int base_face_id, bufpos; | 3354 | int base_face_id, bufpos; |
| 3355 | int i; | ||
| 3356 | Lisp_Object from_overlay | ||
| 3357 | = (it->current.overlay_string_index >= 0 | ||
| 3358 | ? it->string_overlays[it->current.overlay_string_index] | ||
| 3359 | : Qnil); | ||
| 3360 | |||
| 3361 | /* See if we got to this string directly or indirectly from | ||
| 3362 | an overlay property. That includes the before-string or | ||
| 3363 | after-string of an overlay, strings in display properties | ||
| 3364 | provided by an overlay, their text properties, etc. | ||
| 3365 | |||
| 3366 | FROM_OVERLAY is the overlay that brought us here, or nil if none. */ | ||
| 3367 | if (! NILP (from_overlay)) | ||
| 3368 | for (i = it->sp - 1; i >= 0; i--) | ||
| 3369 | { | ||
| 3370 | if (it->stack[i].current.overlay_string_index >= 0) | ||
| 3371 | from_overlay | ||
| 3372 | = it->string_overlays[it->stack[i].current.overlay_string_index]; | ||
| 3373 | else if (! NILP (it->stack[i].from_overlay)) | ||
| 3374 | from_overlay = it->stack[i].from_overlay; | ||
| 3353 | 3375 | ||
| 3354 | if (it->current.overlay_string_index >= 0) | 3376 | if (!NILP (from_overlay)) |
| 3355 | bufpos = IT_CHARPOS (*it); | 3377 | break; |
| 3378 | } | ||
| 3379 | |||
| 3380 | if (! NILP (from_overlay)) | ||
| 3381 | { | ||
| 3382 | bufpos = IT_CHARPOS (*it); | ||
| 3383 | /* For a string from an overlay, the base face depends | ||
| 3384 | only on text properties and ignores overlays. */ | ||
| 3385 | base_face_id | ||
| 3386 | = face_for_overlay_string (it->w, | ||
| 3387 | IT_CHARPOS (*it), | ||
| 3388 | it->region_beg_charpos, | ||
| 3389 | it->region_end_charpos, | ||
| 3390 | &next_stop, | ||
| 3391 | (IT_CHARPOS (*it) | ||
| 3392 | + TEXT_PROP_DISTANCE_LIMIT), | ||
| 3393 | 0, | ||
| 3394 | from_overlay); | ||
| 3395 | } | ||
| 3356 | else | 3396 | else |
| 3357 | bufpos = 0; | 3397 | { |
| 3398 | bufpos = 0; | ||
| 3358 | 3399 | ||
| 3359 | /* For strings from a buffer, i.e. overlay strings or strings | 3400 | /* For strings from a `display' property, use the face at |
| 3360 | from a `display' property, use the face at IT's current | 3401 | IT's current buffer position as the base face to merge |
| 3361 | buffer position as the base face to merge with, so that | 3402 | with, so that overlay strings appear in the same face as |
| 3362 | overlay strings appear in the same face as surrounding | 3403 | surrounding text, unless they specify their own |
| 3363 | text, unless they specify their own faces. */ | 3404 | faces. */ |
| 3364 | base_face_id = underlying_face_id (it); | 3405 | base_face_id = underlying_face_id (it); |
| 3406 | } | ||
| 3365 | 3407 | ||
| 3366 | new_face_id = face_at_string_position (it->w, | 3408 | new_face_id = face_at_string_position (it->w, |
| 3367 | it->string, | 3409 | it->string, |
| @@ -3772,7 +3814,7 @@ static enum prop_handled | |||
| 3772 | handle_display_prop (it) | 3814 | handle_display_prop (it) |
| 3773 | struct it *it; | 3815 | struct it *it; |
| 3774 | { | 3816 | { |
| 3775 | Lisp_Object prop, object; | 3817 | Lisp_Object prop, object, overlay; |
| 3776 | struct text_pos *position; | 3818 | struct text_pos *position; |
| 3777 | /* Nonzero if some property replaces the display of the text itself. */ | 3819 | /* Nonzero if some property replaces the display of the text itself. */ |
| 3778 | int display_replaced_p = 0; | 3820 | int display_replaced_p = 0; |
| @@ -3800,10 +3842,12 @@ handle_display_prop (it) | |||
| 3800 | if (!it->string_from_display_prop_p) | 3842 | if (!it->string_from_display_prop_p) |
| 3801 | it->area = TEXT_AREA; | 3843 | it->area = TEXT_AREA; |
| 3802 | 3844 | ||
| 3803 | prop = Fget_char_property (make_number (position->charpos), | 3845 | prop = get_char_property_and_overlay (make_number (position->charpos), |
| 3804 | Qdisplay, object); | 3846 | Qdisplay, object, &overlay); |
| 3805 | if (NILP (prop)) | 3847 | if (NILP (prop)) |
| 3806 | return HANDLED_NORMALLY; | 3848 | return HANDLED_NORMALLY; |
| 3849 | /* Now OVERLAY is the overlay that gave us this property, or nil | ||
| 3850 | if it was a text property. */ | ||
| 3807 | 3851 | ||
| 3808 | if (!STRINGP (it->string)) | 3852 | if (!STRINGP (it->string)) |
| 3809 | object = it->w->buffer; | 3853 | object = it->w->buffer; |
| @@ -3825,7 +3869,7 @@ handle_display_prop (it) | |||
| 3825 | { | 3869 | { |
| 3826 | for (; CONSP (prop); prop = XCDR (prop)) | 3870 | for (; CONSP (prop); prop = XCDR (prop)) |
| 3827 | { | 3871 | { |
| 3828 | if (handle_single_display_spec (it, XCAR (prop), object, | 3872 | if (handle_single_display_spec (it, XCAR (prop), object, overlay, |
| 3829 | position, display_replaced_p)) | 3873 | position, display_replaced_p)) |
| 3830 | { | 3874 | { |
| 3831 | display_replaced_p = 1; | 3875 | display_replaced_p = 1; |
| @@ -3840,7 +3884,7 @@ handle_display_prop (it) | |||
| 3840 | { | 3884 | { |
| 3841 | int i; | 3885 | int i; |
| 3842 | for (i = 0; i < ASIZE (prop); ++i) | 3886 | for (i = 0; i < ASIZE (prop); ++i) |
| 3843 | if (handle_single_display_spec (it, AREF (prop, i), object, | 3887 | if (handle_single_display_spec (it, AREF (prop, i), object, overlay, |
| 3844 | position, display_replaced_p)) | 3888 | position, display_replaced_p)) |
| 3845 | { | 3889 | { |
| 3846 | display_replaced_p = 1; | 3890 | display_replaced_p = 1; |
| @@ -3852,7 +3896,8 @@ handle_display_prop (it) | |||
| 3852 | } | 3896 | } |
| 3853 | else | 3897 | else |
| 3854 | { | 3898 | { |
| 3855 | int ret = handle_single_display_spec (it, prop, object, position, 0); | 3899 | int ret = handle_single_display_spec (it, prop, object, overlay, |
| 3900 | position, 0); | ||
| 3856 | if (ret < 0) /* Replaced by "", i.e. nothing. */ | 3901 | if (ret < 0) /* Replaced by "", i.e. nothing. */ |
| 3857 | return HANDLED_RECOMPUTE_PROPS; | 3902 | return HANDLED_RECOMPUTE_PROPS; |
| 3858 | if (ret) | 3903 | if (ret) |
| @@ -3894,6 +3939,9 @@ display_prop_end (it, object, start_pos) | |||
| 3894 | replaced text display with something else, for example an image; | 3939 | replaced text display with something else, for example an image; |
| 3895 | we ignore such properties after the first one has been processed. | 3940 | we ignore such properties after the first one has been processed. |
| 3896 | 3941 | ||
| 3942 | OVERLAY is the overlay this `display' property came from, | ||
| 3943 | or nil if it was a text property. | ||
| 3944 | |||
| 3897 | If PROP is a `space' or `image' specification, and in some other | 3945 | If PROP is a `space' or `image' specification, and in some other |
| 3898 | cases too, set *POSITION to the position where the `display' | 3946 | cases too, set *POSITION to the position where the `display' |
| 3899 | property ends. | 3947 | property ends. |
| @@ -3903,11 +3951,12 @@ display_prop_end (it, object, start_pos) | |||
| 3903 | "something" is "nothing". */ | 3951 | "something" is "nothing". */ |
| 3904 | 3952 | ||
| 3905 | static int | 3953 | static int |
| 3906 | handle_single_display_spec (it, spec, object, position, | 3954 | handle_single_display_spec (it, spec, object, overlay, position, |
| 3907 | display_replaced_before_p) | 3955 | display_replaced_before_p) |
| 3908 | struct it *it; | 3956 | struct it *it; |
| 3909 | Lisp_Object spec; | 3957 | Lisp_Object spec; |
| 3910 | Lisp_Object object; | 3958 | Lisp_Object object; |
| 3959 | Lisp_Object overlay; | ||
| 3911 | struct text_pos *position; | 3960 | struct text_pos *position; |
| 3912 | int display_replaced_before_p; | 3961 | int display_replaced_before_p; |
| 3913 | { | 3962 | { |
| @@ -4017,7 +4066,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4017 | return 0; | 4066 | return 0; |
| 4018 | } | 4067 | } |
| 4019 | 4068 | ||
| 4020 | /* Handle `(space_width WIDTH)'. */ | 4069 | /* Handle `(space-width WIDTH)'. */ |
| 4021 | if (CONSP (spec) | 4070 | if (CONSP (spec) |
| 4022 | && EQ (XCAR (spec), Qspace_width) | 4071 | && EQ (XCAR (spec), Qspace_width) |
| 4023 | && CONSP (XCDR (spec))) | 4072 | && CONSP (XCDR (spec))) |
| @@ -4141,6 +4190,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4141 | it->position = start_pos; | 4190 | it->position = start_pos; |
| 4142 | it->object = NILP (object) ? it->w->buffer : object; | 4191 | it->object = NILP (object) ? it->w->buffer : object; |
| 4143 | it->method = GET_FROM_IMAGE; | 4192 | it->method = GET_FROM_IMAGE; |
| 4193 | it->from_overlay = Qnil; | ||
| 4144 | it->face_id = face_id; | 4194 | it->face_id = face_id; |
| 4145 | 4195 | ||
| 4146 | /* Say that we haven't consumed the characters with | 4196 | /* Say that we haven't consumed the characters with |
| @@ -4211,6 +4261,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4211 | it->position = *position; | 4261 | it->position = *position; |
| 4212 | push_it (it); | 4262 | push_it (it); |
| 4213 | it->position = save_pos; | 4263 | it->position = save_pos; |
| 4264 | it->from_overlay = overlay; | ||
| 4214 | 4265 | ||
| 4215 | if (NILP (location)) | 4266 | if (NILP (location)) |
| 4216 | it->area = TEXT_AREA; | 4267 | it->area = TEXT_AREA; |
| @@ -4854,7 +4905,10 @@ load_overlay_strings (it, charpos) | |||
| 4854 | i = 0; | 4905 | i = 0; |
| 4855 | j = it->current.overlay_string_index; | 4906 | j = it->current.overlay_string_index; |
| 4856 | while (i < OVERLAY_STRING_CHUNK_SIZE && j < n) | 4907 | while (i < OVERLAY_STRING_CHUNK_SIZE && j < n) |
| 4857 | it->overlay_strings[i++] = entries[j++].string; | 4908 | { |
| 4909 | it->overlay_strings[i++] = entries[j++].string; | ||
| 4910 | it->string_overlays[i++] = entries[j++].overlay; | ||
| 4911 | } | ||
| 4858 | 4912 | ||
| 4859 | CHECK_IT (it); | 4913 | CHECK_IT (it); |
| 4860 | } | 4914 | } |
| @@ -4900,6 +4954,7 @@ get_overlay_strings_1 (it, charpos, compute_stop_p) | |||
| 4900 | string. */ | 4954 | string. */ |
| 4901 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; | 4955 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; |
| 4902 | it->string = it->overlay_strings[0]; | 4956 | it->string = it->overlay_strings[0]; |
| 4957 | it->from_overlay = Qnil; | ||
| 4903 | it->stop_charpos = 0; | 4958 | it->stop_charpos = 0; |
| 4904 | xassert (STRINGP (it->string)); | 4959 | xassert (STRINGP (it->string)); |
| 4905 | it->end_charpos = SCHARS (it->string); | 4960 | it->end_charpos = SCHARS (it->string); |
| @@ -4953,6 +5008,7 @@ push_it (it) | |||
| 4953 | p->face_id = it->face_id; | 5008 | p->face_id = it->face_id; |
| 4954 | p->string = it->string; | 5009 | p->string = it->string; |
| 4955 | p->method = it->method; | 5010 | p->method = it->method; |
| 5011 | p->from_overlay = it->from_overlay; | ||
| 4956 | switch (p->method) | 5012 | switch (p->method) |
| 4957 | { | 5013 | { |
| 4958 | case GET_FROM_IMAGE: | 5014 | case GET_FROM_IMAGE: |
| @@ -5006,6 +5062,7 @@ pop_it (it) | |||
| 5006 | it->current = p->current; | 5062 | it->current = p->current; |
| 5007 | it->position = p->position; | 5063 | it->position = p->position; |
| 5008 | it->string = p->string; | 5064 | it->string = p->string; |
| 5065 | it->from_overlay = p->from_overlay; | ||
| 5009 | if (NILP (it->string)) | 5066 | if (NILP (it->string)) |
| 5010 | SET_TEXT_POS (it->current.string_pos, -1, -1); | 5067 | SET_TEXT_POS (it->current.string_pos, -1, -1); |
| 5011 | it->method = p->method; | 5068 | it->method = p->method; |
| @@ -17388,7 +17445,9 @@ are the selected window and the window's buffer). */) | |||
| 17388 | buffer = w->buffer; | 17445 | buffer = w->buffer; |
| 17389 | CHECK_BUFFER (buffer); | 17446 | CHECK_BUFFER (buffer); |
| 17390 | 17447 | ||
| 17391 | if (NILP (format)) | 17448 | /* Make formatting the modeline a non-op when noninteractive, otherwise |
| 17449 | there will be problems later caused by a partially initialized frame. */ | ||
| 17450 | if (NILP (format) || noninteractive) | ||
| 17392 | return empty_unibyte_string; | 17451 | return empty_unibyte_string; |
| 17393 | 17452 | ||
| 17394 | if (no_props) | 17453 | if (no_props) |
diff --git a/src/xfaces.c b/src/xfaces.c index 5e396d8bf6e..36bbacb84ce 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -7732,6 +7732,85 @@ face_at_buffer_position (w, pos, region_beg, region_end, | |||
| 7732 | return lookup_face (f, attrs, 0, NULL); | 7732 | return lookup_face (f, attrs, 0, NULL); |
| 7733 | } | 7733 | } |
| 7734 | 7734 | ||
| 7735 | /* Return the face ID at buffer position POS for displaying ASCII | ||
| 7736 | characters associated with overlay strings for overlay OVERLAY. | ||
| 7737 | |||
| 7738 | Like face_at_buffer_position except for OVERLAY. Currently it | ||
| 7739 | simply disregards the `face' properties of all overlays. */ | ||
| 7740 | |||
| 7741 | int | ||
| 7742 | face_for_overlay_string (w, pos, region_beg, region_end, | ||
| 7743 | endptr, limit, mouse, overlay) | ||
| 7744 | struct window *w; | ||
| 7745 | int pos; | ||
| 7746 | int region_beg, region_end; | ||
| 7747 | int *endptr; | ||
| 7748 | int limit; | ||
| 7749 | int mouse; | ||
| 7750 | Lisp_Object overlay; | ||
| 7751 | { | ||
| 7752 | struct frame *f = XFRAME (w->frame); | ||
| 7753 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | ||
| 7754 | Lisp_Object prop, position; | ||
| 7755 | int i, noverlays; | ||
| 7756 | Lisp_Object *overlay_vec; | ||
| 7757 | Lisp_Object frame; | ||
| 7758 | int endpos; | ||
| 7759 | Lisp_Object propname = mouse ? Qmouse_face : Qface; | ||
| 7760 | Lisp_Object limit1, end; | ||
| 7761 | struct face *default_face; | ||
| 7762 | |||
| 7763 | /* W must display the current buffer. We could write this function | ||
| 7764 | to use the frame and buffer of W, but right now it doesn't. */ | ||
| 7765 | /* xassert (XBUFFER (w->buffer) == current_buffer); */ | ||
| 7766 | |||
| 7767 | XSETFRAME (frame, f); | ||
| 7768 | XSETFASTINT (position, pos); | ||
| 7769 | |||
| 7770 | endpos = ZV; | ||
| 7771 | if (pos < region_beg && region_beg < endpos) | ||
| 7772 | endpos = region_beg; | ||
| 7773 | |||
| 7774 | /* Get the `face' or `mouse_face' text property at POS, and | ||
| 7775 | determine the next position at which the property changes. */ | ||
| 7776 | prop = Fget_text_property (position, propname, w->buffer); | ||
| 7777 | XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); | ||
| 7778 | end = Fnext_single_property_change (position, propname, w->buffer, limit1); | ||
| 7779 | if (INTEGERP (end)) | ||
| 7780 | endpos = XINT (end); | ||
| 7781 | |||
| 7782 | *endptr = endpos; | ||
| 7783 | |||
| 7784 | default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); | ||
| 7785 | |||
| 7786 | /* Optimize common cases where we can use the default face. */ | ||
| 7787 | if (NILP (prop) | ||
| 7788 | && !(pos >= region_beg && pos < region_end)) | ||
| 7789 | return DEFAULT_FACE_ID; | ||
| 7790 | |||
| 7791 | /* Begin with attributes from the default face. */ | ||
| 7792 | bcopy (default_face->lface, attrs, sizeof attrs); | ||
| 7793 | |||
| 7794 | /* Merge in attributes specified via text properties. */ | ||
| 7795 | if (!NILP (prop)) | ||
| 7796 | merge_face_ref (f, prop, attrs, 1, 0); | ||
| 7797 | |||
| 7798 | /* If in the region, merge in the region face. */ | ||
| 7799 | if (pos >= region_beg && pos < region_end) | ||
| 7800 | { | ||
| 7801 | merge_named_face (f, Qregion, attrs, 0); | ||
| 7802 | |||
| 7803 | if (region_end < endpos) | ||
| 7804 | endpos = region_end; | ||
| 7805 | } | ||
| 7806 | |||
| 7807 | *endptr = endpos; | ||
| 7808 | |||
| 7809 | /* Look up a realized face with the given face attributes, | ||
| 7810 | or realize a new one for ASCII characters. */ | ||
| 7811 | return lookup_face (f, attrs, 0, NULL); | ||
| 7812 | } | ||
| 7813 | |||
| 7735 | 7814 | ||
| 7736 | /* Compute the face at character position POS in Lisp string STRING on | 7815 | /* Compute the face at character position POS in Lisp string STRING on |
| 7737 | window W, for ASCII characters. | 7816 | window W, for ASCII characters. |