diff options
| author | Miles Bader | 2007-05-26 21:55:39 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-05-26 21:55:39 +0000 |
| commit | 3a4336e6def99c0e15e2f9ae36e6f31b3d6dad69 (patch) | |
| tree | 8db6743f0f1118a867ad67faa542ecccecdeb89d | |
| parent | 779903bd6e149edae6131f84f2a1ac069ef50b2e (diff) | |
| parent | 3b8c0c70a77c4f580672552b796f46ac07e65867 (diff) | |
| download | emacs-3a4336e6def99c0e15e2f9ae36e6f31b3d6dad69.tar.gz emacs-3a4336e6def99c0e15e2f9ae36e6f31b3d6dad69.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 773)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-211
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 28 | ||||
| -rw-r--r-- | lisp/bs.el | 9 | ||||
| -rw-r--r-- | lisp/composite.el | 12 | ||||
| -rw-r--r-- | lisp/cus-dep.el | 2 | ||||
| -rw-r--r-- | lisp/disp-table.el | 4 | ||||
| -rw-r--r-- | lisp/ediff-init.el | 14 | ||||
| -rw-r--r-- | lisp/ediff-util.el | 12 | ||||
| -rw-r--r-- | lisp/edmacro.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/copyright.el | 33 | ||||
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 6 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 29 |
13 files changed, 113 insertions, 50 deletions
| @@ -34,6 +34,10 @@ with a prefix argument or by typing C-u C-h C-n. | |||
| 34 | 34 | ||
| 35 | * Changes in Specialized Modes and Packages in Emacs 23.1 | 35 | * Changes in Specialized Modes and Packages in Emacs 23.1 |
| 36 | 36 | ||
| 37 | ** In the `copyright' package, you can specify your copyright holders's names. | ||
| 38 | Only copyright lines with holders matching copyright-names-regexp will be | ||
| 39 | considered for update. | ||
| 40 | |||
| 37 | 41 | ||
| 38 | * Changes in Emacs 23.1 on non-free operating systems | 42 | * Changes in Emacs 23.1 on non-free operating systems |
| 39 | 43 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be975f67e99..0d1d4d59110 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2007-05-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/derived.el (define-derived-mode): Remove bogus | ||
| 4 | compatibiity code. | ||
| 5 | |||
| 6 | * emacs-lisp/copyright.el (copyright-names-regexp): New var. | ||
| 7 | (copyright-update-year): Use it. | ||
| 8 | |||
| 9 | * edmacro.el (edmacro-format-keys): Use current-active-maps. | ||
| 10 | |||
| 11 | * ediff-init.el (ediff-defvar-local, ediff-with-current-buffer): | ||
| 12 | Add indentation and debugging info. Fix up comment convention. | ||
| 13 | |||
| 14 | * cus-dep.el (custom-make-dependencies): Simplify. | ||
| 15 | |||
| 16 | * composite.el (compose-region, decompose-region): | ||
| 17 | Use inhibit-read-only and restore-buffer-modified-p. | ||
| 18 | |||
| 19 | * xt-mouse.el (xterm-mouse-truncate-wrap): New function. | ||
| 20 | (xterm-mouse-event): Use it. | ||
| 21 | |||
| 22 | 2007-05-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 23 | |||
| 24 | * bs.el (bs-cycle-previous): Don't modify the cycle list until | ||
| 25 | `switch-to-buffer' has returned succesfully. | ||
| 26 | (bs-cycle-next): Ditto. Also, don't bury the buffer when the | ||
| 27 | window is dedicated (it could iconify the frame). | ||
| 28 | |||
| 1 | 2007-05-25 Miles Bader <miles@fencepost.gnu.org> | 29 | 2007-05-25 Miles Bader <miles@fencepost.gnu.org> |
| 2 | 30 | ||
| 3 | * vc-hooks.el (vc-find-root): Fix file attribute test. | 31 | * vc-hooks.el (vc-find-root): Fix file attribute test. |
diff --git a/lisp/bs.el b/lisp/bs.el index b1fa47100f0..5951d129d96 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -1221,10 +1221,13 @@ by buffer configuration `bs-cycle-configuration-name'." | |||
| 1221 | bs--cycle-list))) | 1221 | bs--cycle-list))) |
| 1222 | (next (car tupel)) | 1222 | (next (car tupel)) |
| 1223 | (cycle-list (cdr tupel))) | 1223 | (cycle-list (cdr tupel))) |
| 1224 | (unless (window-dedicated-p (selected-window)) | ||
| 1225 | ;; We don't want the frame iconified if the only window in the frame | ||
| 1226 | ;; happens to be dedicated; let's get the error from switch-to-buffer | ||
| 1227 | (bury-buffer)) | ||
| 1228 | (switch-to-buffer next) | ||
| 1224 | (setq bs--cycle-list (append (cdr cycle-list) | 1229 | (setq bs--cycle-list (append (cdr cycle-list) |
| 1225 | (list (car cycle-list)))) | 1230 | (list (car cycle-list)))) |
| 1226 | (bury-buffer) | ||
| 1227 | (switch-to-buffer next) | ||
| 1228 | (bs-message-without-log "Next buffers: %s" | 1231 | (bs-message-without-log "Next buffers: %s" |
| 1229 | (or (cdr bs--cycle-list) | 1232 | (or (cdr bs--cycle-list) |
| 1230 | "this buffer")))))) | 1233 | "this buffer")))))) |
| @@ -1251,9 +1254,9 @@ by buffer configuration `bs-cycle-configuration-name'." | |||
| 1251 | bs--cycle-list))) | 1254 | bs--cycle-list))) |
| 1252 | (prev-buffer (car tupel)) | 1255 | (prev-buffer (car tupel)) |
| 1253 | (cycle-list (cdr tupel))) | 1256 | (cycle-list (cdr tupel))) |
| 1257 | (switch-to-buffer prev-buffer) | ||
| 1254 | (setq bs--cycle-list (append (last cycle-list) | 1258 | (setq bs--cycle-list (append (last cycle-list) |
| 1255 | (reverse (cdr (reverse cycle-list))))) | 1259 | (reverse (cdr (reverse cycle-list))))) |
| 1256 | (switch-to-buffer prev-buffer) | ||
| 1257 | (bs-message-without-log "Previous buffers: %s" | 1260 | (bs-message-without-log "Previous buffers: %s" |
| 1258 | (or (reverse (cdr bs--cycle-list)) | 1261 | (or (reverse (cdr bs--cycle-list)) |
| 1259 | "this buffer")))))) | 1262 | "this buffer")))))) |
diff --git a/lisp/composite.el b/lisp/composite.el index b5da251bb85..99cbd85cf01 100644 --- a/lisp/composite.el +++ b/lisp/composite.el | |||
| @@ -214,7 +214,7 @@ adjust the composition when it gets invalid because of a change of | |||
| 214 | text in the composition." | 214 | text in the composition." |
| 215 | (interactive "r") | 215 | (interactive "r") |
| 216 | (let ((modified-p (buffer-modified-p)) | 216 | (let ((modified-p (buffer-modified-p)) |
| 217 | (buffer-read-only nil)) | 217 | (inhibit-read-only t)) |
| 218 | (if (or (vectorp components) (listp components)) | 218 | (if (or (vectorp components) (listp components)) |
| 219 | (setq components (encode-composition-components components))) | 219 | (setq components (encode-composition-components components))) |
| 220 | (compose-region-internal start end components modification-func) | 220 | (compose-region-internal start end components modification-func) |
| @@ -227,9 +227,9 @@ When called from a program, expects two arguments, | |||
| 227 | positions (integers or markers) specifying the region." | 227 | positions (integers or markers) specifying the region." |
| 228 | (interactive "r") | 228 | (interactive "r") |
| 229 | (let ((modified-p (buffer-modified-p)) | 229 | (let ((modified-p (buffer-modified-p)) |
| 230 | (buffer-read-only nil)) | 230 | (inhibit-read-only t)) |
| 231 | (remove-text-properties start end '(composition nil)) | 231 | (remove-text-properties start end '(composition nil)) |
| 232 | (set-buffer-modified-p modified-p))) | 232 | (restore-buffer-modified-p modified-p))) |
| 233 | 233 | ||
| 234 | (defun compose-string (string &optional start end components modification-func) | 234 | (defun compose-string (string &optional start end components modification-func) |
| 235 | "Compose characters in string STRING. | 235 | "Compose characters in string STRING. |
| @@ -648,8 +648,8 @@ With arg, enable it iff arg is positive." | |||
| 648 | (set-buffer-modified-p modified-p)))) | 648 | (set-buffer-modified-p modified-p)))) |
| 649 | 649 | ||
| 650 | 650 | ||
| 651 | ;;; The following codes are only for backward compatibility with Emacs | 651 | ;; The following codes are only for backward compatibility with Emacs |
| 652 | ;;; 20.4 and earlier. | 652 | ;; 20.4 and earlier. |
| 653 | 653 | ||
| 654 | (defun decompose-composite-char (char &optional type with-composition-rule) | 654 | (defun decompose-composite-char (char &optional type with-composition-rule) |
| 655 | "Convert CHAR to string. | 655 | "Convert CHAR to string. |
| @@ -666,5 +666,5 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored." | |||
| 666 | 666 | ||
| 667 | 667 | ||
| 668 | 668 | ||
| 669 | ;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 | 669 | ;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 |
| 670 | ;;; composite.el ends here | 670 | ;;; composite.el ends here |
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 713b84f8bc0..98af13cec69 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el | |||
| @@ -141,7 +141,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" | |||
| 141 | (member where | 141 | (member where |
| 142 | (cdr (assoc version version-alist))) | 142 | (cdr (assoc version version-alist))) |
| 143 | (push where (cdr (assoc version version-alist)))) | 143 | (push where (cdr (assoc version version-alist)))) |
| 144 | (push (cons version (list where)) version-alist))) | 144 | (push (list version where) version-alist))) |
| 145 | ;; This is a group | 145 | ;; This is a group |
| 146 | (insert "(custom-put-if-not '" (symbol-name symbol) | 146 | (insert "(custom-put-if-not '" (symbol-name symbol) |
| 147 | " 'custom-version ") | 147 | " 'custom-version ") |
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index dbe67dacb39..15231b084ed 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -220,7 +220,7 @@ with either the `--unibyte' option or the EMACS_UNIBYTE environment | |||
| 220 | variable, or else customize `enable-multibyte-characters'. | 220 | variable, or else customize `enable-multibyte-characters'. |
| 221 | 221 | ||
| 222 | With prefix argument, this command enables European character display | 222 | With prefix argument, this command enables European character display |
| 223 | if arg is positive, disables it otherwise. Otherwise, it toggles | 223 | if ARG is positive, disables it otherwise. Otherwise, it toggles |
| 224 | European character display. | 224 | European character display. |
| 225 | 225 | ||
| 226 | When this mode is enabled, characters in the range of 160 to 255 | 226 | When this mode is enabled, characters in the range of 160 to 255 |
| @@ -264,5 +264,5 @@ for users who call this function in `.emacs'." | |||
| 264 | 264 | ||
| 265 | (provide 'disp-table) | 265 | (provide 'disp-table) |
| 266 | 266 | ||
| 267 | ;;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7 | 267 | ;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7 |
| 268 | ;;; disp-table.el ends here | 268 | ;;; disp-table.el ends here |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 0ecc809797f..d37096f9e89 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -110,6 +110,7 @@ that Ediff doesn't know about.") | |||
| 110 | ;; | 110 | ;; |
| 111 | ;; Plagiarised from `emerge-defvar-local' for XEmacs. | 111 | ;; Plagiarised from `emerge-defvar-local' for XEmacs. |
| 112 | (defmacro ediff-defvar-local (var value doc) | 112 | (defmacro ediff-defvar-local (var value doc) |
| 113 | (declare (indent defun)) | ||
| 113 | `(progn | 114 | `(progn |
| 114 | (defvar ,var ,value ,doc) | 115 | (defvar ,var ,value ,doc) |
| 115 | (make-variable-buffer-local ',var) | 116 | (make-variable-buffer-local ',var) |
| @@ -258,6 +259,7 @@ It needs to be killed when we quit the session.") | |||
| 258 | ;; Doesn't save the point and mark. | 259 | ;; Doesn't save the point and mark. |
| 259 | ;; This is `with-current-buffer' with the added test for live buffers." | 260 | ;; This is `with-current-buffer' with the added test for live buffers." |
| 260 | (defmacro ediff-with-current-buffer (buffer &rest body) | 261 | (defmacro ediff-with-current-buffer (buffer &rest body) |
| 262 | (declare (indent 1) (debug (form body))) | ||
| 261 | `(if (ediff-buffer-live-p ,buffer) | 263 | `(if (ediff-buffer-live-p ,buffer) |
| 262 | (save-current-buffer | 264 | (save-current-buffer |
| 263 | (set-buffer ,buffer) | 265 | (set-buffer ,buffer) |
| @@ -1873,11 +1875,11 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 1873 | 1875 | ||
| 1874 | 1876 | ||
| 1875 | 1877 | ||
| 1876 | ;;; Local Variables: | 1878 | ;; Local Variables: |
| 1877 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) | 1879 | ;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
| 1878 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) | 1880 | ;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
| 1879 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 1881 | ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 1880 | ;;; End: | 1882 | ;; End: |
| 1881 | 1883 | ||
| 1882 | ;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 | 1884 | ;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 |
| 1883 | ;;; ediff-init.el ends here | 1885 | ;;; ediff-init.el ends here |
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 7483128b71a..34af5cc146b 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -4315,11 +4315,11 @@ Mail anyway? (y or n) ") | |||
| 4315 | (provide 'ediff-util) | 4315 | (provide 'ediff-util) |
| 4316 | 4316 | ||
| 4317 | 4317 | ||
| 4318 | ;;; Local Variables: | 4318 | ;; Local Variables: |
| 4319 | ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) | 4319 | ;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
| 4320 | ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) | 4320 | ;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) |
| 4321 | ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) | 4321 | ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) |
| 4322 | ;;; End: | 4322 | ;; End: |
| 4323 | 4323 | ||
| 4324 | ;;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879 | 4324 | ;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879 |
| 4325 | ;;; ediff-util.el ends here | 4325 | ;;; ediff-util.el ends here |
diff --git a/lisp/edmacro.el b/lisp/edmacro.el index e21dbaa8f35..86a26b9b714 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el | |||
| @@ -430,10 +430,7 @@ doubt, use whitespace." | |||
| 430 | 430 | ||
| 431 | (defun edmacro-format-keys (macro &optional verbose) | 431 | (defun edmacro-format-keys (macro &optional verbose) |
| 432 | (setq macro (edmacro-fix-menu-commands macro)) | 432 | (setq macro (edmacro-fix-menu-commands macro)) |
| 433 | (let* ((maps (append (current-minor-mode-maps) | 433 | (let* ((maps (current-active-maps)) |
| 434 | (if (current-local-map) | ||
| 435 | (list (current-local-map))) | ||
| 436 | (list (current-global-map)))) | ||
| 437 | (pkeys '(end-macro ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?\C-u | 434 | (pkeys '(end-macro ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?\C-u |
| 438 | ?\M-- ?\M-0 ?\M-1 ?\M-2 ?\M-3 ?\M-4 ?\M-5 ?\M-6 | 435 | ?\M-- ?\M-0 ?\M-1 ?\M-2 ?\M-3 ?\M-4 ?\M-5 ?\M-6 |
| 439 | ?\M-7 ?\M-8 ?\M-9)) | 436 | ?\M-7 ?\M-8 ?\M-9)) |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 5e37e275632..7fbcc87b8b1 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -563,8 +563,9 @@ directory or directories specified." | |||
| 563 | (defun batch-update-autoloads () | 563 | (defun batch-update-autoloads () |
| 564 | "Update loaddefs.el autoloads in batch mode. | 564 | "Update loaddefs.el autoloads in batch mode. |
| 565 | Calls `update-directory-autoloads' on the command line arguments." | 565 | Calls `update-directory-autoloads' on the command line arguments." |
| 566 | (apply 'update-directory-autoloads command-line-args-left) | 566 | (let ((args command-line-args-left)) |
| 567 | (setq command-line-args-left nil)) | 567 | (setq command-line-args-left nil) |
| 568 | (apply 'update-directory-autoloads args))) | ||
| 568 | 569 | ||
| 569 | (provide 'autoload) | 570 | (provide 'autoload) |
| 570 | 571 | ||
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index c7194a096e1..d4501bd57b0 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | :group 'tools) | 37 | :group 'tools) |
| 38 | 38 | ||
| 39 | (defcustom copyright-limit 2000 | 39 | (defcustom copyright-limit 2000 |
| 40 | "*Don't try to update copyright beyond this position unless interactive. | 40 | "Don't try to update copyright beyond this position unless interactive. |
| 41 | A value of nil means to search whole buffer." | 41 | A value of nil means to search whole buffer." |
| 42 | :group 'copyright | 42 | :group 'copyright |
| 43 | :type '(choice (integer :tag "Limit") | 43 | :type '(choice (integer :tag "Limit") |
| @@ -47,21 +47,28 @@ A value of nil means to search whole buffer." | |||
| 47 | "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ | 47 | "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ |
| 48 | \\|[Cc]opyright\\s *:?\\s *©\\)\ | 48 | \\|[Cc]opyright\\s *:?\\s *©\\)\ |
| 49 | \\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" | 49 | \\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" |
| 50 | "*What your copyright notice looks like. | 50 | "What your copyright notice looks like. |
| 51 | The second \\( \\) construct must match the years." | 51 | The second \\( \\) construct must match the years." |
| 52 | :group 'copyright | 52 | :group 'copyright |
| 53 | :type 'regexp) | 53 | :type 'regexp) |
| 54 | 54 | ||
| 55 | (defcustom copyright-names-regexp "" | ||
| 56 | "Regexp matching the names which correspond to the user. | ||
| 57 | Only copyright lines where the name matches this regexp will be updated. | ||
| 58 | This allows you to avoid adding yars to a copyright notice belonging to | ||
| 59 | someone else or to a group for which you do not work." | ||
| 60 | :type 'regexp) | ||
| 61 | |||
| 55 | (defcustom copyright-years-regexp | 62 | (defcustom copyright-years-regexp |
| 56 | "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" | 63 | "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" |
| 57 | "*Match additional copyright notice years. | 64 | "Match additional copyright notice years. |
| 58 | The second \\( \\) construct must match the years." | 65 | The second \\( \\) construct must match the years." |
| 59 | :group 'copyright | 66 | :group 'copyright |
| 60 | :type 'regexp) | 67 | :type 'regexp) |
| 61 | 68 | ||
| 62 | 69 | ||
| 63 | (defcustom copyright-query 'function | 70 | (defcustom copyright-query 'function |
| 64 | "*If non-nil, ask user before changing copyright. | 71 | "If non-nil, ask user before changing copyright. |
| 65 | When this is `function', only ask when called non-interactively." | 72 | When this is `function', only ask when called non-interactively." |
| 66 | :group 'copyright | 73 | :group 'copyright |
| 67 | :type '(choice (const :tag "Do not ask") | 74 | :type '(choice (const :tag "Do not ask") |
| @@ -81,7 +88,17 @@ When this is `function', only ask when called non-interactively." | |||
| 81 | "String representing the current year.") | 88 | "String representing the current year.") |
| 82 | 89 | ||
| 83 | (defun copyright-update-year (replace noquery) | 90 | (defun copyright-update-year (replace noquery) |
| 84 | (when (re-search-forward copyright-regexp (+ (point) copyright-limit) t) | 91 | (when |
| 92 | (condition-case err | ||
| 93 | (re-search-forward (concat "\\(" copyright-regexp | ||
| 94 | "\\)\\([ \t]*\n\\)?.*\\(?:" | ||
| 95 | copyright-names-regexp "\\)") | ||
| 96 | (+ (point) copyright-limit) t) | ||
| 97 | ;; In case the regexp is rejected. This is useful because | ||
| 98 | ;; copyright-update is typically called from before-save-hook where | ||
| 99 | ;; such an error is very inconvenient for the user. | ||
| 100 | (error (message "Can't update copyright: %s" err) nil)) | ||
| 101 | (goto-char (match-end 1)) | ||
| 85 | ;; If the years are continued onto multiple lined | 102 | ;; If the years are continued onto multiple lined |
| 86 | ;; that are marked as comments, skip to the end of the years anyway. | 103 | ;; that are marked as comments, skip to the end of the years anyway. |
| 87 | (while (save-excursion | 104 | (while (save-excursion |
| @@ -92,7 +109,7 @@ When this is `function', only ask when called non-interactively." | |||
| 92 | (save-match-data | 109 | (save-match-data |
| 93 | (forward-line 1) | 110 | (forward-line 1) |
| 94 | (and (looking-at comment-start-skip) | 111 | (and (looking-at comment-start-skip) |
| 95 | (goto-char (match-end 0)))) | 112 | (goto-char (match-end 1)))) |
| 96 | (save-match-data | 113 | (save-match-data |
| 97 | (looking-at copyright-years-regexp)))) | 114 | (looking-at copyright-years-regexp)))) |
| 98 | (forward-line 1) | 115 | (forward-line 1) |
| @@ -101,7 +118,7 @@ When this is `function', only ask when called non-interactively." | |||
| 101 | 118 | ||
| 102 | ;; Note that `current-time-string' isn't locale-sensitive. | 119 | ;; Note that `current-time-string' isn't locale-sensitive. |
| 103 | (setq copyright-current-year (substring (current-time-string) -4)) | 120 | (setq copyright-current-year (substring (current-time-string) -4)) |
| 104 | (unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2)) | 121 | (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3)) |
| 105 | (substring copyright-current-year -2)) | 122 | (substring copyright-current-year -2)) |
| 106 | (if (or noquery | 123 | (if (or noquery |
| 107 | (y-or-n-p (if replace | 124 | (y-or-n-p (if replace |
| @@ -233,5 +250,5 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." | |||
| 233 | ;; coding: utf-8 | 250 | ;; coding: utf-8 |
| 234 | ;; End: | 251 | ;; End: |
| 235 | 252 | ||
| 236 | ;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 | 253 | ;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 |
| 237 | ;;; copyright.el ends here | 254 | ;;; copyright.el ends here |
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 2b2cffc5a35..5fc60cf516f 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -254,11 +254,7 @@ No problems result if this variable is not bound. | |||
| 254 | ,@body | 254 | ,@body |
| 255 | ) | 255 | ) |
| 256 | ;; Run the hooks, if any. | 256 | ;; Run the hooks, if any. |
| 257 | ;; Make the generated code work in older Emacs versions | 257 | (run-mode-hooks ',hook))))) |
| 258 | ;; that do not yet have run-mode-hooks. | ||
| 259 | (if (fboundp 'run-mode-hooks) | ||
| 260 | (run-mode-hooks ',hook) | ||
| 261 | (run-hooks ',hook)))))) | ||
| 262 | 258 | ||
| 263 | ;; PUBLIC: find the ultimate class of a derived mode. | 259 | ;; PUBLIC: find the ultimate class of a derived mode. |
| 264 | 260 | ||
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 3a7c8fd553a..349bfb3f764 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -126,6 +126,21 @@ | |||
| 126 | (+ c #x8000000 128) | 126 | (+ c #x8000000 128) |
| 127 | c))) | 127 | c))) |
| 128 | 128 | ||
| 129 | (defun xterm-mouse-truncate-wrap (f) | ||
| 130 | "Truncate with wrap-around." | ||
| 131 | (condition-case nil | ||
| 132 | ;; First try the built-in truncate, in case there's no overflow. | ||
| 133 | (truncate f) | ||
| 134 | ;; In case of overflow, do wraparound by hand. | ||
| 135 | (range-error | ||
| 136 | ;; In our case, we wrap around every 3 days or so, so if we assume | ||
| 137 | ;; a maximum of 65536 wraparounds, we're safe for a couple years. | ||
| 138 | ;; Using a power of 2 makes rounding errors less likely. | ||
| 139 | (let* ((maxwrap (* 65536 2048)) | ||
| 140 | (dbig (truncate (/ f maxwrap))) | ||
| 141 | (fdiff (- f (* 1.0 maxwrap dbig)))) | ||
| 142 | (+ (truncate fdiff) (* maxwrap dbig)))))) | ||
| 143 | |||
| 129 | (defun xterm-mouse-event () | 144 | (defun xterm-mouse-event () |
| 130 | "Convert XTerm mouse event to Emacs mouse event." | 145 | "Convert XTerm mouse event to Emacs mouse event." |
| 131 | (let* ((type (- (xterm-mouse-event-read) #o40)) | 146 | (let* ((type (- (xterm-mouse-event-read) #o40)) |
| @@ -133,12 +148,12 @@ | |||
| 133 | (y (- (xterm-mouse-event-read) #o40 1)) | 148 | (y (- (xterm-mouse-event-read) #o40 1)) |
| 134 | ;; Emulate timestamp information. This is accurate enough | 149 | ;; Emulate timestamp information. This is accurate enough |
| 135 | ;; for default value of mouse-1-click-follows-link (450msec). | 150 | ;; for default value of mouse-1-click-follows-link (450msec). |
| 136 | (timestamp (truncate | 151 | (timestamp (xterm-mouse-truncate-wrap |
| 137 | (* 1000 | 152 | (* 1000 |
| 138 | (- (float-time) | 153 | (- (float-time) |
| 139 | (or xt-mouse-epoch | 154 | (or xt-mouse-epoch |
| 140 | (setq xt-mouse-epoch (float-time))))))) | 155 | (setq xt-mouse-epoch (float-time))))))) |
| 141 | (mouse (intern | 156 | (mouse (intern |
| 142 | ;; For buttons > 3, the release-event looks | 157 | ;; For buttons > 3, the release-event looks |
| 143 | ;; differently (see xc/programs/xterm/button.c, | 158 | ;; differently (see xc/programs/xterm/button.c, |
| 144 | ;; function EditorButton), and there seems to come in | 159 | ;; function EditorButton), and there seems to come in |
| @@ -210,5 +225,5 @@ down the SHIFT key while pressing the mouse button." | |||
| 210 | 225 | ||
| 211 | (provide 'xt-mouse) | 226 | (provide 'xt-mouse) |
| 212 | 227 | ||
| 213 | ;;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03 | 228 | ;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03 |
| 214 | ;;; xt-mouse.el ends here | 229 | ;;; xt-mouse.el ends here |