diff options
| author | Karoly Lorentey | 2005-02-20 18:47:54 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-20 18:47:54 +0000 |
| commit | b5d78df397f8cdcd20f3bcfbed2eb71d522abddd (patch) | |
| tree | cedfc1db69595526c12da068ea7ff5bdf3b806f2 | |
| parent | 60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (diff) | |
| parent | eedeacb3074baad8ce752a506f9f435c98e42ff4 (diff) | |
| download | emacs-b5d78df397f8cdcd20f3bcfbed2eb71d522abddd.tar.gz emacs-b5d78df397f8cdcd20f3bcfbed2eb71d522abddd.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 17-26, 107-116)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-107
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-108
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-109
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-110
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-112
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-113
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-114
<no summary provided>
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-115
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-116
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-17
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-18
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-19
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-20
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-21
More work on moving images to etc/images
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-22
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-23
Fix errors with image-file installation
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-24
etc/Makefile.in (install): Put gnus-tut.txt in the right place.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-25
etc/Makefile.in (install, uninstall): Fix installed image dirs.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-26
etc/Makefile.in (install): Create $(etcdir)/images/gnus dir.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-296
51 files changed, 1198 insertions, 319 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index b4750dbc22d..e2bb0ab918d 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -65,41 +65,6 @@ further. | |||
| 65 | I think in the near future we will see more of this problem, so it might be | 65 | I think in the near future we will see more of this problem, so it might be |
| 66 | time to make anfe-ftp more intelligent. | 66 | time to make anfe-ftp more intelligent. |
| 67 | 67 | ||
| 68 | ** pcvs bug: | ||
| 69 | |||
| 70 | In a CVS mode buffer created using the `cvs-examine' command, if I | ||
| 71 | commit a file in a subdirectory, after committing the line is not | ||
| 72 | updated with the version of the new revision. Instead, a line is added | ||
| 73 | in the buffer in the top directory listing. | ||
| 74 | |||
| 75 | Example: I start with this: | ||
| 76 | |||
| 77 | ,---- | ||
| 78 | | In directory .: | ||
| 79 | | Unknown .htaccess | ||
| 80 | | Unknown 404.php | ||
| 81 | | Unknown rain.jpg | ||
| 82 | | In directory include: | ||
| 83 | | Modified include/foo.include | ||
| 84 | `---- | ||
| 85 | |||
| 86 | I commit the file include/foo.include using `c' on the corresponding | ||
| 87 | line. I get: | ||
| 88 | |||
| 89 | ,---- | ||
| 90 | | In directory .: | ||
| 91 | | Unknown .htaccess | ||
| 92 | | Unknown 404.php | ||
| 93 | | committed Up-To-Date 1.13 foo.include | ||
| 94 | | Unknown rain.jpg | ||
| 95 | | In directory include: | ||
| 96 | | Modified include/foo.include | ||
| 97 | `---- | ||
| 98 | |||
| 99 | There is no file named foo.include in the top directory. This bug | ||
| 100 | appeared sometime before October 2004 and now. | ||
| 101 | |||
| 102 | |||
| 103 | 68 | ||
| 104 | * GTK RELATED BUGS | 69 | * GTK RELATED BUGS |
| 105 | 70 | ||
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index f12f97878e8..70c36af79d8 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -488,6 +488,20 @@ these problems. | |||
| 488 | Upgrade to AUC TeX version 10 or later, and make sure it is | 488 | Upgrade to AUC TeX version 10 or later, and make sure it is |
| 489 | byte-compiled with Emacs 21. | 489 | byte-compiled with Emacs 21. |
| 490 | 490 | ||
| 491 | ** PCL-CVS | ||
| 492 | |||
| 493 | *** Lines are not updated or new lines are added in the buffer upon commit. | ||
| 494 | |||
| 495 | When committing files located higher in the hierarchy than the examined | ||
| 496 | directory, some versions of the CVS program return an ambiguous message | ||
| 497 | from which PCL-CVS cannot extract the full location of the committed | ||
| 498 | files. As a result, the corresponding lines in the PCL-CVS buffer are | ||
| 499 | not updated with the new revision of these files, and new lines are | ||
| 500 | added to the top-level directory. | ||
| 501 | |||
| 502 | This can happen with CVS versions 1.12.8 and 1.12.9. Upgrade to CVS | ||
| 503 | 1.12.10 or newer to fix this problem. | ||
| 504 | |||
| 491 | ** Miscellaneous problems | 505 | ** Miscellaneous problems |
| 492 | 506 | ||
| 493 | *** Self-documentation messages are garbled. | 507 | *** Self-documentation messages are garbled. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39b29326077..5a1494c1deb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,136 @@ | |||
| 1 | 2005-02-20 Jonathan Yavner <jyavner@member.fsf.org> | ||
| 2 | |||
| 3 | * ses.el (undo-more): restore defadvice, but only the part that | ||
| 4 | allows changes outside the restricted area of the buffer. | ||
| 5 | |||
| 6 | 2005-02-20 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * simple.el (line-move): Add fourth optional arg try-vscroll which | ||
| 9 | must be set to perform auto-window-vscroll. | ||
| 10 | When moving backwards and doing auto-window-vscroll, automatically | ||
| 11 | vscroll to the last part of lines which are taller than the window. | ||
| 12 | (next-line, previous-line): Set try-vscroll arg on line-move. | ||
| 13 | |||
| 14 | 2005-02-19 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 15 | |||
| 16 | * replace.el (query-replace, query-replace-regexp) | ||
| 17 | (replace-string, replace-regexp): When operating on region, make | ||
| 18 | the minibuffer prompt say so. | ||
| 19 | |||
| 20 | * isearch.el (isearch-forward): Document isearch-query-replace and | ||
| 21 | isearch-query-replace-regexp keybindings. | ||
| 22 | |||
| 23 | 2005-02-19 Jay Belanger <belanger@truman.edu> | ||
| 24 | |||
| 25 | * calc/calc-aent.el (math-read-token): Add local variable. | ||
| 26 | |||
| 27 | * calc/calc-prog.el (calc-user-define-edit): Add local variable. | ||
| 28 | (calc-edit-top): Move declaration to earlier in file. | ||
| 29 | (calc-edit-macro-repeats): Add local variables. | ||
| 30 | |||
| 31 | * calc/calcalg2.el: Add differentiation rule for calcFunc-coth. | ||
| 32 | Adjust differentiation rules for calcFunc-tan, calcFunc-cot, | ||
| 33 | calcFunc-tanh. | ||
| 34 | Adjust integration rule for calcFunc-tan. | ||
| 35 | |||
| 36 | 2005-02-19 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 37 | |||
| 38 | * viper-cmd.el (viper-prefix-commands): Make into a defconst. | ||
| 39 | (viper-exec-buffer-search): Use regexp-quote to quote buffer string. | ||
| 40 | (viper-minibuffer-setup-sentinel): Make some variables buffer-local. | ||
| 41 | (viper-skip-separators): Bug fix. | ||
| 42 | (viper-set-searchstyle-toggling-macros): Allow to unset macros in a | ||
| 43 | particular major mode. | ||
| 44 | (viper-del-backward-char-in-replace): Don't put deleted char on the | ||
| 45 | kill ring. | ||
| 46 | |||
| 47 | * viper-ex.el (viper-color-display-p): New function. | ||
| 48 | (viper-has-face-support-p): Use viper-color-display-p. | ||
| 49 | |||
| 50 | * viper-keym.el (viper-gnus-modifier-map): New keymap. | ||
| 51 | |||
| 52 | * viper-macs.el (viper-unrecord-kbd-macro): Bug fix. | ||
| 53 | |||
| 54 | * viper-util.el (viper-glob-unix-files): Fix shell status check. | ||
| 55 | (viper-file-remote-p): Make equivalent to file-remote-p. | ||
| 56 | |||
| 57 | * viper.el (viper-major-mode-modifier-list): Use | ||
| 58 | viper-gnus-modifier-map. | ||
| 59 | |||
| 60 | 2005-02-19 David Kastrup <dak@gnu.org> | ||
| 61 | |||
| 62 | * subr.el (subregexp-context-p): Fix garbled doc string by adding | ||
| 63 | quoting. | ||
| 64 | |||
| 65 | 2005-02-19 Jay Belanger <belanger@truman.edu> | ||
| 66 | |||
| 67 | * calc/calc-math.el (calc-arctan, calc-tanh, calc-arctanh): | ||
| 68 | Removed extra definitions. | ||
| 69 | (calc-coth): New function. | ||
| 70 | (calcFunc-cot): Fix `let'. | ||
| 71 | |||
| 72 | 2005-02-19 Eli Zaretskii <eliz@gnu.org> | ||
| 73 | |||
| 74 | * faces.el (escape-glyph, minibuffer-prompt): Add commentary for | ||
| 75 | the reasons we use "type pc" in these faces. | ||
| 76 | |||
| 77 | * button.el (button): Ditto. | ||
| 78 | |||
| 79 | 2005-02-19 Michael Mauger <mmaug@yahoo.com> | ||
| 80 | |||
| 81 | * replace.el (query-replace-read-from): Set the value of | ||
| 82 | query-replace-from-history-variable to handle the case of an empty | ||
| 83 | string entered to accept the suggested default. | ||
| 84 | |||
| 85 | * net/tramp.el (tramp-file-name-for-operation): Use | ||
| 86 | dired-call-process instead of dired-call-process-command. | ||
| 87 | |||
| 88 | 2005-02-19 Jay Belanger <belanger@truman.edu> | ||
| 89 | |||
| 90 | * calc/calc-arith.el (math-trig-inverses, math-div-trig) | ||
| 91 | (math-div-non-trig): New variables. | ||
| 92 | (math-combine-prod-trig, math-div-new-trig, math-div-new-non-trig) | ||
| 93 | (math-div-isolate-trig, math-div-isolate-trig-term): New functions. | ||
| 94 | (math-combine-prod, math-div-symb-fancy): Add simplifications for | ||
| 95 | trig expressions. | ||
| 96 | |||
| 97 | 2005-02-19 Nick Roberts <nickrob@snap.net.nz> | ||
| 98 | |||
| 99 | * progmodes/gdb-ui.el (gdb-var-update-handler) | ||
| 100 | (gdb-speedbar-timer-fn): Ensure speedbar updates with new values | ||
| 101 | for watch expressions, | ||
| 102 | (gdb-var-create-handler): Don't set speedbar-update-flag. | ||
| 103 | (gdb-post-prompt): Simplify test for speedbar. | ||
| 104 | |||
| 105 | 2005-02-19 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 106 | |||
| 107 | * ediff.el (ediff-set-diff-overlays-in-one-buffer, | ||
| 108 | ediff-set-fine-overlays-in-one-buffer,ediff-goto-word) make sure | ||
| 109 | we use the syntax table of the correct buffer. | ||
| 110 | (ediff-same-file-contents,ediff-same-contents): enhancements thanks to | ||
| 111 | Felix Gatzemeier. | ||
| 112 | |||
| 113 | * ediff-init.el (ediff-hide-face): checks for definedness of functions. | ||
| 114 | (ediff-file-remote-p): make synonymous with file-remote-p. | ||
| 115 | In all deffaces ediff-*-face-*, use min-colors. | ||
| 116 | |||
| 117 | * ediff-mult.el (ediff-meta-mark-equal-files): make use of | ||
| 118 | ediff-recurse-to-subdirectories. | ||
| 119 | (ediff-mark-if-equal): check that the arguments are strings, use | ||
| 120 | ediff-same-contents (after to Felix Gatzemeier). | ||
| 121 | |||
| 122 | * ediff.el (ediff-merge-on-startup): don't set buffer-modified-p to | ||
| 123 | nil. | ||
| 124 | |||
| 125 | 2005-02-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 126 | |||
| 127 | * log-view.el (log-view-message-re): Fix up Subversion regexp. | ||
| 128 | |||
| 129 | 2005-02-18 David Kastrup <dak@gnu.org> | ||
| 130 | |||
| 131 | * progmodes/meta-mode.el (meta-mark-active): Fix condition to just | ||
| 132 | use `mark-active' when defined. | ||
| 133 | |||
| 1 | 2005-02-18 Kenichi Handa <handa@m17n.org> | 134 | 2005-02-18 Kenichi Handa <handa@m17n.org> |
| 2 | 135 | ||
| 3 | * ps-print.el (ps-font-info-database): New entry | 136 | * ps-print.el (ps-font-info-database): New entry |
| @@ -88,8 +221,8 @@ | |||
| 88 | 221 | ||
| 89 | 2005-02-15 Lute Kamstra <lute@gnu.org> | 222 | 2005-02-15 Lute Kamstra <lute@gnu.org> |
| 90 | 223 | ||
| 91 | * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add | 224 | * emacs-lisp/lisp-mode.el (lisp-mode-variables): |
| 92 | ;;;###autoload to `outline-regexp'. Suggested by Stefan Monnier | 225 | Add ;;;###autoload to `outline-regexp'. Suggested by Stefan Monnier |
| 93 | <monnier@iro.umontreal.ca> | 226 | <monnier@iro.umontreal.ca> |
| 94 | (lisp-outline-level): Improve efficiency. Suggested by David | 227 | (lisp-outline-level): Improve efficiency. Suggested by David |
| 95 | Kastrup <dak@gnu.org>. | 228 | Kastrup <dak@gnu.org>. |
| @@ -164,7 +297,7 @@ | |||
| 164 | * simple.el (eval-expression-print-format): | 297 | * simple.el (eval-expression-print-format): |
| 165 | Avoid warning about edebug-active. | 298 | Avoid warning about edebug-active. |
| 166 | 299 | ||
| 167 | * help.el (help-for-help-internal): Renamed from help-for-help. | 300 | * help.el (help-for-help-internal): Rename from help-for-help. |
| 168 | (help-for-help): Define with defalias. | 301 | (help-for-help): Define with defalias. |
| 169 | 302 | ||
| 170 | * font-core.el (font-lock-default-function): Use with-no-warnings. | 303 | * font-core.el (font-lock-default-function): Use with-no-warnings. |
| @@ -197,7 +330,7 @@ | |||
| 197 | 2005-02-09 Nick Roberts <nickrob@snap.net.nz> | 330 | 2005-02-09 Nick Roberts <nickrob@snap.net.nz> |
| 198 | 331 | ||
| 199 | * progmodes/gdb-ui.el (gdb-location-list): New variable. | 332 | * progmodes/gdb-ui.el (gdb-location-list): New variable. |
| 200 | (gdb-cdir): Delete | 333 | (gdb-cdir): Delete. |
| 201 | (gdb-info-breakpoints-custom, gdb-goto-breakpoint) | 334 | (gdb-info-breakpoints-custom, gdb-goto-breakpoint) |
| 202 | (gdb-source-info): Treat case when source file is in another | 335 | (gdb-source-info): Treat case when source file is in another |
| 203 | directory properly. | 336 | directory properly. |
| @@ -208,8 +341,7 @@ | |||
| 208 | * calc/calc-prog.el (calc-write-parse-table-part) | 341 | * calc/calc-prog.el (calc-write-parse-table-part) |
| 209 | (calc-fix-token-name): Fix a check for language type. | 342 | (calc-fix-token-name): Fix a check for language type. |
| 210 | 343 | ||
| 211 | * calc/calccomp.el (math-compose-expr): Fix a check for language | 344 | * calc/calccomp.el (math-compose-expr): Fix a check for language type. |
| 212 | type. | ||
| 213 | 345 | ||
| 214 | 2005-02-07 Andre Spiegel <spiegel@gnu.org> | 346 | 2005-02-07 Andre Spiegel <spiegel@gnu.org> |
| 215 | 347 | ||
diff --git a/lisp/button.el b/lisp/button.el index dcd26846d10..5f9b5094e6c 100644 --- a/lisp/button.el +++ b/lisp/button.el | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | 50 | ||
| 51 | ;; Globals | 51 | ;; Globals |
| 52 | 52 | ||
| 53 | ;; Use color for the MS-DOS port because it doesn't support underline. | ||
| 53 | (defface button '((((type pc) (class color)) | 54 | (defface button '((((type pc) (class color)) |
| 54 | (:foreground "lightblue")) | 55 | (:foreground "lightblue")) |
| 55 | (t :underline t)) | 56 | (t :underline t)) |
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 9a693a18466..e174d81c41d 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -784,7 +784,8 @@ in Calc algebraic input.") | |||
| 784 | math-exp-pos (match-end 0) | 784 | math-exp-pos (match-end 0) |
| 785 | math-expr-data (math-restore-dashes | 785 | math-expr-data (math-restore-dashes |
| 786 | (math-match-substring math-exp-str 1))) | 786 | (math-match-substring math-exp-str 1))) |
| 787 | (let ((code (assoc math-expr-data math-tex-ignore-words))) | 787 | (let ((code (assoc math-expr-data math-tex-ignore-words)) |
| 788 | envname) | ||
| 788 | (cond ((null code)) | 789 | (cond ((null code)) |
| 789 | ((null (cdr code)) | 790 | ((null (cdr code)) |
| 790 | (math-read-token)) | 791 | (math-read-token)) |
| @@ -801,8 +802,8 @@ in Calc algebraic input.") | |||
| 801 | (string= envname "bmatrix") | 802 | (string= envname "bmatrix") |
| 802 | (string= envname "smallmatrix") | 803 | (string= envname "smallmatrix") |
| 803 | (string= envname "pmatrix")) | 804 | (string= envname "pmatrix")) |
| 804 | (if (setq j (string-match (concat "\\\\end{" envname "}") | 805 | (if (string-match (concat "\\\\end{" envname "}") |
| 805 | math-exp-str math-exp-pos)) | 806 | math-exp-str math-exp-pos) |
| 806 | (setq math-exp-str | 807 | (setq math-exp-str |
| 807 | (replace-match "]" t t math-exp-str)) | 808 | (replace-match "]" t t math-exp-str)) |
| 808 | (error "%s" (concat "No closing \\end{" envname "}")))))) | 809 | (error "%s" (concat "No closing \\end{" envname "}")))))) |
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 38c10f5cc9f..d9acc2ebc52 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el | |||
| @@ -1609,6 +1609,50 @@ | |||
| 1609 | (math-reject-arg b "*Division by zero")) | 1609 | (math-reject-arg b "*Division by zero")) |
| 1610 | a)))) | 1610 | a)))) |
| 1611 | 1611 | ||
| 1612 | ;; For math-div-symb-fancy | ||
| 1613 | (defvar math-trig-inverses | ||
| 1614 | '((calcFunc-sin . calcFunc-csc) | ||
| 1615 | (calcFunc-cos . calcFunc-sec) | ||
| 1616 | (calcFunc-tan . calcFunc-cot) | ||
| 1617 | (calcFunc-sec . calcFunc-cos) | ||
| 1618 | (calcFunc-csc . calcFunc-sin) | ||
| 1619 | (calcFunc-cot . calcFunc-tan) | ||
| 1620 | (calcFunc-sinh . calcFunc-csch) | ||
| 1621 | (calcFunc-cosh . calcFunc-sech) | ||
| 1622 | (calcFunc-tanh . calcFunc-coth) | ||
| 1623 | (calcFunc-sech . calcFunc-cosh) | ||
| 1624 | (calcFunc-csch . calcFunc-sinh) | ||
| 1625 | (calcFunc-coth . calcFunc-tanh))) | ||
| 1626 | |||
| 1627 | (defvar math-div-trig) | ||
| 1628 | (defvar math-div-non-trig) | ||
| 1629 | |||
| 1630 | (defun math-div-new-trig (tr) | ||
| 1631 | (if math-div-trig | ||
| 1632 | (setq math-div-trig | ||
| 1633 | (list '* tr math-div-trig)) | ||
| 1634 | (setq math-div-trig tr))) | ||
| 1635 | |||
| 1636 | (defun math-div-new-non-trig (ntr) | ||
| 1637 | (if math-div-non-trig | ||
| 1638 | (setq math-div-non-trig | ||
| 1639 | (list '* ntr math-div-non-trig)) | ||
| 1640 | (setq math-div-non-trig ntr))) | ||
| 1641 | |||
| 1642 | (defun math-div-isolate-trig (expr) | ||
| 1643 | (if (eq (car-safe expr) '*) | ||
| 1644 | (progn | ||
| 1645 | (math-div-isolate-trig-term (nth 1 expr)) | ||
| 1646 | (math-div-isolate-trig (nth 2 expr))) | ||
| 1647 | (math-div-isolate-trig-term expr))) | ||
| 1648 | |||
| 1649 | (defun math-div-isolate-trig-term (term) | ||
| 1650 | (let ((fn (assoc (car-safe term) math-trig-inverses))) | ||
| 1651 | (if fn | ||
| 1652 | (math-div-new-trig | ||
| 1653 | (cons (cdr fn) (cdr term))) | ||
| 1654 | (math-div-new-non-trig term)))) | ||
| 1655 | |||
| 1612 | (defun math-div-symb-fancy (a b) | 1656 | (defun math-div-symb-fancy (a b) |
| 1613 | (or (and math-simplify-only | 1657 | (or (and math-simplify-only |
| 1614 | (not (equal a math-simplify-only)) | 1658 | (not (equal a math-simplify-only)) |
| @@ -1667,6 +1711,15 @@ | |||
| 1667 | (list 'calcFunc-idn (math-div a (nth 1 b)))) | 1711 | (list 'calcFunc-idn (math-div a (nth 1 b)))) |
| 1668 | (and (math-known-matrixp a) | 1712 | (and (math-known-matrixp a) |
| 1669 | (math-div a (nth 1 b))))) | 1713 | (math-div a (nth 1 b))))) |
| 1714 | (and math-simplifying | ||
| 1715 | (let ((math-div-trig nil) | ||
| 1716 | (math-div-non-trig nil)) | ||
| 1717 | (math-div-isolate-trig b) | ||
| 1718 | (if math-div-trig | ||
| 1719 | (if math-div-non-trig | ||
| 1720 | (math-div (math-mul a math-div-trig) math-div-non-trig) | ||
| 1721 | (math-mul a math-div-trig)) | ||
| 1722 | nil))) | ||
| 1670 | (if (and calc-matrix-mode | 1723 | (if (and calc-matrix-mode |
| 1671 | (or (math-known-matrixp a) (math-known-matrixp b))) | 1724 | (or (math-known-matrixp a) (math-known-matrixp b))) |
| 1672 | (math-combine-prod a b nil t nil) | 1725 | (math-combine-prod a b nil t nil) |
| @@ -2674,6 +2727,8 @@ | |||
| 2674 | invb | 2727 | invb |
| 2675 | (math-looks-negp (nth 2 b))) | 2728 | (math-looks-negp (nth 2 b))) |
| 2676 | (math-mul a (math-pow (nth 1 b) (math-neg (nth 2 b))))) | 2729 | (math-mul a (math-pow (nth 1 b) (math-neg (nth 2 b))))) |
| 2730 | ((and math-simplifying | ||
| 2731 | (math-combine-prod-trig a b))) | ||
| 2677 | (t (let ((apow 1) (bpow 1)) | 2732 | (t (let ((apow 1) (bpow 1)) |
| 2678 | (and (consp a) | 2733 | (and (consp a) |
| 2679 | (cond ((and (eq (car a) '^) | 2734 | (cond ((and (eq (car a) '^) |
| @@ -2771,6 +2826,83 @@ | |||
| 2771 | (math-pow a apow) | 2826 | (math-pow a apow) |
| 2772 | (inexact-result (list '^ a apow))))))))))) | 2827 | (inexact-result (list '^ a apow))))))))))) |
| 2773 | 2828 | ||
| 2829 | (defun math-combine-prod-trig (a b) | ||
| 2830 | (cond | ||
| 2831 | ((and (eq (car-safe a) 'calcFunc-sin) | ||
| 2832 | (eq (car-safe b) 'calcFunc-csc) | ||
| 2833 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2834 | 1) | ||
| 2835 | ((and (eq (car-safe a) 'calcFunc-sin) | ||
| 2836 | (eq (car-safe b) 'calcFunc-sec) | ||
| 2837 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2838 | (cons 'calcFunc-tan (cdr a))) | ||
| 2839 | ((and (eq (car-safe a) 'calcFunc-sin) | ||
| 2840 | (eq (car-safe b) 'calcFunc-cot) | ||
| 2841 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2842 | (cons 'calcFunc-cos (cdr a))) | ||
| 2843 | ((and (eq (car-safe a) 'calcFunc-cos) | ||
| 2844 | (eq (car-safe b) 'calcFunc-sec) | ||
| 2845 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2846 | 1) | ||
| 2847 | ((and (eq (car-safe a) 'calcFunc-cos) | ||
| 2848 | (eq (car-safe b) 'calcFunc-csc) | ||
| 2849 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2850 | (cons 'calcFunc-cot (cdr a))) | ||
| 2851 | ((and (eq (car-safe a) 'calcFunc-cos) | ||
| 2852 | (eq (car-safe b) 'calcFunc-tan) | ||
| 2853 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2854 | (cons 'calcFunc-sin (cdr a))) | ||
| 2855 | ((and (eq (car-safe a) 'calcFunc-tan) | ||
| 2856 | (eq (car-safe b) 'calcFunc-cot) | ||
| 2857 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2858 | 1) | ||
| 2859 | ((and (eq (car-safe a) 'calcFunc-tan) | ||
| 2860 | (eq (car-safe b) 'calcFunc-csc) | ||
| 2861 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2862 | (cons 'calcFunc-sec (cdr a))) | ||
| 2863 | ((and (eq (car-safe a) 'calcFunc-sec) | ||
| 2864 | (eq (car-safe b) 'calcFunc-cot) | ||
| 2865 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2866 | (cons 'calcFunc-csc (cdr a))) | ||
| 2867 | ((and (eq (car-safe a) 'calcFunc-sinh) | ||
| 2868 | (eq (car-safe b) 'calcFunc-csch) | ||
| 2869 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2870 | 1) | ||
| 2871 | ((and (eq (car-safe a) 'calcFunc-sinh) | ||
| 2872 | (eq (car-safe b) 'calcFunc-sech) | ||
| 2873 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2874 | (cons 'calcFunc-tanh (cdr a))) | ||
| 2875 | ((and (eq (car-safe a) 'calcFunc-sinh) | ||
| 2876 | (eq (car-safe b) 'calcFunc-coth) | ||
| 2877 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2878 | (cons 'calcFunc-cosh (cdr a))) | ||
| 2879 | ((and (eq (car-safe a) 'calcFunc-cosh) | ||
| 2880 | (eq (car-safe b) 'calcFunc-sech) | ||
| 2881 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2882 | 1) | ||
| 2883 | ((and (eq (car-safe a) 'calcFunc-cosh) | ||
| 2884 | (eq (car-safe b) 'calcFunc-csch) | ||
| 2885 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2886 | (cons 'calcFunc-coth (cdr a))) | ||
| 2887 | ((and (eq (car-safe a) 'calcFunc-cosh) | ||
| 2888 | (eq (car-safe b) 'calcFunc-tanh) | ||
| 2889 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2890 | (cons 'calcFunc-sinh (cdr a))) | ||
| 2891 | ((and (eq (car-safe a) 'calcFunc-tanh) | ||
| 2892 | (eq (car-safe b) 'calcFunc-coth) | ||
| 2893 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2894 | 1) | ||
| 2895 | ((and (eq (car-safe a) 'calcFunc-tanh) | ||
| 2896 | (eq (car-safe b) 'calcFunc-csch) | ||
| 2897 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2898 | (cons 'calcFunc-sech (cdr a))) | ||
| 2899 | ((and (eq (car-safe a) 'calcFunc-sech) | ||
| 2900 | (eq (car-safe b) 'calcFunc-coth) | ||
| 2901 | (= 0 (math-simplify (math-sub (cdr a) (cdr b))))) | ||
| 2902 | (cons 'calcFunc-csch (cdr a))) | ||
| 2903 | (t | ||
| 2904 | nil))) | ||
| 2905 | |||
| 2774 | (defun math-mul-or-div (a b ainv binv) | 2906 | (defun math-mul-or-div (a b ainv binv) |
| 2775 | (if (or (Math-vectorp a) (Math-vectorp b)) | 2907 | (if (or (Math-vectorp a) (Math-vectorp b)) |
| 2776 | (math-normalize | 2908 | (math-normalize |
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index d2c66c34d49..ffb7644cdfe 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el | |||
| @@ -236,21 +236,10 @@ | |||
| 236 | (calc-unary-op "coth" 'calcFunc-coth arg) | 236 | (calc-unary-op "coth" 'calcFunc-coth arg) |
| 237 | (calc-unary-op "cot" 'calcFunc-cot arg)))) | 237 | (calc-unary-op "cot" 'calcFunc-cot arg)))) |
| 238 | 238 | ||
| 239 | (defun calc-arctan (arg) | 239 | (defun calc-coth (arg) |
| 240 | (interactive "P") | ||
| 241 | (calc-invert-func) | ||
| 242 | (calc-tan arg)) | ||
| 243 | |||
| 244 | (defun calc-tanh (arg) | ||
| 245 | (interactive "P") | 240 | (interactive "P") |
| 246 | (calc-hyperbolic-func) | 241 | (calc-hyperbolic-func) |
| 247 | (calc-tan arg)) | 242 | (calc-cot arg)) |
| 248 | |||
| 249 | (defun calc-arctanh (arg) | ||
| 250 | (interactive "P") | ||
| 251 | (calc-invert-func) | ||
| 252 | (calc-hyperbolic-func) | ||
| 253 | (calc-tan arg)) | ||
| 254 | 243 | ||
| 255 | (defun calc-arctan2 () | 244 | (defun calc-arctan2 () |
| 256 | (interactive) | 245 | (interactive) |
| @@ -991,11 +980,11 @@ | |||
| 991 | (or (math-with-extra-prec 2 | 980 | (or (math-with-extra-prec 2 |
| 992 | (let* ((xx (math-to-radians (math-float x))) | 981 | (let* ((xx (math-to-radians (math-float x))) |
| 993 | (na (math-floor (math-div (nth 2 xx) (math-pi)))) | 982 | (na (math-floor (math-div (nth 2 xx) (math-pi)))) |
| 994 | (nb (math-floor (math-div (nth 3 xx) (math-pi)))) | 983 | (nb (math-floor (math-div (nth 3 xx) (math-pi))))) |
| 995 | (and (equal na nb) | 984 | (and (equal na nb) |
| 996 | (math-sort-intv (nth 1 x) | 985 | (math-sort-intv (nth 1 x) |
| 997 | (math-cot-raw (nth 2 xx)) | 986 | (math-cot-raw (nth 2 xx)) |
| 998 | (math-cot-raw (nth 3 xx))))))) | 987 | (math-cot-raw (nth 3 xx)))))) |
| 999 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)))) | 988 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)))) |
| 1000 | ((equal x '(var nan var-nan)) | 989 | ((equal x '(var nan var-nan)) |
| 1001 | x) | 990 | x) |
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 640fa5b665c..05ec668cce9 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el | |||
| @@ -671,7 +671,8 @@ | |||
| 671 | (defun calc-user-define-edit () | 671 | (defun calc-user-define-edit () |
| 672 | (interactive) ; but no calc-wrapper! | 672 | (interactive) ; but no calc-wrapper! |
| 673 | (message "Edit definition of command: z-") | 673 | (message "Edit definition of command: z-") |
| 674 | (let* ((key (read-char)) | 674 | (let* (cmdname |
| 675 | (key (read-char)) | ||
| 675 | (def (or (assq key (calc-user-key-map)) | 676 | (def (or (assq key (calc-user-key-map)) |
| 676 | (assq (upcase key) (calc-user-key-map)) | 677 | (assq (upcase key) (calc-user-key-map)) |
| 677 | (assq (downcase key) (calc-user-key-map)) | 678 | (assq (downcase key) (calc-user-key-map)) |
| @@ -720,17 +721,19 @@ | |||
| 720 | 721 | ||
| 721 | ;; Formatting the macro buffer | 722 | ;; Formatting the macro buffer |
| 722 | 723 | ||
| 724 | (defvar calc-edit-top) | ||
| 725 | |||
| 723 | (defun calc-edit-macro-repeats () | 726 | (defun calc-edit-macro-repeats () |
| 724 | (goto-char calc-edit-top) | 727 | (goto-char calc-edit-top) |
| 725 | (while | 728 | (while |
| 726 | (re-search-forward "^\\([0-9]+\\)\\*" nil t) | 729 | (re-search-forward "^\\([0-9]+\\)\\*" nil t) |
| 727 | (setq num (string-to-int (match-string 1))) | 730 | (let ((num (string-to-int (match-string 1))) |
| 728 | (setq line (buffer-substring (point) (line-end-position))) | 731 | (line (buffer-substring (point) (line-end-position)))) |
| 729 | (goto-char (line-beginning-position)) | 732 | (goto-char (line-beginning-position)) |
| 730 | (kill-line 1) | 733 | (kill-line 1) |
| 731 | (while (> num 0) | 734 | (while (> num 0) |
| 732 | (insert line "\n") | 735 | (insert line "\n") |
| 733 | (setq num (1- num))))) | 736 | (setq num (1- num)))))) |
| 734 | 737 | ||
| 735 | (defun calc-edit-macro-adjust-buffer () | 738 | (defun calc-edit-macro-adjust-buffer () |
| 736 | (calc-edit-macro-repeats) | 739 | (calc-edit-macro-repeats) |
| @@ -916,7 +919,6 @@ | |||
| 916 | (delete-char 3) | 919 | (delete-char 3) |
| 917 | (insert "<return>"))) | 920 | (insert "<return>"))) |
| 918 | 921 | ||
| 919 | (defvar calc-edit-top) | ||
| 920 | (defun calc-edit-macro-finish-edit (cmdname key) | 922 | (defun calc-edit-macro-finish-edit (cmdname key) |
| 921 | "Finish editing a Calc macro. | 923 | "Finish editing a Calc macro. |
| 922 | Redefine the corresponding command." | 924 | Redefine the corresponding command." |
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index d5a9009c1ac..a422ed33e45 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el | |||
| @@ -408,9 +408,9 @@ | |||
| 408 | 408 | ||
| 409 | (put 'calcFunc-tan\' 'math-derivative-1 | 409 | (put 'calcFunc-tan\' 'math-derivative-1 |
| 410 | (function (lambda (u) (math-to-radians-2 | 410 | (function (lambda (u) (math-to-radians-2 |
| 411 | (math-div 1 (math-sqr | 411 | (math-sqr |
| 412 | (math-normalize | 412 | (math-normalize |
| 413 | (list 'calcFunc-cos u)))))))) | 413 | (list 'calcFunc-sec u))))))) |
| 414 | 414 | ||
| 415 | (put 'calcFunc-sec\' 'math-derivative-1 | 415 | (put 'calcFunc-sec\' 'math-derivative-1 |
| 416 | (function (lambda (u) (math-to-radians-2 | 416 | (function (lambda (u) (math-to-radians-2 |
| @@ -432,9 +432,9 @@ | |||
| 432 | (put 'calcFunc-cot\' 'math-derivative-1 | 432 | (put 'calcFunc-cot\' 'math-derivative-1 |
| 433 | (function (lambda (u) (math-neg | 433 | (function (lambda (u) (math-neg |
| 434 | (math-to-radians-2 | 434 | (math-to-radians-2 |
| 435 | (math-div 1 (math-sqr | 435 | (math-sqr |
| 436 | (math-normalize | 436 | (math-normalize |
| 437 | (list 'calcFunc-sin u))))))))) | 437 | (list 'calcFunc-csc u)))))))) |
| 438 | 438 | ||
| 439 | (put 'calcFunc-arcsin\' 'math-derivative-1 | 439 | (put 'calcFunc-arcsin\' 'math-derivative-1 |
| 440 | (function (lambda (u) | 440 | (function (lambda (u) |
| @@ -461,9 +461,9 @@ | |||
| 461 | (function (lambda (u) (math-normalize (list 'calcFunc-sinh u))))) | 461 | (function (lambda (u) (math-normalize (list 'calcFunc-sinh u))))) |
| 462 | 462 | ||
| 463 | (put 'calcFunc-tanh\' 'math-derivative-1 | 463 | (put 'calcFunc-tanh\' 'math-derivative-1 |
| 464 | (function (lambda (u) (math-div 1 (math-sqr | 464 | (function (lambda (u) (math-sqr |
| 465 | (math-normalize | 465 | (math-normalize |
| 466 | (list 'calcFunc-cosh u))))))) | 466 | (list 'calcFunc-sech u)))))) |
| 467 | 467 | ||
| 468 | (put 'calcFunc-sech\' 'math-derivative-1 | 468 | (put 'calcFunc-sech\' 'math-derivative-1 |
| 469 | (function (lambda (u) (math-neg | 469 | (function (lambda (u) (math-neg |
| @@ -477,11 +477,11 @@ | |||
| 477 | (math-normalize (list 'calcFunc-csch u)) | 477 | (math-normalize (list 'calcFunc-csch u)) |
| 478 | (math-normalize (list 'calcFunc-coth u))))))) | 478 | (math-normalize (list 'calcFunc-coth u))))))) |
| 479 | 479 | ||
| 480 | (put 'calcFunc-tanh\' 'math-derivative-1 | 480 | (put 'calcFunc-coth\' 'math-derivative-1 |
| 481 | (function (lambda (u) (math-neg | 481 | (function (lambda (u) (math-neg |
| 482 | (math-div 1 (math-sqr | 482 | (math-sqr |
| 483 | (math-normalize | 483 | (math-normalize |
| 484 | (list 'calcFunc-sinh u)))))))) | 484 | (list 'calcFunc-csch u))))))) |
| 485 | 485 | ||
| 486 | (put 'calcFunc-arcsinh\' 'math-derivative-1 | 486 | (put 'calcFunc-arcsinh\' 'math-derivative-1 |
| 487 | (function (lambda (u) | 487 | (function (lambda (u) |
| @@ -1664,8 +1664,8 @@ | |||
| 1664 | 1664 | ||
| 1665 | (math-defintegral calcFunc-tan | 1665 | (math-defintegral calcFunc-tan |
| 1666 | (and (equal u math-integ-var) | 1666 | (and (equal u math-integ-var) |
| 1667 | (math-neg (math-from-radians-2 | 1667 | (math-from-radians-2 |
| 1668 | (list 'calcFunc-ln (list 'calcFunc-cos u)))))) | 1668 | (list 'calcFunc-ln (list 'calcFunc-sec u))))) |
| 1669 | 1669 | ||
| 1670 | (math-defintegral calcFunc-sec | 1670 | (math-defintegral calcFunc-sec |
| 1671 | (and (equal u math-integ-var) | 1671 | (and (equal u math-integ-var) |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 4ba4ab316f8..c41d733aaca 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -534,6 +534,7 @@ one optional arguments, diff-number to refine.") | |||
| 534 | (defun ediff-set-diff-overlays-in-one-buffer (buf-type diff-list) | 534 | (defun ediff-set-diff-overlays-in-one-buffer (buf-type diff-list) |
| 535 | (let* ((current-diff -1) | 535 | (let* ((current-diff -1) |
| 536 | (buff (ediff-get-buffer buf-type)) | 536 | (buff (ediff-get-buffer buf-type)) |
| 537 | (ctl-buf ediff-control-buffer) | ||
| 537 | ;; ediff-extract-diffs puts the type of diff-list as the first elt | 538 | ;; ediff-extract-diffs puts the type of diff-list as the first elt |
| 538 | ;; of this list. The type is either 'points or 'words | 539 | ;; of this list. The type is either 'points or 'words |
| 539 | (diff-list-type (car diff-list)) | 540 | (diff-list-type (car diff-list)) |
| @@ -580,8 +581,9 @@ one optional arguments, diff-number to refine.") | |||
| 580 | (if (eq diff-list-type 'words) | 581 | (if (eq diff-list-type 'words) |
| 581 | (progn | 582 | (progn |
| 582 | (ediff-with-current-buffer buff (goto-char pt-saved)) | 583 | (ediff-with-current-buffer buff (goto-char pt-saved)) |
| 583 | (setq begin (ediff-goto-word (1+ begin) buff) | 584 | (ediff-with-current-buffer ctl-buf |
| 584 | end (ediff-goto-word end buff 'end)) | 585 | (setq begin (ediff-goto-word (1+ begin) buff) |
| 586 | end (ediff-goto-word end buff 'end))) | ||
| 585 | (if (> end limit) (setq end limit)) | 587 | (if (> end limit) (setq end limit)) |
| 586 | (if (> begin end) (setq begin end)) | 588 | (if (> begin end) (setq begin end)) |
| 587 | (setq pt-saved (ediff-with-current-buffer buff (point))))) | 589 | (setq pt-saved (ediff-with-current-buffer buff (point))))) |
| @@ -864,6 +866,7 @@ delimiter regions")) | |||
| 864 | (let* ((current-diff -1) | 866 | (let* ((current-diff -1) |
| 865 | (reg-start (ediff-get-diff-posn buf-type 'beg region-num)) | 867 | (reg-start (ediff-get-diff-posn buf-type 'beg region-num)) |
| 866 | (buff (ediff-get-buffer buf-type)) | 868 | (buff (ediff-get-buffer buf-type)) |
| 869 | (ctl-buf ediff-control-buffer) | ||
| 867 | combined-merge-diff-list | 870 | combined-merge-diff-list |
| 868 | diff-overlay-list list-element | 871 | diff-overlay-list list-element |
| 869 | begin end overlay) | 872 | begin end overlay) |
| @@ -892,8 +895,9 @@ delimiter regions")) | |||
| 892 | () ; skip this diff | 895 | () ; skip this diff |
| 893 | ;; Put overlays at appropriate places in buffers | 896 | ;; Put overlays at appropriate places in buffers |
| 894 | ;; convert lines to points, if necessary | 897 | ;; convert lines to points, if necessary |
| 895 | (setq begin (ediff-goto-word (1+ begin) buff) | 898 | (ediff-with-current-buffer ctl-buf |
| 896 | end (ediff-goto-word end buff 'end)) | 899 | (setq begin (ediff-goto-word (1+ begin) buff) |
| 900 | end (ediff-goto-word end buff 'end))) | ||
| 897 | (setq overlay (ediff-make-bullet-proof-overlay begin end buff)) | 901 | (setq overlay (ediff-make-bullet-proof-overlay begin end buff)) |
| 898 | ;; record all overlays for this difference region | 902 | ;; record all overlays for this difference region |
| 899 | (setq diff-overlay-list (nconc diff-overlay-list (list overlay)))) | 903 | (setq diff-overlay-list (nconc diff-overlay-list (list overlay)))) |
| @@ -1326,17 +1330,73 @@ arguments to `skip-chars-forward'." | |||
| 1326 | (while (> n 1) | 1330 | (while (> n 1) |
| 1327 | (funcall fwd-word-fun) | 1331 | (funcall fwd-word-fun) |
| 1328 | (skip-chars-forward ediff-whitespace) | 1332 | (skip-chars-forward ediff-whitespace) |
| 1329 | (setq n (1- n)))) | 1333 | (setq n (1- n))) |
| 1330 | (if (and flag (> n 0)) | 1334 | (if (and flag (> n 0)) |
| 1331 | (funcall fwd-word-fun)) | 1335 | (funcall fwd-word-fun))) |
| 1332 | (point)))) | 1336 | (point)))) |
| 1333 | 1337 | ||
| 1334 | (defun ediff-same-file-contents (f1 f2) | 1338 | (defun ediff-same-file-contents (f1 f2) |
| 1335 | "Return t if F1 and F2 have identical contents." | 1339 | "Return t if files F1 and F2 have identical contents." |
| 1336 | (let ((res | 1340 | (if (and (not (file-directory-p f1)) |
| 1337 | (apply 'call-process ediff-cmp-program nil nil nil | 1341 | (not (file-directory-p f2))) |
| 1338 | (append ediff-cmp-options (list f1 f2))))) | 1342 | (let ((res |
| 1339 | (and (numberp res) (eq res 0)))) | 1343 | (apply 'call-process ediff-cmp-program nil nil nil |
| 1344 | (append ediff-cmp-options (list f1 f2))))) | ||
| 1345 | (and (numberp res) (eq res 0)))) | ||
| 1346 | ) | ||
| 1347 | |||
| 1348 | |||
| 1349 | (defun ediff-same-contents (d1 d2 &optional filter-re) | ||
| 1350 | "Returns t iff D1 and D2 have the same content. | ||
| 1351 | D1 and D2 can either be both directories or both regular files. | ||
| 1352 | Symlinks and the likes are not handled. | ||
| 1353 | If FILTER-RE is non-nil, recursive checking in directories | ||
| 1354 | affects only files whose names match the expression." | ||
| 1355 | ;; Normalize empty filter RE to nil. | ||
| 1356 | (unless (length filter-re) (setq filter-re nil)) | ||
| 1357 | ;; Indicate progress | ||
| 1358 | (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re) | ||
| 1359 | (cond | ||
| 1360 | ;; D1 & D2 directories => recurse | ||
| 1361 | ((and (file-directory-p d1) | ||
| 1362 | (file-directory-p d2)) | ||
| 1363 | (if (null ediff-recurse-to-subdirectories) | ||
| 1364 | (if (y-or-n-p "Compare subdirectories recursively? ") | ||
| 1365 | (setq ediff-recurse-to-subdirectories 'yes) | ||
| 1366 | (setq ediff-recurse-to-subdirectories 'no))) | ||
| 1367 | (if (eq ediff-recurse-to-subdirectories 'yes) | ||
| 1368 | (let* ((all-entries-1 (directory-files d1 t filter-re)) | ||
| 1369 | (all-entries-2 (directory-files d2 t filter-re)) | ||
| 1370 | (entries-1 (remove-if (lambda (s) | ||
| 1371 | (string-match "^\\.\\.?$" | ||
| 1372 | (file-name-nondirectory s))) | ||
| 1373 | all-entries-1)) | ||
| 1374 | (entries-2 (remove-if (lambda (s) | ||
| 1375 | (string-match "^\\.\\.?$" | ||
| 1376 | (file-name-nondirectory s))) | ||
| 1377 | all-entries-2)) | ||
| 1378 | ) | ||
| 1379 | ;; First, check only the names (works quickly and ensures a | ||
| 1380 | ;; precondition for subsequent code) | ||
| 1381 | (if (and (= (length entries-1) (length entries-2)) | ||
| 1382 | (every (lambda (a b) (equal (file-name-nondirectory a) | ||
| 1383 | (file-name-nondirectory b))) | ||
| 1384 | entries-1 entries-2)) | ||
| 1385 | ;; With name equality established, compare the entries | ||
| 1386 | ;; through recursion. | ||
| 1387 | (every (lambda (a b) | ||
| 1388 | (ediff-same-contents a b filter-re)) | ||
| 1389 | entries-1 entries-2) | ||
| 1390 | ) | ||
| 1391 | )) | ||
| 1392 | ) ; end of the directories case | ||
| 1393 | ;; D1 & D2 are both files => compare directly | ||
| 1394 | ((and (file-regular-p d1) | ||
| 1395 | (file-regular-p d2)) | ||
| 1396 | (ediff-same-file-contents d1 d2)) | ||
| 1397 | ;; Otherwise => false: unequal contents | ||
| 1398 | ) | ||
| 1399 | ) | ||
| 1340 | 1400 | ||
| 1341 | 1401 | ||
| 1342 | ;;; Local Variables: | 1402 | ;;; Local Variables: |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 80beb4a872d..46e94e935f7 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -895,7 +895,8 @@ to temp files when Ediff needs to find fine differences." | |||
| 895 | (sit-for 1))))) | 895 | (sit-for 1))))) |
| 896 | 896 | ||
| 897 | (defun ediff-hide-face (face) | 897 | (defun ediff-hide-face (face) |
| 898 | (if (and (ediff-has-face-support-p) (boundp 'add-to-list) | 898 | (if (and (ediff-has-face-support-p) |
| 899 | (boundp 'add-to-list) | ||
| 899 | (boundp 'facemenu-unlisted-faces)) | 900 | (boundp 'facemenu-unlisted-faces)) |
| 900 | (add-to-list 'facemenu-unlisted-faces face))) | 901 | (add-to-list 'facemenu-unlisted-faces face))) |
| 901 | 902 | ||
| @@ -1404,7 +1405,7 @@ This property can be toggled interactively." | |||
| 1404 | ;;; Misc | 1405 | ;;; Misc |
| 1405 | 1406 | ||
| 1406 | ;; if nil, this silences some messages | 1407 | ;; if nil, this silences some messages |
| 1407 | (defvar ediff-verbose-p t) | 1408 | (defconst ediff-verbose-p t) |
| 1408 | 1409 | ||
| 1409 | (defcustom ediff-autostore-merges 'group-jobs-only | 1410 | (defcustom ediff-autostore-merges 'group-jobs-only |
| 1410 | "*Save the results of merge jobs automatically. | 1411 | "*Save the results of merge jobs automatically. |
| @@ -1473,11 +1474,8 @@ This default should work without changes." | |||
| 1473 | (ediff-defvar-local ediff-temp-file-C nil "") | 1474 | (ediff-defvar-local ediff-temp-file-C nil "") |
| 1474 | 1475 | ||
| 1475 | 1476 | ||
| 1476 | ;; If file-remote-p is defined (as in XEmacs, use it. Otherwise, check | ||
| 1477 | ;; if find-file-name-handler is defined for 'file-local-copy | ||
| 1478 | (defun ediff-file-remote-p (file-name) | 1477 | (defun ediff-file-remote-p (file-name) |
| 1479 | (or (and (fboundp 'file-remote-p) (file-remote-p file-name)) | 1478 | (file-remote-p file-name)) |
| 1480 | (find-file-name-handler file-name 'file-local-copy))) | ||
| 1481 | 1479 | ||
| 1482 | ;; File for which we can get attributes, such as size or date | 1480 | ;; File for which we can get attributes, such as size or date |
| 1483 | (defun ediff-listable-file (file-name) | 1481 | (defun ediff-listable-file (file-name) |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index cf6edc2d129..41a7699cfdc 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff | 1 | ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 6 | 6 | ||
| @@ -167,6 +167,9 @@ directories.") | |||
| 167 | ;; buffer used to collect custom diffs from individual sessions in the group | 167 | ;; buffer used to collect custom diffs from individual sessions in the group |
| 168 | (ediff-defvar-local ediff-meta-diff-buffer nil "") | 168 | (ediff-defvar-local ediff-meta-diff-buffer nil "") |
| 169 | 169 | ||
| 170 | ;; t means recurse into subdirs when deciding which files have same contents | ||
| 171 | (ediff-defvar-local ediff-recurse-to-subdirectories nil "") | ||
| 172 | |||
| 170 | ;; history var to use for filtering groups of files | 173 | ;; history var to use for filtering groups of files |
| 171 | (defvar ediff-filtering-regexp-history nil "") | 174 | (defvar ediff-filtering-regexp-history nil "") |
| 172 | 175 | ||
| @@ -2349,6 +2352,7 @@ last-command-char is used to decide which action to take." | |||
| 2349 | )) | 2352 | )) |
| 2350 | (setq list (cdr list))) | 2353 | (setq list (cdr list))) |
| 2351 | (message "Comparing files ... Done")) | 2354 | (message "Comparing files ... Done")) |
| 2355 | (setq ediff-recurse-to-subdirectories nil) | ||
| 2352 | (ediff-update-meta-buffer (current-buffer) 'must-redraw)) | 2356 | (ediff-update-meta-buffer (current-buffer) 'must-redraw)) |
| 2353 | 2357 | ||
| 2354 | ;; mark files 1 and 2 as equal, if they are. | 2358 | ;; mark files 1 and 2 as equal, if they are. |
| @@ -2356,12 +2360,11 @@ last-command-char is used to decide which action to take." | |||
| 2356 | (defun ediff-mark-if-equal (fileinfo1 fileinfo2) | 2360 | (defun ediff-mark-if-equal (fileinfo1 fileinfo2) |
| 2357 | (let ((f1 (car fileinfo1)) | 2361 | (let ((f1 (car fileinfo1)) |
| 2358 | (f2 (car fileinfo2))) | 2362 | (f2 (car fileinfo2))) |
| 2359 | (cond ((file-directory-p f1) nil) | 2363 | (if (and (stringp f1) (stringp f2) (ediff-same-contents f1 f2)) |
| 2360 | ((file-directory-p f2) nil) | 2364 | (progn |
| 2361 | ((ediff-same-file-contents f1 f2) | 2365 | (ediff-set-file-eqstatus fileinfo1 t) |
| 2362 | (ediff-set-file-eqstatus fileinfo1 t) | 2366 | (ediff-set-file-eqstatus fileinfo2 t) |
| 2363 | (ediff-set-file-eqstatus fileinfo2 t) | 2367 | )) |
| 2364 | t)) | ||
| 2365 | )) | 2368 | )) |
| 2366 | 2369 | ||
| 2367 | 2370 | ||
diff --git a/lisp/ediff.el b/lisp/ediff.el index c98974923f1..2a2b481ec59 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | ;;; ediff.el --- a comprehensive visual interface to diff & patch | 1 | ;;; ediff.el --- a comprehensive visual interface to diff & patch |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03, 05 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 6 | ;; Created: February 2, 1994 | 6 | ;; Created: February 2, 1994 |
| 7 | ;; Keywords: comparing, merging, patching, tools, unix | 7 | ;; Keywords: comparing, merging, patching, tools, unix |
| 8 | 8 | ||
| 9 | (defconst ediff-version "2.78" "The current version of Ediff") | 9 | (defconst ediff-version "2.80" "The current version of Ediff") |
| 10 | (defconst ediff-date "May 18, 2003" "Date of last update") | 10 | (defconst ediff-date "February 19, 2005" "Date of last update") |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| @@ -1080,8 +1080,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1080 | 1080 | ||
| 1081 | (defsubst ediff-merge-on-startup () | 1081 | (defsubst ediff-merge-on-startup () |
| 1082 | (ediff-do-merge 0) | 1082 | (ediff-do-merge 0) |
| 1083 | (ediff-with-current-buffer ediff-buffer-C | 1083 | ;; Can't remember why this is here, but it may cause the automatically merged |
| 1084 | (set-buffer-modified-p nil))) | 1084 | ;; buffer to be lost. So, keep the buffer modified. |
| 1085 | ;;(ediff-with-current-buffer ediff-buffer-C | ||
| 1086 | ;; (set-buffer-modified-p nil)) | ||
| 1087 | ) | ||
| 1085 | 1088 | ||
| 1086 | ;;;###autoload | 1089 | ;;;###autoload |
| 1087 | (defun ediff-merge-files (file-A file-B | 1090 | (defun ediff-merge-files (file-A file-B |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index eb5e5ede4c7..8023336b18b 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -1063,7 +1063,7 @@ as a Meta key and any number of multiple escapes is allowed." | |||
| 1063 | 1063 | ||
| 1064 | ;; call the actual function to execute ESC (if no other symbols followed) | 1064 | ;; call the actual function to execute ESC (if no other symbols followed) |
| 1065 | ;; or the key bound to the ESC sequence (if the sequence was issued | 1065 | ;; or the key bound to the ESC sequence (if the sequence was issued |
| 1066 | ;; with very short delay between characters. | 1066 | ;; with very short delay between characters). |
| 1067 | (if (eq cmd 'viper-intercept-ESC-key) | 1067 | (if (eq cmd 'viper-intercept-ESC-key) |
| 1068 | (setq cmd | 1068 | (setq cmd |
| 1069 | (cond ((eq viper-current-state 'vi-state) | 1069 | (cond ((eq viper-current-state 'vi-state) |
| @@ -1529,7 +1529,8 @@ as a Meta key and any number of multiple escapes is allowed." | |||
| 1529 | nil) | 1529 | nil) |
| 1530 | 1530 | ||
| 1531 | (defun viper-exec-buffer-search (m-com com) | 1531 | (defun viper-exec-buffer-search (m-com com) |
| 1532 | (setq viper-s-string (buffer-substring (point) viper-com-point)) | 1532 | (setq viper-s-string |
| 1533 | (regexp-quote (buffer-substring (point) viper-com-point))) | ||
| 1533 | (setq viper-s-forward t) | 1534 | (setq viper-s-forward t) |
| 1534 | (setq viper-search-history (cons viper-s-string viper-search-history)) | 1535 | (setq viper-search-history (cons viper-s-string viper-search-history)) |
| 1535 | (setq viper-intermediate-command 'viper-exec-buffer-search) | 1536 | (setq viper-intermediate-command 'viper-exec-buffer-search) |
| @@ -1982,6 +1983,16 @@ Undo previous insertion and inserts new." | |||
| 1982 | (let ((hook (if viper-vi-style-in-minibuffer | 1983 | (let ((hook (if viper-vi-style-in-minibuffer |
| 1983 | 'viper-change-state-to-insert | 1984 | 'viper-change-state-to-insert |
| 1984 | 'viper-change-state-to-emacs))) | 1985 | 'viper-change-state-to-emacs))) |
| 1986 | ;; making buffer-local variables so that normal buffers won't affect the | ||
| 1987 | ;; minibuffer and vice versa. Otherwise, command arguments will affect | ||
| 1988 | ;; minibuffer ops and insertions from the minibuffer will change those in | ||
| 1989 | ;; the normal buffers | ||
| 1990 | (make-local-variable 'viper-d-com) | ||
| 1991 | (make-local-variable 'viper-last-insertion) | ||
| 1992 | (make-local-variable 'viper-command-ring) | ||
| 1993 | (setq viper-d-com nil | ||
| 1994 | viper-last-insertion nil | ||
| 1995 | viper-command-ring nil) | ||
| 1985 | (funcall hook) | 1996 | (funcall hook) |
| 1986 | )) | 1997 | )) |
| 1987 | 1998 | ||
| @@ -2707,7 +2718,7 @@ On reaching beginning of line, stop and signal error." | |||
| 2707 | (viper-backward-char-carefully) | 2718 | (viper-backward-char-carefully) |
| 2708 | (if (looking-at "\n") | 2719 | (if (looking-at "\n") |
| 2709 | (viper-skip-all-separators-backward 'within-line) | 2720 | (viper-skip-all-separators-backward 'within-line) |
| 2710 | (or (bobp) (forward-char))))) | 2721 | (or (viper-looking-at-separator) (forward-char))))) |
| 2711 | 2722 | ||
| 2712 | 2723 | ||
| 2713 | (defun viper-forward-word-kernel (val) | 2724 | (defun viper-forward-word-kernel (val) |
| @@ -3630,33 +3641,39 @@ the Emacs binding of `/'." | |||
| 3630 | (setq msg "Search style remains unchanged"))) | 3641 | (setq msg "Search style remains unchanged"))) |
| 3631 | (princ msg t))) | 3642 | (princ msg t))) |
| 3632 | 3643 | ||
| 3633 | (defun viper-set-searchstyle-toggling-macros (unset) | 3644 | (defun viper-set-searchstyle-toggling-macros (unset &optional major-mode) |
| 3634 | "Set the macros for toggling the search style in Viper's vi-state. | 3645 | "Set the macros for toggling the search style in Viper's vi-state. |
| 3635 | The macro that toggles case sensitivity is bound to `//', and the one that | 3646 | The macro that toggles case sensitivity is bound to `//', and the one that |
| 3636 | toggles regexp search is bound to `///'. | 3647 | toggles regexp search is bound to `///'. |
| 3637 | With a prefix argument, this function unsets the macros. " | 3648 | With a prefix argument, this function unsets the macros. |
| 3649 | If MAJOR-MODE is set, set the macros only in that major mode." | ||
| 3638 | (interactive "P") | 3650 | (interactive "P") |
| 3639 | (or noninteractive | 3651 | (let (scope) |
| 3640 | (if (not unset) | 3652 | (if (and major-mode (symbolp major-mode)) |
| 3641 | (progn | 3653 | (setq scope major-mode) |
| 3642 | ;; toggle case sensitivity in search | 3654 | (setq scope 't)) |
| 3643 | (viper-record-kbd-macro | 3655 | (or noninteractive |
| 3644 | "//" 'vi-state | 3656 | (if (not unset) |
| 3645 | [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] | 3657 | (progn |
| 3646 | 't) | 3658 | ;; toggle case sensitivity in search |
| 3647 | ;; toggle regexp/vanila search | 3659 | (viper-record-kbd-macro |
| 3648 | (viper-record-kbd-macro | 3660 | "//" 'vi-state |
| 3649 | "///" 'vi-state | 3661 | [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] |
| 3650 | [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] | 3662 | scope) |
| 3651 | 't) | 3663 | ;; toggle regexp/vanila search |
| 3652 | (if (interactive-p) | 3664 | (viper-record-kbd-macro |
| 3653 | (message | 3665 | "///" 'vi-state |
| 3654 | "// and /// now toggle case-sensitivity and regexp search"))) | 3666 | [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] |
| 3655 | (viper-unrecord-kbd-macro "//" 'vi-state) | 3667 | scope) |
| 3656 | (sit-for 2) | 3668 | (if (interactive-p) |
| 3657 | (viper-unrecord-kbd-macro "///" 'vi-state)))) | 3669 | (message |
| 3658 | 3670 | "// and /// now toggle case-sensitivity and regexp search"))) | |
| 3659 | 3671 | (viper-unrecord-kbd-macro "//" 'vi-state) | |
| 3672 | (sit-for 2) | ||
| 3673 | (viper-unrecord-kbd-macro "///" 'vi-state))) | ||
| 3674 | )) | ||
| 3675 | |||
| 3676 | |||
| 3660 | (defun viper-set-parsing-style-toggling-macro (unset) | 3677 | (defun viper-set-parsing-style-toggling-macro (unset) |
| 3661 | "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses. | 3678 | "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses. |
| 3662 | This is used in conjunction with the `%' command. | 3679 | This is used in conjunction with the `%' command. |
| @@ -4112,7 +4129,8 @@ Null string will repeat previous search." | |||
| 4112 | (interactive) | 4129 | (interactive) |
| 4113 | (if (and viper-ex-style-editing (bolp)) | 4130 | (if (and viper-ex-style-editing (bolp)) |
| 4114 | (beep 1) | 4131 | (beep 1) |
| 4115 | (delete-backward-char 1 t))) | 4132 | ;; don't put on kill ring |
| 4133 | (delete-backward-char 1 nil))) | ||
| 4116 | 4134 | ||
| 4117 | 4135 | ||
| 4118 | (defun viper-del-backward-char-in-replace () | 4136 | (defun viper-del-backward-char-in-replace () |
| @@ -4124,13 +4142,15 @@ cursor move past the beginning of line." | |||
| 4124 | (interactive) | 4142 | (interactive) |
| 4125 | (cond (viper-delete-backwards-in-replace | 4143 | (cond (viper-delete-backwards-in-replace |
| 4126 | (cond ((not (bolp)) | 4144 | (cond ((not (bolp)) |
| 4127 | (delete-backward-char 1 t)) | 4145 | ;; don't put on kill ring |
| 4146 | (delete-backward-char 1 nil)) | ||
| 4128 | (viper-ex-style-editing | 4147 | (viper-ex-style-editing |
| 4129 | (beep 1)) | 4148 | (beep 1)) |
| 4130 | ((bobp) | 4149 | ((bobp) |
| 4131 | (beep 1)) | 4150 | (beep 1)) |
| 4132 | (t | 4151 | (t |
| 4133 | (delete-backward-char 1 t)))) | 4152 | ;; don't put on kill ring |
| 4153 | (delete-backward-char 1 nil)))) | ||
| 4134 | (viper-ex-style-editing | 4154 | (viper-ex-style-editing |
| 4135 | (if (bolp) | 4155 | (if (bolp) |
| 4136 | (beep 1) | 4156 | (beep 1) |
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index c94edf54bc2..90b006ffb65 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; viper-ex.el --- functions implementing the Ex commands for Viper | 1 | ;;; viper-ex.el --- functions implementing the Ex commands for Viper |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 04 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 04, 05 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 5 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 6 | 6 | ||
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 555cf9544b2..4f08f1b6cc1 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -70,6 +70,16 @@ | |||
| 70 | window-system | 70 | window-system |
| 71 | )) | 71 | )) |
| 72 | 72 | ||
| 73 | (defun viper-color-display-p () | ||
| 74 | (condition-case nil | ||
| 75 | (viper-cond-compile-for-xemacs-or-emacs | ||
| 76 | (eq (device-class (selected-device)) 'color) ; xemacs form | ||
| 77 | (if (fboundp 'display-color-p) ; emacs form | ||
| 78 | (display-color-p) | ||
| 79 | (x-display-color-p)) | ||
| 80 | ) | ||
| 81 | (error nil))) | ||
| 82 | |||
| 73 | ;; in XEmacs: device-type is tty on tty and stream in batch. | 83 | ;; in XEmacs: device-type is tty on tty and stream in batch. |
| 74 | (defun viper-window-display-p () | 84 | (defun viper-window-display-p () |
| 75 | (and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc))))) | 85 | (and (viper-device-type) (not (memq (viper-device-type) '(tty stream pc))))) |
| @@ -97,7 +107,8 @@ In all likelihood, you don't need to bother with this setting." | |||
| 97 | (defun viper-has-face-support-p () | 107 | (defun viper-has-face-support-p () |
| 98 | (cond ((viper-window-display-p)) | 108 | (cond ((viper-window-display-p)) |
| 99 | (viper-force-faces) | 109 | (viper-force-faces) |
| 100 | (viper-emacs-p (memq (viper-device-type) '(nil pc))) | 110 | ((viper-color-display-p)) |
| 111 | (viper-emacs-p (memq (viper-device-type) '(pc))) | ||
| 101 | (viper-xemacs-p (memq (viper-device-type) '(tty pc))))) | 112 | (viper-xemacs-p (memq (viper-device-type) '(tty pc))))) |
| 102 | 113 | ||
| 103 | 114 | ||
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 146b54b7034..e5074b95838 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el | |||
| @@ -455,6 +455,10 @@ Useful in some modes, such as Gnus, MH, etc.") | |||
| 455 | (define-key viper-dired-modifier-map ":" 'viper-ex) | 455 | (define-key viper-dired-modifier-map ":" 'viper-ex) |
| 456 | (define-key viper-dired-modifier-map "/" 'viper-search-forward) | 456 | (define-key viper-dired-modifier-map "/" 'viper-search-forward) |
| 457 | 457 | ||
| 458 | (defvar viper-gnus-modifier-map (make-sparse-keymap) | ||
| 459 | "This map modifies Gnus behavior.") | ||
| 460 | (define-key viper-gnus-modifier-map ":" 'viper-ex) | ||
| 461 | |||
| 458 | 462 | ||
| 459 | 463 | ||
| 460 | ;;; Code | 464 | ;;; Code |
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index c6a3fdfe1fe..df0e37e7c25 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el | |||
| @@ -329,6 +329,8 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., | |||
| 329 | ;; Accepts as macro names: strings and vectors. | 329 | ;; Accepts as macro names: strings and vectors. |
| 330 | ;; strings must be strings of characters; vectors must be vectors of keys | 330 | ;; strings must be strings of characters; vectors must be vectors of keys |
| 331 | ;; in canonic form. The canonic form is essentially the form used in XEmacs | 331 | ;; in canonic form. The canonic form is essentially the form used in XEmacs |
| 332 | ;; More general definitions are inherited by more specific scopes: | ||
| 333 | ;; global->major mode->buffer. More specific definitions override more general | ||
| 332 | (defun viper-record-kbd-macro (macro-name state macro-body &optional scope) | 334 | (defun viper-record-kbd-macro (macro-name state macro-body &optional scope) |
| 333 | "Record a Vi macro. Can be used in `.viper' file to define permanent macros. | 335 | "Record a Vi macro. Can be used in `.viper' file to define permanent macros. |
| 334 | MACRO-NAME is a string of characters or a vector of keys. STATE is | 336 | MACRO-NAME is a string of characters or a vector of keys. STATE is |
| @@ -451,22 +453,22 @@ If SCOPE is nil, the user is asked to specify the scope." | |||
| 451 | (list (list (cons scope nil)) nil (cons t nil)))))) | 453 | (list (list (cons scope nil)) nil (cons t nil)))))) |
| 452 | (setq old-elt (assoc macro-name (eval macro-alist-var))) | 454 | (setq old-elt (assoc macro-name (eval macro-alist-var))) |
| 453 | 455 | ||
| 454 | (if (null old-elt) | 456 | (if (null old-elt) |
| 455 | (progn | 457 | (progn |
| 456 | ;; insert new-elt in macro-alist-var and keep the list sorted | 458 | ;; insert new-elt in macro-alist-var and keep the list sorted |
| 457 | (define-key | 459 | (define-key |
| 458 | keymap | 460 | keymap |
| 459 | (vector (viper-key-to-emacs-key (aref macro-name 0))) | 461 | (vector (viper-key-to-emacs-key (aref macro-name 0))) |
| 460 | 'viper-exec-mapped-kbd-macro) | 462 | 'viper-exec-mapped-kbd-macro) |
| 461 | (setq lis (eval macro-alist-var)) | 463 | (setq lis (eval macro-alist-var)) |
| 462 | (while (and lis (string< (viper-array-to-string (car (car lis))) | 464 | (while (and lis (string< (viper-array-to-string (car (car lis))) |
| 463 | (viper-array-to-string macro-name))) | 465 | (viper-array-to-string macro-name))) |
| 464 | (setq lis2 (cons (car lis) lis2)) | 466 | (setq lis2 (cons (car lis) lis2)) |
| 465 | (setq lis (cdr lis))) | 467 | (setq lis (cdr lis))) |
| 466 | 468 | ||
| 467 | (setq lis2 (reverse lis2)) | 469 | (setq lis2 (reverse lis2)) |
| 468 | (set macro-alist-var (append lis2 (cons new-elt lis))) | 470 | (set macro-alist-var (append lis2 (cons new-elt lis))) |
| 469 | (setq old-elt new-elt))) | 471 | (setq old-elt new-elt))) |
| 470 | (setq old-sub-elt | 472 | (setq old-sub-elt |
| 471 | (cond ((eq scope t) (viper-kbd-global-pair old-elt)) | 473 | (cond ((eq scope t) (viper-kbd-global-pair old-elt)) |
| 472 | ((symbolp scope) (assoc scope (viper-kbd-mode-alist old-elt))) | 474 | ((symbolp scope) (assoc scope (viper-kbd-mode-alist old-elt))) |
| @@ -484,6 +486,11 @@ If SCOPE is nil, the user is asked to specify the scope." | |||
| 484 | 486 | ||
| 485 | 487 | ||
| 486 | ;; macro name must be a vector of viper-style keys | 488 | ;; macro name must be a vector of viper-style keys |
| 489 | ;; viper-unrecord-kbd-macro doesn't have scope. Macro definitions are inherited | ||
| 490 | ;; from global -> major mode -> buffer | ||
| 491 | ;; More specific definition overrides more general | ||
| 492 | ;; Can't unrecord definition for more specific, if a more general definition is | ||
| 493 | ;; in effect | ||
| 487 | (defun viper-unrecord-kbd-macro (macro-name state) | 494 | (defun viper-unrecord-kbd-macro (macro-name state) |
| 488 | "Delete macro MACRO-NAME from Viper STATE. | 495 | "Delete macro MACRO-NAME from Viper STATE. |
| 489 | MACRO-NAME must be a vector of viper-style keys. This command is used by Viper | 496 | MACRO-NAME must be a vector of viper-style keys. This command is used by Viper |
| @@ -546,7 +553,7 @@ name from there." | |||
| 546 | (setq macro-pair mode-mapping) | 553 | (setq macro-pair mode-mapping) |
| 547 | (message "%S is unmapped for %s in %S" | 554 | (message "%S is unmapped for %s in %S" |
| 548 | (viper-display-macro macro-name) state-name major-mode)) | 555 | (viper-display-macro macro-name) state-name major-mode)) |
| 549 | ((cdr (setq macro-pair (viper-kbd-global-pair macro-entry))) | 556 | ((cdr (setq macro-pair global-mapping)) |
| 550 | (message | 557 | (message |
| 551 | "Global mapping for %S in %s is removed" | 558 | "Global mapping for %S in %s is removed" |
| 552 | (viper-display-macro macro-name) state-name)) | 559 | (viper-display-macro macro-name) state-name)) |
| @@ -560,7 +567,7 @@ name from there." | |||
| 560 | (progn | 567 | (progn |
| 561 | (set macro-alist-var (delq macro-entry (eval macro-alist-var))) | 568 | (set macro-alist-var (delq macro-entry (eval macro-alist-var))) |
| 562 | (if (viper-can-release-key (aref macro-name 0) | 569 | (if (viper-can-release-key (aref macro-name 0) |
| 563 | (eval macro-alist-var)) | 570 | (eval macro-alist-var)) |
| 564 | (define-key | 571 | (define-key |
| 565 | keymap | 572 | keymap |
| 566 | (vector (viper-key-to-emacs-key (aref macro-name 0))) | 573 | (vector (viper-key-to-emacs-key (aref macro-name 0))) |
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 0f3b8916095..a9e908f1c9c 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -661,14 +661,8 @@ | |||
| 661 | 661 | ||
| 662 | 662 | ||
| 663 | ;; define remote file test | 663 | ;; define remote file test |
| 664 | (or (fboundp 'viper-file-remote-p) ; user supplied his own function: use it | 664 | (defun viper-file-remote-p (file-name) |
| 665 | (defun viper-file-remote-p (file-name) | 665 | (file-remote-p file-name)) |
| 666 | (car (cond ((featurep 'efs-auto) (efs-ftp-path file-name)) | ||
| 667 | ((fboundp 'file-remote-p) (file-remote-p file-name)) | ||
| 668 | (t (require 'ange-ftp) | ||
| 669 | ;; Can happen only in Emacs, since XEmacs has file-remote-p | ||
| 670 | (ange-ftp-ftp-name file-name)))))) | ||
| 671 | |||
| 672 | 666 | ||
| 673 | 667 | ||
| 674 | ;; This is a simple-minded check for whether a file is under version control. | 668 | ;; This is a simple-minded check for whether a file is under version control. |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 15ec74b41f1..be5a8e3467a 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -3,12 +3,12 @@ | |||
| 3 | ;; and a venomous VI PERil. | 3 | ;; and a venomous VI PERil. |
| 4 | ;; Viper Is also a Package for Emacs Rebels. | 4 | ;; Viper Is also a Package for Emacs Rebels. |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 9 | ;; Keywords: emulations | 9 | ;; Keywords: emulations |
| 10 | 10 | ||
| 11 | (defconst viper-version "3.11.2 of January 4, 2002" | 11 | (defconst viper-version "3.11.4 of February 19, 2005" |
| 12 | "The current version of Viper") | 12 | "The current version of Viper") |
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| @@ -466,7 +466,7 @@ unless it is coming up in a wrong Viper state." | |||
| 466 | (nth 0 triple) (nth 1 triple) (eval (nth 2 triple)))) | 466 | (nth 0 triple) (nth 1 triple) (eval (nth 2 triple)))) |
| 467 | viper-major-mode-modifier-list)) | 467 | viper-major-mode-modifier-list)) |
| 468 | 468 | ||
| 469 | ;; We change standard bindings in some major mode, making them slightly | 469 | ;; We change standard bindings in some major modes, making them slightly |
| 470 | ;; different than in "normal" vi/insert/emacs states | 470 | ;; different than in "normal" vi/insert/emacs states |
| 471 | (defcustom viper-major-mode-modifier-list | 471 | (defcustom viper-major-mode-modifier-list |
| 472 | '((help-mode emacs-state viper-slash-and-colon-map) | 472 | '((help-mode emacs-state viper-slash-and-colon-map) |
| @@ -482,8 +482,8 @@ unless it is coming up in a wrong Viper state." | |||
| 482 | (dired-mode emacs-state viper-dired-modifier-map) | 482 | (dired-mode emacs-state viper-dired-modifier-map) |
| 483 | (tar-mode emacs-state viper-slash-and-colon-map) | 483 | (tar-mode emacs-state viper-slash-and-colon-map) |
| 484 | (mh-folder-mode emacs-state viper-slash-and-colon-map) | 484 | (mh-folder-mode emacs-state viper-slash-and-colon-map) |
| 485 | (gnus-group-mode emacs-state viper-slash-and-colon-map) | 485 | (gnus-group-mode emacs-state viper-gnus-modifier-map) |
| 486 | (gnus-summary-mode emacs-state viper-slash-and-colon-map) | 486 | (gnus-summary-mode emacs-state viper-gnus-modifier-map) |
| 487 | (Info-mode emacs-state viper-slash-and-colon-map) | 487 | (Info-mode emacs-state viper-slash-and-colon-map) |
| 488 | (Buffer-menu-mode emacs-state viper-slash-and-colon-map) | 488 | (Buffer-menu-mode emacs-state viper-slash-and-colon-map) |
| 489 | ) | 489 | ) |
diff --git a/lisp/faces.el b/lisp/faces.el index cc6b5d0f8df..936e0a132a4 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1910,6 +1910,9 @@ created." | |||
| 1910 | 1910 | ||
| 1911 | 1911 | ||
| 1912 | (defface minibuffer-prompt '((((background dark)) :foreground "cyan") | 1912 | (defface minibuffer-prompt '((((background dark)) :foreground "cyan") |
| 1913 | ;; Don't use blue because many users of | ||
| 1914 | ;; the MS-DOS port customize their | ||
| 1915 | ;; foreground color to be blue. | ||
| 1913 | (((type pc)) :foreground "magenta") | 1916 | (((type pc)) :foreground "magenta") |
| 1914 | (t :foreground "dark blue")) | 1917 | (t :foreground "dark blue")) |
| 1915 | "Face for minibuffer prompts." | 1918 | "Face for minibuffer prompts." |
| @@ -2077,6 +2080,8 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2077 | :group 'basic-faces) | 2080 | :group 'basic-faces) |
| 2078 | 2081 | ||
| 2079 | (defface escape-glyph '((((background dark)) :foreground "cyan") | 2082 | (defface escape-glyph '((((background dark)) :foreground "cyan") |
| 2083 | ;; See the comment in minibuffer-prompt for | ||
| 2084 | ;; the reason not to use blue on MS-DOS. | ||
| 2080 | (((type pc)) :foreground "magenta") | 2085 | (((type pc)) :foreground "magenta") |
| 2081 | (t :foreground "blue")) | 2086 | (t :foreground "blue")) |
| 2082 | "Face for characters displayed as ^-sequences or \-sequences." | 2087 | "Face for characters displayed as ^-sequences or \-sequences." |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index bc8b89a2519..3cf7292deac 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2005-02-19 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-msg.el (gnus-copy-article-buffer): Quote decoded words | ||
| 4 | containing special characters. | ||
| 5 | |||
| 6 | * gnus-sum.el (gnus-summary-edit-article): Ditto. | ||
| 7 | |||
| 8 | * mml.el (mime-to-mml): Ditto. | ||
| 9 | |||
| 10 | * rfc2047.el (rfc2047-encode-parameter): Use ietf-drums-tspecials. | ||
| 11 | (rfc2047-quote-decoded-words-containing-tspecials): New variable. | ||
| 12 | (rfc2047-decode-region): Quote decoded words containing special | ||
| 13 | characters when rfc2047-quote-decoded-words-containing-tspecials | ||
| 14 | is non-nil. | ||
| 15 | |||
| 16 | 2005-02-16 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 17 | |||
| 18 | * gnus-registry.el (gnus-registry-delete-group): minor bug fix | ||
| 19 | |||
| 20 | * gnus.el (gnus-install-group-spam-parameters): Doc fix. | ||
| 21 | |||
| 22 | 2005-02-15 Simon Josefsson <jas@extundo.com> | ||
| 23 | |||
| 24 | * nnimap.el (nnimap-debug): Doc fix. | ||
| 25 | |||
| 26 | * imap.el (imap-debug): Doc fix. | ||
| 27 | |||
| 28 | 2005-02-14 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 29 | |||
| 30 | * gnus-group.el (gnus-group-make-doc-group): Mention prefix | ||
| 31 | argument in doc string. Make query for type more clear. | ||
| 32 | |||
| 1 | 2005-02-13 Reiner Steib <Reiner.Steib@gmx.de> | 33 | 2005-02-13 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 34 | ||
| 3 | * gnus.el (gnus-group-startup-message): Search for gnus images in | 35 | * gnus.el (gnus-group-startup-message): Search for gnus images in |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2d6137c0bb5..5892235deac 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -2502,7 +2502,9 @@ group already exists: | |||
| 2502 | (gnus-group-position-point)) | 2502 | (gnus-group-position-point)) |
| 2503 | 2503 | ||
| 2504 | (defun gnus-group-make-doc-group (file type) | 2504 | (defun gnus-group-make-doc-group (file type) |
| 2505 | "Create a group that uses a single file as the source." | 2505 | "Create a group that uses a single file as the source. |
| 2506 | |||
| 2507 | If called with a prefix argument, ask for the file type." | ||
| 2506 | (interactive | 2508 | (interactive |
| 2507 | (list (read-file-name "File name: ") | 2509 | (list (read-file-name "File name: ") |
| 2508 | (and current-prefix-arg 'ask))) | 2510 | (and current-prefix-arg 'ask))) |
| @@ -2511,7 +2513,7 @@ group already exists: | |||
| 2511 | char found) | 2513 | char found) |
| 2512 | (while (not found) | 2514 | (while (not found) |
| 2513 | (message | 2515 | (message |
| 2514 | "%sFile type (mbox, babyl, digest, forward, mmdf, guess) [mbdfag]: " | 2516 | "%sFile type (mbox, babyl, digest, forward, mmdf, guess) [m, b, d, f, a, g]: " |
| 2515 | err) | 2517 | err) |
| 2516 | (setq found (cond ((= (setq char (read-char)) ?m) 'mbox) | 2518 | (setq found (cond ((= (setq char (read-char)) ?m) 'mbox) |
| 2517 | ((= char ?b) 'babyl) | 2519 | ((= char ?b) 'babyl) |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 65b3d78aca3..a71dce313d6 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -876,7 +876,8 @@ header line with the old Message-ID." | |||
| 876 | ;; Decode charsets. | 876 | ;; Decode charsets. |
| 877 | (let ((gnus-article-decode-hook | 877 | (let ((gnus-article-decode-hook |
| 878 | (delq 'article-decode-charset | 878 | (delq 'article-decode-charset |
| 879 | (copy-sequence gnus-article-decode-hook)))) | 879 | (copy-sequence gnus-article-decode-hook))) |
| 880 | (rfc2047-quote-decoded-words-containing-tspecials t)) | ||
| 880 | (run-hooks 'gnus-article-decode-hook))))) | 881 | (run-hooks 'gnus-article-decode-hook))))) |
| 881 | gnus-article-copy))) | 882 | gnus-article-copy))) |
| 882 | 883 | ||
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 0971fea5485..3b7d6e43b43 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -606,7 +606,9 @@ Returns the first place where the trail finds a group name." | |||
| 606 | (when gnus-registry-trim-articles-without-groups | 606 | (when gnus-registry-trim-articles-without-groups |
| 607 | (unless (gnus-registry-group-count id) | 607 | (unless (gnus-registry-group-count id) |
| 608 | (gnus-registry-delete-id id))) | 608 | (gnus-registry-delete-id id))) |
| 609 | (gnus-registry-store-extra-entry id 'mtime (current-time))))) | 609 | ;; is this ID still in the registry? |
| 610 | (when (gethash id gnus-registry-hashtb) | ||
| 611 | (gnus-registry-store-extra-entry id 'mtime (current-time)))))) | ||
| 610 | 612 | ||
| 611 | (defun gnus-registry-delete-id (id) | 613 | (defun gnus-registry-delete-id (id) |
| 612 | "Delete a message ID from the registry." | 614 | "Delete a message ID from the registry." |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 1af9e0ca1a7..b5467aa5921 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9485,7 +9485,8 @@ groups." | |||
| 9485 | `(lambda () | 9485 | `(lambda () |
| 9486 | (let ((mbl mml-buffer-list)) | 9486 | (let ((mbl mml-buffer-list)) |
| 9487 | (setq mml-buffer-list nil) | 9487 | (setq mml-buffer-list nil) |
| 9488 | (mime-to-mml ,'current-handles) | 9488 | (let ((rfc2047-quote-decoded-words-containing-tspecials t)) |
| 9489 | (mime-to-mml ,'current-handles)) | ||
| 9489 | (let ((mbl1 mml-buffer-list)) | 9490 | (let ((mbl1 mml-buffer-list)) |
| 9490 | (setq mml-buffer-list mbl) | 9491 | (setq mml-buffer-list mbl) |
| 9491 | (set (make-local-variable 'mml-buffer-list) mbl1)) | 9492 | (set (make-local-variable 'mml-buffer-list) mbl1)) |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index f5dcd296d2b..fa1da9e82f8 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1819,11 +1819,12 @@ registry.") | |||
| 1819 | :variable gnus-spam-newsgroup-contents | 1819 | :variable gnus-spam-newsgroup-contents |
| 1820 | :variable-default nil | 1820 | :variable-default nil |
| 1821 | :variable-document | 1821 | :variable-document |
| 1822 | "*Groups in which to automatically mark new articles as spam on | 1822 | "*Group classification (spam, ham, or neither). Only |
| 1823 | summary entry. If non-nil, this should be a list of group name | 1823 | meaningful when spam.el is loaded. If non-nil, this should be a |
| 1824 | regexps that should match all groups in which to do automatic spam | 1824 | list of group name regexps associated with a classification for |
| 1825 | tagging, associated with a classification (spam, ham, or neither). | 1825 | each one. In spam groups, new articles are marked as spam on |
| 1826 | This only makes sense for mail groups." | 1826 | summary entry. There is other behavior associated with ham and |
| 1827 | no classification when spam.el is loaded - see the manual." | ||
| 1827 | :variable-group spam | 1828 | :variable-group spam |
| 1828 | :variable-type '(repeat | 1829 | :variable-type '(repeat |
| 1829 | (list :tag "Group contents spam/ham classification" | 1830 | (list :tag "Group contents spam/ham classification" |
| @@ -1840,7 +1841,9 @@ This only makes sense for mail groups." | |||
| 1840 | (const :tag "Unclassified" nil))) | 1841 | (const :tag "Unclassified" nil))) |
| 1841 | :parameter-document | 1842 | :parameter-document |
| 1842 | "The spam classification (spam, ham, or neither) of this group. | 1843 | "The spam classification (spam, ham, or neither) of this group. |
| 1843 | When a spam group is entered, all unread articles are marked as spam.") | 1844 | When a spam group is entered, all unread articles are marked as |
| 1845 | spam. There is other behavior associated with ham and no | ||
| 1846 | classification when spam.el is loaded - see the manual.") | ||
| 1844 | 1847 | ||
| 1845 | (defvar gnus-group-spam-exit-processor-ifile "ifile" | 1848 | (defvar gnus-group-spam-exit-processor-ifile "ifile" |
| 1846 | "OBSOLETE: The ifile summary exit spam processor.") | 1849 | "OBSOLETE: The ifile summary exit spam processor.") |
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index aba0e88b92f..c7f9d60339f 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el | |||
| @@ -250,7 +250,11 @@ variable unless you are comfortable with that." | |||
| 250 | :type 'boolean) | 250 | :type 'boolean) |
| 251 | 251 | ||
| 252 | (defcustom imap-debug nil | 252 | (defcustom imap-debug nil |
| 253 | "If non-nil, random debug spews are placed in *imap-debug* buffer." | 253 | "If non-nil, random debug spews are placed in *imap-debug* buffer. |
| 254 | Note that username, passwords and other privacy sensitive | ||
| 255 | information (such as e-mail) may be stored in the *imap-debug* | ||
| 256 | buffer. It is not written to disk, however. Do not enable this | ||
| 257 | variable unless you are comfortable with that." | ||
| 254 | :group 'imap | 258 | :group 'imap |
| 255 | :type 'boolean) | 259 | :type 'boolean) |
| 256 | 260 | ||
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 0e018c68903..37f28337733 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -710,7 +710,8 @@ If HANDLES is non-nil, use it instead reparsing the buffer." | |||
| 710 | ;; First decode the head. | 710 | ;; First decode the head. |
| 711 | (save-restriction | 711 | (save-restriction |
| 712 | (message-narrow-to-head) | 712 | (message-narrow-to-head) |
| 713 | (mail-decode-encoded-word-region (point-min) (point-max))) | 713 | (let ((rfc2047-quote-decoded-words-containing-tspecials t)) |
| 714 | (mail-decode-encoded-word-region (point-min) (point-max)))) | ||
| 714 | (unless handles | 715 | (unless handles |
| 715 | (setq handles (mm-dissect-buffer t))) | 716 | (setq handles (mm-dissect-buffer t))) |
| 716 | (goto-char (point-min)) | 717 | (goto-char (point-min)) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c3afd6381ca..59b0178de42 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; nnimap.el --- imap backend for Gnus | 1 | ;;; nnimap.el --- imap backend for Gnus |
| 2 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 | 2 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
| 3 | ;; Free Software Foundation, Inc. | 3 | ;; Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Simon Josefsson <jas@pdc.kth.se> | 5 | ;; Author: Simon Josefsson <jas@pdc.kth.se> |
| @@ -409,7 +409,11 @@ If this is 'imap-mailbox-lsub, then use a server-side subscription list to | |||
| 409 | restrict visible folders.") | 409 | restrict visible folders.") |
| 410 | 410 | ||
| 411 | (defcustom nnimap-debug nil | 411 | (defcustom nnimap-debug nil |
| 412 | "If non-nil, random debug spews are placed in *nnimap-debug* buffer." | 412 | "If non-nil, random debug spews are placed in *nnimap-debug* buffer. |
| 413 | Note that username, passwords and other privacy sensitive | ||
| 414 | information (such as e-mail) may be stored in the *nnimap-debug* | ||
| 415 | buffer. It is not written to disk, however. Do not enable this | ||
| 416 | variable unless you are comfortable with that." | ||
| 413 | :group 'nnimap | 417 | :group 'nnimap |
| 414 | :type 'boolean) | 418 | :type 'boolean) |
| 415 | 419 | ||
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index e6461bf2627..6086f422abd 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | ;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages | 1 | ;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages |
| 2 | ;; Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. | 2 | |
| 3 | ;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 | ||
| 4 | ;; Free Software Foundation, Inc. | ||
| 3 | 5 | ||
| 4 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 5 | ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> | 7 | ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> |
| @@ -50,6 +52,7 @@ Value is what BODY returns." | |||
| 50 | 52 | ||
| 51 | (require 'qp) | 53 | (require 'qp) |
| 52 | (require 'mm-util) | 54 | (require 'mm-util) |
| 55 | (require 'ietf-drums) | ||
| 53 | ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus. | 56 | ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus. |
| 54 | (require 'mail-prsvr) | 57 | (require 'mail-prsvr) |
| 55 | (require 'base64) | 58 | (require 'base64) |
| @@ -639,6 +642,9 @@ By default, the region is treated as containing addresses (see | |||
| 639 | "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\ | 642 | "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\ |
| 640 | \\?\\([!->@-~ +]*\\)\\?=")) | 643 | \\?\\([!->@-~ +]*\\)\\?=")) |
| 641 | 644 | ||
| 645 | (defvar rfc2047-quote-decoded-words-containing-tspecials nil | ||
| 646 | "If non-nil, quote decoded words containing special characters.") | ||
| 647 | |||
| 642 | ;; Fixme: This should decode in place, not cons intermediate strings. | 648 | ;; Fixme: This should decode in place, not cons intermediate strings. |
| 643 | ;; Also check whether it needs to worry about delimiting fields like | 649 | ;; Also check whether it needs to worry about delimiting fields like |
| 644 | ;; encoding. | 650 | ;; encoding. |
| @@ -673,14 +679,66 @@ By default, the region is treated as containing addresses (see | |||
| 673 | (insert (rfc2047-parse-and-decode | 679 | (insert (rfc2047-parse-and-decode |
| 674 | (prog1 | 680 | (prog1 |
| 675 | (match-string 0) | 681 | (match-string 0) |
| 676 | (delete-region (match-beginning 0) (match-end 0))))) | 682 | (delete-region e (match-end 0))))) |
| 677 | ;; Remove newlines between decoded words, though such things | 683 | (while (looking-at rfc2047-encoded-word-regexp) |
| 678 | ;; essentially must not be there. | 684 | (insert (rfc2047-parse-and-decode |
| 685 | (prog1 | ||
| 686 | (match-string 0) | ||
| 687 | (delete-region (point) (match-end 0)))))) | ||
| 679 | (save-restriction | 688 | (save-restriction |
| 680 | (narrow-to-region e (point)) | 689 | (narrow-to-region e (point)) |
| 681 | (goto-char e) | 690 | (goto-char e) |
| 691 | ;; Remove newlines between decoded words, though such | ||
| 692 | ;; things essentially must not be there. | ||
| 682 | (while (re-search-forward "[\n\r]+" nil t) | 693 | (while (re-search-forward "[\n\r]+" nil t) |
| 683 | (replace-match " ")) | 694 | (replace-match " ")) |
| 695 | ;; Quote decoded words if there are special characters | ||
| 696 | ;; which might violate RFC2822. | ||
| 697 | (when (and rfc2047-quote-decoded-words-containing-tspecials | ||
| 698 | (let ((regexp (car (rassq | ||
| 699 | 'address-mime | ||
| 700 | rfc2047-header-encoding-alist)))) | ||
| 701 | (when regexp | ||
| 702 | (save-restriction | ||
| 703 | (widen) | ||
| 704 | (beginning-of-line) | ||
| 705 | (while (and (memq (char-after) '(? ?\t)) | ||
| 706 | (zerop (forward-line -1)))) | ||
| 707 | (looking-at regexp))))) | ||
| 708 | (let (quoted) | ||
| 709 | (goto-char e) | ||
| 710 | (skip-chars-forward " \t") | ||
| 711 | (setq start (point)) | ||
| 712 | (setq quoted (eq (char-after) ?\")) | ||
| 713 | (goto-char (point-max)) | ||
| 714 | (skip-chars-backward " \t") | ||
| 715 | (if (setq quoted (and quoted | ||
| 716 | (> (point) (1+ start)) | ||
| 717 | (eq (char-before) ?\"))) | ||
| 718 | (progn | ||
| 719 | (backward-char) | ||
| 720 | (setq start (1+ start) | ||
| 721 | end (point-marker))) | ||
| 722 | (setq end (point-marker))) | ||
| 723 | (goto-char start) | ||
| 724 | (while (search-forward "\"" end t) | ||
| 725 | (when (prog2 | ||
| 726 | (backward-char) | ||
| 727 | (zerop (% (skip-chars-backward "\\\\") 2)) | ||
| 728 | (goto-char (match-beginning 0))) | ||
| 729 | (insert "\\")) | ||
| 730 | (forward-char)) | ||
| 731 | (when (and (not quoted) | ||
| 732 | (progn | ||
| 733 | (goto-char start) | ||
| 734 | (re-search-forward | ||
| 735 | (concat "[" ietf-drums-tspecials "]") | ||
| 736 | end t))) | ||
| 737 | (goto-char start) | ||
| 738 | (insert "\"") | ||
| 739 | (goto-char end) | ||
| 740 | (insert "\"")) | ||
| 741 | (set-marker end nil))) | ||
| 684 | (goto-char (point-max))) | 742 | (goto-char (point-max))) |
| 685 | (when (and (mm-multibyte-p) | 743 | (when (and (mm-multibyte-p) |
| 686 | mail-parse-charset | 744 | mail-parse-charset |
diff --git a/lisp/isearch.el b/lisp/isearch.el index bc8e1533351..77208c42ee4 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -537,6 +537,11 @@ Type \\[isearch-quote-char] to quote control character to search for it. | |||
| 537 | \\[isearch-abort] when search is successful aborts and moves point to\ | 537 | \\[isearch-abort] when search is successful aborts and moves point to\ |
| 538 | starting point. | 538 | starting point. |
| 539 | 539 | ||
| 540 | Type \\[isearch-query-replace] to start `query-replace' with string to\ | ||
| 541 | replace from last search string. | ||
| 542 | Type \\[isearch-query-replace-regexp] to start `query-replace-regexp'\ | ||
| 543 | with string to replace from last search string.. | ||
| 544 | |||
| 540 | Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. | 545 | Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. |
| 541 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. | 546 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. |
| 542 | Type \\[isearch-edit-string] to edit the search string in the minibuffer. | 547 | Type \\[isearch-edit-string] to edit the search string in the minibuffer. |
diff --git a/lisp/log-view.el b/lisp/log-view.el index 51ca8907db8..c153cbdbb60 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output | 1 | ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 6 | ;; Keywords: rcs sccs cvs log version-control | 6 | ;; Keywords: rcs sccs cvs log version-control |
| @@ -85,7 +85,7 @@ | |||
| 85 | "\\|SCCS/s\\.\\(.+\\):" | 85 | "\\|SCCS/s\\.\\(.+\\):" |
| 86 | "\\)\n")) | 86 | "\\)\n")) |
| 87 | ;; In RCS, a locked revision will look like "revision N.M\tlocked by: FOO". | 87 | ;; In RCS, a locked revision will look like "revision N.M\tlocked by: FOO". |
| 88 | (defconst log-view-message-re "^\\(revision \\([.0-9]+\\)\\(?:\t.*\\)?\\|rev \\([0-9]+\\): .*\\|D \\([.0-9]+\\) .*\\)$") | 88 | (defconst log-view-message-re "^\\(revision \\([.0-9]+\\)\\(?:\t.*\\)?\\|r\\([0-9]+\\) | .* | .*\\|D \\([.0-9]+\\) .*\\)$") |
| 89 | 89 | ||
| 90 | (defconst log-view-font-lock-keywords | 90 | (defconst log-view-font-lock-keywords |
| 91 | `((,log-view-file-re | 91 | `((,log-view-file-re |
| @@ -206,5 +206,5 @@ were the region starts and ends." | |||
| 206 | 206 | ||
| 207 | (provide 'log-view) | 207 | (provide 'log-view) |
| 208 | 208 | ||
| 209 | ;;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f | 209 | ;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f |
| 210 | ;;; log-view.el ends here | 210 | ;;; log-view.el ends here |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 583b5fa2afe..0fee809789e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4105,7 +4105,7 @@ ARGS are the arguments OPERATION has been called with." | |||
| 4105 | (if (bufferp (nth 0 args)) (nth 0 args) (current-buffer)))) | 4105 | (if (bufferp (nth 0 args)) (nth 0 args) (current-buffer)))) |
| 4106 | ; COMMAND | 4106 | ; COMMAND |
| 4107 | ((member operation | 4107 | ((member operation |
| 4108 | (list 'dired-call-process-command | 4108 | (list 'dired-call-process |
| 4109 | ; Emacs only | 4109 | ; Emacs only |
| 4110 | 'shell | 4110 | 'shell |
| 4111 | ; Post Emacs 21.3 only | 4111 | ; Post Emacs 21.3 only |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f49b25fcf9e..5fdf77c29d8 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -338,7 +338,6 @@ detailed description of this mode. | |||
| 338 | (match-string 3) | 338 | (match-string 3) |
| 339 | nil nil))) | 339 | nil nil))) |
| 340 | (push var gdb-var-list) | 340 | (push var gdb-var-list) |
| 341 | (setq speedbar-update-flag t) | ||
| 342 | (speedbar 1) | 341 | (speedbar 1) |
| 343 | (if (equal (nth 2 var) "0") | 342 | (if (equal (nth 2 var) "0") |
| 344 | (gdb-enqueue-input | 343 | (gdb-enqueue-input |
| @@ -433,7 +432,18 @@ detailed description of this mode. | |||
| 433 | `(lambda () (gdb-var-evaluate-expression-handler | 432 | `(lambda () (gdb-var-evaluate-expression-handler |
| 434 | ,varnum t))))))) | 433 | ,varnum t))))))) |
| 435 | (setq gdb-pending-triggers | 434 | (setq gdb-pending-triggers |
| 436 | (delq 'gdb-var-update gdb-pending-triggers))) | 435 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 436 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 437 | ;; dummy command to update speedbar at right time | ||
| 438 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) | ||
| 439 | ;; keep gdb-pending-triggers non-nil till end | ||
| 440 | (push 'gdb-speedbar-timer gdb-pending-triggers))) | ||
| 441 | |||
| 442 | (defun gdb-speedbar-timer-fn () | ||
| 443 | (setq gdb-pending-triggers | ||
| 444 | (delq 'gdb-speedbar-timer gdb-pending-triggers)) | ||
| 445 | (with-current-buffer gud-comint-buffer | ||
| 446 | (speedbar-timer-fn))) | ||
| 437 | 447 | ||
| 438 | (defun gdb-var-delete () | 448 | (defun gdb-var-delete () |
| 439 | "Delete watched expression from the speedbar." | 449 | "Delete watched expression from the speedbar." |
| @@ -882,12 +892,12 @@ happens to be appropriate." | |||
| 882 | (gdb-invalidate-threads) | 892 | (gdb-invalidate-threads) |
| 883 | (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. | 893 | (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. |
| 884 | ;; FIXME: with GDB-6 on Darwin, this might very well work. | 894 | ;; FIXME: with GDB-6 on Darwin, this might very well work. |
| 885 | (dolist (frame (frame-list)) | 895 | ;; only needed/used with speedbar/watch expressions |
| 886 | (when (string-equal (frame-parameter frame 'name) "Speedbar") | 896 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 887 | (setq gdb-var-changed t) ; force update | 897 | (setq gdb-var-changed t) ; force update |
| 888 | (dolist (var gdb-var-list) | 898 | (dolist (var gdb-var-list) |
| 889 | (setcar (nthcdr 5 var) nil)))) | 899 | (setcar (nthcdr 5 var) nil)) |
| 890 | (gdb-var-update)))) | 900 | (gdb-var-update))))) |
| 891 | (let ((sink gdb-output-sink)) | 901 | (let ((sink gdb-output-sink)) |
| 892 | (cond | 902 | (cond |
| 893 | ((eq sink 'user) t) | 903 | ((eq sink 'user) t) |
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index ecf8da2e509..7bf9921b2ee 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -898,7 +898,7 @@ The environment marked is the one that contains point or follows point." | |||
| 898 | ;; Compatibility: XEmacs doesn't have the `mark-active' variable. | 898 | ;; Compatibility: XEmacs doesn't have the `mark-active' variable. |
| 899 | (defun meta-mark-active () | 899 | (defun meta-mark-active () |
| 900 | "Return whether the mark and region are currently active in this buffer." | 900 | "Return whether the mark and region are currently active in this buffer." |
| 901 | (or (and (boundp 'mark-active) mark-active) (mark))) | 901 | (if (boundp 'mark-active) mark-active (mark))) |
| 902 | 902 | ||
| 903 | 903 | ||
| 904 | 904 | ||
diff --git a/lisp/replace.el b/lisp/replace.el index de3577913c1..2c60cd006f1 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -115,8 +115,11 @@ wants to replace FROM with TO." | |||
| 115 | query-replace-from-history-variable | 115 | query-replace-from-history-variable |
| 116 | nil t t)))) | 116 | nil t t)))) |
| 117 | (if (and (zerop (length from)) lastto lastfrom) | 117 | (if (and (zerop (length from)) lastto lastfrom) |
| 118 | (cons lastfrom | 118 | (progn |
| 119 | (query-replace-compile-replacement lastto regexp-flag)) | 119 | (cons lastfrom |
| 120 | (query-replace-compile-replacement lastto regexp-flag)) | ||
| 121 | (set query-replace-from-history-variable | ||
| 122 | (cdr (symbol-value query-replace-from-history-variable)))) | ||
| 120 | ;; Warn if user types \n or \t, but don't reject the input. | 123 | ;; Warn if user types \n or \t, but don't reject the input. |
| 121 | (and regexp-flag | 124 | (and regexp-flag |
| 122 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) | 125 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) |
| @@ -214,7 +217,11 @@ Fourth and fifth arg START and END specify the region to operate on. | |||
| 214 | 217 | ||
| 215 | To customize possible responses, change the \"bindings\" in `query-replace-map'." | 218 | To customize possible responses, change the \"bindings\" in `query-replace-map'." |
| 216 | (interactive (let ((common | 219 | (interactive (let ((common |
| 217 | (query-replace-read-args "Query replace" nil))) | 220 | (query-replace-read-args |
| 221 | (if (and transient-mark-mode mark-active) | ||
| 222 | "Query replace in region" | ||
| 223 | "Query replace") | ||
| 224 | nil))) | ||
| 218 | (list (nth 0 common) (nth 1 common) (nth 2 common) | 225 | (list (nth 0 common) (nth 1 common) (nth 2 common) |
| 219 | ;; These are done separately here | 226 | ;; These are done separately here |
| 220 | ;; so that command-history will record these expressions | 227 | ;; so that command-history will record these expressions |
| @@ -274,7 +281,11 @@ text, TO-STRING is actually made a list instead of a string. | |||
| 274 | Use \\[repeat-complex-command] after this command for details." | 281 | Use \\[repeat-complex-command] after this command for details." |
| 275 | (interactive | 282 | (interactive |
| 276 | (let ((common | 283 | (let ((common |
| 277 | (query-replace-read-args "Query replace regexp" t))) | 284 | (query-replace-read-args |
| 285 | (if (and transient-mark-mode mark-active) | ||
| 286 | "Query replace regexp in region" | ||
| 287 | "Query replace regexp") | ||
| 288 | t))) | ||
| 278 | (list (nth 0 common) (nth 1 common) (nth 2 common) | 289 | (list (nth 0 common) (nth 1 common) (nth 2 common) |
| 279 | ;; These are done separately here | 290 | ;; These are done separately here |
| 280 | ;; so that command-history will record these expressions | 291 | ;; so that command-history will record these expressions |
| @@ -420,7 +431,11 @@ which will run faster and will not set the mark or print anything. | |||
| 420 | and TO-STRING is also null.)" | 431 | and TO-STRING is also null.)" |
| 421 | (interactive | 432 | (interactive |
| 422 | (let ((common | 433 | (let ((common |
| 423 | (query-replace-read-args "Replace string" nil))) | 434 | (query-replace-read-args |
| 435 | (if (and transient-mark-mode mark-active) | ||
| 436 | "Replace string in region" | ||
| 437 | "Replace string") | ||
| 438 | nil))) | ||
| 424 | (list (nth 0 common) (nth 1 common) (nth 2 common) | 439 | (list (nth 0 common) (nth 1 common) (nth 2 common) |
| 425 | (if (and transient-mark-mode mark-active) | 440 | (if (and transient-mark-mode mark-active) |
| 426 | (region-beginning)) | 441 | (region-beginning)) |
| @@ -474,7 +489,11 @@ What you probably want is a loop like this: | |||
| 474 | which will run faster and will not set the mark or print anything." | 489 | which will run faster and will not set the mark or print anything." |
| 475 | (interactive | 490 | (interactive |
| 476 | (let ((common | 491 | (let ((common |
| 477 | (query-replace-read-args "Replace regexp" t))) | 492 | (query-replace-read-args |
| 493 | (if (and transient-mark-mode mark-active) | ||
| 494 | "Replace regexp in region" | ||
| 495 | "Replace regexp") | ||
| 496 | t))) | ||
| 478 | (list (nth 0 common) (nth 1 common) (nth 2 common) | 497 | (list (nth 0 common) (nth 1 common) (nth 2 common) |
| 479 | (if (and transient-mark-mode mark-active) | 498 | (if (and transient-mark-mode mark-active) |
| 480 | (region-beginning)) | 499 | (region-beginning)) |
diff --git a/lisp/ses.el b/lisp/ses.el index c2239327e1c..502acf868dc 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -1281,34 +1281,20 @@ to each symbol." | |||
| 1281 | 1281 | ||
| 1282 | ;; This should be unnecessary, because the feature is now built in. | 1282 | ;; This should be unnecessary, because the feature is now built in. |
| 1283 | 1283 | ||
| 1284 | ;;; (defadvice undo-more (around ses-undo-more activate preactivate) | 1284 | (defadvice undo-more (around ses-undo-more activate preactivate) |
| 1285 | ;;; "Define a meaning for conses in buffer-undo-list whose car is a symbol | 1285 | "For SES mode, allow undo outside of narrowed buffer range." |
| 1286 | ;;; other than t or nil. To undo these, apply the car--a function--to the | 1286 | (if (not (eq major-mode 'ses-mode)) |
| 1287 | ;;; cdr--its arglist." | 1287 | ad-do-it |
| 1288 | ;;; (let ((ses-count (ad-get-arg 0))) | 1288 | ;;Here is some extra code for SES mode. |
| 1289 | ;;; (catch 'undo | 1289 | (setq ses--deferred-narrow |
| 1290 | ;;; (dolist (ses-x pending-undo-list) | 1290 | (or ses--deferred-narrow (ses-narrowed-p))) |
| 1291 | ;;; (unless ses-x | 1291 | (widen) |
| 1292 | ;;; ;;End of undo boundary | 1292 | (condition-case x |
| 1293 | ;;; (setq ses-count (1- ses-count)) | 1293 | ad-do-it |
| 1294 | ;;; (if (<= ses-count 0) | 1294 | (error |
| 1295 | ;;; ;;We've seen enough boundaries - stop undoing | 1295 | ;;Restore narrow if appropriate |
| 1296 | ;;; (throw 'undo nil))) | 1296 | (ses-command-hook) |
| 1297 | ;;; (and (consp ses-x) (symbolp (car ses-x)) (fboundp (car ses-x)) | 1297 | (signal (car x) (cdr x)))))) |
| 1298 | ;;; ;;Undo using apply | ||
| 1299 | ;;; (apply (car ses-x) (cdr ses-x))))) | ||
| 1300 | ;;; (if (not (eq major-mode 'ses-mode)) | ||
| 1301 | ;;; ad-do-it | ||
| 1302 | ;;; ;;Here is some extra code for SES mode. | ||
| 1303 | ;;; (setq ses--deferred-narrow | ||
| 1304 | ;;; (or ses--deferred-narrow (ses-narrowed-p))) | ||
| 1305 | ;;; (widen) | ||
| 1306 | ;;; (condition-case x | ||
| 1307 | ;;; ad-do-it | ||
| 1308 | ;;; (error | ||
| 1309 | ;;; ;;Restore narrow if appropriate | ||
| 1310 | ;;; (ses-command-hook) | ||
| 1311 | ;;; (signal (car x) (cdr x))))))) | ||
| 1312 | 1298 | ||
| 1313 | (defun ses-begin-change () | 1299 | (defun ses-begin-change () |
| 1314 | "For undo, remember point before we start changing hidden stuff." | 1300 | "For undo, remember point before we start changing hidden stuff." |
diff --git a/lisp/simple.el b/lisp/simple.el index 639021bcb95..be9bded5382 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3162,12 +3162,12 @@ and more reliable (no dependence on goal column, etc.)." | |||
| 3162 | (let ((abbrev-mode nil)) | 3162 | (let ((abbrev-mode nil)) |
| 3163 | (end-of-line) | 3163 | (end-of-line) |
| 3164 | (insert "\n")) | 3164 | (insert "\n")) |
| 3165 | (line-move arg)) | 3165 | (line-move arg nil nil t)) |
| 3166 | (if (interactive-p) | 3166 | (if (interactive-p) |
| 3167 | (condition-case nil | 3167 | (condition-case nil |
| 3168 | (line-move arg) | 3168 | (line-move arg nil nil t) |
| 3169 | ((beginning-of-buffer end-of-buffer) (ding))) | 3169 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3170 | (line-move arg))) | 3170 | (line-move arg nil nil t))) |
| 3171 | nil) | 3171 | nil) |
| 3172 | 3172 | ||
| 3173 | (defun previous-line (&optional arg) | 3173 | (defun previous-line (&optional arg) |
| @@ -3190,9 +3190,9 @@ to use and more reliable (no dependence on goal column, etc.)." | |||
| 3190 | (or arg (setq arg 1)) | 3190 | (or arg (setq arg 1)) |
| 3191 | (if (interactive-p) | 3191 | (if (interactive-p) |
| 3192 | (condition-case nil | 3192 | (condition-case nil |
| 3193 | (line-move (- arg)) | 3193 | (line-move (- arg) nil nil t) |
| 3194 | ((beginning-of-buffer end-of-buffer) (ding))) | 3194 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3195 | (line-move (- arg))) | 3195 | (line-move (- arg) nil nil t)) |
| 3196 | nil) | 3196 | nil) |
| 3197 | 3197 | ||
| 3198 | (defcustom track-eol nil | 3198 | (defcustom track-eol nil |
| @@ -3231,8 +3231,8 @@ Outline mode sets this." | |||
| 3231 | (assq prop buffer-invisibility-spec))))) | 3231 | (assq prop buffer-invisibility-spec))))) |
| 3232 | 3232 | ||
| 3233 | ;; Perform vertical scrolling of tall images if necessary. | 3233 | ;; Perform vertical scrolling of tall images if necessary. |
| 3234 | (defun line-move (arg &optional noerror to-end) | 3234 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3235 | (if auto-window-vscroll | 3235 | (if (and auto-window-vscroll try-vscroll) |
| 3236 | (let ((forward (> arg 0)) | 3236 | (let ((forward (> arg 0)) |
| 3237 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3237 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
| 3238 | (if (and (consp part) | 3238 | (if (and (consp part) |
| @@ -3248,7 +3248,14 @@ Outline mode sets this." | |||
| 3248 | (* (frame-char-height) (- arg)))))) | 3248 | (* (frame-char-height) (- arg)))))) |
| 3249 | t) | 3249 | t) |
| 3250 | (set-window-vscroll nil 0) | 3250 | (set-window-vscroll nil 0) |
| 3251 | (line-move-1 arg noerror to-end))) | 3251 | (when (line-move-1 arg noerror to-end) |
| 3252 | (sit-for 0) | ||
| 3253 | (if (and (not forward) | ||
| 3254 | (setq part (nth 2 (pos-visible-in-window-p | ||
| 3255 | (line-beginning-position) nil t))) | ||
| 3256 | (> (cdr part) 0)) | ||
| 3257 | (set-window-vscroll nil (cdr part) t)) | ||
| 3258 | t))) | ||
| 3252 | (line-move-1 arg noerror to-end))) | 3259 | (line-move-1 arg noerror to-end))) |
| 3253 | 3260 | ||
| 3254 | ;; This is the guts of next-line and previous-line. | 3261 | ;; This is the guts of next-line and previous-line. |
diff --git a/lisp/subr.el b/lisp/subr.el index 89508640171..b22e7886f2f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2233,10 +2233,10 @@ and replace a sub-expression, e.g. | |||
| 2233 | (defun subregexp-context-p (regexp pos &optional start) | 2233 | (defun subregexp-context-p (regexp pos &optional start) |
| 2234 | "Return non-nil if POS is in a normal subregexp context in REGEXP. | 2234 | "Return non-nil if POS is in a normal subregexp context in REGEXP. |
| 2235 | A subregexp context is one where a sub-regexp can appear. | 2235 | A subregexp context is one where a sub-regexp can appear. |
| 2236 | A non-subregexp context is for example within brackets, or within a repetition | 2236 | A non-subregexp context is for example within brackets, or within a |
| 2237 | bounds operator \\{..\\}, or right after a \\. | 2237 | repetition bounds operator `\\=\\{...\\}', or right after a `\\'. |
| 2238 | If START is non-nil, it should be a position in REGEXP, smaller than POS, | 2238 | If START is non-nil, it should be a position in REGEXP, smaller |
| 2239 | and known to be in a subregexp context." | 2239 | than POS, and known to be in a subregexp context." |
| 2240 | ;; Here's one possible implementation, with the great benefit that it | 2240 | ;; Here's one possible implementation, with the great benefit that it |
| 2241 | ;; reuses the regexp-matcher's own parser, so it understands all the | 2241 | ;; reuses the regexp-matcher's own parser, so it understands all the |
| 2242 | ;; details of the syntax. A disadvantage is that it needs to match the | 2242 | ;; details of the syntax. A disadvantage is that it needs to match the |
diff --git a/lisp/wdired.el b/lisp/wdired.el index 928ecd65339..92d7a81627a 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2001, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Filename: wdired.el | 5 | ;; Filename: wdired.el |
| 6 | ;; Author: Juan León Lahoz GarcÃa <juan-leon.lahoz@tecsidel.es> | 6 | ;; Author: Juan León Lahoz García <juan-leon.lahoz@tecsidel.es> |
| 7 | ;; Version: 1.91 | 7 | ;; Version: 1.91 |
| 8 | ;; Keywords: dired, environment, files, renaming | 8 | ;; Keywords: dired, environment, files, renaming |
| 9 | 9 | ||
diff --git a/man/ChangeLog b/man/ChangeLog index bcba521884c..beb8925ec45 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-02-18 Jonathan Yavner <jyavner@member.fsf.org> | ||
| 2 | |||
| 3 | * ses.texi: Add concept/function/variable indices (this work was | ||
| 4 | donated by Brad Collins <brad@chenla.org>, copyright-assignment | ||
| 5 | papers on file at FSF). | ||
| 6 | |||
| 1 | 2005-02-16 Luc Teirlinck <teirllm@auburn.edu> | 7 | 2005-02-16 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 8 | ||
| 3 | * emacs.texi (Top): Update menu for splitting of node in | 9 | * emacs.texi (Top): Update menu for splitting of node in |
diff --git a/man/ediff.texi b/man/ediff.texi index 954efe4e027..318ac9e5c3f 100644 --- a/man/ediff.texi +++ b/man/ediff.texi | |||
| @@ -1106,10 +1106,18 @@ multi-file patch. This is because, in the latter-style sessions, there are | |||
| 1106 | many ways to create diff output, and it is easier to handle by running | 1106 | many ways to create diff output, and it is easier to handle by running |
| 1107 | Ediff on the inactive sessions. | 1107 | Ediff on the inactive sessions. |
| 1108 | 1108 | ||
| 1109 | Last, but not least, by typing @kbd{=}, you can quickly find out which | 1109 | Last, but not least, by typing @kbd{==}, you can quickly find out which |
| 1110 | sessions have identical files, so you won't have to run Ediff on those | 1110 | sessions have identical entries, so you won't have to run Ediff on those |
| 1111 | sessions. This, however, works only on local, uncompressed files. | 1111 | sessions. This, however, works only on local, uncompressed files. |
| 1112 | For compressed or remote files, this command won't report anything. | 1112 | For compressed or remote files, this command won't report anything. |
| 1113 | Likewise, you can use @kbd{=h} to mark sessions with identical entries | ||
| 1114 | for hiding or, with @kbd{=m}, for further operations. | ||
| 1115 | |||
| 1116 | The comparison operations @kbd{==}, @kbd{=h}, and @kbd{=m} can recurse into | ||
| 1117 | subdirectories to see if they have identical contents (so the user will not | ||
| 1118 | need to descend into those subdirectories manually). These commands ask the | ||
| 1119 | user whether or not to do a recursive descent. | ||
| 1120 | |||
| 1113 | 1121 | ||
| 1114 | 1122 | ||
| 1115 | @node Remote and Compressed Files, Customization, Session Groups, Top | 1123 | @node Remote and Compressed Files, Customization, Session Groups, Top |
| @@ -2395,11 +2403,13 @@ Jay Finger (jayf@@microsoft.com), | |||
| 2395 | Xavier Fornari (xavier@@europe.cma.fr), | 2403 | Xavier Fornari (xavier@@europe.cma.fr), |
| 2396 | Eric Freudenthal (freudent@@jan.ultra.nyu.edu), | 2404 | Eric Freudenthal (freudent@@jan.ultra.nyu.edu), |
| 2397 | Job Ganzevoort (Job.Ganzevoort@@cwi.nl), | 2405 | Job Ganzevoort (Job.Ganzevoort@@cwi.nl), |
| 2406 | Felix Heinrich Gatzemeier (felix.g@@tzemeier.info), | ||
| 2398 | Boris Goldowsky (boris@@cs.rochester.edu), | 2407 | Boris Goldowsky (boris@@cs.rochester.edu), |
| 2399 | Allan Gottlieb (gottlieb@@allan.ultra.nyu.edu), | 2408 | Allan Gottlieb (gottlieb@@allan.ultra.nyu.edu), |
| 2400 | Aaron Gross (aaron@@bfr.co.il), | 2409 | Aaron Gross (aaron@@bfr.co.il), |
| 2401 | Thorbjoern Hansen (thorbjoern.hansen@@mchp.siemens.de), | 2410 | Thorbjoern Hansen (thorbjoern.hansen@@mchp.siemens.de), |
| 2402 | Marcus Harnisch (marcus_harnisch@@mint-tech.com), | 2411 | Marcus Harnisch (marcus_harnisch@@mint-tech.com), |
| 2412 | Steven E. Harris (seh@@panix.com), | ||
| 2403 | Xiaoli Huang (hxl@@epic.com), | 2413 | Xiaoli Huang (hxl@@epic.com), |
| 2404 | Andreas Jaeger (aj@@suse.de), | 2414 | Andreas Jaeger (aj@@suse.de), |
| 2405 | Lars Magne Ingebrigtsen (larsi@@ifi.uio.no), | 2415 | Lars Magne Ingebrigtsen (larsi@@ifi.uio.no), |
| @@ -2428,6 +2438,7 @@ Chris Murphy (murphycm@@sun.aston.ac.uk), | |||
| 2428 | Erik Naggum (erik@@naggum.no), | 2438 | Erik Naggum (erik@@naggum.no), |
| 2429 | Eyvind Ness (Eyvind.Ness@@hrp.no), | 2439 | Eyvind Ness (Eyvind.Ness@@hrp.no), |
| 2430 | Ray Nickson (nickson@@cs.uq.oz.au), | 2440 | Ray Nickson (nickson@@cs.uq.oz.au), |
| 2441 | Dan Nicolaescu (dann@@ics.uci.edu), | ||
| 2431 | David Petchey (petchey_david@@jpmorgan.com), | 2442 | David Petchey (petchey_david@@jpmorgan.com), |
| 2432 | Benjamin Pierce (benjamin.pierce@@cl.cam.ac.uk), | 2443 | Benjamin Pierce (benjamin.pierce@@cl.cam.ac.uk), |
| 2433 | Francois Pinard (pinard@@iro.umontreal.ca), | 2444 | Francois Pinard (pinard@@iro.umontreal.ca), |
diff --git a/man/ses.texi b/man/ses.texi index b648f6eef9a..9b0137d2002 100644 --- a/man/ses.texi +++ b/man/ses.texi | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | @copying | 8 | @copying |
| 9 | This file documents SES: the Simple Emacs Spreadsheet. | 9 | This file documents SES: the Simple Emacs Spreadsheet. |
| 10 | 10 | ||
| 11 | Copyright @copyright{} 2002 Free Software Foundation, Inc. | 11 | Copyright @copyright{} 2002, 2005 Free Software Foundation, Inc. |
| 12 | 12 | ||
| 13 | @quotation | 13 | @quotation |
| 14 | Permission is granted to copy, distribute and/or modify this document | 14 | Permission is granted to copy, distribute and/or modify this document |
| @@ -71,6 +71,7 @@ To report bugs, send email to @email{jyavner@@member.fsf.org}. | |||
| 71 | * The Basics:: Basic spreadsheet commands | 71 | * The Basics:: Basic spreadsheet commands |
| 72 | * Advanced Features:: Want to know more? | 72 | * Advanced Features:: Want to know more? |
| 73 | * For Gurus:: Want to know @emph{even more}? | 73 | * For Gurus:: Want to know @emph{even more}? |
| 74 | * Index:: Concept, Function and Variable Index | ||
| 74 | * Acknowledgements:: Acknowledgements | 75 | * Acknowledgements:: Acknowledgements |
| 75 | @end menu | 76 | @end menu |
| 76 | 77 | ||
| @@ -79,6 +80,7 @@ To report bugs, send email to @email{jyavner@@member.fsf.org}. | |||
| 79 | @node Sales Pitch, The Basics, Top, Top | 80 | @node Sales Pitch, The Basics, Top, Top |
| 80 | @comment node-name, next, previous, up | 81 | @comment node-name, next, previous, up |
| 81 | @chapter Sales Pitch | 82 | @chapter Sales Pitch |
| 83 | @cindex features | ||
| 82 | 84 | ||
| 83 | @itemize @bullet | 85 | @itemize @bullet |
| 84 | @item Create and edit simple spreadsheets with a minimum of fuss. | 86 | @item Create and edit simple spreadsheets with a minimum of fuss. |
| @@ -100,6 +102,13 @@ To report bugs, send email to @email{jyavner@@member.fsf.org}. | |||
| 100 | @node The Basics, Advanced Features, Sales Pitch, Top | 102 | @node The Basics, Advanced Features, Sales Pitch, Top |
| 101 | @comment node-name, next, previous, up | 103 | @comment node-name, next, previous, up |
| 102 | @chapter The Basics | 104 | @chapter The Basics |
| 105 | @cindex basic commands | ||
| 106 | @findex ses-jump | ||
| 107 | @findex ses-mark-row | ||
| 108 | @findex ses-mark-column | ||
| 109 | @findex ses-mark-whole-buffer | ||
| 110 | @findex set-mark-command | ||
| 111 | @findex keyboard-quit | ||
| 103 | 112 | ||
| 104 | A @dfn{cell identifier} is a symbol with a column letter and a row | 113 | A @dfn{cell identifier} is a symbol with a column letter and a row |
| 105 | number. Cell B7 is the 2nd column of the 7th row. For very wide | 114 | number. Cell B7 is the 2nd column of the 7th row. For very wide |
| @@ -147,6 +156,13 @@ Highlight all cells (@code{mark-whole-buffer}). | |||
| 147 | 156 | ||
| 148 | @node Formulas, Resizing, The Basics, The Basics | 157 | @node Formulas, Resizing, The Basics, The Basics |
| 149 | @section Cell formulas | 158 | @section Cell formulas |
| 159 | @cindex formulas | ||
| 160 | @cindex formulas, entering | ||
| 161 | @findex ses-read-cell | ||
| 162 | @findex ses-read-symbol | ||
| 163 | @findex ses-edit-cell | ||
| 164 | @findex ses-recalculate-cell | ||
| 165 | @findex ses-recalculate-all | ||
| 150 | 166 | ||
| 151 | To enter a number into the current cell, just start typing: | 167 | To enter a number into the current cell, just start typing: |
| 152 | 168 | ||
| @@ -193,6 +209,15 @@ Recalculate the entire spreadsheet (@code{ses-recalculate-all}). | |||
| 193 | 209 | ||
| 194 | @node Resizing, Printer functions, Formulas, The Basics | 210 | @node Resizing, Printer functions, Formulas, The Basics |
| 195 | @section Resizing the spreadsheet | 211 | @section Resizing the spreadsheet |
| 212 | @cindex resizing spreadsheets | ||
| 213 | @findex ses-insert-row | ||
| 214 | @findex ses-insert-column | ||
| 215 | @findex ses-delete-row | ||
| 216 | @findex ses-delete-column | ||
| 217 | @findex ses-set-column-width | ||
| 218 | @findex ses-forward-or-insert | ||
| 219 | @findex ses-append-row-jump-first-column | ||
| 220 | |||
| 196 | 221 | ||
| 197 | Basic commands: | 222 | Basic commands: |
| 198 | 223 | ||
| @@ -240,6 +265,16 @@ Undo previous action (@code{(undo)}). | |||
| 240 | 265 | ||
| 241 | @node Printer functions, Clearing cells, Resizing, The Basics | 266 | @node Printer functions, Clearing cells, Resizing, The Basics |
| 242 | @section Printer functions | 267 | @section Printer functions |
| 268 | @cindex printer functions | ||
| 269 | @findex ses-read-cell-printer | ||
| 270 | @findex ses-read-column-printer | ||
| 271 | @findex ses-read-default-printer | ||
| 272 | @findex ses-center | ||
| 273 | @findex ses-center-span | ||
| 274 | @findex ses-dashfill | ||
| 275 | @findex ses-dashfill-span | ||
| 276 | @findex ses-tildefill-span | ||
| 277 | |||
| 243 | 278 | ||
| 244 | Printer functions convert binary cell values into the print forms that | 279 | Printer functions convert binary cell values into the print forms that |
| 245 | Emacs will display on the screen. | 280 | Emacs will display on the screen. |
| @@ -295,6 +330,9 @@ Centering with tildes (~) and spill-over. | |||
| 295 | 330 | ||
| 296 | @node Clearing cells, Copy/cut/paste, Printer functions, The Basics | 331 | @node Clearing cells, Copy/cut/paste, Printer functions, The Basics |
| 297 | @section Clearing cells | 332 | @section Clearing cells |
| 333 | @cindex clearing commands | ||
| 334 | @findex ses-clear-cell-backward | ||
| 335 | @findex ses-clear-cell-forward | ||
| 298 | 336 | ||
| 299 | These commands set both formula and printer to @code{nil}: | 337 | These commands set both formula and printer to @code{nil}: |
| 300 | 338 | ||
| @@ -309,6 +347,18 @@ Clear cell and move right (@code{ses-clear-cell-forward}). | |||
| 309 | 347 | ||
| 310 | @node Copy/cut/paste, Customizing SES, Clearing cells, The Basics | 348 | @node Copy/cut/paste, Customizing SES, Clearing cells, The Basics |
| 311 | @section Copy, cut, and paste | 349 | @section Copy, cut, and paste |
| 350 | @cindex copy | ||
| 351 | @cindex cut | ||
| 352 | @cindex paste | ||
| 353 | @findex kill-ring-save | ||
| 354 | @findex mouse-set-region | ||
| 355 | @findex mouse-set-secondary | ||
| 356 | @findex ses-kill-override | ||
| 357 | @findex yank | ||
| 358 | @findex clipboard-yank | ||
| 359 | @findex mouse-yank-at-click | ||
| 360 | @findex mouse-yank-at-secondary | ||
| 361 | @findex ses-yank-pop | ||
| 312 | 362 | ||
| 313 | The copy functions work on rectangular regions of cells. You can paste the | 363 | The copy functions work on rectangular regions of cells. You can paste the |
| 314 | copies into non-SES buffers to export the print text. | 364 | copies into non-SES buffers to export the print text. |
| @@ -372,6 +422,12 @@ yank. This doesn't make any difference? | |||
| 372 | 422 | ||
| 373 | @node Customizing SES, , Copy/cut/paste, The Basics | 423 | @node Customizing SES, , Copy/cut/paste, The Basics |
| 374 | @section Customizing SES | 424 | @section Customizing SES |
| 425 | @cindex customizing | ||
| 426 | @vindex enable-local-eval | ||
| 427 | @vindex ses-mode-hook | ||
| 428 | @vindex safe-functions | ||
| 429 | @vindex enable-local-eval | ||
| 430 | |||
| 375 | 431 | ||
| 376 | By default, a newly-created spreadsheet has 1 row and 1 column. The | 432 | By default, a newly-created spreadsheet has 1 row and 1 column. The |
| 377 | column width is 7 and the default printer is @samp{"%.7g"}. Each of these | 433 | column width is 7 and the default printer is @samp{"%.7g"}. Each of these |
| @@ -403,6 +459,9 @@ safety belts! | |||
| 403 | 459 | ||
| 404 | @node Advanced Features, For Gurus, The Basics, Top | 460 | @node Advanced Features, For Gurus, The Basics, Top |
| 405 | @chapter Advanced Features | 461 | @chapter Advanced Features |
| 462 | @cindex advanced features | ||
| 463 | @findex ses-read-header-row | ||
| 464 | |||
| 406 | 465 | ||
| 407 | @table @kbd | 466 | @table @kbd |
| 408 | @item C-c M-C-h | 467 | @item C-c M-C-h |
| @@ -430,6 +489,10 @@ column letters. | |||
| 430 | 489 | ||
| 431 | @node The print area, Ranges in formulas, Advanced Features, Advanced Features | 490 | @node The print area, Ranges in formulas, Advanced Features, Advanced Features |
| 432 | @section The print area | 491 | @section The print area |
| 492 | @cindex print area | ||
| 493 | @findex widen | ||
| 494 | @findex ses-renarrow-buffer | ||
| 495 | @findex ses-reprint-all | ||
| 433 | 496 | ||
| 434 | A SES file consists of a print area and a data area. Normally the | 497 | A SES file consists of a print area and a data area. Normally the |
| 435 | buffer is narrowed to show only the print area. The print area is | 498 | buffer is narrowed to show only the print area. The print area is |
| @@ -452,6 +515,13 @@ Recreate print area by reevaluating printer functions for all cells | |||
| 452 | 515 | ||
| 453 | @node Ranges in formulas, Sorting by column, The print area, Advanced Features | 516 | @node Ranges in formulas, Sorting by column, The print area, Advanced Features |
| 454 | @section Ranges in formulas | 517 | @section Ranges in formulas |
| 518 | @cindex ranges | ||
| 519 | @findex ses-insert-range-click | ||
| 520 | @findex ses-insert-range | ||
| 521 | @findex ses-insert-ses-range-click | ||
| 522 | @findex ses-insert-ses-range | ||
| 523 | @vindex from | ||
| 524 | @vindex to | ||
| 455 | 525 | ||
| 456 | A formula like | 526 | A formula like |
| 457 | @lisp | 527 | @lisp |
| @@ -505,6 +575,9 @@ the range. New cells inserted just before a range are not included. | |||
| 505 | 575 | ||
| 506 | @node Sorting by column, Standard formula functions, Ranges in formulas, Advanced Features | 576 | @node Sorting by column, Standard formula functions, Ranges in formulas, Advanced Features |
| 507 | @section Sorting by column | 577 | @section Sorting by column |
| 578 | @cindex sorting | ||
| 579 | @findex ses-sort-column | ||
| 580 | @findex ses-sort-column-click | ||
| 508 | 581 | ||
| 509 | @table @kbd | 582 | @table @kbd |
| 510 | @item C-c M-C-s | 583 | @item C-c M-C-s |
| @@ -531,6 +604,12 @@ range. | |||
| 531 | 604 | ||
| 532 | @node Standard formula functions, More on cell printing, Sorting by column, Advanced Features | 605 | @node Standard formula functions, More on cell printing, Sorting by column, Advanced Features |
| 533 | @section Standard formula functions | 606 | @section Standard formula functions |
| 607 | @cindex standard formula functions | ||
| 608 | @cindex *skip* | ||
| 609 | @cindex *error* | ||
| 610 | @findex ses-delete-blanks | ||
| 611 | @findex ses-average | ||
| 612 | @findex ses+ | ||
| 534 | 613 | ||
| 535 | Oftentimes you want a calculation to exclude the blank cells. Here | 614 | Oftentimes you want a calculation to exclude the blank cells. Here |
| 536 | are some useful functions to call from your formulas: | 615 | are some useful functions to call from your formulas: |
| @@ -550,6 +629,9 @@ as a single argument, since you'll probably use it with @code{ses-range}. | |||
| 550 | 629 | ||
| 551 | @node More on cell printing, Import and export, Standard formula functions, Advanced Features | 630 | @node More on cell printing, Import and export, Standard formula functions, Advanced Features |
| 552 | @section More on cell printing | 631 | @section More on cell printing |
| 632 | @cindex cell printing, more | ||
| 633 | @findex ses-truncate-cell | ||
| 634 | @findex ses-recalculate-cell | ||
| 553 | 635 | ||
| 554 | Special cell values: | 636 | Special cell values: |
| 555 | @itemize | 637 | @itemize |
| @@ -590,6 +672,10 @@ is numeric-only and you use a string as a cell value. | |||
| 590 | 672 | ||
| 591 | @node Import and export, Virus protection, More on cell printing, Advanced Features | 673 | @node Import and export, Virus protection, More on cell printing, Advanced Features |
| 592 | @section Import and export | 674 | @section Import and export |
| 675 | @cindex import and export | ||
| 676 | @cindex export, and import | ||
| 677 | @findex ses-export-tsv | ||
| 678 | @findex ses-export-tsf | ||
| 593 | 679 | ||
| 594 | @table @kbd | 680 | @table @kbd |
| 595 | @item x t | 681 | @item x t |
| @@ -606,6 +692,7 @@ contains tabs and/or newlines. Imported formulas are not relocated. | |||
| 606 | 692 | ||
| 607 | @node Virus protection, Spreadsheets with details and summary, Import and export, Advanced Features | 693 | @node Virus protection, Spreadsheets with details and summary, Import and export, Advanced Features |
| 608 | @section Virus protection | 694 | @section Virus protection |
| 695 | @cindex virus protection | ||
| 609 | 696 | ||
| 610 | Whenever a formula or printer is read from a file or is pasted into | 697 | Whenever a formula or printer is read from a file or is pasted into |
| 611 | the spreadsheet, it receives a ``needs safety check'' marking. Later, | 698 | the spreadsheet, it receives a ``needs safety check'' marking. Later, |
| @@ -632,6 +719,8 @@ for more info on how Lisp forms are classified as safe or unsafe. | |||
| 632 | 719 | ||
| 633 | @node Spreadsheets with details and summary, , Virus protection, Advanced Features | 720 | @node Spreadsheets with details and summary, , Virus protection, Advanced Features |
| 634 | @section Spreadsheets with details and summary | 721 | @section Spreadsheets with details and summary |
| 722 | @cindex details and summary | ||
| 723 | @cindex summary, and details | ||
| 635 | 724 | ||
| 636 | A common organization for spreadsheets is to have a bunch of ``detail'' | 725 | A common organization for spreadsheets is to have a bunch of ``detail'' |
| 637 | rows, each perhaps describing a transaction, and then a set of | 726 | rows, each perhaps describing a transaction, and then a set of |
| @@ -664,8 +753,9 @@ details-and-summary spreadsheet. | |||
| 664 | 753 | ||
| 665 | @c =================================================================== | 754 | @c =================================================================== |
| 666 | 755 | ||
| 667 | @node For Gurus, Acknowledgements, Advanced Features, Top | 756 | @node For Gurus, Index, Advanced Features, Top |
| 668 | @chapter For Gurus | 757 | @chapter For Gurus |
| 758 | @cindex advanced features | ||
| 669 | 759 | ||
| 670 | @menu | 760 | @menu |
| 671 | * Deferred updates:: | 761 | * Deferred updates:: |
| @@ -677,6 +767,9 @@ details-and-summary spreadsheet. | |||
| 677 | 767 | ||
| 678 | @node Deferred updates, Nonrelocatable references, For Gurus, For Gurus | 768 | @node Deferred updates, Nonrelocatable references, For Gurus, For Gurus |
| 679 | @section Deferred updates | 769 | @section Deferred updates |
| 770 | @cindex deferred updates | ||
| 771 | @cindex updates, deferred | ||
| 772 | @vindex run-with-idle-timer | ||
| 680 | 773 | ||
| 681 | To save time by avoiding redundant computations, cells that need | 774 | To save time by avoiding redundant computations, cells that need |
| 682 | recalculation due to changes in other cells are added to a set. At | 775 | recalculation due to changes in other cells are added to a set. At |
| @@ -706,6 +799,8 @@ can type ahead without worrying about the glitch. | |||
| 706 | 799 | ||
| 707 | @node Nonrelocatable references, The data area, Deferred updates, For Gurus | 800 | @node Nonrelocatable references, The data area, Deferred updates, For Gurus |
| 708 | @section Nonrelocatable references | 801 | @section Nonrelocatable references |
| 802 | @cindex nonrelocatable references | ||
| 803 | @cindex references, nonrelocatable | ||
| 709 | 804 | ||
| 710 | @kbd{C-y} relocates all cell-references in a pasted formula, while | 805 | @kbd{C-y} relocates all cell-references in a pasted formula, while |
| 711 | @kbd{C-u C-y} relocates none of the cell-references. What about mixed | 806 | @kbd{C-u C-y} relocates none of the cell-references. What about mixed |
| @@ -732,6 +827,8 @@ kind of dependency is also not recorded. | |||
| 732 | 827 | ||
| 733 | @node The data area, Buffer-local variables in spreadsheets, Nonrelocatable references, For Gurus | 828 | @node The data area, Buffer-local variables in spreadsheets, Nonrelocatable references, For Gurus |
| 734 | @section The data area | 829 | @section The data area |
| 830 | @cindex data area | ||
| 831 | @findex ses-reconstruct-all | ||
| 735 | 832 | ||
| 736 | Begins with an 014 character, followed by sets of cell-definition | 833 | Begins with an 014 character, followed by sets of cell-definition |
| 737 | macros for each row, followed by column-widths, column-printers, | 834 | macros for each row, followed by column-widths, column-printers, |
| @@ -762,6 +859,8 @@ data structures: | |||
| 762 | 859 | ||
| 763 | @node Buffer-local variables in spreadsheets, Uses of defadvice in SES, The data area, For Gurus | 860 | @node Buffer-local variables in spreadsheets, Uses of defadvice in SES, The data area, For Gurus |
| 764 | @section Buffer-local variables in spreadsheets | 861 | @section Buffer-local variables in spreadsheets |
| 862 | @cindex buffer-local variables | ||
| 863 | @cindex variables, buffer-local | ||
| 765 | 864 | ||
| 766 | You can add additional local variables to the list at the bottom of | 865 | You can add additional local variables to the list at the bottom of |
| 767 | the data area, such as hidden constants you want to refer to in your | 866 | the data area, such as hidden constants you want to refer to in your |
| @@ -794,6 +893,10 @@ avoid virus warnings, each function used in a formula needs | |||
| 794 | 893 | ||
| 795 | @node Uses of defadvice in SES, , Buffer-local variables in spreadsheets, For Gurus | 894 | @node Uses of defadvice in SES, , Buffer-local variables in spreadsheets, For Gurus |
| 796 | @section Uses of defadvice in SES | 895 | @section Uses of defadvice in SES |
| 896 | @cindex defadvice | ||
| 897 | @cindex undo-more | ||
| 898 | @cindex copy-region-as-kill | ||
| 899 | @cindex yank | ||
| 797 | 900 | ||
| 798 | @table @code | 901 | @table @code |
| 799 | @item undo-more | 902 | @item undo-more |
| @@ -814,10 +917,24 @@ formulas, then (if all else fails) as a single formula for the current | |||
| 814 | cell. | 917 | cell. |
| 815 | @end table | 918 | @end table |
| 816 | 919 | ||
| 920 | @c =================================================================== | ||
| 921 | @node Index, Acknowledgements, For Gurus, Top | ||
| 922 | @unnumbered Concept Index | ||
| 923 | |||
| 924 | @printindex cp | ||
| 925 | |||
| 926 | @heading Function Index | ||
| 927 | |||
| 928 | @printindex fn | ||
| 929 | |||
| 930 | @heading Variable Index | ||
| 931 | |||
| 932 | @printindex vr | ||
| 933 | |||
| 817 | 934 | ||
| 818 | @c =================================================================== | 935 | @c =================================================================== |
| 819 | 936 | ||
| 820 | @node Acknowledgements, , For Gurus, Top | 937 | @node Acknowledgements, , Index, Top |
| 821 | @chapter Acknowledgements | 938 | @chapter Acknowledgements |
| 822 | 939 | ||
| 823 | Coding by: | 940 | Coding by: |
| @@ -826,6 +943,14 @@ Jonathan Yavner @email{jyavner@@member.fsf.org}@* | |||
| 826 | Stefan Monnier @email{monnier@@gnu.org} | 943 | Stefan Monnier @email{monnier@@gnu.org} |
| 827 | @end quotation | 944 | @end quotation |
| 828 | 945 | ||
| 946 | @noindent | ||
| 947 | Texinfo manual by: | ||
| 948 | @quotation | ||
| 949 | Jonathan Yavner @email{jyavner@@member.fsf.org}@* | ||
| 950 | Brad Collins <brad@@chenla.org> | ||
| 951 | @end quotation | ||
| 952 | |||
| 953 | @noindent | ||
| 829 | Ideas from: | 954 | Ideas from: |
| 830 | @quotation | 955 | @quotation |
| 831 | Christoph Conrad @email{christoph.conrad@@gmx.de}@* | 956 | Christoph Conrad @email{christoph.conrad@@gmx.de}@* |
diff --git a/man/viper.texi b/man/viper.texi index 654f6c9355f..7b3a888c8ca 100644 --- a/man/viper.texi +++ b/man/viper.texi | |||
| @@ -2285,7 +2285,7 @@ It is also possible to impose Vi on some major modes, even though they may | |||
| 2285 | bind common keys to specialized commands. This might make sense for modes | 2285 | bind common keys to specialized commands. This might make sense for modes |
| 2286 | that bind only a small number of common keys. For instance, Viper subverts | 2286 | that bind only a small number of common keys. For instance, Viper subverts |
| 2287 | the Shell mode by changing the bindings for @kbd{C-m} and @kbd{C-d} using | 2287 | the Shell mode by changing the bindings for @kbd{C-m} and @kbd{C-d} using |
| 2288 | @code{viper-add-local-keys} described in section on customization | 2288 | @code{viper-add-local-keys} described in the section on customization |
| 2289 | (@pxref{Customization}). | 2289 | (@pxref{Customization}). |
| 2290 | 2290 | ||
| 2291 | In some cases, some @emph{minor} modes might override certain essential | 2291 | In some cases, some @emph{minor} modes might override certain essential |
| @@ -2294,7 +2294,7 @@ can happen only in the beginning, when the minor mode kicks in. Typing | |||
| 2294 | @code{M-x viper-mode} will correct the situation. Viper knows about | 2294 | @code{M-x viper-mode} will correct the situation. Viper knows about |
| 2295 | several such minor modes and takes care of them, so the above trick | 2295 | several such minor modes and takes care of them, so the above trick |
| 2296 | is usually not necessary. If you find that some minor mode, e.g., | 2296 | is usually not necessary. If you find that some minor mode, e.g., |
| 2297 | @code{nasty-mode.el} interferes with Viper, putting the following in | 2297 | @code{nasty-mode} interferes with Viper, putting the following in |
| 2298 | @file{.viper} should fix the problem: | 2298 | @file{.viper} should fix the problem: |
| 2299 | @lisp | 2299 | @lisp |
| 2300 | (viper-harness-minor-mode "nasty-mode") | 2300 | (viper-harness-minor-mode "nasty-mode") |
| @@ -2305,7 +2305,7 @@ offending minor mode with the suffixes @file{.el} and @file{.elc} removed. | |||
| 2305 | 2305 | ||
| 2306 | It may not be always obvious which minor mode is at fault. The only | 2306 | It may not be always obvious which minor mode is at fault. The only |
| 2307 | guidance here is to look into the file that defines the minor mode you are | 2307 | guidance here is to look into the file that defines the minor mode you are |
| 2308 | suspecting, say @code{nasty-mode.el}, and see if it has a variable called | 2308 | suspecting, say @file{nasty-mode.el}, and see if it has a variable called |
| 2309 | @code{nasty-mode-map}. Then check if there is a statement of the form | 2309 | @code{nasty-mode-map}. Then check if there is a statement of the form |
| 2310 | @lisp | 2310 | @lisp |
| 2311 | (define-key nasty-mode-map key function) | 2311 | (define-key nasty-mode-map key function) |
| @@ -2316,6 +2316,18 @@ keys. If so, use the above line to harness @code{nasty-mode}. If your | |||
| 2316 | suspicion is wrong, no harm is done if you harness a minor mode that | 2316 | suspicion is wrong, no harm is done if you harness a minor mode that |
| 2317 | doesn't need to be harnessed. | 2317 | doesn't need to be harnessed. |
| 2318 | 2318 | ||
| 2319 | It is recommended to harness even those minor modes that don't override | ||
| 2320 | Viper keys, but still have their own keymaps. A general way to | ||
| 2321 | make a minor mode, @code{my-mode}, | ||
| 2322 | compatible with Viper is to have the file @file{my-mode.el} include the following code: | ||
| 2323 | |||
| 2324 | @lisp | ||
| 2325 | (when (fboundp 'viper-harness-minor-mode) | ||
| 2326 | (let ((lib (file-name-sans-extension | ||
| 2327 | (file-name-nondirectory load-file-name)))) | ||
| 2328 | (viper-harness-minor-mode lib))) | ||
| 2329 | @end lisp | ||
| 2330 | |||
| 2319 | @vindex @code{viper-want-emacs-keys-in-vi} | 2331 | @vindex @code{viper-want-emacs-keys-in-vi} |
| 2320 | @vindex @code{viper-want-emacs-keys-in-insert} | 2332 | @vindex @code{viper-want-emacs-keys-in-insert} |
| 2321 | @vindex @code{viper-always} | 2333 | @vindex @code{viper-always} |
| @@ -2371,11 +2383,19 @@ this in @file{~/.viper}: | |||
| 2371 | @end example | 2383 | @end example |
| 2372 | @findex @code{viper-set-searchstyle-toggling-macros} | 2384 | @findex @code{viper-set-searchstyle-toggling-macros} |
| 2373 | 2385 | ||
| 2386 | If you don't like this feature as a default, but would still like to have | ||
| 2387 | it in some major modes, you can do so by first unsetting it globally, as | ||
| 2388 | shown above, and then setting it in the desired major modes as follows: | ||
| 2389 | @example | ||
| 2390 | (viper-set-searchstyle-toggling-macros nil 'c-mode) | ||
| 2391 | (viper-set-searchstyle-toggling-macros nil 'lisp-mode) | ||
| 2392 | @end example | ||
| 2393 | |||
| 2374 | @item Vi-isms in Emacs state | 2394 | @item Vi-isms in Emacs state |
| 2375 | Some people find it useful to use the Vi-style search key, `/', to invoke | 2395 | Some people find it useful to use the Vi-style search key, `/', to invoke |
| 2376 | search in modes which Viper leaves in emacs-state. These modes are: | 2396 | search in modes which Viper leaves in emacs-state. These modes are: |
| 2377 | @code{dired-mode}, @code{mh-folder-mode}, @code{gnus-group-mode}, | 2397 | @code{dired-mode}, @code{mh-folder-mode}, |
| 2378 | @code{gnus-summary-mode}, @code{Info-mode}, and @code{Buffer-menu-mode} | 2398 | @code{Info-mode}, and @code{Buffer-menu-mode} |
| 2379 | (more may be added in the future). So, in the above modes, Viper binds `/' | 2399 | (more may be added in the future). So, in the above modes, Viper binds `/' |
| 2380 | so that it will behave Vi-style. Furthermore, in those major modes, Viper | 2400 | so that it will behave Vi-style. Furthermore, in those major modes, Viper |
| 2381 | binds `:' to invoke ex-style commands, like in vi-state. And, as described | 2401 | binds `:' to invoke ex-style commands, like in vi-state. And, as described |
| @@ -4470,6 +4490,7 @@ gviswana@@cs.wisc.edu (Guhan Viswanathan), | |||
| 4470 | gvr@@halcyon.com (George V.@: Reilly), | 4490 | gvr@@halcyon.com (George V.@: Reilly), |
| 4471 | hatazaki@@bach.convex.com (Takao Hatazaki), | 4491 | hatazaki@@bach.convex.com (Takao Hatazaki), |
| 4472 | hpz@@ibmhpz.aug.ipp-garching.mpg.de (Hans-Peter Zehrfeld), | 4492 | hpz@@ibmhpz.aug.ipp-garching.mpg.de (Hans-Peter Zehrfeld), |
| 4493 | irie@@t.email.ne.jp (Irie Tetsuya), | ||
| 4473 | jackr@@dblues.engr.sgi.com (Jack Repenning), | 4494 | jackr@@dblues.engr.sgi.com (Jack Repenning), |
| 4474 | jamesm@@bga.com (D.J.@: Miller II), | 4495 | jamesm@@bga.com (D.J.@: Miller II), |
| 4475 | jjm@@hplb.hpl.hp.com (Jean-Jacques Moreau), | 4496 | jjm@@hplb.hpl.hp.com (Jean-Jacques Moreau), |
diff --git a/src/.gdbinit b/src/.gdbinit index 358774f5bec..09c70c9ead8 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -101,6 +101,193 @@ document ppt | |||
| 101 | Print point, beg, end, narrow, and gap for current buffer. | 101 | Print point, beg, end, narrow, and gap for current buffer. |
| 102 | end | 102 | end |
| 103 | 103 | ||
| 104 | # Print out iterator given as first arg | ||
| 105 | define pitx | ||
| 106 | set $it = $arg0 | ||
| 107 | printf "cur=%d", $it->current.pos.charpos | ||
| 108 | if ($it->current.pos.charpos != $it->current.pos.bytepos) | ||
| 109 | printf "[%d]", $it->current.pos.bytepos | ||
| 110 | end | ||
| 111 | printf " start=%d", $it->start.pos.charpos | ||
| 112 | if ($it->start.pos.charpos != $it->start.pos.bytepos) | ||
| 113 | printf "[%d]", $it->start.pos.bytepos | ||
| 114 | end | ||
| 115 | printf " stop=%d ", $it->stop_charpos | ||
| 116 | output $it->what | ||
| 117 | if ($it->what == IT_CHARACTER) | ||
| 118 | if ($it->len == 1 && $it->c >= ' ' && it->c < 255) | ||
| 119 | printf "['%c']", $it->c | ||
| 120 | else | ||
| 121 | printf "[%d,%d]", $it->c, $it->len | ||
| 122 | end | ||
| 123 | end | ||
| 124 | printf " next=" | ||
| 125 | output $it->method | ||
| 126 | printf "\n" | ||
| 127 | printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, | ||
| 128 | printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y | ||
| 129 | printf " x=%d lvx=%d", $it->current_x, $it->last_visible_x | ||
| 130 | printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent | ||
| 131 | printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent | ||
| 132 | printf "\n" | ||
| 133 | end | ||
| 134 | document pitx | ||
| 135 | Pretty print a display iterator. | ||
| 136 | Take one arg, an iterator object or pointer. | ||
| 137 | end | ||
| 138 | |||
| 139 | define pit | ||
| 140 | pitx it | ||
| 141 | end | ||
| 142 | document pit | ||
| 143 | Pretty print the display iterator it. | ||
| 144 | end | ||
| 145 | |||
| 146 | define prowx | ||
| 147 | set $row = $arg0 | ||
| 148 | printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width | ||
| 149 | printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height | ||
| 150 | printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height | ||
| 151 | printf " vis=%d", $row->visible_height | ||
| 152 | printf " L=%d T=%d R=%d", $row->used[0], $row->used[1], $row->used[2] | ||
| 153 | printf "\n" | ||
| 154 | printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos | ||
| 155 | if ($row->enabled_p) | ||
| 156 | printf " ENA" | ||
| 157 | end | ||
| 158 | if ($row->displays_text_p) | ||
| 159 | printf " DISP" | ||
| 160 | end | ||
| 161 | if ($row->mode_line_p) | ||
| 162 | printf " MODEL" | ||
| 163 | end | ||
| 164 | if ($row->continued_p) | ||
| 165 | printf " CONT" | ||
| 166 | end | ||
| 167 | if ($row-> truncated_on_left_p) | ||
| 168 | printf " TRUNC:L" | ||
| 169 | end | ||
| 170 | if ($row-> truncated_on_right_p) | ||
| 171 | printf " TRUNC:R" | ||
| 172 | end | ||
| 173 | if ($row->starts_in_middle_of_char_p) | ||
| 174 | printf " STARTMID" | ||
| 175 | end | ||
| 176 | if ($row->ends_in_middle_of_char_p) | ||
| 177 | printf " ENDMID" | ||
| 178 | end | ||
| 179 | if ($row->ends_in_newline_from_string_p) | ||
| 180 | printf " ENDNLFS" | ||
| 181 | end | ||
| 182 | if ($row->ends_at_zv_p) | ||
| 183 | printf " ENDZV" | ||
| 184 | end | ||
| 185 | if ($row->overlapped_p) | ||
| 186 | printf " OLAPD" | ||
| 187 | end | ||
| 188 | if ($row->overlapping_p) | ||
| 189 | printf " OLAPNG" | ||
| 190 | end | ||
| 191 | printf "\n" | ||
| 192 | end | ||
| 193 | document prowx | ||
| 194 | Pretty print information about glyph_row. | ||
| 195 | Takes one argument, a row object or pointer. | ||
| 196 | end | ||
| 197 | |||
| 198 | define prow | ||
| 199 | prowx row | ||
| 200 | end | ||
| 201 | document prow | ||
| 202 | Pretty print information about glyph_row in row. | ||
| 203 | end | ||
| 204 | |||
| 205 | |||
| 206 | define pcursorx | ||
| 207 | set $cp = $arg0 | ||
| 208 | printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos | ||
| 209 | end | ||
| 210 | document pcursorx | ||
| 211 | Pretty print a window cursor | ||
| 212 | end | ||
| 213 | |||
| 214 | define pcursor | ||
| 215 | printf "output: " | ||
| 216 | pcursorx output_cursor | ||
| 217 | printf "\n" | ||
| 218 | end | ||
| 219 | document pcursor | ||
| 220 | Pretty print the output_cursor | ||
| 221 | end | ||
| 222 | |||
| 223 | define pwinx | ||
| 224 | set $w = $arg0 | ||
| 225 | xgetint $w->sequence_number | ||
| 226 | if ($w->mini_p != Qnil) | ||
| 227 | printf "Mini " | ||
| 228 | end | ||
| 229 | printf "Window %d ", $int | ||
| 230 | xgetptr $w->buffer | ||
| 231 | set $tem = (struct buffer *) $ptr | ||
| 232 | xgetptr $tem->name | ||
| 233 | printf "%s", ((struct Lisp_String *) $ptr)->data | ||
| 234 | printf "\n" | ||
| 235 | xgetptr $w->start | ||
| 236 | set $tem = (struct Lisp_Marker *) $ptr | ||
| 237 | printf "start=%d end:", $tem->charpos | ||
| 238 | if ($w->window_end_valid != Qnil) | ||
| 239 | xgetint $w->window_end_pos | ||
| 240 | printf "pos=%d", $int | ||
| 241 | xgetint $w->window_end_vpos | ||
| 242 | printf " vpos=%d", $int | ||
| 243 | else | ||
| 244 | printf "invalid" | ||
| 245 | end | ||
| 246 | printf " vscroll=%d", $w->vscroll | ||
| 247 | if ($w->force_start != Qnil) | ||
| 248 | printf " FORCE_START" | ||
| 249 | end | ||
| 250 | if ($w->must_be_updated_p) | ||
| 251 | printf " MUST_UPD" | ||
| 252 | end | ||
| 253 | printf "\n" | ||
| 254 | printf "cursor: " | ||
| 255 | pcursorx $w->cursor | ||
| 256 | printf " phys: " | ||
| 257 | pcursorx $w->phys_cursor | ||
| 258 | if ($w->phys_cursor_on_p) | ||
| 259 | printf " ON" | ||
| 260 | else | ||
| 261 | printf " OFF" | ||
| 262 | end | ||
| 263 | printf " blk=" | ||
| 264 | if ($w->last_cursor_off_p != $w->cursor_off_p) | ||
| 265 | if ($w->last_cursor_off_p) | ||
| 266 | printf "ON->" | ||
| 267 | else | ||
| 268 | printf "OFF->" | ||
| 269 | end | ||
| 270 | end | ||
| 271 | if ($w->cursor_off_p) | ||
| 272 | printf "ON" | ||
| 273 | else | ||
| 274 | printf "OFF" | ||
| 275 | end | ||
| 276 | printf "\n" | ||
| 277 | end | ||
| 278 | document pwinx | ||
| 279 | Pretty print a window structure. | ||
| 280 | Takes one argument, a pointer to a window structure | ||
| 281 | end | ||
| 282 | |||
| 283 | define pwin | ||
| 284 | pwinx w | ||
| 285 | end | ||
| 286 | document pwin | ||
| 287 | Pretty print window structure w. | ||
| 288 | end | ||
| 289 | |||
| 290 | |||
| 104 | define xtype | 291 | define xtype |
| 105 | xgettype $ | 292 | xgettype $ |
| 106 | output $type | 293 | output $type |
diff --git a/src/ChangeLog b/src/ChangeLog index 400946fb4d0..7c926e9b919 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,40 @@ | |||
| 1 | 2005-02-20 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (pos_visible_p): Be sure to move to the specified | ||
| 4 | position. Always get the full ascent / descent of the | ||
| 5 | corresponding row, to return reliable rtop and rbot values. | ||
| 6 | (back_to_previous_visible_line_start): Fix 2005-01-18 change. | ||
| 7 | Must look one character back, as back_to_previous_line_start | ||
| 8 | returns position after the newline. | ||
| 9 | (move_it_vertically_backward): Fix heuristic for when to move further | ||
| 10 | back in case line_height * 2/3 is larger than window height. | ||
| 11 | (cursor_row_fully_visible_p): Rename make_cursor_line_fully_visible_p | ||
| 12 | as it does not do anything anymore. Add arg current_matrix_p to | ||
| 13 | use current matrix rather than desired matrix when set. | ||
| 14 | (try_cursor_movement): Don't scroll to make cursor row fully | ||
| 15 | visible if cursor didn't move. This avoids unexpected recentering | ||
| 16 | in case of blinking cursor or accepting process output. | ||
| 17 | Use current matrix to check cursor row visibility. | ||
| 18 | (redisplay_window): Fix whether to recenter or move to top in case | ||
| 19 | cursor line is taller than window height. | ||
| 20 | (find_first_unchanged_at_end_row): Stop search if we reach a row | ||
| 21 | which not enabled (instead of abort). | ||
| 22 | |||
| 23 | 2005-02-18 Kim F. Storm <storm@cua.dk> | ||
| 24 | |||
| 25 | * xfaces.c (Finternal_set_lisp_face_attribute): Allow :color property | ||
| 26 | to be nil in a :box attribute value list; customize prints that | ||
| 27 | as lisp value when no box color is specified. | ||
| 28 | |||
| 29 | * .gdbinit (pitx, pit): Pretty print display iterator. | ||
| 30 | (prowx, prow): Pretty print glyph row. | ||
| 31 | (pcursorx, pcursor): Pretty print a window cursor. | ||
| 32 | (pwinx, pwin): Pretty print struct window. | ||
| 33 | |||
| 34 | 2005-02-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 35 | |||
| 36 | * alloc.c (BLOCK_BYTES): Harmless typo. | ||
| 37 | |||
| 1 | 2005-02-17 Andreas Schwab <schwab@suse.de> | 38 | 2005-02-17 Andreas Schwab <schwab@suse.de> |
| 2 | 39 | ||
| 3 | * xfns.c (hack_wm_protocols): Use correct type for last parameter | 40 | * xfns.c (hack_wm_protocols): Use correct type for last parameter |
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5 index 20fc4887084..5e50066bc78 100644 --- a/src/ChangeLog.5 +++ b/src/ChangeLog.5 | |||
| @@ -3405,7 +3405,7 @@ | |||
| 3405 | (UNISTD_H_INCLUDED): Don't define or test this. | 3405 | (UNISTD_H_INCLUDED): Don't define or test this. |
| 3406 | * m/ibm370aix.h (NEED_UNISTD_H): Defined. | 3406 | * m/ibm370aix.h (NEED_UNISTD_H): Defined. |
| 3407 | * s/aix3-1.h (NEED_UNISTD_H): Defined. | 3407 | * s/aix3-1.h (NEED_UNISTD_H): Defined. |
| 3408 | * s/irix4-0.h (NEED_UNISTD_H): Defined. | 3408 | * s/irix4-0.h (NEED_UNISTD_H): Define. |
| 3409 | 3409 | ||
| 3410 | * fileio.c (internal_delete_file, internal_delete_file_1): | 3410 | * fileio.c (internal_delete_file, internal_delete_file_1): |
| 3411 | New functions. | 3411 | New functions. |
| @@ -3419,7 +3419,7 @@ | |||
| 3419 | 1994-11-24 Francesco Potorti` <pot@cnuce.cnr.it> | 3419 | 1994-11-24 Francesco Potorti` <pot@cnuce.cnr.it> |
| 3420 | 3420 | ||
| 3421 | * m/delta.h (C_SWITCH_MACHINE): -inline-functions removed, | 3421 | * m/delta.h (C_SWITCH_MACHINE): -inline-functions removed, |
| 3422 | because the compiler shipped with R3V7 is not stable. | 3422 | because the compiler shipped with R3V7 is not stable. |
| 3423 | 3423 | ||
| 3424 | 1994-11-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> | 3424 | 1994-11-24 Richard Stallman <rms@mole.gnu.ai.mit.edu> |
| 3425 | 3425 | ||
| @@ -3443,7 +3443,7 @@ | |||
| 3443 | (complete_and_exit_1, complete_and_exit_2): New subroutines. | 3443 | (complete_and_exit_1, complete_and_exit_2): New subroutines. |
| 3444 | 3444 | ||
| 3445 | * s/aix4.h: New file. | 3445 | * s/aix4.h: New file. |
| 3446 | * s/aix3-1.h (AIXHFT): Defined. | 3446 | * s/aix3-1.h (AIXHFT): Define. |
| 3447 | * m/ibmrs6000.h (OBJECTS_MACHINE): Define only if AIXHFT. | 3447 | * m/ibmrs6000.h (OBJECTS_MACHINE): Define only if AIXHFT. |
| 3448 | 3448 | ||
| 3449 | * sysdep.c (init_sys_modes): Tes AIXHFT, not AIX. | 3449 | * sysdep.c (init_sys_modes): Tes AIXHFT, not AIX. |
| @@ -6451,7 +6451,7 @@ | |||
| 6451 | Add an unwind protect to restore original buffer and kill the temp. | 6451 | Add an unwind protect to restore original buffer and kill the temp. |
| 6452 | 6452 | ||
| 6453 | * sysdep.c (init_system_name): Retry gethostbyname after TRY_AGAIN | 6453 | * sysdep.c (init_system_name): Retry gethostbyname after TRY_AGAIN |
| 6454 | failure. | 6454 | failure. |
| 6455 | 6455 | ||
| 6456 | * process.c (Fopen_network_stream): | 6456 | * process.c (Fopen_network_stream): |
| 6457 | Retry gethostbyname after TRY_AGAIN failure. | 6457 | Retry gethostbyname after TRY_AGAIN failure. |
| @@ -6477,7 +6477,7 @@ | |||
| 6477 | 6477 | ||
| 6478 | * s/linux.h [emacs]: Include stdio.h. | 6478 | * s/linux.h [emacs]: Include stdio.h. |
| 6479 | 6479 | ||
| 6480 | * commands.h (unread_command_char): Declared. | 6480 | * commands.h (unread_command_char): Declare. |
| 6481 | * dispnew.c (sit_for): Return immediately if unread events exist. | 6481 | * dispnew.c (sit_for): Return immediately if unread events exist. |
| 6482 | 6482 | ||
| 6483 | 1994-07-17 Richard Stallman (rms@mole.gnu.ai.mit.edu) | 6483 | 1994-07-17 Richard Stallman (rms@mole.gnu.ai.mit.edu) |
diff --git a/src/alloc.c b/src/alloc.c index 49fc69e7058..093919fee3d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -891,12 +891,13 @@ lisp_free (block) | |||
| 891 | On glibc-2.3.2, malloc never tries to align, so a padding of 0 is best. | 891 | On glibc-2.3.2, malloc never tries to align, so a padding of 0 is best. |
| 892 | posix_memalign on the other hand would ideally prefer a value of 4 | 892 | posix_memalign on the other hand would ideally prefer a value of 4 |
| 893 | because otherwise, there's 1020 bytes wasted between each ablocks. | 893 | because otherwise, there's 1020 bytes wasted between each ablocks. |
| 894 | But testing shows that those 1020 will most of the time be efficiently | 894 | In Emacs, testing shows that those 1020 can most of the time be |
| 895 | used by malloc to place other objects, so a value of 0 is still preferable | 895 | efficiently used by malloc to place other objects, so a value of 0 can |
| 896 | unless you have a lot of cons&floats and virtually nothing else. */ | 896 | still preferable unless you have a lot of aligned blocks and virtually |
| 897 | nothing else. */ | ||
| 897 | #define BLOCK_PADDING 0 | 898 | #define BLOCK_PADDING 0 |
| 898 | #define BLOCK_BYTES \ | 899 | #define BLOCK_BYTES \ |
| 899 | (BLOCK_ALIGN - sizeof (struct aligned_block *) - BLOCK_PADDING) | 900 | (BLOCK_ALIGN - sizeof (struct ablock *) - BLOCK_PADDING) |
| 900 | 901 | ||
| 901 | /* Internal data structures and constants. */ | 902 | /* Internal data structures and constants. */ |
| 902 | 903 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 142b1fb1398..f8f97b44b3b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -859,7 +859,7 @@ static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *, | |||
| 859 | Lisp_Object)); | 859 | Lisp_Object)); |
| 860 | static void extend_face_to_end_of_line P_ ((struct it *)); | 860 | static void extend_face_to_end_of_line P_ ((struct it *)); |
| 861 | static int append_space_for_newline P_ ((struct it *, int)); | 861 | static int append_space_for_newline P_ ((struct it *, int)); |
| 862 | static int make_cursor_line_fully_visible P_ ((struct window *, int)); | 862 | static int cursor_row_fully_visible_p P_ ((struct window *, int, int)); |
| 863 | static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); | 863 | static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); |
| 864 | static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); | 864 | static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); |
| 865 | static int trailing_whitespace_p P_ ((int)); | 865 | static int trailing_whitespace_p P_ ((int)); |
| @@ -1281,8 +1281,8 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1281 | } | 1281 | } |
| 1282 | 1282 | ||
| 1283 | start_display (&it, w, top); | 1283 | start_display (&it, w, top); |
| 1284 | move_it_to (&it, charpos, 0, it.last_visible_y, -1, | 1284 | move_it_to (&it, charpos, -1, it.last_visible_y, -1, |
| 1285 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); | 1285 | MOVE_TO_POS | MOVE_TO_Y); |
| 1286 | 1286 | ||
| 1287 | /* Note that we may overshoot because of invisible text. */ | 1287 | /* Note that we may overshoot because of invisible text. */ |
| 1288 | if (IT_CHARPOS (it) >= charpos) | 1288 | if (IT_CHARPOS (it) >= charpos) |
| @@ -1306,12 +1306,13 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1306 | } | 1306 | } |
| 1307 | } | 1307 | } |
| 1308 | } | 1308 | } |
| 1309 | else if (it.current_y + it.max_ascent + it.max_descent > it.last_visible_y) | 1309 | else |
| 1310 | { | 1310 | { |
| 1311 | struct it it2; | 1311 | struct it it2; |
| 1312 | 1312 | ||
| 1313 | it2 = it; | 1313 | it2 = it; |
| 1314 | move_it_by_lines (&it, 1, 0); | 1314 | if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n') |
| 1315 | move_it_by_lines (&it, 1, 0); | ||
| 1315 | if (charpos < IT_CHARPOS (it)) | 1316 | if (charpos < IT_CHARPOS (it)) |
| 1316 | { | 1317 | { |
| 1317 | visible_p = 1; | 1318 | visible_p = 1; |
| @@ -1322,8 +1323,9 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1322 | *y = it2.current_y + it2.max_ascent - it2.ascent; | 1323 | *y = it2.current_y + it2.max_ascent - it2.ascent; |
| 1323 | if (rtop) | 1324 | if (rtop) |
| 1324 | { | 1325 | { |
| 1325 | *rtop = 0; | 1326 | *rtop = max (0, -it2.current_y); |
| 1326 | *rbot = max (0, (it2.current_y + it2.max_ascent + it2.max_descent) - it.last_visible_y); | 1327 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) |
| 1328 | - it.last_visible_y)); | ||
| 1327 | } | 1329 | } |
| 1328 | } | 1330 | } |
| 1329 | } | 1331 | } |
| @@ -4693,27 +4695,31 @@ back_to_previous_visible_line_start (it) | |||
| 4693 | /* If newline has a display property that replaces the newline with something | 4695 | /* If newline has a display property that replaces the newline with something |
| 4694 | else (image or text), find start of overlay or interval and continue search | 4696 | else (image or text), find start of overlay or interval and continue search |
| 4695 | from that point. */ | 4697 | from that point. */ |
| 4696 | { | 4698 | if (IT_CHARPOS (*it) > BEGV) |
| 4697 | struct it it2 = *it; | 4699 | { |
| 4698 | int pos = IT_CHARPOS (*it); | 4700 | struct it it2 = *it; |
| 4699 | int beg, end; | 4701 | int pos; |
| 4700 | Lisp_Object val, overlay; | 4702 | int beg, end; |
| 4701 | 4703 | Lisp_Object val, overlay; | |
| 4702 | it2.sp = 0; | 4704 | |
| 4703 | if (handle_display_prop (&it2) == HANDLED_RETURN | 4705 | pos = --IT_CHARPOS (it2); |
| 4704 | && !NILP (val = get_char_property_and_overlay | 4706 | --IT_BYTEPOS (it2); |
| 4705 | (make_number (pos), Qdisplay, Qnil, &overlay)) | 4707 | it2.sp = 0; |
| 4706 | && (OVERLAYP (overlay) | 4708 | if (handle_display_prop (&it2) == HANDLED_RETURN |
| 4707 | ? (beg = OVERLAY_POSITION (OVERLAY_START (overlay))) | 4709 | && !NILP (val = get_char_property_and_overlay |
| 4708 | : get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil))) | 4710 | (make_number (pos), Qdisplay, Qnil, &overlay)) |
| 4709 | { | 4711 | && (OVERLAYP (overlay) |
| 4710 | if (beg < BEGV) | 4712 | ? (beg = OVERLAY_POSITION (OVERLAY_START (overlay))) |
| 4711 | beg = BEGV; | 4713 | : get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil))) |
| 4712 | IT_CHARPOS (*it) = beg; | 4714 | { |
| 4713 | IT_BYTEPOS (*it) = buf_charpos_to_bytepos (current_buffer, beg); | 4715 | if (beg < BEGV) |
| 4714 | continue; | 4716 | beg = BEGV; |
| 4715 | } | 4717 | IT_CHARPOS (*it) = beg; |
| 4716 | } | 4718 | IT_BYTEPOS (*it) = buf_charpos_to_bytepos (current_buffer, beg); |
| 4719 | continue; | ||
| 4720 | } | ||
| 4721 | } | ||
| 4722 | |||
| 4717 | break; | 4723 | break; |
| 4718 | } | 4724 | } |
| 4719 | 4725 | ||
| @@ -6326,7 +6332,8 @@ move_it_vertically_backward (it, dy) | |||
| 6326 | a line height of 13 pixels each, recentering with point | 6332 | a line height of 13 pixels each, recentering with point |
| 6327 | on the bottom line will try to move -39/2 = 19 pixels | 6333 | on the bottom line will try to move -39/2 = 19 pixels |
| 6328 | backward. Try to avoid moving into the first line. */ | 6334 | backward. Try to avoid moving into the first line. */ |
| 6329 | && it->current_y - target_y > line_height * 2 / 3 | 6335 | && (it->current_y - target_y |
| 6336 | > min (window_box_height (it->w), line_height * 2 / 3)) | ||
| 6330 | && IT_CHARPOS (*it) > BEGV) | 6337 | && IT_CHARPOS (*it) > BEGV) |
| 6331 | { | 6338 | { |
| 6332 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", | 6339 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", |
| @@ -11084,7 +11091,7 @@ run_window_scroll_functions (window, startp) | |||
| 11084 | as if point had gone off the screen. */ | 11091 | as if point had gone off the screen. */ |
| 11085 | 11092 | ||
| 11086 | static int | 11093 | static int |
| 11087 | make_cursor_line_fully_visible (w, force_p) | 11094 | cursor_row_fully_visible_p (w, force_p, current_matrix_p) |
| 11088 | struct window *w; | 11095 | struct window *w; |
| 11089 | int force_p; | 11096 | int force_p; |
| 11090 | { | 11097 | { |
| @@ -11100,7 +11107,7 @@ make_cursor_line_fully_visible (w, force_p) | |||
| 11100 | if (w->cursor.vpos < 0) | 11107 | if (w->cursor.vpos < 0) |
| 11101 | return 1; | 11108 | return 1; |
| 11102 | 11109 | ||
| 11103 | matrix = w->desired_matrix; | 11110 | matrix = current_matrix_p ? w->current_matrix : w->desired_matrix; |
| 11104 | row = MATRIX_ROW (matrix, w->cursor.vpos); | 11111 | row = MATRIX_ROW (matrix, w->cursor.vpos); |
| 11105 | 11112 | ||
| 11106 | /* If the cursor row is not partially visible, there's nothing to do. */ | 11113 | /* If the cursor row is not partially visible, there's nothing to do. */ |
| @@ -11405,7 +11412,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11405 | 11412 | ||
| 11406 | /* If cursor ends up on a partially visible line, | 11413 | /* If cursor ends up on a partially visible line, |
| 11407 | treat that as being off the bottom of the screen. */ | 11414 | treat that as being off the bottom of the screen. */ |
| 11408 | if (! make_cursor_line_fully_visible (w, extra_scroll_margin_lines <= 1)) | 11415 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) |
| 11409 | { | 11416 | { |
| 11410 | clear_glyph_matrix (w->desired_matrix); | 11417 | clear_glyph_matrix (w->desired_matrix); |
| 11411 | ++extra_scroll_margin_lines; | 11418 | ++extra_scroll_margin_lines; |
| @@ -11675,6 +11682,12 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11675 | && CHARPOS (startp) != BEGV) | 11682 | && CHARPOS (startp) != BEGV) |
| 11676 | scroll_p = 1; | 11683 | scroll_p = 1; |
| 11677 | } | 11684 | } |
| 11685 | else | ||
| 11686 | { | ||
| 11687 | /* Cursor did not move. So don't scroll even if cursor line | ||
| 11688 | is partially visible, as it was so before. */ | ||
| 11689 | rc = CURSOR_MOVEMENT_SUCCESS; | ||
| 11690 | } | ||
| 11678 | 11691 | ||
| 11679 | if (PT < MATRIX_ROW_START_CHARPOS (row) | 11692 | if (PT < MATRIX_ROW_START_CHARPOS (row) |
| 11680 | || PT > MATRIX_ROW_END_CHARPOS (row)) | 11693 | || PT > MATRIX_ROW_END_CHARPOS (row)) |
| @@ -11682,7 +11695,8 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11682 | /* if PT is not in the glyph row, give up. */ | 11695 | /* if PT is not in the glyph row, give up. */ |
| 11683 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 11696 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 11684 | } | 11697 | } |
| 11685 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) | 11698 | else if (rc != CURSOR_MOVEMENT_SUCCESS |
| 11699 | && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) | ||
| 11686 | && make_cursor_line_fully_visible_p) | 11700 | && make_cursor_line_fully_visible_p) |
| 11687 | { | 11701 | { |
| 11688 | if (PT == MATRIX_ROW_END_CHARPOS (row) | 11702 | if (PT == MATRIX_ROW_END_CHARPOS (row) |
| @@ -11701,7 +11715,7 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11701 | else | 11715 | else |
| 11702 | { | 11716 | { |
| 11703 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 11717 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 11704 | if (!make_cursor_line_fully_visible (w, 0)) | 11718 | if (!cursor_row_fully_visible_p (w, 0, 1)) |
| 11705 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 11719 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 11706 | else | 11720 | else |
| 11707 | rc = CURSOR_MOVEMENT_SUCCESS; | 11721 | rc = CURSOR_MOVEMENT_SUCCESS; |
| @@ -11788,7 +11802,7 @@ redisplay_window (window, just_this_one_p) | |||
| 11788 | int temp_scroll_step = 0; | 11802 | int temp_scroll_step = 0; |
| 11789 | int count = SPECPDL_INDEX (); | 11803 | int count = SPECPDL_INDEX (); |
| 11790 | int rc; | 11804 | int rc; |
| 11791 | int centering_position; | 11805 | int centering_position = -1; |
| 11792 | int last_line_misfit = 0; | 11806 | int last_line_misfit = 0; |
| 11793 | 11807 | ||
| 11794 | SET_TEXT_POS (lpoint, PT, PT_BYTE); | 11808 | SET_TEXT_POS (lpoint, PT, PT_BYTE); |
| @@ -12034,7 +12048,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12034 | new_vpos = window_box_height (w) / 2; | 12048 | new_vpos = window_box_height (w) / 2; |
| 12035 | } | 12049 | } |
| 12036 | 12050 | ||
| 12037 | if (!make_cursor_line_fully_visible (w, 0)) | 12051 | if (!cursor_row_fully_visible_p (w, 0, 0)) |
| 12038 | { | 12052 | { |
| 12039 | /* Point does appear, but on a line partly visible at end of window. | 12053 | /* Point does appear, but on a line partly visible at end of window. |
| 12040 | Move it back to a fully-visible line. */ | 12054 | Move it back to a fully-visible line. */ |
| @@ -12171,7 +12185,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12171 | /* Forget any recorded base line for line number display. */ | 12185 | /* Forget any recorded base line for line number display. */ |
| 12172 | w->base_line_number = Qnil; | 12186 | w->base_line_number = Qnil; |
| 12173 | 12187 | ||
| 12174 | if (!make_cursor_line_fully_visible (w, 1)) | 12188 | if (!cursor_row_fully_visible_p (w, 1, 0)) |
| 12175 | { | 12189 | { |
| 12176 | clear_glyph_matrix (w->desired_matrix); | 12190 | clear_glyph_matrix (w->desired_matrix); |
| 12177 | last_line_misfit = 1; | 12191 | last_line_misfit = 1; |
| @@ -12231,10 +12245,8 @@ redisplay_window (window, just_this_one_p) | |||
| 12231 | /* Finally, just choose place to start which centers point */ | 12245 | /* Finally, just choose place to start which centers point */ |
| 12232 | 12246 | ||
| 12233 | recenter: | 12247 | recenter: |
| 12234 | centering_position = window_box_height (w) / 2; | 12248 | if (centering_position < 0) |
| 12235 | 12249 | centering_position = window_box_height (w) / 2; | |
| 12236 | point_at_top: | ||
| 12237 | /* Jump here with centering_position already set to 0. */ | ||
| 12238 | 12250 | ||
| 12239 | #if GLYPH_DEBUG | 12251 | #if GLYPH_DEBUG |
| 12240 | debug_method_add (w, "recenter"); | 12252 | debug_method_add (w, "recenter"); |
| @@ -12331,7 +12343,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12331 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 12343 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 12332 | } | 12344 | } |
| 12333 | 12345 | ||
| 12334 | if (!make_cursor_line_fully_visible (w, centering_position > 0)) | 12346 | if (!cursor_row_fully_visible_p (w, 0, 0)) |
| 12335 | { | 12347 | { |
| 12336 | /* If vscroll is enabled, disable it and try again. */ | 12348 | /* If vscroll is enabled, disable it and try again. */ |
| 12337 | if (w->vscroll) | 12349 | if (w->vscroll) |
| @@ -12346,9 +12358,10 @@ redisplay_window (window, just_this_one_p) | |||
| 12346 | visible, if it can be done. */ | 12358 | visible, if it can be done. */ |
| 12347 | if (centering_position == 0) | 12359 | if (centering_position == 0) |
| 12348 | goto done; | 12360 | goto done; |
| 12361 | |||
| 12349 | clear_glyph_matrix (w->desired_matrix); | 12362 | clear_glyph_matrix (w->desired_matrix); |
| 12350 | centering_position = 0; | 12363 | centering_position = 0; |
| 12351 | goto point_at_top; | 12364 | goto recenter; |
| 12352 | } | 12365 | } |
| 12353 | 12366 | ||
| 12354 | done: | 12367 | done: |
| @@ -13136,8 +13149,10 @@ find_first_unchanged_at_end_row (w, delta, delta_bytes) | |||
| 13136 | starts at a minimum position >= last_unchanged_pos_old. */ | 13149 | starts at a minimum position >= last_unchanged_pos_old. */ |
| 13137 | for (; row > first_text_row; --row) | 13150 | for (; row > first_text_row; --row) |
| 13138 | { | 13151 | { |
| 13152 | /* This used to abort, but it can happen. | ||
| 13153 | It is ok to just stop the search instead here. KFS. */ | ||
| 13139 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) | 13154 | if (!row->enabled_p || !MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 13140 | abort (); | 13155 | break; |
| 13141 | 13156 | ||
| 13142 | if (MATRIX_ROW_START_CHARPOS (row) >= last_unchanged_pos_old) | 13157 | if (MATRIX_ROW_START_CHARPOS (row) >= last_unchanged_pos_old) |
| 13143 | row_found = row; | 13158 | row_found = row; |
diff --git a/src/xfaces.c b/src/xfaces.c index 9b2d5731508..025139377aa 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4151,7 +4151,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4151 | } | 4151 | } |
| 4152 | else if (EQ (k, QCcolor)) | 4152 | else if (EQ (k, QCcolor)) |
| 4153 | { | 4153 | { |
| 4154 | if (!STRINGP (v) || SCHARS (v) == 0) | 4154 | if (!NILP (v) && (!STRINGP (v) || SCHARS (v) == 0)) |
| 4155 | break; | 4155 | break; |
| 4156 | } | 4156 | } |
| 4157 | else if (EQ (k, QCstyle)) | 4157 | else if (EQ (k, QCstyle)) |