diff options
| author | Joakim Verona | 2011-10-27 11:15:25 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-10-27 11:15:25 +0200 |
| commit | b70516db12801e015c538c4e7eb44cb87316afc4 (patch) | |
| tree | b5ed66a971e6f55d0b4628f7a56316b0fa383ddc /lisp | |
| parent | 51a9916f39ce1cd562816a5429bc3cf6f407fabc (diff) | |
| parent | 435c1d6793ce358f4d2c77c9e9c1ad81fd754651 (diff) | |
| download | emacs-b70516db12801e015c538c4e7eb44cb87316afc4.tar.gz emacs-b70516db12801e015c538c4e7eb44cb87316afc4.zip | |
upstream
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 34 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 14 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl.el | 54 | ||||
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 6 | ||||
| -rw-r--r-- | lisp/files.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 6 | ||||
| -rw-r--r-- | lisp/international/mule-conf.el | 2 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 5 | ||||
| -rw-r--r-- | lisp/term/w32-win.el | 1 | ||||
| -rw-r--r-- | lisp/textmodes/reftex.el | 2 |
14 files changed, 116 insertions, 29 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88248f00559..6aa1bddb9f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2011-10-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-extra.el (most-positive-float, most-negative-float) | ||
| 4 | (least-positive-float, least-negative-float) | ||
| 5 | (least-positive-normalized-float, least-negative-normalized-float) | ||
| 6 | (float-epsilon, float-negative-epsilon): | ||
| 7 | Remove unnecessary declarations. | ||
| 8 | |||
| 9 | * emacs-lisp/cl-extra.el (cl-float-limits): Add doc string. | ||
| 10 | * emacs-lisp/cl.el (most-positive-float, most-negative-float) | ||
| 11 | (least-positive-float, least-negative-float) | ||
| 12 | (least-positive-normalized-float, least-negative-normalized-float) | ||
| 13 | (float-epsilon, float-negative-epsilon): Add doc-strings, | ||
| 14 | based on those in cl.texi. | ||
| 15 | |||
| 16 | * files.el (set-visited-file-name): If the major-mode changed, | ||
| 17 | reload the local variables. (Bug#9796) | ||
| 18 | |||
| 19 | 2011-10-27 Chong Yidong <cyd@gnu.org> | ||
| 20 | |||
| 21 | * subr.el (change-major-mode-after-body-hook): New hook. | ||
| 22 | (run-mode-hooks): Run it. | ||
| 23 | |||
| 24 | * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Use | ||
| 25 | change-major-mode-before-body-hook. | ||
| 26 | |||
| 27 | * simple.el (fundamental-mode): | ||
| 28 | * emacs-lisp/derived.el (define-derived-mode): Revert 2010-04-28 | ||
| 29 | change introducing fundamental-mode-hook. | ||
| 30 | |||
| 31 | 2011-10-26 Juanma Barranquero <lekktu@gmail.com> | ||
| 32 | |||
| 33 | * term/w32-win.el (w32-default-color-map): Declare obsolete. (Bug#9785) | ||
| 34 | |||
| 1 | 2011-10-26 Michael Albinus <michael.albinus@gmx.de> | 35 | 2011-10-26 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 36 | ||
| 3 | * ido.el (ido-file-name-all-completions-1): Do not require | 37 | * ido.el (ido-file-name-all-completions-1): Do not require |
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 7468a0237cf..8ea58b2e07c 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -480,17 +480,13 @@ If STATE is t, return a new state object seeded from the time of day." | |||
| 480 | (and (numberp res) (/= res (/ res 2)) res)) | 480 | (and (numberp res) (/= res (/ res 2)) res)) |
| 481 | (arith-error nil))) | 481 | (arith-error nil))) |
| 482 | 482 | ||
| 483 | (defvar most-positive-float) | ||
| 484 | (defvar most-negative-float) | ||
| 485 | (defvar least-positive-float) | ||
| 486 | (defvar least-negative-float) | ||
| 487 | (defvar least-positive-normalized-float) | ||
| 488 | (defvar least-negative-normalized-float) | ||
| 489 | (defvar float-epsilon) | ||
| 490 | (defvar float-negative-epsilon) | ||
| 491 | |||
| 492 | ;;;###autoload | 483 | ;;;###autoload |
| 493 | (defun cl-float-limits () | 484 | (defun cl-float-limits () |
| 485 | "Initialize the Common Lisp floating-point parameters. | ||
| 486 | This sets the values of: `most-positive-float', `most-negative-float', | ||
| 487 | `least-positive-float', `least-negative-float', `float-epsilon', | ||
| 488 | `float-negative-epsilon', `least-positive-normalized-float', and | ||
| 489 | `least-negative-normalized-float'." | ||
| 494 | (or most-positive-float (not (numberp '2e1)) | 490 | (or most-positive-float (not (numberp '2e1)) |
| 495 | (let ((x '2e0) y z) | 491 | (let ((x '2e0) y z) |
| 496 | ;; Find maximum exponent (first two loops are optimizations) | 492 | ;; Find maximum exponent (first two loops are optimizations) |
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 526475eb1bd..0b34e9f27f7 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -333,15 +333,51 @@ always returns nil." | |||
| 333 | 333 | ||
| 334 | (defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time))) | 334 | (defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time))) |
| 335 | 335 | ||
| 336 | ;; The following are actually set by cl-float-limits. | 336 | (defconst most-positive-float nil |
| 337 | (defconst most-positive-float nil) | 337 | "The largest value that a Lisp float can hold. |
| 338 | (defconst most-negative-float nil) | 338 | If your system supports infinities, this is the largest finite value. |
| 339 | (defconst least-positive-float nil) | 339 | For IEEE machines, this is approximately 1.79e+308. |
| 340 | (defconst least-negative-float nil) | 340 | Call `cl-float-limits' to set this.") |
| 341 | (defconst least-positive-normalized-float nil) | 341 | |
| 342 | (defconst least-negative-normalized-float nil) | 342 | (defconst most-negative-float nil |
| 343 | (defconst float-epsilon nil) | 343 | "The largest negative value that a Lisp float can hold. |
| 344 | (defconst float-negative-epsilon nil) | 344 | This is simply -`most-negative-float'. |
| 345 | Call `cl-float-limits' to set this.") | ||
| 346 | |||
| 347 | (defconst least-positive-float nil | ||
| 348 | "The smallest value greater than zero that a Lisp float can hold. | ||
| 349 | For IEEE machines, it is about 4.94e-324 if denormals are supported, | ||
| 350 | or 2.22e-308 if they are not. | ||
| 351 | Call `cl-float-limits' to set this.") | ||
| 352 | |||
| 353 | (defconst least-negative-float nil | ||
| 354 | "The smallest value less than zero that a Lisp float can hold. | ||
| 355 | This is simply -`least-positive-float'. | ||
| 356 | Call `cl-float-limits' to set this.") | ||
| 357 | |||
| 358 | (defconst least-positive-normalized-float nil | ||
| 359 | "The smallest normalized Lisp float greater than zero. | ||
| 360 | This is the smallest value for which IEEE denormalization does not lose | ||
| 361 | precision. For IEEE machines, this value is about 2.22e-308. | ||
| 362 | For machines that do not support the concept of denormalization | ||
| 363 | and gradual underflow, this constant equals `least-positive-float'. | ||
| 364 | Call `cl-float-limits' to set this.") | ||
| 365 | |||
| 366 | (defconst least-negative-normalized-float nil | ||
| 367 | "The smallest normalized Lisp float less than zero. | ||
| 368 | This is simply -`least-positive-normalized-float'. | ||
| 369 | Call `cl-float-limits' to set this.") | ||
| 370 | |||
| 371 | (defconst float-epsilon nil | ||
| 372 | "The smallest positive float that adds to 1.0 to give a distinct value. | ||
| 373 | Adding a number less than this to 1.0 returns 1.0 due to roundoff. | ||
| 374 | For IEEE machines, epsilon is about 2.22e-16. | ||
| 375 | Call `cl-float-limits' to set this.") | ||
| 376 | |||
| 377 | (defconst float-negative-epsilon nil | ||
| 378 | "The smallest positive float that subtracts from 1.0 to give a distinct value. | ||
| 379 | For IEEE machines, it is about 1.11e-16. | ||
| 380 | Call `cl-float-limits' to set this.") | ||
| 345 | 381 | ||
| 346 | 382 | ||
| 347 | ;;; Sequence functions. | 383 | ;;; Sequence functions. |
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 81932f9940a..55ea102ed2a 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -230,7 +230,7 @@ No problems result if this variable is not bound. | |||
| 230 | ; Run the parent. | 230 | ; Run the parent. |
| 231 | (delay-mode-hooks | 231 | (delay-mode-hooks |
| 232 | 232 | ||
| 233 | (,(or parent 'fundamental-mode)) | 233 | (,(or parent 'kill-all-local-variables)) |
| 234 | ; Identify the child mode. | 234 | ; Identify the child mode. |
| 235 | (setq major-mode (quote ,child)) | 235 | (setq major-mode (quote ,child)) |
| 236 | (setq mode-name ,name) | 236 | (setq mode-name ,name) |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 4b6f4d634ca..bf9f2c9d6ed 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -368,11 +368,13 @@ See `%s' for more information on %s." | |||
| 368 | (progn | 368 | (progn |
| 369 | (add-hook 'after-change-major-mode-hook | 369 | (add-hook 'after-change-major-mode-hook |
| 370 | ',MODE-enable-in-buffers) | 370 | ',MODE-enable-in-buffers) |
| 371 | (add-hook 'fundamental-mode-hook ',MODE-enable-in-buffers) | 371 | (add-hook 'change-major-mode-after-body-hook |
| 372 | ',MODE-enable-in-buffers) | ||
| 372 | (add-hook 'find-file-hook ',MODE-check-buffers) | 373 | (add-hook 'find-file-hook ',MODE-check-buffers) |
| 373 | (add-hook 'change-major-mode-hook ',MODE-cmhh)) | 374 | (add-hook 'change-major-mode-hook ',MODE-cmhh)) |
| 374 | (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) | 375 | (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) |
| 375 | (remove-hook 'fundamental-mode-hook ',MODE-enable-in-buffers) | 376 | (remove-hook 'change-major-mode-after-body-hook |
| 377 | ',MODE-enable-in-buffers) | ||
| 376 | (remove-hook 'find-file-hook ',MODE-check-buffers) | 378 | (remove-hook 'find-file-hook ',MODE-check-buffers) |
| 377 | (remove-hook 'change-major-mode-hook ',MODE-cmhh)) | 379 | (remove-hook 'change-major-mode-hook ',MODE-cmhh)) |
| 378 | 380 | ||
diff --git a/lisp/files.el b/lisp/files.el index 3ed9bd5a272..40e2df14c1b 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3682,7 +3682,11 @@ the old visited file has been renamed to the new name FILENAME." | |||
| 3682 | (get major-mode 'mode-class) | 3682 | (get major-mode 'mode-class) |
| 3683 | ;; Don't change the mode if the local variable list specifies it. | 3683 | ;; Don't change the mode if the local variable list specifies it. |
| 3684 | (hack-local-variables t) | 3684 | (hack-local-variables t) |
| 3685 | (set-auto-mode t)) | 3685 | ;; TODO consider making normal-mode handle this case. |
| 3686 | (let ((old major-mode)) | ||
| 3687 | (set-auto-mode t) | ||
| 3688 | (or (eq old major-mode) | ||
| 3689 | (hack-local-variables)))) | ||
| 3686 | (error nil))) | 3690 | (error nil))) |
| 3687 | 3691 | ||
| 3688 | (defun write-file (filename &optional confirm) | 3692 | (defun write-file (filename &optional confirm) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8b4e993149e..7519252f037 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-10-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * message.el (message-completion-function): Make sure | ||
| 4 | message-tab-body-function is not attempted if one of | ||
| 5 | message-completion-alist fails to find a completion (bug#9158). | ||
| 6 | |||
| 1 | 2011-10-26 Daiki Ueno <ueno@unixuser.org> | 7 | 2011-10-26 Daiki Ueno <ueno@unixuser.org> |
| 2 | 8 | ||
| 3 | * mml.el (mml-quote-region): Quote <#secure> tag. | 9 | * mml.el (mml-quote-region): Quote <#secure> tag. |
| @@ -7,7 +13,7 @@ | |||
| 7 | 13 | ||
| 8 | * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24, | 14 | * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24, |
| 9 | calling a minor mode from Lisp with nil arg enables it, so we have to | 15 | calling a minor mode from Lisp with nil arg enables it, so we have to |
| 10 | make the working a bit ambiguous here). | 16 | make the wording a bit ambiguous here). |
| 11 | 17 | ||
| 12 | 2011-10-18 Teodor Zlatanov <tzz@lifelogs.com> | 18 | 2011-10-18 Teodor Zlatanov <tzz@lifelogs.com> |
| 13 | 19 | ||
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 948892d1e13..723f8fb72b5 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -7888,7 +7888,11 @@ those headers." | |||
| 7888 | (let ((mail-abbrev-mode-regexp (caar alist))) | 7888 | (let ((mail-abbrev-mode-regexp (caar alist))) |
| 7889 | (not (mail-abbrev-in-expansion-header-p)))) | 7889 | (not (mail-abbrev-in-expansion-header-p)))) |
| 7890 | (setq alist (cdr alist))) | 7890 | (setq alist (cdr alist))) |
| 7891 | (cdar alist))) | 7891 | (when (cdar alist) |
| 7892 | (lexical-let ((fun (cdar alist))) | ||
| 7893 | ;; Even if completion fails, return a non-nil value, so as to avoid | ||
| 7894 | ;; falling back to message-tab-body-function. | ||
| 7895 | (lambda () (funcall fun) 'completion-attempted))))) | ||
| 7892 | 7896 | ||
| 7893 | (eval-and-compile | 7897 | (eval-and-compile |
| 7894 | (condition-case nil | 7898 | (condition-case nil |
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 9ba95e4d11a..870f2bece28 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el | |||
| @@ -708,7 +708,7 @@ | |||
| 708 | (define-charset-alias 'cp866u 'cp1125) | 708 | (define-charset-alias 'cp866u 'cp1125) |
| 709 | 709 | ||
| 710 | ;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html | 710 | ;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html |
| 711 | ;; shows this as not ASCII comptaible, with various graphics in | 711 | ;; shows this as not ASCII compatible, with various graphics in |
| 712 | ;; 0x01-0x1F. | 712 | ;; 0x01-0x1F. |
| 713 | (define-charset 'cp437 | 713 | (define-charset 'cp437 |
| 714 | "CP437 (MS-DOS United States, Australia, New Zealand, South Africa)" | 714 | "CP437 (MS-DOS United States, Australia, New Zealand, South Africa)" |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 9fbeb9f1882..ae150621dc0 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1871,7 +1871,7 @@ | |||
| 1871 | 1871 | ||
| 1872 | * org-list.el (org-list-separating-blank-lines-number): Fix | 1872 | * org-list.el (org-list-separating-blank-lines-number): Fix |
| 1873 | confusion between point and item beginning. Now, if no | 1873 | confusion between point and item beginning. Now, if no |
| 1874 | information is avalaible, truly follow user preference when it | 1874 | information is available, truly follow user preference when it |
| 1875 | inserts blank lines manually. | 1875 | inserts blank lines manually. |
| 1876 | (org-list-insert-item): Send correct argument to the preceding | 1876 | (org-list-insert-item): Send correct argument to the preceding |
| 1877 | function. | 1877 | function. |
diff --git a/lisp/simple.el b/lisp/simple.el index 79de6aea3dd..90d22c817b0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -349,7 +349,8 @@ location." | |||
| 349 | Other major modes are defined by comparison with this one." | 349 | Other major modes are defined by comparison with this one." |
| 350 | (interactive) | 350 | (interactive) |
| 351 | (kill-all-local-variables) | 351 | (kill-all-local-variables) |
| 352 | (run-mode-hooks 'fundamental-mode-hook)) | 352 | (unless delay-mode-hooks |
| 353 | (run-hooks 'after-change-major-mode-hook))) | ||
| 353 | 354 | ||
| 354 | ;; Special major modes to view specially formatted data rather than files. | 355 | ;; Special major modes to view specially formatted data rather than files. |
| 355 | 356 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 7ac287d2473..f3cd4dabe20 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1530,6 +1530,9 @@ if it is empty or a duplicate." | |||
| 1530 | (make-variable-buffer-local 'delayed-mode-hooks) | 1530 | (make-variable-buffer-local 'delayed-mode-hooks) |
| 1531 | (put 'delay-mode-hooks 'permanent-local t) | 1531 | (put 'delay-mode-hooks 'permanent-local t) |
| 1532 | 1532 | ||
| 1533 | (defvar change-major-mode-after-body-hook nil | ||
| 1534 | "Normal hook run in major mode functions, before the mode hooks.") | ||
| 1535 | |||
| 1533 | (defvar after-change-major-mode-hook nil | 1536 | (defvar after-change-major-mode-hook nil |
| 1534 | "Normal hook run at the very end of major mode functions.") | 1537 | "Normal hook run at the very end of major mode functions.") |
| 1535 | 1538 | ||
| @@ -1546,7 +1549,7 @@ FOO-mode-hook." | |||
| 1546 | ;; Normal case, just run the hook as before plus any delayed hooks. | 1549 | ;; Normal case, just run the hook as before plus any delayed hooks. |
| 1547 | (setq hooks (nconc (nreverse delayed-mode-hooks) hooks)) | 1550 | (setq hooks (nconc (nreverse delayed-mode-hooks) hooks)) |
| 1548 | (setq delayed-mode-hooks nil) | 1551 | (setq delayed-mode-hooks nil) |
| 1549 | (apply 'run-hooks hooks) | 1552 | (apply 'run-hooks (cons 'change-major-mode-after-body-hook hooks)) |
| 1550 | (run-hooks 'after-change-major-mode-hook))) | 1553 | (run-hooks 'after-change-major-mode-hook))) |
| 1551 | 1554 | ||
| 1552 | (defmacro delay-mode-hooks (&rest body) | 1555 | (defmacro delay-mode-hooks (&rest body) |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index e4bf031d422..b7f2a69e77b 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -85,6 +85,7 @@ | |||
| 85 | (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1") | 85 | (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1") |
| 86 | 86 | ||
| 87 | (defvar w32-color-map) ;; defined in w32fns.c | 87 | (defvar w32-color-map) ;; defined in w32fns.c |
| 88 | (make-obsolete 'w32-default-color-map nil "24.1") | ||
| 88 | 89 | ||
| 89 | (declare-function w32-send-sys-command "w32fns.c") | 90 | (declare-function w32-send-sys-command "w32fns.c") |
| 90 | (declare-function set-message-beep "w32console.c") | 91 | (declare-function set-message-beep "w32console.c") |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 6f6993980db..cef8a3d1548 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -1522,7 +1522,7 @@ Valid actions are: readable, restore, read, kill, write." | |||
| 1522 | ;;; (while all | 1522 | ;;; (while all |
| 1523 | ;;; (when (and (eq (car (car all)) 'bof) | 1523 | ;;; (when (and (eq (car (car all)) 'bof) |
| 1524 | ;;; (not (file-regular-p (nth 1 (car all))))) | 1524 | ;;; (not (file-regular-p (nth 1 (car all))))) |
| 1525 | ;;; (message "File %s in saved parse info not avalable" (cdr (car all))) | 1525 | ;;; (message "File %s in saved parse info not available" (cdr (car all))) |
| 1526 | ;;; (error "File not found")) | 1526 | ;;; (error "File not found")) |
| 1527 | ;;; (setq all (cdr all)))) | 1527 | ;;; (setq all (cdr all)))) |
| 1528 | ) | 1528 | ) |