diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 52 | ||||
-rw-r--r-- | lisp/emacs-lisp/check-declare.el | 4 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 4 | ||||
-rw-r--r-- | lisp/mouse.el | 23 | ||||
-rw-r--r-- | lisp/org/ChangeLog | 170 | ||||
-rw-r--r-- | lisp/org/ob-python.el | 2 | ||||
-rw-r--r-- | lisp/org/org-agenda.el | 2 | ||||
-rw-r--r-- | lisp/org/org-clock.el | 2 | ||||
-rw-r--r-- | lisp/org/org-faces.el | 10 | ||||
-rw-r--r-- | lisp/org/org-footnote.el | 13 | ||||
-rw-r--r-- | lisp/org/org-list.el | 77 | ||||
-rw-r--r-- | lisp/org/org-mouse.el | 1 | ||||
-rw-r--r-- | lisp/org/org-odt.el | 1 | ||||
-rw-r--r-- | lisp/org/org-table.el | 4 | ||||
-rw-r--r-- | lisp/org/org.el | 85 | ||||
-rw-r--r-- | lisp/progmodes/gdb-mi.el | 30 | ||||
-rw-r--r-- | lisp/progmodes/which-func.el | 4 | ||||
-rw-r--r-- | lisp/select.el | 47 | ||||
-rw-r--r-- | lisp/simple.el | 2 | ||||
-rw-r--r-- | lisp/startup.el | 2 | ||||
-rw-r--r-- | lisp/subr.el | 5 | ||||
-rw-r--r-- | lisp/vc/vc-git.el | 2 | ||||
-rw-r--r-- | lisp/window.el | 106 | ||||
-rw-r--r-- | lisp/xml.el | 6 |
25 files changed, 400 insertions, 258 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b0065f520e..f88a386178f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,57 @@ 2012-04-27 Chong Yidong <cyd@gnu.org> + * subr.el (read-key): Avoid running filter function when setting + up temporary tool bar entries (Bug#9922). + +2012-04-27 Andreas Schwab <schwab@linux-m68k.org> + + * vc/vc-git.el (vc-git-state): Fix regexp matching diff output. + (Bug#11344) + +2012-04-27 Chong Yidong <cyd@gnu.org> + + * select.el (xselect--encode-string): New function, split from + xselect-convert-to-string. + (xselect-convert-to-string): Use it. + (xselect-convert-to-filename, xselect-convert-to-os) + (xselect-convert-to-host, xselect-convert-to-user): Ensure that + returned strings are properly encoded (Bug#11315). + +2012-04-27 Chong Yidong <cyd@gnu.org> + + * simple.el (delete-active-region): Move to killing custom group. + +2012-04-27 Andreas Schwab <schwab@linux-m68k.org> + + * progmodes/which-func.el (which-func-current): Quote % + characters for mode-line processing. + +2012-04-21 Chong Yidong <cyd@gnu.org> + + * xml.el (xml-parse-region, xml-parse-tag): Avoid errors due to + reaching eob (Bug#11286). + +2012-04-27 Eli Zaretskii <eliz@gnu.org> + + * progmodes/gdb-mi.el (gdb-control-level): New variable. + (gdb): Make it buffer-local and init to zero. + (gdb-control-commands-regexp): New variable. + (gdb-send): Don't wrap in "-interpreter-exec console" if + gdb-control-level is positive. Increment gdb-control-level + whenever the command matches gdb-control-commands-regexp, and + decrement it each time the command is "end". (Bug#11279) + +2012-04-27 Martin Rudalics <rudalics@gmx.at> + + * window.el (adjust-window-trailing-edge, enlarge-window) + (shrink-window, window-resize): + * mouse.el (mouse-drag-line): Fix resizing of minibuffer + windows (Bug#11276). + +2012-04-27 Chong Yidong <cyd@gnu.org> + * progmodes/pascal.el (pascal--extra-indent): Rename from ind, to - fix "missig prefix" warning. All callers changed. + fix "missing prefix" warning. All callers changed. 2012-04-27 Stefan Monnier <monnier@iro.umontreal.ca> diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 3135b9b5827..d4213899ef6 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -1,6 +1,6 @@ ;;; check-declare.el --- Check declare-function statements -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; Author: Glenn Morris <rgm@gnu.org> ;; Keywords: lisp, tools, maint @@ -28,7 +28,7 @@ ;; checks that all such statements in a file or directory are accurate. ;; The entry points are `check-declare-file' and `check-declare-directory'. -;; For more information, see Info node `elisp(Declaring Functions)'. +;; For more information, see Info node `(elisp)Declaring Functions'. ;;; TODO: diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e25ffd933e6..556094ca614 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2012-04-27 Andreas Schwab <schwab@linux-m68k.org> + + * gnus.el (debbugs-gnu): Don't override existing autoload definition. + 2012-04-26 Daiki Ueno <ueno@unixuser.org> * plstore.el (plstore-called-interactively-p): New compat macro copied diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index cc4f2eb1e7a..635bb6fc96f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -4397,7 +4397,9 @@ prompt the user for the name of an NNTP server to use." (gnus-1 arg dont-connect slave) (gnus-final-warning))) -(autoload 'debbugs-gnu "debbugs-gnu") +(eval-and-compile + (unless (fboundp 'debbugs-gnu) + (autoload 'debbugs-gnu "debbugs-gnu" "List all outstanding Emacs bugs." t))) (defun gnus-list-debbugs () "List all open Gnus bug reports." (interactive) diff --git a/lisp/mouse.el b/lisp/mouse.el index 8e08f89f22c..46e50ed9508 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -403,13 +403,16 @@ must be one of the symbols header, mode, or vertical." (or mouse-1-click-in-non-selected-windows (eq window (selected-window))) (mouse-on-link-p start))) - (enlarge-minibuffer + (resize-minibuffer + ;; Resize the minibuffer window if it's on the same frame as + ;; and immediately below the position window and it's either + ;; active or `resize-mini-windows' is nil. (and (eq line 'mode) - (not resize-mini-windows) (eq (window-frame minibuffer-window) frame) - (not (one-window-p t frame)) (= (nth 1 (window-edges minibuffer-window)) - (nth 3 (window-edges window))))) + (nth 3 (window-edges window))) + (or (not resize-mini-windows) + (eq minibuffer-window (active-minibuffer-window))))) (which-side (and (eq line 'vertical) (or (cdr (assq 'vertical-scroll-bars (frame-parameters frame))) @@ -424,7 +427,7 @@ must be one of the symbols header, mode, or vertical." ((eq line 'mode) ;; Check whether mode-line can be dragged at all. (when (and (window-at-side-p window 'bottom) - (not enlarge-minibuffer)) + (not resize-minibuffer)) (setq done t))) ((eq line 'vertical) ;; Get the window to adjust for the vertical case. @@ -498,13 +501,9 @@ must be one of the symbols header, mode, or vertical." ;; Remember that we dragged. (setq dragged t)) - (cond - (enlarge-minibuffer - (adjust-window-trailing-edge window growth)) - ((eq line 'mode) - (adjust-window-trailing-edge window growth)) - (t - (adjust-window-trailing-edge window (- growth))))))) + (if (eq line 'mode) + (adjust-window-trailing-edge window growth) + (adjust-window-trailing-edge window (- growth)))))) ;; Presumably, if this was just a click, the last event should be ;; `mouse-1', whereas if this did move the mouse, it should be a diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 86f493a0a5b..c340fd45df3 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,67 @@ +2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com> + + * org-table.el (org-table-number-fraction): Fix typo. + +2012-04-27 Eric Schulte <eric.schulte@gmx.com> + + * ob-python.el (org-babel-execute:python): Ensure newline precedes + automatically-added returns. + +2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com> + + * org-mouse.el (org-mode-hook): Do not move point when clicking on + a footnote reference. + +2012-04-27 Bastien Guerry <bzg@gnu.org> + + * org-faces.el (org-date-selected): Fix docstring. + +2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com> + + * org-list.el (org-list-struct-indent): Follow + `org-list-demote-modify-bullet' specifications for ordered + bullets. + (org-list-indent-item-generic, org-indent-item-tree) + (org-outdent-item-tree): Fix bug when operating on a region. + (org-outdent-item, org-indent-item): Allow to operate on a region. + + * org.el (org-shiftmetaleft, org-shiftmetaright): Allow to operate + on a region. + +2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com> + + * org-footnote.el (org-footnote-normalize): Fix positioning in + HTML export without a footnote section. + +2012-04-27 Madan Ramakrishnan <madanr79@gmail.com> (tiny change) + + * org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as + advertised by the function. + +2012-04-27 Zachary Kanfer <zkanfer@gmail.com> (tiny change) + + * org.el (org-read-date-display): Fix bug when displaying the + overlay. + +2012-04-27 Bastien Guerry <bzg@gnu.org> + + * org.el (org-mode): Don't use `buffer-face-mode' by default. + +2012-04-27 Bastien Guerry <bzg@gnu.org> + + * org-faces.el (org-date-selected): New face. + +2012-04-27 Jambunathan K <kjambunathan@gmail.com> + + * org-odt.el (org-odt-format-org-link): Pay no heed to whether the + internal links destined for headlines provide a description or + not. In fact, the `org-store-link' and `org-insert-link' create + internal links which do have a description. + +2012-04-27 Bastien Guerry <bzg@gnu.org> + + * org-clock.el (org-program-exists): Fix docstring. + 2012-04-14 Bastien Guerry <bzg@gnu.org> * org.el (org-point-at-end-of-empty-headline): Only try to match @@ -438,11 +502,6 @@ * org-attach.el (org-attach-store-link-p): Remove spurious quote in customization form choice. -2012-04-01 Tassilo Horn <tassilo@member.fsf.org> - - * org-contacts.el (org-contacts-check-mail-address): Add missing - word to `y-or-n-p' question. - 2012-04-01 Eric Schulte <eric.schulte@gmx.com> * ob-sh.el (org-babel-execute:sh): Pass all params to subroutine. @@ -934,11 +993,6 @@ * org-footnote.el (org-footnote-normalize): Make sure that footnotes are moved to a single place during export. -2012-04-01 Bastien Guerry <bzg@gnu.org> - - * org.el (org-cycle-internal-global): Prevent the display of - messages when cycling from with a Gnus article buffer. - 2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com> * org-footnote.el (org-footnote-normalize): Ensure footnote @@ -1807,11 +1861,6 @@ 2012-01-03 Bastien Guerry <bzg@gnu.org> - * org-drill.el (org-drill-leech-method, org-drill-scope) - (org-drill-spaced-repetition-algorithm): Fix wrong :type spec. - -2012-01-03 Bastien Guerry <bzg@gnu.org> - * org.el (org-property-re): Also match cumulating properties like ":prop+:". @@ -5929,10 +5978,6 @@ * ob-exp.el (org-babel-exp-in-export-file): Bind `org-link-search-inhibit-query' to t to inhibit prompts. -2011-07-28 Julien Danjou <julien@danjou.info> - - * org-contacts.el: Merge org-contacts-wl.el. - 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-add-options-to-plist): Use the right @@ -5967,10 +6012,6 @@ * org-agenda.el (org-agenda-open-link): Pass entire text of agenda line to `org-offer-links-in-entry'. -2011-07-28 Michael Markert <markert.michael@googlemail.com> - - * org-contacts-wl.el: New file. - 2011-07-28 Matt Lundin <mdl@imapmail.org> * org-bibtex.el (org-bibtex-search): New function. @@ -6736,9 +6777,6 @@ (org-agenda-open-link): Stop using prefix-length. (org-agenda-change-all-lines): Stop using prefix-length. - * org-colview-xemacs.el (org-columns-display-here): Stop using - prefix-length. Always return claned items. - * org-colview.el (org-columns-display-here): Stop using prefix-length. Always return claned items. @@ -13095,16 +13133,6 @@ * org-capture.el (org-capture-templates): Fix customize type. -2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - - * org-colview-xemacs.el (org-columns-compile-map): - (org-columns-number-to-string): - (org-columns-string-to-number): Handle estimate ranges. - (org-estimate-mean-and-var): New function. - (org-estimate-combine): New function. - (org-estimate-print): New function. - (org-string-to-estimate): New function. - 2010-09-25 Juanma Barranquero <lekktu@gmail.com> * org.el (org-refile-targets): @@ -14132,9 +14160,6 @@ * org-src.el (org-edit-src-find-region-and-lang): Test for table.el as late as possible. - * org-colview-xemacs.el: Make sure this file is never loaded into - Emacs. Remove all tests for XEmacs. - * org-colview.el: Make sure this file is never loaded into XEmacs. * org-agenda.el (org-highlight, org-unhighlight): Use direct @@ -15497,9 +15522,6 @@ * org-exp.el (org-export): Use "1" as a sign to export only the subtree. - * org-colview-xemacs.el (org-columns-edit-value): - Use org-unrestricted property. - * org-colview.el (org-columns-edit-value): Use org-unrestricted property. @@ -15898,13 +15920,6 @@ (org-agenda-colview-summarize): Handle extended summary types properly. - * org-colview-xemacs.el (org-columns-display-here): Don't try to - calculate values if the underlying property is not set. - (org-columns-string-to-number): Convert age strings back into - fractional days. - (org-agenda-colview-summarize): Handle extended summary types - properly. - 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-format-drawer-function): New variable. @@ -16083,10 +16098,6 @@ org-return-follows-link' is set and there is nothing else to do in this line. -2009-11-13 James TD Smith <ahktenzero@mohorovi.cc> - - * org-colview-xemacs.el: Add in changes from org-colview.el. - 2009-11-13 Dan Davison <davison@stats.ox.ac.uk> * org-exp-blocks.el: Modify split separator regexp to avoid empty @@ -17212,9 +17223,6 @@ * org-colview.el (org-columns, org-columns-redo) (org-agenda-columns): Don't use `goto-line'. - * org-colview-xemacs.el (org-columns, org-agenda-columns): - Don't use `goto-line'. - * org-agenda.el (org-agenda-mode): Force visual line motion off. (org-agenda-add-entry-text-maxlines): Improve docstring. (org-agenda-start-with-entry-text-mode): New option. @@ -17319,10 +17327,6 @@ * org-colview.el (org-columns-edit-value, org-columns-new) (org-insert-columns-dblock): Use org-icompleting-read. - * org-colview-xemacs.el (org-columns-edit-value) - (org-columns-new, org-insert-columns-dblock): - Use org-icompleting-read. - * org-attach.el (org-attach-delete-one, org-attach-open): Use org-icompleting-read. @@ -18017,10 +18021,6 @@ in column values. (org-columns-capture-view): Exclude comment and archived trees. - * org-colview-xemacs.el (org-columns-capture-view): - Protect vertical bars in column values. - (org-columns-capture-view): Exclude comment and archived trees. - * org.el (org-quote-vert): New function. * org-latex.el (org-export-latex-verbatim-wrap): New option. @@ -18209,9 +18209,6 @@ * org-colview.el (org-dblock-write:columnview): Allow indented #+TBLFM line. - * org-colview-xemacs.el (org-dblock-write:columnview): - Allow indented #+TBLFM line. - * org-clock.el (org-dblock-write:clocktable): Allow indented #+TBLFM line. @@ -18288,9 +18285,6 @@ * org.el (org-enable-priority-commands): New option. - * org-colview-xemacs.el (org-columns-compute) - (org-columns-number-to-string): Fix problems with empty fields. - * org-colview.el (org-columns-compute) (org-columns-number-to-string): Fix problems with empty fields. @@ -18493,9 +18487,6 @@ (org-export-region-as-latex): Use the property list. (org-export-as-latex): ???? - * org-colview-xemacs.el (org-columns-remove-overlays) - (org-columns): Fix call to `local-variable-p'. - 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-after-blockquotes-hook): New hook. @@ -18931,12 +18922,6 @@ (org-columns-remove-overlays): Restore the value of `truncate-lines'. (org-columns): Remember the value of `truncate-lines'. - * org-colview-xemacs.el (org-colview-initial-truncate-line-value): - New variable. - (org-columns-remove-overlays): Restore the value of - `truncate-lines'. - (org-columns): Remember the value of `truncate-lines'. - * org.el (org-columns-skip-arrchived-trees): New option. * org-agenda.el (org-agenda-export-html-style): Define color for @@ -19678,10 +19663,6 @@ Better error catching when a date/time property does not have allowed values defined. - * org-colview-xemacs.el (org-colview-construct-allowed-dates): - Better error catching when a date/time property does not have - allowed values defined. - 2009-01-25 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-map-entries): Restore point and restriction after @@ -20429,10 +20410,6 @@ * org-colview.el (org-columns-edit-value, org-columns-new) (org-insert-columns-dblock): Use `org-ido-completing-read'. - * org-colview-xemacs.el (org-columns-edit-value) - (org-columns-new, org-insert-columns-dblock): - Use `org-ido-completing-read'. - * org-attach.el (org-attach-delete-one, org-attach-open): Use `org-ido-completing-read'. @@ -21011,9 +20988,6 @@ * org-colview.el (org-columns-get-format-and-top-level): Remove resetting the marker. - * org-colview-xemacs.el (org-columns-get-format-and-top-level): - Remove resetting the marker. - * org.el (org-entry-property-inherited-from): Improve docstring. (org-entry-get-with-inheritance): Reset marker before starting the search. @@ -21188,11 +21162,6 @@ (org-columns-next-allowed-value): Use `org-colview-construct-allowed-dates'. - * org-colview-xemacs.el (org-colview-construct-allowed-dates): - New function. - (org-columns-next-allowed-value): - Use `org-colview-construct-allowed-dates'. - * org.el (org-protect-slash): New function. (org-get-refile-targets): Use `org-protect-slash'. @@ -21322,9 +21291,6 @@ * org-colview.el (org-columns-display-here): Use `org-columns-modify-value-for-display-function'. - * org-colview-xemacs.el (org-columns-display-here): - Use `org-columns-modify-value-for-display-function'. - * org.el (org-columns-modify-value-for-display-function): New option. * org-publish.el (org-publish-file): Make sure the directory match @@ -21515,8 +21481,6 @@ * org-colview.el (org-columns-next-allowed-value): Bug fix. - * org-colview-xemacs.el (org-columns-next-allowed-value): Bug fix. - * org-agenda.el (org-agenda-get-closed): Get the end time into the agenda prefix as well. @@ -21637,9 +21601,6 @@ * org-colview.el (org-columns-next-allowed-value): Handle next argument NTH to directly select a value. - * org-colview-xemacs.el (org-columns-next-allowed-value): Handle next - argument NTH to directly select a value. - 2008-06-17 Carsten Dominik <dominik@science.uva.nl> * org-agenda.el (org-agenda-scheduled-leaders): Fix docstring. @@ -21783,9 +21744,6 @@ * org-clock.el (org-clock-display, org-clock-out) (org-update-mode-line): Use `org-time-clocksum-format'. - * org-colview-xemacs.el (org-columns-number-to-string): - Use `org-time-clocksum-format'. - * org-colview.el (org-columns-number-to-string): Use `org-time-clocksum-format'. diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 0dc744aaa73..348248f35cf 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -64,7 +64,7 @@ This function is called by `org-babel-execute-src-block'." (preamble (cdr (assoc :preamble params))) (full-body (org-babel-expand-body:generic - (concat body (if return-val (format "return %s" return-val) "")) + (concat body (if return-val (format "\nreturn %s" return-val) "")) params (org-babel-variable-assignments:python params))) (result (org-babel-python-evaluate session full-body result-type result-params preamble))) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 3bb0fc84897..ddb56ca4bac 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -8294,7 +8294,7 @@ This is a command that has to be installed in `calendar-mode-map'." (defun org-agenda-bulk-mark (&optional arg) "Mark the entry at point for future bulk action." (interactive "p") - (dotimes (i (max arg 1)) + (dotimes (i (or arg 1)) (unless (org-get-at-bol 'org-agenda-diary-link) (let* ((m (org-get-at-bol 'org-hd-marker)) ov) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 434f6a1d5f6..aabcfc187db 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -664,7 +664,7 @@ Use alsa's aplay tool if available." (error (beep t) (beep t))))))))) (defun org-program-exists (program-name) - "Checks whenever we can locate program and launch it." + "Checks whenever we can locate PROGRAM-NAME using the `which' executable." (if (member system-type '(gnu/linux darwin)) (= 0 (call-process "which" nil nil nil program-name)))) diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 481d662eca1..58f879dd51a 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -285,6 +285,16 @@ column view defines special faces for each outline level. See the file "Face for date/time stamps." :group 'org-faces) +(defface org-date-selected + (org-compatible-face nil + '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold nil)) + (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold nil)) + (((class color) (min-colors 8) (background light)) (:foreground "red" :bold nil)) + (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold nil)) + (t (:inverse-video t)))) + "Face for highlighting the calendar day when using `org-read-date'." + :group 'org-faces) + (defface org-sexp-date '((((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 9319e0813c0..a9ba8d7510b 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -716,8 +716,8 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': ((and org-footnote-section (eq major-mode 'org-mode)) (goto-char (point-min)) (if (re-search-forward - (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) - "[ \t]*$") nil t) + (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) + "[ \t]*$") nil t) (delete-region (match-beginning 0) (org-end-of-subtree t t))) ;; A new footnote section is inserted by default at the end of ;; the buffer. @@ -727,7 +727,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (unless (bolp) (newline))) ;; No footnote section set: Footnotes will be added at the end ;; of the section containing their first reference. - ((eq major-mode 'org-mode)) + ;; Nevertheless, in an export situation, set insertion point to + ;; `point-max' by default. + ((eq major-mode 'org-mode) + (when export-props + (goto-char (point-max)) + (skip-chars-backward " \r\t\n") + (forward-line) + (delete-region (point) (point-max)))) (t ;; Remove any left-over tag in the buffer, if one is set up. (when org-footnote-tag-for-non-org-mode-files diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index c3775888325..4498280ac77 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -1484,8 +1484,19 @@ bullets between START and END." (change-bullet-maybe (function (lambda (item) - (let* ((bul (org-trim (org-list-get-bullet item struct))) - (new-bul-p (cdr (assoc bul org-list-demote-modify-bullet)))) + (let ((new-bul-p + (cdr (assoc + ;; Normalize ordered bullets. + (let ((bul (org-trim + (org-list-get-bullet item struct)))) + (cond ((string-match "[A-Z]\\." bul) "A.") + ((string-match "[A-Z])" bul) "A)") + ((string-match "[a-z]\\." bul) "a.") + ((string-match "[a-z])" bul) "a)") + ((string-match "[0-9]\\." bul) "1.") + ((string-match "[0-9])" bul) "1)") + (t bul))) + org-list-demote-modify-bullet)))) (when new-bul-p (org-list-set-bullet item struct new-bul-p)))))) (ind (lambda (cell) @@ -2500,7 +2511,6 @@ STRUCT is the list structure. Return t if successful." (save-excursion - (beginning-of-line) (let* ((regionp (org-region-active-p)) (rbeg (and regionp (region-beginning))) (rend (and regionp (region-end))) @@ -2509,7 +2519,8 @@ Return t if successful." (prevs (org-list-prevs-alist struct)) ;; Are we going to move the whole list? (specialp - (and (= top (point)) + (and (not regionp) + (= top (point-at-bol)) (cdr (assq 'indent org-list-automatic-rules)) (if no-subtree (error @@ -2523,12 +2534,12 @@ Return t if successful." (progn (set-marker org-last-indent-begin-marker rbeg) (set-marker org-last-indent-end-marker rend)) - (set-marker org-last-indent-begin-marker (point)) + (set-marker org-last-indent-begin-marker (point-at-bol)) (set-marker org-last-indent-end-marker (cond (specialp (org-list-get-bottom-point struct)) - (no-subtree (1+ (point))) - (t (org-list-get-item-end (point) struct)))))) + (no-subtree (1+ (point-at-bol))) + (t (org-list-get-item-end (point-at-bol) struct)))))) (let* ((beg (marker-position org-last-indent-begin-marker)) (end (marker-position org-last-indent-end-marker))) (cond @@ -2583,19 +2594,35 @@ Return t if successful." "Outdent a local list item, but not its children. If a region is active, all items inside will be moved." (interactive) - (if (org-at-item-p) - (let ((struct (org-list-struct))) - (org-list-indent-item-generic -1 t struct)) - (error "Not at an item"))) + (let ((regionp (org-region-active-p))) + (cond + ((or (org-at-item-p) + (and regionp + (save-excursion (goto-char (region-beginning)) + (org-at-item-p)))) + (let ((struct (if (not regionp) (org-list-struct) + (save-excursion (goto-char (region-beginning)) + (org-list-struct))))) + (org-list-indent-item-generic -1 t struct))) + (regionp (error "Region not starting at an item")) + (t (error "Not at an item"))))) (defun org-indent-item () "Indent a local list item, but not its children. If a region is active, all items inside will be moved." (interactive) - (if (org-at-item-p) - (let ((struct (org-list-struct))) - (org-list-indent-item-generic 1 t struct)) - (error "Not at an item"))) + (let ((regionp (org-region-active-p))) + (cond + ((or (org-at-item-p) + (and regionp + (save-excursion (goto-char (region-beginning)) + (org-at-item-p)))) + (let ((struct (if (not regionp) (org-list-struct) + (save-excursion (goto-char (region-beginning)) + (org-list-struct))))) + (org-list-indent-item-generic 1 t struct))) + (regionp (error "Region not starting at an item")) + (t (error "Not at an item"))))) (defun org-outdent-item-tree () "Outdent a local list item including its children. @@ -2604,10 +2631,12 @@ If a region is active, all items inside will be moved." (let ((regionp (org-region-active-p))) (cond ((or (org-at-item-p) - (and (org-region-active-p) - (goto-char (region-beginning)) - (org-at-item-p))) - (let ((struct (org-list-struct))) + (and regionp + (save-excursion (goto-char (region-beginning)) + (org-at-item-p)))) + (let ((struct (if (not regionp) (org-list-struct) + (save-excursion (goto-char (region-beginning)) + (org-list-struct))))) (org-list-indent-item-generic -1 nil struct))) (regionp (error "Region not starting at an item")) (t (error "Not at an item"))))) @@ -2619,10 +2648,12 @@ If a region is active, all items inside will be moved." (let ((regionp (org-region-active-p))) (cond ((or (org-at-item-p) - (and (org-region-active-p) - (goto-char (region-beginning)) - (org-at-item-p))) - (let ((struct (org-list-struct))) + (and regionp + (save-excursion (goto-char (region-beginning)) + (org-at-item-p)))) + (let ((struct (if (not regionp) (org-list-struct) + (save-excursion (goto-char (region-beginning)) + (org-list-struct))))) (org-list-indent-item-generic 1 nil struct))) (regionp (error "Region not starting at an item")) (t (error "Not at an item"))))) diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 5a87bd64697..b467064b888 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -915,6 +915,7 @@ This means, between the beginning of line and the point." ((assq :checkbox context) (org-toggle-checkbox)) ((assq :item-bullet context) (let ((org-cycle-include-plain-lists t)) (org-cycle))) + ((org-footnote-at-reference-p) nil) (t ad-do-it)))))) (defun org-mouse-move-tree-start (event) diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index 234272a378d..2e984a575bd 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el @@ -1689,7 +1689,6 @@ ATTR is a string of other attributes of the a element." (or (not thefile) (string= thefile "")) (plist-get org-lparse-opt-plist :section-numbers) (setq sec-frag fragment) - (org-find-text-property-in-string 'org-no-description fragment) (or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag) (and (setq sec-frag (loop for alias in org-export-target-aliases do diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 08981b57e49..37e5c4f91a6 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -135,8 +135,8 @@ Other options offered by the customize interface are more restrictive." (defcustom org-table-number-fraction 0.5 "Fraction of numbers in a column required to make the column align right. -In a column all non-white fields are considered. If at least this -fraction of fields is matched by `org-table-number-fraction', +In a column all non-white fields are considered. If at least +this fraction of fields is matched by `org-table-number-regexp', alignment to the right border applies." :group 'org-table-settings :type 'number) diff --git a/lisp/org/org.el b/lisp/org/org.el index c2cc2354439..838a9a18ad4 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -5057,8 +5057,7 @@ The following commands are available: 'org-parse-arguments) (set (make-local-variable 'pcomplete-termination-string) "") (when (>= emacs-major-version 23) - (set (make-local-variable 'buffer-face-mode-face) 'org-default) - (buffer-face-mode)) + (set (make-local-variable 'buffer-face-mode-face) 'org-default)) ;; If empty file that did not turn on org-mode automatically, make it to. (if (and org-insert-mode-line-in-empty-file @@ -14915,7 +14914,7 @@ So these are more for recording a certain time/date." (org-time-stamp arg 'inactive)) (defvar org-date-ovl (make-overlay 1 1)) -(overlay-put org-date-ovl 'face 'org-warning) +(overlay-put org-date-ovl 'face 'org-date-selected) (org-detach-overlay org-date-ovl) (defvar org-ans1) ; dynamically scoped parameter @@ -15131,35 +15130,35 @@ user." (when org-read-date-display-live (when org-read-date-overlay (delete-overlay org-read-date-overlay)) - (let ((p (point))) - (end-of-line 1) - (while (not (equal (buffer-substring - (max (point-min) (- (point) 4)) (point)) - " ")) - (insert " ")) - (goto-char p)) - (let* ((ans (concat (buffer-substring (point-at-bol) (point-max)) - " " (or org-ans1 org-ans2))) - (org-end-time-was-given nil) - (f (org-read-date-analyze ans org-def org-defdecode)) - (fmts (if org-dcst - org-time-stamp-custom-formats - org-time-stamp-formats)) - (fmt (if (or org-with-time - (and (boundp 'org-time-was-given) org-time-was-given)) - (cdr fmts) - (car fmts))) - (txt (concat "=> " (format-time-string fmt (apply 'encode-time f))))) - (when (and org-end-time-was-given - (string-match org-plain-time-of-day-regexp txt)) - (setq txt (concat (substring txt 0 (match-end 0)) "-" - org-end-time-was-given - (substring txt (match-end 0))))) - (when org-read-date-analyze-futurep - (setq txt (concat txt " (=>F)"))) - (setq org-read-date-overlay - (make-overlay (1- (point-at-eol)) (point-at-eol))) - (org-overlay-display org-read-date-overlay txt 'secondary-selection)))) + (when (minibufferp (current-buffer)) + (save-excursion + (end-of-line 1) + (while (not (equal (buffer-substring + (max (point-min) (- (point) 4)) (point)) + " ")) + (insert " "))) + (let* ((ans (concat (buffer-substring (point-at-bol) (point-max)) + " " (or org-ans1 org-ans2))) + (org-end-time-was-given nil) + (f (org-read-date-analyze ans org-def org-defdecode)) + (fmts (if org-dcst + org-time-stamp-custom-formats + org-time-stamp-formats)) + (fmt (if (or org-with-time + (and (boundp 'org-time-was-given) org-time-was-given)) + (cdr fmts) + (car fmts))) + (txt (concat "=> " (format-time-string fmt (apply 'encode-time f))))) + (when (and org-end-time-was-given + (string-match org-plain-time-of-day-regexp txt)) + (setq txt (concat (substring txt 0 (match-end 0)) "-" + org-end-time-was-given + (substring txt (match-end 0))))) + (when org-read-date-analyze-futurep + (setq txt (concat txt " (=>F)"))) + (setq org-read-date-overlay + (make-overlay (1- (point-at-eol)) (point-at-eol))) + (org-overlay-display org-read-date-overlay txt 'secondary-selection))))) (defun org-read-date-analyze (ans org-def org-defdecode) "Analyze the combined answer of the date prompt." @@ -17969,28 +17968,34 @@ See the individual commands for more information." (defun org-shiftmetaleft () "Promote subtree or delete table column. -Calls `org-promote-subtree', `org-outdent-item', -or `org-table-delete-column', depending on context. -See the individual commands for more information." +Calls `org-promote-subtree', `org-outdent-item-tree', or +`org-table-delete-column', depending on context. See the +individual commands for more information." (interactive) (cond ((run-hook-with-args-until-success 'org-shiftmetaleft-hook)) ((org-at-table-p) (call-interactively 'org-table-delete-column)) ((org-at-heading-p) (call-interactively 'org-promote-subtree)) - ((org-at-item-p) (call-interactively 'org-outdent-item-tree)) + ((if (not (org-region-active-p)) (org-at-item-p) + (save-excursion (goto-char (region-beginning)) + (org-at-item-p))) + (call-interactively 'org-outdent-item-tree)) (t (org-modifier-cursor-error)))) (defun org-shiftmetaright () "Demote subtree or insert table column. -Calls `org-demote-subtree', `org-indent-item', -or `org-table-insert-column', depending on context. -See the individual commands for more information." +Calls `org-demote-subtree', `org-indent-item-tree', or +`org-table-insert-column', depending on context. See the +individual commands for more information." (interactive) (cond ((run-hook-with-args-until-success 'org-shiftmetaright-hook)) ((org-at-table-p) (call-interactively 'org-table-insert-column)) ((org-at-heading-p) (call-interactively 'org-demote-subtree)) - ((org-at-item-p) (call-interactively 'org-indent-item-tree)) + ((if (not (org-region-active-p)) (org-at-item-p) + (save-excursion (goto-char (region-beginning)) + (org-at-item-p))) + (call-interactively 'org-indent-item-tree)) (t (org-modifier-cursor-error)))) (defun org-shiftmetaup (&optional arg) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 9f9551cc5d8..0cc5de90573 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -603,6 +603,8 @@ NOARG must be t when this macro is used outside `gud-def'" (set (make-local-variable 'gud-marker-filter) #'gud-gdb-marker-filter)) (funcall filter proc string)))) +(defvar gdb-control-level 0) + ;;;###autoload (defun gdb (command-line) "Run gdb on program FILE in buffer *gud-FILE*. @@ -677,6 +679,7 @@ detailed description of this mode. (set-process-filter proc #'gdb--check-interpreter)) (set (make-local-variable 'gud-minor-mode) 'gdbmi) + (set (make-local-variable 'gdb-control-level) 0) (setq comint-input-sender 'gdb-send) (when (ring-empty-p comint-input-ring) ; cf shell-mode (let ((hfile (expand-file-name (or (getenv "GDBHISTFILE") @@ -1705,6 +1708,16 @@ static char *magick[] = { :group 'gdb) +(defvar gdb-control-commands-regexp + (concat + "^\\(" + "commands\\|if\\|while\\|define\\|document\\|python\\|" + "while-stepping\\|stepping\\|ws\\|actions" + "\\)\\([[:blank:]]+.*\\)?$") + "Regexp matching GDB commands that enter a recursive reading loop. +As long as GDB is in the recursive reading loop, it does not expect +commands to be prefixed by \"-interpreter-exec console\".") + (defun gdb-send (proc string) "A comint send filter for gdb." (with-current-buffer gud-comint-buffer @@ -1714,11 +1727,15 @@ static char *magick[] = { (if (not (string= "" string)) (setq gdb-last-command string) (if gdb-last-command (setq string gdb-last-command))) - (if (string-match "^-" string) - ;; MI command + (if (or (string-match "^-" string) + (> gdb-control-level 0)) + ;; Either MI command or we are feeding GDB's recursive reading loop. (progn (setq gdb-first-done-or-error t) - (process-send-string proc (concat string "\n"))) + (process-send-string proc (concat string "\n")) + (if (and (string-match "^end$" string) + (> gdb-control-level 0)) + (setq gdb-control-level (1- gdb-control-level)))) ;; CLI command (if (string-match "\\\\$" string) (setq gdb-continuation (concat gdb-continuation string "\n")) @@ -1729,7 +1746,12 @@ static char *magick[] = { (if gdb-enable-debug (push (cons 'mi-send to-send) gdb-debug-log)) (process-send-string proc to-send)) - (setq gdb-continuation nil)))) + (if (and (string-match "^end$" string) + (> gdb-control-level 0)) + (setq gdb-control-level (1- gdb-control-level))) + (setq gdb-continuation nil))) + (if (string-match gdb-control-commands-regexp string) + (setq gdb-control-level (1+ gdb-control-level)))) (defun gdb-mi-quote (string) "Return STRING quoted properly as an MI argument. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index cdaeadde906..d57a3128a16 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -179,7 +179,9 @@ and you want to simplify them for the mode line (defvar which-func-table (make-hash-table :test 'eq :weakness 'key)) (defconst which-func-current - '(:eval (gethash (selected-window) which-func-table which-func-unknown))) + '(:eval (replace-regexp-in-string + "%" "%%" + (gethash (selected-window) which-func-table which-func-unknown)))) ;;;###autoload (put 'which-func-current 'risky-local-variable t) (defvar which-func-mode nil diff --git a/lisp/select.el b/lisp/select.el index 0260eba4682..3948fcc5456 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -213,30 +213,25 @@ two markers or an overlay. Otherwise, it is nil." (defun xselect--int-to-cons (n) (cons (ash n -16) (logand n 65535))) -(defun xselect-convert-to-string (_selection type value) - (let (str coding) - ;; Get the actual string from VALUE. - (cond ((stringp value) - (setq str value)) - ((setq value (xselect--selection-bounds value)) - (with-current-buffer (nth 2 value) - (setq str (buffer-substring (nth 0 value) - (nth 1 value)))))) - (when str - ;; If TYPE is nil, this is a local request, thus return STR as - ;; is. Otherwise, encode STR. - (if (not type) - str - (setq coding (or next-selection-coding-system selection-coding-system)) +(defun xselect--encode-string (type str &optional can-modify) + (when str + ;; If TYPE is nil, this is a local request; return STR as-is. + (if (null type) + str + ;; Otherwise, encode STR. + (let ((coding (or next-selection-coding-system + selection-coding-system))) (if coding (setq coding (coding-system-base coding))) (let ((inhibit-read-only t)) ;; Suppress producing escape sequences for compositions. + ;; But avoid modifying the string if it's a buffer name etc. + (unless can-modify (setq str (substring str 0))) (remove-text-properties 0 (length str) '(composition nil) str) + ;; TEXT is a polymorphic target. Select the actual type + ;; from `UTF8_STRING', `COMPOUND_TEXT', `STRING', and + ;; `C_STRING'. (if (eq type 'TEXT) - ;; TEXT is a polymorphic target. We must select the - ;; actual type from `UTF8_STRING', `COMPOUND_TEXT', - ;; `STRING', and `C_STRING'. (if (not (multibyte-string-p str)) (setq type 'C_STRING) (let (non-latin-1 non-unicode eight-bit) @@ -279,6 +274,14 @@ two markers or an overlay. Otherwise, it is nil." (setq next-selection-coding-system nil) (cons type str)))) +(defun xselect-convert-to-string (_selection type value) + (let ((str (cond ((stringp value) value) + ((setq value (xselect--selection-bounds value)) + (with-current-buffer (nth 2 value) + (buffer-substring (nth 0 value) + (nth 1 value))))))) + (xselect--encode-string type str t))) + (defun xselect-convert-to-length (_selection _type value) (let ((len (cond ((stringp value) (length value)) @@ -311,7 +314,7 @@ two markers or an overlay. Otherwise, it is nil." (defun xselect-convert-to-filename (_selection _type value) (when (setq value (xselect--selection-bounds value)) - (buffer-file-name (nth 2 value)))) + (xselect--encode-string 'TEXT (buffer-file-name (nth 2 value))))) (defun xselect-convert-to-charpos (_selection _type value) (when (setq value (xselect--selection-bounds value)) @@ -337,13 +340,13 @@ two markers or an overlay. Otherwise, it is nil." (xselect--int-to-cons (max beg end)))))))) (defun xselect-convert-to-os (_selection _type _size) - (symbol-name system-type)) + (xselect--encode-string 'TEXT (symbol-name system-type))) (defun xselect-convert-to-host (_selection _type _size) - (system-name)) + (xselect--encode-string 'TEXT (system-name))) (defun xselect-convert-to-user (_selection _type _size) - (user-full-name)) + (xselect--encode-string 'TEXT (user-full-name))) (defun xselect-convert-to-class (_selection _type _size) "Convert selection to class. diff --git a/lisp/simple.el b/lisp/simple.el index 67f6e4eedf7..55f7d1261ee 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -817,7 +817,7 @@ instead of deleted." :type '(choice (const :tag "Delete active region" t) (const :tag "Kill active region" kill) (const :tag "Do ordinary deletion" nil)) - :group 'editing + :group 'killing :version "24.1") (defun delete-backward-char (n &optional killflag) diff --git a/lisp/startup.el b/lisp/startup.el index 4a8af55af2f..d6e73023699 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -41,7 +41,7 @@ (defcustom initial-buffer-choice nil "Buffer to show after starting Emacs. If the value is nil and `inhibit-startup-screen' is nil, show the -startup screen. If the value is string, visit the specified file +startup screen. If the value is a string, visit the specified file or directory using `find-file'. If t, open the `*scratch*' buffer." :type '(choice diff --git a/lisp/subr.el b/lisp/subr.el index 2404f6a56d2..b548f82ca5a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2023,7 +2023,10 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (let ((map (make-sparse-keymap))) ;; Don't hide the menu-bar and tool-bar entries. (define-key map [menu-bar] (lookup-key global-map [menu-bar])) - (define-key map [tool-bar] (lookup-key global-map [tool-bar])) + (define-key map [tool-bar] + ;; This hack avoids evaluating the :filter (Bug#9922). + (or (cdr (assq 'tool-bar global-map)) + (lookup-key global-map [tool-bar]))) map)) (aref (catch 'read-key (read-key-sequence-vector prompt nil t)) 0)) (cancel-timer timer) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index c185c4e8fab..ebaec2494ac 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -220,7 +220,7 @@ matching the resulting Git log output, and KEYWORDS is a list of (let ((diff (vc-git--run-command-string file "diff-index" "-p" "--raw" "-z" "HEAD" "--"))) (if (and diff - (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.\\)?" + (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.*\n.\\)?" diff)) (let ((diff-letter (match-string 1 diff))) (if (not (match-beginning 2)) diff --git a/lisp/window.el b/lisp/window.el index b8f1bf3456d..d57bd4e2300 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1482,12 +1482,24 @@ edge of WINDOW consider using `adjust-window-trailing-edge' instead." (setq window (window-normalize-window window)) (let* ((frame (window-frame window)) + (minibuffer-window (minibuffer-window frame)) sibling) (cond ((eq window (frame-root-window frame)) (error "Cannot resize the root window of a frame")) ((window-minibuffer-p window) - (window--resize-mini-window window delta)) + (if horizontal + (error "Cannot resize minibuffer window horizontally") + (window--resize-mini-window window delta))) + ((and (not horizontal) + (window-full-height-p window) + (eq (window-frame minibuffer-window) frame) + (or (not resize-mini-windows) + (eq minibuffer-window (active-minibuffer-window)))) + ;; If WINDOW is full height and either `resize-mini-windows' is + ;; nil or the minibuffer window is active, resize the minibuffer + ;; window. + (window--resize-mini-window minibuffer-window (- delta))) ((window--resizable-p window delta horizontal ignore) (window--resize-reset frame horizontal) (window--resize-this-window window delta horizontal ignore t) @@ -2002,17 +2014,25 @@ right. If DELTA is less than zero, move the edge upwards or to the left. If the edge can't be moved by DELTA lines or columns, move it as far as possible in the desired direction." (setq window (window-normalize-window window)) - (let ((frame (window-frame window)) - (right window) - left this-delta min-delta max-delta) + (let* ((frame (window-frame window)) + (minibuffer-window (minibuffer-window frame)) + (right window) + left this-delta min-delta max-delta) ;; Find the edge we want to move. (while (and (or (not (window-combined-p right horizontal)) (not (window-right right))) (setq right (window-parent right)))) (cond - ((and (not right) (not horizontal) (not resize-mini-windows) - (eq (window-frame (minibuffer-window frame)) frame)) - (window--resize-mini-window (minibuffer-window frame) (- delta))) + ((and (not right) (not horizontal) + ;; Resize the minibuffer window if it's on the same frame as + ;; and immediately below WINDOW and it's either active or + ;; `resize-mini-windows' is nil. + (eq (window-frame minibuffer-window) frame) + (= (nth 1 (window-edges minibuffer-window)) + (nth 3 (window-edges window))) + (or (not resize-mini-windows) + (eq minibuffer-window (active-minibuffer-window)))) + (window--resize-mini-window minibuffer-window (- delta))) ((or (not (setq left right)) (not (setq right (window-right right)))) (if horizontal (error "No window on the right of this one") @@ -2109,18 +2129,30 @@ make selected window wider by DELTA columns. If DELTA is negative, shrink selected window by -DELTA lines or columns. Return nil." (interactive "p") - (cond - ((zerop delta)) - ((window-size-fixed-p nil horizontal) - (error "Selected window has fixed size")) - ((window--resizable-p nil delta horizontal) - (window-resize nil delta horizontal)) - (t - (window-resize - nil (if (> delta 0) - (window-max-delta nil horizontal) - (- (window-min-delta nil horizontal))) - horizontal)))) + (let ((minibuffer-window (minibuffer-window))) + (cond + ((zerop delta)) + ((window-size-fixed-p nil horizontal) + (error "Selected window has fixed size")) + ((window-minibuffer-p) + (if horizontal + (error "Cannot resize minibuffer window horizontally") + (window--resize-mini-window (selected-window) delta))) + ((and (not horizontal) + (window-full-height-p) + (eq (window-frame minibuffer-window) (selected-frame)) + (not resize-mini-windows)) + ;; If the selected window is full height and `resize-mini-windows' + ;; is nil, resize the minibuffer window. + (window--resize-mini-window minibuffer-window (- delta))) + ((window--resizable-p nil delta horizontal) + (window-resize nil delta horizontal)) + (t + (window-resize + nil (if (> delta 0) + (window-max-delta nil horizontal) + (- (window-min-delta nil horizontal))) + horizontal))))) (defun shrink-window (delta &optional horizontal) "Make the selected window DELTA lines smaller. @@ -2131,18 +2163,30 @@ negative, enlarge selected window by -DELTA lines or columns. Also see the `window-min-height' variable. Return nil." (interactive "p") - (cond - ((zerop delta)) - ((window-size-fixed-p nil horizontal) - (error "Selected window has fixed size")) - ((window--resizable-p nil (- delta) horizontal) - (window-resize nil (- delta) horizontal)) - (t - (window-resize - nil (if (> delta 0) - (- (window-min-delta nil horizontal)) - (window-max-delta nil horizontal)) - horizontal)))) + (let ((minibuffer-window (minibuffer-window))) + (cond + ((zerop delta)) + ((window-size-fixed-p nil horizontal) + (error "Selected window has fixed size")) + ((window-minibuffer-p) + (if horizontal + (error "Cannot resize minibuffer window horizontally") + (window--resize-mini-window (selected-window) (- delta)))) + ((and (not horizontal) + (window-full-height-p) + (eq (window-frame minibuffer-window) (selected-frame)) + (not resize-mini-windows)) + ;; If the selected window is full height and `resize-mini-windows' + ;; is nil, resize the minibuffer window. + (window--resize-mini-window minibuffer-window delta)) + ((window--resizable-p nil (- delta) horizontal) + (window-resize nil (- delta) horizontal)) + (t + (window-resize + nil (if (> delta 0) + (- (window-min-delta nil horizontal)) + (window-max-delta nil horizontal)) + horizontal))))) (defun maximize-window (&optional window) "Maximize WINDOW. diff --git a/lisp/xml.el b/lisp/xml.el index 39a8da0f337..cb56f023af0 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -323,7 +323,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded." (cond ((null result) ;; Not looking at an xml start tag. - (forward-char 1)) + (unless (eobp) + (forward-char 1))) ((and xml (not xml-sub-parser)) ;; Translation of rule [1] of XML specifications (error "XML: (Not Well-Formed) Only one root tag allowed")) @@ -422,7 +423,8 @@ Returns one of: ((looking-at "<!--") (search-forward "-->") (skip-syntax-forward " ") - (xml-parse-tag parse-dtd xml-ns)) + (unless (eobp) + (xml-parse-tag parse-dtd xml-ns))) ;; end tag ((looking-at "</") '()) |