diff options
| author | Stefan Kangas | 2022-03-18 07:01:18 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-03-18 07:01:18 +0100 |
| commit | ff89d27c07de4ac2efc695b06e8aa1faec5d65d1 (patch) | |
| tree | 78bfa1b09796ffe3d38edbd7793a8574642d49a7 | |
| parent | a96f6de5447f296dbadc90de9a1157062e9ba491 (diff) | |
| parent | 530c3491e89bd316e628f67d5cebb7db6e7d470a (diff) | |
| download | emacs-ff89d27c07de4ac2efc695b06e8aa1faec5d65d1.tar.gz emacs-ff89d27c07de4ac2efc695b06e8aa1faec5d65d1.zip | |
Merge from origin/emacs-28
530c3491e8 Improve documentation of bookmark default sorting
11492259b1 ; * doc/lispref/display.texi (Overlay Arrow): More accurat...
| -rw-r--r-- | doc/lispref/display.texi | 18 | ||||
| -rw-r--r-- | lisp/bookmark.el | 18 |
2 files changed, 21 insertions, 15 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 95e00e140da..3aec06e13dd 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -4642,14 +4642,15 @@ about to be executed. This feature has nothing to do with | |||
| 4642 | @defvar overlay-arrow-string | 4642 | @defvar overlay-arrow-string |
| 4643 | This variable holds the string to display to call attention to a | 4643 | This variable holds the string to display to call attention to a |
| 4644 | particular line, or @code{nil} if the arrow feature is not in use. | 4644 | particular line, or @code{nil} if the arrow feature is not in use. |
| 4645 | On a graphical display the contents of the string are ignored; instead a | 4645 | On a graphical display the contents of the string are ignored if the |
| 4646 | glyph is displayed in the fringe area to the left of the display area. | 4646 | left fringe is shown; instead a glyph is displayed in the fringe area |
| 4647 | to the left of the display area. | ||
| 4647 | @end defvar | 4648 | @end defvar |
| 4648 | 4649 | ||
| 4649 | @defvar overlay-arrow-position | 4650 | @defvar overlay-arrow-position |
| 4650 | This variable holds a marker that indicates where to display the overlay | 4651 | This variable holds a marker that indicates where to display the overlay |
| 4651 | arrow. It should point at the beginning of a line. On a non-graphical | 4652 | arrow. It should point at the beginning of a line. On a non-graphical |
| 4652 | display the arrow text | 4653 | display, or when the left fringe is not shown, the arrow text |
| 4653 | appears at the beginning of that line, overlaying any text that would | 4654 | appears at the beginning of that line, overlaying any text that would |
| 4654 | otherwise appear. Since the arrow is usually short, and the line | 4655 | otherwise appear. Since the arrow is usually short, and the line |
| 4655 | usually begins with indentation, normally nothing significant is | 4656 | usually begins with indentation, normally nothing significant is |
| @@ -4681,11 +4682,12 @@ this list. | |||
| 4681 | 4682 | ||
| 4682 | Each variable on this list can have properties | 4683 | Each variable on this list can have properties |
| 4683 | @code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that | 4684 | @code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that |
| 4684 | specify an overlay arrow string (for text terminals) or fringe bitmap | 4685 | specify an overlay arrow string (for text terminals or graphical |
| 4685 | (for graphical terminals) to display at the corresponding overlay | 4686 | terminals without the left fringe shown) or fringe bitmap |
| 4686 | arrow position. If either property is not set, the default | 4687 | (for graphical terminals with a left fringe) to display at the |
| 4687 | @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator | 4688 | corresponding overlay arrow position. If either property is not set, |
| 4688 | is used. | 4689 | the default @code{overlay-arrow-string} or @code{overlay-arrow} fringe |
| 4690 | indicator is used. | ||
| 4689 | 4691 | ||
| 4690 | 4692 | ||
| 4691 | @node Scroll Bars | 4693 | @node Scroll Bars |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 80fb1cdfc78..e3baa7607d2 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -246,11 +246,13 @@ functions have a binding in this keymap." | |||
| 246 | Bookmark functions update the value automatically. | 246 | Bookmark functions update the value automatically. |
| 247 | You probably do NOT want to change the value yourself. | 247 | You probably do NOT want to change the value yourself. |
| 248 | 248 | ||
| 249 | The value is an alist with bookmarks of the form | 249 | The value is an alist whose elements are of the form |
| 250 | 250 | ||
| 251 | (BOOKMARK-NAME . PARAM-ALIST) | 251 | (BOOKMARK-NAME . PARAM-ALIST) |
| 252 | 252 | ||
| 253 | or the deprecated form (BOOKMARK-NAME PARAM-ALIST). | 253 | or the deprecated form (BOOKMARK-NAME PARAM-ALIST). The alist is |
| 254 | ordered from most recently created bookmark at the front to least | ||
| 255 | recently created bookmark at the end. | ||
| 254 | 256 | ||
| 255 | BOOKMARK-NAME is the name you gave to the bookmark when creating it. | 257 | BOOKMARK-NAME is the name you gave to the bookmark when creating it. |
| 256 | 258 | ||
| @@ -583,10 +585,10 @@ old one." | |||
| 583 | ;; Modify using the new (NAME . ALIST) format. | 585 | ;; Modify using the new (NAME . ALIST) format. |
| 584 | (setcdr bm alist)) | 586 | (setcdr bm alist)) |
| 585 | 587 | ||
| 586 | ;; otherwise just cons it onto the front (either the bookmark | 588 | ;; Otherwise just put it onto the front of the list. Either the |
| 587 | ;; doesn't exist already, or there is no prefix arg. In either | 589 | ;; bookmark doesn't exist already, or there is no prefix arg. |
| 588 | ;; case, we want the new bookmark consed onto the alist...) | 590 | ;; In either case, we want the new bookmark on the front of the |
| 589 | 591 | ;; list, since the list is kept in reverse order of creation. | |
| 590 | (push (cons stripped-name alist) bookmark-alist)) | 592 | (push (cons stripped-name alist) bookmark-alist)) |
| 591 | 593 | ||
| 592 | ;; Added by db | 594 | ;; Added by db |
| @@ -1140,7 +1142,9 @@ it to the name of the bookmark currently being set, advancing | |||
| 1140 | 1142 | ||
| 1141 | (defun bookmark-maybe-sort-alist () | 1143 | (defun bookmark-maybe-sort-alist () |
| 1142 | "Return `bookmark-alist' for display. | 1144 | "Return `bookmark-alist' for display. |
| 1143 | If `bookmark-sort-flag' is non-nil, then return a sorted copy of the alist." | 1145 | If `bookmark-sort-flag' is non-nil, then return a sorted copy of the alist. |
| 1146 | Otherwise, just return `bookmark-alist', which by default is ordered | ||
| 1147 | from most recently created to least recently created bookmark." | ||
| 1144 | (if bookmark-sort-flag | 1148 | (if bookmark-sort-flag |
| 1145 | (sort (copy-alist bookmark-alist) | 1149 | (sort (copy-alist bookmark-alist) |
| 1146 | (lambda (x y) (string-lessp (car x) (car y)))) | 1150 | (lambda (x y) (string-lessp (car x) (car y)))) |