aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2014-12-29 12:39:58 -0800
committerPaul Eggert2014-12-29 12:42:07 -0800
commit973110680c094b7a3bbcebbfbafb9abfc7adc8fd (patch)
treed4a329e7633a0e2e685c9cf2b7476a771de6006c /lisp
parentf9acac751d4cd22480e62cc63936b1208ca9fe48 (diff)
downloademacs-973110680c094b7a3bbcebbfbafb9abfc7adc8fd.tar.gz
emacs-973110680c094b7a3bbcebbfbafb9abfc7adc8fd.zip
Fix previous patch to match its commit message
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dnd.el14
-rw-r--r--lisp/gnus/message.el10
-rw-r--r--lisp/gnus/nnvirtual.el8
-rw-r--r--lisp/startup.el2
4 files changed, 18 insertions, 16 deletions
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 2b68b025ac1..3fda471497f 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -122,17 +122,17 @@ Return nil if URI is not a local file."
122 122
123 ;; The hostname may be our hostname, in that case, convert to a local 123 ;; The hostname may be our hostname, in that case, convert to a local
124 ;; file. Otherwise return nil. TODO: How about an IP-address as hostname? 124 ;; file. Otherwise return nil. TODO: How about an IP-address as hostname?
125 (let ((system-name (system-name))) 125 (let ((sysname (system-name)))
126 (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri) 126 (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri)
127 (downcase (match-string 1 uri)))) 127 (downcase (match-string 1 uri))))
128 (system-name-no-dot 128 (sysname-no-dot
129 (downcase (if (string-match "^[^\\.]+" system-name) 129 (downcase (if (string-match "^[^\\.]+" sysname)
130 (match-string 0 system-name) 130 (match-string 0 sysname)
131 system-name)))) 131 sysname))))
132 (when (and hostname 132 (when (and hostname
133 (or (string-equal "localhost" hostname) 133 (or (string-equal "localhost" hostname)
134 (string-equal (downcase system-name) hostname) 134 (string-equal (downcase sysname) hostname)
135 (string-equal system-name-no-dot hostname))) 135 (string-equal sysname-no-dot hostname)))
136 (concat "file://" (substring uri (+ 7 (length hostname)))))))) 136 (concat "file://" (substring uri (+ 7 (length hostname))))))))
137 137
138(defsubst dnd-unescape-uri (uri) 138(defsubst dnd-unescape-uri (uri)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index d58a2922217..ee5d824a852 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5849,7 +5849,7 @@ give as trustworthy answer as possible."
5849 5849
5850(defun message-make-fqdn () 5850(defun message-make-fqdn ()
5851 "Return user's fully qualified domain name." 5851 "Return user's fully qualified domain name."
5852 (let* ((system-name (system-name)) 5852 (let* ((sysname (system-name))
5853 (user-mail (message-user-mail-address)) 5853 (user-mail (message-user-mail-address))
5854 (user-domain 5854 (user-domain
5855 (if (and user-mail 5855 (if (and user-mail
@@ -5863,10 +5863,10 @@ give as trustworthy answer as possible."
5863 (not (string-match message-bogus-system-names message-user-fqdn))) 5863 (not (string-match message-bogus-system-names message-user-fqdn)))
5864 ;; `message-user-fqdn' seems to be valid 5864 ;; `message-user-fqdn' seems to be valid
5865 message-user-fqdn) 5865 message-user-fqdn)
5866 ((and (string-match message-valid-fqdn-regexp system-name) 5866 ((and (string-match message-valid-fqdn-regexp sysname)
5867 (not (string-match message-bogus-system-names system-name))) 5867 (not (string-match message-bogus-system-names sysname)))
5868 ;; `system-name' returned the right result. 5868 ;; `system-name' returned the right result.
5869 system-name) 5869 sysname)
5870 ;; Try `mail-host-address'. 5870 ;; Try `mail-host-address'.
5871 ((and (boundp 'mail-host-address) 5871 ((and (boundp 'mail-host-address)
5872 (stringp mail-host-address) 5872 (stringp mail-host-address)
@@ -5881,7 +5881,7 @@ give as trustworthy answer as possible."
5881 user-domain) 5881 user-domain)
5882 ;; Default to this bogus thing. 5882 ;; Default to this bogus thing.
5883 (t 5883 (t
5884 (concat system-name 5884 (concat sysname
5885 ".i-did-not-set--mail-host-address--so-tickle-me"))))) 5885 ".i-did-not-set--mail-host-address--so-tickle-me")))))
5886 5886
5887(defun message-make-domain () 5887(defun message-make-domain ()
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index d13b492ddb3..61bf5560e2e 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -99,7 +99,7 @@ component group will show up when you enter the virtual group.")
99 (let ((vbuf (nnheader-set-temp-buffer 99 (let ((vbuf (nnheader-set-temp-buffer
100 (get-buffer-create " *virtual headers*"))) 100 (get-buffer-create " *virtual headers*")))
101 (carticles (nnvirtual-partition-sequence articles)) 101 (carticles (nnvirtual-partition-sequence articles))
102 (system-name (system-name)) 102 (sysname (system-name))
103 cgroup carticle article result prefix) 103 cgroup carticle article result prefix)
104 (while carticles 104 (while carticles
105 (setq cgroup (caar carticles)) 105 (setq cgroup (caar carticles))
@@ -151,7 +151,7 @@ component group will show up when you enter the virtual group.")
151 ;; and clean up the xrefs. 151 ;; and clean up the xrefs.
152 (princ article nntp-server-buffer) 152 (princ article nntp-server-buffer)
153 (nnvirtual-update-xref-header cgroup carticle 153 (nnvirtual-update-xref-header cgroup carticle
154 prefix (system-name)) 154 prefix sysname)
155 (forward-line 1)) 155 (forward-line 1))
156 ) 156 )
157 157
@@ -378,7 +378,7 @@ component group will show up when you enter the virtual group.")
378 (mapc 'nnheader-insert-nov headers)))) 378 (mapc 'nnheader-insert-nov headers))))
379 379
380 380
381(defun nnvirtual-update-xref-header (group article prefix system-name) 381(defun nnvirtual-update-xref-header (group article prefix sysname)
382 "Edit current NOV header in current buffer to have an xref to the component group, and also server prefix any existing xref lines." 382 "Edit current NOV header in current buffer to have an xref to the component group, and also server prefix any existing xref lines."
383 ;; Move to beginning of Xref field, creating a slot if needed. 383 ;; Move to beginning of Xref field, creating a slot if needed.
384 (beginning-of-line) 384 (beginning-of-line)
@@ -393,7 +393,7 @@ component group will show up when you enter the virtual group.")
393 (forward-char -1) 393 (forward-char -1)
394 (delete-char 1)) 394 (delete-char 1))
395 395
396 (insert "Xref: " (system-name) " " group ":") 396 (insert "Xref: " sysname " " group ":")
397 (princ article (current-buffer)) 397 (princ article (current-buffer))
398 (insert " ") 398 (insert " ")
399 399
diff --git a/lisp/startup.el b/lisp/startup.el
index 8e981bbc64a..0c5e66a2e6e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -358,6 +358,8 @@ this variable usefully is to set it while building and dumping Emacs."
358 :set (lambda (_variable _value) 358 :set (lambda (_variable _value)
359 (error "Customizing `site-run-file' does not work"))) 359 (error "Customizing `site-run-file' does not work")))
360 360
361(make-obsolete-variable 'system-name "use (system-name) instead" "25.1")
362
361(defcustom mail-host-address nil 363(defcustom mail-host-address nil
362 "Name of this machine, for purposes of naming users. 364 "Name of this machine, for purposes of naming users.
363If non-nil, Emacs uses this instead of `system-name' when constructing 365If non-nil, Emacs uses this instead of `system-name' when constructing