(setq truncate-lines nil))
((numberp arg)
(setq truncate-lines t)))
- ;; In versions of Emacs 22 (CVS) before 2006-05-26,
- ;; `toggle-truncate-lines' needs an argument.
(toggle-truncate-lines)))
(defun gnus-article-treat-body-boundary ()
(make-local-variable 'gnus-article-ignored-charsets)
(set (make-local-variable 'bookmark-make-record-function)
'gnus-summary-bookmark-make-record)
- ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
- ;; face.
+ ;; Prevent Emacs from displaying non-break space with
+ ;; `nobreak-space' face.
(set (make-local-variable 'nobreak-char-display) nil)
;; Enable `gnus-article-remove-images' to delete images shr.el renders.
(set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image)
(defun gnus-article-beginning-of-window ()
"Move point to the beginning of the window.
-In Emacs, the point is placed at the line number which `scroll-margin'
+The point is placed at the line number which `scroll-margin'
specifies."
;; There is an obscure bug in Emacs that makes it impossible to
;; scroll past big pictures in the article buffer. Try to fix
(defun gnus-article-describe-key (key)
"Display documentation of the function invoked by KEY.
KEY is a string or a vector."
- (interactive (list (let ((cursor-in-echo-area t)) ;; better for XEmacs.
+ (interactive (list (let ((cursor-in-echo-area t))
(read-key-sequence "Describe key: "))))
(gnus-article-check-buffer)
(if (memq (key-binding key t) '(gnus-article-read-summary-keys
(defun gnus-article-describe-key-briefly (key &optional insert)
"Display documentation of the function invoked by KEY.
KEY is a string or a vector."
- (interactive (list (let ((cursor-in-echo-area t)) ;; better for XEmacs.
+ (interactive (list (let ((cursor-in-echo-area t))
(read-key-sequence "Describe key: "))
current-prefix-arg))
(gnus-article-check-buffer)
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
"nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
"\\(//[-a-z0-9_.]+:[0-9]*\\)?"
- (if (string-match "[[:digit:]]" "1") ;; Support POSIX?
- (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
- (punct "!?:;.,"))
- (concat
- "\\(?:"
- ;; Match paired parentheses, e.g. in Wikipedia URLs:
- ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
- "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
- "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
- "\\|"
- "[" chars punct "]+" "[" chars "]"
- "\\)"))
- (concat ;; XEmacs 21.4 doesn't support POSIX.
- "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
- "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
+ (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
+ (punct "!?:;.,"))
+ (concat
+ "\\(?:"
+ ;; Match paired parentheses, e.g. in Wikipedia URLs:
+ ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
+ "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
+ "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
+ "\\|"
+ "[" chars punct "]+" "[" chars "]"
+ "\\)"))
"\\)")
"Regular expression that matches URLs."
:version "24.4"
(message-options-set-recipient)
(save-restriction
(message-narrow-to-head)
- (let ((mail-parse-charset message-default-charset))
- (mail-encode-encoded-word-buffer)))
+ (mail-encode-encoded-word-buffer))
(message-encode-message-body)))
(let ((gnus-command-method (or gnus-command-method
(gnus-find-method-for-group group)))
(message-options-set-recipient)
(save-restriction
(message-narrow-to-head)
- (let ((mail-parse-charset message-default-charset))
- (mail-encode-encoded-word-buffer)))
+ (mail-encode-encoded-word-buffer))
(message-encode-message-body)))
(let* ((func (car (gnus-group-name-to-method group)))
(result (funcall (intern (format "%s-request-replace-article" func))
(run-hooks 'gnus-gcc-post-body-encode-hook)
(save-restriction
(message-narrow-to-headers)
- (let* ((mail-parse-charset message-default-charset)
- (newsgroups-field (save-restriction
+ (let* ((newsgroups-field (save-restriction
(message-narrow-to-headers-or-head)
(message-fetch-field "Newsgroups")))
(followup-field (save-restriction
(easy-menu-define
gnus-article-commands-menu gnus-article-mode-map ""
(cons "Commands" innards))
- ;; in Emacs, don't share menu.
+ ;; Don't share the menu.
(setq gnus-article-commands-menu
(copy-keymap gnus-summary-article-menu))
(define-key gnus-article-mode-map [menu-bar commands]
(defun gnus-sync-lesync-DELETE (url headers &optional data)
(gnus-sync-lesync-call url "DELETE" headers data))
-;; this is not necessary with newer versions of json.el but 1.2 or older
-;; (which are in Emacs 24.1 and earlier) need it
-(defun gnus-sync-json-alist-p (list)
- "Non-null if and only if LIST is an alist."
- (while (consp list)
- (setq list (if (consp (car list))
- (cdr list)
- 'not-alist)))
- (null list))
-
-;; this is not necessary with newer versions of json.el but 1.2 or older
-;; (which are in Emacs 24.1 and earlier) need it
-(defun gnus-sync-json-plist-p (list)
- "Non-null if and only if LIST is a plist."
- (while (consp list)
- (setq list (if (and (keywordp (car list))
- (consp (cdr list)))
- (cddr list)
- 'not-plist)))
- (null list))
-
; (gnus-sync-lesync-setup "http://lesync.info:5984/tzz" "tzzadmin" "mypassword" "mysalt" t t)
; (gnus-sync-lesync-setup "http://lesync.info:5984/tzz")
(setq tchar nil)
(setq buf (get-buffer-create "*Gnus Help*"))
(pop-to-buffer buf)
- (fundamental-mode) ; for Emacs 20.4+
+ (fundamental-mode)
(buffer-disable-undo)
(erase-buffer)
(insert prompt ":\n\n")
(if on
(progn
(require 'time)
- ;; display-time-mail-function is an Emacs feature.
(setq display-time-mail-function #'mail-source-new-mail-p)
;; Set up the main timer.
(setq mail-source-report-new-mail-timer
(require 'mm-util)
(require 'rfc2047)
-(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
+(autoload 'mailclient-send-it "mailclient")
(defvar gnus-message-group-art)
(defvar gnus-list-identifiers) ; gnus-sum is required where necessary
:link '(custom-manual "(message)Various Message Variables")
:type '(choice directory (const :tag "Don't auto-save" nil)))
-(defcustom message-default-charset
- (and (not (mm-multibyte-p)) 'iso-8859-1)
+(defcustom message-default-charset (and (not (mm-multibyte-p)) 'iso-8859-1)
"Default charset used in non-MULE Emacsen.
If nil, you might be asked to input the charset."
:version "21.1"
:group 'message
:link '(custom-manual "(message)Various Message Variables")
:type 'symbol)
+(make-obsolete-variable
+ 'message-default-charset
+ "The default charset comes from the language environment" "25.2")
(defcustom message-dont-reply-to-names mail-dont-reply-to-names
"Addresses to prune when doing wide replies.
(require 'mml2015)
mml2015-use)
((eq arg 4) 'emacs-mime)
- ;; `booleanp' only available in Emacs 22+
- ((and (not (memq arg '(nil t)))
+ ((and (not (booleanp arg))
(symbolp arg))
arg)
(t
(inhibit-read-only t))
(remove-text-properties begin end message-forbidden-properties))))
-(autoload 'ecomplete-setup "ecomplete") ;; for Emacs <23.
-
(defvar message-smileys '(":-)" ":)"
":-(" ":("
";-)" ";)")
(setq adaptive-fill-first-line-regexp
(concat quote-prefix-regexp "\\|"
adaptive-fill-first-line-regexp)))
- (make-local-variable 'auto-fill-inhibit-regexp)
- ;;(setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:")
- (setq auto-fill-inhibit-regexp nil)
- (make-local-variable 'normal-auto-fill-function)
- (setq normal-auto-fill-function 'message-do-auto-fill)
- ;; KLUDGE: auto fill might already be turned on in `text-mode-hook'.
- ;; In that case, ensure that it uses the right function. The real
- ;; solution would be not to use `define-derived-mode', and run
- ;; `text-mode-hook' ourself at the end of the mode.
- ;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-19.
- ;; This kludge is unneeded in Emacs>=21 since define-derived-mode is
- ;; now careful to run parent hooks after the body. --Stef
- (when auto-fill-function
- (setq auto-fill-function normal-auto-fill-function)))
+ (setq-default auto-fill-inhibit-regexp nil)
+ (setq-default normal-auto-fill-function 'message-do-auto-fill))
\f
"Split current line, moving portion beyond point vertically down.
If the current line has `message-yank-prefix', insert it on the new line."
(interactive "*")
- (condition-case nil
- (split-line message-yank-prefix) ;; Emacs 22.1+ supports arg.
- (error
- (split-line))))
+ (split-line message-yank-prefix))
(defun message-insert-header (header value)
(insert (capitalize (symbol-name header))
(cond ((save-window-excursion
(with-output-to-temp-buffer "*Directory*"
(with-current-buffer standard-output
- (fundamental-mode)) ; for Emacs 20.4+
+ (fundamental-mode))
(buffer-disable-undo standard-output)
(let ((default-directory "/"))
(call-process
(save-window-excursion
(with-output-to-temp-buffer " *MESSAGE information message*"
(with-current-buffer " *MESSAGE information message*"
- (fundamental-mode) ; for Emacs 20.4+
+ (fundamental-mode)
(mapc 'princ text)
(goto-char (point-min))))
(funcall ask question))
(unless charset
(setq coding-system (mm-find-buffer-file-coding-system)))
(setq text (buffer-string))))
- ;; XEmacs @#$@ version of font-lock refuses to fully turn itself
- ;; on for buffers whose name begins with " ". That's why we use
- ;; `with-current-buffer'/`generate-new-buffer' rather than
- ;; `with-temp-buffer'.
- (with-current-buffer (generate-new-buffer "*fontification*")
+ (with-temp-buffer
(buffer-disable-undo)
(mm-enable-multibyte)
(insert (cond ((eq charset 'gnus-decoded)
(setq text (buffer-string))
;; Set buffer unmodified to avoid confirmation when killing the
;; buffer.
- (set-buffer-modified-p nil)
- (kill-buffer (current-buffer)))
+ (set-buffer-modified-p nil))
(mm-insert-inline handle text)))
;; Shouldn't these functions check whether the user even wants to use
(error "No current split history"))
(with-output-to-temp-buffer "*nnmail split history*"
(with-current-buffer standard-output
- (fundamental-mode)) ; for Emacs 20.4+
- (dolist (elem nnmail-split-history)
- (princ (mapconcat (lambda (ga)
- (concat (car ga) ":" (int-to-string (cdr ga))))
- elem
- ", "))
- (princ "\n"))))
+ (fundamental-mode))
+ (dolist (elem nnmail-split-history)
+ (princ (mapconcat (lambda (ga)
+ (concat (car ga) ":" (int-to-string (cdr ga))))
+ elem
+ ", "))
+ (princ "\n"))))
(defun nnmail-purge-split-history (group)
"Remove all instances of GROUP from `nnmail-split-history'."