summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el9
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/menu-bar.el9
-rw-r--r--lisp/mouse.el2
-rw-r--r--lisp/net/browse-url.el2
-rw-r--r--lisp/net/eww.el8
-rw-r--r--lisp/progmodes/bug-reference.el3
-rw-r--r--lisp/repeat.el4
-rw-r--r--lisp/simple.el12
-rw-r--r--lisp/tab-bar.el9
10 files changed, 38 insertions, 22 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 57fc750515f..5dfb1fae356 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1078,10 +1078,11 @@ is the buffer position of the start of the containing expression."
;; Handle prefix characters and whitespace
;; following an open paren. (Bug#1012)
(backward-prefix-chars)
- (while (not (or (looking-back "^[ \t]*\\|([ \t]+"
- (line-beginning-position))
- (and containing-sexp
- (>= (1+ containing-sexp) (point)))))
+ (while (not (save-excursion
+ (skip-chars-backward " \t")
+ (or (= (point) (line-beginning-position))
+ (and containing-sexp
+ (= (point) (1+ containing-sexp))))))
(forward-sexp -1)
(backward-prefix-chars))
(setq calculate-lisp-indent-last-sexp (point)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index e165a0429fd..935ea9bba68 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2395,6 +2395,8 @@ If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")."
(save-excursion
;; add to the end of the region first, otherwise end would be invalid
(goto-char end)
+ (unless (bolp)
+ (insert "\n"))
(insert (if verbatim "#v-\n" message-mark-insert-end))
(goto-char beg)
(insert (if verbatim "#v+\n" message-mark-insert-begin))))
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 980ba2fcd19..fafc99eb95e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2713,10 +2713,13 @@ This command is to be used when you click the mouse in the menubar."
(cdr menu-bar-item-cons)
0))))
-(defun menu-bar-keymap ()
+(defun menu-bar-keymap (&optional keymap)
"Return the current menu-bar keymap.
+The ordering of the return value respects `menu-bar-final-items'.
-The ordering of the return value respects `menu-bar-final-items'."
+It's possible to use the KEYMAP argument to override the default keymap
+that is the currently active maps. For example, the argument KEYMAP
+could provide `global-map' where items are limited to the global map only."
(let ((menu-bar '())
(menu-end '()))
(map-keymap
@@ -2729,7 +2732,7 @@ The ordering of the return value respects `menu-bar-final-items'."
;; sorting.
(push (cons pos menu-item) menu-end)
(push menu-item menu-bar))))
- (lookup-key (menu-bar-current-active-maps) [menu-bar]))
+ (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
`(keymap ,@(nreverse menu-bar)
,@(mapcar #'cdr (sort menu-end
(lambda (a b)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 1036f106cd6..d6912892eff 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -364,7 +364,7 @@ Some context functions add menu items below the separator."
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
- (lookup-key global-map [menu-bar]))
+ (menu-bar-keymap global-map))
menu)
(defun context-menu-local (menu _click)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index b21c66ef14b..3af37e412d9 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1600,7 +1600,7 @@ used instead of `browse-url-new-window-flag'."
;; --- mailto ---
-(autoload 'rfc6068-parse-mailto-url "rfc2368")
+(autoload 'rfc6068-parse-mailto-url "rfc6068")
;;;###autoload
(defun browse-url-mail (url &optional new-window)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 178a25e4be2..c24a2c52bee 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -145,12 +145,12 @@ The string will be passed through `substitute-command-keys'."
"Command to retrieve an URL via an external program.
If nil, `url-retrieve' is used to download the data.
If `sync', `url-retrieve-synchronously' is used.
-For other non-nil values, this should be a list where the first item
-is the program, and the rest are the arguments."
+For other non-nil values, this should be a list of strings where
+the first item is the program, and the rest are the arguments."
:version "28.1"
:type '(choice (const :tag "Use `url-retrieve'" nil)
(const :tag "Use `url-retrieve-synchronously'" sync)
- (repeat string)))
+ (repeat :tag "Command/args" string )))
(defcustom eww-use-external-browser-for-content-type
"\\`\\(video/\\|audio/\\|application/ogg\\)"
@@ -1947,7 +1947,7 @@ Use link at point if there is one, else the current page's URL."
(defun eww-set-character-encoding (charset)
"Set character encoding to CHARSET.
If CHARSET is nil then use UTF-8."
- (interactive "zUse character set (default utf-8): " eww-mode)
+ (interactive "zUse character set (default `utf-8'): " eww-mode)
(if (null charset)
(eww-reload nil 'utf-8)
(eww-reload nil charset)))
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 63850571c53..150dfac0d2d 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -270,7 +270,8 @@ via the internet it might also be http.")
;; possibly different projects are also supported.
(cl-defmethod bug-reference--build-forge-setup-entry
(host-domain (_forge-type (eql 'github)) protocol)
- `(,(concat "[/@]" host-domain "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
+ `(,(concat "[/@]" (regexp-quote host-domain)
+ "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
"\\(\\([.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>"
,(lambda (groups)
(let ((ns-project (nth 1 groups)))
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 42590b7e6d9..ac08952eaa8 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -355,7 +355,7 @@ of the specified number of seconds."
"Timer activated after the last key typed in the repeating key sequence.")
(defcustom repeat-keep-prefix t
- "Keep the prefix arg of the previous command."
+ "Whether to keep the prefix arg of the previous command when repeating."
:type 'boolean
:group 'convenience
:version "28.1")
@@ -387,7 +387,7 @@ the map can't be set on the command symbol property `repeat-map'.")
"Toggle Repeat mode.
When Repeat mode is enabled, and the command symbol has the property named
`repeat-map', this map is activated temporarily for the next command.
-See `describe-repeat-maps' for a list of all repeatable command."
+See `describe-repeat-maps' for a list of all repeatable commands."
:global t :group 'convenience
(if (not repeat-mode)
(remove-hook 'post-command-hook 'repeat-post-hook)
diff --git a/lisp/simple.el b/lisp/simple.el
index 4f711d60ea2..9b622847e5b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5293,12 +5293,16 @@ Lisp programs should use this function for killing text.
Supply two arguments, character positions BEG and END indicating the
stretch of text to be killed. If the optional argument REGION is
non-nil, the function ignores BEG and END, and kills the current
- region instead."
+ region instead. Interactively, REGION is always non-nil, and so
+ this command always kills the current region."
;; Pass mark first, then point, because the order matters when
;; calling `kill-append'.
- (interactive (list (mark) (point) 'region))
- (unless (and beg end)
- (user-error "The mark is not set now, so there is no region"))
+ (interactive (progn
+ (let ((beg (mark))
+ (end (point)))
+ (unless (and beg end)
+ (user-error "The mark is not set now, so there is no region"))
+ (list beg end 'region))))
(condition-case nil
(let ((string (if region
(funcall region-extract-function 'delete)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index a3316bf4496..10ff57bfd0a 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -706,8 +706,13 @@ the formatted tab name to display in the tab bar."
Every item in the list is a function that returns
a string, or a list of menu-item elements, or nil.
Adding a function to the list causes the tab bar to show
-that string, or display a menu with those menu items when
-you click on the tab bar.
+that string, or display a tab button which, when clicked,
+will invoke the command that is the binding of the menu item.
+The menu-item binding of nil will produce a tab clicking
+on which will select that tab. The menu-item's title is
+displayed as the label of the tab.
+If a function returns nil, it doesn't directly affect the
+tab bar appearance, but can do that by some side-effect.
If the list ends with `tab-bar-format-align-right' and
`tab-bar-format-global', then after enabling `display-time-mode'
(or any other mode that uses `global-mode-string'),