diff options
| -rw-r--r-- | admin/FOR-RELEASE | 222 | ||||
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/view.el | 7 | ||||
| -rw-r--r-- | lisp/window.el | 352 | ||||
| -rw-r--r-- | src/ChangeLog | 20 | ||||
| -rw-r--r-- | src/lread.c | 7 | ||||
| -rw-r--r-- | src/minibuf.c | 36 | ||||
| -rw-r--r-- | src/s/openbsd.h | 6 | ||||
| -rw-r--r-- | src/unexelf.c | 4 |
9 files changed, 362 insertions, 305 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 45330262041..e1c25ef07f3 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -123,132 +123,136 @@ names of the people who have checked it. | |||
| 123 | 123 | ||
| 124 | SECTION READERS | 124 | SECTION READERS |
| 125 | ---------------------------------- | 125 | ---------------------------------- |
| 126 | etc/TUTORIAL rgm (but see Bug#3783) | 126 | TUTORIAL |
| 127 | etc/TUTORIAL.bg | 127 | TUTORIAL.bg |
| 128 | etc/TUTORIAL.cn | 128 | TUTORIAL.cn |
| 129 | etc/TUTORIAL.cs | 129 | TUTORIAL.cs |
| 130 | etc/TUTORIAL.de Werner Lemberg | 130 | TUTORIAL.de |
| 131 | etc/TUTORIAL.eo | 131 | TUTORIAL.eo |
| 132 | etc/TUTORIAL.es | 132 | TUTORIAL.es |
| 133 | etc/TUTORIAL.fr | 133 | TUTORIAL.fr |
| 134 | etc/TUTORIAL.it | 134 | TUTORIAL.he |
| 135 | etc/TUTORIAL.ja | 135 | TUTORIAL.it |
| 136 | etc/TUTORIAL.ko | 136 | TUTORIAL.ja |
| 137 | etc/TUTORIAL.nl | 137 | TUTORIAL.ko |
| 138 | etc/TUTORIAL.pl | 138 | TUTORIAL.nl |
| 139 | etc/TUTORIAL.pt_BR | 139 | TUTORIAL.pl |
| 140 | etc/TUTORIAL.ro | 140 | TUTORIAL.pt_BR |
| 141 | etc/TUTORIAL.ru | 141 | TUTORIAL.ro |
| 142 | etc/TUTORIAL.sk | 142 | TUTORIAL.ru |
| 143 | etc/TUTORIAL.sl | 143 | TUTORIAL.sk |
| 144 | etc/TUTORIAL.sv | 144 | TUTORIAL.sl |
| 145 | etc/TUTORIAL.th | 145 | TUTORIAL.sv |
| 146 | etc/TUTORIAL.zh | 146 | TUTORIAL.th |
| 147 | TUTORIAL.zh | ||
| 147 | 148 | ||
| 148 | ** Check the manual. | 149 | ** Check the manual. |
| 149 | 150 | ||
| 150 | abbrevs.texi -- cyd | 151 | abbrevs.texi |
| 151 | ack.texi -- rgm | 152 | ack.texi |
| 152 | anti.texi | 153 | anti.texi |
| 153 | arevert-xtra.texi | 154 | arevert-xtra.texi |
| 154 | basic.texi -- cyd | 155 | basic.texi |
| 155 | buffers.texi -- cyd | 156 | buffers.texi |
| 156 | building.texi -- cyd | 157 | building.texi |
| 157 | calendar.texi -- rgm | 158 | calendar.texi |
| 158 | cal-xtra.texi -- rgm | 159 | cal-xtra.texi |
| 159 | cmdargs.texi -- cyd | 160 | cmdargs.texi |
| 160 | commands.texi -- cyd | 161 | commands.texi |
| 161 | custom.texi -- cyd | 162 | custom.texi |
| 162 | dired.texi -- cyd | 163 | dired.texi |
| 163 | dired-xtra.texi | 164 | dired-xtra.texi |
| 164 | display.texi -- cyd | 165 | display.texi |
| 165 | emacs.texi -- cyd | 166 | emacs.texi |
| 166 | emacs-xtra.texi | 167 | emacs-xtra.texi |
| 167 | emerge-xtra.texi | 168 | emerge-xtra.texi |
| 168 | entering.texi -- cyd | 169 | entering.texi |
| 169 | files.texi -- cyd | 170 | files.texi |
| 170 | fixit.texi -- cyd | 171 | fixit.texi |
| 171 | fortran-xtra.texi -- rgm | 172 | fortran-xtra.texi |
| 172 | frames.texi -- cyd | 173 | frames.texi |
| 173 | glossary.texi | 174 | glossary.texi |
| 174 | help.texi -- cyd | 175 | help.texi |
| 175 | indent.texi -- cyd | 176 | indent.texi |
| 176 | killing.texi -- cyd | 177 | killing.texi |
| 177 | kmacro.texi -- cyd | 178 | kmacro.texi |
| 178 | macos.texi -- davidswelt | 179 | macos.texi |
| 179 | maintaining.texi -- cyd | 180 | maintaining.texi |
| 180 | major.texi -- cyd | 181 | major.texi |
| 181 | mark.texi -- cyd | 182 | mark.texi |
| 182 | mini.texi -- cyd | 183 | mini.texi |
| 183 | misc.texi -- cyd | 184 | misc.texi |
| 184 | msdog.texi -- eliz | 185 | msdog.texi |
| 185 | msdog-xtra.texi -- eliz | 186 | msdog-xtra.texi |
| 186 | mule.texi -- cyd | 187 | mule.texi |
| 187 | m-x.texi -- cyd | 188 | m-x.texi |
| 188 | programs.texi -- cyd | 189 | picture-xtra.texi |
| 189 | regs.texi -- cyd | 190 | programs.texi |
| 190 | rmail.texi -- rgm | 191 | regs.texi |
| 191 | screen.texi -- cyd | 192 | rmail.texi |
| 192 | search.texi -- cyd | 193 | screen.texi |
| 193 | sending.texi -- rgm (maybe needs some brief mailclient.el details in | 194 | search.texi |
| 194 | "Mail Sending" section?) | 195 | sending.texi |
| 195 | text.texi -- cyd | 196 | text.texi |
| 196 | trouble.texi -- cyd | 197 | trouble.texi |
| 197 | windows.texi -- rudalics | 198 | vc-xtra.texi |
| 198 | xresources.texi -- cyd | 199 | vc1-xtra.texi |
| 200 | windows.texi | ||
| 201 | xresources.texi | ||
| 199 | 202 | ||
| 200 | ** Check the Lisp manual. | 203 | ** Check the Lisp manual. |
| 201 | 204 | ||
| 202 | abbrevs.texi -- cyd | 205 | abbrevs.texi |
| 203 | advice.texi -- cyd | 206 | advice.texi |
| 204 | anti.texi -- cyd | 207 | anti.texi |
| 205 | back.texi | 208 | back.texi |
| 206 | backups.texi -- cyd | 209 | backups.texi |
| 207 | buffers.texi -- cyd | 210 | buffers.texi |
| 208 | commands.texi -- cyd | 211 | commands.texi |
| 209 | compile.texi -- cyd | 212 | compile.texi |
| 210 | control.texi -- cyd | 213 | control.texi |
| 211 | customize.texi -- cyd | 214 | customize.texi |
| 212 | debugging.texi -- cyd | 215 | debugging.texi |
| 213 | display.texi -- cyd | 216 | display.texi |
| 214 | edebug.texi | 217 | edebug.texi |
| 215 | elisp.texi | 218 | elisp.texi |
| 216 | errors.texi -- cyd | 219 | errors.texi |
| 217 | eval.texi -- cyd | 220 | eval.texi |
| 218 | files.texi -- cyd | 221 | files.texi |
| 219 | frames.texi -- cyd | 222 | frames.texi |
| 220 | functions.texi -- cyd | 223 | functions.texi |
| 221 | hash.texi -- cyd | 224 | hash.texi |
| 222 | help.texi -- cyd | 225 | help.texi |
| 223 | hooks.texi -- cyd | 226 | hooks.texi |
| 224 | index.texi | 227 | index.texi |
| 225 | internals.texi -- cyd | 228 | internals.texi |
| 226 | intro.texi -- cyd | 229 | intro.texi |
| 227 | keymaps.texi -- cyd | 230 | keymaps.texi |
| 228 | lists.texi -- cyd | 231 | lists.texi |
| 229 | loading.texi -- cyd | 232 | loading.texi |
| 230 | locals.texi -- cyd | 233 | locals.texi |
| 231 | macros.texi -- cyd | 234 | macros.texi |
| 232 | maps.texi -- cyd | 235 | maps.texi |
| 233 | markers.texi -- cyd | 236 | markers.texi |
| 234 | minibuf.texi -- cyd | 237 | minibuf.texi |
| 235 | modes.texi -- cyd | 238 | modes.texi |
| 236 | nonascii.texi -- cyd | 239 | nonascii.texi |
| 237 | numbers.texi -- cyd | 240 | numbers.texi |
| 238 | objects.texi -- cyd | 241 | objects.texi |
| 239 | os.texi -- cyd | 242 | os.texi |
| 240 | positions.texi -- cyd | 243 | package.texi |
| 244 | positions.texi | ||
| 241 | processes.texi | 245 | processes.texi |
| 242 | searching.texi -- cyd | 246 | searching.texi |
| 243 | sequences.texi -- cyd | 247 | sequences.texi |
| 244 | streams.texi -- cyd | 248 | streams.texi |
| 245 | strings.texi -- cyd | 249 | strings.texi |
| 246 | symbols.texi -- cyd | 250 | symbols.texi |
| 247 | syntax.texi -- cyd | 251 | syntax.texi |
| 248 | text.texi -- cyd | 252 | text.texi |
| 249 | tips.texi -- cyd | 253 | tips.texi |
| 250 | variables.texi -- cyd | 254 | variables.texi |
| 251 | windows.texi -- rudalics | 255 | windows.texi |
| 252 | 256 | ||
| 253 | * PLANNED ADDITIONS | 257 | * PLANNED ADDITIONS |
| 254 | 258 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ea3d94a01f..0699a93ac9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * view.el (view-buffer): Allow running in `special' modes if we're | ||
| 4 | visiting a file (bug#8615). | ||
| 5 | |||
| 6 | 2011-07-19 Martin Rudalics <rudalics@gmx.at> | ||
| 7 | |||
| 8 | * window.el (display-buffer-alist-of-strings-p) | ||
| 9 | (display-buffer-alist-set-1, display-buffer-alist-set-2): New | ||
| 10 | functions. | ||
| 11 | (display-buffer-alist-set): Rewrite to handle Emacs 23 options | ||
| 12 | more accurately. | ||
| 13 | |||
| 1 | 2011-07-18 Alan Mackenzie <acm@muc.de> | 14 | 2011-07-18 Alan Mackenzie <acm@muc.de> |
| 2 | 15 | ||
| 3 | Fontify declarators properly when, e.g., a jit-lock chunk begins | 16 | Fontify declarators properly when, e.g., a jit-lock chunk begins |
diff --git a/lisp/view.el b/lisp/view.el index ee85b4e7823..21479a70a72 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -311,9 +311,10 @@ file: Users may suspend viewing in order to modify the buffer. | |||
| 311 | Exiting View mode will then discard the user's edits. Setting | 311 | Exiting View mode will then discard the user's edits. Setting |
| 312 | EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." | 312 | EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." |
| 313 | (interactive "bView buffer: ") | 313 | (interactive "bView buffer: ") |
| 314 | (if (eq (with-current-buffer buffer | 314 | (if (with-current-buffer buffer |
| 315 | (get major-mode 'mode-class)) | 315 | (and (eq (get major-mode 'mode-class) |
| 316 | 'special) | 316 | 'special) |
| 317 | (null buffer-file-name))) | ||
| 317 | (progn | 318 | (progn |
| 318 | (switch-to-buffer buffer) | 319 | (switch-to-buffer buffer) |
| 319 | (message "Not using View mode because the major mode is special")) | 320 | (message "Not using View mode because the major mode is special")) |
diff --git a/lisp/window.el b/lisp/window.el index b4b900287e1..12c9da85d57 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -6588,6 +6588,15 @@ split." | |||
| 6588 | 6588 | ||
| 6589 | ;; Functions for converting Emacs 23 buffer display options to buffer | 6589 | ;; Functions for converting Emacs 23 buffer display options to buffer |
| 6590 | ;; display specifiers. | 6590 | ;; display specifiers. |
| 6591 | (defun display-buffer-alist-of-strings-p (list) | ||
| 6592 | "Return t if LIST is a non-empty list of strings." | ||
| 6593 | (when list | ||
| 6594 | (catch 'failed | ||
| 6595 | (dolist (item list) | ||
| 6596 | (unless (stringp item) | ||
| 6597 | (throw 'failed nil))) | ||
| 6598 | t))) | ||
| 6599 | |||
| 6591 | (defun display-buffer-alist-add (identifiers specifiers &optional no-custom) | 6600 | (defun display-buffer-alist-add (identifiers specifiers &optional no-custom) |
| 6592 | "Helper function for `display-buffer-alist-set'." | 6601 | "Helper function for `display-buffer-alist-set'." |
| 6593 | (unless identifiers | 6602 | (unless identifiers |
| @@ -6602,6 +6611,40 @@ split." | |||
| 6602 | 'display-buffer-alist | 6611 | 'display-buffer-alist |
| 6603 | (cons (cons identifiers specifiers) display-buffer-alist)))) | 6612 | (cons (cons identifiers specifiers) display-buffer-alist)))) |
| 6604 | 6613 | ||
| 6614 | (defun display-buffer-alist-set-1 () | ||
| 6615 | "Helper function for `display-buffer-alist-set'." | ||
| 6616 | (progn ;; with-no-warnings | ||
| 6617 | (append | ||
| 6618 | '(reuse-window (reuse-window nil same 0)) | ||
| 6619 | `(pop-up-frame (pop-up-frame t) | ||
| 6620 | ,(append '(pop-up-frame-alist) | ||
| 6621 | special-display-frame-alist)) | ||
| 6622 | '((dedicate . weak))))) | ||
| 6623 | |||
| 6624 | (defun display-buffer-alist-set-2 (args) | ||
| 6625 | "Helper function for `display-buffer-alist-set'." | ||
| 6626 | (progn ;; with-no-warnings | ||
| 6627 | (if (and (listp args) (symbolp (car args))) | ||
| 6628 | `(function (function ,(car args) ,(cdr args))) | ||
| 6629 | (append | ||
| 6630 | '(reuse-window (reuse-window nil same 0)) | ||
| 6631 | (when (and (listp args) (cdr (assq 'same-window args))) | ||
| 6632 | '(reuse-window | ||
| 6633 | (reuse-window same nil nil) (reuse-window-dedicated . weak))) | ||
| 6634 | (when (and (listp args) | ||
| 6635 | (or (cdr (assq 'same-frame args)) | ||
| 6636 | (cdr (assq 'same-window args)))) | ||
| 6637 | '(pop-up-window (pop-up-window (largest . nil) (lru . nil)))) | ||
| 6638 | (when (and (listp args) | ||
| 6639 | (or (cdr (assq 'same-frame args)) | ||
| 6640 | (cdr (assq 'same-window args)))) | ||
| 6641 | '(reuse-window (reuse-window nil nil nil))) | ||
| 6642 | `(pop-up-frame (pop-up-frame t) | ||
| 6643 | ,(append '(pop-up-frame-alist) | ||
| 6644 | (when (listp args) args) | ||
| 6645 | special-display-frame-alist)) | ||
| 6646 | '((dedicate . weak)))))) | ||
| 6647 | |||
| 6605 | (defun display-buffer-alist-set (&optional no-custom add) | 6648 | (defun display-buffer-alist-set (&optional no-custom add) |
| 6606 | "Set `display-buffer-alist' from Emacs 23 buffer display options. | 6649 | "Set `display-buffer-alist' from Emacs 23 buffer display options. |
| 6607 | Optional argument NO-CUSTOM nil means use `customize-set-variable' | 6650 | Optional argument NO-CUSTOM nil means use `customize-set-variable' |
| @@ -6611,201 +6654,164 @@ means to use `setq' instead. | |||
| 6611 | Optional argument ADD nil means to replace the actual value of | 6654 | Optional argument ADD nil means to replace the actual value of |
| 6612 | `display-buffer-alist' with the value calculated here. ADD | 6655 | `display-buffer-alist' with the value calculated here. ADD |
| 6613 | non-nil means prepend the value calculated here to the current | 6656 | non-nil means prepend the value calculated here to the current |
| 6614 | value of `display-buffer-alist'." | 6657 | value of `display-buffer-alist'. Return `display-buffer-alist'." |
| 6615 | (unless add | 6658 | (unless add |
| 6616 | (if no-custom | 6659 | (if no-custom |
| 6617 | (setq display-buffer-alist nil) | 6660 | (setq display-buffer-alist nil) |
| 6618 | (customize-set-variable 'display-buffer-alist nil))) | 6661 | (customize-set-variable 'display-buffer-alist nil))) |
| 6619 | 6662 | ||
| 6620 | ;; Disable warnings, there are too many obsolete options here. | 6663 | ;; Disable warnings, there are too many obsolete options here. |
| 6621 | (with-no-warnings | 6664 | (progn ;; with-no-warnings |
| 6622 | ;; `pop-up-windows' | 6665 | `other-window-means-other-frame' |
| 6623 | (display-buffer-alist-add | 6666 | (when pop-up-frames |
| 6624 | nil | 6667 | (display-buffer-alist-add |
| 6625 | (let ((fun (unless (eq split-window-preferred-function | 6668 | nil '(pop-up-frame |
| 6626 | 'split-window-sensibly) | 6669 | (other-window-means-other-frame . t)) no-custom)) |
| 6627 | ;; `split-window-sensibly' has been merged into the | ||
| 6628 | ;; `display-buffer-split-window' code as `nil'. | ||
| 6629 | split-window-preferred-function)) | ||
| 6630 | (min-height | ||
| 6631 | (if (numberp split-height-threshold) | ||
| 6632 | (/ split-height-threshold 2) | ||
| 6633 | ;; Undocumented hack. | ||
| 6634 | 1.0)) | ||
| 6635 | (min-width | ||
| 6636 | (if (numberp split-width-threshold) | ||
| 6637 | (/ split-width-threshold 2) | ||
| 6638 | ;; Undocumented hack. | ||
| 6639 | 1.0))) | ||
| 6640 | (list | ||
| 6641 | 'pop-up-window | ||
| 6642 | (when pop-up-windows | ||
| 6643 | (list | ||
| 6644 | 'pop-up-window | ||
| 6645 | (cons 'largest fun) | ||
| 6646 | (cons 'lru fun))) | ||
| 6647 | (cons 'pop-up-window-min-height min-height) | ||
| 6648 | (cons 'pop-up-window-min-width min-width))) | ||
| 6649 | no-custom) | ||
| 6650 | 6670 | ||
| 6651 | ;; `pop-up-frames' | 6671 | ;; `reuse-window-even-sizes' |
| 6652 | (display-buffer-alist-add | 6672 | (when even-window-heights |
| 6653 | nil | 6673 | (display-buffer-alist-add |
| 6654 | (list | 6674 | nil '(reuse-window (reuse-window-even-sizes . t)) no-custom)) |
| 6655 | 'pop-up-frame | 6675 | |
| 6656 | (when pop-up-frames | 6676 | ;; `dedicate' |
| 6657 | (list 'pop-up-frame pop-up-frames)) | 6677 | (when display-buffer-mark-dedicated |
| 6658 | (when pop-up-frame-function | 6678 | (display-buffer-alist-add |
| 6659 | (cons 'pop-up-frame-function pop-up-frame-function)) | 6679 | nil '(dedicate (display-buffer-mark-dedicated . t)) no-custom)) |
| 6660 | (when pop-up-frame-alist | 6680 | |
| 6661 | (cons 'pop-up-frame-alist pop-up-frame-alist))) | 6681 | ;; `pop-up-window' group |
| 6662 | no-custom) | 6682 | (let ((fun (unless (eq split-window-preferred-function |
| 6683 | 'split-window-sensibly) | ||
| 6684 | split-window-preferred-function)) | ||
| 6685 | (min-height | ||
| 6686 | (if (numberp split-height-threshold) | ||
| 6687 | (/ split-height-threshold 2) | ||
| 6688 | 1.0)) | ||
| 6689 | (min-width | ||
| 6690 | (if (numberp split-width-threshold) | ||
| 6691 | (/ split-width-threshold 2) | ||
| 6692 | 1.0))) | ||
| 6693 | (display-buffer-alist-add | ||
| 6694 | nil | ||
| 6695 | (list | ||
| 6696 | 'pop-up-window | ||
| 6697 | ;; `pop-up-window' | ||
| 6698 | (when pop-up-windows | ||
| 6699 | (list 'pop-up-window (cons 'largest fun) (cons 'lru fun))) | ||
| 6700 | ;; `pop-up-window-min-height' | ||
| 6701 | (cons 'pop-up-window-min-height min-height) | ||
| 6702 | ;; `pop-up-window-min-width' | ||
| 6703 | (cons 'pop-up-window-min-width min-width)) | ||
| 6704 | no-custom)) | ||
| 6705 | |||
| 6706 | ;; `pop-up-frame' group | ||
| 6707 | (when (or pop-up-frames | ||
| 6708 | (not (equal pop-up-frame-function | ||
| 6709 | '(lambda nil | ||
| 6710 | (make-frame pop-up-frame-alist)))) | ||
| 6711 | pop-up-frame-alist) | ||
| 6712 | (display-buffer-alist-add | ||
| 6713 | nil | ||
| 6714 | (list | ||
| 6715 | 'pop-up-frame | ||
| 6716 | (when pop-up-frames | ||
| 6717 | ;; `pop-up-frame' | ||
| 6718 | (list 'pop-up-frame | ||
| 6719 | (when (eq pop-up-frames 'graphic-only) | ||
| 6720 | t))) | ||
| 6721 | (unless (equal pop-up-frame-function | ||
| 6722 | '(lambda nil | ||
| 6723 | (make-frame pop-up-frame-alist))) | ||
| 6724 | ;; `pop-up-frame-function' | ||
| 6725 | (cons 'pop-up-frame-function pop-up-frame-function)) | ||
| 6726 | (when pop-up-frame-alist | ||
| 6727 | ;; `pop-up-frame-alist' | ||
| 6728 | (cons 'pop-up-frame-alist pop-up-frame-alist))) | ||
| 6729 | no-custom)) | ||
| 6663 | 6730 | ||
| 6664 | ;; `special-display-regexps' | 6731 | ;; `special-display-regexps' |
| 6665 | (dolist (entry special-display-regexps) | 6732 | (if (display-buffer-alist-of-strings-p special-display-regexps) |
| 6666 | (cond | 6733 | ;; Handle case where `special-display-regexps' is a plain list |
| 6667 | ((stringp entry) | 6734 | ;; of strings specially. |
| 6668 | ;; Plain string. | 6735 | (let (list) |
| 6669 | (display-buffer-alist-add | 6736 | (dolist (regexp special-display-regexps) |
| 6670 | `((regexp . ,entry)) | 6737 | (setq list (cons (cons 'regexp regexp) list))) |
| 6671 | (list | 6738 | (setq list (nreverse list)) |
| 6672 | 'function | 6739 | (display-buffer-alist-add |
| 6673 | (list 'function special-display-function | 6740 | list (display-buffer-alist-set-1) no-custom)) |
| 6674 | special-display-frame-alist)) | 6741 | ;; Else iterate over the entries. |
| 6675 | no-custom)) | 6742 | (dolist (item special-display-regexps) |
| 6676 | ((consp entry) | 6743 | (if (stringp item) |
| 6677 | (let ((name (car entry)) | 6744 | (display-buffer-alist-add |
| 6678 | (rest (cdr entry))) | 6745 | `((regexp . ,item)) (display-buffer-alist-set-1) |
| 6679 | (cond | 6746 | no-custom) |
| 6680 | ((functionp (car rest)) | 6747 | (display-buffer-alist-add |
| 6681 | ;; A function. | 6748 | `((regexp . ,(car item))) |
| 6682 | (display-buffer-alist-add | 6749 | (display-buffer-alist-set-2 (cdr item)) |
| 6683 | `((name . ,name)) | 6750 | no-custom)))) |
| 6684 | (list | ||
| 6685 | 'function | ||
| 6686 | ;; Weary. | ||
| 6687 | (list 'function (car rest) (cadr rest))) | ||
| 6688 | no-custom)) | ||
| 6689 | ((listp rest) | ||
| 6690 | ;; A list of parameters. | ||
| 6691 | (cond | ||
| 6692 | ((assq 'same-window rest) | ||
| 6693 | (display-buffer-alist-add | ||
| 6694 | `((name . ,name)) | ||
| 6695 | (list 'reuse-window | ||
| 6696 | (list 'reuse-window 'same) | ||
| 6697 | (list 'reuse-window-dedicated 'weak)) | ||
| 6698 | no-custom)) | ||
| 6699 | ((assq 'same-frame rest) | ||
| 6700 | (display-buffer-alist-add | ||
| 6701 | `((name . ,name)) (list 'same-frame) no-custom)) | ||
| 6702 | (t | ||
| 6703 | (display-buffer-alist-add | ||
| 6704 | `((name . ,name)) | ||
| 6705 | (list | ||
| 6706 | 'function | ||
| 6707 | (list 'function special-display-function | ||
| 6708 | special-display-frame-alist)) | ||
| 6709 | no-custom))))))))) | ||
| 6710 | 6751 | ||
| 6711 | ;; `special-display-buffer-names' | 6752 | ;; `special-display-buffer-names' |
| 6712 | (dolist (entry special-display-buffer-names) | 6753 | (if (display-buffer-alist-of-strings-p special-display-buffer-names) |
| 6713 | (cond | 6754 | ;; Handle case where `special-display-buffer-names' is a plain |
| 6714 | ((stringp entry) | 6755 | ;; list of strings specially. |
| 6715 | ;; Plain string. | 6756 | (let (list) |
| 6716 | (display-buffer-alist-add | 6757 | (dolist (name special-display-buffer-names) |
| 6717 | `((name . ,entry)) | 6758 | (setq list (cons (cons 'name name) list))) |
| 6718 | (list | 6759 | (setq list (nreverse list)) |
| 6719 | 'function | 6760 | (display-buffer-alist-add |
| 6720 | (list 'function special-display-function | 6761 | list (display-buffer-alist-set-1) no-custom)) |
| 6721 | special-display-frame-alist)) | 6762 | ;; Else iterate over the entries. |
| 6722 | no-custom)) | 6763 | (dolist (item special-display-buffer-names) |
| 6723 | ((consp entry) | 6764 | (if (stringp item) |
| 6724 | (let ((name (car entry)) | 6765 | (display-buffer-alist-add |
| 6725 | (rest (cdr entry))) | 6766 | `((name . ,item)) (display-buffer-alist-set-1) |
| 6726 | (cond | 6767 | no-custom) |
| 6727 | ((functionp (car rest)) | 6768 | (display-buffer-alist-add |
| 6728 | ;; A function. | 6769 | `((name . ,(car item))) |
| 6729 | (display-buffer-alist-add | 6770 | (display-buffer-alist-set-2 (cdr item)) |
| 6730 | `((name . ,name)) | 6771 | no-custom)))) |
| 6731 | (list | ||
| 6732 | 'function | ||
| 6733 | ;; Weary. | ||
| 6734 | (list 'function (car rest) (cadr rest))) | ||
| 6735 | no-custom)) | ||
| 6736 | ((listp rest) | ||
| 6737 | ;; A list of parameters. | ||
| 6738 | (cond | ||
| 6739 | ((assq 'same-window rest) | ||
| 6740 | (display-buffer-alist-add | ||
| 6741 | `((name . ,name)) | ||
| 6742 | (list 'reuse-window | ||
| 6743 | (list 'reuse-window 'same) | ||
| 6744 | (list 'reuse-window-dedicated 'weak)) | ||
| 6745 | no-custom)) | ||
| 6746 | ((assq 'same-frame rest) | ||
| 6747 | (display-buffer-alist-add | ||
| 6748 | `((name . ,name)) (list 'same-frame) no-custom)) | ||
| 6749 | (t | ||
| 6750 | (display-buffer-alist-add | ||
| 6751 | `((name . ,name)) | ||
| 6752 | (list | ||
| 6753 | 'function | ||
| 6754 | (list 'function special-display-function | ||
| 6755 | special-display-frame-alist)) | ||
| 6756 | no-custom))))))))) | ||
| 6757 | 6772 | ||
| 6758 | ;; `same-window-regexps' | 6773 | ;; `same-window-regexps' |
| 6759 | (dolist (entry same-window-regexps) | 6774 | (if (display-buffer-alist-of-strings-p same-window-regexps) |
| 6760 | (cond | 6775 | ;; Handle case where `same-window-regexps' is a plain list of |
| 6761 | ((stringp entry) | 6776 | ;; strings specially. |
| 6762 | (display-buffer-alist-add | 6777 | (let (list) |
| 6763 | `((regexp . ,entry)) | 6778 | (dolist (regexp same-window-regexps) |
| 6764 | (list 'reuse-window (list 'reuse-window 'same)) | 6779 | (setq list (cons (cons 'regexp regexp) list))) |
| 6765 | no-custom)) | 6780 | (setq list (nreverse list)) |
| 6766 | ((consp entry) | 6781 | (display-buffer-alist-add |
| 6782 | list '(reuse-window (reuse-window same nil nil)) no-custom)) | ||
| 6783 | (dolist (entry same-window-regexps) | ||
| 6767 | (display-buffer-alist-add | 6784 | (display-buffer-alist-add |
| 6768 | `((regexp . ,(car entry))) | 6785 | `((regexp . ,(if (stringp entry) entry (car entry)))) |
| 6769 | (list 'reuse-window (list 'reuse-window 'same)) | 6786 | '(reuse-window (reuse-window same nil nil)) no-custom))) |
| 6770 | no-custom)))) | ||
| 6771 | 6787 | ||
| 6772 | ;; `same-window-buffer-names' | 6788 | ;; `same-window-buffer-names' |
| 6773 | (dolist (entry same-window-buffer-names) | 6789 | (if (display-buffer-alist-of-strings-p same-window-buffer-names) |
| 6774 | (cond | 6790 | ;; Handle case where `same-window-buffer-names' is a plain list |
| 6775 | ((stringp entry) | 6791 | ;; of strings specially. |
| 6792 | (let (list) | ||
| 6793 | (dolist (name same-window-buffer-names) | ||
| 6794 | (setq list (cons (cons 'name name) list))) | ||
| 6795 | (setq list (nreverse list)) | ||
| 6796 | (display-buffer-alist-add | ||
| 6797 | list '(reuse-window (reuse-window same nil nil)) no-custom)) | ||
| 6798 | (dolist (entry same-window-buffer-names) | ||
| 6776 | (display-buffer-alist-add | 6799 | (display-buffer-alist-add |
| 6777 | `((name . ,entry)) | 6800 | `((name . ,(if (stringp entry) entry (car entry)))) |
| 6778 | (list 'reuse-window (list 'reuse-window 'same)) | 6801 | '(reuse-window (reuse-window same nil nil)) no-custom))) |
| 6779 | no-custom)) | ||
| 6780 | ((consp entry) | ||
| 6781 | (display-buffer-alist-add | ||
| 6782 | `((name . ,(car entry))) | ||
| 6783 | (list 'reuse-window (list 'reuse-window 'same)) | ||
| 6784 | no-custom)))) | ||
| 6785 | 6802 | ||
| 6786 | ;; `reuse-window' | 6803 | ;; `reuse-window' |
| 6787 | (display-buffer-alist-add | 6804 | (display-buffer-alist-add |
| 6788 | nil | 6805 | nil `(reuse-window |
| 6789 | (list | 6806 | (reuse-window |
| 6790 | 'reuse-window | 6807 | nil same |
| 6791 | (list 'reuse-window nil 'same | 6808 | ,(when (or display-buffer-reuse-frames pop-up-frames) |
| 6792 | (when (or display-buffer-reuse-frames pop-up-frames) | 6809 | ;; "0" (all visible and iconified frames) is |
| 6793 | ;; "0" (all visible and iconified frames) is hardcoded in | 6810 | ;; hardcoded in Emacs 23. |
| 6794 | ;; Emacs 23. | 6811 | 0))) |
| 6795 | 0)) | ||
| 6796 | (when even-window-heights | ||
| 6797 | (cons 'reuse-window-even-sizes t))) | ||
| 6798 | no-custom) | 6812 | no-custom) |
| 6799 | 6813 | ||
| 6800 | ;; `display-buffer-mark-dedicated' | 6814 | display-buffer-alist)) |
| 6801 | (when display-buffer-mark-dedicated | ||
| 6802 | (display-buffer-alist-add | ||
| 6803 | nil | ||
| 6804 | (list | ||
| 6805 | (cons 'dedicate display-buffer-mark-dedicated)) | ||
| 6806 | no-custom))) | ||
| 6807 | |||
| 6808 | display-buffer-alist) | ||
| 6809 | 6815 | ||
| 6810 | (defun set-window-text-height (window height) | 6816 | (defun set-window-text-height (window height) |
| 6811 | "Set the height in lines of the text display area of WINDOW to HEIGHT. | 6817 | "Set the height in lines of the text display area of WINDOW to HEIGHT. |
diff --git a/src/ChangeLog b/src/ChangeLog index f7f68b41838..30af92a57e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -106,6 +106,8 @@ | |||
| 106 | (gs_load): Use printmax_t to print the widest integers possible. | 106 | (gs_load): Use printmax_t to print the widest integers possible. |
| 107 | Check for integer overflow when computing image height and width. | 107 | Check for integer overflow when computing image height and width. |
| 108 | 108 | ||
| 109 | 2011-07-19 Paul Eggert <eggert@cs.ucla.edu> | ||
| 110 | |||
| 109 | Integer signedness and overflow and related fixes. (Bug#9079) | 111 | Integer signedness and overflow and related fixes. (Bug#9079) |
| 110 | 112 | ||
| 111 | * bidi.c: Integer size and overflow fixes. | 113 | * bidi.c: Integer size and overflow fixes. |
| @@ -303,6 +305,24 @@ | |||
| 303 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally | 305 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally |
| 304 | well either way, and we prefer signed to unsigned. | 306 | well either way, and we prefer signed to unsigned. |
| 305 | 307 | ||
| 308 | 2011-07-19 Paul Eggert <eggert@cs.ucla.edu> | ||
| 309 | |||
| 310 | Port to OpenBSD. | ||
| 311 | See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html | ||
| 312 | and the surrounding thread. | ||
| 313 | * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar | ||
| 314 | rather than fgets, and retry after EINTR. Otherwise, 'emacs | ||
| 315 | --batch -f byte-compile-file' fails on OpenBSD if an inactivity | ||
| 316 | timer goes off. | ||
| 317 | * s/openbsd.h (BROKEN_SIGIO): Define. | ||
| 318 | * unexelf.c (unexec) [__OpenBSD__]: | ||
| 319 | Don't update the .mdebug section of the Alpha COFF symbol table. | ||
| 320 | |||
| 321 | 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 322 | |||
| 323 | * lread.c (syms_of_lread): Clarify when `lexical-binding' is used | ||
| 324 | (bug#8460). | ||
| 325 | |||
| 306 | 2011-07-18 Paul Eggert <eggert@cs.ucla.edu> | 326 | 2011-07-18 Paul Eggert <eggert@cs.ucla.edu> |
| 307 | 327 | ||
| 308 | * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask. | 328 | * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask. |
diff --git a/src/lread.c b/src/lread.c index c0de95dd121..0613ad037bf 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4491,10 +4491,9 @@ to load. See also `load-dangerous-libraries'. */); | |||
| 4491 | Qlexical_binding = intern ("lexical-binding"); | 4491 | Qlexical_binding = intern ("lexical-binding"); |
| 4492 | staticpro (&Qlexical_binding); | 4492 | staticpro (&Qlexical_binding); |
| 4493 | DEFVAR_LISP ("lexical-binding", Vlexical_binding, | 4493 | DEFVAR_LISP ("lexical-binding", Vlexical_binding, |
| 4494 | doc: /* If non-nil, use lexical binding when evaluating code. | 4494 | doc: /* Whether to use lexical binding when evaluating code. |
| 4495 | This applies to code evaluated by `eval-buffer' and `eval-region' and | 4495 | Non-nil means that the code in the current buffer should be evaluated |
| 4496 | other commands that call these functions, like `eval-defun' and | 4496 | with lexical binding. |
| 4497 | the like. | ||
| 4498 | This variable is automatically set from the file variables of an | 4497 | This variable is automatically set from the file variables of an |
| 4499 | interpreted Lisp file read using `load'. */); | 4498 | interpreted Lisp file read using `load'. */); |
| 4500 | Fmake_variable_buffer_local (Qlexical_binding); | 4499 | Fmake_variable_buffer_local (Qlexical_binding); |
diff --git a/src/minibuf.c b/src/minibuf.c index 951bf028c38..eb564a10ec6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <errno.h> | ||
| 22 | #include <stdio.h> | 23 | #include <stdio.h> |
| 23 | #include <setjmp.h> | 24 | #include <setjmp.h> |
| 24 | 25 | ||
| @@ -236,8 +237,9 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, | |||
| 236 | int allow_props, int inherit_input_method) | 237 | int allow_props, int inherit_input_method) |
| 237 | { | 238 | { |
| 238 | ptrdiff_t size, len; | 239 | ptrdiff_t size, len; |
| 239 | char *line, *s; | 240 | char *line; |
| 240 | Lisp_Object val; | 241 | Lisp_Object val; |
| 242 | int c; | ||
| 241 | 243 | ||
| 242 | fprintf (stdout, "%s", SDATA (prompt)); | 244 | fprintf (stdout, "%s", SDATA (prompt)); |
| 243 | fflush (stdout); | 245 | fflush (stdout); |
| @@ -246,22 +248,30 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, | |||
| 246 | size = 100; | 248 | size = 100; |
| 247 | len = 0; | 249 | len = 0; |
| 248 | line = (char *) xmalloc (size); | 250 | line = (char *) xmalloc (size); |
| 249 | while ((s = fgets (line + len, size - len, stdin)) != NULL | 251 | |
| 250 | && (len = strlen (line), | 252 | while ((c = getchar ()) != '\n') |
| 251 | len == size - 1 && line[len - 1] != '\n')) | ||
| 252 | { | 253 | { |
| 253 | if (STRING_BYTES_BOUND / 2 < size) | 254 | if (c < 0) |
| 254 | memory_full (SIZE_MAX); | 255 | { |
| 255 | size *= 2; | 256 | if (errno != EINTR) |
| 256 | line = (char *) xrealloc (line, size); | 257 | break; |
| 258 | } | ||
| 259 | else | ||
| 260 | { | ||
| 261 | if (len == size) | ||
| 262 | { | ||
| 263 | if (STRING_BYTES_BOUND / 2 < size) | ||
| 264 | memory_full (SIZE_MAX); | ||
| 265 | size *= 2; | ||
| 266 | line = (char *) xrealloc (line, size); | ||
| 267 | } | ||
| 268 | line[len++] = c; | ||
| 269 | } | ||
| 257 | } | 270 | } |
| 258 | 271 | ||
| 259 | if (s) | 272 | if (len) |
| 260 | { | 273 | { |
| 261 | char *nl = strchr (line, '\n'); | 274 | val = make_string (line, len); |
| 262 | if (nl) | ||
| 263 | *nl = '\0'; | ||
| 264 | val = build_string (line); | ||
| 265 | xfree (line); | 275 | xfree (line); |
| 266 | } | 276 | } |
| 267 | else | 277 | else |
diff --git a/src/s/openbsd.h b/src/s/openbsd.h index 175d61dc9c9..0a8bab2290f 100644 --- a/src/s/openbsd.h +++ b/src/s/openbsd.h | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | /* System file for openbsd. */ | 1 | /* System file for openbsd. */ |
| 2 | 2 | ||
| 3 | /* The same as NetBSD. Note there are differences in configure. */ | 3 | /* Nearly the same as NetBSD. Note there are differences in configure. */ |
| 4 | #include "netbsd.h" | 4 | #include "netbsd.h" |
| 5 | 5 | ||
| 6 | /* The symbol SIGIO is defined, but the feature doesn't work in the | ||
| 7 | way Emacs needs it to. See | ||
| 8 | <http://article.gmane.org/gmane.os.openbsd.ports/46831>. */ | ||
| 9 | #define BROKEN_SIGIO | ||
diff --git a/src/unexelf.c b/src/unexelf.c index 951e7c0eea6..a169ffcb5c8 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -1053,7 +1053,7 @@ temacs: | |||
| 1053 | memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src, | 1053 | memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src, |
| 1054 | NEW_SECTION_H (nn).sh_size); | 1054 | NEW_SECTION_H (nn).sh_size); |
| 1055 | 1055 | ||
| 1056 | #ifdef __alpha__ | 1056 | #if defined __alpha__ && !defined __OpenBSD__ |
| 1057 | /* Update Alpha COFF symbol table: */ | 1057 | /* Update Alpha COFF symbol table: */ |
| 1058 | if (strcmp (old_section_names + OLD_SECTION_H (n).sh_name, ".mdebug") | 1058 | if (strcmp (old_section_names + OLD_SECTION_H (n).sh_name, ".mdebug") |
| 1059 | == 0) | 1059 | == 0) |
| @@ -1072,7 +1072,7 @@ temacs: | |||
| 1072 | symhdr->cbRfdOffset += new_data2_size; | 1072 | symhdr->cbRfdOffset += new_data2_size; |
| 1073 | symhdr->cbExtOffset += new_data2_size; | 1073 | symhdr->cbExtOffset += new_data2_size; |
| 1074 | } | 1074 | } |
| 1075 | #endif /* __alpha__ */ | 1075 | #endif /* __alpha__ && !__OpenBSD__ */ |
| 1076 | 1076 | ||
| 1077 | #if defined (_SYSTYPE_SYSV) | 1077 | #if defined (_SYSTYPE_SYSV) |
| 1078 | if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG | 1078 | if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG |