diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/rmc.el | 18 | ||||
-rw-r--r-- | lisp/gnus/message.el | 4 | ||||
-rw-r--r-- | lisp/hexl.el | 14 |
3 files changed, 23 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el index 3dd3508903a..31974782b53 100644 --- a/lisp/emacs-lisp/rmc.el +++ b/lisp/emacs-lisp/rmc.el @@ -30,12 +30,12 @@ "Ask user a multiple choice question. PROMPT should be a string that will be displayed as the prompt. -CHOICES is an alist where the first element in each entry is a -character to be entered, the second element is a short name for -the entry to be displayed while prompting (if there's room, it -might be shortened), and the third, optional entry is a longer -explanation that will be displayed in a help buffer if the user -requests more help. +CHOICES is a list of (KEY NAME [DESCRIPTION]). KEY is a +character to be entered. NAME is a short name for the entry to +be displayed while prompting (if there's room, it might be +shortened). DESCRIPTION is an optional longer explanation that +will be displayed in a help buffer if the user requests more +help. This function translates user input into responses by consulting the bindings in `query-replace-map'; see the documentation of @@ -46,9 +46,9 @@ perform the requested window recentering or scrolling and ask again. When `use-dialog-box' is t (the default), this function can pop -up a dialog window to collect the user input. That functionality -requires `display-popup-menus-p' to return t. Otherwise, a text -dialog will be used. +up a dialog window to collect the user input. That functionality +requires `display-popup-menus-p' to return t. Otherwise, a +text dialog will be used. The return value is the matching entry from the CHOICES list. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 7cc4d61e308..dde9c28656c 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2422,7 +2422,9 @@ Return the number of headers removed." (while (and (not (eobp)) (not last)) (if (if reverse - (not (looking-at regexp)) + (and (not (looking-at regexp)) + ;; Don't remove things not looking like header. + (looking-at "[!-9;-~]+:")) (looking-at regexp)) (progn (cl-incf number) diff --git a/lisp/hexl.el b/lisp/hexl.el index d716405f97a..2c1a7de48a7 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -1104,8 +1104,15 @@ This function is assumed to be used as callback function for `hl-line-mode'." "Return a string ruler for Hexl mode." (let* ((highlight (mod (hexl-current-address) 16)) (s (cdr (assq hexl-bits hexl-rulers))) - (pos 0)) + (pos 0) + (lnum-width + (if display-line-numbers + (round (line-number-display-width 'columns)) + 0))) (set-text-properties 0 (length s) nil s) + (when (> lnum-width 0) + (setq s (concat (make-string lnum-width ? ) s)) + (setq pos (+ pos lnum-width))) ;; Turn spaces in the header into stretch specs so they work ;; regardless of the header-line face. (while (string-match "[ \t]+" s pos) @@ -1116,10 +1123,11 @@ This function is assumed to be used as callback function for `hl-line-mode'." s)) ;; Highlight the current column. (let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) ) + (if (> lnum-width 0) (setq offset (+ offset lnum-width))) (put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s)) ;; Highlight the current ascii column - (put-text-property (+ (hexl-ascii-start-column) highlight 1) - (+ (hexl-ascii-start-column) highlight 2) + (put-text-property (+ (hexl-ascii-start-column) lnum-width highlight 1) + (+ (hexl-ascii-start-column) lnum-width highlight 2) 'face 'highlight s) s)) |