commit 2b848fadd51e805b2f46da64c5958ea7f009048a (HEAD, refs/remotes/origin/master) Author: Xue Fuqiao Date: Fri Jul 3 11:21:08 2015 +0800 Add cross references in documentation * doc/emacs/display.texi (Displaying Boundaries): * doc/emacs/search.texi (Word Search): Add cross references. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index bed25a5..601a40b 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1112,13 +1112,14 @@ how the buffer boundaries and window scrolling is indicated in the fringes. If the value is @code{left} or @code{right}, both angle and arrow bitmaps are displayed in the left or right fringe, respectively. - If value is an alist, each element @code{(@var{indicator} . -@var{position})} specifies the position of one of the indicators. -The @var{indicator} must be one of @code{top}, @code{bottom}, -@code{up}, @code{down}, or @code{t} which specifies the default -position for the indicators not present in the alist. -The @var{position} is one of @code{left}, @code{right}, or @code{nil} -which specifies not to show this indicator. + If value is an alist (@pxref{Association Lists,,, elisp, the Emacs +Lisp Reference Manual}), each element @code{(@var{indicator} . +@var{position})} specifies the position of one of the indicators. The +@var{indicator} must be one of @code{top}, @code{bottom}, @code{up}, +@code{down}, or @code{t} which specifies the default position for the +indicators not present in the alist. The @var{position} is one of +@code{left}, @code{right}, or @code{nil} which specifies not to show +this indicator. For example, @code{((top . left) (t . right))} places the top angle bitmap in left fringe, the bottom angle bitmap in right fringe, and diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index b69146a..247033d 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -511,8 +511,8 @@ the search string must exactly match a whole word. In an incremental word search, the matching is more lax: while you are typing the search string, its first and last words need not match whole words. This is so that the matching can proceed incrementally as you type. This -additional laxity does not apply to the lazy highlight, which always -matches whole words. +additional laxity does not apply to the lazy highlight +(@pxref{Incremental Search}), which always matches whole words. @node Symbol Search @section Symbol Search commit 7071848862a91b18251ee66cca20bcf527f6ca8e Author: Eli Zaretskii Date: Thu Jul 2 20:40:01 2015 +0300 ;* src/bidi.c (bpa_stack_entry): Update commentary for Unicode 8.0. diff --git a/src/bidi.c b/src/bidi.c index e5e08c6..e06430c 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -2452,7 +2452,7 @@ typedef struct bpa_stack_entry { #define MAX_BPA_STACK ((int)max (MAX_ALLOCA / sizeof (bpa_stack_entry), 1)) /* UAX#9 says to match opening brackets with the matching closing - brackets or their canonical equivalents. As of Unicode 7.0, there + brackets or their canonical equivalents. As of Unicode 8.0, there are only 2 bracket characters that have canonical equivalence decompositions: u+2329 and u+232A. So instead of accessing the table in uni-decomposition.el, we just handle these 2 characters commit 08b2538443fc3f483788b12dcb41715a88e40741 Author: Paul Eggert Date: Thu Jul 2 09:29:51 2015 -0700 -batch should not affect ‘’ -> `' display * lisp/startup.el (command-line): Do the ‘’ -> `' check even if -batch (Bug#20926). diff --git a/lisp/startup.el b/lisp/startup.el index 4f1e315..cfe2269 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1018,12 +1018,11 @@ please check its value") (setq no-blinking-cursor t)) ;; If curved quotes don't work, display ASCII approximations. - (unless noninteractive - (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) - (when (not (char-displayable-p (car char-repl))) - (or standard-display-table - (setq standard-display-table (make-display-table))) - (aset standard-display-table (car char-repl) (cdr char-repl))))) + (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) + (when (not (char-displayable-p (car char-repl))) + (or standard-display-table + (setq standard-display-table (make-display-table))) + (aset standard-display-table (car char-repl) (cdr char-repl)))) ;; Re-evaluate predefined variables whose initial value depends on ;; the runtime context. commit a0010db41ca83a8211162b649e679162dd4153a6 Author: Stefan Monnier Date: Thu Jul 2 10:59:32 2015 -0400 * lisp/emacs-lisp/eieio-core.el (eieio--class-v): Remove * lisp/emacs-lisp/eieio-core.el, lisp/emacs-lisp/eieio.el, lisp/emacs-lisp/eieio-opt.el, lisp/emacs-lisp/eieio-compat.el: Use cl--find-class instead. diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el index 0283704..386ff2f 100644 --- a/lisp/emacs-lisp/eieio-compat.el +++ b/lisp/emacs-lisp/eieio-compat.el @@ -138,7 +138,7 @@ Summary: (cl-generic-make-generalizer ;; Give it a slightly higher priority than `subclass' so that the ;; interleaved list comes before subclass's non-interleaved list. - 61 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name))) + 61 (lambda (name) `(and (symbolp ,name) (cl--find-class ,name))) #'eieio--generic-static-symbol-specializers)) (defconst eieio--generic-static-object-generalizer (cl-generic-make-generalizer diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index bf3f442..8a09f07 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -126,23 +126,19 @@ Currently under control of this var: ;;; Important macros used internally in eieio. -(defmacro eieio--class-v (class) ;Use a macro, so it acts as a GV place. - "Internal: Return the class vector from the CLASS symbol." - (declare (debug t)) - ;; No check: If eieio gets this far, it has probably been checked already. - `(get ,class 'eieio-class-definition)) +(require 'cl-macs) ;For cl--find-class. (defsubst eieio--class-object (class) "Return the class object." (if (symbolp class) ;; Keep the symbol if class-v is nil, for better error messages. - (or (eieio--class-v class) class) + (or (cl--find-class class) class) class)) (defun class-p (class) "Return non-nil if CLASS is a valid class vector. CLASS is a symbol." ;FIXME: Is it a vector or a symbol? - (and (symbolp class) (eieio--class-p (eieio--class-v class)))) + (and (symbolp class) (eieio--class-p (cl--find-class class)))) (defun eieio--class-print-name (class) "Return a printed representation of CLASS." @@ -182,7 +178,7 @@ Return nil if that option doesn't exist." (defun class-abstract-p (class) "Return non-nil if CLASS is abstract. Abstract classes cannot be instantiated." - (eieio--class-option (eieio--class-v class) :abstract)) + (eieio--class-option (cl--find-class class) :abstract)) (defsubst eieio--class-method-invocation-order (class) "Return the invocation order of CLASS. @@ -215,7 +211,7 @@ It creates an autoload function for CNAME's constructor." ;; simply not exist yet. So instead we just don't store the list of parents ;; here in eieio-defclass-autoload at all, since it seems that they're just ;; not needed before the class is actually loaded. - (let* ((oldc (eieio--class-v cname)) + (let* ((oldc (cl--find-class cname)) (newc (eieio--class-make cname))) (if (eieio--class-p oldc) nil ;; Do nothing if we already have this class. @@ -229,7 +225,7 @@ It creates an autoload function for CNAME's constructor." ;; do this first so that we can call defmethod for the accessor. ;; The vector will be updated by the following while loop and will not ;; need to be stored a second time. - (setf (eieio--class-v cname) newc) + (setf (cl--find-class cname) newc) ;; Create an autoload on top of our constructor function. (autoload cname filename doc nil nil) @@ -276,7 +272,7 @@ See `defclass' for more information." (run-hooks 'eieio-hook) (setq eieio-hook nil) - (let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c))) + (let* ((oldc (let ((c (cl--find-class cname))) (if (eieio--class-p c) c))) (newc (or oldc ;; Reuse `oldc' instead of creating a new one, so that ;; existing references stay valid. E.g. when @@ -312,7 +308,7 @@ See `defclass' for more information." (dolist (p superclasses) (if (not (and p (symbolp p))) (error "Invalid parent class %S" p) - (let ((c (eieio--class-v p))) + (let ((c (cl--find-class p))) (if (not (eieio--class-p c)) ;; bad class (error "Given parent class %S is not a class" p) @@ -371,7 +367,7 @@ See `defclass' for more information." ;; do this first so that we can call defmethod for the accessor. ;; The vector will be updated by the following while loop and will not ;; need to be stored a second time. - (setf (eieio--class-v cname) newc) + (setf (cl--find-class cname) newc) ;; Query each slot in the declaration list and mangle into the ;; class structure I have defined. @@ -731,7 +727,7 @@ Argument FN is the function calling this verifier." (cl-check-type obj (or eieio-object class)) (let* ((class (cond ((symbolp obj) (error "eieio-oref called on a class: %s" obj) - (let ((c (eieio--class-v obj))) + (let ((c (cl--find-class obj))) (if (eieio--class-p c) (eieio-class-un-autoload obj)) c)) (t (eieio--object-class obj)))) @@ -757,7 +753,7 @@ Argument FN is the function calling this verifier." Fills in OBJ's SLOT with its default value." (cl-check-type obj (or eieio-object class)) (cl-check-type slot symbol) - (let* ((cl (cond ((symbolp obj) (eieio--class-v obj)) + (let* ((cl (cond ((symbolp obj) (cl--find-class obj)) (t (eieio--object-class obj)))) (c (eieio--slot-name-index cl slot))) (if (not c) @@ -964,7 +960,7 @@ If a consistent order does not exist, signal an error." (defun eieio--class-precedence-c3 (class) "Return all parents of CLASS in c3 order." - (let ((parents (eieio--class-parents (eieio--class-v class)))) + (let ((parents (eieio--class-parents (cl--find-class class)))) (eieio--c3-merge-lists (list class) (append @@ -1084,14 +1080,14 @@ method invocation orders of the involved classes." (defconst eieio--generic-subclass-generalizer (cl-generic-make-generalizer - 60 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name))) + 60 (lambda (name) `(and (symbolp ,name) (cl--find-class ,name))) #'eieio--generic-subclass-specializers)) (cl-defmethod cl-generic-generalizers ((_specializer (head subclass))) (list eieio--generic-subclass-generalizer)) -;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "0609a7bdcd6f38876b7f5647047ddca9") +;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "ea8c7f24ed47c6b71ac37cbdae1c9931") ;;; Generated autoloads from eieio-compat.el (autoload 'eieio--defalias "eieio-compat" "\ diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 6cd6813..f7dbdf5 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -60,7 +60,7 @@ Argument PREFIX is the character prefix to use. Argument CH-PREFIX is another character prefix to display." (cl-check-type this-root class) (let ((myname (symbol-name this-root)) - (chl (eieio--class-children (eieio--class-v this-root))) + (chl (eieio--class-children (cl--find-class this-root))) (fprefix (concat ch-prefix " +--")) (mprefix (concat ch-prefix " | ")) (lprefix (concat ch-prefix " "))) @@ -84,7 +84,7 @@ If CLASS is actually an object, then also display current values of that object. ;; Header line (prin1 class) (insert " is a" - (if (eieio--class-option (eieio--class-v class) :abstract) + (if (eieio--class-option (cl--find-class class) :abstract) "n abstract" "") " class") @@ -162,7 +162,7 @@ If CLASS is actually an object, then also display current values of that object. (defun eieio-help-class-slots (class) "Print help description for the slots in CLASS. Outputs to the current buffer." - (let* ((cv (eieio--class-v class)) + (let* ((cv (cl--find-class class)) (slots (eieio--class-slots cv)) (cslots (eieio--class-class-slots cv))) (insert (propertize "Instance Allocated Slots:\n\n" @@ -181,7 +181,7 @@ If INSTANTIABLE-ONLY is non nil, only allow names of classes which are not abstract, otherwise allow all classes. Optional argument BUILDLIST is more list to attach and is used internally." (let* ((cc (or class 'eieio-default-superclass)) - (sublst (eieio--class-children (eieio--class-v cc)))) + (sublst (eieio--class-children (cl--find-class cc)))) (unless (assoc (symbol-name cc) buildlist) (when (or (not instantiable-only) (not (class-abstract-p cc))) ;; FIXME: Completion tables don't need alists, and ede/generic.el needs @@ -452,7 +452,7 @@ current expansion depth." (defun eieio-class-button (class depth) "Draw a speedbar button at the current point for CLASS at DEPTH." (cl-check-type class class) - (let ((subclasses (eieio--class-children (eieio--class-v class)))) + (let ((subclasses (eieio--class-children (cl--find-class class)))) (if subclasses (speedbar-make-tag-line 'angle ?+ 'eieio-sb-expand @@ -477,7 +477,7 @@ Argument INDENT is the depth of indentation." (speedbar-with-writable (save-excursion (end-of-line) (forward-char 1) - (let ((subclasses (eieio--class-children (eieio--class-v class)))) + (let ((subclasses (eieio--class-children (cl--find-class class)))) (while subclasses (eieio-class-button (car subclasses) (1+ indent)) (setq subclasses (cdr subclasses))))))) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 662bc0a..eee848f 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -435,7 +435,7 @@ The CLOS function `class-direct-superclasses' is aliased to this function." "Return child classes to CLASS. The CLOS function `class-direct-subclasses' is aliased to this function." (cl-check-type class class) - (eieio--class-children (eieio--class-v class))) + (eieio--class-children (cl--find-class class))) (define-obsolete-function-alias 'class-children #'eieio-class-children "24.4") @@ -566,7 +566,7 @@ OBJECT can be an instance or a class." "Return the class that SYMBOL represents. If there is no class, nil is returned if ERRORP is nil. If ERRORP is non-nil, `wrong-argument-type' is signaled." - (let ((class (eieio--class-v symbol))) + (let ((class (cl--find-class symbol))) (cond ((eieio--class-p class) class) (errorp (signal 'wrong-type-argument (list 'class-p symbol)))))) @@ -672,7 +672,7 @@ Its slots are automatically adopted by classes with no specified parents. This class is not stored in the `parent' slot of a class vector." :abstract t) -(setq eieio-default-superclass (eieio--class-v 'eieio-default-superclass)) +(setq eieio-default-superclass (cl--find-class 'eieio-default-superclass)) (defalias 'standard-class 'eieio-default-superclass) @@ -862,7 +862,7 @@ this object." (princ comment) (princ "\n")) (let* ((cl (eieio-object-class this)) - (cv (eieio--class-v cl))) + (cv (cl--find-class cl))) ;; Now output readable lisp to recreate this object ;; It should look like this: ;; ( ... ) @@ -978,7 +978,7 @@ Optional argument GROUP is the sub-group of slots to display. ;;;*** -;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "899e10c7883c4aac5cefcc223794e8f9") +;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "b7995d9076e4dd4b9358b2aa66835619") ;;; Generated autoloads from eieio-opt.el (autoload 'eieio-browse "eieio-opt" "\ commit 8bab1490f14207eeeee4b2f4ad30b5d695db8245 Author: Stefan Monnier Date: Thu Jul 2 10:49:09 2015 -0400 * lisp/term/xterm.el (xterm--query): Fix paren typo (bug#20951). diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 350ab3c..300e494 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -733,14 +733,14 @@ We run the first FUNCTION whose STRING matches the input events." nil) (or (eq evt (aref (car handler) i)) (progn (if evt (push evt unread-command-events)) - nil)))) - (setq i (1+ i))) - (if (= i (length (car handler))) - (progn (setq handlers nil) - (funcall (cdr handler))) - (while (> i 0) - (push (aref (car handler) (setq i (1- i))) - unread-command-events))))))))) + nil))))) + (setq i (1+ i))) + (if (= i (length (car handler))) + (progn (setq handlers nil) + (funcall (cdr handler))) + (while (> i 0) + (push (aref (car handler) (setq i (1- i))) + unread-command-events)))))))) (defun xterm--push-map (map basemap) ;; Use inheritance to let the main keymaps override those defaults. commit e9e962976830855c586b65743abda7859cf5a6fb Author: Martin Rudalics Date: Thu Jul 2 14:58:31 2015 +0200 Some further fixes in Change Window node. (Bug#20183) * doc/emacs/windows.texi (Change Window): Replace "rearranging" by "resizing" in section title. Add some concept indices. Suggested by N. Jackson (Bug#20183). diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 27377f6..6d2eb1f 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -238,8 +238,10 @@ window (@code{find-file-read-only-other-window}). @xref{Visiting}. @end table @node Change Window -@section Deleting and Rearranging Windows +@section Deleting and Resizing Windows +@cindex delete window +@cindex deleting windows @table @kbd @item C-x 0 Delete the selected window (@code{delete-window}). @@ -285,6 +287,8 @@ selected window. whole frame. (This command cannot be used while the minibuffer window is active; attempting to do so signals an error.) +@cindex resize window +@cindex resizing windows @kindex C-x ^ @findex enlarge-window @kindex C-x @} @@ -310,6 +314,10 @@ signal an error if you attempt to reduce the width of any window below a certain minimum number of columns, specified by the variable @code{window-min-width} (the default is 10). + Mouse clicks on the mode line (@pxref{Mode Line Mouse}) or on window +dividers (@pxref{Window Dividers}) provide another way to change window +heights and to split or delete windows. + @kindex C-x - @findex shrink-window-if-larger-than-buffer @kbd{C-x -} (@code{shrink-window-if-larger-than-buffer}) reduces the @@ -322,10 +330,6 @@ lines to other windows in the frame. You can also use @kbd{C-x +} (@code{balance-windows}) to even out the heights of all the windows in the selected frame. - Mouse clicks on the mode line (@pxref{Mode Line Mouse}) or on window -dividers (@pxref{Window Dividers}) provide another way to change window -heights and to split or delete windows. - @node Displaying Buffers @section Displaying a Buffer in a Window commit 3323c56309da5df24266b916e07bfe424d09e3ff Author: Martin Rudalics Date: Thu Jul 2 14:39:17 2015 +0200 Reference window dividers in Change Window section. * doc/emacs/windows.texi (Change Window): Reference window dividers. diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 98bc532..27377f6 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -322,8 +322,9 @@ lines to other windows in the frame. You can also use @kbd{C-x +} (@code{balance-windows}) to even out the heights of all the windows in the selected frame. - Mouse clicks on the mode line provide another way to change window -heights and to delete windows. @xref{Mode Line Mouse}. + Mouse clicks on the mode line (@pxref{Mode Line Mouse}) or on window +dividers (@pxref{Window Dividers}) provide another way to change window +heights and to split or delete windows. @node Displaying Buffers @section Displaying a Buffer in a Window commit 29f8228b5b549bcc3638617c24c79634ad6959c4 Author: Martin Rudalics Date: Thu Jul 2 11:19:25 2015 +0200 Document new `window-divider-mode'. * lisp/frame.el (window-divider-mode): Fix doc-string. * doc/emacs/frames.texi (Window Dividers): New section. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index ad860fd..8d24fc5 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -54,6 +54,7 @@ for doing so on MS-DOS). Menus are supported on all text terminals. * Multiple Displays:: How one Emacs instance can talk to several displays. * Frame Parameters:: Changing the colors and other modes of frames. * Scroll Bars:: How to enable and disable scroll bars; how to use them. +* Window Dividers:: Window separators that can be dragged with the mouse. * Drag and Drop:: Using drag and drop to open files and insert text. * Menu Bars:: Enabling and disabling the menu bar. * Tool Bars:: Enabling and disabling the tool bar. @@ -1001,6 +1002,32 @@ or disable horizontal scroll bars (@pxref{Resources}). To control the scroll bar height, change the @code{scroll-bar-height} frame parameter (@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}). +@node Window Dividers +@section Window Dividers +@cindex Window Divider mode +@cindex mode, Window Divider + + On graphical displays, you can use @dfn{window dividers} in order to +separate windows visually. Window dividers are bars that can be dragged +with the mouse, thus allowing to easily resize adjacent windows. + +@vindex window-divider-mode + To control the display of window dividers, customize the variable +@code{window-divider-mode}. Its value should be either +@code{bottom-only} (to show dividers only on the bottom of windows), +@code{right-only} (to show dividers only on the right of windows), +@code{t} (to show them on the bottom and on the right) or @code{nil} (to +disable window dividers). + +@vindex window-divider-default-bottom-width +@vindex window-divider-default-right-width + To adjust the width of window dividers displayed by this mode +customize the options @code{window-divider-default-bottom-width} and +@code{window-divider-default-right-width}. + + For more details about window dividers see @ref{Window Dividers,, +Window Dividers, elisp, The Emacs Lisp Reference Manual}. + @node Drag and Drop @section Drag and Drop @cindex drag and drop diff --git a/etc/NEWS b/etc/NEWS index 38a872d..7717fd0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1090,6 +1090,11 @@ windows without "fixing" it. It's supported by `fit-window-to-buffer', `temp-buffer-resize-mode' and `display-buffer'. +++ +** New minor mode `window-divider-mode' and options +`window-divider-default-bottom-width' and +`window-divider-default-right-width'. + ++++ ** New option `switch-to-buffer-in-dedicated-window' allows to customize how `switch-to-buffer' proceeds interactively when the selected window is strongly dedicated to its buffer. diff --git a/lisp/frame.el b/lisp/frame.el index ffa01b4..cd6823a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1784,8 +1784,9 @@ With a prefix argument ARG, enable Window Divider mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. -The option `window-divider-default-width' allows to customize the -width of dividers displayed by this mode." +The options `window-divider-default-bottom-width' and +`window-divider-default-right-width' allow to customize the width +of dividers displayed by this mode." :group 'window-divider :global t :variable (window-divider-mode