Commit 63cf7836 authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from intsign.

parents 7403ff04 0d8de0fd
......@@ -123,132 +123,136 @@ names of the people who have checked it.
SECTION READERS
----------------------------------
etc/TUTORIAL rgm (but see Bug#3783)
etc/TUTORIAL.bg
etc/TUTORIAL.cn
etc/TUTORIAL.cs
etc/TUTORIAL.de Werner Lemberg
etc/TUTORIAL.eo
etc/TUTORIAL.es
etc/TUTORIAL.fr
etc/TUTORIAL.it
etc/TUTORIAL.ja
etc/TUTORIAL.ko
etc/TUTORIAL.nl
etc/TUTORIAL.pl
etc/TUTORIAL.pt_BR
etc/TUTORIAL.ro
etc/TUTORIAL.ru
etc/TUTORIAL.sk
etc/TUTORIAL.sl
etc/TUTORIAL.sv
etc/TUTORIAL.th
etc/TUTORIAL.zh
TUTORIAL
TUTORIAL.bg
TUTORIAL.cn
TUTORIAL.cs
TUTORIAL.de
TUTORIAL.eo
TUTORIAL.es
TUTORIAL.fr
TUTORIAL.he
TUTORIAL.it
TUTORIAL.ja
TUTORIAL.ko
TUTORIAL.nl
TUTORIAL.pl
TUTORIAL.pt_BR
TUTORIAL.ro
TUTORIAL.ru
TUTORIAL.sk
TUTORIAL.sl
TUTORIAL.sv
TUTORIAL.th
TUTORIAL.zh
** Check the manual.
abbrevs.texi -- cyd
ack.texi -- rgm
abbrevs.texi
ack.texi
anti.texi
arevert-xtra.texi
basic.texi -- cyd
buffers.texi -- cyd
building.texi -- cyd
calendar.texi -- rgm
cal-xtra.texi -- rgm
cmdargs.texi -- cyd
commands.texi -- cyd
custom.texi -- cyd
dired.texi -- cyd
basic.texi
buffers.texi
building.texi
calendar.texi
cal-xtra.texi
cmdargs.texi
commands.texi
custom.texi
dired.texi
dired-xtra.texi
display.texi -- cyd
emacs.texi -- cyd
display.texi
emacs.texi
emacs-xtra.texi
emerge-xtra.texi
entering.texi -- cyd
files.texi -- cyd
fixit.texi -- cyd
fortran-xtra.texi -- rgm
frames.texi -- cyd
entering.texi
files.texi
fixit.texi
fortran-xtra.texi
frames.texi
glossary.texi
help.texi -- cyd
indent.texi -- cyd
killing.texi -- cyd
kmacro.texi -- cyd
macos.texi -- davidswelt
maintaining.texi -- cyd
major.texi -- cyd
mark.texi -- cyd
mini.texi -- cyd
misc.texi -- cyd
msdog.texi -- eliz
msdog-xtra.texi -- eliz
mule.texi -- cyd
m-x.texi -- cyd
programs.texi -- cyd
regs.texi -- cyd
rmail.texi -- rgm
screen.texi -- cyd
search.texi -- cyd
sending.texi -- rgm (maybe needs some brief mailclient.el details in
"Mail Sending" section?)
text.texi -- cyd
trouble.texi -- cyd
windows.texi -- rudalics
xresources.texi -- cyd
help.texi
indent.texi
killing.texi
kmacro.texi
macos.texi
maintaining.texi
major.texi
mark.texi
mini.texi
misc.texi
msdog.texi
msdog-xtra.texi
mule.texi
m-x.texi
picture-xtra.texi
programs.texi
regs.texi
rmail.texi
screen.texi
search.texi
sending.texi
text.texi
trouble.texi
vc-xtra.texi
vc1-xtra.texi
windows.texi
xresources.texi
** Check the Lisp manual.
abbrevs.texi -- cyd
advice.texi -- cyd
anti.texi -- cyd
abbrevs.texi
advice.texi
anti.texi
back.texi
backups.texi -- cyd
buffers.texi -- cyd
commands.texi -- cyd
compile.texi -- cyd
control.texi -- cyd
customize.texi -- cyd
debugging.texi -- cyd
display.texi -- cyd
backups.texi
buffers.texi
commands.texi
compile.texi
control.texi
customize.texi
debugging.texi
display.texi
edebug.texi
elisp.texi
errors.texi -- cyd
eval.texi -- cyd
files.texi -- cyd
frames.texi -- cyd
functions.texi -- cyd
hash.texi -- cyd
help.texi -- cyd
hooks.texi -- cyd
errors.texi
eval.texi
files.texi
frames.texi
functions.texi
hash.texi
help.texi
hooks.texi
index.texi
internals.texi -- cyd
intro.texi -- cyd
keymaps.texi -- cyd
lists.texi -- cyd
loading.texi -- cyd
locals.texi -- cyd
macros.texi -- cyd
maps.texi -- cyd
markers.texi -- cyd
minibuf.texi -- cyd
modes.texi -- cyd
nonascii.texi -- cyd
numbers.texi -- cyd
objects.texi -- cyd
os.texi -- cyd
positions.texi -- cyd
internals.texi
intro.texi
keymaps.texi
lists.texi
loading.texi
locals.texi
macros.texi
maps.texi
markers.texi
minibuf.texi
modes.texi
nonascii.texi
numbers.texi
objects.texi
os.texi
package.texi
positions.texi
processes.texi
searching.texi -- cyd
sequences.texi -- cyd
streams.texi -- cyd
strings.texi -- cyd
symbols.texi -- cyd
syntax.texi -- cyd
text.texi -- cyd
tips.texi -- cyd
variables.texi -- cyd
windows.texi -- rudalics
searching.texi
sequences.texi
streams.texi
strings.texi
symbols.texi
syntax.texi
text.texi
tips.texi
variables.texi
windows.texi
* PLANNED ADDITIONS
......
2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
* view.el (view-buffer): Allow running in `special' modes if we're
visiting a file (bug#8615).
2011-07-19 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-alist-of-strings-p)
(display-buffer-alist-set-1, display-buffer-alist-set-2): New
functions.
(display-buffer-alist-set): Rewrite to handle Emacs 23 options
more accurately.
2011-07-18 Alan Mackenzie <acm@muc.de>
Fontify declarators properly when, e.g., a jit-lock chunk begins
......
......@@ -311,9 +311,10 @@ file: Users may suspend viewing in order to modify the buffer.
Exiting View mode will then discard the user's edits. Setting
EXIT-ACTION to `kill-buffer-if-not-modified' avoids this."
(interactive "bView buffer: ")
(if (eq (with-current-buffer buffer
(get major-mode 'mode-class))
'special)
(if (with-current-buffer buffer
(and (eq (get major-mode 'mode-class)
'special)
(null buffer-file-name)))
(progn
(switch-to-buffer buffer)
(message "Not using View mode because the major mode is special"))
......
......@@ -6588,6 +6588,15 @@ split."
;; Functions for converting Emacs 23 buffer display options to buffer
;; display specifiers.
(defun display-buffer-alist-of-strings-p (list)
"Return t if LIST is a non-empty list of strings."
(when list
(catch 'failed
(dolist (item list)
(unless (stringp item)
(throw 'failed nil)))
t)))
(defun display-buffer-alist-add (identifiers specifiers &optional no-custom)
"Helper function for `display-buffer-alist-set'."
(unless identifiers
......@@ -6602,6 +6611,40 @@ split."
'display-buffer-alist
(cons (cons identifiers specifiers) display-buffer-alist))))
(defun display-buffer-alist-set-1 ()
"Helper function for `display-buffer-alist-set'."
(progn ;; with-no-warnings
(append
'(reuse-window (reuse-window nil same 0))
`(pop-up-frame (pop-up-frame t)
,(append '(pop-up-frame-alist)
special-display-frame-alist))
'((dedicate . weak)))))
(defun display-buffer-alist-set-2 (args)
"Helper function for `display-buffer-alist-set'."
(progn ;; with-no-warnings
(if (and (listp args) (symbolp (car args)))
`(function (function ,(car args) ,(cdr args)))
(append
'(reuse-window (reuse-window nil same 0))
(when (and (listp args) (cdr (assq 'same-window args)))
'(reuse-window
(reuse-window same nil nil) (reuse-window-dedicated . weak)))
(when (and (listp args)
(or (cdr (assq 'same-frame args))
(cdr (assq 'same-window args))))
'(pop-up-window (pop-up-window (largest . nil) (lru . nil))))
(when (and (listp args)
(or (cdr (assq 'same-frame args))
(cdr (assq 'same-window args))))
'(reuse-window (reuse-window nil nil nil)))
`(pop-up-frame (pop-up-frame t)
,(append '(pop-up-frame-alist)
(when (listp args) args)
special-display-frame-alist))
'((dedicate . weak))))))
(defun display-buffer-alist-set (&optional no-custom add)
"Set `display-buffer-alist' from Emacs 23 buffer display options.
Optional argument NO-CUSTOM nil means use `customize-set-variable'
......@@ -6611,201 +6654,164 @@ means to use `setq' instead.
Optional argument ADD nil means to replace the actual value of
`display-buffer-alist' with the value calculated here. ADD
non-nil means prepend the value calculated here to the current
value of `display-buffer-alist'."
value of `display-buffer-alist'. Return `display-buffer-alist'."
(unless add
(if no-custom
(setq display-buffer-alist nil)
(customize-set-variable 'display-buffer-alist nil)))
;; Disable warnings, there are too many obsolete options here.
(with-no-warnings
;; `pop-up-windows'
(display-buffer-alist-add
nil
(let ((fun (unless (eq split-window-preferred-function
'split-window-sensibly)
;; `split-window-sensibly' has been merged into the
;; `display-buffer-split-window' code as `nil'.
split-window-preferred-function))
(min-height
(if (numberp split-height-threshold)
(/ split-height-threshold 2)
;; Undocumented hack.
1.0))
(min-width
(if (numberp split-width-threshold)
(/ split-width-threshold 2)
;; Undocumented hack.
1.0)))
(list
'pop-up-window
(when pop-up-windows
(list
'pop-up-window
(cons 'largest fun)
(cons 'lru fun)))
(cons 'pop-up-window-min-height min-height)
(cons 'pop-up-window-min-width min-width)))
no-custom)
(progn ;; with-no-warnings
`other-window-means-other-frame'
(when pop-up-frames
(display-buffer-alist-add
nil '(pop-up-frame
(other-window-means-other-frame . t)) no-custom))
;; `pop-up-frames'
(display-buffer-alist-add
nil
(list
'pop-up-frame
(when pop-up-frames
(list 'pop-up-frame pop-up-frames))
(when pop-up-frame-function
(cons 'pop-up-frame-function pop-up-frame-function))
(when pop-up-frame-alist
(cons 'pop-up-frame-alist pop-up-frame-alist)))
no-custom)
;; `reuse-window-even-sizes'
(when even-window-heights
(display-buffer-alist-add
nil '(reuse-window (reuse-window-even-sizes . t)) no-custom))
;; `dedicate'
(when display-buffer-mark-dedicated
(display-buffer-alist-add
nil '(dedicate (display-buffer-mark-dedicated . t)) no-custom))
;; `pop-up-window' group
(let ((fun (unless (eq split-window-preferred-function
'split-window-sensibly)
split-window-preferred-function))
(min-height
(if (numberp split-height-threshold)
(/ split-height-threshold 2)
1.0))
(min-width
(if (numberp split-width-threshold)
(/ split-width-threshold 2)
1.0)))
(display-buffer-alist-add
nil
(list
'pop-up-window
;; `pop-up-window'
(when pop-up-windows
(list 'pop-up-window (cons 'largest fun) (cons 'lru fun)))
;; `pop-up-window-min-height'
(cons 'pop-up-window-min-height min-height)
;; `pop-up-window-min-width'
(cons 'pop-up-window-min-width min-width))
no-custom))
;; `pop-up-frame' group
(when (or pop-up-frames
(not (equal pop-up-frame-function
'(lambda nil
(make-frame pop-up-frame-alist))))
pop-up-frame-alist)
(display-buffer-alist-add
nil
(list
'pop-up-frame
(when pop-up-frames
;; `pop-up-frame'
(list 'pop-up-frame
(when (eq pop-up-frames 'graphic-only)
t)))
(unless (equal pop-up-frame-function
'(lambda nil
(make-frame pop-up-frame-alist)))
;; `pop-up-frame-function'
(cons 'pop-up-frame-function pop-up-frame-function))
(when pop-up-frame-alist
;; `pop-up-frame-alist'
(cons 'pop-up-frame-alist pop-up-frame-alist)))
no-custom))
;; `special-display-regexps'
(dolist (entry special-display-regexps)
(cond
((stringp entry)
;; Plain string.
(display-buffer-alist-add
`((regexp . ,entry))
(list
'function
(list 'function special-display-function
special-display-frame-alist))
no-custom))
((consp entry)
(let ((name (car entry))
(rest (cdr entry)))
(cond
((functionp (car rest))
;; A function.
(display-buffer-alist-add
`((name . ,name))
(list
'function
;; Weary.
(list 'function (car rest) (cadr rest)))
no-custom))
((listp rest)
;; A list of parameters.
(cond
((assq 'same-window rest)
(display-buffer-alist-add
`((name . ,name))
(list 'reuse-window
(list 'reuse-window 'same)
(list 'reuse-window-dedicated 'weak))
no-custom))
((assq 'same-frame rest)
(display-buffer-alist-add
`((name . ,name)) (list 'same-frame) no-custom))
(t
(display-buffer-alist-add
`((name . ,name))
(list
'function
(list 'function special-display-function
special-display-frame-alist))
no-custom)))))))))
(if (display-buffer-alist-of-strings-p special-display-regexps)
;; Handle case where `special-display-regexps' is a plain list
;; of strings specially.
(let (list)
(dolist (regexp special-display-regexps)
(setq list (cons (cons 'regexp regexp) list)))
(setq list (nreverse list))
(display-buffer-alist-add
list (display-buffer-alist-set-1) no-custom))
;; Else iterate over the entries.
(dolist (item special-display-regexps)
(if (stringp item)
(display-buffer-alist-add
`((regexp . ,item)) (display-buffer-alist-set-1)
no-custom)
(display-buffer-alist-add
`((regexp . ,(car item)))
(display-buffer-alist-set-2 (cdr item))
no-custom))))
;; `special-display-buffer-names'
(dolist (entry special-display-buffer-names)
(cond
((stringp entry)
;; Plain string.
(display-buffer-alist-add
`((name . ,entry))
(list
'function
(list 'function special-display-function
special-display-frame-alist))
no-custom))
((consp entry)
(let ((name (car entry))
(rest (cdr entry)))
(cond
((functionp (car rest))
;; A function.
(display-buffer-alist-add
`((name . ,name))
(list
'function
;; Weary.
(list 'function (car rest) (cadr rest)))
no-custom))
((listp rest)
;; A list of parameters.
(cond
((assq 'same-window rest)
(display-buffer-alist-add
`((name . ,name))
(list 'reuse-window
(list 'reuse-window 'same)
(list 'reuse-window-dedicated 'weak))
no-custom))
((assq 'same-frame rest)
(display-buffer-alist-add
`((name . ,name)) (list 'same-frame) no-custom))
(t
(display-buffer-alist-add
`((name . ,name))
(list
'function
(list 'function special-display-function
special-display-frame-alist))
no-custom)))))))))
(if (display-buffer-alist-of-strings-p special-display-buffer-names)
;; Handle case where `special-display-buffer-names' is a plain
;; list of strings specially.
(let (list)
(dolist (name special-display-buffer-names)
(setq list (cons (cons 'name name) list)))
(setq list (nreverse list))
(display-buffer-alist-add
list (display-buffer-alist-set-1) no-custom))
;; Else iterate over the entries.
(dolist (item special-display-buffer-names)
(if (stringp item)
(display-buffer-alist-add
`((name . ,item)) (display-buffer-alist-set-1)
no-custom)
(display-buffer-alist-add
`((name . ,(car item)))
(display-buffer-alist-set-2 (cdr item))
no-custom))))
;; `same-window-regexps'
(dolist (entry same-window-regexps)
(cond
((stringp entry)
(display-buffer-alist-add
`((regexp . ,entry))
(list 'reuse-window (list 'reuse-window 'same))
no-custom))
((consp entry)
(if (display-buffer-alist-of-strings-p same-window-regexps)
;; Handle case where `same-window-regexps' is a plain list of
;; strings specially.
(let (list)
(dolist (regexp same-window-regexps)
(setq list (cons (cons 'regexp regexp) list)))
(setq list (nreverse list))
(display-buffer-alist-add
list '(reuse-window (reuse-window same nil nil)) no-custom))
(dolist (entry same-window-regexps)
(display-buffer-alist-add
`((regexp . ,(car entry)))
(list 'reuse-window (list 'reuse-window 'same))
no-custom))))
`((regexp . ,(if (stringp entry) entry (car entry))))
'(reuse-window (reuse-window same nil nil)) no-custom)))
;; `same-window-buffer-names'
(dolist (entry same-window-buffer-names)
(cond
((stringp entry)
(if (display-buffer-alist-of-strings-p same-window-buffer-names)
;; Handle case where `same-window-buffer-names' is a plain list
;; of strings specially.
(let (list)
(dolist (name same-window-buffer-names)
(setq list (cons (cons 'name name) list)))
(setq list (nreverse list))
(display-buffer-alist-add
list '(reuse-window (reuse-window same nil nil)) no-custom))
(dolist (entry same-window-buffer-names)
(display-buffer-alist-add
`((name . ,entry))
(list 'reuse-window (list 'reuse-window 'same))
no-custom))
((consp entry)
(display-buffer-alist-add
`((name . ,(car entry)))
(list 'reuse-window (list 'reuse-window 'same))
no-custom))))
`((name . ,(if (stringp entry) entry (car entry))))
'(reuse-window (reuse-window same nil nil)) no-custom)))
;; `reuse-window'
(display-buffer-alist-add
nil
(list
'reuse-window
(list 'reuse-window nil 'same
(when (or display-buffer-reuse-frames pop-up-frames)
;; "0" (all visible and iconified frames) is hardcoded in
;; Emacs 23.
0))
(when even-window-heights
(cons 'reuse-window-even-sizes t)))
nil `(reuse-window
(reuse-window
nil same
,(when (or display-buffer-reuse-frames pop-up-frames)
;; "0" (all visible and iconified frames) is
;; hardcoded in Emacs 23.
0)))
no-custom)