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 /lisp | |
| 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
Diffstat (limited to 'lisp')
39 files changed, 716 insertions, 219 deletions
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 | ||