* lisp/gnus/gnus.el (gnus-extent-detached-p): Remove.
(gnus-extent-start-open, gnus-character-to-event)
(gnus-assq-delete-all, gnus-add-text-properties)
(gnus-put-text-property, gnus-key-press-event-p):
(let* ((gnus-tmp-name (format "%s" (car category)))
(gnus-tmp-groups (length (gnus-agent-cat-groups category))))
(beginning-of-line)
- (gnus-add-text-properties
+ (add-text-properties
(point)
(prog1 (1+ (point))
;; Insert the text.
(- gnus-article-normalized-header-length column)
? )))
((> column gnus-article-normalized-header-length)
- (gnus-put-text-property
+ (put-text-property
(progn
(forward-char gnus-article-normalized-header-length)
(point))
(goto-char (point-max))
(let ((start (point)))
(insert "X-Boundary: ")
- (gnus-add-text-properties start (point) gnus-hidden-properties)
+ (add-text-properties start (point) gnus-hidden-properties)
(insert (let (str (max (window-width)))
(while (>= max (length str))
(setq str (concat str gnus-body-boundary-delimiter)))
(substring str 0 max))
"\n")
- (gnus-put-text-property start (point) 'gnus-decoration 'header)))))
+ (put-text-property start (point) 'gnus-decoration 'header)))))
(defun article-fill-long-lines ()
"Fill lines that are wider than the window width."
(defun gnus-article-insert-newline ()
"Insert a newline, but mark it as undeletable."
- (gnus-put-text-property
- (point) (progn (insert "\n") (point)) 'gnus-undeletable t))
+ (put-text-property (point) (progn (insert "\n") (point)) 'gnus-undeletable t))
(defun gnus-mime-display-alternative (handles &optional preferred ibegend id)
(let* ((preferred (or preferred (mm-preferred-alternative handles)))
(not preferred)
(not (gnus-unbuttonized-mime-type-p
"multipart/alternative")))
- (gnus-add-text-properties
+ (add-text-properties
(setq from (point))
(progn
(insert (format "%d. " id))
:action 'gnus-widget-press-button)
;; Do the handles
(while (setq handle (pop handles))
- (gnus-add-text-properties
+ (add-text-properties
(setq from (point))
(progn
(insert (format "(%c) %-18s"
(interactive)
(when (gnus-article-next-page)
(goto-char (point-min))
- (gnus-article-read-summary-keys nil (gnus-character-to-event ?n))))
+ (gnus-article-read-summary-keys nil ?n)))
(defun gnus-article-goto-prev-page ()
"Show the previous page of the article."
(interactive)
(if (save-restriction (widen) (bobp)) ;; Real beginning-of-buffer?
- (gnus-article-read-summary-keys nil (gnus-character-to-event ?p))
+ (gnus-article-read-summary-keys nil ?p)
(gnus-article-prev-page nil)))
;; This is cleaner but currently breaks `gnus-pick-mode':
(defun gnus-article-read-summary-send-keys ()
(interactive)
- (let ((unread-command-events (list (gnus-character-to-event ?S))))
+ (let ((unread-command-events (list ?S)))
(gnus-article-read-summary-keys)))
(defun gnus-article-describe-key (key)
(when (and header-face
(not (memq (point) hpoints)))
(push (point) hpoints)
- (gnus-put-text-property from (point) 'face header-face))
+ (put-text-property from (point) 'face header-face))
(when (and field-face
(not (memq (setq from (point)) fpoints)))
(push from fpoints)
(if (re-search-forward "^[^ \t]" nil t)
(forward-char -2)
(goto-char (point-max)))
- (gnus-put-text-property from (point) 'face field-face)))))))
+ (put-text-property from (point) 'face field-face)))))))
(defun gnus-article-highlight-signature ()
"Highlight the signature in an article.
(gnus-article-extend-url-button from start end))
(gnus-article-add-button start end
'gnus-button-push (list from entry))
- (gnus-put-text-property
+ (put-text-property
start end
'gnus-string (buffer-substring-no-properties
start end))))))))))
(when gnus-article-button-face
(overlay-put (make-overlay from to nil t)
'face gnus-article-button-face))
- (gnus-add-text-properties
+ (add-text-properties
from to
(nconc (and gnus-article-mouse-face
(list 'mouse-face gnus-article-mouse-face))
(insert-buffer-substring buffer)
;; Tag the beginning of the article with the ident.
(if (> (point-max) b)
- (gnus-put-text-property b (1+ b) 'gnus-backlog ident)
+ (put-text-property b (1+ b) 'gnus-backlog ident)
(gnus-error 3 "Article %d is blank" number))))))))
(defun gnus-backlog-remove-oldest-article ()
((assq number gnus-cite-attribution-alist))
(t
(gnus-add-wash-type 'cite)
- (gnus-add-text-properties
+ (add-text-properties
(point) (progn (forward-line 1) (point))
(nconc (list 'article-type 'cite)
gnus-hidden-properties))))
(or (not regexp)
(and (stringp regexp) (string-match regexp group))
(and (functionp regexp) (funcall regexp group))))
- (gnus-add-text-properties
+ (add-text-properties
(point) (prog1 (1+ (point))
(insert " " mark " *: "
(gnus-group-decoded-name group)
gnus-tmp-header) ; passed as parameter to user-funcs.
(beginning-of-line)
(setq beg (point))
- (gnus-add-text-properties
+ (add-text-properties
(point)
(prog1 (1+ (point))
;; Insert the text.
(progn
(unless (bound-and-true-p cursor-sensor-mode)
(cursor-sensor-mode 1))
- (gnus-put-text-property beg end 'cursor-sensor-functions
+ (put-text-property beg end 'cursor-sensor-functions
'(gnus-tool-bar-update)))
- (gnus-put-text-property beg end 'point-entered
+ (put-text-property beg end 'point-entered
#'gnus-tool-bar-update)
- (gnus-put-text-property beg end 'point-left
+ (put-text-property beg end 'point-left
#'gnus-tool-bar-update))))
(defun gnus-group-update-eval-form (group list)
(let ((face (cdar (gnus-group-update-eval-form
group
gnus-group-highlight))))
- (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
+ (unless (eq face (gnus-get-text-property-excluding-characters-with-faces
+ beg 'face))
(let ((inhibit-read-only t))
(gnus-put-text-property-excluding-characters-with-faces
beg end 'face
- (if (boundp face) (symbol-value face) face)))
- (gnus-extent-start-open beg))))
+ (if (boundp face) (symbol-value face) face))))))
(defun gnus-group-get-icon (group)
"Return an icon for GROUP according to `gnus-group-icon-list'."
(erase-buffer)
(while groups
(setq group (pop groups))
- (gnus-add-text-properties
+ (add-text-properties
(point) (prog1 (1+ (point))
(insert " *: "
(gnus-group-decoded-name group)
(symbol-name group) charset)
(gnus-group-name-decode
(symbol-value group) charset))))
- (gnus-add-text-properties
+ (add-text-properties
b (1+ b) (list 'gnus-group group
'gnus-unread t 'gnus-marked nil
'gnus-level (1+ gnus-level-subscribed))))
alt-text (when (string-match "\\(alt\\|title\\)=\"\\([^\"]+\\)"
parameters)
(xml-substitute-special (match-string 2 parameters))))
- (gnus-add-text-properties
+ (add-text-properties
start end
(list 'image-url url
'image-displayer `(lambda (url start end)
(let ((overlay (make-overlay start end)))
(overlay-put overlay 'evaporate t)
(overlay-put overlay 'gnus-button-url url)
- (gnus-put-text-property start end 'gnus-string url)
+ (put-text-property start end 'gnus-string url)
(when gnus-article-mouse-face
(overlay-put overlay 'mouse-face gnus-article-mouse-face)))))
;; The upper-case IMG_ALT is apparently just an artifact that
:help-echo alt-text
:keymap gnus-html-displayed-image-map
url)
- (gnus-put-text-property start (point)
- 'gnus-alt-text alt-text)
+ (put-text-property start (point) 'gnus-alt-text alt-text)
(when url
- (gnus-add-text-properties
+ (add-text-properties
start (point)
`(image-url
,url
;; FIXME: the gnus-mime-button-map keymap does not make sense for this kind
;; of button.
(let ((start (point)))
- (gnus-add-text-properties
+ (add-text-properties
start
(progn
(insert "[ " text " ]")
(message-goto-subject)
(re-search-forward " *$")
(replace-match " (crosspost notification)" t t)
- (gnus-deactivate-mark)
+ (deactivate-mark)
(when (gnus-y-or-n-p "Send this complaint? ")
(message-send-and-exit))))))
(start-point (posn-point start-posn))
(start-line (1+ (count-lines (point-min) start-point)))
(start-window (posn-window start-posn))
- (bounds (gnus-window-edges start-window))
+ (bounds (window-edges start-window))
(top (nth 1 bounds))
(bottom (if (window-minibuffer-p start-window)
(nth 3 bounds)
(t (cdar gnus-tree-brackets))))
(buffer-read-only nil)
beg end)
- (gnus-add-text-properties
+ (add-text-properties
(setq beg (point))
(setq end (progn (eval gnus-tree-line-format-spec) (point)))
(list 'gnus-number gnus-tmp-number))
region)
(set-buffer gnus-tree-buffer)
(when (setq region (gnus-tree-article-region article))
- (when (or (not gnus-selected-tree-overlay)
- (gnus-extent-detached-p gnus-selected-tree-overlay))
+ (when (not gnus-selected-tree-overlay)
;; Create a new overlay.
(overlay-put
(setq gnus-selected-tree-overlay
(with-current-buffer (gnus-get-tree-buffer)
(let (region)
(when (setq region (gnus-tree-article-region article))
- (gnus-put-text-property (car region) (cdr region) 'face face)
+ (put-text-property (car region) (cdr region) 'face face)
(set-window-point
(gnus-get-buffer-window (current-buffer) t) (cdr region)))))))
:type 'face)
(defun gnus-mouse-face-function (form type)
- `(gnus-put-text-property
+ `(put-text-property
(point) (progn ,@form (point))
'mouse-face
,(if (equal type 0)
:type 'face)
(defun gnus-face-face-function (form type)
- `(gnus-add-text-properties
+ `(add-text-properties
(point) (progn ,@form (point))
(cons 'face
(cons
;; Delay consing the value of the `face' property until
- ;; `gnus-add-text-properties' runs, since it will be modified
- ;; by `gnus-put-text-property-excluding-characters-with-faces'.
+ ;; `add-text-properties' runs, since it will be modified
+ ;; by `put-text-property-excluding-characters-with-faces'.
(list ',(symbol-value (intern (format "gnus-face-%d" type))) 'default)
;; Redundant now, but still convenient.
'(gnus-face t)))))
(defun gnus-balloon-face-function (form type)
- `(gnus-put-text-property
+ `(put-text-property
(point) (progn ,@form (point)) 'help-echo
,(intern (format "gnus-balloon-face-%d" type))))
`(let (gnus-position)
,@(gnus-complex-form-to-spec form spec-alist)
(if gnus-position
- (gnus-put-text-property gnus-position (1+ gnus-position)
+ (put-text-property gnus-position (1+ gnus-position)
'gnus-position t)))
`(progn
,@(gnus-complex-form-to-spec form spec-alist)))))))
If PROPS, insert the result."
(let ((form (gnus-parse-format format alist props)))
(if props
- (gnus-add-text-properties (point) (progn (eval form) (point)) props)
+ (add-text-properties (point) (progn (eval form) (point)) props)
(eval form))))
(defun gnus-set-format (type &optional insertable)
" (cloud)"
"")))
(beginning-of-line)
- (gnus-add-text-properties
+ (add-text-properties
(point)
(prog1 (1+ (point))
;; Insert the text.
(prefix (let ((gnus-select-method orig-select-method))
(gnus-group-prefixed-name "" method))))
(while (setq group (pop groups))
- (gnus-add-text-properties
+ (add-text-properties
(point)
(prog1 (1+ (point))
(insert
(defun gnus-summary-insert-dummy-line (gnus-tmp-subject gnus-tmp-number)
"Insert a dummy root in the summary buffer."
(beginning-of-line)
- (gnus-add-text-properties
+ (add-text-properties
(point) (progn (eval gnus-summary-dummy-line-format-spec) (point))
(list 'gnus-number gnus-tmp-number 'gnus-intangible gnus-tmp-number)))
(setq gnus-tmp-lines "?")
(setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
(condition-case ()
- (gnus-put-text-property
+ (put-text-property
(point)
(progn (eval gnus-summary-line-format-spec) (point))
'gnus-number gnus-tmp-number)
(if (= gnus-tmp-lines -1)
(setq gnus-tmp-lines "?")
(setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
- (gnus-put-text-property
+ (put-text-property
(point)
(progn (eval gnus-summary-line-format-spec) (point))
'gnus-number number)
"exiting"))
(gnus-summary-next-group nil group backward)))
(t
- (when (gnus-key-press-event-p last-input-event)
+ (when (numberp last-input-event)
;; Somehow or other, we may now have selected a different
;; window. Make point go back to the summary buffer.
(when (eq current-summary (current-buffer))
": " (or (cdr (assq 'execute (car pslist))) "") "\n")
(setq e (point))
(forward-line -1) ; back to `b'
- (gnus-add-text-properties
+ (add-text-properties
b (1- e) (list 'gnus-number gnus-reffed-article-number
'mouse-face gnus-mouse-face))
(gnus-data-enter
(not (zerop unread)) ;Non-empty
tick ;Ticked articles
(/= point-max (point-max)))) ;Inactive groups
- (gnus-extent-start-open (point))
(gnus-topic-insert-topic-line
(car type) visiblep
(not (eq (nth 2 type) 'hidden))
(beginning-of-line)
;; Insert the text.
(if shownp
- (gnus-add-text-properties
+ (add-text-properties
(point)
(prog1 (1+ (point))
(eval gnus-topic-line-format-spec))
(setq string (replace-match "" t t string)))
string)
-(declare-function gnus-put-text-property "gnus"
- (start end property value &optional object))
-
(defsubst gnus-put-text-property-excluding-newlines (beg end prop val)
"The same as `put-text-property', but don't put this prop on any newlines in the region."
(save-match-data
(save-restriction
(goto-char beg)
(while (re-search-forward gnus-emphasize-whitespace-regexp end 'move)
- (gnus-put-text-property beg (match-beginning 0) prop val)
+ (put-text-property beg (match-beginning 0) prop val)
(setq beg (point)))
- (gnus-put-text-property beg (point) prop val)))))
+ (put-text-property beg (point) prop val)))))
(defsubst gnus-put-overlay-excluding-newlines (beg end prop val)
"The same as `put-text-property', but don't put this prop on any newlines in the region."
(when (eq prop 'face)
(setcar (cdr (get-text-property beg 'face)) (or val 'default)))
(inline
- (gnus-put-text-property beg stop prop val)))
+ (put-text-property beg stop prop val)))
(setq beg stop))))
(defun gnus-get-text-property-excluding-characters-with-faces (pos prop)
(put 'gnus-with-output-to-file 'lisp-indent-function 1)
(put 'gnus-with-output-to-file 'edebug-form-spec '(form body))
-(declare-function gnus-add-text-properties "gnus"
- (start end properties &optional object))
-
(defun gnus-add-text-properties-when
(property value start end properties &optional object)
- "Like `gnus-add-text-properties', only applied on where PROPERTY is VALUE."
+ "Like `add-text-properties', only applied on where PROPERTY is VALUE."
(let (point)
(while (and start
(< start end) ;; XEmacs will loop for every when start=end.
(setq point (text-property-not-all start end property value)))
- (gnus-add-text-properties start point properties object)
+ (add-text-properties start point properties object)
(setq start (text-property-any point end property value)))
(if start
- (gnus-add-text-properties start end properties object))))
+ (add-text-properties start end properties object))))
(defun gnus-remove-text-properties-when
(property value start end properties &optional object)
:group 'gnus-start
:type 'boolean)
-(unless (featurep 'gnus-xmas)
- (defalias 'gnus-extent-detached-p 'ignore)
- (defalias 'gnus-extent-start-open 'ignore)
- (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
- (defalias 'gnus-character-to-event 'identity)
- (defalias 'gnus-assq-delete-all 'assq-delete-all)
- (defalias 'gnus-add-text-properties 'add-text-properties)
- (defalias 'gnus-put-text-property 'put-text-property)
- (defvar gnus-mode-line-image-cache t)
+(defvar gnus-mode-line-image-cache t)
+
+(eval-and-compile
(if (fboundp 'find-image)
(defun gnus-mode-line-buffer-identification (line)
(let ((str (car-safe line))
str)
(list str))
line)))
- (defalias 'gnus-mode-line-buffer-identification 'identity))
- (defalias 'gnus-deactivate-mark 'deactivate-mark)
- (defalias 'gnus-window-edges 'window-edges)
- (defalias 'gnus-key-press-event-p 'numberp)
- ;;(defalias 'gnus-decode-rfc1522 'ignore)
- )
+ (defalias 'gnus-mode-line-buffer-identification 'identity)))
;; We define these group faces here to avoid the display
;; update forced when creating new faces.