Mercurial > emacs
comparison lisp/=gnuspost.el @ 4172:33ace0ef7c4d
(gnus-current-time-zone): Fix typo.
(gnus-inews-organization): Fix zero length string operation bug.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 Jul 1993 04:25:04 +0000 |
parents | 4114a1d07f7c |
children | c002b7320691 |
comparison
equal
deleted
inserted
replaced
4171:341cd3b063ae | 4172:33ace0ef7c4d |
---|---|
1 ;;; gnuspost.el --- post news commands for GNUS newsreader | 1 ;;; gnuspost.el --- post news commands for GNUS newsreader |
2 | 2 |
3 ;; Copyright (C) 1989, 1990, 1993 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1989, 1990, 1993 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> | 5 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> |
6 ;; Version: $Header: gnuspost.el,v 4.1 93/07/19 15:43:46 umerin Exp $ | |
6 ;; Keywords: news | 7 ;; Keywords: news |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
9 | 10 |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
691 (error "Cannot understand current-time-string: %s." date)) | 692 (error "Cannot understand current-time-string: %s." date)) |
692 )) | 693 )) |
693 | 694 |
694 (defun gnus-current-time-zone (time) | 695 (defun gnus-current-time-zone (time) |
695 "The local time zone in effect at TIME, or nil if not known." | 696 "The local time zone in effect at TIME, or nil if not known." |
696 (let ((z (and (fboundp 'current-time-zone) (current-time-zone now)))) | 697 (let ((z (and (fboundp 'current-time-zone) (current-time-zone time)))) |
697 (if (and z (car z)) z gnus-local-timezone))) | 698 (if (and z (car z)) z gnus-local-timezone))) |
698 | 699 |
699 (defun gnus-inews-date () | 700 (defun gnus-inews-date () |
700 "Date string of today. | 701 "Date string of today. |
701 If `current-time-zone' works, or if `gnus-local-timezone' is set correctly, | 702 If `current-time-zone' works, or if `gnus-local-timezone' is set correctly, |
756 (let* ((private-file (expand-file-name "~/.organization" nil)) | 757 (let* ((private-file (expand-file-name "~/.organization" nil)) |
757 (organization (or (getenv "ORGANIZATION") | 758 (organization (or (getenv "ORGANIZATION") |
758 gnus-local-organization | 759 gnus-local-organization |
759 private-file))) | 760 private-file))) |
760 (and (stringp organization) | 761 (and (stringp organization) |
762 (> (length organization) 0) | |
761 (string-equal (substring organization 0 1) "/") | 763 (string-equal (substring organization 0 1) "/") |
762 ;; Get it from the user and system file. | 764 ;; Get it from the user and system file. |
763 ;; Suggested by roland@wheaties.ai.mit.edu (Roland McGrath). | 765 ;; Suggested by roland@wheaties.ai.mit.edu (Roland McGrath). |
764 (let ((dist (mail-fetch-field "distribution"))) | 766 (let ((dist (mail-fetch-field "distribution"))) |
765 (setq organization | 767 (setq organization |