aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2011-11-09 14:05:54 +0100
committerJoakim Verona2011-11-09 14:05:54 +0100
commitc8d4b74cfa26762d34fd1703a07463008b32be16 (patch)
tree6610ac356d47e328bb1094d9f5a0dcc15ed5fb6a /lisp
parent32db4845d5c433fd15c6665cbed169e5d8b94f05 (diff)
parent2cffd68198c4d574f073ab238dc12b1221005eab (diff)
downloademacs-c8d4b74cfa26762d34fd1703a07463008b32be16.tar.gz
emacs-c8d4b74cfa26762d34fd1703a07463008b32be16.zip
upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog53
-rw-r--r--lisp/calendar/cal-menu.el12
-rw-r--r--lisp/delim-col.el2
-rw-r--r--lisp/emacs-lisp/find-func.el40
-rw-r--r--lisp/emulation/edt.el2
-rw-r--r--lisp/generic-x.el2
-rw-r--r--lisp/gnus/smime.el2
-rw-r--r--lisp/international/robin.el2
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/org/org-agenda.el24
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/delphi.el4
-rw-r--r--lisp/progmodes/gdb-mi.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el2
-rw-r--r--lisp/rot13.el2
-rw-r--r--lisp/textmodes/reftex-parse.el2
-rw-r--r--lisp/textmodes/rst.el4
-rw-r--r--lisp/url/url-http.el2
-rw-r--r--lisp/window.el317
-rw-r--r--lisp/woman.el2
20 files changed, 258 insertions, 222 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ff61568a8f2..d0a50366eff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,56 @@
12011-11-09 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (window-size-fixed-p): Rewrite doc-string.
4 (window-resizable-p): Rename to window--resizable-p. Update
5 callers.
6 (window--resizable): New function. Make all callers of
7 window-resizable call window--resizable instead.
8 (window-resizable): Rewrite in terms of window--resizable.
9
102011-11-08 Glenn Morris <rgm@gnu.org>
11
12 * progmodes/delphi.el (delphi-mode-syntax-table):
13 Let define-derived-mode define a proper syntax table. (Bug#9994)
14
152011-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
16
17 * window.el: Stay away from defsubst.
18 (window-list-no-nils): Remove.
19 (window-state-get-1, window-state-get): Use backquote instead.
20
212011-11-08 thierry <thierry.volpiatto@gmail.com>
22
23 * emacs-lisp/find-func.el (find-function-read):
24 Fix incorrect use of default argument in `completing-read'.
25
262011-11-08 Martin Rudalics <rudalics@gmx.at>
27
28 * window.el (display-buffer-function, special-display-function):
29 Mention display-buffer-record-window but do not mention
30 help-setup parameter in doc-strings.
31 (window-min-delta): Fix doc-string typo.
32
332011-11-08 Chong Yidong <cyd@gnu.org>
34
35 * window.el (window-total-height, window-total-width): Doc fix.
36 (window-body-size): Move from C.
37 (window-body-height, window-body-width): Move to C.
38
392011-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
40
41 * window.el: Make special-display like display-buffer-alist (bug#9532).
42 (display-buffer--special-action): New function, morphed
43 from display-buffer--special.
44 (display-buffer): Use it to handle special-display-buffers at higher
45 priority (just after display-buffer-alist).
46 (display-buffer-fallback-action, display-buffer--other-frame-action)
47 (pop-to-buffer-same-window): Remove display-buffer--special.
48
492011-11-07 Glenn Morris <rgm@gnu.org>
50
51 * calendar/cal-menu.el (cal-menu-set-date-title):
52 Do nothing if not in a calendar. (Bug#9976)
53
12011-11-07 Stefan Monnier <monnier@iro.umontreal.ca> 542011-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 55
3 * files.el (find-file): Always use selected-window. 56 * files.el (find-file): Always use selected-window.
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 3ebb7edab3f..d8de171c0a1 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -215,13 +215,15 @@ is non-nil."
215;; but easymenu does not seem to allow this (?). 215;; but easymenu does not seem to allow this (?).
216;; The ignore-errors is because `documentation' can end up calling 216;; The ignore-errors is because `documentation' can end up calling
217;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862) 217;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862)
218;; This still has issues - bug#9976, so added derived-mode-p call.
218(defun cal-menu-set-date-title (menu) 219(defun cal-menu-set-date-title (menu)
219 "Convert date of last event to title suitable for MENU." 220 "Convert date of last event to title suitable for MENU."
220 (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event)))) 221 (when (derived-mode-p 'calendar-mode)
221 (if date 222 (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event))))
222 (easy-menu-filter-return menu (calendar-date-string date t nil)) 223 (if date
223 (message "Not on a date!") 224 (easy-menu-filter-return menu (calendar-date-string date t nil))
224 nil))) 225 (message "Not on a date!")
226 nil))))
225 227
226(easy-menu-define cal-menu-context-mouse-menu nil 228(easy-menu-define cal-menu-context-mouse-menu nil
227 "Pop up mouse menu for selected date in the calendar window." 229 "Pop up mouse menu for selected date in the calendar window."
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index d9f8634fb54..ed6ab96107a 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -194,7 +194,7 @@ Any other value is treated as t."
194 :tag "Column Formating" 194 :tag "Column Formating"
195 (const :tag "No Formating" nil) 195 (const :tag "No Formating" nil)
196 (const :tag "Column Alignment" t) 196 (const :tag "Column Alignment" t)
197 (const :tag "Separator Aligment" separator) 197 (const :tag "Separator Alignment" separator)
198 (const :tag "Column Padding" padding)) 198 (const :tag "Column Padding" padding))
199 :group 'columns) 199 :group 'columns)
200 200
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 08e73b32a15..070faca8d91 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -363,29 +363,23 @@ If TYPE is nil, insist on a symbol with a function definition.
363Otherwise TYPE should be `defvar' or `defface'. 363Otherwise TYPE should be `defvar' or `defface'.
364If TYPE is nil, defaults using `function-called-at-point', 364If TYPE is nil, defaults using `function-called-at-point',
365otherwise uses `variable-at-point'." 365otherwise uses `variable-at-point'."
366 (let ((symb (if (null type) 366 (let* ((symb1 (cond ((null type) (function-called-at-point))
367 (function-called-at-point) 367 ((eq type 'defvar) (variable-at-point))
368 (if (eq type 'defvar) 368 (t (variable-at-point t))))
369 (variable-at-point) 369 (symb (unless (eq symb1 0) symb1))
370 (variable-at-point t)))) 370 (predicate (cdr (assq type '((nil . fboundp)
371 (predicate (cdr (assq type '((nil . fboundp) (defvar . boundp) 371 (defvar . boundp)
372 (defface . facep))))) 372 (defface . facep)))))
373 (prompt (cdr (assq type '((nil . "function") (defvar . "variable") 373 (prompt-type (cdr (assq type '((nil . "function")
374 (defface . "face"))))) 374 (defvar . "variable")
375 (enable-recursive-minibuffers t) 375 (defface . "face")))))
376 val) 376 (prompt (concat "Find " prompt-type
377 (if (equal symb 0) 377 (and symb (format " (default %s)" symb))
378 (setq symb nil)) 378 ": "))
379 (setq val (completing-read 379 (enable-recursive-minibuffers t))
380 (concat "Find " 380 (list (intern (completing-read
381 prompt 381 prompt obarray predicate
382 (if symb 382 t nil nil (and symb (symbol-name symb)))))))
383 (format " (default %s)" symb))
384 ": ")
385 obarray predicate t nil))
386 (list (if (equal val "")
387 symb
388 (intern val)))))
389 383
390(defun find-function-do-it (symbol type switch-fn) 384(defun find-function-do-it (symbol type switch-fn)
391 "Find Emacs Lisp SYMBOL in a buffer and display it. 385 "Find Emacs Lisp SYMBOL in a buffer and display it.
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index 7ed0255d987..acdc3caa449 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -2484,7 +2484,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD <KEY>."
2484 F10: Cut Rectangle 2484 F10: Cut Rectangle
2485G-F10: Paste Rectangle 2485G-F10: Paste Rectangle
2486 F11: ESC 2486 F11: ESC
2487 F12: Begining of Line +----------+----------+----------+----------+ 2487 F12: Beginning of Line +----------+----------+----------+----------+
2488G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | 2488G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L |
2489 F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) | 2489 F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) |
2490 HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L | 2490 HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index 5205a6811f6..2c00229c76e 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -1436,7 +1436,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1436 "REGDB_APPPATH" 1436 "REGDB_APPPATH"
1437 "REGDB_BINARY" 1437 "REGDB_BINARY"
1438 "REGDB_ERR_CONNECTIONEXISTS" 1438 "REGDB_ERR_CONNECTIONEXISTS"
1439 "REGDB_ERR_CORRUPTEDREGSITRY" 1439 "REGDB_ERR_CORRUPTEDREGISTRY"
1440 "REGDB_ERR_INITIALIZATION" 1440 "REGDB_ERR_INITIALIZATION"
1441 "REGDB_ERR_INVALIDHANDLE" 1441 "REGDB_ERR_INVALIDHANDLE"
1442 "REGDB_ERR_INVALIDNAME" 1442 "REGDB_ERR_INVALIDNAME"
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 5a7079883e6..f0951b7b803 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -689,7 +689,7 @@ The following commands are available:
689 (dolist (key smime-keys) 689 (dolist (key smime-keys)
690 (insert 690 (insert
691 (format "\t\t%s: %s\n" (car key) (cadr key)))) 691 (format "\t\t%s: %s\n" (car key) (cadr key))))
692 (insert "\nTrusted Certificate Authoritys:\n") 692 (insert "\nTrusted Certificate Authorities:\n")
693 (insert "\nKnown Certificates:\n")))) 693 (insert "\nKnown Certificates:\n"))))
694 694
695(defun smime () 695(defun smime ()
diff --git a/lisp/international/robin.el b/lisp/international/robin.el
index 7e98a507f93..6f78aaede3f 100644
--- a/lisp/international/robin.el
+++ b/lisp/international/robin.el
@@ -22,7 +22,7 @@
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 24
25;;; Comentary: 25;;; Commentary:
26 26
27;; Functionalities 27;; Functionalities
28;; --------------- 28;; ---------------
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 89378497c36..9fa5eb32d43 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -774,7 +774,7 @@ to their attributes."
774 (cons 774 (cons
775 (1+ (length "password")) 775 (1+ (length "password"))
776 (mapcar 776 (mapcar
777 ;; Atribute names have a leading ":", which will be suppressed. 777 ;; Attribute names have a leading ":", which will be suppressed.
778 (lambda (attribute) (length (symbol-name (car attribute)))) 778 (lambda (attribute) (length (symbol-name (car attribute))))
779 attributes))))) 779 attributes)))))
780 (cons 780 (cons
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index aea284fe72c..53a0c5587a2 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -764,7 +764,7 @@ because you will take care of it on the day when scheduled."
764 :group 'org-agenda-skip 764 :group 'org-agenda-skip
765 :group 'org-agenda-daily/weekly 765 :group 'org-agenda-daily/weekly
766 :type '(choice 766 :type '(choice
767 (const :tag "Alwas show prewarning" nil) 767 (const :tag "Always show prewarning" nil)
768 (const :tag "Remove prewarning if entry is scheduled" t) 768 (const :tag "Remove prewarning if entry is scheduled" t)
769 (integer :tag "Restart prewarning N days before deadline"))) 769 (integer :tag "Restart prewarning N days before deadline")))
770 770
@@ -1388,13 +1388,13 @@ When nil, such items are sorted as 0 minutes effort."
1388 (tags . " %i %-12:c") 1388 (tags . " %i %-12:c")
1389 (search . " %i %-12:c")) 1389 (search . " %i %-12:c"))
1390 "Format specifications for the prefix of items in the agenda views. 1390 "Format specifications for the prefix of items in the agenda views.
1391An alist with five entries, each for the different agenda types. The 1391An alist with five entries, each for the different agenda types. The
1392keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. 1392keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'.
1393The values are format strings. 1393The values are format strings.
1394 1394
1395This format works similar to a printf format, with the following meaning: 1395This format works similar to a printf format, with the following meaning:
1396 1396
1397 %c the category of the item, \"Diary\" for entries from the diary, 1397 %c the category of the item, \"Diary\" for entries from the diary,
1398 or as given by the CATEGORY keyword or derived from the file name 1398 or as given by the CATEGORY keyword or derived from the file name
1399 %i the icon category of the item, see `org-agenda-category-icon-alist' 1399 %i the icon category of the item, see `org-agenda-category-icon-alist'
1400 %T the last tag of the item (ignore inherited tags, which come first) 1400 %T the last tag of the item (ignore inherited tags, which come first)
@@ -1408,10 +1408,10 @@ contain two additional characters: a question mark just after the `%'
1408and a whitespace/punctuation character just before the final letter. 1408and a whitespace/punctuation character just before the final letter.
1409 1409
1410If the first character after `%' is a question mark, the entire field 1410If the first character after `%' is a question mark, the entire field
1411will only be included if the corresponding value applies to the current 1411will only be included if the corresponding value applies to the current
1412entry. This is useful for fields which should have fixed width when 1412entry. This is useful for fields which should have fixed width when
1413present, but zero width when absent. For example, \"%?-12t\" will 1413present, but zero width when absent. For example, \"%?-12t\" will
1414result in a 12 character time field if a time of the day is specified, 1414result in a 12 character time field if a time of the day is specified,
1415but will completely disappear in entries which do not contain a time. 1415but will completely disappear in entries which do not contain a time.
1416 1416
1417If there is punctuation or whitespace character just before the final 1417If there is punctuation or whitespace character just before the final
@@ -1420,7 +1420,7 @@ the value is not empty. For example, the format \"%-12:c\" leads to
1420\"Diary: \" if the category is \"Diary\". If the category were be 1420\"Diary: \" if the category is \"Diary\". If the category were be
1421empty, no additional colon would be inserted. 1421empty, no additional colon would be inserted.
1422 1422
1423The default value for the agenda sublist is \" %-12:c%?-12t% s\", 1423The default value for the agenda sublist is \" %-12:c%?-12t% s\",
1424which means: 1424which means:
1425 1425
1426- Indent the line with two space characters 1426- Indent the line with two space characters
@@ -1697,7 +1697,7 @@ For example, this value makes those two functions available:
1697 (?C bulk-cut)) 1697 (?C bulk-cut))
1698 1698
1699With selected entries in an agenda buffer, `B R' will call 1699With selected entries in an agenda buffer, `B R' will call
1700the custom function `set-category' on the selected entries. 1700the custom function `set-category' on the selected entries.
1701Note that functions in this alist don't need to be quoted." 1701Note that functions in this alist don't need to be quoted."
1702 :type 'alist 1702 :type 'alist
1703 :group 'org-agenda) 1703 :group 'org-agenda)
@@ -5003,9 +5003,9 @@ See also the user option `org-agenda-clock-consistency-checks'."
5003 "\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second 5003 "\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second
5004 (tlstart 0.) 5004 (tlstart 0.)
5005 (tlend 0.) 5005 (tlend 0.)
5006 (maxtime (org-hh:mm-string-to-minutes 5006 (maxtime (org-hh:mm-string-to-minutes
5007 (or (plist-get pl :max-duration) "24:00"))) 5007 (or (plist-get pl :max-duration) "24:00")))
5008 (mintime (org-hh:mm-string-to-minutes 5008 (mintime (org-hh:mm-string-to-minutes
5009 (or (plist-get pl :min-duration) 0))) 5009 (or (plist-get pl :min-duration) 0)))
5010 (maxgap (org-hh:mm-string-to-minutes 5010 (maxgap (org-hh:mm-string-to-minutes
5011 ;; default 30:00 means never complain 5011 ;; default 30:00 means never complain
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index ad3b777977c..a79d1a2c064 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -6481,7 +6481,7 @@ are CPerl, PerlStyle, GNU, K&R, BSD, C++ and Whitesmith.
6481The current value of style is memorized (unless there is a memorized 6481The current value of style is memorized (unless there is a memorized
6482data already), may be restored by `cperl-set-style-back'. 6482data already), may be restored by `cperl-set-style-back'.
6483 6483
6484Chosing \"Current\" style will not change style, so this may be used for 6484Choosing \"Current\" style will not change style, so this may be used for
6485side-effect of memorizing only. Examples in `cperl-style-examples'." 6485side-effect of memorizing only. Examples in `cperl-style-examples'."
6486 (interactive 6486 (interactive
6487 (let ((list (mapcar (function (lambda (elt) (list (car elt)))) 6487 (let ((list (mapcar (function (lambda (elt) (list (car elt))))
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index e8e2f8ffbf0..e513b617022 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -1959,10 +1959,6 @@ comment block. If not in a // comment, just does a normal newline."
1959 kmap) 1959 kmap)
1960 "Keymap used in Delphi mode.") 1960 "Keymap used in Delphi mode.")
1961 1961
1962(defvar delphi-mode-syntax-table nil
1963 "Delphi mode's syntax table. It is just a standard syntax table.
1964This is ok since we do our own keyword/comment/string face coloring.")
1965
1966;;;###autoload 1962;;;###autoload
1967(define-derived-mode delphi-mode prog-mode "Delphi" 1963(define-derived-mode delphi-mode prog-mode "Delphi"
1968 "Major mode for editing Delphi code. \\<delphi-mode-map> 1964 "Major mode for editing Delphi code. \\<delphi-mode-map>
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index f9ddabf1552..e47ba3c92f3 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1965,7 +1965,7 @@ Sets `gdb-thread-number' to new id."
1965 (setq gud-running t) 1965 (setq gud-running t)
1966 ;; GDB doesn't seem to respond to -thread-info before first stop or 1966 ;; GDB doesn't seem to respond to -thread-info before first stop or
1967 ;; thread exit (even in non-stop mode), so this is useless. 1967 ;; thread exit (even in non-stop mode), so this is useless.
1968 ;; Behaviour may change in the future. 1968 ;; Behavior may change in the future.
1969 (gdb-emit-signal gdb-buf-publisher 'update-threads)) 1969 (gdb-emit-signal gdb-buf-publisher 'update-threads))
1970 1970
1971;; -break-insert -t didn't give a reason before gdb 6.9 1971;; -break-insert -t didn't give a reason before gdb 6.9
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index d7aa82aee1b..2f06afaa5ef 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -3510,7 +3510,7 @@ STRING are replaced by `-' and substrings are converted to lower case."
3510 menu-list)) 3510 menu-list))
3511 (setq comp-alist (cdr comp-alist))) 3511 (setq comp-alist (cdr comp-alist)))
3512 (setq menu-list (nreverse menu-list)) 3512 (setq menu-list (nreverse menu-list))
3513 (vhdl-menu-split menu-list "Compler"))) 3513 (vhdl-menu-split menu-list "Compiler")))
3514 ["Use Local Error Regexp" 3514 ["Use Local Error Regexp"
3515 (customize-set-variable 'vhdl-compile-use-local-error-regexp 3515 (customize-set-variable 'vhdl-compile-use-local-error-regexp
3516 (not vhdl-compile-use-local-error-regexp)) 3516 (not vhdl-compile-use-local-error-regexp))
diff --git a/lisp/rot13.el b/lisp/rot13.el
index 89b687efdc6..d4885395900 100644
--- a/lisp/rot13.el
+++ b/lisp/rot13.el
@@ -32,7 +32,7 @@
32;; This hack is mainly to show off the char table stuff. 32;; This hack is mainly to show off the char table stuff.
33;; 33;;
34;; New entry points, `rot13', `rot13-string', and `rot13-region' that 34;; New entry points, `rot13', `rot13-string', and `rot13-region' that
35;; performs Ceasar cipher encrypt/decrypt on buffers and strings, was 35;; performs Caesar cipher encrypt/decrypt on buffers and strings, was
36;; added by Simon Josefsson. 36;; added by Simon Josefsson.
37 37
38;;; Code: 38;;; Code:
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index b0f22085064..4d6b5e5fb83 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -443,7 +443,7 @@ of master file."
443(defvar test-dummy) 443(defvar test-dummy)
444(defun reftex-index-info (file) 444(defun reftex-index-info (file)
445 ;; Return an index entry for the current match. 445 ;; Return an index entry for the current match.
446 ;; Carefull: This function expects the match-data to be still in place! 446 ;; Careful: This function expects the match-data to be still in place!
447 (catch 'exit 447 (catch 'exit
448 (let* ((macro (reftex-match-string 10)) 448 (let* ((macro (reftex-match-string 10))
449 (bom (match-beginning 10)) 449 (bom (match-beginning 10))
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index f9fda7e0a74..0ce71c25ad7 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -476,8 +476,8 @@ for modes derived from Text mode, like Mail mode."
476 476
477 477
478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
479;; Section Decoration Adjusment 479;; Section Decoration Adjustment
480;; ============================ 480;; =============================
481;; 481;;
482;; The following functions implement a smart automatic title sectioning feature. 482;; The following functions implement a smart automatic title sectioning feature.
483;; The idea is that with the cursor sitting on a section title, we try to get as 483;; The idea is that with the cursor sitting on a section title, we try to get as
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 557ef33919c..6e192cd5aae 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -257,7 +257,7 @@ request.")
257 (if (not (equal extra-headers "")) 257 (if (not (equal extra-headers ""))
258 (setq extra-headers (concat extra-headers "\r\n"))) 258 (setq extra-headers (concat extra-headers "\r\n")))
259 259
260 ;; This was done with a call to `format'. Concatting parts has 260 ;; This was done with a call to `format'. Concatenating parts has
261 ;; the advantage of keeping the parts of each header together and 261 ;; the advantage of keeping the parts of each header together and
262 ;; allows us to elide null lines directly, at the cost of making 262 ;; allows us to elide null lines directly, at the cost of making
263 ;; the layout less clear. 263 ;; the layout less clear.
diff --git a/lisp/window.el b/lisp/window.el
index 2f4988b8b39..ecd4a62b093 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -68,19 +68,19 @@ are not altered by this macro (unless they are altered in BODY)."
68;; they don't substitute the selected window for nil), and they return 68;; they don't substitute the selected window for nil), and they return
69;; nil when WINDOW doesn't have a parent (like a frame's root window or 69;; nil when WINDOW doesn't have a parent (like a frame's root window or
70;; a minibuffer window). 70;; a minibuffer window).
71(defsubst window-right (window) 71(defun window-right (window)
72 "Return WINDOW's right sibling. 72 "Return WINDOW's right sibling.
73Return nil if WINDOW is the root window of its frame. WINDOW can 73Return nil if WINDOW is the root window of its frame. WINDOW can
74be any window." 74be any window."
75 (and window (window-parent window) (window-next-sibling window))) 75 (and window (window-parent window) (window-next-sibling window)))
76 76
77(defsubst window-left (window) 77(defun window-left (window)
78 "Return WINDOW's left sibling. 78 "Return WINDOW's left sibling.
79Return nil if WINDOW is the root window of its frame. WINDOW can 79Return nil if WINDOW is the root window of its frame. WINDOW can
80be any window." 80be any window."
81 (and window (window-parent window) (window-prev-sibling window))) 81 (and window (window-parent window) (window-prev-sibling window)))
82 82
83(defsubst window-child (window) 83(defun window-child (window)
84 "Return WINDOW's first child window." 84 "Return WINDOW's first child window."
85 (or (window-top-child window) (window-left-child window))) 85 (or (window-top-child window) (window-left-child window)))
86 86
@@ -100,7 +100,7 @@ be any window."
100 (setq window (window-next-sibling window)))) 100 (setq window (window-next-sibling window))))
101 window) 101 window)
102 102
103(defsubst window-valid-p (object) 103(defun window-valid-p (object)
104 "Return t if OBJECT denotes a live window or internal window. 104 "Return t if OBJECT denotes a live window or internal window.
105Otherwise, return nil; this includes the case where OBJECT is a 105Otherwise, return nil; this includes the case where OBJECT is a
106deleted window." 106deleted window."
@@ -108,7 +108,7 @@ deleted window."
108 (or (window-buffer object) (window-child object)) 108 (or (window-buffer object) (window-child object))
109 t)) 109 t))
110 110
111(defsubst window-normalize-buffer (buffer-or-name) 111(defun window-normalize-buffer (buffer-or-name)
112 "Return buffer specified by BUFFER-OR-NAME. 112 "Return buffer specified by BUFFER-OR-NAME.
113BUFFER-OR-NAME must be either a buffer or a string naming a live 113BUFFER-OR-NAME must be either a buffer or a string naming a live
114buffer and defaults to the current buffer." 114buffer and defaults to the current buffer."
@@ -123,7 +123,7 @@ buffer and defaults to the current buffer."
123 (t 123 (t
124 (error "No such buffer %s" buffer-or-name)))) 124 (error "No such buffer %s" buffer-or-name))))
125 125
126(defsubst window-normalize-frame (frame) 126(defun window-normalize-frame (frame)
127 "Return frame specified by FRAME. 127 "Return frame specified by FRAME.
128FRAME must be a live frame and defaults to the selected frame." 128FRAME must be a live frame and defaults to the selected frame."
129 (if frame 129 (if frame
@@ -132,7 +132,7 @@ FRAME must be a live frame and defaults to the selected frame."
132 (error "%s is not a live frame" frame)) 132 (error "%s is not a live frame" frame))
133 (selected-frame))) 133 (selected-frame)))
134 134
135(defsubst window-normalize-window (window &optional live-only) 135(defun window-normalize-window (window &optional live-only)
136 "Return window specified by WINDOW. 136 "Return window specified by WINDOW.
137If WINDOW is nil, return `selected-window'. 137If WINDOW is nil, return `selected-window'.
138If WINDOW is a live window or internal window, return WINDOW; 138If WINDOW is a live window or internal window, return WINDOW;
@@ -195,7 +195,7 @@ narrower, explictly specify the SIZE argument of that function."
195 :version "24.1" 195 :version "24.1"
196 :group 'windows) 196 :group 'windows)
197 197
198(defsubst window-combined-p (&optional window horizontal) 198(defun window-combined-p (&optional window horizontal)
199 "Return non-nil if WINDOW has siblings in a given direction. 199 "Return non-nil if WINDOW has siblings in a given direction.
200If WINDOW is omitted or nil, it defaults to the selected window. 200If WINDOW is omitted or nil, it defaults to the selected window.
201 201
@@ -530,7 +530,7 @@ unless it has no other choice \(like when deleting a neighboring
530window).") 530window).")
531(make-variable-buffer-local 'window-size-fixed) 531(make-variable-buffer-local 'window-size-fixed)
532 532
533(defsubst window-size-ignore (window ignore) 533(defun window-size-ignore (window ignore)
534 "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." 534 "Return non-nil if IGNORE says to ignore size restrictions for WINDOW."
535 (if (window-valid-p ignore) (eq window ignore) ignore)) 535 (if (window-valid-p ignore) (eq window ignore) ignore))
536 536
@@ -655,7 +655,7 @@ restrictions for that window only."
655 delta)) 655 delta))
656 (t 0))) 656 (t 0)))
657 657
658(defsubst window-sizable-p (window delta &optional horizontal ignore) 658(defun window-sizable-p (window delta &optional horizontal ignore)
659 "Return t if WINDOW can be resized by DELTA lines. 659 "Return t if WINDOW can be resized by DELTA lines.
660For the meaning of the arguments of this function see the 660For the meaning of the arguments of this function see the
661doc-string of `window-sizable'." 661doc-string of `window-sizable'."
@@ -704,8 +704,8 @@ window. Optional argument HORIZONTAL non-nil means return
704non-nil if WINDOW's width is fixed. 704non-nil if WINDOW's width is fixed.
705 705
706If this function returns nil, this does not necessarily mean that 706If this function returns nil, this does not necessarily mean that
707WINDOW can be resized in the desired direction. The functions 707WINDOW can be resized in the desired direction. The function
708`window-resizable' and `window-resizable-p' will tell that." 708`window-resizable' can tell that."
709 (window-size-fixed-1 709 (window-size-fixed-1
710 (window-normalize-window window) horizontal)) 710 (window-normalize-window window) horizontal))
711 711
@@ -772,7 +772,7 @@ tree but try to enlarge windows within WINDOW's combination only.
772 772
773Optional argument NODOWN non-nil means don't check whether WINDOW 773Optional argument NODOWN non-nil means don't check whether WINDOW
774itself \(and its child windows) can be shrunk; check only whether 774itself \(and its child windows) can be shrunk; check only whether
775at least one other windows can be enlarged appropriately." 775at least one other window can be enlarged appropriately."
776 (setq window (window-normalize-window window)) 776 (setq window (window-normalize-window window))
777 (let ((size (window-total-size window horizontal)) 777 (let ((size (window-total-size window horizontal))
778 (minimum (window-min-size window horizontal ignore))) 778 (minimum (window-min-size window horizontal ignore)))
@@ -865,14 +865,14 @@ only whether other windows can be shrunk appropriately."
865 (window-max-delta-1 window 0 horizontal ignore trail noup))) 865 (window-max-delta-1 window 0 horizontal ignore trail noup)))
866 866
867;; Make NOUP also inhibit the min-size check. 867;; Make NOUP also inhibit the min-size check.
868(defun window-resizable (window delta &optional horizontal ignore trail noup nodown) 868(defun window--resizable (window delta &optional horizontal ignore trail noup nodown)
869 "Return DELTA if WINDOW can be resized vertically by DELTA lines. 869 "Return DELTA if WINDOW can be resized vertically by DELTA lines.
870Optional argument HORIZONTAL non-nil means return DELTA if WINDOW 870Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
871can be resized horizontally by DELTA columns. A return value of 871can be resized horizontally by DELTA columns. A return value of
872zero means that WINDOW is not resizable. 872zero means that WINDOW is not resizable.
873 873
874DELTA positive means WINDOW shall be enlarged by DELTA lines or 874DELTA positive means WINDOW shall be enlarged by DELTA lines or
875columns. If WINDOW cannot be enlarged by DELTA lines or columns 875columns. If WINDOW cannot be enlarged by DELTA lines or columns,
876return the maximum value in the range 0..DELTA by which WINDOW 876return the maximum value in the range 0..DELTA by which WINDOW
877can be enlarged. 877can be enlarged.
878 878
@@ -894,11 +894,12 @@ of or below WINDOW can be shrunk. Optional argument TRAIL
894shrunk. 894shrunk.
895 895
896Optional argument NOUP non-nil means don't go up in the window 896Optional argument NOUP non-nil means don't go up in the window
897tree but try to distribute the space among the other windows 897tree but check only whether space can be obtained from (or given
898within WINDOW's combination. 898to) WINDOW's siblings.
899 899
900Optional argument NODOWN non-nil means don't check whether WINDOW 900Optional argument NODOWN non-nil means don't go down in the
901and its child windows can be resized." 901window tree. This means do not check whether resizing would
902violate size restrictions of WINDOW or its child windows."
902 (setq window (window-normalize-window window)) 903 (setq window (window-normalize-window window))
903 (cond 904 (cond
904 ((< delta 0) 905 ((< delta 0)
@@ -909,34 +910,58 @@ and its child windows can be resized."
909 delta)) 910 delta))
910 (t 0))) 911 (t 0)))
911 912
912(defun window-resizable-p (window delta &optional horizontal ignore trail noup nodown) 913(defun window--resizable-p (window delta &optional horizontal ignore trail noup nodown)
913 "Return t if WINDOW can be resized vertically by DELTA lines. 914 "Return t if WINDOW can be resized vertically by DELTA lines.
914For the meaning of the arguments of this function see the 915For the meaning of the arguments of this function see the
915doc-string of `window-resizable'." 916doc-string of `window--resizable'."
916 (setq window (window-normalize-window window)) 917 (setq window (window-normalize-window window))
917 (if (> delta 0) 918 (if (> delta 0)
918 (>= (window-resizable window delta horizontal ignore trail noup nodown) 919 (>= (window--resizable window delta horizontal ignore trail noup nodown)
919 delta) 920 delta)
920 (<= (window-resizable window delta horizontal ignore trail noup nodown) 921 (<= (window--resizable window delta horizontal ignore trail noup nodown)
921 delta))) 922 delta)))
922 923
923(defsubst window-total-height (&optional window) 924(defun window-resizable (window delta &optional horizontal ignore)
924 "Return the total number of lines of WINDOW. 925 "Return DELTA if WINDOW can be resized vertically by DELTA lines.
925WINDOW can be any window and defaults to the selected one. The 926Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
926return value includes WINDOW's mode line and header line, if any. 927can be resized horizontally by DELTA columns. A return value of
927If WINDOW is internal the return value is the sum of the total 928zero means that WINDOW is not resizable.
928number of lines of WINDOW's child windows if these are vertically
929combined and the height of WINDOW's first child otherwise.
930 929
931Note: This function does not take into account the value of 930DELTA positive means WINDOW shall be enlarged by DELTA lines or
932`line-spacing' when calculating the number of lines in WINDOW." 931columns. If WINDOW cannot be enlarged by DELTA lines or columns
933 (window-total-size window)) 932return the maximum value in the range 0..DELTA by which WINDOW
933can be enlarged.
934
935DELTA negative means WINDOW shall be shrunk by -DELTA lines or
936columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
937return the minimum value in the range DELTA..0 that can be used
938for shrinking WINDOW.
939
940Optional argument IGNORE non-nil means ignore any restrictions
941imposed by fixed size windows, `window-min-height' or
942`window-min-width' settings. IGNORE a window means ignore
943restrictions for that window only. IGNORE equal `safe' means
944live windows may get as small as `window-safe-min-height' lines
945and `window-safe-min-width' columns."
946 (setq window (window-normalize-window window))
947 (window--resizable window delta horizontal ignore))
948
949(defun window-total-size (&optional window horizontal)
950 "Return the total height or width of window WINDOW.
951If WINDOW is omitted or nil, it defaults to the selected window.
952
953If HORIZONTAL is omitted or nil, return the total height of
954WINDOW, in lines, like `window-total-height'. Otherwise return
955the total width, in columns, like `window-total-width'."
956 (if horizontal
957 (window-total-width window)
958 (window-total-height window)))
934 959
935;; Eventually we should make `window-height' obsolete. 960;; Eventually we should make `window-height' obsolete.
936(defalias 'window-height 'window-total-height) 961(defalias 'window-height 'window-total-height)
937 962
938;; See discussion in bug#4543. 963;; See discussion in bug#4543.
939(defsubst window-full-height-p (&optional window) 964(defun window-full-height-p (&optional window)
940 "Return t if WINDOW is as high as the containing frame. 965 "Return t if WINDOW is as high as the containing frame.
941More precisely, return t if and only if the total height of 966More precisely, return t if and only if the total height of
942WINDOW equals the total height of the root window of WINDOW's 967WINDOW equals the total height of the root window of WINDOW's
@@ -946,17 +971,7 @@ one."
946 (= (window-total-size window) 971 (= (window-total-size window)
947 (window-total-size (frame-root-window window)))) 972 (window-total-size (frame-root-window window))))
948 973
949(defsubst window-total-width (&optional window) 974(defun window-full-width-p (&optional window)
950 "Return the total number of columns of WINDOW.
951WINDOW can be any window and defaults to the selected one. The
952return value includes any vertical dividers or scrollbars of
953WINDOW. If WINDOW is internal, the return value is the sum of
954the total number of columns of WINDOW's child windows if these
955are horizontally combined and the width of WINDOW's first child
956otherwise."
957 (window-total-size window t))
958
959(defsubst window-full-width-p (&optional window)
960 "Return t if WINDOW is as wide as the containing frame. 975 "Return t if WINDOW is as wide as the containing frame.
961More precisely, return t if and only if the total width of WINDOW 976More precisely, return t if and only if the total width of WINDOW
962equals the total width of the root window of WINDOW's frame. 977equals the total width of the root window of WINDOW's frame.
@@ -965,40 +980,17 @@ WINDOW can be any window and defaults to the selected one."
965 (= (window-total-size window t) 980 (= (window-total-size window t)
966 (window-total-size (frame-root-window window) t))) 981 (window-total-size (frame-root-window window) t)))
967 982
968(defsubst window-body-height (&optional window) 983(defun window-body-size (&optional window horizontal)
969 "Return the number of lines of WINDOW's body. 984 "Return the height or width of WINDOW's text area.
970WINDOW must be a live window and defaults to the selected one. 985If WINDOW is omitted or nil, it defaults to the selected window.
971 986Signal an error if the window is not live.
972The return value does not include WINDOW's mode line and header
973line, if any. If a line at the bottom of the window is only
974partially visible, that line is included in the return value. If
975you do not want to include a partially visible bottom line in the
976return value, use `window-text-height' instead.
977
978Note that the return value is measured in canonical units, i.e. for
979the default frame's face. If the window shows some characters with
980non-default face, e.g., if the font of some characters is larger or
981smaller than the default font, the value returned by this function
982will not match the actual number of lines shown in the window. To
983get the actual number of lines, use `posn-at-point'."
984 (window-body-size window))
985
986(defsubst window-body-width (&optional window)
987 "Return the number of columns of WINDOW's body.
988WINDOW must be a live window and defaults to the selected one.
989
990The return value does not include any vertical dividers or scroll
991bars owned by WINDOW. On a window-system the return value does
992not include the number of columns used for WINDOW's fringes or
993display margins either.
994 987
995Note that the return value is measured in canonical units, i.e. for 988If HORIZONTAL is omitted or nil, return the height of the text
996the default frame's face. If the window shows some characters with 989area, like `window-body-height'. Otherwise, return the width of
997non-default face, e.g., if the font of some characters is larger or 990the text area, like `window-body-width'."
998smaller than the default font, the value returned by this function 991 (if horizontal
999will not match the actual number of characters per line shown in the 992 (window-body-width window)
1000window. To get the actual number of columns, use `posn-at-point'." 993 (window-body-height window)))
1001 (window-body-size window t))
1002 994
1003;; Eventually we should make `window-height' obsolete. 995;; Eventually we should make `window-height' obsolete.
1004(defalias 'window-width 'window-body-width) 996(defalias 'window-width 'window-body-width)
@@ -1509,7 +1501,7 @@ instead."
1509 (error "Cannot resize the root window of a frame")) 1501 (error "Cannot resize the root window of a frame"))
1510 ((window-minibuffer-p window) 1502 ((window-minibuffer-p window)
1511 (window--resize-mini-window window delta)) 1503 (window--resize-mini-window window delta))
1512 ((window-resizable-p window delta horizontal ignore) 1504 ((window--resizable-p window delta horizontal ignore)
1513 (window--resize-reset frame horizontal) 1505 (window--resize-reset frame horizontal)
1514 (window--resize-this-window window delta horizontal ignore t) 1506 (window--resize-this-window window delta horizontal ignore t)
1515 (if (and (not (window-splits window)) 1507 (if (and (not (window-splits window))
@@ -1535,7 +1527,7 @@ instead."
1535 (t 1527 (t
1536 (error "Cannot resize window %s" window))))) 1528 (error "Cannot resize window %s" window)))))
1537 1529
1538(defsubst window--resize-child-windows-skip-p (window) 1530(defun window--resize-child-windows-skip-p (window)
1539 "Return non-nil if WINDOW shall be skipped by resizing routines." 1531 "Return non-nil if WINDOW shall be skipped by resizing routines."
1540 (memq (window-new-normal window) '(ignore stuck skip))) 1532 (memq (window-new-normal window) '(ignore stuck skip)))
1541 1533
@@ -1863,7 +1855,7 @@ preferably only resize windows adjacent to EDGE."
1863 ;; Set this-delta to what we can get from WINDOW's siblings. 1855 ;; Set this-delta to what we can get from WINDOW's siblings.
1864 (if (= (- delta) (window-total-size window horizontal)) 1856 (if (= (- delta) (window-total-size window horizontal))
1865 ;; A deletion, presumably. We must handle this case 1857 ;; A deletion, presumably. We must handle this case
1866 ;; specially since `window-resizable' can't be used. 1858 ;; specially since `window--resizable' can't be used.
1867 (if this-delta 1859 (if this-delta
1868 ;; There's at least one resizable sibling we can 1860 ;; There's at least one resizable sibling we can
1869 ;; give WINDOW's size to. 1861 ;; give WINDOW's size to.
@@ -1872,7 +1864,7 @@ preferably only resize windows adjacent to EDGE."
1872 (setq this-delta 0)) 1864 (setq this-delta 0))
1873 ;; Any other form of resizing. 1865 ;; Any other form of resizing.
1874 (setq this-delta 1866 (setq this-delta
1875 (window-resizable window delta horizontal ignore trail t))) 1867 (window--resizable window delta horizontal ignore trail t)))
1876 1868
1877 ;; Set other-delta to what we still have to get from 1869 ;; Set other-delta to what we still have to get from
1878 ;; ancestor windows of parent. 1870 ;; ancestor windows of parent.
@@ -1938,7 +1930,7 @@ resize only windows on the left or above EDGE. If TRAIL equals
1938preferably only resize windows adjacent to EDGE. 1930preferably only resize windows adjacent to EDGE.
1939 1931
1940This function recursively resizes WINDOW's child windows to fit the 1932This function recursively resizes WINDOW's child windows to fit the
1941new size. Make sure that WINDOW is `window-resizable' before 1933new size. Make sure that WINDOW is `window--resizable' before
1942calling this function. Note that this function does not resize 1934calling this function. Note that this function does not resize
1943siblings of WINDOW or WINDOW's parent window. You have to 1935siblings of WINDOW or WINDOW's parent window. You have to
1944eventually call `window-resize-apply' in order to make resizing 1936eventually call `window-resize-apply' in order to make resizing
@@ -2078,7 +2070,7 @@ move it as far as possible in the desired direction."
2078 ;; Start resizing. 2070 ;; Start resizing.
2079 (window--resize-reset frame horizontal) 2071 (window--resize-reset frame horizontal)
2080 ;; Try to enlarge LEFT first. 2072 ;; Try to enlarge LEFT first.
2081 (setq this-delta (window-resizable left delta horizontal)) 2073 (setq this-delta (window--resizable left delta horizontal))
2082 (unless (zerop this-delta) 2074 (unless (zerop this-delta)
2083 (window--resize-this-window 2075 (window--resize-this-window
2084 left this-delta horizontal nil t 'before 2076 left this-delta horizontal nil t 'before
@@ -2101,7 +2093,7 @@ move it as far as possible in the desired direction."
2101 ;; Start resizing. 2093 ;; Start resizing.
2102 (window--resize-reset frame horizontal) 2094 (window--resize-reset frame horizontal)
2103 ;; Try to enlarge RIGHT. 2095 ;; Try to enlarge RIGHT.
2104 (setq this-delta (window-resizable right (- delta) horizontal)) 2096 (setq this-delta (window--resizable right (- delta) horizontal))
2105 (unless (zerop this-delta) 2097 (unless (zerop this-delta)
2106 (window--resize-this-window 2098 (window--resize-this-window
2107 right this-delta horizontal nil t 'after 2099 right this-delta horizontal nil t 'after
@@ -2132,7 +2124,7 @@ Return nil."
2132 ((zerop delta)) 2124 ((zerop delta))
2133 ((window-size-fixed-p nil horizontal) 2125 ((window-size-fixed-p nil horizontal)
2134 (error "Selected window has fixed size")) 2126 (error "Selected window has fixed size"))
2135 ((window-resizable-p nil delta horizontal) 2127 ((window--resizable-p nil delta horizontal)
2136 (window-resize nil delta horizontal)) 2128 (window-resize nil delta horizontal))
2137 (t 2129 (t
2138 (window-resize 2130 (window-resize
@@ -2153,7 +2145,7 @@ Return nil."
2153 ((zerop delta)) 2145 ((zerop delta))
2154 ((window-size-fixed-p nil horizontal) 2146 ((window-size-fixed-p nil horizontal)
2155 (error "Selected window has fixed size")) 2147 (error "Selected window has fixed size"))
2156 ((window-resizable-p nil (- delta) horizontal) 2148 ((window--resizable-p nil (- delta) horizontal)
2157 (window-resize nil (- delta) horizontal)) 2149 (window-resize nil (- delta) horizontal))
2158 (t 2150 (t
2159 (window-resize 2151 (window-resize
@@ -2180,7 +2172,7 @@ WINDOW can be any window and defaults to the selected window."
2180 (window-resize window (- (window-min-delta window))) 2172 (window-resize window (- (window-min-delta window)))
2181 (window-resize window (- (window-min-delta window t)) t)) 2173 (window-resize window (- (window-min-delta window t)) t))
2182 2174
2183(defsubst frame-root-window-p (window) 2175(defun frame-root-window-p (window)
2184 "Return non-nil if WINDOW is the root window of its frame." 2176 "Return non-nil if WINDOW is the root window of its frame."
2185 (eq window (frame-root-window window))) 2177 (eq window (frame-root-window window)))
2186 2178
@@ -2426,7 +2418,7 @@ non-side window, signal an error."
2426 (set-window-new-normal 2418 (set-window-new-normal
2427 sibling (+ (window-normal-size sibling horizontal) 2419 sibling (+ (window-normal-size sibling horizontal)
2428 (window-normal-size window horizontal)))) 2420 (window-normal-size window horizontal))))
2429 ((window-resizable-p window (- size) horizontal nil nil nil t) 2421 ((window--resizable-p window (- size) horizontal nil nil nil t)
2430 ;; Can do without resizing fixed-size windows. 2422 ;; Can do without resizing fixed-size windows.
2431 (window--resize-siblings window (- size) horizontal)) 2423 (window--resize-siblings window (- size) horizontal))
2432 (t 2424 (t
@@ -3053,7 +3045,7 @@ showing BUFFER-OR-NAME."
3053 (unrecord-window-buffer window buffer))))) 3045 (unrecord-window-buffer window buffer)))))
3054 3046
3055;;; Splitting windows. 3047;;; Splitting windows.
3056(defsubst window-split-min-size (&optional horizontal) 3048(defun window-split-min-size (&optional horizontal)
3057 "Return minimum height of any window when splitting windows. 3049 "Return minimum height of any window when splitting windows.
3058Optional argument HORIZONTAL non-nil means return minimum width." 3050Optional argument HORIZONTAL non-nil means return minimum width."
3059 (if horizontal 3051 (if horizontal
@@ -3596,10 +3588,6 @@ specific buffers."
3596 )) 3588 ))
3597 3589
3598;;; Window states, how to get them and how to put them in a window. 3590;;; Window states, how to get them and how to put them in a window.
3599(defsubst window-list-no-nils (&rest args)
3600 "Like LIST but do not add nil elements of ARGS."
3601 (delq nil (apply 'list args)))
3602
3603(defvar window-state-ignored-parameters '(quit-restore) 3591(defvar window-state-ignored-parameters '(quit-restore)
3604 "List of window parameters ignored by `window-state-get'.") 3592 "List of window parameters ignored by `window-state-get'.")
3605 3593
@@ -3613,46 +3601,47 @@ specific buffers."
3613 (buffer (window-buffer window)) 3601 (buffer (window-buffer window))
3614 (selected (eq window (selected-window))) 3602 (selected (eq window (selected-window)))
3615 (head 3603 (head
3616 (window-list-no-nils 3604 `(,type
3617 type 3605 ,@(unless (window-next-sibling window) `((last . t)))
3618 (unless (window-next-sibling window) (cons 'last t)) 3606 (total-height . ,(window-total-size window))
3619 (cons 'total-height (window-total-size window)) 3607 (total-width . ,(window-total-size window t))
3620 (cons 'total-width (window-total-size window t)) 3608 (normal-height . ,(window-normal-size window))
3621 (cons 'normal-height (window-normal-size window)) 3609 (normal-width . ,(window-normal-size window t))
3622 (cons 'normal-width (window-normal-size window t)) 3610 (splits . ,(window-splits window))
3623 (cons 'splits (window-splits window)) 3611 (nest . ,(window-nest window))
3624 (cons 'nest (window-nest window)) 3612 ,@(let (list)
3625 (let (list) 3613 (dolist (parameter (window-parameters window))
3626 (dolist (parameter (window-parameters window)) 3614 (unless (memq (car parameter)
3627 (unless (memq (car parameter) 3615 window-state-ignored-parameters)
3628 window-state-ignored-parameters) 3616 (setq list (cons parameter list))))
3629 (setq list (cons parameter list)))) 3617 (unless (window-parameter window 'clone-of)
3630 (unless (window-parameter window 'clone-of) 3618 ;; Make a clone-of parameter.
3631 ;; Make a clone-of parameter. 3619 (setq list (cons (cons 'clone-of window) list)))
3632 (setq list (cons (cons 'clone-of window) list))) 3620 (when list
3633 (when list 3621 `((parameters . ,list))))
3634 (cons 'parameters list))) 3622 ,@(when buffer
3635 (when buffer 3623 ;; All buffer related things go in here - make the buffer
3636 ;; All buffer related things go in here - make the buffer 3624 ;; current when retrieving `point' and `mark'.
3637 ;; current when retrieving `point' and `mark'. 3625 (with-current-buffer (window-buffer window)
3638 (with-current-buffer (window-buffer window) 3626 (let ((point (window-point-1 window))
3639 (let ((point (window-point-1 window)) 3627 (start (window-start window))
3640 (start (window-start window)) 3628 (mark (mark)))
3641 (mark (mark))) 3629 `((buffer
3642 (window-list-no-nils 3630 ,(buffer-name buffer)
3643 'buffer (buffer-name buffer) 3631 (selected . ,selected)
3644 (cons 'selected selected) 3632 ,@(when window-size-fixed
3645 (when window-size-fixed (cons 'size-fixed window-size-fixed)) 3633 `((size-fixed . ,window-size-fixed)))
3646 (cons 'hscroll (window-hscroll window)) 3634 (hscroll . ,(window-hscroll window))
3647 (cons 'fringes (window-fringes window)) 3635 (fringes . ,(window-fringes window))
3648 (cons 'margins (window-margins window)) 3636 (margins . ,(window-margins window))
3649 (cons 'scroll-bars (window-scroll-bars window)) 3637 (scroll-bars . ,(window-scroll-bars window))
3650 (cons 'vscroll (window-vscroll window)) 3638 (vscroll . ,(window-vscroll window))
3651 (cons 'dedicated (window-dedicated-p window)) 3639 (dedicated . ,(window-dedicated-p window))
3652 (cons 'point (if markers (copy-marker point) point)) 3640 (point . ,(if markers (copy-marker point) point))
3653 (cons 'start (if markers (copy-marker start) start)) 3641 (start . ,(if markers (copy-marker start) start))
3654 (when mark 3642 ,@(when mark
3655 (cons 'mark (if markers (copy-marker mark) mark))))))))) 3643 `((mark . ,(if markers
3644 (copy-marker mark) mark)))))))))))
3656 (tail 3645 (tail
3657 (when (memq type '(vc hc)) 3646 (when (memq type '(vc hc))
3658 (let (list) 3647 (let (list)
@@ -3688,16 +3677,15 @@ value can be also stored on disk and read back in a new session."
3688 (cons 3677 (cons
3689 ;; Frame related things would go into a function, say `frame-state', 3678 ;; Frame related things would go into a function, say `frame-state',
3690 ;; calling `window-state-get' to insert the frame's root window. 3679 ;; calling `window-state-get' to insert the frame's root window.
3691 (window-list-no-nils 3680 `((min-height . ,(window-min-size window))
3692 (cons 'min-height (window-min-size window)) 3681 (min-width . ,(window-min-size window t))
3693 (cons 'min-width (window-min-size window t)) 3682 (min-height-ignore . ,(window-min-size window nil t))
3694 (cons 'min-height-ignore (window-min-size window nil t)) 3683 (min-width-ignore . ,(window-min-size window t t))
3695 (cons 'min-width-ignore (window-min-size window t t)) 3684 (min-height-safe . ,(window-min-size window nil 'safe))
3696 (cons 'min-height-safe (window-min-size window nil 'safe)) 3685 (min-width-safe . ,(window-min-size window t 'safe))
3697 (cons 'min-width-safe (window-min-size window t 'safe)) 3686 ;; These are probably not needed.
3698 ;; These are probably not needed. 3687 ,@(when (window-size-fixed-p window) `((fixed-height . t)))
3699 (when (window-size-fixed-p window) (cons 'fixed-height t)) 3688 ,@(when (window-size-fixed-p window t) `((fixed-width . t))))
3700 (when (window-size-fixed-p window t) (cons 'fixed-width t)))
3701 (window-state-get-1 window markers))) 3689 (window-state-get-1 window markers)))
3702 3690
3703(defvar window-state-put-list nil 3691(defvar window-state-put-list nil
@@ -3801,13 +3789,13 @@ value can be also stored on disk and read back in a new session."
3801 (let ((delta (- (cdr (assq 'total-height item)) 3789 (let ((delta (- (cdr (assq 'total-height item))
3802 (window-total-height window))) 3790 (window-total-height window)))
3803 window-size-fixed) 3791 window-size-fixed)
3804 (when (window-resizable-p window delta) 3792 (when (window--resizable-p window delta)
3805 (window-resize window delta))) 3793 (window-resize window delta)))
3806 ;; Else check whether the window is not high enough. 3794 ;; Else check whether the window is not high enough.
3807 (let* ((min-size (window-min-size window nil ignore)) 3795 (let* ((min-size (window-min-size window nil ignore))
3808 (delta (- min-size (window-total-size window)))) 3796 (delta (- min-size (window-total-size window))))
3809 (when (and (> delta 0) 3797 (when (and (> delta 0)
3810 (window-resizable-p window delta nil ignore)) 3798 (window--resizable-p window delta nil ignore))
3811 (window-resize window delta nil ignore)))) 3799 (window-resize window delta nil ignore))))
3812 ;; Adjust horizontally. 3800 ;; Adjust horizontally.
3813 (if (memq window-size-fixed '(t width)) 3801 (if (memq window-size-fixed '(t width))
@@ -3815,13 +3803,13 @@ value can be also stored on disk and read back in a new session."
3815 (let ((delta (- (cdr (assq 'total-width item)) 3803 (let ((delta (- (cdr (assq 'total-width item))
3816 (window-total-width window))) 3804 (window-total-width window)))
3817 window-size-fixed) 3805 window-size-fixed)
3818 (when (window-resizable-p window delta) 3806 (when (window--resizable-p window delta)
3819 (window-resize window delta))) 3807 (window-resize window delta)))
3820 ;; Else check whether the window is not wide enough. 3808 ;; Else check whether the window is not wide enough.
3821 (let* ((min-size (window-min-size window t ignore)) 3809 (let* ((min-size (window-min-size window t ignore))
3822 (delta (- min-size (window-total-size window t)))) 3810 (delta (- min-size (window-total-size window t))))
3823 (when (and (> delta 0) 3811 (when (and (> delta 0)
3824 (window-resizable-p window delta t ignore)) 3812 (window--resizable-p window delta t ignore))
3825 (window-resize window delta t ignore)))) 3813 (window-resize window delta t ignore))))
3826 ;; Set dedicated status. 3814 ;; Set dedicated status.
3827 (set-window-dedicated-p window (cdr (assq 'dedicated state))) 3815 (set-window-dedicated-p window (cdr (assq 'dedicated state)))
@@ -3951,8 +3939,9 @@ means that the currently selected window is not acceptable. It
3951should choose or create a window, display the specified buffer in 3939should choose or create a window, display the specified buffer in
3952it, and return the window. 3940it, and return the window.
3953 3941
3954The function specified here is responsible for setting the 3942The specified function should call `display-buffer-record-window'
3955quit-restore and help-setup parameters of the window used." 3943with corresponding arguments to set up the quit-restore parameter
3944of the window used."
3956 :type '(choice 3945 :type '(choice
3957 (const nil) 3946 (const nil)
3958 (function :tag "function")) 3947 (function :tag "function"))
@@ -4205,6 +4194,7 @@ and (cdr ARGS) as second."
4205 (make-frame (append args special-display-frame-alist)))) 4194 (make-frame (append args special-display-frame-alist))))
4206 (window (frame-selected-window frame))) 4195 (window (frame-selected-window frame)))
4207 (display-buffer-record-window 'frame window buffer) 4196 (display-buffer-record-window 'frame window buffer)
4197 ;; FIXME: Use window--display-buffer-2?
4208 (set-window-buffer window buffer) 4198 (set-window-buffer window buffer)
4209 ;; Reset list of WINDOW's previous buffers to nil. 4199 ;; Reset list of WINDOW's previous buffers to nil.
4210 (set-window-prev-buffers window nil) 4200 (set-window-prev-buffers window nil)
@@ -4224,8 +4214,9 @@ A buffer is special when its name is either listed in
4224`special-display-buffer-names' or matches a regexp in 4214`special-display-buffer-names' or matches a regexp in
4225`special-display-regexps'. 4215`special-display-regexps'.
4226 4216
4227The function specified here is responsible for setting the 4217The specified function should call `display-buffer-record-window'
4228quit-restore and help-setup parameters of the window used." 4218with corresponding arguments to set up the quit-restore parameter
4219of the window used."
4229 :type 'function 4220 :type 'function
4230 :group 'frames) 4221 :group 'frames)
4231 4222
@@ -4625,9 +4616,8 @@ See `display-buffer' for details."
4625 :group 'windows) 4616 :group 'windows)
4626 4617
4627(defconst display-buffer-fallback-action 4618(defconst display-buffer-fallback-action
4628 '((display-buffer--maybe-same-window 4619 '((display-buffer--maybe-same-window ;FIXME: why isn't this redundant?
4629 display-buffer-reuse-window 4620 display-buffer-reuse-window
4630 display-buffer--special
4631 display-buffer--maybe-pop-up-frame-or-window 4621 display-buffer--maybe-pop-up-frame-or-window
4632 display-buffer-use-some-window 4622 display-buffer-use-some-window
4633 ;; If all else fails, pop up a new frame. 4623 ;; If all else fails, pop up a new frame.
@@ -4658,7 +4648,6 @@ specified, e.g. by the user options `display-buffer-alist' or
4658 4648
4659(defvar display-buffer--other-frame-action 4649(defvar display-buffer--other-frame-action
4660 '((display-buffer-reuse-window 4650 '((display-buffer-reuse-window
4661 display-buffer--special
4662 display-buffer-pop-up-frame) 4651 display-buffer-pop-up-frame)
4663 (reusable-frames . 0) 4652 (reusable-frames . 0)
4664 (inhibit-same-window . t)) 4653 (inhibit-same-window . t))
@@ -4724,6 +4713,7 @@ search for a window that is already displaying the buffer. See
4724 (let* ((user-action 4713 (let* ((user-action
4725 (display-buffer-assq-regexp (buffer-name buffer) 4714 (display-buffer-assq-regexp (buffer-name buffer)
4726 display-buffer-alist)) 4715 display-buffer-alist))
4716 (special-action (display-buffer--special-action buffer))
4727 ;; Extra actions from the arguments to this function: 4717 ;; Extra actions from the arguments to this function:
4728 (extra-action 4718 (extra-action
4729 (cons nil (append (if inhibit-same-window 4719 (cons nil (append (if inhibit-same-window
@@ -4732,7 +4722,7 @@ search for a window that is already displaying the buffer. See
4732 `((reusable-frames . ,frame)))))) 4722 `((reusable-frames . ,frame))))))
4733 ;; Construct action function list and action alist. 4723 ;; Construct action function list and action alist.
4734 (actions (list display-buffer-overriding-action 4724 (actions (list display-buffer-overriding-action
4735 user-action action extra-action 4725 user-action special-action action extra-action
4736 display-buffer-base-action 4726 display-buffer-base-action
4737 display-buffer-fallback-action)) 4727 display-buffer-fallback-action))
4738 (functions (apply 'append 4728 (functions (apply 'append
@@ -4815,7 +4805,7 @@ terminal if either of those variables is non-nil."
4815 (display-buffer-record-window 'reuse window buffer) 4805 (display-buffer-record-window 'reuse window buffer)
4816 (window--display-buffer-1 window)))) 4806 (window--display-buffer-1 window))))
4817 4807
4818(defun display-buffer--special (buffer alist) 4808(defun display-buffer--special-action (buffer)
4819 "Try to display BUFFER using `special-display-function'. 4809 "Try to display BUFFER using `special-display-function'.
4820Call `special-display-p' on BUFFER's name, and if that returns 4810Call `special-display-p' on BUFFER's name, and if that returns
4821non-nil, call `special-display-function' on BUFFER." 4811non-nil, call `special-display-function' on BUFFER."
@@ -4824,8 +4814,10 @@ non-nil, call `special-display-function' on BUFFER."
4824 ;; parameters to pass to `special-display-function'. 4814 ;; parameters to pass to `special-display-function'.
4825 (let ((pars (special-display-p (buffer-name buffer)))) 4815 (let ((pars (special-display-p (buffer-name buffer))))
4826 (when pars 4816 (when pars
4827 (funcall special-display-function 4817 (list (list #'display-buffer-reuse-window
4828 buffer (if (listp pars) pars)))))) 4818 `(lambda (buffer _alist)
4819 (funcall special-display-function
4820 buffer ',(if (listp pars) pars)))))))))
4829 4821
4830(defun display-buffer-pop-up-frame (buffer alist) 4822(defun display-buffer-pop-up-frame (buffer alist)
4831 "Display BUFFER in a new frame. 4823 "Display BUFFER in a new frame.
@@ -4973,8 +4965,7 @@ the buffer.
4973NORECORD, if non-nil means do not put this buffer at the front of 4965NORECORD, if non-nil means do not put this buffer at the front of
4974the list of recently selected ones." 4966the list of recently selected ones."
4975 (pop-to-buffer buffer 4967 (pop-to-buffer buffer
4976 '((display-buffer--special 4968 '(display-buffer-same-window
4977 display-buffer-same-window)
4978 (inhibit-same-window . nil)) 4969 (inhibit-same-window . nil))
4979 norecord)) 4970 norecord))
4980 4971
@@ -5438,8 +5429,8 @@ by `recenter-positions'."
5438 5429
5439;;; Scrolling commands. 5430;;; Scrolling commands.
5440 5431
5441;;; Scrolling commands which does not signal errors at top/bottom 5432;;; Scrolling commands which do not signal errors at top/bottom
5442;;; of buffer at first key-press (instead moves to top/bottom 5433;;; of buffer at first key-press (instead move to top/bottom
5443;;; of buffer). 5434;;; of buffer).
5444 5435
5445(defcustom scroll-error-top-bottom nil 5436(defcustom scroll-error-top-bottom nil
diff --git a/lisp/woman.el b/lisp/woman.el
index 7b530d1004f..078acfc0362 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1440,7 +1440,7 @@ The cdr of each alist element is the path-index / filename."
1440 files)) 1440 files))
1441 (setq path-index (1+ path-index))) 1441 (setq path-index (1+ path-index)))
1442 ;; Uniquefy topics: 1442 ;; Uniquefy topics:
1443 ;; Concate all lists with a single nconc call to 1443 ;; Concatenate all lists with a single nconc call to
1444 ;; avoid retraversing the first lists repeatedly -- dak 1444 ;; avoid retraversing the first lists repeatedly -- dak
1445 (woman-topic-all-completions-merge 1445 (woman-topic-all-completions-merge
1446 (apply #'nconc files)))) 1446 (apply #'nconc files))))