(mapatoms (lambda (mode)
(let ((name (symbol-name mode)))
(when (string-match "-mode$" name)
- (add-to-list 'modes name)))))
+ (push name modes)))))
(sort modes 'string<)))
(completing-read "Local variables for mode: " v1 nil t)
" . (("
)
;; Order symbols by type
(mapatoms
- #'(lambda (s)
- (add-to-list (cond
- ((get s 'mode-variable-flag)
- (if (get s 'constant-flag) 'mc 'mv))
- ((get s 'override-flag)
- (if (get s 'constant-flag) 'fo 'ov))
- ('us))
- s))
+ (lambda (s) (push s (cond
+ ((get s 'mode-variable-flag)
+ (if (get s 'constant-flag) mc mv))
+ ((get s 'override-flag)
+ (if (get s 'constant-flag) fo ov))
+ (t us))))
table)
;; Print symbols by type
(when us
(let ((hash (gethash key tramp-cache-data))
properties)
(when (hash-table-p hash)
- (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash))
+ (maphash (lambda (x _y) (push x properties)) hash))
properties))
(setq tramp-cache-data-changed t)
(remhash key tramp-cache-data))
(when (and (tramp-file-name-p key)
(null (tramp-file-name-localname key))
(tramp-connection-property-p key "process-buffer"))
- (add-to-list 'result key)))
+ (push key result)))
tramp-cache-data)
result))
"Return all discovered Avahi service names as list."
(let (result)
(maphash
- (lambda (_key value) (add-to-list 'result (zeroconf-service-name value)))
+ (lambda (_key value) (push (zeroconf-service-name value) result))
zeroconf-services-hash)
- result))
+ (delete-dups result)))
(defun zeroconf-list-service-types ()
"Return all discovered Avahi service types as list."
(let (result)
(maphash
- (lambda (_key value) (add-to-list 'result (zeroconf-service-type value)))
+ (lambda (_key value) (push (zeroconf-service-type value) result))
zeroconf-services-hash)
- result))
+ (delete-dups result)))
(defun zeroconf-list-services (type)
"Return all discovered Avahi services for a given service type TYPE.
(maphash
(lambda (_key value)
(when (equal type (zeroconf-service-type value))
- (add-to-list 'result value)))
+ (push value result)))
zeroconf-services-hash)
- result))
+ (delete-dups result)))
(defvar zeroconf-service-added-hooks-hash (make-hash-table :test 'equal)
"Hash table of hooks for newly added services.
(and (string= org-dir contrib-dir)
(org-load-noerror-mustsuffix (concat contrib-dir f)))
(and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f))
- (add-to-list 'load-uncore f 'append)
+ (push f load-uncore)
't)
f))
lfeat)))
(when load-uncore
(message "The following feature%s found in load-path, please check if that's correct:\n%s"
- (if (> (length load-uncore) 1) "s were" " was") load-uncore))
+ (if (> (length load-uncore) 1) "s were" " was")
+ (reverse load-uncore)))
(if load-misses
(message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s"
(if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full))
(mapcar
#'(lambda (option)
(when force
- (add-to-list 'style (car option)))
+ (push (car option) style))
(goto-char rstart)
(let ((regexp
(cond
(with-maps-do map
(let ((result nil))
(map-do (lambda (k v)
- (add-to-list 'result (list (int-to-string k) v)))
+ (push (list (int-to-string k) v) result))
map)
(should (equal result '(("2" 5) ("1" 4) ("0" 3)))))))